viem 0.0.0-main.20240408T054443 → 0.0.0-main.20240408T061242

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 (121) hide show
  1. package/_cjs/actions/index.js +2 -1
  2. package/_cjs/actions/index.js.map +1 -1
  3. package/_cjs/actions/public/estimateGas.js +5 -3
  4. package/_cjs/actions/public/estimateGas.js.map +1 -1
  5. package/_cjs/actions/wallet/prepareTransactionRequest.js +47 -7
  6. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  7. package/_cjs/actions/wallet/sendTransaction.js +1 -0
  8. package/_cjs/actions/wallet/sendTransaction.js.map +1 -1
  9. package/_cjs/errors/version.js +1 -1
  10. package/_cjs/utils/blob/blobsToCommitments.js.map +1 -1
  11. package/_cjs/utils/blob/commitmentsToVersionedHashes.js.map +1 -1
  12. package/_cjs/utils/blob/sidecarsToVersionedHashes.js.map +1 -1
  13. package/_cjs/utils/blob/toBlobSidecars.js.map +1 -1
  14. package/_cjs/utils/blob/toBlobs.js.map +1 -1
  15. package/_cjs/utils/formatters/transactionRequest.js +2 -0
  16. package/_cjs/utils/formatters/transactionRequest.js.map +1 -1
  17. package/_cjs/utils/transaction/serializeTransaction.js +10 -6
  18. package/_cjs/utils/transaction/serializeTransaction.js.map +1 -1
  19. package/_esm/actions/index.js +1 -1
  20. package/_esm/actions/index.js.map +1 -1
  21. package/_esm/actions/public/estimateGas.js +8 -3
  22. package/_esm/actions/public/estimateGas.js.map +1 -1
  23. package/_esm/actions/wallet/prepareTransactionRequest.js +49 -9
  24. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  25. package/_esm/actions/wallet/sendTransaction.js +2 -1
  26. package/_esm/actions/wallet/sendTransaction.js.map +1 -1
  27. package/_esm/errors/version.js +1 -1
  28. package/_esm/utils/blob/blobsToCommitments.js.map +1 -1
  29. package/_esm/utils/blob/commitmentsToVersionedHashes.js.map +1 -1
  30. package/_esm/utils/blob/sidecarsToVersionedHashes.js.map +1 -1
  31. package/_esm/utils/blob/toBlobSidecars.js.map +1 -1
  32. package/_esm/utils/blob/toBlobs.js.map +1 -1
  33. package/_esm/utils/formatters/transactionRequest.js +2 -0
  34. package/_esm/utils/formatters/transactionRequest.js.map +1 -1
  35. package/_esm/utils/transaction/serializeTransaction.js +10 -6
  36. package/_esm/utils/transaction/serializeTransaction.js.map +1 -1
  37. package/_types/actions/index.d.ts +1 -1
  38. package/_types/actions/index.d.ts.map +1 -1
  39. package/_types/actions/public/estimateGas.d.ts.map +1 -1
  40. package/_types/actions/wallet/prepareTransactionRequest.d.ts +7 -6
  41. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  42. package/_types/actions/wallet/sendTransaction.d.ts.map +1 -1
  43. package/_types/celo/chainConfig.d.ts +1679 -183
  44. package/_types/celo/chainConfig.d.ts.map +1 -1
  45. package/_types/celo/formatters.d.ts +846 -98
  46. package/_types/celo/formatters.d.ts.map +1 -1
  47. package/_types/chains/definitions/ancient8.d.ts +15 -15
  48. package/_types/chains/definitions/ancient8Sepolia.d.ts +15 -15
  49. package/_types/chains/definitions/base.d.ts +15 -15
  50. package/_types/chains/definitions/baseGoerli.d.ts +15 -15
  51. package/_types/chains/definitions/baseSepolia.d.ts +15 -15
  52. package/_types/chains/definitions/celo.d.ts +1679 -183
  53. package/_types/chains/definitions/celo.d.ts.map +1 -1
  54. package/_types/chains/definitions/celoAlfajores.d.ts +1679 -183
  55. package/_types/chains/definitions/celoAlfajores.d.ts.map +1 -1
  56. package/_types/chains/definitions/fraxtal.d.ts +15 -15
  57. package/_types/chains/definitions/fraxtalTestnet.d.ts +15 -15
  58. package/_types/chains/definitions/liskSepolia.d.ts +15 -15
  59. package/_types/chains/definitions/optimism.d.ts +15 -15
  60. package/_types/chains/definitions/optimismGoerli.d.ts +15 -15
  61. package/_types/chains/definitions/optimismSepolia.d.ts +15 -15
  62. package/_types/chains/definitions/pgn.d.ts +15 -15
  63. package/_types/chains/definitions/pgnTestnet.d.ts +15 -15
  64. package/_types/chains/definitions/rss3.d.ts +15 -15
  65. package/_types/chains/definitions/rss3Sepolia.d.ts +15 -15
  66. package/_types/chains/definitions/zkSync.d.ts +844 -128
  67. package/_types/chains/definitions/zkSync.d.ts.map +1 -1
  68. package/_types/chains/definitions/zkSyncInMemoryNode.d.ts +844 -128
  69. package/_types/chains/definitions/zkSyncInMemoryNode.d.ts.map +1 -1
  70. package/_types/chains/definitions/zkSyncLocalNode.d.ts +844 -128
  71. package/_types/chains/definitions/zkSyncLocalNode.d.ts.map +1 -1
  72. package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts +844 -128
  73. package/_types/chains/definitions/zkSyncSepoliaTestnet.d.ts.map +1 -1
  74. package/_types/chains/definitions/zkSyncTestnet.d.ts +844 -128
  75. package/_types/chains/definitions/zkSyncTestnet.d.ts.map +1 -1
  76. package/_types/chains/definitions/zora.d.ts +15 -15
  77. package/_types/chains/definitions/zoraSepolia.d.ts +15 -15
  78. package/_types/chains/definitions/zoraTestnet.d.ts +15 -15
  79. package/_types/errors/version.d.ts +1 -1
  80. package/_types/op-stack/chainConfig.d.ts +15 -15
  81. package/_types/op-stack/formatters.d.ts +15 -15
  82. package/_types/types/transaction.d.ts +22 -3
  83. package/_types/types/transaction.d.ts.map +1 -1
  84. package/_types/utils/blob/blobsToCommitments.d.ts +4 -4
  85. package/_types/utils/blob/blobsToCommitments.d.ts.map +1 -1
  86. package/_types/utils/blob/blobsToProofs.d.ts +2 -2
  87. package/_types/utils/blob/blobsToProofs.d.ts.map +1 -1
  88. package/_types/utils/blob/commitmentsToVersionedHashes.d.ts +4 -4
  89. package/_types/utils/blob/commitmentsToVersionedHashes.d.ts.map +1 -1
  90. package/_types/utils/blob/sidecarsToVersionedHashes.d.ts +1 -1
  91. package/_types/utils/blob/sidecarsToVersionedHashes.d.ts.map +1 -1
  92. package/_types/utils/blob/toBlobSidecars.d.ts +5 -5
  93. package/_types/utils/blob/toBlobSidecars.d.ts.map +1 -1
  94. package/_types/utils/blob/toBlobs.d.ts +1 -1
  95. package/_types/utils/blob/toBlobs.d.ts.map +1 -1
  96. package/_types/utils/formatters/transaction.d.ts +1 -1
  97. package/_types/utils/formatters/transactionRequest.d.ts +186 -2
  98. package/_types/utils/formatters/transactionRequest.d.ts.map +1 -1
  99. package/_types/utils/transaction/getTransactionType.d.ts +3 -3
  100. package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
  101. package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
  102. package/_types/zksync/chainConfig.d.ts +844 -128
  103. package/_types/zksync/chainConfig.d.ts.map +1 -1
  104. package/_types/zksync/formatters.d.ts +844 -128
  105. package/_types/zksync/formatters.d.ts.map +1 -1
  106. package/actions/index.ts +1 -0
  107. package/actions/public/estimateGas.ts +9 -7
  108. package/actions/wallet/prepareTransactionRequest.ts +73 -17
  109. package/actions/wallet/sendTransaction.ts +2 -0
  110. package/errors/version.ts +1 -1
  111. package/package.json +1 -1
  112. package/types/transaction.ts +28 -3
  113. package/utils/blob/blobsToCommitments.ts +9 -7
  114. package/utils/blob/blobsToProofs.ts +10 -10
  115. package/utils/blob/commitmentsToVersionedHashes.ts +10 -8
  116. package/utils/blob/sidecarsToVersionedHashes.ts +3 -3
  117. package/utils/blob/toBlobSidecars.ts +14 -11
  118. package/utils/blob/toBlobs.ts +3 -3
  119. package/utils/formatters/transactionRequest.ts +2 -0
  120. package/utils/transaction/getTransactionType.ts +3 -3
  121. package/utils/transaction/serializeTransaction.ts +12 -6
