@dynamic-labs/starknet 4.0.0-alpha.48 → 4.0.0-alpha.49
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 +29 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +9 -9
- package/src/index.cjs +2 -0
- package/src/index.js +2 -0
- package/src/wallets/injected/braavos.cjs +31 -0
- package/src/wallets/injected/braavos.d.ts +13 -0
- package/src/wallets/injected/braavos.js +27 -0
- package/src/wallets/injected/fetchStarknetInjectedWalletConnectors.cjs +2 -0
- package/src/wallets/injected/fetchStarknetInjectedWalletConnectors.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.49](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.48...v4.0.0-alpha.49) (2024-12-27)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* change openFunding to openExternalFunding (#7684)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* aa blockaid simulations ([#7583](https://github.com/dynamic-labs/dynamic-auth/issues/7583)) ([6436220](https://github.com/dynamic-labs/dynamic-auth/commit/64362204d2c96291a37bf281d62531d6f2384fdf))
|
|
12
|
+
* add ethereum createConnector function ([#7607](https://github.com/dynamic-labs/dynamic-auth/issues/7607)) ([f306537](https://github.com/dynamic-labs/dynamic-auth/commit/f3065372f3c5dfc8bf26173dc722576e614af5e1))
|
|
13
|
+
* add fundWithExternalWallet method to useFunding ([#7688](https://github.com/dynamic-labs/dynamic-auth/issues/7688)) ([d48b1d2](https://github.com/dynamic-labs/dynamic-auth/commit/d48b1d2568ba928b322a4d81b6386e775ae4aa98))
|
|
14
|
+
* change openFunding to openExternalFunding ([#7684](https://github.com/dynamic-labs/dynamic-auth/issues/7684)) ([8efb9cb](https://github.com/dynamic-labs/dynamic-auth/commit/8efb9cb9ca3d7e2273c14e18f7be5892e50b8e12))
|
|
15
|
+
* connect global wallet in ethereum ([#7619](https://github.com/dynamic-labs/dynamic-auth/issues/7619)) ([fdb7f00](https://github.com/dynamic-labs/dynamic-auth/commit/fdb7f00c33f7da3ac95ae13ac674caa64b453cae))
|
|
16
|
+
* create wallet groups dynamically based on wallet options ([#7662](https://github.com/dynamic-labs/dynamic-auth/issues/7662)) ([981affc](https://github.com/dynamic-labs/dynamic-auth/commit/981affce5518f6532d960fe4e879e9cf40a66ce7))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **ethereum:** normalize user reject error from injected wallets ([#7702](https://github.com/dynamic-labs/dynamic-auth/issues/7702)) ([ce456a8](https://github.com/dynamic-labs/dynamic-auth/commit/ce456a8592197b07857baf32bb1b38867ffb37fe))
|
|
22
|
+
* fetch nonce when authenticating a user that connected in connect-only mode ([#7689](https://github.com/dynamic-labs/dynamic-auth/issues/7689)) ([f048bb9](https://github.com/dynamic-labs/dynamic-auth/commit/f048bb96b6cb5ae603966b2813f900a082cd158f))
|
|
23
|
+
* filter out wallets for the current network when using external wallet funding ([#7694](https://github.com/dynamic-labs/dynamic-auth/issues/7694)) ([65db665](https://github.com/dynamic-labs/dynamic-auth/commit/65db6652a934561e7d07379a65d2baa8f7813d8e))
|
|
24
|
+
* remove toaccount from signmessage and signtypeddata for zerodev ([#7650](https://github.com/dynamic-labs/dynamic-auth/issues/7650)) ([626e849](https://github.com/dynamic-labs/dynamic-auth/commit/626e849a4af3af51d60b42dd2787edb05126744b))
|
|
25
|
+
* save nonce to storage ([#7698](https://github.com/dynamic-labs/dynamic-auth/issues/7698)) ([93dc65b](https://github.com/dynamic-labs/dynamic-auth/commit/93dc65b7f78040367b85420c1374f3cafbfb598b))
|
|
26
|
+
* **sdk-react-core:** add timeout when getting connected accounts ([#7697](https://github.com/dynamic-labs/dynamic-auth/issues/7697)) ([9a4bd7c](https://github.com/dynamic-labs/dynamic-auth/commit/9a4bd7c02795205ec98d8d71aba75b51b9bbee7c))
|
|
27
|
+
* update auth token from new source ([#7666](https://github.com/dynamic-labs/dynamic-auth/issues/7666)) ([61798de](https://github.com/dynamic-labs/dynamic-auth/commit/61798de26d759db9064f5f84118540346a44ab50))
|
|
28
|
+
* update extension update_url endpoint ([#7655](https://github.com/dynamic-labs/dynamic-auth/issues/7655)) ([46cff3a](https://github.com/dynamic-labs/dynamic-auth/commit/46cff3a80c9efee659a764df47f927ed5a117079))
|
|
29
|
+
* zerodev confirmation UI closes properly ([#7664](https://github.com/dynamic-labs/dynamic-auth/issues/7664)) ([a78aded](https://github.com/dynamic-labs/dynamic-auth/commit/a78adedc054d09134198d22812aa5cab7bbff548))
|
|
30
|
+
|
|
2
31
|
## [4.0.0-alpha.48](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.47...v4.0.0-alpha.48) (2024-12-17)
|
|
3
32
|
|
|
4
33
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/starknet",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.49",
|
|
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",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"starknet": "6.11.0",
|
|
24
24
|
"starknetkit": "2.6.2",
|
|
25
25
|
"text-encoding": "0.7.0",
|
|
26
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
27
|
-
"@dynamic-labs/assert-package-version": "4.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/logger": "4.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/rpc-providers": "4.0.0-alpha.
|
|
30
|
-
"@dynamic-labs/starknet-core": "4.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
33
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
26
|
+
"@dynamic-labs/sdk-api-core": "0.0.578",
|
|
27
|
+
"@dynamic-labs/assert-package-version": "4.0.0-alpha.49",
|
|
28
|
+
"@dynamic-labs/logger": "4.0.0-alpha.49",
|
|
29
|
+
"@dynamic-labs/rpc-providers": "4.0.0-alpha.49",
|
|
30
|
+
"@dynamic-labs/starknet-core": "4.0.0-alpha.49",
|
|
31
|
+
"@dynamic-labs/utils": "4.0.0-alpha.49",
|
|
32
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.49",
|
|
33
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.49",
|
|
34
34
|
"assert": "2.1.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {}
|
package/src/index.cjs
CHANGED
|
@@ -10,6 +10,7 @@ var argentMobile = require('./wallets/argent/argentMobile/argentMobile.cjs');
|
|
|
10
10
|
var webwallet = require('./wallets/argent/webwallet/webwallet.cjs');
|
|
11
11
|
var metamask = require('./wallets/injected/metamask.cjs');
|
|
12
12
|
var fetchStarknetInjectedWalletConnectors = require('./wallets/injected/fetchStarknetInjectedWalletConnectors.cjs');
|
|
13
|
+
var braavos = require('./wallets/injected/braavos.cjs');
|
|
13
14
|
require('@dynamic-labs/starknet-core');
|
|
14
15
|
var StarknetWallet = require('./wallet/StarknetWallet.cjs');
|
|
15
16
|
var isStarknetWallet = require('./wallet/isStarknetWallet/isStarknetWallet.cjs');
|
|
@@ -24,6 +25,7 @@ const StarknetWalletConnectors = (props) => [
|
|
|
24
25
|
argentMobile.ArgentMobile,
|
|
25
26
|
webwallet.WebWallet,
|
|
26
27
|
metamask.MetaMask,
|
|
28
|
+
braavos.Braavos,
|
|
27
29
|
];
|
|
28
30
|
|
|
29
31
|
exports.StarknetWallet = StarknetWallet.StarknetWallet;
|
package/src/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { ArgentMobile } from './wallets/argent/argentMobile/argentMobile.js';
|
|
|
6
6
|
import { WebWallet } from './wallets/argent/webwallet/webwallet.js';
|
|
7
7
|
import { MetaMask } from './wallets/injected/metamask.js';
|
|
8
8
|
import { fetchStarknetInjectedWalletConnectors } from './wallets/injected/fetchStarknetInjectedWalletConnectors.js';
|
|
9
|
+
import { Braavos } from './wallets/injected/braavos.js';
|
|
9
10
|
import '@dynamic-labs/starknet-core';
|
|
10
11
|
export { StarknetWallet } from './wallet/StarknetWallet.js';
|
|
11
12
|
export { isStarknetWallet } from './wallet/isStarknetWallet/isStarknetWallet.js';
|
|
@@ -20,6 +21,7 @@ const StarknetWalletConnectors = (props) => [
|
|
|
20
21
|
ArgentMobile,
|
|
21
22
|
WebWallet,
|
|
22
23
|
MetaMask,
|
|
24
|
+
Braavos,
|
|
23
25
|
];
|
|
24
26
|
|
|
25
27
|
export { StarknetWalletConnectors };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var utils = require('@dynamic-labs/utils');
|
|
7
|
+
var injected = require('./injected.cjs');
|
|
8
|
+
|
|
9
|
+
class Braavos extends injected.Injected {
|
|
10
|
+
constructor(opts) {
|
|
11
|
+
super('Braavos', 'braavos', opts);
|
|
12
|
+
this.overrideKey = 'braavos';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Adds a timeout for getConnectedAccounts request to prevent
|
|
16
|
+
* the SDK from becoming unresponsive when Braavos is locked and does not prompt
|
|
17
|
+
* the user to unlock
|
|
18
|
+
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
19
|
+
* will timeout and return an empty array.
|
|
20
|
+
*/
|
|
21
|
+
getConnectedAccounts() {
|
|
22
|
+
return utils.retryableFn(() => super.getConnectedAccounts(), {
|
|
23
|
+
fallbackValue: [],
|
|
24
|
+
maxRetries: 0,
|
|
25
|
+
retryStrategy: 'timeout-only',
|
|
26
|
+
timeoutMs: 3000,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.Braavos = Braavos;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Injected } from './injected';
|
|
2
|
+
export declare class Braavos extends Injected {
|
|
3
|
+
overrideKey: string;
|
|
4
|
+
constructor(opts: any);
|
|
5
|
+
/**
|
|
6
|
+
* Adds a timeout for getConnectedAccounts request to prevent
|
|
7
|
+
* the SDK from becoming unresponsive when Braavos is locked and does not prompt
|
|
8
|
+
* the user to unlock
|
|
9
|
+
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
10
|
+
* will timeout and return an empty array.
|
|
11
|
+
*/
|
|
12
|
+
getConnectedAccounts(): Promise<string[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { retryableFn } from '@dynamic-labs/utils';
|
|
3
|
+
import { Injected } from './injected.js';
|
|
4
|
+
|
|
5
|
+
class Braavos extends Injected {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super('Braavos', 'braavos', opts);
|
|
8
|
+
this.overrideKey = 'braavos';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Adds a timeout for getConnectedAccounts request to prevent
|
|
12
|
+
* the SDK from becoming unresponsive when Braavos is locked and does not prompt
|
|
13
|
+
* the user to unlock
|
|
14
|
+
* If getConnectedAccounts() doesn't resolve within 3 seconds, the operation
|
|
15
|
+
* will timeout and return an empty array.
|
|
16
|
+
*/
|
|
17
|
+
getConnectedAccounts() {
|
|
18
|
+
return retryableFn(() => super.getConnectedAccounts(), {
|
|
19
|
+
fallbackValue: [],
|
|
20
|
+
maxRetries: 0,
|
|
21
|
+
retryStrategy: 'timeout-only',
|
|
22
|
+
timeoutMs: 3000,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Braavos };
|
|
@@ -8,6 +8,8 @@ var injected = require('./injected.cjs');
|
|
|
8
8
|
const filteredStarknetWalletKeysOverrides = [
|
|
9
9
|
// TODO(starknet-v6): Remove once these wallets support v6
|
|
10
10
|
'bitgetstarknet',
|
|
11
|
+
// Braavos has its own connector to implement specific logic
|
|
12
|
+
'braavos',
|
|
11
13
|
];
|
|
12
14
|
const fetchStarknetInjectedWalletConnectors = ({ walletBook, }) => {
|
|
13
15
|
var _a;
|
|
@@ -4,6 +4,8 @@ import { Injected } from './injected.js';
|
|
|
4
4
|
const filteredStarknetWalletKeysOverrides = [
|
|
5
5
|
// TODO(starknet-v6): Remove once these wallets support v6
|
|
6
6
|
'bitgetstarknet',
|
|
7
|
+
// Braavos has its own connector to implement specific logic
|
|
8
|
+
'braavos',
|
|
7
9
|
];
|
|
8
10
|
const fetchStarknetInjectedWalletConnectors = ({ walletBook, }) => {
|
|
9
11
|
var _a;
|