@dynamic-labs/solana 4.8.0 → 4.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +10 -10
- package/src/injected/InjectedWalletBase/InjectedWalletBase.cjs +2 -2
- package/src/injected/InjectedWalletBase/InjectedWalletBase.js +2 -2
- package/src/phantomRedirect/PhantomRedirect/PhantomRedirect.cjs +7 -7
- package/src/phantomRedirect/PhantomRedirect/PhantomRedirect.js +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.8.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.8.0...v4.8.1) (2025-02-25)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* wc redirect for safari inside iframe ([#8131](https://github.com/dynamic-labs/dynamic-auth/issues/8131)) ([8c74bea](https://github.com/dynamic-labs/dynamic-auth/commit/8c74beae505014eb85be4fd211909709d0a339dd))
|
|
8
|
+
|
|
2
9
|
## [4.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.2...v4.8.0) (2025-02-25)
|
|
3
10
|
|
|
4
11
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/solana",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.1",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@wallet-standard/experimental-features": "0.1.1",
|
|
26
26
|
"bs58": "5.0.0",
|
|
27
27
|
"tweetnacl": "1.0.3",
|
|
28
|
-
"@dynamic-labs/assert-package-version": "4.8.
|
|
29
|
-
"@dynamic-labs/embedded-wallet-solana": "4.8.
|
|
30
|
-
"@dynamic-labs/logger": "4.8.
|
|
31
|
-
"@dynamic-labs/rpc-providers": "4.8.
|
|
28
|
+
"@dynamic-labs/assert-package-version": "4.8.1",
|
|
29
|
+
"@dynamic-labs/embedded-wallet-solana": "4.8.1",
|
|
30
|
+
"@dynamic-labs/logger": "4.8.1",
|
|
31
|
+
"@dynamic-labs/rpc-providers": "4.8.1",
|
|
32
32
|
"@dynamic-labs/sdk-api-core": "0.0.628",
|
|
33
|
-
"@dynamic-labs/solana-core": "4.8.
|
|
34
|
-
"@dynamic-labs/types": "4.8.
|
|
35
|
-
"@dynamic-labs/utils": "4.8.
|
|
36
|
-
"@dynamic-labs/wallet-book": "4.8.
|
|
37
|
-
"@dynamic-labs/wallet-connector-core": "4.8.
|
|
33
|
+
"@dynamic-labs/solana-core": "4.8.1",
|
|
34
|
+
"@dynamic-labs/types": "4.8.1",
|
|
35
|
+
"@dynamic-labs/utils": "4.8.1",
|
|
36
|
+
"@dynamic-labs/wallet-book": "4.8.1",
|
|
37
|
+
"@dynamic-labs/wallet-connector-core": "4.8.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {}
|
|
40
40
|
}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
7
7
|
var web3_js = require('@solana/web3.js');
|
|
8
|
-
var utils = require('@dynamic-labs/utils');
|
|
9
8
|
var solanaCore = require('@dynamic-labs/solana-core');
|
|
9
|
+
var utils = require('@dynamic-labs/utils');
|
|
10
10
|
var SolProviderHelper = require('../../SolProviderHelper/SolProviderHelper.cjs');
|
|
11
11
|
var SignMessageNotSupportedError = require('../../errors/SignMessageNotSupportedError.cjs');
|
|
12
12
|
|
|
@@ -88,7 +88,7 @@ class InjectedWalletBase extends solanaCore.SolanaWalletConnector {
|
|
|
88
88
|
const deepLink = inAppBrowserCompiledTemplate({
|
|
89
89
|
encodedDappURI: encodeURIComponent(window.location.toString()),
|
|
90
90
|
});
|
|
91
|
-
|
|
91
|
+
utils.PlatformService.openURL(deepLink);
|
|
92
92
|
}
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
|
4
|
-
import { isMobile, template } from '@dynamic-labs/utils';
|
|
5
4
|
import { SolanaWalletConnector, SolanaUiTransaction } from '@dynamic-labs/solana-core';
|
|
5
|
+
import { isMobile, template, PlatformService } from '@dynamic-labs/utils';
|
|
6
6
|
import { SolProviderHelper } from '../../SolProviderHelper/SolProviderHelper.js';
|
|
7
7
|
import { SignMessageNotSupportedError } from '../../errors/SignMessageNotSupportedError.js';
|
|
8
8
|
|
|
@@ -84,7 +84,7 @@ class InjectedWalletBase extends SolanaWalletConnector {
|
|
|
84
84
|
const deepLink = inAppBrowserCompiledTemplate({
|
|
85
85
|
encodedDappURI: encodeURIComponent(window.location.toString()),
|
|
86
86
|
});
|
|
87
|
-
|
|
87
|
+
PlatformService.openURL(deepLink);
|
|
88
88
|
}
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
@@ -69,7 +69,7 @@ class PhantomRedirect extends solanaCore.SolanaWalletConnector {
|
|
|
69
69
|
redirect_link: window.location.href,
|
|
70
70
|
});
|
|
71
71
|
const url = buildUrl.buildUrl('connect', params);
|
|
72
|
-
|
|
72
|
+
utils.PlatformService.openURL(url);
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
getSession() {
|
|
@@ -105,7 +105,7 @@ class PhantomRedirect extends solanaCore.SolanaWalletConnector {
|
|
|
105
105
|
});
|
|
106
106
|
const url = buildUrl.buildUrl('signMessage', params);
|
|
107
107
|
storage.storage.method.set('signMessage');
|
|
108
|
-
|
|
108
|
+
utils.PlatformService.openURL(url);
|
|
109
109
|
// throwing this to prevent local storage from being cleared.
|
|
110
110
|
// when verifying signature, the SDK calls endSession when no
|
|
111
111
|
// signature is returned. in the case of phantom mobile, a signature
|
|
@@ -224,7 +224,7 @@ class PhantomRedirect extends solanaCore.SolanaWalletConnector {
|
|
|
224
224
|
redirect_link: window.location.href,
|
|
225
225
|
});
|
|
226
226
|
const url = buildUrl.buildUrl('signAllTransactions', params);
|
|
227
|
-
|
|
227
|
+
utils.PlatformService.openURL(url);
|
|
228
228
|
// actual signatures will be retrieved upon redirect back to dapp
|
|
229
229
|
return [];
|
|
230
230
|
}),
|
|
@@ -244,7 +244,7 @@ class PhantomRedirect extends solanaCore.SolanaWalletConnector {
|
|
|
244
244
|
});
|
|
245
245
|
const url = buildUrl.buildUrl('signAndSendTransaction', params);
|
|
246
246
|
storage.storage.method.set('signAndSendTransaction');
|
|
247
|
-
|
|
247
|
+
utils.PlatformService.openURL(url);
|
|
248
248
|
// actual signature will be retrived upon redirect back to dapp
|
|
249
249
|
return { signature: '' };
|
|
250
250
|
}),
|
|
@@ -262,7 +262,7 @@ class PhantomRedirect extends solanaCore.SolanaWalletConnector {
|
|
|
262
262
|
redirect_link: window.location.href,
|
|
263
263
|
});
|
|
264
264
|
const url = buildUrl.buildUrl('signMessage', params);
|
|
265
|
-
|
|
265
|
+
utils.PlatformService.openURL(url);
|
|
266
266
|
// actual signature will be retrived upon redirect back to dapp
|
|
267
267
|
return { signature: Buffer.from('') };
|
|
268
268
|
}),
|
|
@@ -283,7 +283,7 @@ class PhantomRedirect extends solanaCore.SolanaWalletConnector {
|
|
|
283
283
|
redirect_link: window.location.href,
|
|
284
284
|
});
|
|
285
285
|
const url = buildUrl.buildUrl('signTransaction', params);
|
|
286
|
-
|
|
286
|
+
utils.PlatformService.openURL(url);
|
|
287
287
|
return transaction;
|
|
288
288
|
}),
|
|
289
289
|
};
|
|
@@ -315,7 +315,7 @@ class PhantomRedirect extends solanaCore.SolanaWalletConnector {
|
|
|
315
315
|
redirect_link: window.location.href,
|
|
316
316
|
});
|
|
317
317
|
const url = buildUrl.buildUrl('disconnect', params);
|
|
318
|
-
|
|
318
|
+
utils.PlatformService.openURL(url);
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
/**
|
|
@@ -4,7 +4,7 @@ import { PublicKey, Transaction } from '@solana/web3.js';
|
|
|
4
4
|
import bs58 from 'bs58';
|
|
5
5
|
import nacl from 'tweetnacl';
|
|
6
6
|
import { SolanaWalletConnector } from '@dynamic-labs/solana-core';
|
|
7
|
-
import { StorageService, PHANTOM_REDIRECT_CONNECTION_TYPE_KEY } from '@dynamic-labs/utils';
|
|
7
|
+
import { StorageService, PHANTOM_REDIRECT_CONNECTION_TYPE_KEY, PlatformService } from '@dynamic-labs/utils';
|
|
8
8
|
import { buildUrl } from '../buildUrl/buildUrl.js';
|
|
9
9
|
import { decryptPayload } from '../decryptPayload/decryptPayload.js';
|
|
10
10
|
import { encryptPayload } from '../encryptPayload/encryptPayload.js';
|
|
@@ -60,7 +60,7 @@ class PhantomRedirect extends SolanaWalletConnector {
|
|
|
60
60
|
redirect_link: window.location.href,
|
|
61
61
|
});
|
|
62
62
|
const url = buildUrl('connect', params);
|
|
63
|
-
|
|
63
|
+
PlatformService.openURL(url);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
getSession() {
|
|
@@ -96,7 +96,7 @@ class PhantomRedirect extends SolanaWalletConnector {
|
|
|
96
96
|
});
|
|
97
97
|
const url = buildUrl('signMessage', params);
|
|
98
98
|
storage.method.set('signMessage');
|
|
99
|
-
|
|
99
|
+
PlatformService.openURL(url);
|
|
100
100
|
// throwing this to prevent local storage from being cleared.
|
|
101
101
|
// when verifying signature, the SDK calls endSession when no
|
|
102
102
|
// signature is returned. in the case of phantom mobile, a signature
|
|
@@ -215,7 +215,7 @@ class PhantomRedirect extends SolanaWalletConnector {
|
|
|
215
215
|
redirect_link: window.location.href,
|
|
216
216
|
});
|
|
217
217
|
const url = buildUrl('signAllTransactions', params);
|
|
218
|
-
|
|
218
|
+
PlatformService.openURL(url);
|
|
219
219
|
// actual signatures will be retrieved upon redirect back to dapp
|
|
220
220
|
return [];
|
|
221
221
|
}),
|
|
@@ -235,7 +235,7 @@ class PhantomRedirect extends SolanaWalletConnector {
|
|
|
235
235
|
});
|
|
236
236
|
const url = buildUrl('signAndSendTransaction', params);
|
|
237
237
|
storage.method.set('signAndSendTransaction');
|
|
238
|
-
|
|
238
|
+
PlatformService.openURL(url);
|
|
239
239
|
// actual signature will be retrived upon redirect back to dapp
|
|
240
240
|
return { signature: '' };
|
|
241
241
|
}),
|
|
@@ -253,7 +253,7 @@ class PhantomRedirect extends SolanaWalletConnector {
|
|
|
253
253
|
redirect_link: window.location.href,
|
|
254
254
|
});
|
|
255
255
|
const url = buildUrl('signMessage', params);
|
|
256
|
-
|
|
256
|
+
PlatformService.openURL(url);
|
|
257
257
|
// actual signature will be retrived upon redirect back to dapp
|
|
258
258
|
return { signature: Buffer.from('') };
|
|
259
259
|
}),
|
|
@@ -274,7 +274,7 @@ class PhantomRedirect extends SolanaWalletConnector {
|
|
|
274
274
|
redirect_link: window.location.href,
|
|
275
275
|
});
|
|
276
276
|
const url = buildUrl('signTransaction', params);
|
|
277
|
-
|
|
277
|
+
PlatformService.openURL(url);
|
|
278
278
|
return transaction;
|
|
279
279
|
}),
|
|
280
280
|
};
|
|
@@ -306,7 +306,7 @@ class PhantomRedirect extends SolanaWalletConnector {
|
|
|
306
306
|
redirect_link: window.location.href,
|
|
307
307
|
});
|
|
308
308
|
const url = buildUrl('disconnect', params);
|
|
309
|
-
|
|
309
|
+
PlatformService.openURL(url);
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
/**
|