@coinbase/cdp-core 0.0.54 → 0.0.55
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/dist/esm/index.native125.js +2 -2
- package/dist/esm/index.native128.js +1 -1
- package/dist/esm/index.native131.js +19 -77
- package/dist/esm/index.native132.js +10 -4
- package/dist/esm/index.native133.js +19 -20
- package/dist/esm/index.native134.js +93 -9
- package/dist/esm/index.native135.js +19 -18
- package/dist/esm/index.native136.js +105 -81
- package/dist/esm/index.native137.js +78 -20
- package/dist/esm/index.native138.js +4 -118
- package/dist/esm/index.native143.js +7 -38
- package/dist/esm/index.native145.js +375 -67
- package/dist/esm/index.native146.js +832 -34
- package/dist/esm/index.native147.js +38 -20
- package/dist/esm/index.native148.js +2 -8
- package/dist/esm/index.native149.js +70 -2
- package/dist/esm/index.native150.js +30 -373
- package/dist/esm/index.native151.js +20 -832
- package/dist/esm/index.native154.js +1 -1
- package/dist/esm/index.native160.js +1 -1
- package/dist/esm/index.native162.js +2 -2
- package/dist/esm/index.native163.js +2 -2
- package/dist/esm/index.native164.js +2 -2
- package/dist/esm/index.native25.js +1 -1
- package/dist/esm/index.native35.js +3 -3
- package/dist/esm/index.native41.js +3 -3
- package/dist/esm/index.native46.js +13 -373
- package/dist/esm/index.native47.js +22 -28
- package/dist/esm/index.native48.js +50 -28
- package/dist/esm/index.native49.js +373 -13
- package/dist/esm/index.native50.js +28 -22
- package/dist/esm/index.native51.js +28 -50
- package/dist/esm/index.native96.js +7 -7
- package/dist/esm/index.web100.js +4 -8
- package/dist/esm/index.web101.js +2 -8
- package/dist/esm/index.web102.js +4 -71
- package/dist/esm/index.web103.js +12 -12
- package/dist/esm/index.web104.js +7 -3
- package/dist/esm/index.web105.js +3 -4
- package/dist/esm/index.web106.js +19 -4
- package/dist/esm/index.web107.js +8 -4
- package/dist/esm/index.web108.js +7 -19
- package/dist/esm/index.web109.js +66 -47
- package/dist/esm/index.web110.js +18 -17
- package/dist/esm/index.web111.js +3 -20
- package/dist/esm/index.web112.js +4 -8
- package/dist/esm/index.web113.js +4 -30
- package/dist/esm/index.web114.js +4 -7
- package/dist/esm/index.web115.js +10 -11
- package/dist/esm/index.web116.js +52 -4
- package/dist/esm/index.web117.js +17 -54
- package/dist/esm/index.web118.js +20 -10
- package/dist/esm/index.web119.js +9 -2
- package/dist/esm/index.web120.js +30 -44
- package/dist/esm/index.web121.js +7 -13
- package/dist/esm/index.web122.js +21 -2
- package/dist/esm/index.web124.js +1 -1
- package/dist/esm/index.web131.js +20 -3
- package/dist/esm/index.web132.js +10 -2
- package/dist/esm/index.web133.js +18 -107
- package/dist/esm/index.web134.js +94 -2
- package/dist/esm/index.web135.js +20 -20
- package/dist/esm/index.web136.js +117 -9
- package/dist/esm/index.web137.js +2 -20
- package/dist/esm/index.web138.js +104 -89
- package/dist/esm/index.web139.js +2 -21
- package/dist/esm/index.web140.js +4 -118
- package/dist/esm/index.web141.js +1 -1
- package/dist/esm/index.web153.js +1 -1
- package/dist/esm/index.web158.js +1 -1
- package/dist/esm/index.web159.js +1 -1
- package/dist/esm/index.web34.js +3 -3
- package/dist/esm/index.web40.js +3 -3
- package/dist/esm/index.web45.js +13 -373
- package/dist/esm/index.web46.js +22 -28
- package/dist/esm/index.web47.js +50 -28
- package/dist/esm/index.web48.js +379 -2
- package/dist/esm/index.web49.js +2 -68
- package/dist/esm/index.web50.js +37 -336
- package/dist/esm/index.web51.js +360 -12
- package/dist/esm/index.web52.js +28 -22
- package/dist/esm/index.web53.js +28 -50
- package/dist/esm/index.web71.js +1 -1
- package/dist/esm/index.web95.js +54 -4
- package/dist/esm/index.web96.js +10 -18
- package/dist/esm/index.web97.js +2 -8
- package/dist/esm/index.web98.js +45 -4
- package/dist/esm/index.web99.js +13 -19
- package/dist/native/index.native125.js +2 -2
- package/dist/native/index.native128.js +1 -1
- package/dist/native/index.native131.js +19 -77
- package/dist/native/index.native132.js +10 -4
- package/dist/native/index.native133.js +19 -20
- package/dist/native/index.native134.js +93 -9
- package/dist/native/index.native135.js +19 -18
- package/dist/native/index.native136.js +105 -81
- package/dist/native/index.native137.js +78 -20
- package/dist/native/index.native138.js +4 -118
- package/dist/native/index.native143.js +7 -38
- package/dist/native/index.native145.js +375 -67
- package/dist/native/index.native146.js +832 -34
- package/dist/native/index.native147.js +38 -20
- package/dist/native/index.native148.js +2 -8
- package/dist/native/index.native149.js +70 -2
- package/dist/native/index.native150.js +30 -373
- package/dist/native/index.native151.js +20 -832
- package/dist/native/index.native154.js +1 -1
- package/dist/native/index.native160.js +1 -1
- package/dist/native/index.native162.js +2 -2
- package/dist/native/index.native163.js +2 -2
- package/dist/native/index.native164.js +2 -2
- package/dist/native/index.native25.js +1 -1
- package/dist/native/index.native35.js +3 -3
- package/dist/native/index.native41.js +3 -3
- package/dist/native/index.native46.js +13 -373
- package/dist/native/index.native47.js +22 -28
- package/dist/native/index.native48.js +50 -28
- package/dist/native/index.native49.js +373 -13
- package/dist/native/index.native50.js +28 -22
- package/dist/native/index.native51.js +28 -50
- package/dist/native/index.native96.js +7 -7
- package/dist/native-types/types.d.ts +3 -1
- package/dist/types/types.d.ts +3 -1
- package/dist/web/index.web100.js +4 -8
- package/dist/web/index.web101.js +2 -8
- package/dist/web/index.web102.js +4 -71
- package/dist/web/index.web103.js +12 -12
- package/dist/web/index.web104.js +7 -3
- package/dist/web/index.web105.js +3 -4
- package/dist/web/index.web106.js +19 -4
- package/dist/web/index.web107.js +8 -4
- package/dist/web/index.web108.js +7 -19
- package/dist/web/index.web109.js +66 -47
- package/dist/web/index.web110.js +18 -17
- package/dist/web/index.web111.js +3 -20
- package/dist/web/index.web112.js +4 -8
- package/dist/web/index.web113.js +4 -30
- package/dist/web/index.web114.js +4 -7
- package/dist/web/index.web115.js +10 -11
- package/dist/web/index.web116.js +52 -4
- package/dist/web/index.web117.js +17 -54
- package/dist/web/index.web118.js +20 -10
- package/dist/web/index.web119.js +9 -2
- package/dist/web/index.web120.js +30 -44
- package/dist/web/index.web121.js +7 -13
- package/dist/web/index.web122.js +21 -2
- package/dist/web/index.web124.js +1 -1
- package/dist/web/index.web131.js +20 -3
- package/dist/web/index.web132.js +10 -2
- package/dist/web/index.web133.js +18 -107
- package/dist/web/index.web134.js +94 -2
- package/dist/web/index.web135.js +20 -20
- package/dist/web/index.web136.js +117 -9
- package/dist/web/index.web137.js +2 -20
- package/dist/web/index.web138.js +104 -89
- package/dist/web/index.web139.js +2 -21
- package/dist/web/index.web140.js +4 -118
- package/dist/web/index.web141.js +1 -1
- package/dist/web/index.web153.js +1 -1
- package/dist/web/index.web158.js +1 -1
- package/dist/web/index.web159.js +1 -1
- package/dist/web/index.web34.js +3 -3
- package/dist/web/index.web40.js +3 -3
- package/dist/web/index.web45.js +13 -373
- package/dist/web/index.web46.js +22 -28
- package/dist/web/index.web47.js +50 -28
- package/dist/web/index.web48.js +379 -2
- package/dist/web/index.web49.js +2 -68
- package/dist/web/index.web50.js +37 -336
- package/dist/web/index.web51.js +360 -12
- package/dist/web/index.web52.js +28 -22
- package/dist/web/index.web53.js +28 -50
- package/dist/web/index.web71.js +1 -1
- package/dist/web/index.web95.js +54 -4
- package/dist/web/index.web96.js +10 -18
- package/dist/web/index.web97.js +2 -8
- package/dist/web/index.web98.js +45 -4
- package/dist/web/index.web99.js +13 -19
- package/dist/web-types/types.d.ts +3 -1
- package/package.json +2 -2
|
@@ -1,19 +1,379 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import "./index.native54.js";
|
|
2
|
+
import { BaseError as P } from "./index.native55.js";
|
|
3
|
+
import { parse as y, parseError as j, InternalError as g } from "./index.native56.js";
|
|
4
|
+
class u extends Error {
|
|
5
|
+
constructor(e, t) {
|
|
6
|
+
super(t), Object.defineProperty(this, "name", {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
configurable: !0,
|
|
9
|
+
writable: !0,
|
|
10
|
+
value: "ProviderRpcError"
|
|
11
|
+
}), Object.defineProperty(this, "code", {
|
|
12
|
+
enumerable: !0,
|
|
13
|
+
configurable: !0,
|
|
14
|
+
writable: !0,
|
|
15
|
+
value: void 0
|
|
16
|
+
}), Object.defineProperty(this, "details", {
|
|
17
|
+
enumerable: !0,
|
|
18
|
+
configurable: !0,
|
|
19
|
+
writable: !0,
|
|
20
|
+
value: void 0
|
|
21
|
+
}), this.code = e, this.details = t;
|
|
6
22
|
}
|
|
7
|
-
|
|
8
|
-
|
|
23
|
+
}
|
|
24
|
+
class n extends u {
|
|
25
|
+
constructor({ message: e = "The user rejected the request." } = {}) {
|
|
26
|
+
super(4001, e), Object.defineProperty(this, "code", {
|
|
27
|
+
enumerable: !0,
|
|
28
|
+
configurable: !0,
|
|
29
|
+
writable: !0,
|
|
30
|
+
value: 4001
|
|
31
|
+
}), Object.defineProperty(this, "name", {
|
|
32
|
+
enumerable: !0,
|
|
33
|
+
configurable: !0,
|
|
34
|
+
writable: !0,
|
|
35
|
+
value: "Provider.UserRejectedRequestError"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
Object.defineProperty(n, "code", {
|
|
40
|
+
enumerable: !0,
|
|
41
|
+
configurable: !0,
|
|
42
|
+
writable: !0,
|
|
43
|
+
value: 4001
|
|
44
|
+
});
|
|
45
|
+
class a extends u {
|
|
46
|
+
constructor({ message: e = "The requested method and/or account has not been authorized by the user." } = {}) {
|
|
47
|
+
super(4100, e), Object.defineProperty(this, "code", {
|
|
48
|
+
enumerable: !0,
|
|
49
|
+
configurable: !0,
|
|
50
|
+
writable: !0,
|
|
51
|
+
value: 4100
|
|
52
|
+
}), Object.defineProperty(this, "name", {
|
|
53
|
+
enumerable: !0,
|
|
54
|
+
configurable: !0,
|
|
55
|
+
writable: !0,
|
|
56
|
+
value: "Provider.UnauthorizedError"
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
Object.defineProperty(a, "code", {
|
|
61
|
+
enumerable: !0,
|
|
62
|
+
configurable: !0,
|
|
63
|
+
writable: !0,
|
|
64
|
+
value: 4100
|
|
65
|
+
});
|
|
66
|
+
class i extends u {
|
|
67
|
+
constructor({ message: e = "The provider does not support the requested method." } = {}) {
|
|
68
|
+
super(4200, e), Object.defineProperty(this, "code", {
|
|
69
|
+
enumerable: !0,
|
|
70
|
+
configurable: !0,
|
|
71
|
+
writable: !0,
|
|
72
|
+
value: 4200
|
|
73
|
+
}), Object.defineProperty(this, "name", {
|
|
74
|
+
enumerable: !0,
|
|
75
|
+
configurable: !0,
|
|
76
|
+
writable: !0,
|
|
77
|
+
value: "Provider.UnsupportedMethodError"
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
Object.defineProperty(i, "code", {
|
|
82
|
+
enumerable: !0,
|
|
83
|
+
configurable: !0,
|
|
84
|
+
writable: !0,
|
|
85
|
+
value: 4200
|
|
86
|
+
});
|
|
87
|
+
class c extends u {
|
|
88
|
+
constructor({ message: e = "The provider is disconnected from all chains." } = {}) {
|
|
89
|
+
super(4900, e), Object.defineProperty(this, "code", {
|
|
90
|
+
enumerable: !0,
|
|
91
|
+
configurable: !0,
|
|
92
|
+
writable: !0,
|
|
93
|
+
value: 4900
|
|
94
|
+
}), Object.defineProperty(this, "name", {
|
|
95
|
+
enumerable: !0,
|
|
96
|
+
configurable: !0,
|
|
97
|
+
writable: !0,
|
|
98
|
+
value: "Provider.DisconnectedError"
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
Object.defineProperty(c, "code", {
|
|
103
|
+
enumerable: !0,
|
|
104
|
+
configurable: !0,
|
|
105
|
+
writable: !0,
|
|
106
|
+
value: 4900
|
|
107
|
+
});
|
|
108
|
+
class l extends u {
|
|
109
|
+
constructor({ message: e = "The provider is not connected to the requested chain." } = {}) {
|
|
110
|
+
super(4901, e), Object.defineProperty(this, "code", {
|
|
111
|
+
enumerable: !0,
|
|
112
|
+
configurable: !0,
|
|
113
|
+
writable: !0,
|
|
114
|
+
value: 4901
|
|
115
|
+
}), Object.defineProperty(this, "name", {
|
|
116
|
+
enumerable: !0,
|
|
117
|
+
configurable: !0,
|
|
118
|
+
writable: !0,
|
|
119
|
+
value: "Provider.ChainDisconnectedError"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
Object.defineProperty(l, "code", {
|
|
124
|
+
enumerable: !0,
|
|
125
|
+
configurable: !0,
|
|
126
|
+
writable: !0,
|
|
127
|
+
value: 4901
|
|
128
|
+
});
|
|
129
|
+
class d extends u {
|
|
130
|
+
constructor({ message: e = "An error occurred when attempting to switch chain." } = {}) {
|
|
131
|
+
super(4902, e), Object.defineProperty(this, "code", {
|
|
132
|
+
enumerable: !0,
|
|
133
|
+
configurable: !0,
|
|
134
|
+
writable: !0,
|
|
135
|
+
value: 4902
|
|
136
|
+
}), Object.defineProperty(this, "name", {
|
|
137
|
+
enumerable: !0,
|
|
138
|
+
configurable: !0,
|
|
139
|
+
writable: !0,
|
|
140
|
+
value: "Provider.SwitchChainError"
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
Object.defineProperty(d, "code", {
|
|
145
|
+
enumerable: !0,
|
|
146
|
+
configurable: !0,
|
|
147
|
+
writable: !0,
|
|
148
|
+
value: 4902
|
|
149
|
+
});
|
|
150
|
+
class b extends u {
|
|
151
|
+
constructor({ message: e = "This Wallet does not support a capability that was not marked as optional." } = {}) {
|
|
152
|
+
super(5700, e), Object.defineProperty(this, "code", {
|
|
153
|
+
enumerable: !0,
|
|
154
|
+
configurable: !0,
|
|
155
|
+
writable: !0,
|
|
156
|
+
value: 5700
|
|
157
|
+
}), Object.defineProperty(this, "name", {
|
|
158
|
+
enumerable: !0,
|
|
159
|
+
configurable: !0,
|
|
160
|
+
writable: !0,
|
|
161
|
+
value: "Provider.UnsupportedNonOptionalCapabilityError"
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
Object.defineProperty(b, "code", {
|
|
166
|
+
enumerable: !0,
|
|
167
|
+
configurable: !0,
|
|
168
|
+
writable: !0,
|
|
169
|
+
value: 5700
|
|
170
|
+
});
|
|
171
|
+
class s extends u {
|
|
172
|
+
constructor({ message: e = "This Wallet does not support the requested chain ID." } = {}) {
|
|
173
|
+
super(5710, e), Object.defineProperty(this, "code", {
|
|
174
|
+
enumerable: !0,
|
|
175
|
+
configurable: !0,
|
|
176
|
+
writable: !0,
|
|
177
|
+
value: 5710
|
|
178
|
+
}), Object.defineProperty(this, "name", {
|
|
179
|
+
enumerable: !0,
|
|
180
|
+
configurable: !0,
|
|
181
|
+
writable: !0,
|
|
182
|
+
value: "Provider.UnsupportedChainIdError"
|
|
183
|
+
});
|
|
9
184
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
185
|
+
}
|
|
186
|
+
Object.defineProperty(s, "code", {
|
|
187
|
+
enumerable: !0,
|
|
188
|
+
configurable: !0,
|
|
189
|
+
writable: !0,
|
|
190
|
+
value: 5710
|
|
191
|
+
});
|
|
192
|
+
class f extends u {
|
|
193
|
+
constructor({ message: e = "There is already a bundle submitted with this ID." } = {}) {
|
|
194
|
+
super(5720, e), Object.defineProperty(this, "code", {
|
|
195
|
+
enumerable: !0,
|
|
196
|
+
configurable: !0,
|
|
197
|
+
writable: !0,
|
|
198
|
+
value: 5720
|
|
199
|
+
}), Object.defineProperty(this, "name", {
|
|
200
|
+
enumerable: !0,
|
|
201
|
+
configurable: !0,
|
|
202
|
+
writable: !0,
|
|
203
|
+
value: "Provider.DuplicateIdError"
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
Object.defineProperty(f, "code", {
|
|
208
|
+
enumerable: !0,
|
|
209
|
+
configurable: !0,
|
|
210
|
+
writable: !0,
|
|
211
|
+
value: 5720
|
|
212
|
+
});
|
|
213
|
+
class p extends u {
|
|
214
|
+
constructor({ message: e = "This bundle id is unknown / has not been submitted." } = {}) {
|
|
215
|
+
super(5730, e), Object.defineProperty(this, "code", {
|
|
216
|
+
enumerable: !0,
|
|
217
|
+
configurable: !0,
|
|
218
|
+
writable: !0,
|
|
219
|
+
value: 5730
|
|
220
|
+
}), Object.defineProperty(this, "name", {
|
|
221
|
+
enumerable: !0,
|
|
222
|
+
configurable: !0,
|
|
223
|
+
writable: !0,
|
|
224
|
+
value: "Provider.UnknownBundleIdError"
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
Object.defineProperty(p, "code", {
|
|
229
|
+
enumerable: !0,
|
|
230
|
+
configurable: !0,
|
|
231
|
+
writable: !0,
|
|
232
|
+
value: 5730
|
|
233
|
+
});
|
|
234
|
+
class h extends u {
|
|
235
|
+
constructor({ message: e = "The call bundle is too large for the Wallet to process." } = {}) {
|
|
236
|
+
super(5740, e), Object.defineProperty(this, "code", {
|
|
237
|
+
enumerable: !0,
|
|
238
|
+
configurable: !0,
|
|
239
|
+
writable: !0,
|
|
240
|
+
value: 5740
|
|
241
|
+
}), Object.defineProperty(this, "name", {
|
|
242
|
+
enumerable: !0,
|
|
243
|
+
configurable: !0,
|
|
244
|
+
writable: !0,
|
|
245
|
+
value: "Provider.BundleTooLargeError"
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
Object.defineProperty(h, "code", {
|
|
250
|
+
enumerable: !0,
|
|
251
|
+
configurable: !0,
|
|
252
|
+
writable: !0,
|
|
253
|
+
value: 5740
|
|
254
|
+
});
|
|
255
|
+
class m extends u {
|
|
256
|
+
constructor({ message: e = "The Wallet can support atomicity after an upgrade, but the user rejected the upgrade." } = {}) {
|
|
257
|
+
super(5750, e), Object.defineProperty(this, "code", {
|
|
258
|
+
enumerable: !0,
|
|
259
|
+
configurable: !0,
|
|
260
|
+
writable: !0,
|
|
261
|
+
value: 5750
|
|
262
|
+
}), Object.defineProperty(this, "name", {
|
|
263
|
+
enumerable: !0,
|
|
264
|
+
configurable: !0,
|
|
265
|
+
writable: !0,
|
|
266
|
+
value: "Provider.AtomicReadyWalletRejectedUpgradeError"
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
Object.defineProperty(m, "code", {
|
|
271
|
+
enumerable: !0,
|
|
272
|
+
configurable: !0,
|
|
273
|
+
writable: !0,
|
|
274
|
+
value: 5750
|
|
275
|
+
});
|
|
276
|
+
class w extends u {
|
|
277
|
+
constructor({ message: e = "The wallet does not support atomic execution but the request requires it." } = {}) {
|
|
278
|
+
super(5760, e), Object.defineProperty(this, "code", {
|
|
279
|
+
enumerable: !0,
|
|
280
|
+
configurable: !0,
|
|
281
|
+
writable: !0,
|
|
282
|
+
value: 5760
|
|
283
|
+
}), Object.defineProperty(this, "name", {
|
|
284
|
+
enumerable: !0,
|
|
285
|
+
configurable: !0,
|
|
286
|
+
writable: !0,
|
|
287
|
+
value: "Provider.AtomicityNotSupportedError"
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
Object.defineProperty(w, "code", {
|
|
292
|
+
enumerable: !0,
|
|
293
|
+
configurable: !0,
|
|
294
|
+
writable: !0,
|
|
295
|
+
value: 5760
|
|
296
|
+
});
|
|
297
|
+
function q(r, e = {}) {
|
|
298
|
+
const { includeEvents: t = !0 } = e;
|
|
299
|
+
if (!r)
|
|
300
|
+
throw new E();
|
|
301
|
+
return {
|
|
302
|
+
...t ? {
|
|
303
|
+
on: r.on?.bind(r),
|
|
304
|
+
removeListener: r.removeListener?.bind(r)
|
|
305
|
+
} : {},
|
|
306
|
+
async request(v) {
|
|
307
|
+
try {
|
|
308
|
+
const o = await r.request(v);
|
|
309
|
+
return o && typeof o == "object" && "jsonrpc" in o ? y(o) : o;
|
|
310
|
+
} catch (o) {
|
|
311
|
+
throw O(o);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
function O(r) {
|
|
317
|
+
const e = j(r);
|
|
318
|
+
if (e instanceof g) {
|
|
319
|
+
if (!e.data)
|
|
320
|
+
return e;
|
|
321
|
+
const { code: t } = e.data;
|
|
322
|
+
if (t === c.code)
|
|
323
|
+
return new c(e);
|
|
324
|
+
if (t === l.code)
|
|
325
|
+
return new l(e);
|
|
326
|
+
if (t === n.code)
|
|
327
|
+
return new n(e);
|
|
328
|
+
if (t === a.code)
|
|
329
|
+
return new a(e);
|
|
330
|
+
if (t === i.code)
|
|
331
|
+
return new i(e);
|
|
332
|
+
if (t === d.code)
|
|
333
|
+
return new d(e);
|
|
334
|
+
if (t === m.code)
|
|
335
|
+
return new m(e);
|
|
336
|
+
if (t === w.code)
|
|
337
|
+
return new w(e);
|
|
338
|
+
if (t === h.code)
|
|
339
|
+
return new h(e);
|
|
340
|
+
if (t === p.code)
|
|
341
|
+
return new p(e);
|
|
342
|
+
if (t === f.code)
|
|
343
|
+
return new f(e);
|
|
344
|
+
if (t === s.code)
|
|
345
|
+
return new s(e);
|
|
346
|
+
if (t === b.code)
|
|
347
|
+
return new b(e);
|
|
348
|
+
}
|
|
349
|
+
return e;
|
|
350
|
+
}
|
|
351
|
+
class E extends P {
|
|
352
|
+
constructor() {
|
|
353
|
+
super("`provider` is undefined."), Object.defineProperty(this, "name", {
|
|
354
|
+
enumerable: !0,
|
|
355
|
+
configurable: !0,
|
|
356
|
+
writable: !0,
|
|
357
|
+
value: "Provider.IsUndefinedError"
|
|
358
|
+
});
|
|
15
359
|
}
|
|
16
360
|
}
|
|
17
361
|
export {
|
|
18
|
-
|
|
362
|
+
m as AtomicReadyWalletRejectedUpgradeError,
|
|
363
|
+
w as AtomicityNotSupportedError,
|
|
364
|
+
h as BundleTooLargeError,
|
|
365
|
+
l as ChainDisconnectedError,
|
|
366
|
+
c as DisconnectedError,
|
|
367
|
+
f as DuplicateIdError,
|
|
368
|
+
E as IsUndefinedError,
|
|
369
|
+
u as ProviderRpcError,
|
|
370
|
+
d as SwitchChainError,
|
|
371
|
+
a as UnauthorizedError,
|
|
372
|
+
p as UnknownBundleIdError,
|
|
373
|
+
s as UnsupportedChainIdError,
|
|
374
|
+
i as UnsupportedMethodError,
|
|
375
|
+
b as UnsupportedNonOptionalCapabilityError,
|
|
376
|
+
n as UserRejectedRequestError,
|
|
377
|
+
q as from,
|
|
378
|
+
O as parseError
|
|
19
379
|
};
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { handleAccounts as t } from "./index.native103.js";
|
|
2
|
+
import { handleEthSign as e } from "./index.native104.js";
|
|
3
|
+
import { handleGetCallsStatus as a } from "./index.native105.js";
|
|
4
|
+
import { handleGetCapabilities as n } from "./index.native106.js";
|
|
5
|
+
import { handlePersonalSign as o } from "./index.native107.js";
|
|
6
|
+
import { handleRequestAccounts as r } from "./index.native108.js";
|
|
7
|
+
import { handleSendCalls as i } from "./index.native109.js";
|
|
8
|
+
import { handleSendTransaction as l } from "./index.native110.js";
|
|
9
|
+
import { handleSignTypedData as h } from "./index.native111.js";
|
|
10
|
+
import { handleChainId as s } from "./index.native112.js";
|
|
11
|
+
import { handleDisconnect as m } from "./index.native113.js";
|
|
12
|
+
import { handleSwitchEthereumChain as d } from "./index.native114.js";
|
|
13
|
+
function D() {
|
|
14
|
+
return {
|
|
15
|
+
eth_accounts: t,
|
|
16
|
+
eth_requestAccounts: r,
|
|
17
|
+
personal_sign: o,
|
|
18
|
+
eth_sendTransaction: l,
|
|
19
|
+
eth_signTypedData_v4: h,
|
|
20
|
+
wallet_disconnect: m,
|
|
21
|
+
wallet_switchEthereumChain: d,
|
|
22
|
+
eth_sign: e,
|
|
23
|
+
eth_chainId: s,
|
|
24
|
+
wallet_sendCalls: i,
|
|
25
|
+
wallet_getCallsStatus: a,
|
|
26
|
+
wallet_getCapabilities: n
|
|
27
|
+
};
|
|
19
28
|
}
|
|
20
29
|
export {
|
|
21
|
-
|
|
22
|
-
E as JOSENotSupported,
|
|
23
|
-
o as JWSInvalid,
|
|
24
|
-
r as JWTInvalid
|
|
30
|
+
D as createEOAHandlers
|
|
25
31
|
};
|
|
@@ -1,53 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import e from "./index.
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
set sub(t) {
|
|
30
|
-
this.#t.sub = t;
|
|
31
|
-
}
|
|
32
|
-
get aud() {
|
|
33
|
-
return this.#t.aud;
|
|
34
|
-
}
|
|
35
|
-
set aud(t) {
|
|
36
|
-
this.#t.aud = t;
|
|
37
|
-
}
|
|
38
|
-
set jti(t) {
|
|
39
|
-
this.#t.jti = t;
|
|
40
|
-
}
|
|
41
|
-
set nbf(t) {
|
|
42
|
-
typeof t == "number" ? this.#t.nbf = s("setNotBefore", t) : t instanceof Date ? this.#t.nbf = s("setNotBefore", e(t)) : this.#t.nbf = e(/* @__PURE__ */ new Date()) + i(t);
|
|
43
|
-
}
|
|
44
|
-
set exp(t) {
|
|
45
|
-
typeof t == "number" ? this.#t.exp = s("setExpirationTime", t) : t instanceof Date ? this.#t.exp = s("setExpirationTime", e(t)) : this.#t.exp = e(/* @__PURE__ */ new Date()) + i(t);
|
|
46
|
-
}
|
|
47
|
-
set iat(t) {
|
|
48
|
-
typeof t > "u" ? this.#t.iat = e(/* @__PURE__ */ new Date()) : t instanceof Date ? this.#t.iat = s("setIssuedAt", e(t)) : typeof t == "string" ? this.#t.iat = s("setIssuedAt", e(/* @__PURE__ */ new Date()) + i(t)) : this.#t.iat = s("setIssuedAt", t);
|
|
49
|
-
}
|
|
1
|
+
import { handleChainId as t } from "./index.native112.js";
|
|
2
|
+
import { handleDisconnect as e } from "./index.native113.js";
|
|
3
|
+
import { handleSwitchEthereumChain as a } from "./index.native114.js";
|
|
4
|
+
import { handleAccounts as n } from "./index.native115.js";
|
|
5
|
+
import { handleEthSign as o } from "./index.native116.js";
|
|
6
|
+
import { handleGetCallsStatus as r } from "./index.native117.js";
|
|
7
|
+
import { handleGetCapabilities as i } from "./index.native118.js";
|
|
8
|
+
import { handlePersonalSign as l } from "./index.native119.js";
|
|
9
|
+
import { handleRequestAccounts as h } from "./index.native120.js";
|
|
10
|
+
import { handleSendCalls as m } from "./index.native121.js";
|
|
11
|
+
import { handleSendTransaction as s } from "./index.native122.js";
|
|
12
|
+
import { handleSignTypedData as d } from "./index.native123.js";
|
|
13
|
+
function E() {
|
|
14
|
+
return {
|
|
15
|
+
eth_accounts: n,
|
|
16
|
+
eth_requestAccounts: h,
|
|
17
|
+
personal_sign: l,
|
|
18
|
+
eth_sendTransaction: s,
|
|
19
|
+
eth_signTypedData_v4: d,
|
|
20
|
+
wallet_disconnect: e,
|
|
21
|
+
wallet_switchEthereumChain: a,
|
|
22
|
+
eth_sign: o,
|
|
23
|
+
eth_chainId: t,
|
|
24
|
+
wallet_sendCalls: m,
|
|
25
|
+
wallet_getCallsStatus: r,
|
|
26
|
+
wallet_getCapabilities: i
|
|
27
|
+
};
|
|
50
28
|
}
|
|
51
29
|
export {
|
|
52
|
-
|
|
30
|
+
E as createSmartAccountHandlers
|
|
53
31
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { encode as d } from "./index.
|
|
2
|
-
import y from "./index.
|
|
3
|
-
import b from "./index.
|
|
4
|
-
import { JWSInvalid as r } from "./index.
|
|
1
|
+
import { encode as d } from "./index.native131.js";
|
|
2
|
+
import y from "./index.native132.js";
|
|
3
|
+
import b from "./index.native133.js";
|
|
4
|
+
import { JWSInvalid as r } from "./index.native47.js";
|
|
5
5
|
import { encoder as s, concat as u, decoder as h } from "./index.native97.js";
|
|
6
|
-
import g from "./index.
|
|
7
|
-
import H from "./index.
|
|
8
|
-
import P from "./index.
|
|
6
|
+
import g from "./index.native134.js";
|
|
7
|
+
import H from "./index.native135.js";
|
|
8
|
+
import P from "./index.native136.js";
|
|
9
9
|
class x {
|
|
10
10
|
#r;
|
|
11
11
|
#e;
|
package/dist/esm/index.web100.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const n = await o();
|
|
5
|
-
return t.emit("connect", {
|
|
6
|
-
chainId: c(e.getState().chainId)
|
|
7
|
-
}), n.evmAccounts || [];
|
|
1
|
+
import { version as r } from "./index.web137.js";
|
|
2
|
+
function e() {
|
|
3
|
+
return r;
|
|
8
4
|
}
|
|
9
5
|
export {
|
|
10
|
-
|
|
6
|
+
e as getVersion
|
|
11
7
|
};
|
package/dist/esm/index.web101.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
async function n(e, t) {
|
|
3
|
-
throw new r(
|
|
4
|
-
o.provider.unsupportedMethod,
|
|
5
|
-
"wallet_sendCalls is not supported with EOAs"
|
|
6
|
-
);
|
|
7
|
-
}
|
|
1
|
+
const o = "2.33.0";
|
|
8
2
|
export {
|
|
9
|
-
|
|
3
|
+
o as version
|
|
10
4
|
};
|
package/dist/esm/index.web102.js
CHANGED
|
@@ -1,74 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { RPCRequestError as t, STANDARD_ERROR_CODES as i, validateUserOwnsEOA as P } from "./index.web19.js";
|
|
5
|
-
async function E(e, d, m) {
|
|
6
|
-
const [a] = e;
|
|
7
|
-
if (!a || typeof a != "object")
|
|
8
|
-
throw new t(
|
|
9
|
-
i.rpc.invalidParams,
|
|
10
|
-
"Transaction parameter must be an object"
|
|
11
|
-
);
|
|
12
|
-
if (!a.to)
|
|
13
|
-
throw new t(
|
|
14
|
-
i.rpc.invalidParams,
|
|
15
|
-
"Transaction must include 'to' field"
|
|
16
|
-
);
|
|
17
|
-
await P(a.from);
|
|
18
|
-
const o = d.getState(), r = a.chainId ? Number(a.chainId) : o.chainId;
|
|
19
|
-
if (v(r))
|
|
20
|
-
try {
|
|
21
|
-
const { transactionHash: n } = await l({
|
|
22
|
-
evmAccount: a.from,
|
|
23
|
-
transaction: { ...c(a), chainId: r },
|
|
24
|
-
network: T[r]
|
|
25
|
-
});
|
|
26
|
-
return n;
|
|
27
|
-
} catch (n) {
|
|
28
|
-
throw new t(
|
|
29
|
-
i.rpc.transactionRejected,
|
|
30
|
-
n instanceof Error ? n.message : "Transaction failed"
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
else
|
|
34
|
-
try {
|
|
35
|
-
const n = u({
|
|
36
|
-
// Safe as we check before calling this handler that chainId is configured
|
|
37
|
-
chain: o.chains.find((s) => s.id === r),
|
|
38
|
-
transport: m[r],
|
|
39
|
-
account: a.from
|
|
40
|
-
}), p = o.chains.find((s) => s.id === r), h = await n.prepareTransactionRequest({
|
|
41
|
-
...c(a),
|
|
42
|
-
chain: p
|
|
43
|
-
}), { signedTransaction: f } = await w({
|
|
44
|
-
evmAccount: a.from,
|
|
45
|
-
transaction: {
|
|
46
|
-
...h,
|
|
47
|
-
type: "eip1559"
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return await n.sendRawTransaction({
|
|
51
|
-
serializedTransaction: f
|
|
52
|
-
});
|
|
53
|
-
} catch (n) {
|
|
54
|
-
throw new t(
|
|
55
|
-
i.rpc.transactionRejected,
|
|
56
|
-
n instanceof Error ? n.message : "Transaction failed"
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function c(e) {
|
|
61
|
-
return {
|
|
62
|
-
to: e.to,
|
|
63
|
-
data: e.data,
|
|
64
|
-
value: e.value ? BigInt(e.value) : void 0,
|
|
65
|
-
nonce: e.nonce ? Number(e.nonce) : void 0,
|
|
66
|
-
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
67
|
-
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
68
|
-
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
69
|
-
type: "eip1559"
|
|
70
|
-
};
|
|
1
|
+
import { getCurrentUser as r } from "./index.web6.js";
|
|
2
|
+
async function n() {
|
|
3
|
+
return (await r())?.evmAccounts || [];
|
|
71
4
|
}
|
|
72
5
|
export {
|
|
73
|
-
|
|
6
|
+
n as handleAccounts
|
|
74
7
|
};
|
package/dist/esm/index.web103.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { validateUserOwnsEOA as
|
|
3
|
-
async function
|
|
4
|
-
const [
|
|
5
|
-
await
|
|
1
|
+
import { signEvmHash as o } from "./index.web6.js";
|
|
2
|
+
import { validateUserOwnsEOA as a, EIP1193ProviderError as i, STANDARD_ERROR_CODES as s } from "./index.web19.js";
|
|
3
|
+
async function h(t) {
|
|
4
|
+
const [n, e] = t;
|
|
5
|
+
await a(e);
|
|
6
6
|
try {
|
|
7
|
-
const { signature:
|
|
8
|
-
evmAccount:
|
|
9
|
-
|
|
7
|
+
const { signature: r } = await o({
|
|
8
|
+
evmAccount: e,
|
|
9
|
+
hash: n
|
|
10
10
|
});
|
|
11
|
-
return
|
|
12
|
-
} catch (
|
|
11
|
+
return r;
|
|
12
|
+
} catch (r) {
|
|
13
13
|
throw new i(
|
|
14
14
|
s.provider.userRejectedRequest,
|
|
15
|
-
|
|
15
|
+
r instanceof Error ? r.message : "Signing failed"
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
h as handleEthSign
|
|
21
21
|
};
|