@coinbase/cdp-sdk 1.4.0 → 1.5.0

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +87 -2
  3. package/_cjs/accounts/evm/toEvmServerAccount.js +5 -0
  4. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  5. package/_cjs/accounts/evm/toEvmSmartAccount.js +7 -2
  6. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  7. package/_cjs/actions/evm/transfer/accountTransferStrategy.js +72 -0
  8. package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -0
  9. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +65 -0
  10. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -0
  11. package/_cjs/actions/evm/transfer/transfer.js +59 -0
  12. package/_cjs/actions/evm/transfer/transfer.js.map +1 -0
  13. package/_cjs/actions/evm/transfer/types.js +3 -0
  14. package/_cjs/actions/evm/transfer/types.js.map +1 -0
  15. package/_cjs/actions/evm/transfer/utils.js +39 -0
  16. package/_cjs/actions/evm/transfer/utils.js.map +1 -0
  17. package/_cjs/actions/evm/types.js +3 -0
  18. package/_cjs/actions/evm/types.js.map +1 -0
  19. package/_cjs/client/evm/evm.js +44 -2
  20. package/_cjs/client/evm/evm.js.map +1 -1
  21. package/_cjs/client/solana/solana.js +42 -0
  22. package/_cjs/client/solana/solana.js.map +1 -1
  23. package/_cjs/utils/serializeTransaction.js +18 -0
  24. package/_cjs/utils/serializeTransaction.js.map +1 -0
  25. package/_cjs/version.js +1 -1
  26. package/_esm/accounts/evm/toEvmServerAccount.js +5 -0
  27. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  28. package/_esm/accounts/evm/toEvmSmartAccount.js +7 -2
  29. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  30. package/_esm/actions/evm/transfer/accountTransferStrategy.js +69 -0
  31. package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -0
  32. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +62 -0
  33. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -0
  34. package/_esm/actions/evm/transfer/transfer.js +56 -0
  35. package/_esm/actions/evm/transfer/transfer.js.map +1 -0
  36. package/_esm/actions/evm/transfer/types.js +2 -0
  37. package/_esm/actions/evm/transfer/types.js.map +1 -0
  38. package/_esm/actions/evm/transfer/utils.js +35 -0
  39. package/_esm/actions/evm/transfer/utils.js.map +1 -0
  40. package/_esm/actions/evm/types.js +2 -0
  41. package/_esm/actions/evm/types.js.map +1 -0
  42. package/_esm/client/evm/evm.js +44 -2
  43. package/_esm/client/evm/evm.js.map +1 -1
  44. package/_esm/client/solana/solana.js +42 -0
  45. package/_esm/client/solana/solana.js.map +1 -1
  46. package/_esm/utils/serializeTransaction.js +15 -0
  47. package/_esm/utils/serializeTransaction.js.map +1 -0
  48. package/_esm/version.js +1 -1
  49. package/_types/accounts/evm/toEvmServerAccount.d.ts +2 -2
  50. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  51. package/_types/accounts/evm/toEvmSmartAccount.d.ts +4 -4
  52. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  53. package/_types/accounts/types.d.ts +4 -3
  54. package/_types/accounts/types.d.ts.map +1 -1
  55. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts +4 -0
  56. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -0
  57. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts +4 -0
  58. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -0
  59. package/_types/actions/evm/transfer/transfer.d.ts +14 -0
  60. package/_types/actions/evm/transfer/transfer.d.ts.map +1 -0
  61. package/_types/actions/evm/transfer/types.d.ts +71 -0
  62. package/_types/actions/evm/transfer/types.d.ts.map +1 -0
  63. package/_types/actions/evm/transfer/utils.d.ts +631 -0
  64. package/_types/actions/evm/transfer/utils.d.ts.map +1 -0
  65. package/_types/actions/evm/types.d.ts +88 -0
  66. package/_types/actions/evm/types.d.ts.map +1 -0
  67. package/_types/client/evm/evm.d.ts +17 -1
  68. package/_types/client/evm/evm.d.ts.map +1 -1
  69. package/_types/client/evm/evm.types.d.ts +10 -1
  70. package/_types/client/evm/evm.types.d.ts.map +1 -1
  71. package/_types/client/solana/solana.d.ts +17 -1
  72. package/_types/client/solana/solana.d.ts.map +1 -1
  73. package/_types/client/solana/solana.types.d.ts +8 -0
  74. package/_types/client/solana/solana.types.d.ts.map +1 -1
  75. package/_types/utils/serializeTransaction.d.ts +9 -0
  76. package/_types/utils/serializeTransaction.d.ts.map +1 -0
  77. package/_types/version.d.ts +1 -1
  78. package/accounts/evm/toEvmServerAccount.ts +12 -6
  79. package/accounts/evm/toEvmSmartAccount.ts +16 -4
  80. package/accounts/types.ts +20 -16
  81. package/actions/evm/transfer/accountTransferStrategy.ts +84 -0
  82. package/actions/evm/transfer/smartAccountTransferStrategy.ts +70 -0
  83. package/actions/evm/transfer/transfer.ts +71 -0
  84. package/actions/evm/transfer/types.ts +81 -0
  85. package/actions/evm/transfer/utils.ts +39 -0
  86. package/actions/evm/types.ts +88 -0
  87. package/client/evm/evm.ts +45 -2
  88. package/client/evm/evm.types.ts +11 -1
  89. package/client/solana/solana.ts +43 -0
  90. package/client/solana/solana.types.ts +9 -0
  91. package/package.json +1 -1
  92. package/utils/serializeTransaction.ts +17 -0
  93. package/version.ts +1 -1
