viem 0.0.0-main.20240419T012009 → 0.0.0-main.20240419T024614
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/_cjs/accounts/privateKeyToAccount.js +4 -0
- package/_cjs/accounts/privateKeyToAccount.js.map +1 -1
- package/_cjs/accounts/toAccount.js +1 -0
- package/_cjs/accounts/toAccount.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/experimental/eip3074/actions/signAuthMessage.js +18 -0
- package/_cjs/experimental/eip3074/actions/signAuthMessage.js.map +1 -0
- package/_cjs/experimental/eip3074/decorators/eip3074.js +13 -0
- package/_cjs/experimental/eip3074/decorators/eip3074.js.map +1 -0
- package/_cjs/experimental/eip3074/utils/recoverAuthMessageAddress.js +12 -0
- package/_cjs/experimental/eip3074/utils/recoverAuthMessageAddress.js.map +1 -0
- package/_cjs/experimental/eip3074/utils/signAuthMessage.js +17 -0
- package/_cjs/experimental/eip3074/utils/signAuthMessage.js.map +1 -0
- package/_cjs/experimental/eip3074/utils/toAuthMessage.js +17 -0
- package/_cjs/experimental/eip3074/utils/toAuthMessage.js.map +1 -0
- package/_cjs/experimental/eip3074/utils/verifyAuthMessage.js +11 -0
- package/_cjs/experimental/eip3074/utils/verifyAuthMessage.js.map +1 -0
- package/_cjs/experimental/{actions → eip5792/actions}/getCallsStatus.js +2 -2
- package/_cjs/experimental/eip5792/actions/getCallsStatus.js.map +1 -0
- package/_cjs/experimental/{actions → eip5792/actions}/getCapabilities.js +2 -2
- package/_cjs/experimental/eip5792/actions/getCapabilities.js.map +1 -0
- package/_cjs/experimental/{actions → eip5792/actions}/sendCalls.js +6 -6
- package/_cjs/experimental/eip5792/actions/sendCalls.js.map +1 -0
- package/_cjs/experimental/eip5792/actions/showCallsStatus.js.map +1 -0
- package/_cjs/experimental/{actions → eip5792/actions}/writeContracts.js +1 -1
- package/_cjs/experimental/eip5792/actions/writeContracts.js.map +1 -0
- package/_cjs/experimental/eip5792/decorators/eip5792.js.map +1 -0
- package/_cjs/experimental/index.js +15 -7
- package/_cjs/experimental/index.js.map +1 -1
- package/_cjs/utils/signature/hexToSignature.js.map +1 -1
- package/_esm/accounts/privateKeyToAccount.js +4 -0
- package/_esm/accounts/privateKeyToAccount.js.map +1 -1
- package/_esm/accounts/toAccount.js +1 -0
- package/_esm/accounts/toAccount.js.map +1 -1
- package/_esm/actions/public/verifyHash.js +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/experimental/eip3074/actions/signAuthMessage.js +69 -0
- package/_esm/experimental/eip3074/actions/signAuthMessage.js.map +1 -0
- package/_esm/experimental/eip3074/decorators/eip3074.js +26 -0
- package/_esm/experimental/eip3074/decorators/eip3074.js.map +1 -0
- package/_esm/experimental/eip3074/utils/recoverAuthMessageAddress.js +8 -0
- package/_esm/experimental/eip3074/utils/recoverAuthMessageAddress.js.map +1 -0
- package/_esm/experimental/eip3074/utils/signAuthMessage.js +16 -0
- package/_esm/experimental/eip3074/utils/signAuthMessage.js.map +1 -0
- package/_esm/experimental/eip3074/utils/toAuthMessage.js +17 -0
- package/_esm/experimental/eip3074/utils/toAuthMessage.js.map +1 -0
- package/_esm/experimental/eip3074/utils/verifyAuthMessage.js +13 -0
- package/_esm/experimental/eip3074/utils/verifyAuthMessage.js.map +1 -0
- package/_esm/experimental/{actions → eip5792/actions}/getCallsStatus.js +3 -3
- package/_esm/experimental/eip5792/actions/getCallsStatus.js.map +1 -0
- package/_esm/experimental/{actions → eip5792/actions}/getCapabilities.js +3 -3
- package/_esm/experimental/eip5792/actions/getCapabilities.js.map +1 -0
- package/_esm/experimental/{actions → eip5792/actions}/sendCalls.js +7 -7
- package/_esm/experimental/eip5792/actions/sendCalls.js.map +1 -0
- package/_esm/experimental/{actions → eip5792/actions}/showCallsStatus.js +1 -1
- package/_esm/experimental/eip5792/actions/showCallsStatus.js.map +1 -0
- package/_esm/experimental/{actions → eip5792/actions}/writeContracts.js +2 -2
- package/_esm/experimental/eip5792/actions/writeContracts.js.map +1 -0
- package/_esm/experimental/eip5792/decorators/eip5792.js.map +1 -0
- package/_esm/experimental/index.js +10 -6
- package/_esm/experimental/index.js.map +1 -1
- package/_esm/utils/signature/hexToSignature.js.map +1 -1
- package/_types/accounts/privateKeyToAccount.d.ts.map +1 -1
- package/_types/accounts/toAccount.d.ts.map +1 -1
- package/_types/accounts/types.d.ts +5 -3
- package/_types/accounts/types.d.ts.map +1 -1
- package/_types/actions/public/verifyHash.d.ts +1 -1
- package/_types/celo/chainConfig.d.ts +114 -114
- package/_types/celo/formatters.d.ts +57 -57
- package/_types/chains/definitions/ancient8.d.ts +45 -45
- package/_types/chains/definitions/ancient8Sepolia.d.ts +45 -45
- package/_types/chains/definitions/base.d.ts +45 -45
- package/_types/chains/definitions/baseGoerli.d.ts +45 -45
- package/_types/chains/definitions/baseSepolia.d.ts +45 -45
- package/_types/chains/definitions/celo.d.ts +114 -114
- package/_types/chains/definitions/celoAlfajores.d.ts +114 -114
- package/_types/chains/definitions/fraxtal.d.ts +45 -45
- package/_types/chains/definitions/fraxtalTestnet.d.ts +45 -45
- package/_types/chains/definitions/liskSepolia.d.ts +45 -45
- package/_types/chains/definitions/optimism.d.ts +45 -45
- package/_types/chains/definitions/optimismGoerli.d.ts +45 -45
- package/_types/chains/definitions/optimismSepolia.d.ts +45 -45
- package/_types/chains/definitions/pgn.d.ts +45 -45
- package/_types/chains/definitions/pgnTestnet.d.ts +45 -45
- package/_types/chains/definitions/rss3.d.ts +45 -45
- package/_types/chains/definitions/rss3Sepolia.d.ts +45 -45
- package/_types/chains/definitions/zora.d.ts +45 -45
- package/_types/chains/definitions/zoraSepolia.d.ts +45 -45
- package/_types/chains/definitions/zoraTestnet.d.ts +45 -45
- package/_types/errors/version.d.ts +1 -1
- package/_types/experimental/eip3074/actions/signAuthMessage.d.ts +72 -0
- package/_types/experimental/eip3074/actions/signAuthMessage.d.ts.map +1 -0
- package/_types/experimental/eip3074/decorators/eip3074.d.ts +27 -0
- package/_types/experimental/eip3074/decorators/eip3074.d.ts.map +1 -0
- package/_types/experimental/eip3074/utils/recoverAuthMessageAddress.d.ts +12 -0
- package/_types/experimental/eip3074/utils/recoverAuthMessageAddress.d.ts.map +1 -0
- package/_types/experimental/eip3074/utils/signAuthMessage.d.ts +16 -0
- package/_types/experimental/eip3074/utils/signAuthMessage.d.ts.map +1 -0
- package/_types/experimental/eip3074/utils/toAuthMessage.d.ts +20 -0
- package/_types/experimental/eip3074/utils/toAuthMessage.d.ts.map +1 -0
- package/_types/experimental/eip3074/utils/verifyAuthMessage.d.ts +19 -0
- package/_types/experimental/eip3074/utils/verifyAuthMessage.d.ts.map +1 -0
- package/_types/experimental/{actions → eip5792/actions}/getCallsStatus.d.ts +9 -9
- package/_types/experimental/eip5792/actions/getCallsStatus.d.ts.map +1 -0
- package/_types/experimental/{actions → eip5792/actions}/getCapabilities.d.ts +9 -9
- package/_types/experimental/eip5792/actions/getCapabilities.d.ts.map +1 -0
- package/_types/experimental/{actions → eip5792/actions}/sendCalls.d.ts +10 -10
- package/_types/experimental/eip5792/actions/sendCalls.d.ts.map +1 -0
- package/_types/experimental/{actions → eip5792/actions}/showCallsStatus.d.ts +7 -7
- package/_types/experimental/eip5792/actions/showCallsStatus.d.ts.map +1 -0
- package/_types/experimental/{actions → eip5792/actions}/writeContracts.d.ts +9 -9
- package/_types/experimental/eip5792/actions/writeContracts.d.ts.map +1 -0
- package/_types/experimental/{decorators → eip5792/decorators}/eip5792.d.ts +9 -9
- package/_types/experimental/eip5792/decorators/eip5792.d.ts.map +1 -0
- package/_types/experimental/index.d.ts +10 -6
- package/_types/experimental/index.d.ts.map +1 -1
- package/_types/op-stack/chainConfig.d.ts +45 -45
- package/_types/op-stack/formatters.d.ts +45 -45
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/utils/signature/hexToSignature.d.ts +7 -2
- package/_types/utils/signature/hexToSignature.d.ts.map +1 -1
- package/accounts/privateKeyToAccount.ts +5 -1
- package/accounts/toAccount.ts +1 -0
- package/accounts/types.ts +12 -5
- package/actions/public/verifyHash.ts +1 -1
- package/errors/version.ts +1 -1
- package/experimental/eip3074/actions/signAuthMessage.ts +103 -0
- package/experimental/eip3074/decorators/eip3074.ts +51 -0
- package/experimental/eip3074/utils/recoverAuthMessageAddress.ts +29 -0
- package/experimental/eip3074/utils/signAuthMessage.ts +40 -0
- package/experimental/eip3074/utils/toAuthMessage.ts +50 -0
- package/experimental/eip3074/utils/verifyAuthMessage.ts +46 -0
- package/experimental/{actions → eip5792/actions}/getCallsStatus.ts +11 -11
- package/experimental/{actions → eip5792/actions}/getCapabilities.ts +11 -11
- package/experimental/{actions → eip5792/actions}/sendCalls.ts +17 -17
- package/experimental/{actions → eip5792/actions}/showCallsStatus.ts +7 -7
- package/experimental/{actions → eip5792/actions}/writeContracts.ts +9 -9
- package/experimental/{decorators → eip5792/decorators}/eip5792.ts +9 -9
- package/experimental/index.ts +29 -7
- package/package.json +1 -1
- package/utils/signature/hexToSignature.ts +2 -2
- package/_cjs/experimental/actions/getCallsStatus.js.map +0 -1
- package/_cjs/experimental/actions/getCapabilities.js.map +0 -1
- package/_cjs/experimental/actions/sendCalls.js.map +0 -1
- package/_cjs/experimental/actions/showCallsStatus.js.map +0 -1
- package/_cjs/experimental/actions/writeContracts.js.map +0 -1
- package/_cjs/experimental/decorators/eip5792.js.map +0 -1
- package/_esm/experimental/actions/getCallsStatus.js.map +0 -1
- package/_esm/experimental/actions/getCapabilities.js.map +0 -1
- package/_esm/experimental/actions/sendCalls.js.map +0 -1
- package/_esm/experimental/actions/showCallsStatus.js.map +0 -1
- package/_esm/experimental/actions/writeContracts.js.map +0 -1
- package/_esm/experimental/decorators/eip5792.js.map +0 -1
- package/_types/experimental/actions/getCallsStatus.d.ts.map +0 -1
- package/_types/experimental/actions/getCapabilities.d.ts.map +0 -1
- package/_types/experimental/actions/sendCalls.d.ts.map +0 -1
- package/_types/experimental/actions/showCallsStatus.d.ts.map +0 -1
- package/_types/experimental/actions/writeContracts.d.ts.map +0 -1
- package/_types/experimental/decorators/eip5792.d.ts.map +0 -1
- /package/_cjs/experimental/{actions → eip5792/actions}/showCallsStatus.js +0 -0
- /package/_cjs/experimental/{decorators → eip5792/decorators}/eip5792.js +0 -0
- /package/_esm/experimental/{decorators → eip5792/decorators}/eip5792.js +0 -0
@@ -97,19 +97,19 @@ export declare const zoraTestnet: {
|
|
97
97
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
98
98
|
maxFeePerGas?: `0x${string}` | undefined;
|
99
99
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
100
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
100
101
|
to?: `0x${string}` | null;
|
101
102
|
from?: `0x${string}`;
|
102
103
|
gas?: `0x${string}`;
|
103
104
|
nonce?: `0x${string}`;
|
104
105
|
value?: `0x${string}`;
|
105
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
106
|
-
accessList?: undefined;
|
107
|
-
blobVersionedHashes?: undefined;
|
108
106
|
blockHash?: `0x${string}` | null;
|
109
107
|
blockNumber?: `0x${string}` | null;
|
110
108
|
hash?: `0x${string}`;
|
111
109
|
input?: `0x${string}`;
|
112
110
|
transactionIndex?: `0x${string}` | null;
|
111
|
+
accessList?: undefined;
|
112
|
+
blobVersionedHashes?: undefined;
|
113
113
|
chainId?: `0x${string}` | undefined;
|
114
114
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
115
115
|
r: `0x${string}`;
|
@@ -148,19 +148,19 @@ export declare const zoraTestnet: {
|
|
148
148
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
149
149
|
maxFeePerGas?: `0x${string}` | undefined;
|
150
150
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
151
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
151
152
|
to?: `0x${string}` | null;
|
152
153
|
from?: `0x${string}`;
|
153
154
|
gas?: `0x${string}`;
|
154
155
|
nonce?: `0x${string}`;
|
155
156
|
value?: `0x${string}`;
|
156
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
157
|
-
accessList?: undefined;
|
158
|
-
blobVersionedHashes?: undefined;
|
159
157
|
blockHash?: `0x${string}` | null;
|
160
158
|
blockNumber?: `0x${string}` | null;
|
161
159
|
hash?: `0x${string}`;
|
162
160
|
input?: `0x${string}`;
|
163
161
|
transactionIndex?: `0x${string}` | null;
|
162
|
+
accessList?: undefined;
|
163
|
+
blobVersionedHashes?: undefined;
|
164
164
|
chainId?: `0x${string}` | undefined;
|
165
165
|
} & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
166
166
|
isSystemTx?: boolean | undefined;
|
@@ -176,19 +176,19 @@ export declare const zoraTestnet: {
|
|
176
176
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
177
177
|
maxFeePerGas?: `0x${string}` | undefined;
|
178
178
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
179
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
179
180
|
to?: `0x${string}` | null;
|
180
181
|
from?: `0x${string}`;
|
181
182
|
gas?: `0x${string}`;
|
182
183
|
nonce?: `0x${string}`;
|
183
184
|
value?: `0x${string}`;
|
184
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
185
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
186
|
-
blobVersionedHashes?: undefined;
|
187
185
|
blockHash?: `0x${string}` | null;
|
188
186
|
blockNumber?: `0x${string}` | null;
|
189
187
|
hash?: `0x${string}`;
|
190
188
|
input?: `0x${string}`;
|
191
189
|
transactionIndex?: `0x${string}` | null;
|
190
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
191
|
+
blobVersionedHashes?: undefined;
|
192
192
|
chainId?: `0x${string}` | undefined;
|
193
193
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
194
194
|
r: `0x${string}`;
|
@@ -227,19 +227,19 @@ export declare const zoraTestnet: {
|
|
227
227
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
228
228
|
maxFeePerGas?: `0x${string}` | undefined;
|
229
229
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
230
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
230
231
|
to?: `0x${string}` | null;
|
231
232
|
from?: `0x${string}`;
|
232
233
|
gas?: `0x${string}`;
|
233
234
|
nonce?: `0x${string}`;
|
234
235
|
value?: `0x${string}`;
|
235
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
236
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
237
|
-
blobVersionedHashes?: undefined;
|
238
236
|
blockHash?: `0x${string}` | null;
|
239
237
|
blockNumber?: `0x${string}` | null;
|
240
238
|
hash?: `0x${string}`;
|
241
239
|
input?: `0x${string}`;
|
242
240
|
transactionIndex?: `0x${string}` | null;
|
241
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
242
|
+
blobVersionedHashes?: undefined;
|
243
243
|
chainId?: `0x${string}` | undefined;
|
244
244
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
245
245
|
blockHash: `0x${string}` | null;
|
@@ -278,19 +278,19 @@ export declare const zoraTestnet: {
|
|
278
278
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
279
279
|
maxFeePerGas?: `0x${string}` | undefined;
|
280
280
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
281
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
281
282
|
to?: `0x${string}` | null;
|
282
283
|
from?: `0x${string}`;
|
283
284
|
gas?: `0x${string}`;
|
284
285
|
nonce?: `0x${string}`;
|
285
286
|
value?: `0x${string}`;
|
286
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
287
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
288
|
-
blobVersionedHashes?: undefined;
|
289
287
|
blockHash?: `0x${string}` | null;
|
290
288
|
blockNumber?: `0x${string}` | null;
|
291
289
|
hash?: `0x${string}`;
|
292
290
|
input?: `0x${string}`;
|
293
291
|
transactionIndex?: `0x${string}` | null;
|
292
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
293
|
+
blobVersionedHashes?: undefined;
|
294
294
|
chainId?: `0x${string}` | undefined;
|
295
295
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
296
296
|
blockHash: `0x${string}` | null;
|
@@ -329,19 +329,19 @@ export declare const zoraTestnet: {
|
|
329
329
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
330
330
|
maxFeePerGas?: `0x${string}` | undefined;
|
331
331
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
332
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
332
333
|
to?: `0x${string}` | null;
|
333
334
|
from?: `0x${string}`;
|
334
335
|
gas?: `0x${string}`;
|
335
336
|
nonce?: `0x${string}`;
|
336
337
|
value?: `0x${string}`;
|
337
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
338
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
339
|
-
blobVersionedHashes?: undefined;
|
340
338
|
blockHash?: `0x${string}` | null;
|
341
339
|
blockNumber?: `0x${string}` | null;
|
342
340
|
hash?: `0x${string}`;
|
343
341
|
input?: `0x${string}`;
|
344
342
|
transactionIndex?: `0x${string}` | null;
|
343
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
344
|
+
blobVersionedHashes?: undefined;
|
345
345
|
chainId?: `0x${string}` | undefined;
|
346
346
|
} & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
347
347
|
isSystemTx?: boolean | undefined;
|
@@ -357,19 +357,19 @@ export declare const zoraTestnet: {
|
|
357
357
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
358
358
|
maxFeePerGas?: `0x${string}` | undefined;
|
359
359
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
360
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
360
361
|
to?: `0x${string}` | null;
|
361
362
|
from?: `0x${string}`;
|
362
363
|
gas?: `0x${string}`;
|
363
364
|
nonce?: `0x${string}`;
|
364
365
|
value?: `0x${string}`;
|
365
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
366
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
367
|
-
blobVersionedHashes?: undefined;
|
368
366
|
blockHash?: `0x${string}` | null;
|
369
367
|
blockNumber?: `0x${string}` | null;
|
370
368
|
hash?: `0x${string}`;
|
371
369
|
input?: `0x${string}`;
|
372
370
|
transactionIndex?: `0x${string}` | null;
|
371
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
372
|
+
blobVersionedHashes?: undefined;
|
373
373
|
chainId?: `0x${string}` | undefined;
|
374
374
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
375
375
|
r: `0x${string}`;
|
@@ -408,19 +408,19 @@ export declare const zoraTestnet: {
|
|
408
408
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
409
409
|
maxFeePerGas?: `0x${string}` | undefined;
|
410
410
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
411
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
411
412
|
to?: `0x${string}` | null;
|
412
413
|
from?: `0x${string}`;
|
413
414
|
gas?: `0x${string}`;
|
414
415
|
nonce?: `0x${string}`;
|
415
416
|
value?: `0x${string}`;
|
416
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
417
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
418
|
-
blobVersionedHashes?: undefined;
|
419
417
|
blockHash?: `0x${string}` | null;
|
420
418
|
blockNumber?: `0x${string}` | null;
|
421
419
|
hash?: `0x${string}`;
|
422
420
|
input?: `0x${string}`;
|
423
421
|
transactionIndex?: `0x${string}` | null;
|
422
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
423
|
+
blobVersionedHashes?: undefined;
|
424
424
|
chainId?: `0x${string}` | undefined;
|
425
425
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
426
426
|
blockHash: `0x${string}` | null;
|
@@ -459,19 +459,19 @@ export declare const zoraTestnet: {
|
|
459
459
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
460
460
|
maxFeePerGas?: `0x${string}` | undefined;
|
461
461
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
462
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
462
463
|
to?: `0x${string}` | null;
|
463
464
|
from?: `0x${string}`;
|
464
465
|
gas?: `0x${string}`;
|
465
466
|
nonce?: `0x${string}`;
|
466
467
|
value?: `0x${string}`;
|
467
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
468
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
469
|
-
blobVersionedHashes?: undefined;
|
470
468
|
blockHash?: `0x${string}` | null;
|
471
469
|
blockNumber?: `0x${string}` | null;
|
472
470
|
hash?: `0x${string}`;
|
473
471
|
input?: `0x${string}`;
|
474
472
|
transactionIndex?: `0x${string}` | null;
|
473
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
474
|
+
blobVersionedHashes?: undefined;
|
475
475
|
chainId?: `0x${string}` | undefined;
|
476
476
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
477
477
|
blockHash: `0x${string}` | null;
|
@@ -510,19 +510,19 @@ export declare const zoraTestnet: {
|
|
510
510
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
511
511
|
maxFeePerGas?: `0x${string}` | undefined;
|
512
512
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
513
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
513
514
|
to?: `0x${string}` | null;
|
514
515
|
from?: `0x${string}`;
|
515
516
|
gas?: `0x${string}`;
|
516
517
|
nonce?: `0x${string}`;
|
517
518
|
value?: `0x${string}`;
|
518
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
519
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
520
|
-
blobVersionedHashes?: undefined;
|
521
519
|
blockHash?: `0x${string}` | null;
|
522
520
|
blockNumber?: `0x${string}` | null;
|
523
521
|
hash?: `0x${string}`;
|
524
522
|
input?: `0x${string}`;
|
525
523
|
transactionIndex?: `0x${string}` | null;
|
524
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
525
|
+
blobVersionedHashes?: undefined;
|
526
526
|
chainId?: `0x${string}` | undefined;
|
527
527
|
} & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
528
528
|
isSystemTx?: boolean | undefined;
|
@@ -538,19 +538,19 @@ export declare const zoraTestnet: {
|
|
538
538
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
539
539
|
maxFeePerGas?: `0x${string}` | undefined;
|
540
540
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
541
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
541
542
|
to?: `0x${string}` | null;
|
542
543
|
from?: `0x${string}`;
|
543
544
|
gas?: `0x${string}`;
|
544
545
|
nonce?: `0x${string}`;
|
545
546
|
value?: `0x${string}`;
|
546
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
547
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
548
|
-
blobVersionedHashes?: `0x${string}`[] | undefined;
|
549
547
|
blockHash?: `0x${string}` | null;
|
550
548
|
blockNumber?: `0x${string}` | null;
|
551
549
|
hash?: `0x${string}`;
|
552
550
|
input?: `0x${string}`;
|
553
551
|
transactionIndex?: `0x${string}` | null;
|
552
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
553
|
+
blobVersionedHashes?: `0x${string}`[] | undefined;
|
554
554
|
chainId?: `0x${string}` | undefined;
|
555
555
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
556
556
|
r: `0x${string}`;
|
@@ -589,19 +589,19 @@ export declare const zoraTestnet: {
|
|
589
589
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
590
590
|
maxFeePerGas?: `0x${string}` | undefined;
|
591
591
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
592
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
592
593
|
to?: `0x${string}` | null;
|
593
594
|
from?: `0x${string}`;
|
594
595
|
gas?: `0x${string}`;
|
595
596
|
nonce?: `0x${string}`;
|
596
597
|
value?: `0x${string}`;
|
597
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
598
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
599
|
-
blobVersionedHashes?: `0x${string}`[] | undefined;
|
600
598
|
blockHash?: `0x${string}` | null;
|
601
599
|
blockNumber?: `0x${string}` | null;
|
602
600
|
hash?: `0x${string}`;
|
603
601
|
input?: `0x${string}`;
|
604
602
|
transactionIndex?: `0x${string}` | null;
|
603
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
604
|
+
blobVersionedHashes?: `0x${string}`[] | undefined;
|
605
605
|
chainId?: `0x${string}` | undefined;
|
606
606
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
607
607
|
blockHash: `0x${string}` | null;
|
@@ -640,19 +640,19 @@ export declare const zoraTestnet: {
|
|
640
640
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
641
641
|
maxFeePerGas?: `0x${string}` | undefined;
|
642
642
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
643
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
643
644
|
to?: `0x${string}` | null;
|
644
645
|
from?: `0x${string}`;
|
645
646
|
gas?: `0x${string}`;
|
646
647
|
nonce?: `0x${string}`;
|
647
648
|
value?: `0x${string}`;
|
648
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
649
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
650
|
-
blobVersionedHashes?: `0x${string}`[] | undefined;
|
651
649
|
blockHash?: `0x${string}` | null;
|
652
650
|
blockNumber?: `0x${string}` | null;
|
653
651
|
hash?: `0x${string}`;
|
654
652
|
input?: `0x${string}`;
|
655
653
|
transactionIndex?: `0x${string}` | null;
|
654
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
655
|
+
blobVersionedHashes?: `0x${string}`[] | undefined;
|
656
656
|
chainId?: `0x${string}` | undefined;
|
657
657
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
658
658
|
blockHash: `0x${string}` | null;
|
@@ -691,19 +691,19 @@ export declare const zoraTestnet: {
|
|
691
691
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
692
692
|
maxFeePerGas?: `0x${string}` | undefined;
|
693
693
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
694
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
694
695
|
to?: `0x${string}` | null;
|
695
696
|
from?: `0x${string}`;
|
696
697
|
gas?: `0x${string}`;
|
697
698
|
nonce?: `0x${string}`;
|
698
699
|
value?: `0x${string}`;
|
699
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
700
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
701
|
-
blobVersionedHashes?: `0x${string}`[] | undefined;
|
702
700
|
blockHash?: `0x${string}` | null;
|
703
701
|
blockNumber?: `0x${string}` | null;
|
704
702
|
hash?: `0x${string}`;
|
705
703
|
input?: `0x${string}`;
|
706
704
|
transactionIndex?: `0x${string}` | null;
|
705
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
706
|
+
blobVersionedHashes?: `0x${string}`[] | undefined;
|
707
707
|
chainId?: `0x${string}` | undefined;
|
708
708
|
} & import("../index.js").Omit<import("../index.js").PartialBy<{
|
709
709
|
blockHash: `0x${string}` | null;
|
@@ -742,19 +742,19 @@ export declare const zoraTestnet: {
|
|
742
742
|
maxFeePerBlobGas?: `0x${string}` | undefined;
|
743
743
|
maxFeePerGas?: `0x${string}` | undefined;
|
744
744
|
maxPriorityFeePerGas?: `0x${string}` | undefined;
|
745
|
+
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
745
746
|
to?: `0x${string}` | null;
|
746
747
|
from?: `0x${string}`;
|
747
748
|
gas?: `0x${string}`;
|
748
749
|
nonce?: `0x${string}`;
|
749
750
|
value?: `0x${string}`;
|
750
|
-
type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
|
751
|
-
accessList?: import("../../index.js").AccessList | undefined;
|
752
|
-
blobVersionedHashes?: `0x${string}`[] | undefined;
|
753
751
|
blockHash?: `0x${string}` | null;
|
754
752
|
blockNumber?: `0x${string}` | null;
|
755
753
|
hash?: `0x${string}`;
|
756
754
|
input?: `0x${string}`;
|
757
755
|
transactionIndex?: `0x${string}` | null;
|
756
|
+
accessList?: import("../../index.js").AccessList | undefined;
|
757
|
+
blobVersionedHashes?: `0x${string}`[] | undefined;
|
758
758
|
chainId?: `0x${string}` | undefined;
|
759
759
|
} & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
760
760
|
isSystemTx?: boolean | undefined;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "0.0.0-main.
|
1
|
+
export declare const version = "0.0.0-main.20240419T024614";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import type { Client } from '../../../clients/createClient.js';
|
2
|
+
import type { Transport } from '../../../clients/transports/createTransport.js';
|
3
|
+
import type { ErrorType } from '../../../errors/utils.js';
|
4
|
+
import type { Account, PrivateKeyAccount } from '../../../types/account.js';
|
5
|
+
import type { Chain } from '../../../types/chain.js';
|
6
|
+
import type { Hex } from '../../../types/misc.js';
|
7
|
+
import type { IsUndefined } from '../../../types/utils.js';
|
8
|
+
import type { ToAuthMessageParameters } from '../utils/toAuthMessage.js';
|
9
|
+
export type SignAuthMessageParameters<account extends Account | undefined = Account | undefined> = ToAuthMessageParameters & (IsUndefined<account> extends true ? {
|
10
|
+
account: PrivateKeyAccount;
|
11
|
+
} : account extends PrivateKeyAccount ? {
|
12
|
+
account?: PrivateKeyAccount | undefined;
|
13
|
+
} : {
|
14
|
+
account: PrivateKeyAccount;
|
15
|
+
});
|
16
|
+
export type SignAuthMessageReturnType = Hex;
|
17
|
+
export type SignAuthMessageErrorType = ErrorType;
|
18
|
+
/**
|
19
|
+
* Calculates an [EIP-3074](https://eips.ethereum.org/EIPS/eip-3074) auth signature.
|
20
|
+
*
|
21
|
+
* With the calculated signature, you can:
|
22
|
+
* - pass it to an EIP-3074 compatible invoker contract,
|
23
|
+
* - use [`verifyAuthMessage`](/experimental/eip3074/verifyAuthMessage) to verify the signature,
|
24
|
+
* - use [`recoverAuthMessageAddress`](/experimental/eip3074/recoverAuthMessageAddress) to recover the signing address from a signature.
|
25
|
+
*
|
26
|
+
* @param client - Client to use
|
27
|
+
* @param parameters - {@link SignAuthMessageParameters}
|
28
|
+
* @returns The signed auth message. {@link SignAuthMessageReturnType}
|
29
|
+
*
|
30
|
+
* @example
|
31
|
+
* import { createWalletClient, http } from 'viem'
|
32
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
33
|
+
* import { mainnet } from 'viem/chains'
|
34
|
+
* import { signAuthMessage } from 'viem/experimental'
|
35
|
+
*
|
36
|
+
* const account = privateKeyToAccount('0x...')
|
37
|
+
*
|
38
|
+
* const client = createWalletClient({
|
39
|
+
* chain: mainnet,
|
40
|
+
* transport: http(),
|
41
|
+
* })
|
42
|
+
*
|
43
|
+
* const signature = await signAuthMessage(client, {
|
44
|
+
* account,
|
45
|
+
* chainId: 1,
|
46
|
+
* commit: keccak256('0x1234'),
|
47
|
+
* invokerAddress: '0x0000000000000000000000000000000000000000',
|
48
|
+
* nonce: 69,
|
49
|
+
* })
|
50
|
+
*
|
51
|
+
* @example
|
52
|
+
* // Account Hoisting
|
53
|
+
* import { createWalletClient, http } from 'viem'
|
54
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
55
|
+
* import { mainnet } from 'viem/chains'
|
56
|
+
* import { signAuthMessage } from 'viem/experimental'
|
57
|
+
*
|
58
|
+
* const client = createWalletClient({
|
59
|
+
* account: privateKeyToAccount('0x…'),
|
60
|
+
* chain: mainnet,
|
61
|
+
* transport: http(),
|
62
|
+
* })
|
63
|
+
*
|
64
|
+
* const signature = await signAuthMessage(client, {
|
65
|
+
* chainId: 1,
|
66
|
+
* commit: keccak256('0x1234'),
|
67
|
+
* invokerAddress: '0x0000000000000000000000000000000000000000',
|
68
|
+
* nonce: 69,
|
69
|
+
* })
|
70
|
+
*/
|
71
|
+
export declare function signAuthMessage<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, { account, chainId, commit, invokerAddress, nonce, }: SignAuthMessageParameters<account>): Promise<SignAuthMessageReturnType>;
|
72
|
+
//# sourceMappingURL=signAuthMessage.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signAuthMessage.d.ts","sourceRoot":"","sources":["../../../../experimental/eip3074/actions/signAuthMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAExE,MAAM,MAAM,yBAAyB,CACnC,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,IACvD,uBAAuB,GAEzB,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,IAAI,GAC9B;IAAE,OAAO,EAAE,iBAAiB,CAAA;CAAE,GAC9B,OAAO,SAAS,iBAAiB,GAC/B;IAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAA;CAAE,GAC3C;IAAE,OAAO,EAAE,iBAAiB,CAAA;CAAE,CAAC,CAAA;AAEvC,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAA;AAE3C,MAAM,MAAM,wBAAwB,GAAG,SAAS,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAsB,eAAe,CACnC,KAAK,SAAS,KAAK,GAAG,SAAS,EAE/B,OAAO,SAAS,OAAO,GAAG,SAAS,EAEnC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACzC,EAEE,OAAwB,EACxB,OAAO,EACP,MAAM,EACN,cAAc,EACd,KAAK,GACN,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACpC,OAAO,CAAC,yBAAyB,CAAC,CAWpC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { Client } from '../../../clients/createClient.js';
|
2
|
+
import type { Transport } from '../../../clients/transports/createTransport.js';
|
3
|
+
import type { Account, PrivateKeyAccount } from '../../../types/account.js';
|
4
|
+
import type { Chain } from '../../../types/chain.js';
|
5
|
+
import { type SignAuthMessageParameters, type SignAuthMessageReturnType } from '../actions/signAuthMessage.js';
|
6
|
+
export type WalletActionsEip3074<account extends Account | undefined = Account | undefined> = {
|
7
|
+
signAuthMessage: (parameters: SignAuthMessageParameters<account extends PrivateKeyAccount ? account : undefined>) => Promise<SignAuthMessageReturnType>;
|
8
|
+
};
|
9
|
+
/**
|
10
|
+
* A suite of EIP-3074 Wallet Actions.
|
11
|
+
*
|
12
|
+
* - Docs: https://viem.sh/experimental
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* import { createPublicClient, createWalletClient, http } from 'viem'
|
16
|
+
* import { mainnet } from 'viem/chains'
|
17
|
+
* import { walletActionsEip3074 } from 'viem/experimental'
|
18
|
+
*
|
19
|
+
* const walletClient = createWalletClient({
|
20
|
+
* chain: mainnet,
|
21
|
+
* transport: http(),
|
22
|
+
* }).extend(walletActionsEip3074())
|
23
|
+
*
|
24
|
+
* const signature = await walletClient.signAuthMessage({...})
|
25
|
+
*/
|
26
|
+
export declare function walletActionsEip3074(): <transport extends Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined>(client: Client<transport, chain, account>) => WalletActionsEip3074<account>;
|
27
|
+
//# sourceMappingURL=eip3074.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eip3074.d.ts","sourceRoot":"","sources":["../../../../experimental/eip3074/decorators/eip3074.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAE/B,MAAM,+BAA+B,CAAA;AAEtC,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,IACvD;IACF,eAAe,EAAE,CACf,UAAU,EAAE,yBAAyB,CACnC,OAAO,SAAS,iBAAiB,GAAG,OAAO,GAAG,SAAS,CACxD,KACE,OAAO,CAAC,yBAAyB,CAAC,CAAA;CACxC,CAAA;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,0JAMxB,OAAO,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,KACxC,qBAAqB,OAAO,CAAC,CAMjC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { Address } from 'abitype';
|
2
|
+
import type { ByteArray, Hex } from '../../../types/misc.js';
|
3
|
+
import type { ErrorType } from '../../../errors/utils.js';
|
4
|
+
import { type RecoverAddressErrorType } from '../../../utils/signature/recoverAddress.js';
|
5
|
+
import { type ToAuthMessageParameters } from './toAuthMessage.js';
|
6
|
+
export type RecoverAuthMessageAddressParameters = ToAuthMessageParameters & {
|
7
|
+
signature: Hex | ByteArray;
|
8
|
+
};
|
9
|
+
export type RecoverAuthMessageAddressReturnType = Address;
|
10
|
+
export type RecoverAuthMessageAddressErrorType = RecoverAddressErrorType | ErrorType;
|
11
|
+
export declare function recoverAuthMessageAddress({ signature, ...parameters }: RecoverAuthMessageAddressParameters): Promise<RecoverAuthMessageAddressReturnType>;
|
12
|
+
//# sourceMappingURL=recoverAuthMessageAddress.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"recoverAuthMessageAddress.d.ts","sourceRoot":"","sources":["../../../../experimental/eip3074/utils/recoverAuthMessageAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,4CAA4C,CAAA;AACnD,OAAO,EAAE,KAAK,uBAAuB,EAAiB,MAAM,oBAAoB,CAAA;AAEhF,MAAM,MAAM,mCAAmC,GAAG,uBAAuB,GAAG;IAC1E,SAAS,EAAE,GAAG,GAAG,SAAS,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG,OAAO,CAAA;AAEzD,MAAM,MAAM,kCAAkC,GAC1C,uBAAuB,GACvB,SAAS,CAAA;AAEb,wBAAsB,yBAAyB,CAAC,EAC9C,SAAS,EACT,GAAG,UAAU,EACd,EAAE,mCAAmC,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAGpF"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { type SignErrorType } from '../../../accounts/utils/sign.js';
|
2
|
+
import type { ErrorType } from '../../../errors/utils.js';
|
3
|
+
import type { Hex } from '../../../types/misc.js';
|
4
|
+
import { type SignatureToHexErrorType } from '../../../utils/signature/signatureToHex.js';
|
5
|
+
import { type ToAuthMessageErrorType, type ToAuthMessageParameters } from './toAuthMessage.js';
|
6
|
+
export type SignAuthMessageParameters = ToAuthMessageParameters & {
|
7
|
+
/** The private key to sign with. */
|
8
|
+
privateKey: Hex;
|
9
|
+
};
|
10
|
+
export type SignAuthMessageReturnType = Hex;
|
11
|
+
export type SignAuthMessageErrorType = SignErrorType | ToAuthMessageErrorType | SignatureToHexErrorType | ErrorType;
|
12
|
+
/**
|
13
|
+
* Computes a EIP-3074 authorization signature in format: `keccak256(MAGIC || chainId || nonce || invokerAddress || commit))`.
|
14
|
+
*/
|
15
|
+
export declare function signAuthMessage(parameters: SignAuthMessageParameters): Promise<SignAuthMessageReturnType>;
|
16
|
+
//# sourceMappingURL=signAuthMessage.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signAuthMessage.d.ts","sourceRoot":"","sources":["../../../../experimental/eip3074/utils/signAuthMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,iCAAiC,CAAA;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAA;AAEjD,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,4CAA4C,CAAA;AACnD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAE7B,MAAM,oBAAoB,CAAA;AAE3B,MAAM,MAAM,yBAAyB,GAAG,uBAAuB,GAAG;IAChE,oCAAoC;IACpC,UAAU,EAAE,GAAG,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,GAAG,CAAA;AAE3C,MAAM,MAAM,wBAAwB,GAChC,aAAa,GACb,sBAAsB,GACtB,uBAAuB,GACvB,SAAS,CAAA;AAEb;;GAEG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,yBAAyB,GACpC,OAAO,CAAC,yBAAyB,CAAC,CAOpC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { Address } from 'abitype';
|
2
|
+
import type { ErrorType } from '../../../errors/utils.js';
|
3
|
+
import type { Hash } from '../../../types/misc.js';
|
4
|
+
import { type EncodePackedErrorType } from '../../../utils/abi/encodePacked.js';
|
5
|
+
import { type PadHexErrorType } from '../../../utils/data/pad.js';
|
6
|
+
import { type NumberToHexErrorType } from '../../../utils/encoding/toHex.js';
|
7
|
+
import { type Keccak256ErrorType } from '../../../utils/hash/keccak256.js';
|
8
|
+
export type ToAuthMessageParameters = {
|
9
|
+
chainId: number;
|
10
|
+
commit: Hash;
|
11
|
+
invokerAddress: Address;
|
12
|
+
nonce: number;
|
13
|
+
};
|
14
|
+
export type ToAuthMessageReturnType = Hash;
|
15
|
+
export type ToAuthMessageErrorType = Keccak256ErrorType | EncodePackedErrorType | NumberToHexErrorType | PadHexErrorType | ErrorType;
|
16
|
+
/**
|
17
|
+
* Returns the message to be signed for EIP-3074 authorization.
|
18
|
+
*/
|
19
|
+
export declare function toAuthMessage({ chainId, commit, invokerAddress, nonce, }: ToAuthMessageParameters): ToAuthMessageReturnType;
|
20
|
+
//# sourceMappingURL=toAuthMessage.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"toAuthMessage.d.ts","sourceRoot":"","sources":["../../../../experimental/eip3074/utils/toAuthMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,4BAA4B,CAAA;AACzE,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAE1E,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,IAAI,CAAA;IACZ,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAA;AAE1C,MAAM,MAAM,sBAAsB,GAC9B,kBAAkB,GAClB,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,GACf,SAAS,CAAA;AAEb;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,cAAc,EACd,KAAK,GACN,EAAE,uBAAuB,GAAG,uBAAuB,CAWnD"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { Address } from 'abitype';
|
2
|
+
import type { ErrorType } from '../../../errors/utils.js';
|
3
|
+
import { type GetAddressErrorType } from '../../../utils/address/getAddress.js';
|
4
|
+
import { type IsAddressEqualErrorType } from '../../../utils/address/isAddressEqual.js';
|
5
|
+
import { type RecoverAuthMessageAddressErrorType, type RecoverAuthMessageAddressParameters } from './recoverAuthMessageAddress.js';
|
6
|
+
export type VerifyAuthMessageParameters = RecoverAuthMessageAddressParameters & {
|
7
|
+
/** The address that signed the original auth message. */
|
8
|
+
address: Address;
|
9
|
+
};
|
10
|
+
export type VerifyAuthMessageReturnType = boolean;
|
11
|
+
export type VerifyAuthMessageErrorType = IsAddressEqualErrorType | GetAddressErrorType | RecoverAuthMessageAddressErrorType | ErrorType;
|
12
|
+
/**
|
13
|
+
* Verify that a auth message was signed by the provided address.
|
14
|
+
*
|
15
|
+
* @param parameters - {@link VerifyAuthMessageParameters}
|
16
|
+
* @returns Whether or not the signature is valid. {@link VerifyAuthMessageReturnType}
|
17
|
+
*/
|
18
|
+
export declare function verifyAuthMessage({ address, ...parameters }: VerifyAuthMessageParameters): Promise<VerifyAuthMessageReturnType>;
|
19
|
+
//# sourceMappingURL=verifyAuthMessage.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"verifyAuthMessage.d.ts","sourceRoot":"","sources":["../../../../experimental/eip3074/utils/verifyAuthMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,0CAA0C,CAAA;AACjD,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EAEzC,MAAM,gCAAgC,CAAA;AAEvC,MAAM,MAAM,2BAA2B,GACrC,mCAAmC,GAAG;IACpC,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAEH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAA;AAEjD,MAAM,MAAM,0BAA0B,GAClC,uBAAuB,GACvB,mBAAmB,GACnB,kCAAkC,GAClC,SAAS,CAAA;AAEb;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,GAAG,UAAU,EACd,EAAE,2BAA2B,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAKpE"}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import type { Client } from '
|
2
|
-
import type { Transport } from '
|
3
|
-
import type { ErrorType } from '
|
4
|
-
import type { Account } from '
|
5
|
-
import type { Chain } from '
|
6
|
-
import type { WalletGetCallsStatusReturnType } from '
|
7
|
-
import type { Prettify } from '
|
8
|
-
import type { RequestErrorType } from '
|
1
|
+
import type { Client } from '../../../clients/createClient.js';
|
2
|
+
import type { Transport } from '../../../clients/transports/createTransport.js';
|
3
|
+
import type { ErrorType } from '../../../errors/utils.js';
|
4
|
+
import type { Account } from '../../../types/account.js';
|
5
|
+
import type { Chain } from '../../../types/chain.js';
|
6
|
+
import type { WalletGetCallsStatusReturnType } from '../../../types/eip1193.js';
|
7
|
+
import type { Prettify } from '../../../types/utils.js';
|
8
|
+
import type { RequestErrorType } from '../../../utils/buildRequest.js';
|
9
9
|
export type GetCallsStatusParameters = {
|
10
10
|
id: string;
|
11
11
|
};
|
@@ -14,7 +14,7 @@ export type GetCallsStatusErrorType = RequestErrorType | ErrorType;
|
|
14
14
|
/**
|
15
15
|
* Returns the status of a call batch that was sent via `sendCalls`.
|
16
16
|
*
|
17
|
-
* - Docs: https://viem.sh/experimental/
|
17
|
+
* - Docs: https://viem.sh/experimental/eip5792/getCallsStatus
|
18
18
|
* - JSON-RPC Methods: [`wallet_getCallsStatus`](https://eips.ethereum.org/EIPS/eip-5792)
|
19
19
|
*
|
20
20
|
* @param client - Client to use
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getCallsStatus.d.ts","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCallsStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAItE,MAAM,MAAM,wBAAwB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAErD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAC7C,8BAA8B,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC,CAC/D,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG,SAAS,CAAA;AAElE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,cAAc,CAClC,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,OAAO,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAE/C,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACzC,UAAU,EAAE,wBAAwB,GACnC,OAAO,CAAC,wBAAwB,CAAC,CAgBnC"}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import type { Client } from '
|
2
|
-
import type { Transport } from '
|
3
|
-
import type { ErrorType } from '
|
4
|
-
import type { GetAccountParameter, JsonRpcAccount } from '
|
5
|
-
import type { Chain } from '
|
6
|
-
import type { WalletCapabilities, WalletCapabilitiesRecord } from '
|
7
|
-
import type { Prettify } from '
|
8
|
-
import type { RequestErrorType } from '
|
1
|
+
import type { Client } from '../../../clients/createClient.js';
|
2
|
+
import type { Transport } from '../../../clients/transports/createTransport.js';
|
3
|
+
import type { ErrorType } from '../../../errors/utils.js';
|
4
|
+
import type { GetAccountParameter, JsonRpcAccount } from '../../../types/account.js';
|
5
|
+
import type { Chain } from '../../../types/chain.js';
|
6
|
+
import type { WalletCapabilities, WalletCapabilitiesRecord } from '../../../types/eip1193.js';
|
7
|
+
import type { Prettify } from '../../../types/utils.js';
|
8
|
+
import type { RequestErrorType } from '../../../utils/buildRequest.js';
|
9
9
|
export type GetCapabilitiesParameters<account extends JsonRpcAccount | undefined = JsonRpcAccount | undefined> = GetAccountParameter<account>;
|
10
10
|
export type GetCapabilitiesReturnType = Prettify<WalletCapabilitiesRecord<WalletCapabilities, number>>;
|
11
11
|
export type GetCapabilitiesErrorType = RequestErrorType | ErrorType;
|
12
12
|
/**
|
13
13
|
* Extract capabilities that a connected wallet supports (e.g. paymasters, session keys, etc).
|
14
14
|
*
|
15
|
-
* - Docs: https://viem.sh/experimental/
|
15
|
+
* - Docs: https://viem.sh/experimental/eip5792/getCapabilities
|
16
16
|
* - JSON-RPC Methods: [`wallet_getCapabilities`](https://eips.ethereum.org/EIPS/eip-5792)
|
17
17
|
*
|
18
18
|
* @param client - Client to use
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getCapabilities.d.ts","sourceRoot":"","sources":["../../../../experimental/eip5792/actions/getCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAA;AAE/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACpD,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,MAAM,MAAM,yBAAyB,CACnC,OAAO,SAAS,cAAc,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,IACrE,mBAAmB,CAAC,OAAO,CAAC,CAAA;AAEhC,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAC9C,wBAAwB,CAAC,kBAAkB,EAAE,MAAM,CAAC,CACrD,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG,SAAS,CAAA;AAEnE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,eAAe,CACnC,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,OAAO,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS,EAEtD,GAAG,UAAU,EAAE,OAAO,SAAS,cAAc,GAErC,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,GAC3C;IACE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC;IACzC,UAAU,EAAE,yBAAyB,CAAC,OAAO,CAAC;CAC/C,GACL;IACE,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC;IACzC,UAAU,EAAE,yBAAyB,CAAC,OAAO,CAAC;CAC/C,GACJ,OAAO,CAAC,yBAAyB,CAAC,CAmBpC"}
|