@@ -113,6 +113,7 @@ export declare const baseSepolia: {
113
113
  gas?: `0x${string}`;
114
114
  nonce?: `0x${string}`;
115
115
  value?: `0x${string}`;
116
+ blobVersionedHashes?: undefined;
116
117
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
117
118
  accessList?: undefined;
118
119
  blockHash?: `0x${string}` | null;
@@ -120,7 +121,6 @@ export declare const baseSepolia: {
120
121
  hash?: `0x${string}`;
121
122
  input?: `0x${string}`;
122
123
  transactionIndex?: `0x${string}` | null;
123
- blobVersionedHashes?: undefined;
124
124
  chainId?: `0x${string}` | undefined;
125
125
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
126
126
  r: `0x${string}`;
@@ -164,6 +164,7 @@ export declare const baseSepolia: {
164
164
  gas?: `0x${string}`;
165
165
  nonce?: `0x${string}`;
166
166
  value?: `0x${string}`;
167
+ blobVersionedHashes?: undefined;
167
168
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
168
169
  accessList?: undefined;
169
170
  blockHash?: `0x${string}` | null;
@@ -171,7 +172,6 @@ export declare const baseSepolia: {
171
172
  hash?: `0x${string}`;
172
173
  input?: `0x${string}`;
173
174
  transactionIndex?: `0x${string}` | null;
174
- blobVersionedHashes?: undefined;
175
175
  chainId?: `0x${string}` | undefined;
176
176
  } & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
177
177
  isSystemTx?: boolean | undefined;
@@ -192,6 +192,7 @@ export declare const baseSepolia: {
192
192
  gas?: `0x${string}`;
193
193
  nonce?: `0x${string}`;
194
194
  value?: `0x${string}`;
195
+ blobVersionedHashes?: undefined;
195
196
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
196
197
  accessList?: import("../../index.js").AccessList | undefined;
197
198
  blockHash?: `0x${string}` | null;
@@ -199,7 +200,6 @@ export declare const baseSepolia: {
199
200
  hash?: `0x${string}`;
200
201
  input?: `0x${string}`;
201
202
  transactionIndex?: `0x${string}` | null;
202
- blobVersionedHashes?: undefined;
203
203
  chainId?: `0x${string}` | undefined;
204
204
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
205
205
  r: `0x${string}`;
@@ -243,6 +243,7 @@ export declare const baseSepolia: {
243
243
  gas?: `0x${string}`;
244
244
  nonce?: `0x${string}`;
245
245
  value?: `0x${string}`;
246
+ blobVersionedHashes?: undefined;
246
247
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
247
248
  accessList?: import("../../index.js").AccessList | undefined;
248
249
  blockHash?: `0x${string}` | null;
@@ -250,7 +251,6 @@ export declare const baseSepolia: {
250
251
  hash?: `0x${string}`;
251
252
  input?: `0x${string}`;
252
253
  transactionIndex?: `0x${string}` | null;
253
- blobVersionedHashes?: undefined;
254
254
  chainId?: `0x${string}` | undefined;
255
255
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
256
256
  blockHash: `0x${string}` | null;
@@ -294,6 +294,7 @@ export declare const baseSepolia: {
294
294
  gas?: `0x${string}`;
295
295
  nonce?: `0x${string}`;
296
296
  value?: `0x${string}`;
297
+ blobVersionedHashes?: undefined;
297
298
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
298
299
  accessList?: import("../../index.js").AccessList | undefined;
299
300
  blockHash?: `0x${string}` | null;
@@ -301,7 +302,6 @@ export declare const baseSepolia: {
301
302
  hash?: `0x${string}`;
302
303
  input?: `0x${string}`;
303
304
  transactionIndex?: `0x${string}` | null;
304
- blobVersionedHashes?: undefined;
305
305
  chainId?: `0x${string}` | undefined;
306
306
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
307
307
  blockHash: `0x${string}` | null;
@@ -345,6 +345,7 @@ export declare const baseSepolia: {
345
345
  gas?: `0x${string}`;
346
346
  nonce?: `0x${string}`;
347
347
  value?: `0x${string}`;
348
+ blobVersionedHashes?: undefined;
348
349
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
349
350
  accessList?: import("../../index.js").AccessList | undefined;
350
351
  blockHash?: `0x${string}` | null;
@@ -352,7 +353,6 @@ export declare const baseSepolia: {
352
353
  hash?: `0x${string}`;
353
354
  input?: `0x${string}`;
354
355
  transactionIndex?: `0x${string}` | null;
355
- blobVersionedHashes?: undefined;
356
356
  chainId?: `0x${string}` | undefined;
357
357
  } & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
358
358
  isSystemTx?: boolean | undefined;
@@ -373,6 +373,7 @@ export declare const baseSepolia: {
373
373
  gas?: `0x${string}`;
374
374
  nonce?: `0x${string}`;
375
375
  value?: `0x${string}`;
376
+ blobVersionedHashes?: undefined;
376
377
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
377
378
  accessList?: import("../../index.js").AccessList | undefined;
378
379
  blockHash?: `0x${string}` | null;
@@ -380,7 +381,6 @@ export declare const baseSepolia: {
380
381
  hash?: `0x${string}`;
381
382
  input?: `0x${string}`;
382
383
  transactionIndex?: `0x${string}` | null;
383
- blobVersionedHashes?: undefined;
384
384
  chainId?: `0x${string}` | undefined;
385
385
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
386
386
  r: `0x${string}`;
@@ -424,6 +424,7 @@ export declare const baseSepolia: {
424
424
  gas?: `0x${string}`;
425
425
  nonce?: `0x${string}`;
426
426
  value?: `0x${string}`;
427
+ blobVersionedHashes?: undefined;
427
428
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
428
429
  accessList?: import("../../index.js").AccessList | undefined;
429
430
  blockHash?: `0x${string}` | null;
@@ -431,7 +432,6 @@ export declare const baseSepolia: {
431
432
  hash?: `0x${string}`;
432
433
  input?: `0x${string}`;
433
434
  transactionIndex?: `0x${string}` | null;
434
- blobVersionedHashes?: undefined;
435
435
  chainId?: `0x${string}` | undefined;
436
436
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
437
437
  blockHash: `0x${string}` | null;
@@ -475,6 +475,7 @@ export declare const baseSepolia: {
475
475
  gas?: `0x${string}`;
476
476
  nonce?: `0x${string}`;
477
477
  value?: `0x${string}`;
478
+ blobVersionedHashes?: undefined;
478
479
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
479
480
  accessList?: import("../../index.js").AccessList | undefined;
480
481
  blockHash?: `0x${string}` | null;
@@ -482,7 +483,6 @@ export declare const baseSepolia: {
482
483
  hash?: `0x${string}`;
483
484
  input?: `0x${string}`;
484
485
  transactionIndex?: `0x${string}` | null;
485
- blobVersionedHashes?: undefined;
486
486
  chainId?: `0x${string}` | undefined;
487
487
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
488
488
  blockHash: `0x${string}` | null;
@@ -526,6 +526,7 @@ export declare const baseSepolia: {
526
526
  gas?: `0x${string}`;
527
527
  nonce?: `0x${string}`;
528
528
  value?: `0x${string}`;
529
+ blobVersionedHashes?: undefined;
529
530
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
530
531
  accessList?: import("../../index.js").AccessList | undefined;
531
532
  blockHash?: `0x${string}` | null;
@@ -533,7 +534,6 @@ export declare const baseSepolia: {
533
534
  hash?: `0x${string}`;
534
535
  input?: `0x${string}`;
535
536
  transactionIndex?: `0x${string}` | null;
536
- blobVersionedHashes?: undefined;
537
537
  chainId?: `0x${string}` | undefined;
538
538
  } & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
539
539
  isSystemTx?: boolean | undefined;
@@ -554,6 +554,7 @@ export declare const baseSepolia: {
554
554
  gas?: `0x${string}`;
555
555
  nonce?: `0x${string}`;
556
556
  value?: `0x${string}`;
557
+ blobVersionedHashes?: `0x${string}`[] | undefined;
557
558
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
558
559
  accessList?: import("../../index.js").AccessList | undefined;
559
560
  blockHash?: `0x${string}` | null;
@@ -561,7 +562,6 @@ export declare const baseSepolia: {
561
562
  hash?: `0x${string}`;
562
563
  input?: `0x${string}`;
563
564
  transactionIndex?: `0x${string}` | null;
564
- blobVersionedHashes?: `0x${string}`[] | undefined;
565
565
  chainId?: `0x${string}` | undefined;
566
566
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
567
567
  r: `0x${string}`;
@@ -605,6 +605,7 @@ export declare const baseSepolia: {
605
605
  gas?: `0x${string}`;
606
606
  nonce?: `0x${string}`;
607
607
  value?: `0x${string}`;
608
+ blobVersionedHashes?: `0x${string}`[] | undefined;
608
609
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
609
610
  accessList?: import("../../index.js").AccessList | undefined;
610
611
  blockHash?: `0x${string}` | null;
@@ -612,7 +613,6 @@ export declare const baseSepolia: {
612
613
  hash?: `0x${string}`;
613
614
  input?: `0x${string}`;
614
615
  transactionIndex?: `0x${string}` | null;
615
- blobVersionedHashes?: `0x${string}`[] | undefined;
616
616
  chainId?: `0x${string}` | undefined;
617
617
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
618
618
  blockHash: `0x${string}` | null;
@@ -656,6 +656,7 @@ export declare const baseSepolia: {
656
656
  gas?: `0x${string}`;
657
657
  nonce?: `0x${string}`;
658
658
  value?: `0x${string}`;
659
+ blobVersionedHashes?: `0x${string}`[] | undefined;
659
660
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
660
661
  accessList?: import("../../index.js").AccessList | undefined;
661
662
  blockHash?: `0x${string}` | null;
@@ -663,7 +664,6 @@ export declare const baseSepolia: {
663
664
  hash?: `0x${string}`;
664
665
  input?: `0x${string}`;
665
666
  transactionIndex?: `0x${string}` | null;
666
- blobVersionedHashes?: `0x${string}`[] | undefined;
667
667
  chainId?: `0x${string}` | undefined;
668
668
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
669
669
  blockHash: `0x${string}` | null;
@@ -707,6 +707,7 @@ export declare const baseSepolia: {
707
707
  gas?: `0x${string}`;
708
708
  nonce?: `0x${string}`;
709
709
  value?: `0x${string}`;
710
+ blobVersionedHashes?: `0x${string}`[] | undefined;
710
711
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
711
712
  accessList?: import("../../index.js").AccessList | undefined;
712
713
  blockHash?: `0x${string}` | null;
@@ -714,7 +715,6 @@ export declare const baseSepolia: {
714
715
  hash?: `0x${string}`;
715
716
  input?: `0x${string}`;
716
717
  transactionIndex?: `0x${string}` | null;
717
- blobVersionedHashes?: `0x${string}`[] | undefined;
718
718
  chainId?: `0x${string}` | undefined;
719
719
  } & import("../index.js").Omit<import("../index.js").PartialBy<{
720
720
  blockHash: `0x${string}` | null;
@@ -758,6 +758,7 @@ export declare const baseSepolia: {
758
758
  gas?: `0x${string}`;
759
759
  nonce?: `0x${string}`;
760
760
  value?: `0x${string}`;
761
+ blobVersionedHashes?: `0x${string}`[] | undefined;
761
762
  type?: "0x0" | "0x1" | "0x2" | "0x3" | "0x7e";
762
763
  accessList?: import("../../index.js").AccessList | undefined;
763
764
  blockHash?: `0x${string}` | null;
@@ -765,7 +766,6 @@ export declare const baseSepolia: {
765
766
  hash?: `0x${string}`;
766
767
  input?: `0x${string}`;
767
768
  transactionIndex?: `0x${string}` | null;
768
- blobVersionedHashes?: `0x${string}`[] | undefined;
769
769
  chainId?: `0x${string}` | undefined;
770
770
  } & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
771
771
  isSystemTx?: boolean | undefined;