ox 0.6.12 → 0.7.1
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 +16 -0
- package/Keystore/package.json +6 -0
- package/_cjs/core/Keystore.js +127 -0
- package/_cjs/core/Keystore.js.map +1 -0
- package/_cjs/core/Provider.js +209 -1
- package/_cjs/core/Provider.js.map +1 -1
- package/_cjs/index.js +3 -2
- package/_cjs/index.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_cjs/version.js.map +1 -1
- package/_esm/core/Keystore.js +248 -0
- package/_esm/core/Keystore.js.map +1 -0
- package/_esm/core/Provider.js +208 -0
- package/_esm/core/Provider.js.map +1 -1
- package/_esm/index.js +47 -0
- package/_esm/index.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_esm/version.js.map +1 -1
- package/_types/core/Keystore.d.ts +267 -0
- package/_types/core/Keystore.d.ts.map +1 -0
- package/_types/core/Provider.d.ts +73 -1
- package/_types/core/Provider.d.ts.map +1 -1
- package/_types/core/internal/rpcSchemas/wallet.d.ts +23 -4
- package/_types/core/internal/rpcSchemas/wallet.d.ts.map +1 -1
- package/_types/index.d.ts +47 -0
- package/_types/index.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/_types/version.d.ts.map +1 -1
- package/core/Keystore.ts +414 -0
- package/core/Provider.ts +168 -0
- package/core/internal/rpcSchemas/wallet.ts +28 -4
- package/index.ts +48 -0
- package/package.json +7 -1
- package/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# ox
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#75](https://github.com/wevm/ox/pull/75) [`27a1e28`](https://github.com/wevm/ox/commit/27a1e28e1f403ca18d428611fc3b88dcb5a4503e) Thanks [@jxom](https://github.com/jxom)! - Added `Keystore` module.
|
|
8
|
+
|
|
9
|
+
## 0.7.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`09f72cb`](https://github.com/wevm/ox/commit/09f72cb33f076151e3437cf42b1cad775148a2bb) Thanks [@jxom](https://github.com/jxom)! - Updated EIP-5792 APIs to the latest spec on `RpcSchema`.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`61a9c57`](https://github.com/wevm/ox/commit/61a9c5798b8072b9c16691463742835b15c17468) Thanks [@jxom](https://github.com/jxom)! - Added EIP-5792 provider errors.
|
|
18
|
+
|
|
3
19
|
## 0.6.12
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decrypt = decrypt;
|
|
4
|
+
exports.encrypt = encrypt;
|
|
5
|
+
exports.pbkdf2 = pbkdf2;
|
|
6
|
+
exports.pbkdf2Async = pbkdf2Async;
|
|
7
|
+
exports.scrypt = scrypt;
|
|
8
|
+
exports.scryptAsync = scryptAsync;
|
|
9
|
+
const aes_1 = require("@noble/ciphers/aes");
|
|
10
|
+
const pbkdf2_1 = require("@noble/hashes/pbkdf2");
|
|
11
|
+
const scrypt_1 = require("@noble/hashes/scrypt");
|
|
12
|
+
const sha2_1 = require("@noble/hashes/sha2");
|
|
13
|
+
const Bytes = require("./Bytes.js");
|
|
14
|
+
const Hash = require("./Hash.js");
|
|
15
|
+
async function decrypt(keystore, key, options = {}) {
|
|
16
|
+
const { as = 'Hex' } = options;
|
|
17
|
+
const key_ = Bytes.from(`0x${key.key()}`);
|
|
18
|
+
const encKey = Bytes.slice(key_, 0, 16);
|
|
19
|
+
const macKey = Bytes.slice(key_, 16, 32);
|
|
20
|
+
const ciphertext = Bytes.from(`0x${keystore.crypto.ciphertext}`);
|
|
21
|
+
const mac = Hash.keccak256(Bytes.concat(macKey, ciphertext));
|
|
22
|
+
if (!Bytes.isEqual(mac, Bytes.from(`0x${keystore.crypto.mac}`)))
|
|
23
|
+
throw new Error('corrupt keystore');
|
|
24
|
+
const data = (0, aes_1.ctr)(encKey, key.iv).decrypt(ciphertext);
|
|
25
|
+
if (as === 'Hex')
|
|
26
|
+
return Bytes.toHex(data);
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
async function encrypt(privateKey, key, options = {}) {
|
|
30
|
+
const { id = crypto.randomUUID() } = options;
|
|
31
|
+
const key_ = Bytes.from(`0x${key.key()}`);
|
|
32
|
+
const value_ = Bytes.from(privateKey);
|
|
33
|
+
const encKey = Bytes.slice(key_, 0, 16);
|
|
34
|
+
const macKey = Bytes.slice(key_, 16, 32);
|
|
35
|
+
const ciphertext = (0, aes_1.ctr)(encKey, key.iv).encrypt(value_);
|
|
36
|
+
const mac = Hash.keccak256(Bytes.concat(macKey, ciphertext));
|
|
37
|
+
return {
|
|
38
|
+
crypto: {
|
|
39
|
+
cipher: 'aes-128-ctr',
|
|
40
|
+
ciphertext: Bytes.toHex(ciphertext).slice(2),
|
|
41
|
+
cipherparams: { iv: Bytes.toHex(key.iv).slice(2) },
|
|
42
|
+
kdf: key.kdf,
|
|
43
|
+
kdfparams: key.kdfparams,
|
|
44
|
+
mac: Bytes.toHex(mac).slice(2),
|
|
45
|
+
},
|
|
46
|
+
id,
|
|
47
|
+
version: 3,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function pbkdf2(options) {
|
|
51
|
+
const { iv, iterations = 262_144, password } = options;
|
|
52
|
+
const salt = options.salt ? Bytes.from(options.salt) : Bytes.random(32);
|
|
53
|
+
const key = Bytes.toHex((0, pbkdf2_1.pbkdf2)(sha2_1.sha256, password, salt, { c: iterations, dkLen: 32 })).slice(2);
|
|
54
|
+
return defineKey({
|
|
55
|
+
iv,
|
|
56
|
+
key: () => key,
|
|
57
|
+
kdfparams: {
|
|
58
|
+
c: iterations,
|
|
59
|
+
dklen: 32,
|
|
60
|
+
prf: 'hmac-sha256',
|
|
61
|
+
salt: Bytes.toHex(salt).slice(2),
|
|
62
|
+
},
|
|
63
|
+
kdf: 'pbkdf2',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async function pbkdf2Async(options) {
|
|
67
|
+
const { iv, iterations = 262_144, password } = options;
|
|
68
|
+
const salt = options.salt ? Bytes.from(options.salt) : Bytes.random(32);
|
|
69
|
+
const key = Bytes.toHex(await (0, pbkdf2_1.pbkdf2Async)(sha2_1.sha256, password, salt, {
|
|
70
|
+
c: iterations,
|
|
71
|
+
dkLen: 32,
|
|
72
|
+
})).slice(2);
|
|
73
|
+
return defineKey({
|
|
74
|
+
iv,
|
|
75
|
+
key: () => key,
|
|
76
|
+
kdfparams: {
|
|
77
|
+
c: iterations,
|
|
78
|
+
dklen: 32,
|
|
79
|
+
prf: 'hmac-sha256',
|
|
80
|
+
salt: Bytes.toHex(salt).slice(2),
|
|
81
|
+
},
|
|
82
|
+
kdf: 'pbkdf2',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function scrypt(options) {
|
|
86
|
+
const { iv, n = 262_144, password } = options;
|
|
87
|
+
const p = 8;
|
|
88
|
+
const r = 1;
|
|
89
|
+
const salt = options.salt ? Bytes.from(options.salt) : Bytes.random(32);
|
|
90
|
+
const key = Bytes.toHex((0, scrypt_1.scrypt)(password, salt, { N: n, dkLen: 32, r, p })).slice(2);
|
|
91
|
+
return defineKey({
|
|
92
|
+
iv,
|
|
93
|
+
key: () => key,
|
|
94
|
+
kdfparams: {
|
|
95
|
+
dklen: 32,
|
|
96
|
+
n,
|
|
97
|
+
p,
|
|
98
|
+
r,
|
|
99
|
+
salt: Bytes.toHex(salt).slice(2),
|
|
100
|
+
},
|
|
101
|
+
kdf: 'scrypt',
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
async function scryptAsync(options) {
|
|
105
|
+
const { iv, n = 262_144, password } = options;
|
|
106
|
+
const p = 8;
|
|
107
|
+
const r = 1;
|
|
108
|
+
const salt = options.salt ? Bytes.from(options.salt) : Bytes.random(32);
|
|
109
|
+
const key = Bytes.toHex(await (0, scrypt_1.scryptAsync)(password, salt, { N: n, dkLen: 32, r, p })).slice(2);
|
|
110
|
+
return defineKey({
|
|
111
|
+
iv,
|
|
112
|
+
key: () => key,
|
|
113
|
+
kdfparams: {
|
|
114
|
+
dklen: 32,
|
|
115
|
+
n,
|
|
116
|
+
p,
|
|
117
|
+
r,
|
|
118
|
+
salt: Bytes.toHex(salt).slice(2),
|
|
119
|
+
},
|
|
120
|
+
kdf: 'scrypt',
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function defineKey(key) {
|
|
124
|
+
const iv = key.iv ? Bytes.from(key.iv) : Bytes.random(16);
|
|
125
|
+
return { ...key, iv };
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=Keystore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Keystore.js","sourceRoot":"","sources":["../../core/Keystore.ts"],"names":[],"mappings":";;AA+FA,0BAqBC;AA2DD,0BA4BC;AAsBD,wBAmBC;AA4BD,kCAsBC;AAmBD,wBAuBC;AA4BD,kCAuBC;AAnYD,4CAAwC;AACxC,iDAG6B;AAC7B,iDAG6B;AAC7B,6CAA2C;AAC3C,oCAAmC;AAEnC,kCAAiC;AAmF1B,KAAK,UAAU,OAAO,CAC3B,QAAkB,EAClB,GAAQ,EACR,UAA+B,EAAE;IAEjC,MAAM,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO,CAAA;IAC9B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAEzC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;IACvC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EA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OAAO,SAAS,CAAC;QACf,EAAE;QACF,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG;QACd,SAAS,EAAE;YACT,KAAK,EAAE,EAAE;YACT,CAAC;YACD,CAAC;YACD,CAAC;YACD,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;SACjC;QACD,GAAG,EAAE,QAAQ;KACd,CAAqB,CAAA;AACxB,CAAC;AASD,SAAS,SAAS,CAChB,GAAQ;IAER,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACzD,OAAO,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,CAAA;AACvB,CAAC"}
|
package/_cjs/core/Provider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IsUndefinedError = exports.ChainDisconnectedError = exports.DisconnectedError = exports.UnsupportedMethodError = exports.UnauthorizedError = exports.UserRejectedRequestError = exports.ProviderRpcError = void 0;
|
|
3
|
+
exports.IsUndefinedError = exports.AtomicityNotSupportedError = exports.AtomicReadyWalletRejectedUpgradeError = exports.BundleTooLargeError = exports.UnknownBundleIdError = exports.DuplicateIdError = exports.UnsupportedChainIdError = exports.UnsupportedNonOptionalCapabilityError = exports.SwitchChainError = exports.ChainDisconnectedError = exports.DisconnectedError = exports.UnsupportedMethodError = exports.UnauthorizedError = exports.UserRejectedRequestError = exports.ProviderRpcError = void 0;
|
|
4
4
|
exports.createEmitter = createEmitter;
|
|
5
5
|
exports.from = from;
|
|
6
6
|
exports.parseError = parseError;
|
|
@@ -153,6 +153,198 @@ Object.defineProperty(ChainDisconnectedError, "code", {
|
|
|
153
153
|
writable: true,
|
|
154
154
|
value: 4901
|
|
155
155
|
});
|
|
156
|
+
class SwitchChainError extends ProviderRpcError {
|
|
157
|
+
constructor({ message = 'An error occurred when attempting to switch chain.', } = {}) {
|
|
158
|
+
super(4902, message);
|
|
159
|
+
Object.defineProperty(this, "code", {
|
|
160
|
+
enumerable: true,
|
|
161
|
+
configurable: true,
|
|
162
|
+
writable: true,
|
|
163
|
+
value: 4902
|
|
164
|
+
});
|
|
165
|
+
Object.defineProperty(this, "name", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
configurable: true,
|
|
168
|
+
writable: true,
|
|
169
|
+
value: 'Provider.SwitchChainError'
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.SwitchChainError = SwitchChainError;
|
|
174
|
+
Object.defineProperty(SwitchChainError, "code", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
configurable: true,
|
|
177
|
+
writable: true,
|
|
178
|
+
value: 4902
|
|
179
|
+
});
|
|
180
|
+
class UnsupportedNonOptionalCapabilityError extends ProviderRpcError {
|
|
181
|
+
constructor({ message = 'This Wallet does not support a capability that was not marked as optional.', } = {}) {
|
|
182
|
+
super(5700, message);
|
|
183
|
+
Object.defineProperty(this, "code", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
configurable: true,
|
|
186
|
+
writable: true,
|
|
187
|
+
value: 5700
|
|
188
|
+
});
|
|
189
|
+
Object.defineProperty(this, "name", {
|
|
190
|
+
enumerable: true,
|
|
191
|
+
configurable: true,
|
|
192
|
+
writable: true,
|
|
193
|
+
value: 'Provider.UnsupportedNonOptionalCapabilityError'
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.UnsupportedNonOptionalCapabilityError = UnsupportedNonOptionalCapabilityError;
|
|
198
|
+
Object.defineProperty(UnsupportedNonOptionalCapabilityError, "code", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
configurable: true,
|
|
201
|
+
writable: true,
|
|
202
|
+
value: 5700
|
|
203
|
+
});
|
|
204
|
+
class UnsupportedChainIdError extends ProviderRpcError {
|
|
205
|
+
constructor({ message = 'This Wallet does not support the requested chain ID.', } = {}) {
|
|
206
|
+
super(5710, message);
|
|
207
|
+
Object.defineProperty(this, "code", {
|
|
208
|
+
enumerable: true,
|
|
209
|
+
configurable: true,
|
|
210
|
+
writable: true,
|
|
211
|
+
value: 5710
|
|
212
|
+
});
|
|
213
|
+
Object.defineProperty(this, "name", {
|
|
214
|
+
enumerable: true,
|
|
215
|
+
configurable: true,
|
|
216
|
+
writable: true,
|
|
217
|
+
value: 'Provider.UnsupportedChainIdError'
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.UnsupportedChainIdError = UnsupportedChainIdError;
|
|
222
|
+
Object.defineProperty(UnsupportedChainIdError, "code", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
configurable: true,
|
|
225
|
+
writable: true,
|
|
226
|
+
value: 5710
|
|
227
|
+
});
|
|
228
|
+
class DuplicateIdError extends ProviderRpcError {
|
|
229
|
+
constructor({ message = 'There is already a bundle submitted with this ID.', } = {}) {
|
|
230
|
+
super(5720, message);
|
|
231
|
+
Object.defineProperty(this, "code", {
|
|
232
|
+
enumerable: true,
|
|
233
|
+
configurable: true,
|
|
234
|
+
writable: true,
|
|
235
|
+
value: 5720
|
|
236
|
+
});
|
|
237
|
+
Object.defineProperty(this, "name", {
|
|
238
|
+
enumerable: true,
|
|
239
|
+
configurable: true,
|
|
240
|
+
writable: true,
|
|
241
|
+
value: 'Provider.DuplicateIdError'
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
exports.DuplicateIdError = DuplicateIdError;
|
|
246
|
+
Object.defineProperty(DuplicateIdError, "code", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
configurable: true,
|
|
249
|
+
writable: true,
|
|
250
|
+
value: 5720
|
|
251
|
+
});
|
|
252
|
+
class UnknownBundleIdError extends ProviderRpcError {
|
|
253
|
+
constructor({ message = 'This bundle id is unknown / has not been submitted.', } = {}) {
|
|
254
|
+
super(5730, message);
|
|
255
|
+
Object.defineProperty(this, "code", {
|
|
256
|
+
enumerable: true,
|
|
257
|
+
configurable: true,
|
|
258
|
+
writable: true,
|
|
259
|
+
value: 5730
|
|
260
|
+
});
|
|
261
|
+
Object.defineProperty(this, "name", {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
configurable: true,
|
|
264
|
+
writable: true,
|
|
265
|
+
value: 'Provider.UnknownBundleIdError'
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
exports.UnknownBundleIdError = UnknownBundleIdError;
|
|
270
|
+
Object.defineProperty(UnknownBundleIdError, "code", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
configurable: true,
|
|
273
|
+
writable: true,
|
|
274
|
+
value: 5730
|
|
275
|
+
});
|
|
276
|
+
class BundleTooLargeError extends ProviderRpcError {
|
|
277
|
+
constructor({ message = 'The call bundle is too large for the Wallet to process.', } = {}) {
|
|
278
|
+
super(5740, message);
|
|
279
|
+
Object.defineProperty(this, "code", {
|
|
280
|
+
enumerable: true,
|
|
281
|
+
configurable: true,
|
|
282
|
+
writable: true,
|
|
283
|
+
value: 5740
|
|
284
|
+
});
|
|
285
|
+
Object.defineProperty(this, "name", {
|
|
286
|
+
enumerable: true,
|
|
287
|
+
configurable: true,
|
|
288
|
+
writable: true,
|
|
289
|
+
value: 'Provider.BundleTooLargeError'
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
exports.BundleTooLargeError = BundleTooLargeError;
|
|
294
|
+
Object.defineProperty(BundleTooLargeError, "code", {
|
|
295
|
+
enumerable: true,
|
|
296
|
+
configurable: true,
|
|
297
|
+
writable: true,
|
|
298
|
+
value: 5740
|
|
299
|
+
});
|
|
300
|
+
class AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {
|
|
301
|
+
constructor({ message = 'The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.', } = {}) {
|
|
302
|
+
super(5750, message);
|
|
303
|
+
Object.defineProperty(this, "code", {
|
|
304
|
+
enumerable: true,
|
|
305
|
+
configurable: true,
|
|
306
|
+
writable: true,
|
|
307
|
+
value: 5750
|
|
308
|
+
});
|
|
309
|
+
Object.defineProperty(this, "name", {
|
|
310
|
+
enumerable: true,
|
|
311
|
+
configurable: true,
|
|
312
|
+
writable: true,
|
|
313
|
+
value: 'Provider.AtomicReadyWalletRejectedUpgradeError'
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
exports.AtomicReadyWalletRejectedUpgradeError = AtomicReadyWalletRejectedUpgradeError;
|
|
318
|
+
Object.defineProperty(AtomicReadyWalletRejectedUpgradeError, "code", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
configurable: true,
|
|
321
|
+
writable: true,
|
|
322
|
+
value: 5750
|
|
323
|
+
});
|
|
324
|
+
class AtomicityNotSupportedError extends ProviderRpcError {
|
|
325
|
+
constructor({ message = 'The wallet does not support atomic execution but the request requires it.', } = {}) {
|
|
326
|
+
super(5760, message);
|
|
327
|
+
Object.defineProperty(this, "code", {
|
|
328
|
+
enumerable: true,
|
|
329
|
+
configurable: true,
|
|
330
|
+
writable: true,
|
|
331
|
+
value: 5760
|
|
332
|
+
});
|
|
333
|
+
Object.defineProperty(this, "name", {
|
|
334
|
+
enumerable: true,
|
|
335
|
+
configurable: true,
|
|
336
|
+
writable: true,
|
|
337
|
+
value: 'Provider.AtomicityNotSupportedError'
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
exports.AtomicityNotSupportedError = AtomicityNotSupportedError;
|
|
342
|
+
Object.defineProperty(AtomicityNotSupportedError, "code", {
|
|
343
|
+
enumerable: true,
|
|
344
|
+
configurable: true,
|
|
345
|
+
writable: true,
|
|
346
|
+
value: 5760
|
|
347
|
+
});
|
|
156
348
|
function createEmitter() {
|
|
157
349
|
const emitter = new eventemitter3_1.EventEmitter();
|
|
158
350
|
return {
|
|
@@ -216,6 +408,22 @@ function parseError(error) {
|
|
|
216
408
|
return new UnauthorizedError(error_);
|
|
217
409
|
if (code === UnsupportedMethodError.code)
|
|
218
410
|
return new UnsupportedMethodError(error_);
|
|
411
|
+
if (code === SwitchChainError.code)
|
|
412
|
+
return new SwitchChainError(error_);
|
|
413
|
+
if (code === AtomicReadyWalletRejectedUpgradeError.code)
|
|
414
|
+
return new AtomicReadyWalletRejectedUpgradeError(error_);
|
|
415
|
+
if (code === AtomicityNotSupportedError.code)
|
|
416
|
+
return new AtomicityNotSupportedError(error_);
|
|
417
|
+
if (code === BundleTooLargeError.code)
|
|
418
|
+
return new BundleTooLargeError(error_);
|
|
419
|
+
if (code === UnknownBundleIdError.code)
|
|
420
|
+
return new UnknownBundleIdError(error_);
|
|
421
|
+
if (code === DuplicateIdError.code)
|
|
422
|
+
return new DuplicateIdError(error_);
|
|
423
|
+
if (code === UnsupportedChainIdError.code)
|
|
424
|
+
return new UnsupportedChainIdError(error_);
|
|
425
|
+
if (code === UnsupportedNonOptionalCapabilityError.code)
|
|
426
|
+
return new UnsupportedNonOptionalCapabilityError(error_);
|
|
219
427
|
}
|
|
220
428
|
return error_;
|
|
221
429
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../core/Provider.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../core/Provider.ts"],"names":[],"mappings":";;;AAuSA,sCAqBC;AAyKD,oBAyBC;AAuBD,gCAsCC;AA3jBD,iDAA4C;AAE5C,sCAAqC;AACrC,gDAA+C;AAmE/C,MAAa,gBAAiB,SAAQ,KAAK;IAMzC,YAAY,IAAY,EAAE,OAAe;QACvC,KAAK,CAAC,OAAO,CAAC,CAAA;QANP;;;;mBAAO,kBAAkB;WAAA;QAElC;;;;;WAAY;QACZ;;;;;WAAe;QAIb,IAAI,CAAC,IAAI,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K,mBAAmB,CAAC,IAAI;YACnC,OAAO,IAAI,mBAAmB,CAAC,MAAM,CAAU,CAAA;QACjD,IAAI,IAAI,KAAK,oBAAoB,CAAC,IAAI;YACpC,OAAO,IAAI,oBAAoB,CAAC,MAAM,CAAU,CAAA;QAClD,IAAI,IAAI,KAAK,gBAAgB,CAAC,IAAI;YAChC,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAU,CAAA;QAC9C,IAAI,IAAI,KAAK,uBAAuB,CAAC,IAAI;YACvC,OAAO,IAAI,uBAAuB,CAAC,MAAM,CAAU,CAAA;QACrD,IAAI,IAAI,KAAK,qCAAqC,CAAC,IAAI;YACrD,OAAO,IAAI,qCAAqC,CAAC,MAAM,CAAU,CAAA;IACrE,CAAC;IACD,OAAO,MAAe,CAAA;AACxB,CAAC;AA6FD,MAAa,gBAAiB,SAAQ,MAAM,CAAC,SAAS;IAGpD;QACE,KAAK,CAAC,0BAA0B,CAAC,CAAA;QAHjB;;;;mBAAO,2BAA2B;WAAA;IAIpD,CAAC;CACF;AAND,4CAMC"}
|
package/_cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.Withdrawal = exports.WebCryptoP256 = exports.WebAuthnP256 = exports.Value = exports.ValidatorData = exports.TypedData = exports.TransactionRequest = exports.TransactionReceipt = exports.TransactionEnvelopeEip7702 = exports.TransactionEnvelopeEip4844 = exports.TransactionEnvelopeEip2930 = exports.TransactionEnvelopeEip1559 = exports.TransactionEnvelopeLegacy = exports.TransactionEnvelope = void 0;
|
|
3
|
+
exports.StateOverrides = exports.Solidity = exports.Siwe = exports.Signature = exports.P256 = exports.Secp256k1 = exports.RpcTransport = exports.RpcResponse = exports.RpcRequest = exports.RpcSchema = exports.Rlp = exports.PublicKey = exports.Provider = exports.PersonalMessage = exports.Mnemonic = exports.Log = exports.Kzg = exports.Keystore = exports.Json = exports.Fee = exports.Hex = exports.HdKey = exports.Hash = exports.Filter = exports.Errors = exports.Ens = exports.ContractAddress = exports.Caches = exports.Bytes = exports.BlsPoint = exports.Bls = exports.Bloom = exports.BlockOverrides = exports.Block = exports.Blobs = exports.BinaryStateTree = exports.Base64 = exports.Base58 = exports.Authorization = exports.AesGcm = exports.Address = exports.AccountProof = exports.AccessList = exports.AbiParameters = exports.AbiItem = exports.AbiFunction = exports.AbiEvent = exports.AbiError = exports.AbiConstructor = exports.Abi = void 0;
|
|
4
|
+
exports.Withdrawal = exports.WebCryptoP256 = exports.WebAuthnP256 = exports.Value = exports.ValidatorData = exports.TypedData = exports.TransactionRequest = exports.TransactionReceipt = exports.TransactionEnvelopeEip7702 = exports.TransactionEnvelopeEip4844 = exports.TransactionEnvelopeEip2930 = exports.TransactionEnvelopeEip1559 = exports.TransactionEnvelopeLegacy = exports.TransactionEnvelope = exports.Transaction = void 0;
|
|
5
5
|
exports.Abi = require("./core/Abi.js");
|
|
6
6
|
exports.AbiConstructor = require("./core/AbiConstructor.js");
|
|
7
7
|
exports.AbiError = require("./core/AbiError.js");
|
|
@@ -34,6 +34,7 @@ exports.HdKey = require("./core/HdKey.js");
|
|
|
34
34
|
exports.Hex = require("./core/Hex.js");
|
|
35
35
|
exports.Fee = require("./core/Fee.js");
|
|
36
36
|
exports.Json = require("./core/Json.js");
|
|
37
|
+
exports.Keystore = require("./core/Keystore.js");
|
|
37
38
|
exports.Kzg = require("./core/Kzg.js");
|
|
38
39
|
exports.Log = require("./core/Log.js");
|
|
39
40
|
exports.Mnemonic = require("./core/Mnemonic.js");
|
package/_cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;AAuHA,uCAAoC;AA4EpC,6DAA0D;AAwE1D,iDAA8C;AAmH9C,iDAA8C;AA8F9C,uDAAoD;AA8EpD,+CAA4C;AAwG5C,2DAAwD;AA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mDAAgD;AAqGhD,yCAAsC;AAEtC,iDAA8C;AAO9C,6DAA0D;AAuC1D,uDAAoD;AAgBpD,uEAAoE;AA2JpE,mFAAgF;AAuKhF,qFAAkF;AA+JlF,qFAAkF;AAwLlF,qFAAkF;AAqIlF,qFAAkF;AA6ClF,qEAAkE;AAyBlE,qEAAkE;AAkDlE,mDAAgD;AAOhD,2DAAwD;AAsBxD,2CAAwC;AAkFxC,yDAAsD;AAiEtD,2DAAwD;AAOxD,qDAAkD"}
|
package/_cjs/version.js
CHANGED
package/_cjs/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../version.ts"],"names":[],"mappings":";;;AACa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../version.ts"],"names":[],"mappings":";;;AACa,QAAA,OAAO,GAAG,OAAO,CAAA"}
|