@dynamic-labs/wallet-connector-core 2.0.0-alpha.1 → 2.0.0-alpha.11
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 +160 -0
- package/package.json +8 -9
- package/src/index.cjs +6 -2
- package/src/index.js +3 -1
- package/src/lib/ICoinbaseMPCWalletConnector.d.ts +21 -0
- package/src/lib/ISendBalanceWalletConnector.d.ts +5 -0
- package/src/lib/IWalletConnectConnector.d.ts +4 -0
- package/src/lib/WalletConnector.cjs +3 -11
- package/src/lib/WalletConnector.d.ts +9 -17
- package/src/lib/WalletConnector.js +3 -11
- package/src/lib/index.d.ts +3 -0
- package/src/utils/index.d.ts +3 -1
- package/src/utils/isCoinbaseMpcWalletConnector/index.d.ts +1 -0
- package/src/utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.cjs +11 -0
- package/src/utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.d.ts +2 -0
- package/src/utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.js +7 -0
- package/src/utils/isSendBalanceWalletConnector/index.d.ts +1 -0
- package/src/utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.cjs +8 -0
- package/src/utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.d.ts +3 -0
- package/src/utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.js +4 -0
- package/src/utils/isWalletConnectConnector/index.d.ts +1 -0
- package/src/utils/isWalletConnectConnector/isWalletConnectConnector.cjs +7 -0
- package/src/utils/isWalletConnectConnector/isWalletConnectConnector.d.ts +2 -0
- package/src/utils/isWalletConnectConnector/isWalletConnectConnector.js +3 -0
- package/src/utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.d.ts +2 -2
- package/src/utils/normalizeWalletName/index.d.ts +0 -1
- package/src/utils/normalizeWalletName/normalizeWalletName.cjs +0 -7
- package/src/utils/normalizeWalletName/normalizeWalletName.d.ts +0 -1
- package/src/utils/normalizeWalletName/normalizeWalletName.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,164 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2024-03-12)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* rename FetchPublicAddressOpts to GetAddressOpts (#4910)
|
|
8
|
+
* remove use effect in useWalletEventListeners (#4843)
|
|
9
|
+
* rename fetchPublicAddress to getAddress (#4851)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Add farcaster to iconic ([#4925](https://github.com/dynamic-labs/DynamicAuth/issues/4925)) ([ab282dc](https://github.com/dynamic-labs/DynamicAuth/commit/ab282dc9cdcc0fe11f014d002b056ef4d3b34234))
|
|
14
|
+
* use transaction confirmation ui on signAndSendTransaction for solana embedded wallets ([#4909](https://github.com/dynamic-labs/DynamicAuth/issues/4909)) ([d77e89e](https://github.com/dynamic-labs/DynamicAuth/commit/d77e89ecff9dfc67ed48537f541a9995b2662e1e))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* add back connect button css variables ([#4922](https://github.com/dynamic-labs/DynamicAuth/issues/4922)) ([1119d62](https://github.com/dynamic-labs/DynamicAuth/commit/1119d62c2db6504952393060930524c3823e4a00))
|
|
20
|
+
* keep adaptive wallet list height ([#4916](https://github.com/dynamic-labs/DynamicAuth/issues/4916)) ([62aa54e](https://github.com/dynamic-labs/DynamicAuth/commit/62aa54e81d563082f7aa519f2ff2b5132e7dd83d))
|
|
21
|
+
* pass account and chain to walletClient ([#4865](https://github.com/dynamic-labs/DynamicAuth/issues/4865)) ([17a143f](https://github.com/dynamic-labs/DynamicAuth/commit/17a143f87a77e56227b2517038c20cf67f8e08bf))
|
|
22
|
+
* update walletbook to fix zerion in-app browser detection issue ([#4917](https://github.com/dynamic-labs/DynamicAuth/issues/4917)) ([48b05d7](https://github.com/dynamic-labs/DynamicAuth/commit/48b05d78e4f7add09787b64505723d4eca34d3e0))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* remove use effect in useWalletEventListeners ([#4843](https://github.com/dynamic-labs/DynamicAuth/issues/4843)) ([2e948bb](https://github.com/dynamic-labs/DynamicAuth/commit/2e948bbca0dbdceab7460a844d0988eacd47f581))
|
|
26
|
+
* rename fetchPublicAddress to getAddress ([#4851](https://github.com/dynamic-labs/DynamicAuth/issues/4851)) ([668e7dd](https://github.com/dynamic-labs/DynamicAuth/commit/668e7dd62e1f323dbe64209b5c59c2cd0ee45d61))
|
|
27
|
+
* rename FetchPublicAddressOpts to GetAddressOpts ([#4910](https://github.com/dynamic-labs/DynamicAuth/issues/4910)) ([e5e4b1b](https://github.com/dynamic-labs/DynamicAuth/commit/e5e4b1b08a4e010afa44f8abb0bf6af7f236a86a))
|
|
28
|
+
|
|
29
|
+
## [2.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.9...v2.0.0-alpha.10) (2024-03-08)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### ⚠ BREAKING CHANGES
|
|
33
|
+
|
|
34
|
+
* rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… (#4892)
|
|
35
|
+
* refactor send transaction for multi chain (#4831)
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* add sandbox indicator to sdk ([62fd821](https://github.com/dynamic-labs/DynamicAuth/commit/62fd821a895bb54cec4cae3d153aa0056a7e6638))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* coinbase connector and auth fetcher no being set properly ([#4891](https://github.com/dynamic-labs/DynamicAuth/issues/4891)) ([328566f](https://github.com/dynamic-labs/DynamicAuth/commit/328566ff39c38d5b5761ddc655de3a5d08bb567a))
|
|
45
|
+
* fix server side rendering ([#4811](https://github.com/dynamic-labs/DynamicAuth/issues/4811)) ([063dfae](https://github.com/dynamic-labs/DynamicAuth/commit/063dfae8b6750875d2f35dd9709a1f675495f4fb))
|
|
46
|
+
* hide network ([#4885](https://github.com/dynamic-labs/DynamicAuth/issues/4885)) ([ec10c58](https://github.com/dynamic-labs/DynamicAuth/commit/ec10c588218f067e991d5830fc06ec081e4e1d18))
|
|
47
|
+
* network picker on mobile ([#4887](https://github.com/dynamic-labs/DynamicAuth/issues/4887)) ([6e0ab1b](https://github.com/dynamic-labs/DynamicAuth/commit/6e0ab1bc7d138b73373741960a501ff7cf20e3f9))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
* refactor send transaction for multi chain ([#4831](https://github.com/dynamic-labs/DynamicAuth/issues/4831)) ([c98444b](https://github.com/dynamic-labs/DynamicAuth/commit/c98444be7935420dda3d8216d03946f5893eb82f))
|
|
51
|
+
* rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… ([#4892](https://github.com/dynamic-labs/DynamicAuth/issues/4892)) ([7cdf519](https://github.com/dynamic-labs/DynamicAuth/commit/7cdf5196b1cd8516de2d456163fe9071956d40d3))
|
|
52
|
+
|
|
53
|
+
## [2.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2024-03-06)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* solana connector new sendTransaction method ([#4842](https://github.com/dynamic-labs/DynamicAuth/issues/4842)) ([0b198e3](https://github.com/dynamic-labs/DynamicAuth/commit/0b198e30d83fbbc8d506654d87cbfad403fda289))
|
|
59
|
+
* specify solana network when using phantom redirect deeplinking ([#4863](https://github.com/dynamic-labs/DynamicAuth/issues/4863)) ([fb4ee7c](https://github.com/dynamic-labs/DynamicAuth/commit/fb4ee7cfc0493c9c85b6ccb31954842556c58aa4))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* isLoggedIn should return true even when there is no primary wallet ([#4875](https://github.com/dynamic-labs/DynamicAuth/issues/4875)) ([f396e22](https://github.com/dynamic-labs/DynamicAuth/commit/f396e22b9d809b05ac52194ffa4346f3591d17fe))
|
|
65
|
+
* update btckit network conversion for signPsbt ([a6009e1](https://github.com/dynamic-labs/DynamicAuth/commit/a6009e18c453b4e65545455fea0e52ed7a983b4d))
|
|
66
|
+
* user getting logged out when signing in with email linked to a unavailable wallet ([#4858](https://github.com/dynamic-labs/DynamicAuth/issues/4858)) ([8653e13](https://github.com/dynamic-labs/DynamicAuth/commit/8653e13d2067dd0161e660b4374c08a9fe0bc203))
|
|
67
|
+
|
|
68
|
+
## [2.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2024-03-04)
|
|
69
|
+
|
|
70
|
+
## [2.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2024-02-28)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### ⚠ BREAKING CHANGES
|
|
74
|
+
|
|
75
|
+
* add networkValidationMode and remove enableForcedNetworkValidation (#4778)
|
|
76
|
+
|
|
77
|
+
### Features
|
|
78
|
+
|
|
79
|
+
* add bitget and okx wallets ([51fab41](https://github.com/dynamic-labs/DynamicAuth/commit/51fab413096fd89ce99c6c617cf4f3f5db9bf44d))
|
|
80
|
+
* add networkValidationMode and remove enableForcedNetworkValidation ([#4778](https://github.com/dynamic-labs/DynamicAuth/issues/4778)) ([ccb9576](https://github.com/dynamic-labs/DynamicAuth/commit/ccb9576c81b2c570185f5126d6d1fcfcbb5ac9e3))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Bug Fixes
|
|
84
|
+
|
|
85
|
+
* **GVTY-1243:** non evm onramp urls ([#4791](https://github.com/dynamic-labs/DynamicAuth/issues/4791)) ([fea602e](https://github.com/dynamic-labs/DynamicAuth/commit/fea602e2835b4bb9bc096b96375fa97297bf35f1))
|
|
86
|
+
* revert use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([#4772](https://github.com/dynamic-labs/DynamicAuth/issues/4772)) ([b871c22](https://github.com/dynamic-labs/DynamicAuth/commit/b871c2295f39230bc34ae1fca5f8817cd9251a17))
|
|
87
|
+
* use correct chromeId for okx and bitget wallets and remove group from coin98 ([#4795](https://github.com/dynamic-labs/DynamicAuth/issues/4795)) ([e63bad7](https://github.com/dynamic-labs/DynamicAuth/commit/e63bad76ed06636151212c915a102359a03b4218))
|
|
88
|
+
|
|
89
|
+
## [2.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-02-26)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### ⚠ BREAKING CHANGES
|
|
93
|
+
|
|
94
|
+
* setShowAuthFlow opens dynamic profile in non-multi-wallet states
|
|
95
|
+
|
|
96
|
+
### Features
|
|
97
|
+
|
|
98
|
+
* allow passing prop to hide embedded wallet action confirmation UIs ([#4775](https://github.com/dynamic-labs/DynamicAuth/issues/4775)) ([d7c6a46](https://github.com/dynamic-labs/DynamicAuth/commit/d7c6a4699e41f6a62d31880c3bd0346ebfa0e3ba))
|
|
99
|
+
* make sms mobile keyboard numeric ([#4755](https://github.com/dynamic-labs/DynamicAuth/issues/4755)) ([f36844a](https://github.com/dynamic-labs/DynamicAuth/commit/f36844aeaae240c520181b3242492db8ffc64a50))
|
|
100
|
+
* setShowAuthFlow opens dynamic profile in non-multi-wallet states ([42dbbc0](https://github.com/dynamic-labs/DynamicAuth/commit/42dbbc00a5cebe937dca5a80397cdd3c577f6a45))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Bug Fixes
|
|
104
|
+
|
|
105
|
+
* demo one-time codes for solana wallets fix ([#4760](https://github.com/dynamic-labs/DynamicAuth/issues/4760)) ([a5ab2a8](https://github.com/dynamic-labs/DynamicAuth/commit/a5ab2a8bc348a35a898e03db0900bfab88184c17))
|
|
106
|
+
* only store passcode in backend when auto-generated by dynamic ([#4764](https://github.com/dynamic-labs/DynamicAuth/issues/4764)) ([528bedc](https://github.com/dynamic-labs/DynamicAuth/commit/528bedce5cbd3022ddafe4242954a04f5b70ae74))
|
|
107
|
+
* use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([6299f7c](https://github.com/dynamic-labs/DynamicAuth/commit/6299f7c3ce705ddb19714f6b7a3a488851ed8dde))
|
|
108
|
+
|
|
109
|
+
## [2.0.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-02-22)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### ⚠ BREAKING CHANGES
|
|
113
|
+
|
|
114
|
+
* wagmi v2 (#4660)
|
|
115
|
+
|
|
116
|
+
### Features
|
|
117
|
+
|
|
118
|
+
* wagmi v2 ([#4660](https://github.com/dynamic-labs/DynamicAuth/issues/4660)) ([d8894e6](https://github.com/dynamic-labs/DynamicAuth/commit/d8894e61393b90ccf44904c33394b54286f0f9e9))
|
|
119
|
+
|
|
120
|
+
## [2.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2024-02-22)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### ⚠ BREAKING CHANGES
|
|
124
|
+
|
|
125
|
+
* remove wallet connector from callback types (#4730)
|
|
126
|
+
* drop support for walletconnect v1 (#4666)
|
|
127
|
+
|
|
128
|
+
### Features
|
|
129
|
+
|
|
130
|
+
* add coin98 evm ([1d64f5f](https://github.com/dynamic-labs/DynamicAuth/commit/1d64f5f00885ff671358651fd0251b77a2e05739))
|
|
131
|
+
* add support for solana versioned transactions ([#4721](https://github.com/dynamic-labs/DynamicAuth/issues/4721)) ([25b1643](https://github.com/dynamic-labs/DynamicAuth/commit/25b1643f8addbada09fff5d22e988bdf22038170))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Bug Fixes
|
|
135
|
+
|
|
136
|
+
* allow rpc-providers package to use exports based on usage ([#4539](https://github.com/dynamic-labs/DynamicAuth/issues/4539)) ([abdc196](https://github.com/dynamic-labs/DynamicAuth/commit/abdc19641580cbcfe8f9e357c645f8291bc9ed66))
|
|
137
|
+
* coinbasesocial should display coinbase in profile linking section ([#4680](https://github.com/dynamic-labs/DynamicAuth/issues/4680)) ([21cbe2e](https://github.com/dynamic-labs/DynamicAuth/commit/21cbe2e24345a33bc927428c01cc7b5c724e40e5))
|
|
138
|
+
* improve on transaction confirmation step ([#4704](https://github.com/dynamic-labs/DynamicAuth/issues/4704)) ([f2b27cf](https://github.com/dynamic-labs/DynamicAuth/commit/f2b27cfd94452be2eb7e88a298f61ef56985931f))
|
|
139
|
+
* prevent the DynamicMultiWalletPromptsWidget from opening if useris not logged in ([#4701](https://github.com/dynamic-labs/DynamicAuth/issues/4701)) ([2bb35fd](https://github.com/dynamic-labs/DynamicAuth/commit/2bb35fd29b60677e893390f7d47857cd76c73adc))
|
|
140
|
+
* reduce isPreauthorized calls when starknet wallet is connected ([#4710](https://github.com/dynamic-labs/DynamicAuth/issues/4710)) ([ca6a630](https://github.com/dynamic-labs/DynamicAuth/commit/ca6a630dd47a1c116afcd63fe7256ffc745532ab))
|
|
141
|
+
* update sepolia currency symbol ([#4728](https://github.com/dynamic-labs/DynamicAuth/issues/4728)) ([3c228a0](https://github.com/dynamic-labs/DynamicAuth/commit/3c228a03ccc962374ad1dac3ab45af92732ba61a))
|
|
142
|
+
* use overflow clip when available, use hidden by default ([#4696](https://github.com/dynamic-labs/DynamicAuth/issues/4696)) ([29fb2a1](https://github.com/dynamic-labs/DynamicAuth/commit/29fb2a1e48b010c6c1d525403fbdcf7ded068466))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
* drop support for walletconnect v1 ([#4666](https://github.com/dynamic-labs/DynamicAuth/issues/4666)) ([4af93e4](https://github.com/dynamic-labs/DynamicAuth/commit/4af93e4f9b95fa4c49bbfda0c1144da1a4a43991))
|
|
146
|
+
* remove wallet connector from callback types ([#4730](https://github.com/dynamic-labs/DynamicAuth/issues/4730)) ([08cb200](https://github.com/dynamic-labs/DynamicAuth/commit/08cb200a09c0fd78d2093d1a60b17089b3b2c2b1))
|
|
147
|
+
|
|
148
|
+
## [2.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2024-02-13)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Bug Fixes
|
|
152
|
+
|
|
153
|
+
* allow any icon to be used in wallet list tabs ([#4678](https://github.com/dynamic-labs/DynamicAuth/issues/4678)) ([eb03603](https://github.com/dynamic-labs/DynamicAuth/commit/eb036031725a91cb28c144b3bdcb5b20b3314038))
|
|
154
|
+
|
|
155
|
+
## [2.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-13)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Bug Fixes
|
|
159
|
+
|
|
160
|
+
* old iconic dependency version ([#4673](https://github.com/dynamic-labs/DynamicAuth/issues/4673)) ([4a5c448](https://github.com/dynamic-labs/DynamicAuth/commit/4a5c448c251540139f84514328d5f1d31808d75c))
|
|
161
|
+
|
|
2
162
|
## [2.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.0...v2.0.0-alpha.1) (2024-02-12)
|
|
3
163
|
|
|
4
164
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-connector-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -25,16 +25,15 @@
|
|
|
25
25
|
},
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
"@dynamic-labs/sdk-api": "0.0.
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@dynamic-labs/sdk-api": "0.0.376"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@dynamic-labs/logger": "2.0.0-alpha.
|
|
33
|
-
"@dynamic-labs/rpc-providers": "2.0.0-alpha.
|
|
34
|
-
"@dynamic-labs/
|
|
35
|
-
"@dynamic-labs/
|
|
36
|
-
"@dynamic-labs/
|
|
37
|
-
"@dynamic-labs/wallet-book": "2.0.0-alpha.1",
|
|
32
|
+
"@dynamic-labs/logger": "2.0.0-alpha.11",
|
|
33
|
+
"@dynamic-labs/rpc-providers": "2.0.0-alpha.11",
|
|
34
|
+
"@dynamic-labs/types": "2.0.0-alpha.11",
|
|
35
|
+
"@dynamic-labs/utils": "2.0.0-alpha.11",
|
|
36
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.11",
|
|
38
37
|
"eventemitter3": "5.0.1"
|
|
39
38
|
}
|
|
40
39
|
}
|
package/src/index.cjs
CHANGED
|
@@ -13,7 +13,6 @@ var isSocialWalletConnector = require('./utils/isSocialWalletConnector/isSocialW
|
|
|
13
13
|
var encoding = require('./utils/encoding.cjs');
|
|
14
14
|
var getWalletConnectorByKey = require('./utils/getWalletConnectorByKey.cjs');
|
|
15
15
|
var shouldLowercaseAddress = require('./utils/shouldLowercaseAddress.cjs');
|
|
16
|
-
var normalizeWalletName = require('./utils/normalizeWalletName/normalizeWalletName.cjs');
|
|
17
16
|
var walletConnectDeepLinks = require('./utils/walletConnectDeepLinks/walletConnectDeepLinks.cjs');
|
|
18
17
|
var performPlatformSpecificConnectionMethod = require('./utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.cjs');
|
|
19
18
|
var isEmbeddedConnector = require('./utils/isEmbeddedConnector/isEmbeddedConnector.cjs');
|
|
@@ -28,6 +27,9 @@ var eventListenerHandlers = require('./utils/eventListenerHandlers.cjs');
|
|
|
28
27
|
var isHex = require('./utils/isHex/isHex.cjs');
|
|
29
28
|
var isPhantomRedirectConnector = require('./utils/isPhantomRedirectConnector/isPhantomRedirectConnector.cjs');
|
|
30
29
|
var getRpcUrlForChain = require('./utils/getRpcUrlForChain/getRpcUrlForChain.cjs');
|
|
30
|
+
var isCoinbaseMpcWalletConnector = require('./utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.cjs');
|
|
31
|
+
var isWalletConnectConnector = require('./utils/isWalletConnectConnector/isWalletConnectConnector.cjs');
|
|
32
|
+
var isSendBalanceWalletConnector = require('./utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.cjs');
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
|
|
@@ -46,7 +48,6 @@ exports.bufferToHex = encoding.bufferToHex;
|
|
|
46
48
|
exports.utf8ToHex = encoding.utf8ToHex;
|
|
47
49
|
exports.getWalletConnectorByKey = getWalletConnectorByKey.getWalletConnectorByKey;
|
|
48
50
|
exports.shouldLowercaseAddress = shouldLowercaseAddress.shouldLowercaseAddress;
|
|
49
|
-
exports.normalizeWalletName = normalizeWalletName.normalizeWalletName;
|
|
50
51
|
exports.getDeepLink = walletConnectDeepLinks.getDeepLink;
|
|
51
52
|
exports.performPlatformSpecificConnectionMethod = performPlatformSpecificConnectionMethod.performPlatformSpecificConnectionMethod;
|
|
52
53
|
exports.isEmbeddedConnector = isEmbeddedConnector.isEmbeddedConnector;
|
|
@@ -61,3 +62,6 @@ exports.eventListenerHandlers = eventListenerHandlers.eventListenerHandlers;
|
|
|
61
62
|
exports.isHex = isHex.isHex;
|
|
62
63
|
exports.isPhantomRedirectConnector = isPhantomRedirectConnector.isPhantomRedirectConnector;
|
|
63
64
|
exports.getRpcUrlForChain = getRpcUrlForChain.getRpcUrlForChain;
|
|
65
|
+
exports.isCoinbaseMpcWalletConnector = isCoinbaseMpcWalletConnector.isCoinbaseMpcWalletConnector;
|
|
66
|
+
exports.isWalletConnectConnector = isWalletConnectConnector.isWalletConnectConnector;
|
|
67
|
+
exports.isSendBalanceWalletConnector = isSendBalanceWalletConnector.isSendBalanceWalletConnector;
|
package/src/index.js
CHANGED
|
@@ -9,7 +9,6 @@ export { isSocialWalletConnector } from './utils/isSocialWalletConnector/isSocia
|
|
|
9
9
|
export { addHexPrefix, bufferToHex, utf8ToHex } from './utils/encoding.js';
|
|
10
10
|
export { getWalletConnectorByKey } from './utils/getWalletConnectorByKey.js';
|
|
11
11
|
export { shouldLowercaseAddress } from './utils/shouldLowercaseAddress.js';
|
|
12
|
-
export { normalizeWalletName } from './utils/normalizeWalletName/normalizeWalletName.js';
|
|
13
12
|
export { getDeepLink } from './utils/walletConnectDeepLinks/walletConnectDeepLinks.js';
|
|
14
13
|
export { performPlatformSpecificConnectionMethod } from './utils/walletConnectDeepLinks/performPlatformSpecificConnectionMethod.js';
|
|
15
14
|
export { isEmbeddedConnector } from './utils/isEmbeddedConnector/isEmbeddedConnector.js';
|
|
@@ -24,3 +23,6 @@ export { eventListenerHandlers } from './utils/eventListenerHandlers.js';
|
|
|
24
23
|
export { isHex } from './utils/isHex/isHex.js';
|
|
25
24
|
export { isPhantomRedirectConnector } from './utils/isPhantomRedirectConnector/isPhantomRedirectConnector.js';
|
|
26
25
|
export { getRpcUrlForChain } from './utils/getRpcUrlForChain/getRpcUrlForChain.js';
|
|
26
|
+
export { isCoinbaseMpcWalletConnector } from './utils/isCoinbaseMpcWalletConnector/isCoinbaseMpcWalletConnector.js';
|
|
27
|
+
export { isWalletConnectConnector } from './utils/isWalletConnectConnector/isWalletConnectConnector.js';
|
|
28
|
+
export { isSendBalanceWalletConnector } from './utils/isSendBalanceWalletConnector/isSendBalanceWalletConnector.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PasswordSourceTypeEnum } from '@dynamic-labs/sdk-api';
|
|
2
|
+
import { WalletConnectorBase } from '.';
|
|
3
|
+
export type RawPrivateKey = {
|
|
4
|
+
keyPath: string;
|
|
5
|
+
ecKeyPublic: string;
|
|
6
|
+
ecKeyPrivate: string;
|
|
7
|
+
};
|
|
8
|
+
export type ExtendedPrivateKey = {
|
|
9
|
+
keyPath: string;
|
|
10
|
+
xPrivateKey: string;
|
|
11
|
+
};
|
|
12
|
+
export interface ICoinbaseMPCWalletConnector extends WalletConnectorBase {
|
|
13
|
+
changePasscode(newPasscode: string, oldPasscode?: string): Promise<boolean>;
|
|
14
|
+
exportWalletKeys(): Promise<ExtendedPrivateKey[] | RawPrivateKey[]>;
|
|
15
|
+
generateWallet(source: PasswordSourceTypeEnum, passcode: string): Promise<string | undefined>;
|
|
16
|
+
setAuthTokenFetcher(func: () => Promise<string>): void;
|
|
17
|
+
setBackupCodeFetcher(func: () => Promise<string>): void;
|
|
18
|
+
setPasscodeFetcher(func: () => Promise<string>): void;
|
|
19
|
+
setRequiredPassword(isRequired: boolean): void;
|
|
20
|
+
validatePasscode(passcode: string): Promise<boolean>;
|
|
21
|
+
}
|
|
@@ -159,7 +159,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
|
159
159
|
}
|
|
160
160
|
connect() {
|
|
161
161
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
yield this.
|
|
162
|
+
yield this.getAddress();
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
@@ -177,7 +177,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
|
177
177
|
*
|
|
178
178
|
* @default Promise<undefined>
|
|
179
179
|
*/
|
|
180
|
-
|
|
180
|
+
getAddress(opts) {
|
|
181
181
|
return Promise.resolve(undefined);
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
@@ -242,7 +242,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
|
242
242
|
getSigner() {
|
|
243
243
|
return Promise.resolve(undefined);
|
|
244
244
|
}
|
|
245
|
-
getWalletClient() {
|
|
245
|
+
getWalletClient(chainId) {
|
|
246
246
|
return undefined;
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
@@ -319,14 +319,6 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
|
|
|
319
319
|
teardownEventListeners() {
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
|
-
/**
|
|
323
|
-
* Sign a message
|
|
324
|
-
*
|
|
325
|
-
* @default Promise<undefined>
|
|
326
|
-
*/
|
|
327
|
-
getSupportedNetworks() {
|
|
328
|
-
return Promise.resolve(undefined);
|
|
329
|
-
}
|
|
330
322
|
/**
|
|
331
323
|
* Receive the user verified credentials
|
|
332
324
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
|
-
import { ChainRpcProviders } from '@dynamic-labs/rpc-providers';
|
|
3
2
|
import { WalletBookSchema } from '@dynamic-labs/wallet-book';
|
|
4
3
|
import type { JwtVerifiedCredential, WalletAdditionalAddress } from '@dynamic-labs/sdk-api';
|
|
4
|
+
import { IChainRpcProviders } from '@dynamic-labs/rpc-providers';
|
|
5
5
|
import { WalletBookSingleton } from './WalletBookSingleton';
|
|
6
6
|
import { WalletConnectorExtension } from './WalletConnectorExtension';
|
|
7
7
|
import { WalletConnectorCore } from './types';
|
|
@@ -16,7 +16,7 @@ export type PayloadParams = {
|
|
|
16
16
|
message: string;
|
|
17
17
|
}[];
|
|
18
18
|
};
|
|
19
|
-
export type
|
|
19
|
+
export type GetAddressOpts = {
|
|
20
20
|
chainId?: string;
|
|
21
21
|
onConnect?(payload: PayloadParams): void;
|
|
22
22
|
onDesktopUri?(uri: string): void;
|
|
@@ -36,9 +36,7 @@ export type WalletConnector = WalletConnectorCore.WalletConnector;
|
|
|
36
36
|
export interface WalletConnectorConstructor {
|
|
37
37
|
new (props?: any): WalletConnector;
|
|
38
38
|
}
|
|
39
|
-
export type WalletConnectorsMethod = (props
|
|
40
|
-
isWalletConnectV2Enabled: boolean;
|
|
41
|
-
}) => WalletConnectorConstructor[];
|
|
39
|
+
export type WalletConnectorsMethod = (props?: any) => WalletConnectorConstructor[];
|
|
42
40
|
export type WalletConnectorEventTypes = {
|
|
43
41
|
chainChange: (props: {
|
|
44
42
|
chain: string;
|
|
@@ -50,7 +48,7 @@ export type WalletConnectorEventTypes = {
|
|
|
50
48
|
};
|
|
51
49
|
export declare abstract class WalletConnectorBase extends EventEmitter<WalletConnectorEventTypes> {
|
|
52
50
|
#private;
|
|
53
|
-
chainRpcProviders:
|
|
51
|
+
chainRpcProviders: IChainRpcProviders | undefined;
|
|
54
52
|
constructorProps: any;
|
|
55
53
|
_walletBookInstance: WalletBookSingleton;
|
|
56
54
|
/**
|
|
@@ -119,7 +117,7 @@ export declare abstract class WalletConnectorBase extends EventEmitter<WalletCon
|
|
|
119
117
|
*
|
|
120
118
|
* @default Promise<undefined>
|
|
121
119
|
*/
|
|
122
|
-
|
|
120
|
+
getAddress(opts?: GetAddressOpts): Promise<string | undefined>;
|
|
123
121
|
/**
|
|
124
122
|
* Gets the additional addresses of the wallet, given the main address
|
|
125
123
|
*
|
|
@@ -177,8 +175,8 @@ export declare abstract class WalletConnectorBase extends EventEmitter<WalletCon
|
|
|
177
175
|
* Get the wallet provider
|
|
178
176
|
*/
|
|
179
177
|
getWeb3Provider: {
|
|
180
|
-
(): unknown;
|
|
181
|
-
<T>(): T;
|
|
178
|
+
(chainId?: string): unknown;
|
|
179
|
+
<T>(chainId?: string): T;
|
|
182
180
|
};
|
|
183
181
|
/**
|
|
184
182
|
* @deprecated getRpcProvider has been renamed to getPublicClient
|
|
@@ -209,8 +207,8 @@ export declare abstract class WalletConnectorBase extends EventEmitter<WalletCon
|
|
|
209
207
|
*
|
|
210
208
|
* @default undefined
|
|
211
209
|
*/
|
|
212
|
-
getWalletClient(): unknown;
|
|
213
|
-
getWalletClient<T>(): T;
|
|
210
|
+
getWalletClient(chainId?: string): unknown;
|
|
211
|
+
getWalletClient<T>(chainId?: string): T;
|
|
214
212
|
/**
|
|
215
213
|
* Initialize the wallet connector with any async operations
|
|
216
214
|
*
|
|
@@ -307,12 +305,6 @@ export declare abstract class WalletConnectorBase extends EventEmitter<WalletCon
|
|
|
307
305
|
* @default void
|
|
308
306
|
*/
|
|
309
307
|
teardownEventListeners(): void;
|
|
310
|
-
/**
|
|
311
|
-
* Sign a message
|
|
312
|
-
*
|
|
313
|
-
* @default Promise<undefined>
|
|
314
|
-
*/
|
|
315
|
-
getSupportedNetworks(): Promise<string[] | undefined>;
|
|
316
308
|
/**
|
|
317
309
|
* Whether the connector has been initialized
|
|
318
310
|
* @default true
|
|
@@ -151,7 +151,7 @@ class WalletConnectorBase extends EventEmitter {
|
|
|
151
151
|
}
|
|
152
152
|
connect() {
|
|
153
153
|
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
-
yield this.
|
|
154
|
+
yield this.getAddress();
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
@@ -169,7 +169,7 @@ class WalletConnectorBase extends EventEmitter {
|
|
|
169
169
|
*
|
|
170
170
|
* @default Promise<undefined>
|
|
171
171
|
*/
|
|
172
|
-
|
|
172
|
+
getAddress(opts) {
|
|
173
173
|
return Promise.resolve(undefined);
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
@@ -234,7 +234,7 @@ class WalletConnectorBase extends EventEmitter {
|
|
|
234
234
|
getSigner() {
|
|
235
235
|
return Promise.resolve(undefined);
|
|
236
236
|
}
|
|
237
|
-
getWalletClient() {
|
|
237
|
+
getWalletClient(chainId) {
|
|
238
238
|
return undefined;
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
@@ -311,14 +311,6 @@ class WalletConnectorBase extends EventEmitter {
|
|
|
311
311
|
teardownEventListeners() {
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
/**
|
|
315
|
-
* Sign a message
|
|
316
|
-
*
|
|
317
|
-
* @default Promise<undefined>
|
|
318
|
-
*/
|
|
319
|
-
getSupportedNetworks() {
|
|
320
|
-
return Promise.resolve(undefined);
|
|
321
|
-
}
|
|
322
314
|
/**
|
|
323
315
|
* Receive the user verified credentials
|
|
324
316
|
*/
|
package/src/lib/index.d.ts
CHANGED
|
@@ -8,3 +8,6 @@ export * from './IAccountAbstractionWalletConnector';
|
|
|
8
8
|
export * from './IBitcoinWalletConnector';
|
|
9
9
|
export * from './IHardwareWalletConnector';
|
|
10
10
|
export * from './IPhantomRedirectConnector';
|
|
11
|
+
export * from './ICoinbaseMPCWalletConnector';
|
|
12
|
+
export * from './IWalletConnectConnector';
|
|
13
|
+
export * from './ISendBalanceWalletConnector';
|
package/src/utils/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export * from './isSocialWalletConnector';
|
|
|
8
8
|
export * from './encoding';
|
|
9
9
|
export * from './getWalletConnectorByKey';
|
|
10
10
|
export * from './shouldLowercaseAddress';
|
|
11
|
-
export * from './normalizeWalletName';
|
|
12
11
|
export * from './walletConnectDeepLinks';
|
|
13
12
|
export * from './isEmbeddedConnector';
|
|
14
13
|
export * from './isMagicConnector';
|
|
@@ -22,3 +21,6 @@ export * from './eventListenerHandlers';
|
|
|
22
21
|
export * from './isHex';
|
|
23
22
|
export * from './isPhantomRedirectConnector';
|
|
24
23
|
export * from './getRpcUrlForChain';
|
|
24
|
+
export * from './isCoinbaseMpcWalletConnector';
|
|
25
|
+
export * from './isWalletConnectConnector';
|
|
26
|
+
export * from './isSendBalanceWalletConnector';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './isCoinbaseMpcWalletConnector';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const isCoinbaseMpcWalletConnector = (connector) => Boolean(connector) &&
|
|
6
|
+
connector.key === 'coinbasempc' &&
|
|
7
|
+
connector.generateWallet !== undefined &&
|
|
8
|
+
connector.changePasscode !== undefined &&
|
|
9
|
+
connector.exportWalletKeys !== undefined;
|
|
10
|
+
|
|
11
|
+
exports.isCoinbaseMpcWalletConnector = isCoinbaseMpcWalletConnector;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const isCoinbaseMpcWalletConnector = (connector) => Boolean(connector) &&
|
|
2
|
+
connector.key === 'coinbasempc' &&
|
|
3
|
+
connector.generateWallet !== undefined &&
|
|
4
|
+
connector.changePasscode !== undefined &&
|
|
5
|
+
connector.exportWalletKeys !== undefined;
|
|
6
|
+
|
|
7
|
+
export { isCoinbaseMpcWalletConnector };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isSendBalanceWalletConnector } from './isSendBalanceWalletConnector';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const isSendBalanceWalletConnector = (walletConnector) => 'createUiTransaction' in walletConnector &&
|
|
6
|
+
typeof walletConnector.createUiTransaction === 'function';
|
|
7
|
+
|
|
8
|
+
exports.isSendBalanceWalletConnector = isSendBalanceWalletConnector;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { WalletConnector } from '../../lib';
|
|
2
|
+
import { ISendBalanceWalletConnector } from '../../lib/ISendBalanceWalletConnector';
|
|
3
|
+
export declare const isSendBalanceWalletConnector: (walletConnector: WalletConnector | ISendBalanceWalletConnector) => walletConnector is ISendBalanceWalletConnector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isWalletConnectConnector } from './isWalletConnectConnector';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const isWalletConnectConnector = (connector) => Boolean(connector === null || connector === void 0 ? void 0 : connector.isWalletConnect);
|
|
6
|
+
|
|
7
|
+
exports.isWalletConnectConnector = isWalletConnectConnector;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { WalletSchema } from '@dynamic-labs/wallet-book';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GetAddressOpts } from '../../lib';
|
|
3
3
|
import { DeepLinkVariant } from './walletConnectDeepLinks';
|
|
4
|
-
export declare const performPlatformSpecificConnectionMethod: (uri: string, metadata: WalletSchema, opts: Pick<
|
|
4
|
+
export declare const performPlatformSpecificConnectionMethod: (uri: string, metadata: WalletSchema, opts: Pick<GetAddressOpts, 'onDesktopUri' | 'onDisplayUri'>, preference: DeepLinkVariant) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { normalizeWalletName } from './normalizeWalletName';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const normalizeWalletName: (name: string) => string;
|