@@ -0,0 +1,631 @@
1
+ import { Network } from "./types.js";
2
+ /**
3
+ * Get the address of an ERC20 token for a given network.
4
+ * If a contract address is provided, it will not be found in the map and will be returned as is.
5
+ *
6
+ * @param token - The token symbol or contract address.
7
+ * @param network - The network to get the address for.
8
+ *
9
+ * @returns The address of the ERC20 token.
10
+ */
11
+ export declare function getErc20Address(token: string, network: Network): any;
12
+ /**
13
+ * Map a network to a viem chain.
14
+ * TODO: Add more networks (or dynamically map viem chains).
15
+ *
16
+ * @param network - The network to map to a chain.
17
+ * @returns The chain for the given network.
18
+ */
19
+ export declare function mapNetworkToChain(network: Network): {
20
+ blockExplorers: {
21
+ readonly default: {
22
+ readonly name: "Basescan";
23
+ readonly url: "https://basescan.org";
24
+ readonly apiUrl: "https://api.basescan.org/api";
25
+ };
26
+ };
27
+ contracts: {
28
+ readonly disputeGameFactory: {
29
+ readonly 1: {
30
+ readonly address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e";
31
+ };
32
+ };
33
+ readonly l2OutputOracle: {
34
+ readonly 1: {
35
+ readonly address: "0x56315b90c40730925ec5485cf004d835058518A0";
36
+ };
37
+ };
38
+ readonly multicall3: {
39
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
40
+ readonly blockCreated: 5022;
41
+ };
42
+ readonly portal: {
43
+ readonly 1: {
44
+ readonly address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e";
45
+ readonly blockCreated: 17482143;
46
+ };
47
+ };
48
+ readonly l1StandardBridge: {
49
+ readonly 1: {
50
+ readonly address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35";
51
+ readonly blockCreated: 17482143;
52
+ };
53
+ };
54
+ readonly gasPriceOracle: {
55
+ readonly address: "0x420000000000000000000000000000000000000F";
56
+ };
57
+ readonly l1Block: {
58
+ readonly address: "0x4200000000000000000000000000000000000015";
59
+ };
60
+ readonly l2CrossDomainMessenger: {
61
+ readonly address: "0x4200000000000000000000000000000000000007";
62
+ };
63
+ readonly l2Erc721Bridge: {
64
+ readonly address: "0x4200000000000000000000000000000000000014";
65
+ };
66
+ readonly l2StandardBridge: {
67
+ readonly address: "0x4200000000000000000000000000000000000010";
68
+ };
69
+ readonly l2ToL1MessagePasser: {
70
+ readonly address: "0x4200000000000000000000000000000000000016";
71
+ };
72
+ };
73
+ ensTlds?: readonly string[] | undefined;
74
+ id: 8453;
75
+ name: "Base";
76
+ nativeCurrency: {
77
+ readonly name: "Ether";
78
+ readonly symbol: "ETH";
79
+ readonly decimals: 18;
80
+ };
81
+ rpcUrls: {
82
+ readonly default: {
83
+ readonly http: readonly ["https://mainnet.base.org"];
84
+ };
85
+ };
86
+ sourceId: 1;
87
+ testnet?: boolean | undefined | undefined;
88
+ custom?: Record<string, unknown> | undefined;
89
+ fees?: import("viem").ChainFees<undefined> | undefined;
90
+ formatters: {
91
+ readonly block: {
92
+ exclude: [] | undefined;
93
+ format: (args: import("viem/chains").OpStackRpcBlock) => {
94
+ baseFeePerGas: bigint | null;
95
+ blobGasUsed: bigint;
96
+ difficulty: bigint;
97
+ excessBlobGas: bigint;
98
+ extraData: import("viem").Hex;
99
+ gasLimit: bigint;
100
+ gasUsed: bigint;
101
+ hash: `0x${string}` | null;
102
+ logsBloom: `0x${string}` | null;
103
+ miner: import("viem").Address;
104
+ mixHash: import("viem").Hash;
105
+ nonce: `0x${string}` | null;
106
+ number: bigint | null;
107
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
108
+ parentHash: import("viem").Hash;
109
+ receiptsRoot: import("viem").Hex;
110
+ sealFields: import("viem").Hex[];
111
+ sha3Uncles: import("viem").Hash;
112
+ size: bigint;
113
+ stateRoot: import("viem").Hash;
114
+ timestamp: bigint;
115
+ totalDifficulty: bigint | null;
116
+ transactions: `0x${string}`[] | import("viem/chains").OpStackTransaction<boolean>[];
117
+ transactionsRoot: import("viem").Hash;
118
+ uncles: import("viem").Hash[];
119
+ withdrawals?: import("viem").Withdrawal[] | undefined | undefined;
120
+ withdrawalsRoot?: `0x${string}` | undefined;
121
+ } & {};
122
+ type: "block";
123
+ };
124
+ readonly transaction: {
125
+ exclude: [] | undefined;
126
+ format: (args: import("viem/chains").OpStackRpcTransaction) => ({
127
+ blockHash: `0x${string}` | null;
128
+ blockNumber: bigint | null;
129
+ from: import("viem").Address;
130
+ gas: bigint;
131
+ hash: import("viem").Hash;
132
+ input: import("viem").Hex;
133
+ nonce: number;
134
+ r: import("viem").Hex;
135
+ s: import("viem").Hex;
136
+ to: import("viem").Address | null;
137
+ transactionIndex: number | null;
138
+ typeHex: import("viem").Hex | null;
139
+ v: bigint;
140
+ value: bigint;
141
+ yParity: number;
142
+ gasPrice?: undefined | undefined;
143
+ maxFeePerBlobGas?: undefined | undefined;
144
+ maxFeePerGas: bigint;
145
+ maxPriorityFeePerGas: bigint;
146
+ isSystemTx?: boolean;
147
+ mint?: bigint | undefined | undefined;
148
+ sourceHash: import("viem").Hex;
149
+ type: "deposit";
150
+ } | {
151
+ r: import("viem").Hex;
152
+ s: import("viem").Hex;
153
+ v: bigint;
154
+ to: import("viem").Address | null;
155
+ from: import("viem").Address;
156
+ gas: bigint;
157
+ nonce: number;
158
+ value: bigint;
159
+ blockHash: `0x${string}` | null;
160
+ blockNumber: bigint | null;
161
+ hash: import("viem").Hash;
162
+ input: import("viem").Hex;
163
+ transactionIndex: number | null;
164
+ typeHex: import("viem").Hex | null;
165
+ accessList?: undefined | undefined;
166
+ authorizationList?: undefined | undefined;
167
+ blobVersionedHashes?: undefined | undefined;
168
+ chainId?: number | undefined;
169
+ yParity?: undefined | undefined;
170
+ type: "legacy";
171
+ gasPrice: bigint;
172
+ maxFeePerBlobGas?: undefined | undefined;
173
+ maxFeePerGas?: undefined | undefined;
174
+ maxPriorityFeePerGas?: undefined | undefined;
175
+ isSystemTx?: undefined | undefined;
176
+ mint?: undefined | undefined;
177
+ sourceHash?: undefined | undefined;
178
+ } | {
179
+ blockHash: `0x${string}` | null;
180
+ blockNumber: bigint | null;
181
+ from: import("viem").Address;
182
+ gas: bigint;
183
+ hash: import("viem").Hash;
184
+ input: import("viem").Hex;
185
+ nonce: number;
186
+ r: import("viem").Hex;
187
+ s: import("viem").Hex;
188
+ to: import("viem").Address | null;
189
+ transactionIndex: number | null;
190
+ typeHex: import("viem").Hex | null;
191
+ v: bigint;
192
+ value: bigint;
193
+ yParity: number;
194
+ accessList: import("viem").AccessList;
195
+ authorizationList?: undefined | undefined;
196
+ blobVersionedHashes?: undefined | undefined;
197
+ chainId: number;
198
+ type: "eip2930";
199
+ gasPrice: bigint;
200
+ maxFeePerBlobGas?: undefined | undefined;
201
+ maxFeePerGas?: undefined | undefined;
202
+ maxPriorityFeePerGas?: undefined | undefined;
203
+ isSystemTx?: undefined | undefined;
204
+ mint?: undefined | undefined;
205
+ sourceHash?: undefined | undefined;
206
+ } | {
207
+ blockHash: `0x${string}` | null;
208
+ blockNumber: bigint | null;
209
+ from: import("viem").Address;
210
+ gas: bigint;
211
+ hash: import("viem").Hash;
212
+ input: import("viem").Hex;
213
+ nonce: number;
214
+ r: import("viem").Hex;
215
+ s: import("viem").Hex;
216
+ to: import("viem").Address | null;
217
+ transactionIndex: number | null;
218
+ typeHex: import("viem").Hex | null;
219
+ v: bigint;
220
+ value: bigint;
221
+ yParity: number;
222
+ accessList: import("viem").AccessList;
223
+ authorizationList?: undefined | undefined;
224
+ blobVersionedHashes?: undefined | undefined;
225
+ chainId: number;
226
+ type: "eip1559";
227
+ gasPrice?: undefined | undefined;
228
+ maxFeePerBlobGas?: undefined | undefined;
229
+ maxFeePerGas: bigint;
230
+ maxPriorityFeePerGas: bigint;
231
+ isSystemTx?: undefined | undefined;
232
+ mint?: undefined | undefined;
233
+ sourceHash?: undefined | undefined;
234
+ } | {
235
+ blockHash: `0x${string}` | null;
236
+ blockNumber: bigint | null;
237
+ from: import("viem").Address;
238
+ gas: bigint;
239
+ hash: import("viem").Hash;
240
+ input: import("viem").Hex;
241
+ nonce: number;
242
+ r: import("viem").Hex;
243
+ s: import("viem").Hex;
244
+ to: import("viem").Address | null;
245
+ transactionIndex: number | null;
246
+ typeHex: import("viem").Hex | null;
247
+ v: bigint;
248
+ value: bigint;
249
+ yParity: number;
250
+ accessList: import("viem").AccessList;
251
+ authorizationList?: undefined | undefined;
252
+ blobVersionedHashes: readonly import("viem").Hex[];
253
+ chainId: number;
254
+ type: "eip4844";
255
+ gasPrice?: undefined | undefined;
256
+ maxFeePerBlobGas: bigint;
257
+ maxFeePerGas: bigint;
258
+ maxPriorityFeePerGas: bigint;
259
+ isSystemTx?: undefined | undefined;
260
+ mint?: undefined | undefined;
261
+ sourceHash?: undefined | undefined;
262
+ } | {
263
+ blockHash: `0x${string}` | null;
264
+ blockNumber: bigint | null;
265
+ from: import("viem").Address;
266
+ gas: bigint;
267
+ hash: import("viem").Hash;
268
+ input: import("viem").Hex;
269
+ nonce: number;
270
+ r: import("viem").Hex;
271
+ s: import("viem").Hex;
272
+ to: import("viem").Address | null;
273
+ transactionIndex: number | null;
274
+ typeHex: import("viem").Hex | null;
275
+ v: bigint;
276
+ value: bigint;
277
+ yParity: number;
278
+ accessList: import("viem").AccessList;
279
+ authorizationList: import("viem").SignedAuthorizationList;
280
+ blobVersionedHashes?: undefined | undefined;
281
+ chainId: number;
282
+ type: "eip7702";
283
+ gasPrice?: undefined | undefined;
284
+ maxFeePerBlobGas?: undefined | undefined;
285
+ maxFeePerGas: bigint;
286
+ maxPriorityFeePerGas: bigint;
287
+ isSystemTx?: undefined | undefined;
288
+ mint?: undefined | undefined;
289
+ sourceHash?: undefined | undefined;
290
+ }) & {};
291
+ type: "transaction";
292
+ };
293
+ readonly transactionReceipt: {
294
+ exclude: [] | undefined;
295
+ format: (args: import("viem/chains").OpStackRpcTransactionReceipt) => {
296
+ blobGasPrice?: bigint | undefined;
297
+ blobGasUsed?: bigint | undefined;
298
+ blockHash: import("viem").Hash;
299
+ blockNumber: bigint;
300
+ contractAddress: import("viem").Address | null | undefined;
301
+ cumulativeGasUsed: bigint;
302
+ effectiveGasPrice: bigint;
303
+ from: import("viem").Address;
304
+ gasUsed: bigint;
305
+ logs: import("viem").Log<bigint, number, false>[];
306
+ logsBloom: import("viem").Hex;
307
+ root?: `0x${string}` | undefined;
308
+ status: "success" | "reverted";
309
+ to: import("viem").Address | null;
310
+ transactionHash: import("viem").Hash;
311
+ transactionIndex: number;
312
+ type: import("viem").TransactionType;
313
+ l1GasPrice: bigint | null;
314
+ l1GasUsed: bigint | null;
315
+ l1Fee: bigint | null;
316
+ l1FeeScalar: number | null;
317
+ } & {};
318
+ type: "transactionReceipt";
319
+ };
320
+ };
321
+ serializers: {
322
+ readonly transaction: typeof import("viem/chains").serializeTransactionOpStack;
323
+ };
324
+ } | {
325
+ blockExplorers: {
326
+ readonly default: {
327
+ readonly name: "Basescan";
328
+ readonly url: "https://sepolia.basescan.org";
329
+ readonly apiUrl: "https://api-sepolia.basescan.org/api";
330
+ };
331
+ };
332
+ contracts: {
333
+ readonly disputeGameFactory: {
334
+ readonly 11155111: {
335
+ readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
336
+ };
337
+ };
338
+ readonly l2OutputOracle: {
339
+ readonly 11155111: {
340
+ readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
341
+ };
342
+ };
343
+ readonly portal: {
344
+ readonly 11155111: {
345
+ readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
346
+ readonly blockCreated: 4446677;
347
+ };
348
+ };
349
+ readonly l1StandardBridge: {
350
+ readonly 11155111: {
351
+ readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
352
+ readonly blockCreated: 4446677;
353
+ };
354
+ };
355
+ readonly multicall3: {
356
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
357
+ readonly blockCreated: 1059647;
358
+ };
359
+ readonly gasPriceOracle: {
360
+ readonly address: "0x420000000000000000000000000000000000000F";
361
+ };
362
+ readonly l1Block: {
363
+ readonly address: "0x4200000000000000000000000000000000000015";
364
+ };
365
+ readonly l2CrossDomainMessenger: {
366
+ readonly address: "0x4200000000000000000000000000000000000007";
367
+ };
368
+ readonly l2Erc721Bridge: {
369
+ readonly address: "0x4200000000000000000000000000000000000014";
370
+ };
371
+ readonly l2StandardBridge: {
372
+ readonly address: "0x4200000000000000000000000000000000000010";
373
+ };
374
+ readonly l2ToL1MessagePasser: {
375
+ readonly address: "0x4200000000000000000000000000000000000016";
376
+ };
377
+ };
378
+ ensTlds?: readonly string[] | undefined;
379
+ id: 84532;
380
+ name: "Base Sepolia";
381
+ nativeCurrency: {
382
+ readonly name: "Sepolia Ether";
383
+ readonly symbol: "ETH";
384
+ readonly decimals: 18;
385
+ };
386
+ rpcUrls: {
387
+ readonly default: {
388
+ readonly http: readonly ["https://sepolia.base.org"];
389
+ };
390
+ };
391
+ sourceId: 11155111;
392
+ testnet: true;
393
+ custom?: Record<string, unknown> | undefined;
394
+ fees?: import("viem").ChainFees<undefined> | undefined;
395
+ formatters: {
396
+ readonly block: {
397
+ exclude: [] | undefined;
398
+ format: (args: import("viem/chains").OpStackRpcBlock) => {
399
+ baseFeePerGas: bigint | null;
400
+ blobGasUsed: bigint;
401
+ difficulty: bigint;
402
+ excessBlobGas: bigint;
403
+ extraData: import("viem").Hex;
404
+ gasLimit: bigint;
405
+ gasUsed: bigint;
406
+ hash: `0x${string}` | null;
407
+ logsBloom: `0x${string}` | null;
408
+ miner: import("viem").Address;
409
+ mixHash: import("viem").Hash;
410
+ nonce: `0x${string}` | null;
411
+ number: bigint | null;
412
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
413
+ parentHash: import("viem").Hash;
414
+ receiptsRoot: import("viem").Hex;
415
+ sealFields: import("viem").Hex[];
416
+ sha3Uncles: import("viem").Hash;
417
+ size: bigint;
418
+ stateRoot: import("viem").Hash;
419
+ timestamp: bigint;
420
+ totalDifficulty: bigint | null;
421
+ transactions: `0x${string}`[] | import("viem/chains").OpStackTransaction<boolean>[];
422
+ transactionsRoot: import("viem").Hash;
423
+ uncles: import("viem").Hash[];
424
+ withdrawals?: import("viem").Withdrawal[] | undefined | undefined;
425
+ withdrawalsRoot?: `0x${string}` | undefined;
426
+ } & {};
427
+ type: "block";
428
+ };
429
+ readonly transaction: {
430
+ exclude: [] | undefined;
431
+ format: (args: import("viem/chains").OpStackRpcTransaction) => ({
432
+ blockHash: `0x${string}` | null;
433
+ blockNumber: bigint | null;
434
+ from: import("viem").Address;
435
+ gas: bigint;
436
+ hash: import("viem").Hash;
437
+ input: import("viem").Hex;
438
+ nonce: number;
439
+ r: import("viem").Hex;
440
+ s: import("viem").Hex;
441
+ to: import("viem").Address | null;
442
+ transactionIndex: number | null;
443
+ typeHex: import("viem").Hex | null;
444
+ v: bigint;
445
+ value: bigint;
446
+ yParity: number;
447
+ gasPrice?: undefined | undefined;
448
+ maxFeePerBlobGas?: undefined | undefined;
449
+ maxFeePerGas: bigint;
450
+ maxPriorityFeePerGas: bigint;
451
+ isSystemTx?: boolean;
452
+ mint?: bigint | undefined | undefined;
453
+ sourceHash: import("viem").Hex;
454
+ type: "deposit";
455
+ } | {
456
+ r: import("viem").Hex;
457
+ s: import("viem").Hex;
458
+ v: bigint;
459
+ to: import("viem").Address | null;
460
+ from: import("viem").Address;
461
+ gas: bigint;
462
+ nonce: number;
463
+ value: bigint;
464
+ blockHash: `0x${string}` | null;
465
+ blockNumber: bigint | null;
466
+ hash: import("viem").Hash;
467
+ input: import("viem").Hex;
468
+ transactionIndex: number | null;
469
+ typeHex: import("viem").Hex | null;
470
+ accessList?: undefined | undefined;
471
+ authorizationList?: undefined | undefined;
472
+ blobVersionedHashes?: undefined | undefined;
473
+ chainId?: number | undefined;
474
+ yParity?: undefined | undefined;
475
+ type: "legacy";
476
+ gasPrice: bigint;
477
+ maxFeePerBlobGas?: undefined | undefined;
478
+ maxFeePerGas?: undefined | undefined;
479
+ maxPriorityFeePerGas?: undefined | undefined;
480
+ isSystemTx?: undefined | undefined;
481
+ mint?: undefined | undefined;
482
+ sourceHash?: undefined | undefined;
483
+ } | {
484
+ blockHash: `0x${string}` | null;
485
+ blockNumber: bigint | null;
486
+ from: import("viem").Address;
487
+ gas: bigint;
488
+ hash: import("viem").Hash;
489
+ input: import("viem").Hex;
490
+ nonce: number;
491
+ r: import("viem").Hex;
492
+ s: import("viem").Hex;
493
+ to: import("viem").Address | null;
494
+ transactionIndex: number | null;
495
+ typeHex: import("viem").Hex | null;
496
+ v: bigint;
497
+ value: bigint;
498
+ yParity: number;
499
+ accessList: import("viem").AccessList;
500
+ authorizationList?: undefined | undefined;
501
+ blobVersionedHashes?: undefined | undefined;
502
+ chainId: number;
503
+ type: "eip2930";
504
+ gasPrice: bigint;
505
+ maxFeePerBlobGas?: undefined | undefined;
506
+ maxFeePerGas?: undefined | undefined;
507
+ maxPriorityFeePerGas?: undefined | undefined;
508
+ isSystemTx?: undefined | undefined;
509
+ mint?: undefined | undefined;
510
+ sourceHash?: undefined | undefined;
511
+ } | {
512
+ blockHash: `0x${string}` | null;
513
+ blockNumber: bigint | null;
514
+ from: import("viem").Address;
515
+ gas: bigint;
516
+ hash: import("viem").Hash;
517
+ input: import("viem").Hex;
518
+ nonce: number;
519
+ r: import("viem").Hex;
520
+ s: import("viem").Hex;
521
+ to: import("viem").Address | null;
522
+ transactionIndex: number | null;
523
+ typeHex: import("viem").Hex | null;
524
+ v: bigint;
525
+ value: bigint;
526
+ yParity: number;
527
+ accessList: import("viem").AccessList;
528
+ authorizationList?: undefined | undefined;
529
+ blobVersionedHashes?: undefined | undefined;
530
+ chainId: number;
531
+ type: "eip1559";
532
+ gasPrice?: undefined | undefined;
533
+ maxFeePerBlobGas?: undefined | undefined;
534
+ maxFeePerGas: bigint;
535
+ maxPriorityFeePerGas: bigint;
536
+ isSystemTx?: undefined | undefined;
537
+ mint?: undefined | undefined;
538
+ sourceHash?: undefined | undefined;
539
+ } | {
540
+ blockHash: `0x${string}` | null;
541
+ blockNumber: bigint | null;
542
+ from: import("viem").Address;
543
+ gas: bigint;
544
+ hash: import("viem").Hash;
545
+ input: import("viem").Hex;
546
+ nonce: number;
547
+ r: import("viem").Hex;
548
+ s: import("viem").Hex;
549
+ to: import("viem").Address | null;
550
+ transactionIndex: number | null;
551
+ typeHex: import("viem").Hex | null;
552
+ v: bigint;
553
+ value: bigint;
554
+ yParity: number;
555
+ accessList: import("viem").AccessList;
556
+ authorizationList?: undefined | undefined;
557
+ blobVersionedHashes: readonly import("viem").Hex[];
558
+ chainId: number;
559
+ type: "eip4844";
560
+ gasPrice?: undefined | undefined;
561
+ maxFeePerBlobGas: bigint;
562
+ maxFeePerGas: bigint;
563
+ maxPriorityFeePerGas: bigint;
564
+ isSystemTx?: undefined | undefined;
565
+ mint?: undefined | undefined;
566
+ sourceHash?: undefined | undefined;
567
+ } | {
568
+ blockHash: `0x${string}` | null;
569
+ blockNumber: bigint | null;
570
+ from: import("viem").Address;
571
+ gas: bigint;
572
+ hash: import("viem").Hash;
573
+ input: import("viem").Hex;
574
+ nonce: number;
575
+ r: import("viem").Hex;
576
+ s: import("viem").Hex;
577
+ to: import("viem").Address | null;
578
+ transactionIndex: number | null;
579
+ typeHex: import("viem").Hex | null;
580
+ v: bigint;
581
+ value: bigint;
582
+ yParity: number;
583
+ accessList: import("viem").AccessList;
584
+ authorizationList: import("viem").SignedAuthorizationList;
585
+ blobVersionedHashes?: undefined | undefined;
586
+ chainId: number;
587
+ type: "eip7702";
588
+ gasPrice?: undefined | undefined;
589
+ maxFeePerBlobGas?: undefined | undefined;
590
+ maxFeePerGas: bigint;
591
+ maxPriorityFeePerGas: bigint;
592
+ isSystemTx?: undefined | undefined;
593
+ mint?: undefined | undefined;
594
+ sourceHash?: undefined | undefined;
595
+ }) & {};
596
+ type: "transaction";
597
+ };
598
+ readonly transactionReceipt: {
599
+ exclude: [] | undefined;
600
+ format: (args: import("viem/chains").OpStackRpcTransactionReceipt) => {
601
+ blobGasPrice?: bigint | undefined;
602
+ blobGasUsed?: bigint | undefined;
603
+ blockHash: import("viem").Hash;
604
+ blockNumber: bigint;
605
+ contractAddress: import("viem").Address | null | undefined;
606
+ cumulativeGasUsed: bigint;
607
+ effectiveGasPrice: bigint;
608
+ from: import("viem").Address;
609
+ gasUsed: bigint;
610
+ logs: import("viem").Log<bigint, number, false>[];
611
+ logsBloom: import("viem").Hex;
612
+ root?: `0x${string}` | undefined;
613
+ status: "success" | "reverted";
614
+ to: import("viem").Address | null;
615
+ transactionHash: import("viem").Hash;
616
+ transactionIndex: number;
617
+ type: import("viem").TransactionType;
618
+ l1GasPrice: bigint | null;
619
+ l1GasUsed: bigint | null;
620
+ l1Fee: bigint | null;
621
+ l1FeeScalar: number | null;
622
+ } & {};
623
+ type: "transactionReceipt";
624
+ };
625
+ };
626
+ serializers: {
627
+ readonly transaction: typeof import("viem/chains").serializeTransactionOpStack;
628
+ };
629
+ readonly network: "base-sepolia";
630
+ };
631
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../actions/evm/transfer/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAcrC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,OAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAGkvC,MAAgB;;;;kCAAuJ,aAAa;;;;;kCAAwN,MAAgB;;;;;8BAAqM,MAAS;gCAA2C,MAAgB;;;qCAAiI,CAAC;mCAAgE,MAAgB;qCAA6C,MAAgB;mCAA0C,MAAgB;mCAA4C,MAAgB;;kCAAwE,MAAgB;;;uDAAkJ,aAAa;yCAA0E,MAAgB;+BAAuC,MAAgB;2BAAqC,CAAC,SAAS,MAAgB;+BAAuE,CAAC;;;;;;kCAA8L,aAAa;;;6BAAyJ,MAAS;;6BAAqE,MAAgB;8BAAsC,MAAgB;;0BAAgE,MAAgB;0BAAiC,MAAgB;2BAAkC,MAAS;;gCAAmG,MAAgB;;;;wBAAiI,CAAC;gCAAyD,CAAC;;;0BAAuI,CAAC;oBAA+B,CAAC;mCAAqE,MAAgB;;;0BAAoF,MAAgB;0BAAiC,MAAgB;;2BAA6D,MAAS;6BAA+C,MAA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