@dynamic-labs/starknet 2.0.0-alpha.2 → 2.0.0-alpha.20

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 CHANGED
@@ -1,4 +1,227 @@
1
1
 
2
+ ## [2.0.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2024-03-19)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * prevent solflare connect popping up on page refresh when connected ([#5032](https://github.com/dynamic-labs/DynamicAuth/issues/5032)) ([28175a9](https://github.com/dynamic-labs/DynamicAuth/commit/28175a9af43f3e7f2cab30148563eaf5573477d1))
8
+ * show correct user identifier in onboarding view ([#5021](https://github.com/dynamic-labs/DynamicAuth/issues/5021)) ([c84747f](https://github.com/dynamic-labs/DynamicAuth/commit/c84747f01eb2a0a827ca48e62f03739d4e6df136))
9
+ * use address as the wallet client account ([#5037](https://github.com/dynamic-labs/DynamicAuth/issues/5037)) ([287631e](https://github.com/dynamic-labs/DynamicAuth/commit/287631e9a027e3a39ee2ad6b45ca404febd03929))
10
+
11
+ ## [2.0.0-alpha.19](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2024-03-19)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * add localization to email form ([#5009](https://github.com/dynamic-labs/DynamicAuth/issues/5009)) ([f3c100c](https://github.com/dynamic-labs/DynamicAuth/commit/f3c100cb0b815880d11c6b619d94bfaa7330a115))
17
+ * include domain on signTypedData for ZeroDev connector ([#5017](https://github.com/dynamic-labs/DynamicAuth/issues/5017)) ([71c9131](https://github.com/dynamic-labs/DynamicAuth/commit/71c91311a75309810bc497c8f82981553ddc57fd))
18
+ * Remove Copy Address button if there is no wallet ([#4994](https://github.com/dynamic-labs/DynamicAuth/issues/4994)) ([fe1e641](https://github.com/dynamic-labs/DynamicAuth/commit/fe1e6417be2299e65ba4bcbc3347dfc27f021853))
19
+
20
+ ## [2.0.0-alpha.18](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2024-03-15)
21
+
22
+ ## [2.0.0-alpha.17](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2024-03-15)
23
+
24
+
25
+ ### ⚠ BREAKING CHANGES
26
+
27
+ * rename prop canConnectViaEmail to requiresNonDynamicEmailOtp (#4991)
28
+
29
+ ### Features
30
+
31
+ * allow creating embedded wallet with phone number without email ([#4953](https://github.com/dynamic-labs/DynamicAuth/issues/4953)) ([39d31cb](https://github.com/dynamic-labs/DynamicAuth/commit/39d31cbc969fff7acf53c0b6c5e5093ff846f3ea))
32
+
33
+
34
+ * rename prop canConnectViaEmail to requiresNonDynamicEmailOtp ([#4991](https://github.com/dynamic-labs/DynamicAuth/issues/4991)) ([e83a365](https://github.com/dynamic-labs/DynamicAuth/commit/e83a3658d4f5cf0630fc8f15be66f2d3db84ab98))
35
+
36
+ ## [2.0.0-alpha.16](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.15...v2.0.0-alpha.16) (2024-03-15)
37
+
38
+
39
+ ### Features
40
+
41
+ * add bundlerProvider prop to allow AA customers to select a provider ([#4975](https://github.com/dynamic-labs/DynamicAuth/issues/4975)) ([1870cef](https://github.com/dynamic-labs/DynamicAuth/commit/1870cef4f50944a86226d10f09ef7bf6595f3c95))
42
+
43
+ ## [2.0.0-alpha.15](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.14...v2.0.0-alpha.15) (2024-03-15)
44
+
45
+
46
+ ### Features
47
+
48
+ * Add support for mobile farcaster signin ([#4973](https://github.com/dynamic-labs/DynamicAuth/issues/4973)) ([98261a4](https://github.com/dynamic-labs/DynamicAuth/commit/98261a47bd319cd93b36f5cdd6a9be0064887686))
49
+
50
+ ## [2.0.0-alpha.14](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.13...v2.0.0-alpha.14) (2024-03-14)
51
+
52
+
53
+ ### Bug Fixes
54
+
55
+ * convert empty value when checking for gas sponsorship ([#4970](https://github.com/dynamic-labs/DynamicAuth/issues/4970)) ([8439a20](https://github.com/dynamic-labs/DynamicAuth/commit/8439a2035729150f33507b22c2678b16ae47976b))
56
+ * omit wallet connect on mobile ([#4954](https://github.com/dynamic-labs/DynamicAuth/issues/4954)) ([6ac29a8](https://github.com/dynamic-labs/DynamicAuth/commit/6ac29a8961dc010688425fb67a4fb621ca9f80b2))
57
+
58
+ ## [2.0.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2024-03-14)
59
+
60
+ ## [2.0.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2024-03-13)
61
+
62
+
63
+ ### Features
64
+
65
+ * add sign-in with farcaster ([#4947](https://github.com/dynamic-labs/DynamicAuth/issues/4947)) ([3927d24](https://github.com/dynamic-labs/DynamicAuth/commit/3927d24392a8944997ca05431c6ab54757be62d9))
66
+
67
+
68
+ ### Bug Fixes
69
+
70
+ * wallet connect links with query params ([#4948](https://github.com/dynamic-labs/DynamicAuth/issues/4948)) ([0738130](https://github.com/dynamic-labs/DynamicAuth/commit/0738130f82473a197e035b8dd74d996bdbb24c11))
71
+
72
+ ## [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)
73
+
74
+
75
+ ### ⚠ BREAKING CHANGES
76
+
77
+ * rename FetchPublicAddressOpts to GetAddressOpts (#4910)
78
+ * remove use effect in useWalletEventListeners (#4843)
79
+ * rename fetchPublicAddress to getAddress (#4851)
80
+
81
+ ### Features
82
+
83
+ * Add farcaster to iconic ([#4925](https://github.com/dynamic-labs/DynamicAuth/issues/4925)) ([ab282dc](https://github.com/dynamic-labs/DynamicAuth/commit/ab282dc9cdcc0fe11f014d002b056ef4d3b34234))
84
+ * 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))
85
+
86
+
87
+ ### Bug Fixes
88
+
89
+ * add back connect button css variables ([#4922](https://github.com/dynamic-labs/DynamicAuth/issues/4922)) ([1119d62](https://github.com/dynamic-labs/DynamicAuth/commit/1119d62c2db6504952393060930524c3823e4a00))
90
+ * keep adaptive wallet list height ([#4916](https://github.com/dynamic-labs/DynamicAuth/issues/4916)) ([62aa54e](https://github.com/dynamic-labs/DynamicAuth/commit/62aa54e81d563082f7aa519f2ff2b5132e7dd83d))
91
+ * pass account and chain to walletClient ([#4865](https://github.com/dynamic-labs/DynamicAuth/issues/4865)) ([17a143f](https://github.com/dynamic-labs/DynamicAuth/commit/17a143f87a77e56227b2517038c20cf67f8e08bf))
92
+ * 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))
93
+
94
+
95
+ * remove use effect in useWalletEventListeners ([#4843](https://github.com/dynamic-labs/DynamicAuth/issues/4843)) ([2e948bb](https://github.com/dynamic-labs/DynamicAuth/commit/2e948bbca0dbdceab7460a844d0988eacd47f581))
96
+ * rename fetchPublicAddress to getAddress ([#4851](https://github.com/dynamic-labs/DynamicAuth/issues/4851)) ([668e7dd](https://github.com/dynamic-labs/DynamicAuth/commit/668e7dd62e1f323dbe64209b5c59c2cd0ee45d61))
97
+ * rename FetchPublicAddressOpts to GetAddressOpts ([#4910](https://github.com/dynamic-labs/DynamicAuth/issues/4910)) ([e5e4b1b](https://github.com/dynamic-labs/DynamicAuth/commit/e5e4b1b08a4e010afa44f8abb0bf6af7f236a86a))
98
+
99
+ ## [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)
100
+
101
+
102
+ ### ⚠ BREAKING CHANGES
103
+
104
+ * rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… (#4892)
105
+ * refactor send transaction for multi chain (#4831)
106
+
107
+ ### Features
108
+
109
+ * add sandbox indicator to sdk ([62fd821](https://github.com/dynamic-labs/DynamicAuth/commit/62fd821a895bb54cec4cae3d153aa0056a7e6638))
110
+
111
+
112
+ ### Bug Fixes
113
+
114
+ * 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))
115
+ * fix server side rendering ([#4811](https://github.com/dynamic-labs/DynamicAuth/issues/4811)) ([063dfae](https://github.com/dynamic-labs/DynamicAuth/commit/063dfae8b6750875d2f35dd9709a1f675495f4fb))
116
+ * hide network ([#4885](https://github.com/dynamic-labs/DynamicAuth/issues/4885)) ([ec10c58](https://github.com/dynamic-labs/DynamicAuth/commit/ec10c588218f067e991d5830fc06ec081e4e1d18))
117
+ * network picker on mobile ([#4887](https://github.com/dynamic-labs/DynamicAuth/issues/4887)) ([6e0ab1b](https://github.com/dynamic-labs/DynamicAuth/commit/6e0ab1bc7d138b73373741960a501ff7cf20e3f9))
118
+
119
+
120
+ * refactor send transaction for multi chain ([#4831](https://github.com/dynamic-labs/DynamicAuth/issues/4831)) ([c98444b](https://github.com/dynamic-labs/DynamicAuth/commit/c98444be7935420dda3d8216d03946f5893eb82f))
121
+ * rename hideEmbeddedWalletUIs prop to hideEmbeddedWalletTra… ([#4892](https://github.com/dynamic-labs/DynamicAuth/issues/4892)) ([7cdf519](https://github.com/dynamic-labs/DynamicAuth/commit/7cdf5196b1cd8516de2d456163fe9071956d40d3))
122
+
123
+ ## [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)
124
+
125
+
126
+ ### Features
127
+
128
+ * solana connector new sendTransaction method ([#4842](https://github.com/dynamic-labs/DynamicAuth/issues/4842)) ([0b198e3](https://github.com/dynamic-labs/DynamicAuth/commit/0b198e30d83fbbc8d506654d87cbfad403fda289))
129
+ * 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))
130
+
131
+
132
+ ### Bug Fixes
133
+
134
+ * 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))
135
+ * update btckit network conversion for signPsbt ([a6009e1](https://github.com/dynamic-labs/DynamicAuth/commit/a6009e18c453b4e65545455fea0e52ed7a983b4d))
136
+ * 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))
137
+
138
+ ## [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)
139
+
140
+ ## [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)
141
+
142
+
143
+ ### ⚠ BREAKING CHANGES
144
+
145
+ * add networkValidationMode and remove enableForcedNetworkValidation (#4778)
146
+
147
+ ### Features
148
+
149
+ * add bitget and okx wallets ([51fab41](https://github.com/dynamic-labs/DynamicAuth/commit/51fab413096fd89ce99c6c617cf4f3f5db9bf44d))
150
+ * add networkValidationMode and remove enableForcedNetworkValidation ([#4778](https://github.com/dynamic-labs/DynamicAuth/issues/4778)) ([ccb9576](https://github.com/dynamic-labs/DynamicAuth/commit/ccb9576c81b2c570185f5126d6d1fcfcbb5ac9e3))
151
+
152
+
153
+ ### Bug Fixes
154
+
155
+ * **GVTY-1243:** non evm onramp urls ([#4791](https://github.com/dynamic-labs/DynamicAuth/issues/4791)) ([fea602e](https://github.com/dynamic-labs/DynamicAuth/commit/fea602e2835b4bb9bc096b96375fa97297bf35f1))
156
+ * 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))
157
+ * 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))
158
+
159
+ ## [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)
160
+
161
+
162
+ ### ⚠ BREAKING CHANGES
163
+
164
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states
165
+
166
+ ### Features
167
+
168
+ * 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))
169
+ * make sms mobile keyboard numeric ([#4755](https://github.com/dynamic-labs/DynamicAuth/issues/4755)) ([f36844a](https://github.com/dynamic-labs/DynamicAuth/commit/f36844aeaae240c520181b3242492db8ffc64a50))
170
+ * setShowAuthFlow opens dynamic profile in non-multi-wallet states ([42dbbc0](https://github.com/dynamic-labs/DynamicAuth/commit/42dbbc00a5cebe937dca5a80397cdd3c577f6a45))
171
+
172
+
173
+ ### Bug Fixes
174
+
175
+ * 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))
176
+ * 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))
177
+ * use enableForcedNetworkValidation on connect-only ([#4750](https://github.com/dynamic-labs/DynamicAuth/issues/4750)) ([6299f7c](https://github.com/dynamic-labs/DynamicAuth/commit/6299f7c3ce705ddb19714f6b7a3a488851ed8dde))
178
+
179
+ ## [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)
180
+
181
+
182
+ ### ⚠ BREAKING CHANGES
183
+
184
+ * wagmi v2 (#4660)
185
+
186
+ ### Features
187
+
188
+ * wagmi v2 ([#4660](https://github.com/dynamic-labs/DynamicAuth/issues/4660)) ([d8894e6](https://github.com/dynamic-labs/DynamicAuth/commit/d8894e61393b90ccf44904c33394b54286f0f9e9))
189
+
190
+ ## [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)
191
+
192
+
193
+ ### ⚠ BREAKING CHANGES
194
+
195
+ * remove wallet connector from callback types (#4730)
196
+ * drop support for walletconnect v1 (#4666)
197
+
198
+ ### Features
199
+
200
+ * add coin98 evm ([1d64f5f](https://github.com/dynamic-labs/DynamicAuth/commit/1d64f5f00885ff671358651fd0251b77a2e05739))
201
+ * add support for solana versioned transactions ([#4721](https://github.com/dynamic-labs/DynamicAuth/issues/4721)) ([25b1643](https://github.com/dynamic-labs/DynamicAuth/commit/25b1643f8addbada09fff5d22e988bdf22038170))
202
+
203
+
204
+ ### Bug Fixes
205
+
206
+ * 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))
207
+ * 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))
208
+ * improve on transaction confirmation step ([#4704](https://github.com/dynamic-labs/DynamicAuth/issues/4704)) ([f2b27cf](https://github.com/dynamic-labs/DynamicAuth/commit/f2b27cfd94452be2eb7e88a298f61ef56985931f))
209
+ * 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))
210
+ * 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))
211
+ * update sepolia currency symbol ([#4728](https://github.com/dynamic-labs/DynamicAuth/issues/4728)) ([3c228a0](https://github.com/dynamic-labs/DynamicAuth/commit/3c228a03ccc962374ad1dac3ab45af92732ba61a))
212
+ * 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))
213
+
214
+
215
+ * drop support for walletconnect v1 ([#4666](https://github.com/dynamic-labs/DynamicAuth/issues/4666)) ([4af93e4](https://github.com/dynamic-labs/DynamicAuth/commit/4af93e4f9b95fa4c49bbfda0c1144da1a4a43991))
216
+ * remove wallet connector from callback types ([#4730](https://github.com/dynamic-labs/DynamicAuth/issues/4730)) ([08cb200](https://github.com/dynamic-labs/DynamicAuth/commit/08cb200a09c0fd78d2093d1a60b17089b3b2c2b1))
217
+
218
+ ## [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)
219
+
220
+
221
+ ### Bug Fixes
222
+
223
+ * 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))
224
+
2
225
  ## [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)
3
226
 
4
227
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/starknet",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -27,15 +27,14 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "starknet": "5.25.0",
30
- "get-starknet-core": "^3.2.0",
30
+ "get-starknet-core": "3.2.0",
31
31
  "text-encoding": "0.7.0",
32
32
  "starknetkit": "1.1.3",
33
- "@dynamic-labs/sdk-api": "0.0.363",
34
- "@dynamic-labs/rpc-providers": "2.0.0-alpha.2",
35
- "@dynamic-labs/types": "2.0.0-alpha.2",
36
- "@dynamic-labs/utils": "2.0.0-alpha.2",
37
- "@dynamic-labs/wallet-book": "2.0.0-alpha.2",
38
- "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.2"
33
+ "@dynamic-labs/sdk-api": "0.0.389",
34
+ "@dynamic-labs/rpc-provider-starknet": "2.0.0-alpha.20",
35
+ "@dynamic-labs/utils": "2.0.0-alpha.20",
36
+ "@dynamic-labs/wallet-book": "2.0.0-alpha.20",
37
+ "@dynamic-labs/wallet-connector-core": "2.0.0-alpha.20"
39
38
  },
40
39
  "peerDependencies": {}
41
40
  }
package/src/index.cjs CHANGED
@@ -6,6 +6,9 @@ var argentx = require('./wallets/argentx.cjs');
6
6
  var braavos = require('./wallets/braavos.cjs');
7
7
  var argentxMobile = require('./wallets/argentxMobile.cjs');
8
8
  var argentxWeb = require('./wallets/argentxWeb.cjs');
9
+ var bitget = require('./wallets/bitget.cjs');
10
+ var okx = require('./wallets/okx.cjs');
11
+ require('@dynamic-labs/rpc-provider-starknet');
9
12
 
10
13
  /* eslint-disable @typescript-eslint/no-unused-vars */
11
14
  const StarknetWalletConnectors = (props) => [
@@ -13,6 +16,8 @@ const StarknetWalletConnectors = (props) => [
13
16
  braavos.Braavos,
14
17
  argentxMobile.ArgentXMobile,
15
18
  argentxWeb.ArgentXWeb,
19
+ okx.Okx,
20
+ bitget.Bitget,
16
21
  ];
17
22
 
18
23
  exports.StarknetWalletConnectors = StarknetWalletConnectors;
package/src/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ArgentX } from './wallets/argentx';
2
+ import '@dynamic-labs/rpc-provider-starknet';
2
3
  export declare const StarknetWalletConnectors: (props: any) => (typeof ArgentX)[];
3
4
  export type { StarknetWalletConnectorType } from './starknetWalletConnector';
4
5
  export type { ArgentXWalletConnectorType } from './wallets/argentx';
package/src/index.js CHANGED
@@ -2,6 +2,9 @@ import { ArgentX } from './wallets/argentx.js';
2
2
  import { Braavos } from './wallets/braavos.js';
3
3
  import { ArgentXMobile } from './wallets/argentxMobile.js';
4
4
  import { ArgentXWeb } from './wallets/argentxWeb.js';
5
+ import { Bitget } from './wallets/bitget.js';
6
+ import { Okx } from './wallets/okx.js';
7
+ import '@dynamic-labs/rpc-provider-starknet';
5
8
 
6
9
  /* eslint-disable @typescript-eslint/no-unused-vars */
7
10
  const StarknetWalletConnectors = (props) => [
@@ -9,6 +12,8 @@ const StarknetWalletConnectors = (props) => [
9
12
  Braavos,
10
13
  ArgentXMobile,
11
14
  ArgentXWeb,
15
+ Okx,
16
+ Bitget,
12
17
  ];
13
18
 
14
19
  export { StarknetWalletConnectors };
@@ -7,7 +7,6 @@ var getStarknetCore = require('get-starknet-core');
7
7
  var starknet = require('starknet');
8
8
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
9
9
  var utils = require('@dynamic-labs/utils');
10
- var rpcProviders = require('@dynamic-labs/rpc-providers');
11
10
  var constants = require('./constants.cjs');
12
11
  var ethereumContractAbi = require('./ethereumContractAbi.cjs');
13
12
  var convertors = require('./utils/convertors.cjs');
@@ -26,26 +25,14 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
26
25
  this.windowKey = windowKey;
27
26
  this.starknetNetworks = opts.starknetNetworks;
28
27
  this.chainRpcProviders = opts.chainRpcProviders;
29
- (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerChainProviders(rpcProviders.ProviderChain.STARKNET, (config) => {
30
- const rpcProviders = {};
31
- if (config === null || config === void 0 ? void 0 : config.starknet) {
32
- const networks = config.starknet;
33
- rpcProviders.starknet = this.createProviderFromConfig(networks);
34
- }
35
- return rpcProviders.starknet;
36
- });
28
+ (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerStarknetProviders();
37
29
  }
38
- createProviderFromConfig(networks) {
39
- return networks.map((network) => {
40
- var _a;
41
- const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
42
- const provider = new starknet.RpcProvider({ nodeUrl: rpcUrl });
43
- return {
44
- chainId: network.chainId.toString(),
45
- chainName: network.name,
46
- provider,
47
- };
48
- });
30
+ // abstracting this method to a function due to some wallets (bitget)
31
+ // having non-standard use of the isConnected flag. This allows for us to use other flags to determine connectivity
32
+ isProviderConnected() {
33
+ var _a;
34
+ const wallet = this.getWallet();
35
+ return (_a = wallet === null || wallet === void 0 ? void 0 : wallet.isConnected) !== null && _a !== void 0 ? _a : false;
49
36
  }
50
37
  getPublicClient() {
51
38
  var _a;
@@ -74,7 +61,7 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
74
61
  if (!wallet) {
75
62
  return Promise.resolve(undefined);
76
63
  }
77
- if (!wallet.isConnected) {
64
+ if (!this.isProviderConnected()) {
78
65
  yield wallet.enable({ starknetVersion: this.STARKNET_VERSION });
79
66
  }
80
67
  return Promise.resolve((_a = wallet.provider) === null || _a === void 0 ? void 0 : _a.getChainId());
@@ -84,7 +71,7 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
84
71
  return _tslib.__awaiter(this, void 0, void 0, function* () {
85
72
  const wallet = this.getWallet();
86
73
  try {
87
- if (wallet && !wallet.isConnected) {
74
+ if (wallet && !this.isProviderConnected()) {
88
75
  yield wallet.enable({ starknetVersion: this.STARKNET_VERSION });
89
76
  localStorage.setItem('dynamic_should_have_wallet', 'true');
90
77
  }
@@ -94,11 +81,13 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
94
81
  }
95
82
  });
96
83
  }
97
- fetchPublicAddress() {
84
+ getAddress() {
98
85
  return _tslib.__awaiter(this, void 0, void 0, function* () {
99
86
  const wallet = this.getWallet();
100
- yield (wallet === null || wallet === void 0 ? void 0 : wallet.isPreauthorized());
101
- yield this.connect();
87
+ if (wallet && !this.isProviderConnected()) {
88
+ yield (wallet === null || wallet === void 0 ? void 0 : wallet.isPreauthorized());
89
+ yield this.connect();
90
+ }
102
91
  return Promise.resolve(wallet === null || wallet === void 0 ? void 0 : wallet.selectedAddress);
103
92
  });
104
93
  }
@@ -117,7 +106,7 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
117
106
  signMessage(messageToSign) {
118
107
  return _tslib.__awaiter(this, void 0, void 0, function* () {
119
108
  // FetchPublicAddress also handles the connection to the wallet this is why we call it before getWallet.
120
- const walletAddress = yield this.fetchPublicAddress();
109
+ const walletAddress = yield this.getAddress();
121
110
  const wallet = this.getWallet();
122
111
  if (!walletAddress || !wallet) {
123
112
  walletConnectorCore.logger.error('Could not fetch wallet address for signing message');
@@ -130,7 +119,7 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
130
119
  }
131
120
  getBalance() {
132
121
  return _tslib.__awaiter(this, void 0, void 0, function* () {
133
- const walletAddress = yield this.fetchPublicAddress();
122
+ const walletAddress = yield this.getAddress();
134
123
  const provider = yield this.getWalletClient();
135
124
  if (!walletAddress || !provider) {
136
125
  walletConnectorCore.logger.error('Could not fetch wallet address for getting balance');
@@ -179,7 +168,7 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
179
168
  if (!wallet) {
180
169
  return [];
181
170
  }
182
- const needsReconnection = !wallet.isConnected && (yield wallet.isPreauthorized());
171
+ const needsReconnection = !this.isProviderConnected() && (yield wallet.isPreauthorized());
183
172
  if (needsReconnection) {
184
173
  /**
185
174
  * this is a hack for braavos
@@ -258,36 +247,42 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
258
247
  }
259
248
  });
260
249
  }
261
- mapNetworkNameToChainId(networkName) {
262
- if (networkName === starknet.constants.NetworkName.SN_MAIN ||
263
- networkName.includes('mainnet')) {
250
+ mapNetworkNameToChainId(networkNameOrChainId) {
251
+ if (networkNameOrChainId === starknet.constants.NetworkName.SN_MAIN ||
252
+ networkNameOrChainId.includes('mainnet') ||
253
+ networkNameOrChainId === starknet.constants.StarknetChainId.SN_MAIN) {
264
254
  return starknet.constants.StarknetChainId.SN_MAIN;
265
255
  }
266
- else if (networkName === starknet.constants.NetworkName.SN_GOERLI ||
267
- networkName.includes('goerli')) {
256
+ else if (networkNameOrChainId === starknet.constants.NetworkName.SN_GOERLI ||
257
+ networkNameOrChainId.includes('goerli') ||
258
+ networkNameOrChainId === starknet.constants.StarknetChainId.SN_GOERLI) {
268
259
  return starknet.constants.StarknetChainId.SN_GOERLI;
269
260
  }
270
- else if (networkName === starknet.constants.NetworkName.SN_SEPOLIA ||
271
- networkName.includes('sepolia')) {
261
+ else if (networkNameOrChainId === starknet.constants.NetworkName.SN_SEPOLIA ||
262
+ networkNameOrChainId.includes('sepolia') ||
263
+ networkNameOrChainId === starknet.constants.StarknetChainId.SN_SEPOLIA) {
272
264
  return starknet.constants.StarknetChainId.SN_SEPOLIA;
273
265
  }
274
266
  else {
275
- walletConnectorCore.logger.error('Unknown networkName', networkName);
267
+ walletConnectorCore.logger.error('Unknown networkName', networkNameOrChainId);
276
268
  return undefined;
277
269
  }
278
270
  }
279
- mapChainIdToNetworkName(chainId) {
280
- if (chainId === starknet.constants.StarknetChainId.SN_MAIN) {
271
+ mapChainIdToNetworkName(chainIdOrNetworkName) {
272
+ if (chainIdOrNetworkName === starknet.constants.StarknetChainId.SN_MAIN ||
273
+ chainIdOrNetworkName === starknet.constants.NetworkName.SN_MAIN) {
281
274
  return starknet.constants.NetworkName.SN_MAIN;
282
275
  }
283
- else if (chainId === starknet.constants.StarknetChainId.SN_GOERLI) {
276
+ else if (chainIdOrNetworkName === starknet.constants.StarknetChainId.SN_GOERLI ||
277
+ chainIdOrNetworkName === starknet.constants.NetworkName.SN_GOERLI) {
284
278
  return starknet.constants.NetworkName.SN_GOERLI;
285
279
  }
286
- else if (chainId === starknet.constants.StarknetChainId.SN_SEPOLIA) {
280
+ else if (chainIdOrNetworkName === starknet.constants.StarknetChainId.SN_SEPOLIA ||
281
+ chainIdOrNetworkName === starknet.constants.NetworkName.SN_SEPOLIA) {
287
282
  return starknet.constants.NetworkName.SN_SEPOLIA;
288
283
  }
289
284
  else {
290
- walletConnectorCore.logger.error('Unknown chainId', chainId);
285
+ walletConnectorCore.logger.error('Unknown chainId', chainIdOrNetworkName);
291
286
  return undefined;
292
287
  }
293
288
  }
@@ -3,8 +3,7 @@ import { ProviderInterface, constants, AccountInterface, RpcProvider } from 'sta
3
3
  import { Chain, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
4
4
  import { NetworkConfiguration } from '@dynamic-labs/sdk-api';
5
5
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
6
- import { ChainRpcProviders, StarknetRpcProvider } from '@dynamic-labs/rpc-providers';
7
- import { GenericNetwork } from '@dynamic-labs/types';
6
+ import { IChainRpcProviders } from '@dynamic-labs/rpc-provider-starknet';
8
7
  import { StarknetWalletKey } from './types';
9
8
  type AccountChangeEventHandler = (address: {
10
9
  toString(): string;
@@ -25,18 +24,18 @@ declare abstract class StarknetWalletConnector extends WalletConnectorBase {
25
24
  switchNetworkOnlyFromWallet: boolean;
26
25
  starknetNetworks: NetworkConfiguration[];
27
26
  constructor(name: string, windowKey: StarknetWalletKey, opts: {
28
- chainRpcProviders: typeof ChainRpcProviders;
27
+ chainRpcProviders: IChainRpcProviders;
29
28
  starknetNetworks: NetworkConfiguration[];
30
29
  walletBook: WalletBookSchema;
31
30
  });
32
- createProviderFromConfig(networks: GenericNetwork[]): StarknetRpcProvider[];
31
+ isProviderConnected(): boolean;
33
32
  getPublicClient(): Promise<RpcProvider | undefined>;
34
33
  /**
35
34
  * returns starknet wallet network id
36
35
  */
37
36
  getNetwork(): Promise<any>;
38
37
  connect(): Promise<void>;
39
- fetchPublicAddress(): Promise<string | undefined>;
38
+ getAddress(): Promise<string | undefined>;
40
39
  getSigner(): Promise<AccountInterface | undefined>;
41
40
  getWalletClient(): Promise<ProviderInterface | undefined>;
42
41
  signMessage(messageToSign: string): Promise<string | undefined>;
@@ -47,8 +46,8 @@ declare abstract class StarknetWalletConnector extends WalletConnectorBase {
47
46
  getConnectedAccounts(): Promise<string[]>;
48
47
  setupEventListeners(): void;
49
48
  teardownEventListeners(): Promise<void>;
50
- mapNetworkNameToChainId(networkName: string): constants.StarknetChainId | undefined;
51
- mapChainIdToNetworkName(chainId: string): constants.NetworkName | undefined;
49
+ mapNetworkNameToChainId(networkNameOrChainId: string): constants.StarknetChainId | undefined;
50
+ mapChainIdToNetworkName(chainIdOrNetworkName: string): constants.NetworkName | undefined;
52
51
  }
53
52
  export type StarknetWalletConnectorType = StarknetWalletConnector;
54
53
  export default StarknetWalletConnector;
@@ -1,9 +1,8 @@
1
1
  import { __awaiter } from '../_virtual/_tslib.js';
2
2
  import { getStarknet } from 'get-starknet-core';
3
- import { RpcProvider, Contract, cairo, constants } from 'starknet';
3
+ import { Contract, cairo, constants } from 'starknet';
4
4
  import { WalletConnectorBase, logger } from '@dynamic-labs/wallet-connector-core';
5
5
  import { DynamicError, retryableFn } from '@dynamic-labs/utils';
6
- import { ProviderChain } from '@dynamic-labs/rpc-providers';
7
6
  import { ETH_STARKNET_ADDRESS } from './constants.js';
8
7
  import ETH_CONTRACT_ABI from './ethereumContractAbi.js';
9
8
  import { formatTypedDataMessage } from './utils/convertors.js';
@@ -22,26 +21,14 @@ class StarknetWalletConnector extends WalletConnectorBase {
22
21
  this.windowKey = windowKey;
23
22
  this.starknetNetworks = opts.starknetNetworks;
24
23
  this.chainRpcProviders = opts.chainRpcProviders;
25
- (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerChainProviders(ProviderChain.STARKNET, (config) => {
26
- const rpcProviders = {};
27
- if (config === null || config === void 0 ? void 0 : config.starknet) {
28
- const networks = config.starknet;
29
- rpcProviders.starknet = this.createProviderFromConfig(networks);
30
- }
31
- return rpcProviders.starknet;
32
- });
24
+ (_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerStarknetProviders();
33
25
  }
34
- createProviderFromConfig(networks) {
35
- return networks.map((network) => {
36
- var _a;
37
- const rpcUrl = ((_a = network.privateCustomerRpcUrls) === null || _a === void 0 ? void 0 : _a[0]) || network.rpcUrls[0];
38
- const provider = new RpcProvider({ nodeUrl: rpcUrl });
39
- return {
40
- chainId: network.chainId.toString(),
41
- chainName: network.name,
42
- provider,
43
- };
44
- });
26
+ // abstracting this method to a function due to some wallets (bitget)
27
+ // having non-standard use of the isConnected flag. This allows for us to use other flags to determine connectivity
28
+ isProviderConnected() {
29
+ var _a;
30
+ const wallet = this.getWallet();
31
+ return (_a = wallet === null || wallet === void 0 ? void 0 : wallet.isConnected) !== null && _a !== void 0 ? _a : false;
45
32
  }
46
33
  getPublicClient() {
47
34
  var _a;
@@ -70,7 +57,7 @@ class StarknetWalletConnector extends WalletConnectorBase {
70
57
  if (!wallet) {
71
58
  return Promise.resolve(undefined);
72
59
  }
73
- if (!wallet.isConnected) {
60
+ if (!this.isProviderConnected()) {
74
61
  yield wallet.enable({ starknetVersion: this.STARKNET_VERSION });
75
62
  }
76
63
  return Promise.resolve((_a = wallet.provider) === null || _a === void 0 ? void 0 : _a.getChainId());
@@ -80,7 +67,7 @@ class StarknetWalletConnector extends WalletConnectorBase {
80
67
  return __awaiter(this, void 0, void 0, function* () {
81
68
  const wallet = this.getWallet();
82
69
  try {
83
- if (wallet && !wallet.isConnected) {
70
+ if (wallet && !this.isProviderConnected()) {
84
71
  yield wallet.enable({ starknetVersion: this.STARKNET_VERSION });
85
72
  localStorage.setItem('dynamic_should_have_wallet', 'true');
86
73
  }
@@ -90,11 +77,13 @@ class StarknetWalletConnector extends WalletConnectorBase {
90
77
  }
91
78
  });
92
79
  }
93
- fetchPublicAddress() {
80
+ getAddress() {
94
81
  return __awaiter(this, void 0, void 0, function* () {
95
82
  const wallet = this.getWallet();
96
- yield (wallet === null || wallet === void 0 ? void 0 : wallet.isPreauthorized());
97
- yield this.connect();
83
+ if (wallet && !this.isProviderConnected()) {
84
+ yield (wallet === null || wallet === void 0 ? void 0 : wallet.isPreauthorized());
85
+ yield this.connect();
86
+ }
98
87
  return Promise.resolve(wallet === null || wallet === void 0 ? void 0 : wallet.selectedAddress);
99
88
  });
100
89
  }
@@ -113,7 +102,7 @@ class StarknetWalletConnector extends WalletConnectorBase {
113
102
  signMessage(messageToSign) {
114
103
  return __awaiter(this, void 0, void 0, function* () {
115
104
  // FetchPublicAddress also handles the connection to the wallet this is why we call it before getWallet.
116
- const walletAddress = yield this.fetchPublicAddress();
105
+ const walletAddress = yield this.getAddress();
117
106
  const wallet = this.getWallet();
118
107
  if (!walletAddress || !wallet) {
119
108
  logger.error('Could not fetch wallet address for signing message');
@@ -126,7 +115,7 @@ class StarknetWalletConnector extends WalletConnectorBase {
126
115
  }
127
116
  getBalance() {
128
117
  return __awaiter(this, void 0, void 0, function* () {
129
- const walletAddress = yield this.fetchPublicAddress();
118
+ const walletAddress = yield this.getAddress();
130
119
  const provider = yield this.getWalletClient();
131
120
  if (!walletAddress || !provider) {
132
121
  logger.error('Could not fetch wallet address for getting balance');
@@ -175,7 +164,7 @@ class StarknetWalletConnector extends WalletConnectorBase {
175
164
  if (!wallet) {
176
165
  return [];
177
166
  }
178
- const needsReconnection = !wallet.isConnected && (yield wallet.isPreauthorized());
167
+ const needsReconnection = !this.isProviderConnected() && (yield wallet.isPreauthorized());
179
168
  if (needsReconnection) {
180
169
  /**
181
170
  * this is a hack for braavos
@@ -254,36 +243,42 @@ class StarknetWalletConnector extends WalletConnectorBase {
254
243
  }
255
244
  });
256
245
  }
257
- mapNetworkNameToChainId(networkName) {
258
- if (networkName === constants.NetworkName.SN_MAIN ||
259
- networkName.includes('mainnet')) {
246
+ mapNetworkNameToChainId(networkNameOrChainId) {
247
+ if (networkNameOrChainId === constants.NetworkName.SN_MAIN ||
248
+ networkNameOrChainId.includes('mainnet') ||
249
+ networkNameOrChainId === constants.StarknetChainId.SN_MAIN) {
260
250
  return constants.StarknetChainId.SN_MAIN;
261
251
  }
262
- else if (networkName === constants.NetworkName.SN_GOERLI ||
263
- networkName.includes('goerli')) {
252
+ else if (networkNameOrChainId === constants.NetworkName.SN_GOERLI ||
253
+ networkNameOrChainId.includes('goerli') ||
254
+ networkNameOrChainId === constants.StarknetChainId.SN_GOERLI) {
264
255
  return constants.StarknetChainId.SN_GOERLI;
265
256
  }
266
- else if (networkName === constants.NetworkName.SN_SEPOLIA ||
267
- networkName.includes('sepolia')) {
257
+ else if (networkNameOrChainId === constants.NetworkName.SN_SEPOLIA ||
258
+ networkNameOrChainId.includes('sepolia') ||
259
+ networkNameOrChainId === constants.StarknetChainId.SN_SEPOLIA) {
268
260
  return constants.StarknetChainId.SN_SEPOLIA;
269
261
  }
270
262
  else {
271
- logger.error('Unknown networkName', networkName);
263
+ logger.error('Unknown networkName', networkNameOrChainId);
272
264
  return undefined;
273
265
  }
274
266
  }
275
- mapChainIdToNetworkName(chainId) {
276
- if (chainId === constants.StarknetChainId.SN_MAIN) {
267
+ mapChainIdToNetworkName(chainIdOrNetworkName) {
268
+ if (chainIdOrNetworkName === constants.StarknetChainId.SN_MAIN ||
269
+ chainIdOrNetworkName === constants.NetworkName.SN_MAIN) {
277
270
  return constants.NetworkName.SN_MAIN;
278
271
  }
279
- else if (chainId === constants.StarknetChainId.SN_GOERLI) {
272
+ else if (chainIdOrNetworkName === constants.StarknetChainId.SN_GOERLI ||
273
+ chainIdOrNetworkName === constants.NetworkName.SN_GOERLI) {
280
274
  return constants.NetworkName.SN_GOERLI;
281
275
  }
282
- else if (chainId === constants.StarknetChainId.SN_SEPOLIA) {
276
+ else if (chainIdOrNetworkName === constants.StarknetChainId.SN_SEPOLIA ||
277
+ chainIdOrNetworkName === constants.NetworkName.SN_SEPOLIA) {
283
278
  return constants.NetworkName.SN_SEPOLIA;
284
279
  }
285
280
  else {
286
- logger.error('Unknown chainId', chainId);
281
+ logger.error('Unknown chainId', chainIdOrNetworkName);
287
282
  return undefined;
288
283
  }
289
284
  }
package/src/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { StarknetWindowObject } from 'get-starknet-core';
2
- export type StarknetWalletKey = 'braavos' | 'argentX' | 'argentXMobile' | 'argentWebWallet';
2
+ export type StarknetWalletKey = 'braavos' | 'argentX' | 'argentXMobile' | 'argentWebWallet' | 'okxwallet' | 'bitkeep';
3
3
  export type StarknetWindowKey = `starknet_${StarknetWalletKey}` | 'starknet';
4
4
  type StarknetWindow = {
5
5
  [key in StarknetWindowKey]: StarknetWindowObject;
@@ -8,10 +8,11 @@ var starknetWalletConnector = require('../starknetWalletConnector.cjs');
8
8
  class ArgentX extends starknetWalletConnector["default"] {
9
9
  constructor(opts) {
10
10
  super('Argent X', 'argentX', opts);
11
+ this.overrideKey = 'argentx';
11
12
  }
12
13
  getConnectedAccounts() {
13
14
  return _tslib.__awaiter(this, void 0, void 0, function* () {
14
- const address = yield this.fetchPublicAddress();
15
+ const address = yield this.getAddress();
15
16
  if (!address)
16
17
  return [];
17
18
  return [address];
@@ -1,6 +1,7 @@
1
1
  import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
2
2
  import StarknetProvider from '../starknetWalletConnector';
3
3
  export declare class ArgentX extends StarknetProvider implements WalletConnector {
4
+ overrideKey: string;
4
5
  constructor(opts: any);
5
6
  getConnectedAccounts(): Promise<string[]>;
6
7
  }
@@ -4,10 +4,11 @@ import StarknetWalletConnector from '../starknetWalletConnector.js';
4
4
  class ArgentX extends StarknetWalletConnector {
5
5
  constructor(opts) {
6
6
  super('Argent X', 'argentX', opts);
7
+ this.overrideKey = 'argentx';
7
8
  }
8
9
  getConnectedAccounts() {
9
10
  return __awaiter(this, void 0, void 0, function* () {
10
- const address = yield this.fetchPublicAddress();
11
+ const address = yield this.getAddress();
11
12
  if (!address)
12
13
  return [];
13
14
  return [address];
@@ -12,7 +12,7 @@ class ArgentXBase extends starknetWalletConnector["default"] {
12
12
  isInstalledOnBrowser() {
13
13
  return false;
14
14
  }
15
- fetchPublicAddress() {
15
+ getAddress() {
16
16
  var _a;
17
17
  return _tslib.__awaiter(this, void 0, void 0, function* () {
18
18
  yield this.connect();
@@ -7,7 +7,7 @@ declare abstract class ArgentXBase extends StarknetProvider implements WalletCon
7
7
  wallet: StarknetWindowObject | undefined;
8
8
  abstract connect(): Promise<void>;
9
9
  isInstalledOnBrowser(): boolean;
10
- fetchPublicAddress(): Promise<string | undefined>;
10
+ getAddress(): Promise<string | undefined>;
11
11
  endSession(): Promise<void>;
12
12
  getWallet(): StarknetWindowObject | undefined;
13
13
  getSelectedNodeUrl(): string | undefined;
@@ -10,7 +10,7 @@ class ArgentXBase extends StarknetWalletConnector {
10
10
  isInstalledOnBrowser() {
11
11
  return false;
12
12
  }
13
- fetchPublicAddress() {
13
+ getAddress() {
14
14
  var _a;
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
16
  yield this.connect();
@@ -12,6 +12,7 @@ var argentxBase = require('./argentxBase.cjs');
12
12
  class ArgentXMobile extends argentxBase {
13
13
  constructor(opts) {
14
14
  super('Argent X - Mobile', 'argentXMobile', opts);
15
+ this.overrideKey = 'argentxmobile';
15
16
  this.projectId = opts.projectId;
16
17
  this.appName = opts.appName;
17
18
  this.appLogoUrls = opts.appLogoUrl
@@ -76,7 +77,7 @@ class ArgentXMobile extends argentxBase {
76
77
  if (!this.hasValidSession()) {
77
78
  return [];
78
79
  }
79
- const address = yield this.fetchPublicAddress();
80
+ const address = yield this.getAddress();
80
81
  if (!address)
81
82
  return [];
82
83
  return [address];
@@ -3,6 +3,7 @@ export declare class ArgentXMobile extends ArgentXBase {
3
3
  projectId: string | undefined;
4
4
  appName: string | undefined;
5
5
  appLogoUrls: string[] | undefined;
6
+ overrideKey: string;
6
7
  constructor(opts: any);
7
8
  filter(): boolean;
8
9
  connect(): Promise<void>;
@@ -8,6 +8,7 @@ import ArgentXBase from './argentxBase.js';
8
8
  class ArgentXMobile extends ArgentXBase {
9
9
  constructor(opts) {
10
10
  super('Argent X - Mobile', 'argentXMobile', opts);
11
+ this.overrideKey = 'argentxmobile';
11
12
  this.projectId = opts.projectId;
12
13
  this.appName = opts.appName;
13
14
  this.appLogoUrls = opts.appLogoUrl
@@ -72,7 +73,7 @@ class ArgentXMobile extends ArgentXBase {
72
73
  if (!this.hasValidSession()) {
73
74
  return [];
74
75
  }
75
- const address = yield this.fetchPublicAddress();
76
+ const address = yield this.getAddress();
76
77
  if (!address)
77
78
  return [];
78
79
  return [address];
@@ -12,6 +12,7 @@ var argentxBase = require('./argentxBase.cjs');
12
12
  class ArgentXWeb extends argentxBase {
13
13
  constructor(opts) {
14
14
  super('Argent X - Web', 'argentWebWallet', opts);
15
+ this.overrideKey = 'argentxweb';
15
16
  }
16
17
  connect() {
17
18
  return _tslib.__awaiter(this, void 0, void 0, function* () {
@@ -44,7 +45,7 @@ class ArgentXWeb extends argentxBase {
44
45
  }
45
46
  getConnectedAccounts() {
46
47
  return _tslib.__awaiter(this, void 0, void 0, function* () {
47
- const address = yield this.fetchPublicAddress();
48
+ const address = yield this.getAddress();
48
49
  if (!address)
49
50
  return [];
50
51
  return [address];
@@ -1,5 +1,6 @@
1
1
  import ArgentXBase from './argentxBase';
2
2
  export declare class ArgentXWeb extends ArgentXBase {
3
+ overrideKey: string;
3
4
  constructor(opts: any);
4
5
  connect(): Promise<void>;
5
6
  getConnectedAccounts(): Promise<string[]>;
@@ -8,6 +8,7 @@ import ArgentXBase from './argentxBase.js';
8
8
  class ArgentXWeb extends ArgentXBase {
9
9
  constructor(opts) {
10
10
  super('Argent X - Web', 'argentWebWallet', opts);
11
+ this.overrideKey = 'argentxweb';
11
12
  }
12
13
  connect() {
13
14
  return __awaiter(this, void 0, void 0, function* () {
@@ -40,7 +41,7 @@ class ArgentXWeb extends ArgentXBase {
40
41
  }
41
42
  getConnectedAccounts() {
42
43
  return __awaiter(this, void 0, void 0, function* () {
43
- const address = yield this.fetchPublicAddress();
44
+ const address = yield this.getAddress();
44
45
  if (!address)
45
46
  return [];
46
47
  return [address];
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var starknetWalletConnector = require('../starknetWalletConnector.cjs');
6
+
7
+ class Bitget extends starknetWalletConnector["default"] {
8
+ constructor(opts) {
9
+ super('Bitget Starknet', 'bitkeep', opts);
10
+ this.overrideKey = 'bitgetstarknet';
11
+ }
12
+ // adding this method due to inconsistencies in isConnected flag on the window object
13
+ // the window object shows isConnected=true and no provider/account defined
14
+ isProviderConnected() {
15
+ var _a;
16
+ const wallet = this.getWallet();
17
+ return (_a = (Boolean(wallet === null || wallet === void 0 ? void 0 : wallet.account) && (wallet === null || wallet === void 0 ? void 0 : wallet.isConnected))) !== null && _a !== void 0 ? _a : false;
18
+ }
19
+ }
20
+
21
+ exports.Bitget = Bitget;
@@ -0,0 +1,7 @@
1
+ import type { WalletConnector } from '@dynamic-labs/wallet-connector-core';
2
+ import StarknetProvider from '../starknetWalletConnector';
3
+ export declare class Bitget extends StarknetProvider implements WalletConnector {
4
+ overrideKey: string;
5
+ constructor(opts: any);
6
+ isProviderConnected(): boolean;
7
+ }
@@ -0,0 +1,17 @@
1
+ import StarknetWalletConnector from '../starknetWalletConnector.js';
2
+
3
+ class Bitget extends StarknetWalletConnector {
4
+ constructor(opts) {
5
+ super('Bitget Starknet', 'bitkeep', opts);
6
+ this.overrideKey = 'bitgetstarknet';
7
+ }
8
+ // adding this method due to inconsistencies in isConnected flag on the window object
9
+ // the window object shows isConnected=true and no provider/account defined
10
+ isProviderConnected() {
11
+ var _a;
12
+ const wallet = this.getWallet();
13
+ return (_a = (Boolean(wallet === null || wallet === void 0 ? void 0 : wallet.account) && (wallet === null || wallet === void 0 ? void 0 : wallet.isConnected))) !== null && _a !== void 0 ? _a : false;
14
+ }
15
+ }
16
+
17
+ export { Bitget };
@@ -9,14 +9,15 @@ var starknetWalletConnector = require('../starknetWalletConnector.cjs');
9
9
  class Braavos extends starknetWalletConnector["default"] {
10
10
  constructor(opts) {
11
11
  super('Braavos', 'braavos', opts);
12
+ this.overrideKey = 'braavos';
12
13
  }
13
- fetchPublicAddress() {
14
+ getAddress() {
14
15
  const _super = Object.create(null, {
15
- fetchPublicAddress: { get: () => super.fetchPublicAddress }
16
+ getAddress: { get: () => super.getAddress }
16
17
  });
17
18
  return _tslib.__awaiter(this, void 0, void 0, function* () {
18
19
  if (this.isInstalledOnBrowser()) {
19
- return _super.fetchPublicAddress.call(this);
20
+ return _super.getAddress.call(this);
20
21
  }
21
22
  /**
22
23
  * todo (1): update universal link with "https://starknet.app.link/" once it will be released.
@@ -1,7 +1,8 @@
1
1
  import type { WalletConnector } from '@dynamic-labs/wallet-connector-core';
2
2
  import StarknetProvider from '../starknetWalletConnector';
3
3
  export declare class Braavos extends StarknetProvider implements WalletConnector {
4
+ overrideKey: string;
4
5
  constructor(opts: any);
5
- fetchPublicAddress(): Promise<string | undefined>;
6
+ getAddress(): Promise<string | undefined>;
6
7
  }
7
8
  export type BraavosWalletConnectorType = Braavos;
@@ -5,14 +5,15 @@ import StarknetWalletConnector from '../starknetWalletConnector.js';
5
5
  class Braavos extends StarknetWalletConnector {
6
6
  constructor(opts) {
7
7
  super('Braavos', 'braavos', opts);
8
+ this.overrideKey = 'braavos';
8
9
  }
9
- fetchPublicAddress() {
10
+ getAddress() {
10
11
  const _super = Object.create(null, {
11
- fetchPublicAddress: { get: () => super.fetchPublicAddress }
12
+ getAddress: { get: () => super.getAddress }
12
13
  });
13
14
  return __awaiter(this, void 0, void 0, function* () {
14
15
  if (this.isInstalledOnBrowser()) {
15
- return _super.fetchPublicAddress.call(this);
16
+ return _super.getAddress.call(this);
16
17
  }
17
18
  /**
18
19
  * todo (1): update universal link with "https://starknet.app.link/" once it will be released.
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var starknetWalletConnector = require('../starknetWalletConnector.cjs');
6
+
7
+ class Okx extends starknetWalletConnector["default"] {
8
+ constructor(opts) {
9
+ super('OKX Starknet', 'okxwallet', opts);
10
+ this.overrideKey = 'okxstarknet';
11
+ }
12
+ }
13
+
14
+ exports.Okx = Okx;
@@ -0,0 +1,6 @@
1
+ import type { WalletConnector } from '@dynamic-labs/wallet-connector-core';
2
+ import StarknetProvider from '../starknetWalletConnector';
3
+ export declare class Okx extends StarknetProvider implements WalletConnector {
4
+ overrideKey: string;
5
+ constructor(opts: any);
6
+ }
@@ -0,0 +1,10 @@
1
+ import StarknetWalletConnector from '../starknetWalletConnector.js';
2
+
3
+ class Okx extends StarknetWalletConnector {
4
+ constructor(opts) {
5
+ super('OKX Starknet', 'okxwallet', opts);
6
+ this.overrideKey = 'okxstarknet';
7
+ }
8
+ }
9
+
10
+ export { Okx };