@dynamic-labs/ethereum 1.0.0-alpha.0 → 1.0.0-alpha.10

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,180 @@
1
1
 
2
+ ## [1.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2023-12-08)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * allow transaction error to read from viem error ([#4101](https://github.com/dynamic-labs/DynamicAuth/issues/4101)) ([0f46cbe](https://github.com/dynamic-labs/DynamicAuth/commit/0f46cbea1eb260c2efdeee9b62f669fb3cf4ab93))
8
+ * trigger claim flow for unclaimed embedded smart contract wallet signer ([#4108](https://github.com/dynamic-labs/DynamicAuth/issues/4108)) ([37c9013](https://github.com/dynamic-labs/DynamicAuth/commit/37c9013109f2d6a37bde041da9072c5f5fa2df67))
9
+ * WalletConnect v2 connector with non active chains ([#4085](https://github.com/dynamic-labs/DynamicAuth/issues/4085)) ([f69cbe9](https://github.com/dynamic-labs/DynamicAuth/commit/f69cbe96012563f71e89939c96f2a46926e7b394))
10
+
11
+ ## [1.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2023-12-07)
12
+
13
+
14
+ ### ⚠ BREAKING CHANGES
15
+
16
+ * how to migrate
17
+ Whenever you would use the property wallets from the object returned by useDynamicContext, you must now rename it to walletConnectorOptions.
18
+
19
+ ### Features
20
+
21
+ * add support for eip6963 ([#4064](https://github.com/dynamic-labs/DynamicAuth/issues/4064)) ([3f8cf0e](https://github.com/dynamic-labs/DynamicAuth/commit/3f8cf0e4250945f3a331f701d491a308fab5f7b8))
22
+ * allow AA wallets to access owner features ([#4079](https://github.com/dynamic-labs/DynamicAuth/issues/4079)) ([9efc2be](https://github.com/dynamic-labs/DynamicAuth/commit/9efc2bee87ec9193c3682863d72024b3586de724))
23
+ * introduce UserWalletsContext ([#4083](https://github.com/dynamic-labs/DynamicAuth/issues/4083)) ([b9ca7f6](https://github.com/dynamic-labs/DynamicAuth/commit/b9ca7f6b0aff4b3992325b70cc9a903ece445c7f))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * ensure zero dev provider will receive a signer ([#4084](https://github.com/dynamic-labs/DynamicAuth/issues/4084)) ([f02a540](https://github.com/dynamic-labs/DynamicAuth/commit/f02a54036d39bfc5fb0c262f292acf914e4bd653))
29
+ * render recovery section only when turnkey provider is enabled ([#4093](https://github.com/dynamic-labs/DynamicAuth/issues/4093)) ([5f29bd2](https://github.com/dynamic-labs/DynamicAuth/commit/5f29bd23ccca2e307822377be28396edc7ab1fda))
30
+ * reset selected social provider on logout ([#4078](https://github.com/dynamic-labs/DynamicAuth/issues/4078)) ([85dc611](https://github.com/dynamic-labs/DynamicAuth/commit/85dc611d9c0e733bdb9d316b008bdaa35bcc2a91))
31
+
32
+
33
+ * rename wallets > walletConnectorOptions ([#4086](https://github.com/dynamic-labs/DynamicAuth/issues/4086)) ([10a7795](https://github.com/dynamic-labs/DynamicAuth/commit/10a779567e751469a667095726da52d78facbd57))
34
+
35
+ ## [1.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2023-12-05)
36
+
37
+
38
+ ### ⚠ BREAKING CHANGES
39
+
40
+ * rename EthereumSmartWalletConnectors to ZeroDevSmartWalletConnectors (#4067)
41
+
42
+
43
+ ### Features
44
+
45
+ * add support for pregenerated wallets + securing them ([#3968](https://github.com/dynamic-labs/DynamicAuth/issues/3968)) ([8212b76](https://github.com/dynamic-labs/DynamicAuth/commit/8212b760ba199bd989e0ba2ad3caf97590db4861))
46
+
47
+ ## [1.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2023-12-05)
48
+
49
+
50
+ ### Features
51
+
52
+ * add support for Turnkey HD wallets and backwards compatiblity for private key wallets ([#4011](https://github.com/dynamic-labs/DynamicAuth/issues/4011)) ([75c5258](https://github.com/dynamic-labs/DynamicAuth/commit/75c5258da494d5d4dfa8b96655303dd9645f2269))
53
+
54
+
55
+ ### Bug Fixes
56
+
57
+ * add close button to wallets list ([#4036](https://github.com/dynamic-labs/DynamicAuth/issues/4036)) ([a2b988b](https://github.com/dynamic-labs/DynamicAuth/commit/a2b988bdfc662af6f85d37a79ed6666c483aa447))
58
+ * add support for embedded wallets in connect-only ([#4041](https://github.com/dynamic-labs/DynamicAuth/issues/4041)) ([ceea635](https://github.com/dynamic-labs/DynamicAuth/commit/ceea635b69e2a0c2636b47fbd30639d69dba7a1c))
59
+ * embedded wallet invalid stored chain breaking network picker ([#4050](https://github.com/dynamic-labs/DynamicAuth/issues/4050)) ([2e2384b](https://github.com/dynamic-labs/DynamicAuth/commit/2e2384ba37407d9164cce47e23f5d5f469f7e062))
60
+ * handle insufficient funds from AA provider ([#4027](https://github.com/dynamic-labs/DynamicAuth/issues/4027)) ([6b9cc88](https://github.com/dynamic-labs/DynamicAuth/commit/6b9cc886f4f2590094bd50aba195c07a5532dfa4))
61
+ * prevent double logout caused by wagmi sync ([#4048](https://github.com/dynamic-labs/DynamicAuth/issues/4048)) ([c66c81c](https://github.com/dynamic-labs/DynamicAuth/commit/c66c81c80839aa9ce1cfae76f4afce12e34f3513))
62
+ * properly detect network switch for secondary wallets ([#4038](https://github.com/dynamic-labs/DynamicAuth/issues/4038)) ([f87174d](https://github.com/dynamic-labs/DynamicAuth/commit/f87174de0892dd057401eaf3c0bc68d974add0fc))
63
+ * **use-wallets-connected-state:** update state on wallet id change ([#4045](https://github.com/dynamic-labs/DynamicAuth/issues/4045)) ([ca3a835](https://github.com/dynamic-labs/DynamicAuth/commit/ca3a8359eae386bffa758ed646ac14af8360a7f8))
64
+ * user should be able to see the full passkey name on management view ([#4043](https://github.com/dynamic-labs/DynamicAuth/issues/4043)) ([7bc1b70](https://github.com/dynamic-labs/DynamicAuth/commit/7bc1b7043cbc9f0e21df78a57efc3e6938a99db2))
65
+ * users should be able to easily find passkey recovery ([#4058](https://github.com/dynamic-labs/DynamicAuth/issues/4058)) ([0202ae9](https://github.com/dynamic-labs/DynamicAuth/commit/0202ae98c96544dec5ac357dc77000996e32ad33))
66
+
67
+ ## [1.0.0-alpha.6](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2023-11-29)
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * transaction layout show alert ([#4024](https://github.com/dynamic-labs/DynamicAuth/issues/4024)) ([52057f5](https://github.com/dynamic-labs/DynamicAuth/commit/52057f54ebc32464b2486a2328cb6310caf85208)), closes [#4020](https://github.com/dynamic-labs/DynamicAuth/issues/4020)
73
+
74
+ ## [1.0.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2023-11-29)
75
+
76
+
77
+ ### Features
78
+
79
+ * gracefully handle uknown wallet ([#3997](https://github.com/dynamic-labs/DynamicAuth/issues/3997)) ([ce7ff6a](https://github.com/dynamic-labs/DynamicAuth/commit/ce7ff6a50a8e8947050734b61587c8cadd041dbe))
80
+
81
+
82
+ ### Bug Fixes
83
+
84
+ * remove total on sponsored transactions ([#4019](https://github.com/dynamic-labs/DynamicAuth/issues/4019)) ([d976678](https://github.com/dynamic-labs/DynamicAuth/commit/d9766787b29665fbcd7983c5d61c31a4d97c8257))
85
+ * send balance align information ([#4020](https://github.com/dynamic-labs/DynamicAuth/issues/4020)) ([508dccf](https://github.com/dynamic-labs/DynamicAuth/commit/508dccfa2c6aeaed30616b6a41b30002cccb3b40))
86
+
87
+ ## [1.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2023-11-28)
88
+
89
+
90
+ ### Bug Fixes
91
+
92
+ * update zerodev provider initialization ([#4015](https://github.com/dynamic-labs/DynamicAuth/issues/4015)) ([8faca00](https://github.com/dynamic-labs/DynamicAuth/commit/8faca00d414677adc5fecde451ca01da53fe9641))
93
+
94
+ ## [1.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2023-11-28)
95
+
96
+
97
+ ### Bug Fixes
98
+
99
+ * fix solflare mobile wallet deep linking ([#3998](https://github.com/dynamic-labs/DynamicAuth/issues/3998)) ([10069ae](https://github.com/dynamic-labs/DynamicAuth/commit/10069ae9ed5d8e1978131f57c3e90680e85d2efb))
100
+ * passkey error message when reaching limit of accounts ([#4010](https://github.com/dynamic-labs/DynamicAuth/issues/4010)) ([dabce3b](https://github.com/dynamic-labs/DynamicAuth/commit/dabce3b6ada4bac75903b43d5cb125cfd5619d18))
101
+
102
+ ## [1.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2023-11-28)
103
+
104
+
105
+ ### ⚠ BREAKING CHANGES
106
+
107
+ * rename walletsByChain to bridgeChains (#3954)
108
+
109
+ ### Features
110
+
111
+ * passkey management and recovery ([#3911](https://github.com/dynamic-labs/DynamicAuth/issues/3911)) ([b692b3a](https://github.com/dynamic-labs/DynamicAuth/commit/b692b3a8697d0ffb441faae97e609b144965695d))
112
+
113
+
114
+ ### Bug Fixes
115
+
116
+ * ensure all chain rpc providers are always assigned correctly ([#3981](https://github.com/dynamic-labs/DynamicAuth/issues/3981)) ([cd2e25c](https://github.com/dynamic-labs/DynamicAuth/commit/cd2e25c4eb39791866c1ea283d61fff388cce5df))
117
+ * initialize selected chain with first evm network if no value in ls ([#3999](https://github.com/dynamic-labs/DynamicAuth/issues/3999)) ([bc9e43b](https://github.com/dynamic-labs/DynamicAuth/commit/bc9e43be9d33c75bb1236756589f63f17b230ab1))
118
+ * nextjs issues to show transaction modals ([#3964](https://github.com/dynamic-labs/DynamicAuth/issues/3964)) ([9326ac4](https://github.com/dynamic-labs/DynamicAuth/commit/9326ac49394e067ce38b17faff08b4fabf91bb3f))
119
+ * onEmbeddedWalletCreated not being called ([#3975](https://github.com/dynamic-labs/DynamicAuth/issues/3975)) ([035cebe](https://github.com/dynamic-labs/DynamicAuth/commit/035cebe02891048e62c66a7277ed7f43c27e559d))
120
+ * return linked wallets even when there's no primary wallet ([#3965](https://github.com/dynamic-labs/DynamicAuth/issues/3965)) ([27705de](https://github.com/dynamic-labs/DynamicAuth/commit/27705de4ac7e1584efd1245bb9c6a818b1c20742))
121
+ * transaction modal not throwing viem compatible exception ([#3971](https://github.com/dynamic-labs/DynamicAuth/issues/3971)) ([bedab0c](https://github.com/dynamic-labs/DynamicAuth/commit/bedab0c4448bcca5c3e696ceb276867ce55bbd85))
122
+ * **zero-dev:** ensure the sign typed data is parsed for zero dev to handle ([#3974](https://github.com/dynamic-labs/DynamicAuth/issues/3974)) ([f517738](https://github.com/dynamic-labs/DynamicAuth/commit/f517738e1abc138f882525c128cd1ee5e88b9050))
123
+ * zerodev sign message with ethers ([#3972](https://github.com/dynamic-labs/DynamicAuth/issues/3972)) ([5de3873](https://github.com/dynamic-labs/DynamicAuth/commit/5de3873daa9cbfeef6dd9123b7a319d8e6b412d5))
124
+ * **zerodev:** ensure ECDSAProvider supports sendUserOperation ([#4003](https://github.com/dynamic-labs/DynamicAuth/issues/4003)) ([c8f5886](https://github.com/dynamic-labs/DynamicAuth/commit/c8f58868fcf6912fd11a92940369faf37e3fcdde))
125
+ * **zerodev:** ensure transaction is sponsored before submission ([#3932](https://github.com/dynamic-labs/DynamicAuth/issues/3932)) ([74becb7](https://github.com/dynamic-labs/DynamicAuth/commit/74becb7ec2fd55f8b905a9c9f0bbba44a9d22513))
126
+
127
+
128
+ * rename walletsByChain to bridgeChains ([#3954](https://github.com/dynamic-labs/DynamicAuth/issues/3954)) ([a91e8fe](https://github.com/dynamic-labs/DynamicAuth/commit/a91e8fe605694ccd8a00b71aa194c0c5191f156c))
129
+
130
+ ## [1.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2023-11-22)
131
+
132
+
133
+ ### Features
134
+
135
+ * add basic zerodev connector ([#3782](https://github.com/dynamic-labs/DynamicAuth/issues/3782)) ([3f8debd](https://github.com/dynamic-labs/DynamicAuth/commit/3f8debddb1bff325389193e0348128ebb9ba59b9))
136
+ * add hcaptcha to dynamic signin methods ([#3853](https://github.com/dynamic-labs/DynamicAuth/issues/3853)) ([a4a9ad3](https://github.com/dynamic-labs/DynamicAuth/commit/a4a9ad3b048e33acc5b885cd797697ca4f41995e))
137
+ * add hcaptcha to magic login methods ([#3894](https://github.com/dynamic-labs/DynamicAuth/issues/3894)) ([c76b750](https://github.com/dynamic-labs/DynamicAuth/commit/c76b750351557ad9cf5bbcc39bd7fd0970b66312))
138
+ * add need help section to sign message modal ([#3847](https://github.com/dynamic-labs/DynamicAuth/issues/3847)) ([4f90617](https://github.com/dynamic-labs/DynamicAuth/commit/4f90617bcf400a7171062435c731d95c6bbf41c7))
139
+ * add perawallet to wallet book ([#3868](https://github.com/dynamic-labs/DynamicAuth/issues/3868)) ([5f4e79d](https://github.com/dynamic-labs/DynamicAuth/commit/5f4e79df202b02088b15c5dfab7feee5789e9ece))
140
+ * add serialization to allow sending events callbacks and wallet connectors used by customers ([0077eb0](https://github.com/dynamic-labs/DynamicAuth/commit/0077eb0af05feb765d0c61911a48d5e98554760a))
141
+ * add support for dynamic domains for starknet signatures ([#3927](https://github.com/dynamic-labs/DynamicAuth/issues/3927)) ([52797ce](https://github.com/dynamic-labs/DynamicAuth/commit/52797ce867c956049bfa5021cf5b1c562e771a2e))
142
+ * add support for Pera Wallet ([#3866](https://github.com/dynamic-labs/DynamicAuth/issues/3866)) ([cb99ae7](https://github.com/dynamic-labs/DynamicAuth/commit/cb99ae77605d913932a77bf2ea565b7e7baf781a))
143
+ * add support for private starknet rpc providers ([#3881](https://github.com/dynamic-labs/DynamicAuth/issues/3881)) ([8fd5ef9](https://github.com/dynamic-labs/DynamicAuth/commit/8fd5ef902d48ef828b1cb89d0e462ea5b54f4e42))
144
+ * add zerodev to wallet book and render generic wallet icon ([#3822](https://github.com/dynamic-labs/DynamicAuth/issues/3822)) ([9c5768d](https://github.com/dynamic-labs/DynamicAuth/commit/9c5768d0fc1169c62927926c0e436b6a448d5656))
145
+ * allow updating evmNetworks in real time ([#3877](https://github.com/dynamic-labs/DynamicAuth/issues/3877)) ([b4a2521](https://github.com/dynamic-labs/DynamicAuth/commit/b4a2521830b859a129d70bad2ae1213db075550d))
146
+ * editable copies as typed data ([#3784](https://github.com/dynamic-labs/DynamicAuth/issues/3784)) ([d6c6d74](https://github.com/dynamic-labs/DynamicAuth/commit/d6c6d74e60c9c9d459414c452fbd780d3f6bc2f9))
147
+ * email inputs now use email keyboard ([#3843](https://github.com/dynamic-labs/DynamicAuth/issues/3843)) ([76926e2](https://github.com/dynamic-labs/DynamicAuth/commit/76926e26b6a188d9d8e3bba2512340610e218e9f))
148
+ * hide unlink if disabled in dashboard ([#3825](https://github.com/dynamic-labs/DynamicAuth/issues/3825)) ([a0625e6](https://github.com/dynamic-labs/DynamicAuth/commit/a0625e6fd01aa5b57e6b8542efe04e280e0c6830))
149
+ * initialize smart wallet from verified credentials ([#3790](https://github.com/dynamic-labs/DynamicAuth/issues/3790)) ([1fc5890](https://github.com/dynamic-labs/DynamicAuth/commit/1fc5890f2e0ef458bfb59d38d536c41d183bc2a2))
150
+ * set smart wallet as primary when owner is an embedded wallet ([#3898](https://github.com/dynamic-labs/DynamicAuth/issues/3898)) ([ec40172](https://github.com/dynamic-labs/DynamicAuth/commit/ec401729f38d946d5431bbbb15c5c1cdc66acb73))
151
+ * support forced network validation via DynamicContext setting ([#3879](https://github.com/dynamic-labs/DynamicAuth/issues/3879)) ([a7993b9](https://github.com/dynamic-labs/DynamicAuth/commit/a7993b9b6bdd739bcb4e66e46d14e7f8623bed66))
152
+ * **transaction:** add sponsored gas transaction ([#3869](https://github.com/dynamic-labs/DynamicAuth/issues/3869)) ([ccceb24](https://github.com/dynamic-labs/DynamicAuth/commit/ccceb2421e029dc60e53912e404b574324d6772f))
153
+
154
+
155
+ ### Bug Fixes
156
+
157
+ * **account-abstraction:** set verified credentials before setting EOA to wallet connector ([#3941](https://github.com/dynamic-labs/DynamicAuth/issues/3941)) ([7475c46](https://github.com/dynamic-labs/DynamicAuth/commit/7475c465f5ddf9e27d0b05d23e58d9b474fa8fd4))
158
+ * add brand to zerodev object ([#3828](https://github.com/dynamic-labs/DynamicAuth/issues/3828)) ([81cb237](https://github.com/dynamic-labs/DynamicAuth/commit/81cb237df4def8e1c53b4ae145afafccf3b04683))
159
+ * add spriteId to zerodev ([#3829](https://github.com/dynamic-labs/DynamicAuth/issues/3829)) ([6b87c5c](https://github.com/dynamic-labs/DynamicAuth/commit/6b87c5c3d5869f6cd15a7534fb0260932845fbb1))
160
+ * allow metadata to be updated in updateUser hook ([#3928](https://github.com/dynamic-labs/DynamicAuth/issues/3928)) ([4f39fbd](https://github.com/dynamic-labs/DynamicAuth/commit/4f39fbd757b4e816dd60651252575c1f7e4d80aa))
161
+ * blocto flow connect only infinite recursion ([#3883](https://github.com/dynamic-labs/DynamicAuth/issues/3883)) ([6c6f5ba](https://github.com/dynamic-labs/DynamicAuth/commit/6c6f5ba5dc0657cc7ffdc82a4ea7935f65686088))
162
+ * clear project settings on page refresh ([#3826](https://github.com/dynamic-labs/DynamicAuth/issues/3826)) ([da5b8f0](https://github.com/dynamic-labs/DynamicAuth/commit/da5b8f0a99bf913ea11314954e5f08c2b019f50f))
163
+ * don't call computeConnectedStateForWallets too often to avoid infinite loops ([#3946](https://github.com/dynamic-labs/DynamicAuth/issues/3946)) ([de4e61a](https://github.com/dynamic-labs/DynamicAuth/commit/de4e61a3fcdc9c25cbe030c3c25cbc2c04929a93))
164
+ * don't call disconnect multiple times ([#3940](https://github.com/dynamic-labs/DynamicAuth/issues/3940)) ([3ea8623](https://github.com/dynamic-labs/DynamicAuth/commit/3ea86233d8d07dfb3c751a5fec45d5df84e9e143))
165
+ * **embedded wallet:** stop overriding primary wallet selection ([#3796](https://github.com/dynamic-labs/DynamicAuth/issues/3796)) ([75b81e7](https://github.com/dynamic-labs/DynamicAuth/commit/75b81e74d472ce8cc493646b441d2b4fe3962373))
166
+ * exodusevm wallet connect and mobile deep linking ([#3855](https://github.com/dynamic-labs/DynamicAuth/issues/3855)) ([cf0b3f0](https://github.com/dynamic-labs/DynamicAuth/commit/cf0b3f077f935eab32ce45947f62e73342d6c169))
167
+ * handle errors properly when engaging captcha ([#3896](https://github.com/dynamic-labs/DynamicAuth/issues/3896)) ([2596315](https://github.com/dynamic-labs/DynamicAuth/commit/25963153d699b26c6e04ea38b267446d3a3af13b))
168
+ * null safe check to window object ([#3882](https://github.com/dynamic-labs/DynamicAuth/issues/3882)) ([8856b5a](https://github.com/dynamic-labs/DynamicAuth/commit/8856b5ae40d43285eac667401387971b9e3f077d))
169
+ * pass correct wallet connector onLinkSuccess ([#3904](https://github.com/dynamic-labs/DynamicAuth/issues/3904)) ([79cca69](https://github.com/dynamic-labs/DynamicAuth/commit/79cca69ed53a5ef2c4e4d712ce0934e1a4c11459))
170
+ * remove extra captcha context provider instantiation causing unecessary rerenderings ([#3914](https://github.com/dynamic-labs/DynamicAuth/issues/3914)) ([14120a6](https://github.com/dynamic-labs/DynamicAuth/commit/14120a6ac0415f9a59608b376e88de6c729d4e5d))
171
+ * remove the coming soon label ([#3860](https://github.com/dynamic-labs/DynamicAuth/issues/3860)) ([1effb7f](https://github.com/dynamic-labs/DynamicAuth/commit/1effb7f124bda66aae3e8991b5386a1cee28fd99))
172
+ * Revert "chore: fix vite build ([#3849](https://github.com/dynamic-labs/DynamicAuth/issues/3849))" ([#3870](https://github.com/dynamic-labs/DynamicAuth/issues/3870)) ([13bc424](https://github.com/dynamic-labs/DynamicAuth/commit/13bc42483bcb9338babd46eae00988acada83578))
173
+ * **single-wallet:** prompt user to select correct wallet ([#3742](https://github.com/dynamic-labs/DynamicAuth/issues/3742)) ([ccfdd3c](https://github.com/dynamic-labs/DynamicAuth/commit/ccfdd3cc6a4ac7f3b1ea13be92e58982ecfb1c59))
174
+ * update walletconnect.json and walletconnect source schema ([#3854](https://github.com/dynamic-labs/DynamicAuth/issues/3854)) ([88ee546](https://github.com/dynamic-labs/DynamicAuth/commit/88ee5468db0130b19c6637a5632e64e0bb5197ba))
175
+ * useEmailProvider not checking for enabled providers properly ([7c16edc](https://github.com/dynamic-labs/DynamicAuth/commit/7c16edc3785ba10d69762b174f054b0d10b8a072))
176
+ * **wagmi:** ensure chain is defined on wallet client ([#3888](https://github.com/dynamic-labs/DynamicAuth/issues/3888)) ([0e145f6](https://github.com/dynamic-labs/DynamicAuth/commit/0e145f6ac42f55df7a020716d4ddc023554d72f9))
177
+
2
178
  ## [1.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0...v1.0.0-alpha.0) (2023-10-31)
3
179
 
4
180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/ethereum",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -29,15 +29,15 @@
29
29
  "@coinbase/wallet-sdk": "3.7.2",
30
30
  "@walletconnect/client": "1.8.0",
31
31
  "@walletconnect/ethereum-provider": "1.8.0",
32
- "@walletconnect/universal-provider": "2.10.1",
32
+ "@walletconnect/universal-provider": "2.10.6",
33
33
  "eventemitter3": "5.0.1",
34
34
  "buffer": "6.0.3",
35
- "@dynamic-labs/rpc-providers": "1.0.0-alpha.0",
36
- "@dynamic-labs/turnkey": "1.0.0-alpha.0",
37
- "@dynamic-labs/types": "1.0.0-alpha.0",
38
- "@dynamic-labs/utils": "1.0.0-alpha.0",
39
- "@dynamic-labs/wallet-book": "1.0.0-alpha.0",
40
- "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.0",
35
+ "@dynamic-labs/rpc-providers": "1.0.0-alpha.10",
36
+ "@dynamic-labs/turnkey": "1.0.0-alpha.10",
37
+ "@dynamic-labs/types": "1.0.0-alpha.10",
38
+ "@dynamic-labs/utils": "1.0.0-alpha.10",
39
+ "@dynamic-labs/wallet-book": "1.0.0-alpha.10",
40
+ "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.10",
41
41
  "stream": "0.0.2"
42
42
  },
43
43
  "peerDependencies": {
@@ -144,11 +144,12 @@ class EthWalletConnector extends walletConnectorCore.WalletConnectorBase {
144
144
  return [];
145
145
  return utils.retryableFn(provider.getAddresses, {
146
146
  fallbackValue: [],
147
+ timeoutMs: 300,
147
148
  });
148
149
  });
149
150
  }
150
151
  providerSwitchNetwork({ network, provider, }) {
151
- var _a, _b, _c;
152
+ var _a, _b, _c, _d;
152
153
  return _tslib.__awaiter(this, void 0, void 0, function* () {
153
154
  const { chainId } = network;
154
155
  const currentNetworkId = yield this.getNetwork();
@@ -162,18 +163,19 @@ class EthWalletConnector extends walletConnectorCore.WalletConnectorBase {
162
163
  return yield provider.switchChain(utils.getOrMapViemChain(network));
163
164
  }
164
165
  catch (error) {
165
- if (((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('rejected')) ||
166
- (typeof error === 'string' && error.includes('rejected'))) {
167
- throw new utils.DynamicError("User rejected the wallet's request to switch network");
168
- }
169
- else if (error.code === 4902 ||
170
- error.message.includes('Unrecognized chain') ||
166
+ // we need to check for unrecognized chain error first because it also contains 'rejected' in message
167
+ if (error.code === 4902 ||
168
+ ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Unrecognized chain')) ||
171
169
  // https://github.com/MetaMask/metamask-mobile/issues/3312#issuecomment-1065923294
172
- ((_c = (_b = error === null || error === void 0 ? void 0 : error.data) === null || _b === void 0 ? void 0 : _b.orginalError) === null || _c === void 0 ? void 0 : _c.code) === 4902) {
170
+ ((_c = (_b = error.data) === null || _b === void 0 ? void 0 : _b.orginalError) === null || _c === void 0 ? void 0 : _c.code) === 4902) {
173
171
  // error code indicates the chain has not been added yet
174
172
  // https://docs.metamask.io/guide/rpc-api.html#usage-with-wallet-switchethereumchain
175
173
  return this.providerAddNetwork({ network, provider });
176
174
  }
175
+ else if (((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('rejected')) ||
176
+ (typeof error === 'string' && error.includes('rejected'))) {
177
+ throw new utils.DynamicError("User rejected the wallet's request to switch network");
178
+ }
177
179
  else {
178
180
  throw error;
179
181
  }
@@ -41,20 +41,20 @@ export declare abstract class EthWalletConnector extends WalletConnectorBase {
41
41
  type: string;
42
42
  uid: string;
43
43
  addChain: (args: import("viem").AddChainParameters) => Promise<void>;
44
- deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends import("viem").Chain | undefined>(args: import("viem").DeployContractParameters<TAbi, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride>) => Promise<`0x${string}`>;
44
+ deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends import("viem").Chain | undefined = undefined>(args: import("viem").DeployContractParameters<TAbi, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride>) => Promise<`0x${string}`>;
45
45
  getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
46
46
  getChainId: () => Promise<number>;
47
47
  getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
48
- prepareTransactionRequest: <TChainOverride_1 extends import("viem").Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
48
+ prepareTransactionRequest: <TChainOverride_1 extends import("viem").Chain | undefined = undefined>(args: import("viem").PrepareTransactionRequestParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
49
49
  requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
50
50
  requestPermissions: (args: {
51
51
  [x: string]: Record<string, any>;
52
52
  eth_accounts: Record<string, any>;
53
53
  }) => Promise<import("viem").RequestPermissionsReturnType>;
54
54
  sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
55
- sendTransaction: <TChainOverride_2 extends import("viem").Chain | undefined>(args: import("viem").SendTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_2>) => Promise<`0x${string}`>;
55
+ sendTransaction: <TChainOverride_2 extends import("viem").Chain | undefined = undefined>(args: import("viem").SendTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_2>) => Promise<`0x${string}`>;
56
56
  signMessage: (args: import("viem").SignMessageParameters<import("viem").Account | undefined>) => Promise<`0x${string}`>;
57
- signTransaction: <TChainOverride_3 extends import("viem").Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_3>) => Promise<`0x${string}`>;
57
+ signTransaction: <TChainOverride_3 extends import("viem").Chain | undefined = undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_3>) => Promise<`0x${string}`>;
58
58
  signTypedData: <const TTypedData extends {
59
59
  [x: string]: readonly import("viem").TypedDataParameter[];
60
60
  [x: `string[${string}]`]: undefined;
@@ -77,8 +77,8 @@ export declare abstract class EthWalletConnector extends WalletConnectorBase {
77
77
  [x: `bytes21[${string}]`]: undefined;
78
78
  [x: `bytes20[${string}]`]: undefined;
79
79
  [x: `bytes19[${string}]`]: undefined;
80
- [x: `bytes18[${string}]`]: undefined;
81
80
  [x: `bytes2[${string}]`]: undefined;
81
+ [x: `bytes18[${string}]`]: undefined;
82
82
  [x: `bytes17[${string}]`]: undefined;
83
83
  [x: `bytes16[${string}]`]: undefined;
84
84
  [x: `bytes15[${string}]`]: undefined;
@@ -179,8 +179,8 @@ export declare abstract class EthWalletConnector extends WalletConnectorBase {
179
179
  bytes21?: undefined;
180
180
  bytes20?: undefined;
181
181
  bytes19?: undefined;
182
- bytes18?: undefined;
183
182
  bytes2?: undefined;
183
+ bytes18?: undefined;
184
184
  bytes17?: undefined;
185
185
  bytes16?: undefined;
186
186
  bytes15?: undefined;
@@ -265,7 +265,7 @@ export declare abstract class EthWalletConnector extends WalletConnectorBase {
265
265
  }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, import("viem").Account | undefined>) => Promise<`0x${string}`>;
266
266
  switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
267
267
  watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
268
- writeContract: <const TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_4 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_4>) => Promise<`0x${string}`>;
268
+ writeContract: <const TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_4 extends import("viem").Chain | undefined = undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_4>) => Promise<`0x${string}`>;
269
269
  extend: <const client extends {
270
270
  [x: string]: unknown;
271
271
  account?: undefined;
@@ -279,7 +279,7 @@ export declare abstract class EthWalletConnector extends WalletConnectorBase {
279
279
  transport?: undefined;
280
280
  type?: undefined;
281
281
  uid?: undefined;
282
- }>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
282
+ } & Partial<Pick<import("viem").PublicActions, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
283
283
  } | undefined>;
284
284
  getBalance(): Promise<string | undefined>;
285
285
  supportsNetworkSwitching(): boolean;
@@ -140,11 +140,12 @@ class EthWalletConnector extends WalletConnectorBase {
140
140
  return [];
141
141
  return retryableFn(provider.getAddresses, {
142
142
  fallbackValue: [],
143
+ timeoutMs: 300,
143
144
  });
144
145
  });
145
146
  }
146
147
  providerSwitchNetwork({ network, provider, }) {
147
- var _a, _b, _c;
148
+ var _a, _b, _c, _d;
148
149
  return __awaiter(this, void 0, void 0, function* () {
149
150
  const { chainId } = network;
150
151
  const currentNetworkId = yield this.getNetwork();
@@ -158,18 +159,19 @@ class EthWalletConnector extends WalletConnectorBase {
158
159
  return yield provider.switchChain(getOrMapViemChain(network));
159
160
  }
160
161
  catch (error) {
161
- if (((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('rejected')) ||
162
- (typeof error === 'string' && error.includes('rejected'))) {
163
- throw new DynamicError("User rejected the wallet's request to switch network");
164
- }
165
- else if (error.code === 4902 ||
166
- error.message.includes('Unrecognized chain') ||
162
+ // we need to check for unrecognized chain error first because it also contains 'rejected' in message
163
+ if (error.code === 4902 ||
164
+ ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Unrecognized chain')) ||
167
165
  // https://github.com/MetaMask/metamask-mobile/issues/3312#issuecomment-1065923294
168
- ((_c = (_b = error === null || error === void 0 ? void 0 : error.data) === null || _b === void 0 ? void 0 : _b.orginalError) === null || _c === void 0 ? void 0 : _c.code) === 4902) {
166
+ ((_c = (_b = error.data) === null || _b === void 0 ? void 0 : _b.orginalError) === null || _c === void 0 ? void 0 : _c.code) === 4902) {
169
167
  // error code indicates the chain has not been added yet
170
168
  // https://docs.metamask.io/guide/rpc-api.html#usage-with-wallet-switchethereumchain
171
169
  return this.providerAddNetwork({ network, provider });
172
170
  }
171
+ else if (((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('rejected')) ||
172
+ (typeof error === 'string' && error.includes('rejected'))) {
173
+ throw new DynamicError("User rejected the wallet's request to switch network");
174
+ }
173
175
  else {
174
176
  throw error;
175
177
  }
@@ -30,20 +30,20 @@ export declare class Coinbase extends EthWalletConnector {
30
30
  type: string;
31
31
  uid: string;
32
32
  addChain: (args: import("viem").AddChainParameters) => Promise<void>;
33
- deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends import("viem").Chain | undefined>(args: import("viem").DeployContractParameters<TAbi, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride>) => Promise<`0x${string}`>;
33
+ deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends import("viem").Chain | undefined = undefined>(args: import("viem").DeployContractParameters<TAbi, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride>) => Promise<`0x${string}`>;
34
34
  getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
35
35
  getChainId: () => Promise<number>;
36
36
  getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
37
- prepareTransactionRequest: <TChainOverride_1 extends import("viem").Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
37
+ prepareTransactionRequest: <TChainOverride_1 extends import("viem").Chain | undefined = undefined>(args: import("viem").PrepareTransactionRequestParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
38
38
  requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
39
39
  requestPermissions: (args: {
40
40
  [x: string]: Record<string, any>;
41
41
  eth_accounts: Record<string, any>;
42
42
  }) => Promise<import("viem").RequestPermissionsReturnType>;
43
43
  sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
44
- sendTransaction: <TChainOverride_2 extends import("viem").Chain | undefined>(args: import("viem").SendTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_2>) => Promise<`0x${string}`>;
44
+ sendTransaction: <TChainOverride_2 extends import("viem").Chain | undefined = undefined>(args: import("viem").SendTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_2>) => Promise<`0x${string}`>;
45
45
  signMessage: (args: import("viem").SignMessageParameters<import("viem").Account | undefined>) => Promise<`0x${string}`>;
46
- signTransaction: <TChainOverride_3 extends import("viem").Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_3>) => Promise<`0x${string}`>;
46
+ signTransaction: <TChainOverride_3 extends import("viem").Chain | undefined = undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_3>) => Promise<`0x${string}`>;
47
47
  signTypedData: <const TTypedData extends {
48
48
  [x: string]: readonly import("viem").TypedDataParameter[];
49
49
  [x: `string[${string}]`]: undefined;
@@ -254,7 +254,7 @@ export declare class Coinbase extends EthWalletConnector {
254
254
  }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, import("viem").Account | undefined>) => Promise<`0x${string}`>;
255
255
  switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
256
256
  watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
257
- writeContract: <const TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_4 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_4>) => Promise<`0x${string}`>;
257
+ writeContract: <const TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_4 extends import("viem").Chain | undefined = undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_4>) => Promise<`0x${string}`>;
258
258
  extend: <const client extends {
259
259
  [x: string]: unknown;
260
260
  account?: undefined;
@@ -268,7 +268,7 @@ export declare class Coinbase extends EthWalletConnector {
268
268
  transport?: undefined;
269
269
  type?: undefined;
270
270
  uid?: undefined;
271
- }>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
271
+ } & Partial<Pick<import("viem").PublicActions, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
272
272
  } | {
273
273
  account: undefined;
274
274
  batch?: {
@@ -287,20 +287,20 @@ export declare class Coinbase extends EthWalletConnector {
287
287
  type: string;
288
288
  uid: string;
289
289
  addChain: (args: import("viem").AddChainParameters) => Promise<void>;
290
- deployContract: <const TAbi_2 extends import("viem").Abi | readonly unknown[], TChainOverride_5 extends import("viem").Chain | undefined>(args: import("viem").DeployContractParameters<TAbi_2, undefined, undefined, TChainOverride_5>) => Promise<`0x${string}`>;
290
+ deployContract: <const TAbi_2 extends import("viem").Abi | readonly unknown[], TChainOverride_5 extends import("viem").Chain | undefined = undefined>(args: import("viem").DeployContractParameters<TAbi_2, undefined, undefined, TChainOverride_5>) => Promise<`0x${string}`>;
291
291
  getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
292
292
  getChainId: () => Promise<number>;
293
293
  getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
294
- prepareTransactionRequest: <TChainOverride_6 extends import("viem").Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<undefined, undefined, TChainOverride_6>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
294
+ prepareTransactionRequest: <TChainOverride_6 extends import("viem").Chain | undefined = undefined>(args: import("viem").PrepareTransactionRequestParameters<undefined, undefined, TChainOverride_6>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
295
295
  requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
296
296
  requestPermissions: (args: {
297
297
  [x: string]: Record<string, any>;
298
298
  eth_accounts: Record<string, any>;
299
299
  }) => Promise<import("viem").RequestPermissionsReturnType>;
300
300
  sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
301
- sendTransaction: <TChainOverride_7 extends import("viem").Chain | undefined>(args: import("viem").SendTransactionParameters<undefined, undefined, TChainOverride_7>) => Promise<`0x${string}`>;
301
+ sendTransaction: <TChainOverride_7 extends import("viem").Chain | undefined = undefined>(args: import("viem").SendTransactionParameters<undefined, undefined, TChainOverride_7>) => Promise<`0x${string}`>;
302
302
  signMessage: (args: import("viem").SignMessageParameters<undefined>) => Promise<`0x${string}`>;
303
- signTransaction: <TChainOverride_8 extends import("viem").Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<undefined, undefined, TChainOverride_8>) => Promise<`0x${string}`>;
303
+ signTransaction: <TChainOverride_8 extends import("viem").Chain | undefined = undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<undefined, undefined, TChainOverride_8>) => Promise<`0x${string}`>;
304
304
  signTypedData: <const TTypedData_1 extends {
305
305
  [x: string]: readonly import("viem").TypedDataParameter[];
306
306
  [x: `string[${string}]`]: undefined;
@@ -511,7 +511,7 @@ export declare class Coinbase extends EthWalletConnector {
511
511
  }, TPrimaryType_1 extends string>(args: import("viem").SignTypedDataParameters<TTypedData_1, TPrimaryType_1, undefined>) => Promise<`0x${string}`>;
512
512
  switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
513
513
  watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
514
- writeContract: <const TAbi_3 extends import("viem").Abi | readonly unknown[], TFunctionName_1 extends string, TChainOverride_9 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_3, TFunctionName_1, undefined, undefined, TChainOverride_9>) => Promise<`0x${string}`>;
514
+ writeContract: <const TAbi_3 extends import("viem").Abi | readonly unknown[], TFunctionName_1 extends string, TChainOverride_9 extends import("viem").Chain | undefined = undefined>(args: import("viem").WriteContractParameters<TAbi_3, TFunctionName_1, undefined, undefined, TChainOverride_9>) => Promise<`0x${string}`>;
515
515
  extend: <const client_1 extends {
516
516
  [x: string]: unknown;
517
517
  account?: undefined;
@@ -525,7 +525,7 @@ export declare class Coinbase extends EthWalletConnector {
525
525
  transport?: undefined;
526
526
  type?: undefined;
527
527
  uid?: undefined;
528
- }>(fn: (client: import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<undefined, undefined>>) => client_1) => import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, { [K_1 in keyof client_1]: client_1[K_1]; } & import("viem").WalletActions<undefined, undefined>>;
528
+ } & Partial<Pick<import("viem").PublicActions, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<undefined, undefined>>) => client_1) => import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, { [K_1 in keyof client_1]: client_1[K_1]; } & import("viem").WalletActions<undefined, undefined>>;
529
529
  } | undefined;
530
530
  isInstalledOnBrowser(): boolean;
531
531
  fetchPublicAddress(opts?: FetchPublicAddressOpts): Promise<string | undefined>;
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const isEip9693Event = (event) => event.type === 'eip6963:announceProvider' &&
6
+ event.detail !== undefined;
7
+ class Eip6963Provider {
8
+ constructor() {
9
+ this.providers = [];
10
+ }
11
+ registerProviders() {
12
+ if (typeof window === 'undefined') {
13
+ return;
14
+ }
15
+ window.addEventListener('eip6963:announceProvider', (event) => {
16
+ if (!isEip9693Event(event)) {
17
+ return;
18
+ }
19
+ this.providers.push(event.detail);
20
+ });
21
+ window.dispatchEvent(new Event('eip6963:requestProvider'));
22
+ }
23
+ }
24
+ class Eip6963ProviderSingleton {
25
+ constructor() {
26
+ this.eip6963Provider = new Eip6963Provider();
27
+ }
28
+ static get() {
29
+ var _a;
30
+ if (!((_a = Eip6963ProviderSingleton.instance) === null || _a === void 0 ? void 0 : _a.eip6963Provider)) {
31
+ Eip6963ProviderSingleton.instance = new Eip6963ProviderSingleton();
32
+ Eip6963ProviderSingleton.instance.eip6963Provider.registerProviders();
33
+ }
34
+ return Eip6963ProviderSingleton.instance.eip6963Provider;
35
+ }
36
+ }
37
+
38
+ exports.Eip6963Provider = Eip6963Provider;
39
+ exports.Eip6963ProviderSingleton = Eip6963ProviderSingleton;
@@ -0,0 +1,25 @@
1
+ import { IEthereum } from './types';
2
+ /**
3
+ * Represents the assets needed to display a wallet
4
+ */
5
+ type Eip6963ProviderInfo = {
6
+ uuid: string;
7
+ name: string;
8
+ icon: string;
9
+ rdns: string;
10
+ };
11
+ type Eip6963ProviderDetail = {
12
+ info: Eip6963ProviderInfo;
13
+ provider: IEthereum;
14
+ };
15
+ export declare class Eip6963Provider {
16
+ providers: Eip6963ProviderDetail[];
17
+ registerProviders(): void;
18
+ }
19
+ export declare class Eip6963ProviderSingleton {
20
+ readonly eip6963Provider: Eip6963Provider;
21
+ private constructor();
22
+ private static instance;
23
+ static get(): Eip6963Provider;
24
+ }
25
+ export {};
@@ -0,0 +1,34 @@
1
+ const isEip9693Event = (event) => event.type === 'eip6963:announceProvider' &&
2
+ event.detail !== undefined;
3
+ class Eip6963Provider {
4
+ constructor() {
5
+ this.providers = [];
6
+ }
7
+ registerProviders() {
8
+ if (typeof window === 'undefined') {
9
+ return;
10
+ }
11
+ window.addEventListener('eip6963:announceProvider', (event) => {
12
+ if (!isEip9693Event(event)) {
13
+ return;
14
+ }
15
+ this.providers.push(event.detail);
16
+ });
17
+ window.dispatchEvent(new Event('eip6963:requestProvider'));
18
+ }
19
+ }
20
+ class Eip6963ProviderSingleton {
21
+ constructor() {
22
+ this.eip6963Provider = new Eip6963Provider();
23
+ }
24
+ static get() {
25
+ var _a;
26
+ if (!((_a = Eip6963ProviderSingleton.instance) === null || _a === void 0 ? void 0 : _a.eip6963Provider)) {
27
+ Eip6963ProviderSingleton.instance = new Eip6963ProviderSingleton();
28
+ Eip6963ProviderSingleton.instance.eip6963Provider.registerProviders();
29
+ }
30
+ return Eip6963ProviderSingleton.instance.eip6963Provider;
31
+ }
32
+ }
33
+
34
+ export { Eip6963Provider, Eip6963ProviderSingleton };