viem 2.0.0-alpha.3 → 2.0.0-alpha.5

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 (50) hide show
  1. package/_cjs/actions/wallet/writeContract.js.map +1 -1
  2. package/_cjs/chains/{utils/index.js → utils.js} +5 -5
  3. package/_cjs/chains/utils.js.map +1 -0
  4. package/_cjs/clients/decorators/wallet.js.map +1 -1
  5. package/_cjs/errors/node.js +11 -11
  6. package/_cjs/errors/node.js.map +1 -1
  7. package/_cjs/errors/rpc.js +18 -18
  8. package/_cjs/errors/rpc.js.map +1 -1
  9. package/_cjs/errors/version.js +1 -1
  10. package/_esm/actions/wallet/writeContract.js.map +1 -1
  11. package/_esm/chains/utils.js +5 -0
  12. package/_esm/chains/utils.js.map +1 -0
  13. package/_esm/clients/decorators/wallet.js.map +1 -1
  14. package/_esm/errors/node.js +22 -11
  15. package/_esm/errors/node.js.map +1 -1
  16. package/_esm/errors/rpc.js +36 -18
  17. package/_esm/errors/rpc.js.map +1 -1
  18. package/_esm/errors/version.js +1 -1
  19. package/_types/actions/wallet/writeContract.d.ts +3 -3
  20. package/_types/actions/wallet/writeContract.d.ts.map +1 -1
  21. package/_types/chains/celo/formatters.d.ts +7 -7
  22. package/_types/chains/definitions/base.d.ts +33 -33
  23. package/_types/chains/definitions/baseGoerli.d.ts +33 -33
  24. package/_types/chains/definitions/celo.d.ts +36 -36
  25. package/_types/chains/definitions/celoAlfajores.d.ts +36 -36
  26. package/_types/chains/definitions/celoCannoli.d.ts +36 -36
  27. package/_types/chains/definitions/optimism.d.ts +33 -33
  28. package/_types/chains/definitions/optimismGoerli.d.ts +33 -33
  29. package/_types/chains/definitions/zora.d.ts +33 -33
  30. package/_types/chains/definitions/zoraTestnet.d.ts +33 -33
  31. package/_types/chains/optimism/formatters.d.ts +7 -7
  32. package/_types/chains/{utils/index.d.ts → utils.d.ts} +7 -7
  33. package/_types/chains/utils.d.ts.map +1 -0
  34. package/_types/errors/version.d.ts +1 -1
  35. package/_types/types/utils.d.ts +12 -8
  36. package/_types/types/utils.d.ts.map +1 -1
  37. package/_types/utils/formatters/transaction.d.ts +2 -2
  38. package/_types/utils/formatters/transaction.d.ts.map +1 -1
  39. package/actions/wallet/writeContract.ts +35 -29
  40. package/chains/utils/package.json +3 -3
  41. package/chains/{utils/index.ts → utils.ts} +6 -6
  42. package/clients/decorators/wallet.ts +1 -1
  43. package/errors/version.ts +1 -1
  44. package/package.json +5 -5
  45. package/types/utils.ts +32 -11
  46. package/utils/formatters/transaction.ts +2 -2
  47. package/_cjs/chains/utils/index.js.map +0 -1
  48. package/_esm/chains/utils/index.js +0 -5
  49. package/_esm/chains/utils/index.js.map +0 -1
  50. package/_types/chains/utils/index.d.ts.map +0 -1
@@ -33,8 +33,8 @@ export declare const zoraTestnet: {
33
33
  formatters?: {
34
34
  readonly block: {
35
35
  exclude: [] | undefined;
36
- format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcBlock>, import("../optimism/types.js").OptimismRpcBlockOverrides & {
37
- transactions: `0x${string}`[] | import("../optimism/types.js").OptimismRpcTransaction[];
36
+ format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcBlock>, import("../utils.js").OptimismRpcBlockOverrides & {
37
+ transactions: `0x${string}`[] | import("../utils.js").OptimismRpcTransaction[];
38
38
  }>) => {
39
39
  baseFeePerGas: bigint | null;
40
40
  difficulty: bigint;
@@ -55,7 +55,7 @@ export declare const zoraTestnet: {
55
55
  stateRoot: `0x${string}`;
56
56
  timestamp: bigint;
57
57
  totalDifficulty: bigint | null;
58
- transactions: `0x${string}`[] | import("../optimism/types.js").OptimismTransaction[];
58
+ transactions: `0x${string}`[] | import("../utils.js").OptimismTransaction[];
59
59
  transactionsRoot: `0x${string}`;
60
60
  uncles: `0x${string}`[];
61
61
  } & {};
@@ -83,7 +83,7 @@ export declare const zoraTestnet: {
83
83
  v?: `0x${string}` | undefined;
84
84
  accessList?: undefined;
85
85
  chainId?: `0x${string}` | undefined;
86
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
86
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
87
87
  isSystemTx?: undefined;
88
88
  mint?: undefined;
89
89
  sourceHash?: undefined;
@@ -132,7 +132,7 @@ export declare const zoraTestnet: {
132
132
  v?: `0x${string}` | undefined;
133
133
  accessList?: import("../../index.js").AccessList | undefined;
134
134
  chainId?: `0x${string}` | undefined;
135
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
135
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
136
136
  isSystemTx?: undefined;
137
137
  mint?: undefined;
138
138
  sourceHash?: undefined;
@@ -156,7 +156,7 @@ export declare const zoraTestnet: {
156
156
  v?: `0x${string}` | undefined;
157
157
  accessList?: import("../../index.js").AccessList | undefined;
158
158
  chainId?: `0x${string}` | undefined;
159
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
159
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
160
160
  isSystemTx?: undefined;
161
161
  mint?: undefined;
162
162
  sourceHash?: undefined;
@@ -180,7 +180,7 @@ export declare const zoraTestnet: {
180
180
  v?: `0x${string}` | undefined;
181
181
  accessList?: import("../../index.js").AccessList | undefined;
182
182
  chainId?: `0x${string}` | undefined;
183
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
183
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
184
184
  isSystemTx?: undefined;
185
185
  mint?: undefined;
186
186
  sourceHash?: undefined;
@@ -229,7 +229,7 @@ export declare const zoraTestnet: {
229
229
  v?: `0x${string}` | undefined;
230
230
  accessList?: import("../../index.js").AccessList | undefined;
231
231
  chainId?: `0x${string}` | undefined;
232
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
232
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
233
233
  isSystemTx?: undefined;
234
234
  mint?: undefined;
235
235
  sourceHash?: undefined;
@@ -253,7 +253,7 @@ export declare const zoraTestnet: {
253
253
  v?: `0x${string}` | undefined;
254
254
  accessList?: import("../../index.js").AccessList | undefined;
255
255
  chainId?: `0x${string}` | undefined;
256
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
256
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
257
257
  isSystemTx?: undefined;
258
258
  mint?: undefined;
259
259
  sourceHash?: undefined;
@@ -277,7 +277,7 @@ export declare const zoraTestnet: {
277
277
  v?: `0x${string}` | undefined;
278
278
  accessList?: import("../../index.js").AccessList | undefined;
279
279
  chainId?: `0x${string}` | undefined;
280
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
280
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
281
281
  isSystemTx?: undefined;
282
282
  mint?: undefined;
283
283
  sourceHash?: undefined;
@@ -503,7 +503,7 @@ export declare const zoraTestnet: {
503
503
  };
504
504
  readonly transactionReceipt: {
505
505
  exclude: [] | undefined;
506
- format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcTransactionReceipt>, import("../optimism/types.js").OptimismRpcTransactionReceiptOverrides>) => {
506
+ format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcTransactionReceipt>, import("../utils.js").OptimismRpcTransactionReceiptOverrides>) => {
507
507
  blockHash: `0x${string}`;
508
508
  blockNumber: bigint;
509
509
  contractAddress: `0x${string}` | null;
@@ -529,8 +529,8 @@ export declare const zoraTestnet: {
529
529
  serializers?: import("../../index.js").ChainSerializers<{
530
530
  readonly block: {
531
531
  exclude: [] | undefined;
532
- format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcBlock>, import("../optimism/types.js").OptimismRpcBlockOverrides & {
533
- transactions: `0x${string}`[] | import("../optimism/types.js").OptimismRpcTransaction[];
532
+ format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcBlock>, import("../utils.js").OptimismRpcBlockOverrides & {
533
+ transactions: `0x${string}`[] | import("../utils.js").OptimismRpcTransaction[];
534
534
  }>) => {
535
535
  baseFeePerGas: bigint | null;
536
536
  difficulty: bigint;
@@ -551,7 +551,7 @@ export declare const zoraTestnet: {
551
551
  stateRoot: `0x${string}`;
552
552
  timestamp: bigint;
553
553
  totalDifficulty: bigint | null;
554
- transactions: `0x${string}`[] | import("../optimism/types.js").OptimismTransaction[];
554
+ transactions: `0x${string}`[] | import("../utils.js").OptimismTransaction[];
555
555
  transactionsRoot: `0x${string}`;
556
556
  uncles: `0x${string}`[];
557
557
  } & {};
@@ -579,7 +579,7 @@ export declare const zoraTestnet: {
579
579
  v?: `0x${string}` | undefined;
580
580
  accessList?: undefined;
581
581
  chainId?: `0x${string}` | undefined;
582
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
582
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
583
583
  isSystemTx?: undefined;
584
584
  mint?: undefined;
585
585
  sourceHash?: undefined;
@@ -628,7 +628,7 @@ export declare const zoraTestnet: {
628
628
  v?: `0x${string}` | undefined;
629
629
  accessList?: import("../../index.js").AccessList | undefined;
630
630
  chainId?: `0x${string}` | undefined;
631
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
631
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
632
632
  isSystemTx?: undefined;
633
633
  mint?: undefined;
634
634
  sourceHash?: undefined;
@@ -652,7 +652,7 @@ export declare const zoraTestnet: {
652
652
  v?: `0x${string}` | undefined;
653
653
  accessList?: import("../../index.js").AccessList | undefined;
654
654
  chainId?: `0x${string}` | undefined;
655
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
655
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
656
656
  isSystemTx?: undefined;
657
657
  mint?: undefined;
658
658
  sourceHash?: undefined;
@@ -676,7 +676,7 @@ export declare const zoraTestnet: {
676
676
  v?: `0x${string}` | undefined;
677
677
  accessList?: import("../../index.js").AccessList | undefined;
678
678
  chainId?: `0x${string}` | undefined;
679
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
679
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
680
680
  isSystemTx?: undefined;
681
681
  mint?: undefined;
682
682
  sourceHash?: undefined;
@@ -725,7 +725,7 @@ export declare const zoraTestnet: {
725
725
  v?: `0x${string}` | undefined;
726
726
  accessList?: import("../../index.js").AccessList | undefined;
727
727
  chainId?: `0x${string}` | undefined;
728
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
728
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
729
729
  isSystemTx?: undefined;
730
730
  mint?: undefined;
731
731
  sourceHash?: undefined;
@@ -749,7 +749,7 @@ export declare const zoraTestnet: {
749
749
  v?: `0x${string}` | undefined;
750
750
  accessList?: import("../../index.js").AccessList | undefined;
751
751
  chainId?: `0x${string}` | undefined;
752
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
752
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
753
753
  isSystemTx?: undefined;
754
754
  mint?: undefined;
755
755
  sourceHash?: undefined;
@@ -773,7 +773,7 @@ export declare const zoraTestnet: {
773
773
  v?: `0x${string}` | undefined;
774
774
  accessList?: import("../../index.js").AccessList | undefined;
775
775
  chainId?: `0x${string}` | undefined;
776
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
776
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
777
777
  isSystemTx?: undefined;
778
778
  mint?: undefined;
779
779
  sourceHash?: undefined;
@@ -999,7 +999,7 @@ export declare const zoraTestnet: {
999
999
  };
1000
1000
  readonly transactionReceipt: {
1001
1001
  exclude: [] | undefined;
1002
- format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcTransactionReceipt>, import("../optimism/types.js").OptimismRpcTransactionReceiptOverrides>) => {
1002
+ format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcTransactionReceipt>, import("../utils.js").OptimismRpcTransactionReceiptOverrides>) => {
1003
1003
  blockHash: `0x${string}`;
1004
1004
  blockNumber: bigint;
1005
1005
  contractAddress: `0x${string}` | null;
@@ -1025,8 +1025,8 @@ export declare const zoraTestnet: {
1025
1025
  fees?: import("../../index.js").ChainFees<{
1026
1026
  readonly block: {
1027
1027
  exclude: [] | undefined;
1028
- format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcBlock>, import("../optimism/types.js").OptimismRpcBlockOverrides & {
1029
- transactions: `0x${string}`[] | import("../optimism/types.js").OptimismRpcTransaction[];
1028
+ format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcBlock>, import("../utils.js").OptimismRpcBlockOverrides & {
1029
+ transactions: `0x${string}`[] | import("../utils.js").OptimismRpcTransaction[];
1030
1030
  }>) => {
1031
1031
  baseFeePerGas: bigint | null;
1032
1032
  difficulty: bigint;
@@ -1047,7 +1047,7 @@ export declare const zoraTestnet: {
1047
1047
  stateRoot: `0x${string}`;
1048
1048
  timestamp: bigint;
1049
1049
  totalDifficulty: bigint | null;
1050
- transactions: `0x${string}`[] | import("../optimism/types.js").OptimismTransaction[];
1050
+ transactions: `0x${string}`[] | import("../utils.js").OptimismTransaction[];
1051
1051
  transactionsRoot: `0x${string}`;
1052
1052
  uncles: `0x${string}`[];
1053
1053
  } & {};
@@ -1075,7 +1075,7 @@ export declare const zoraTestnet: {
1075
1075
  v?: `0x${string}` | undefined;
1076
1076
  accessList?: undefined;
1077
1077
  chainId?: `0x${string}` | undefined;
1078
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
1078
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
1079
1079
  isSystemTx?: undefined;
1080
1080
  mint?: undefined;
1081
1081
  sourceHash?: undefined;
@@ -1124,7 +1124,7 @@ export declare const zoraTestnet: {
1124
1124
  v?: `0x${string}` | undefined;
1125
1125
  accessList?: import("../../index.js").AccessList | undefined;
1126
1126
  chainId?: `0x${string}` | undefined;
1127
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
1127
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
1128
1128
  isSystemTx?: undefined;
1129
1129
  mint?: undefined;
1130
1130
  sourceHash?: undefined;
@@ -1148,7 +1148,7 @@ export declare const zoraTestnet: {
1148
1148
  v?: `0x${string}` | undefined;
1149
1149
  accessList?: import("../../index.js").AccessList | undefined;
1150
1150
  chainId?: `0x${string}` | undefined;
1151
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
1151
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
1152
1152
  isSystemTx?: undefined;
1153
1153
  mint?: undefined;
1154
1154
  sourceHash?: undefined;
@@ -1172,7 +1172,7 @@ export declare const zoraTestnet: {
1172
1172
  v?: `0x${string}` | undefined;
1173
1173
  accessList?: import("../../index.js").AccessList | undefined;
1174
1174
  chainId?: `0x${string}` | undefined;
1175
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
1175
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
1176
1176
  isSystemTx?: undefined;
1177
1177
  mint?: undefined;
1178
1178
  sourceHash?: undefined;
@@ -1221,7 +1221,7 @@ export declare const zoraTestnet: {
1221
1221
  v?: `0x${string}` | undefined;
1222
1222
  accessList?: import("../../index.js").AccessList | undefined;
1223
1223
  chainId?: `0x${string}` | undefined;
1224
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
1224
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
1225
1225
  isSystemTx?: undefined;
1226
1226
  mint?: undefined;
1227
1227
  sourceHash?: undefined;
@@ -1245,7 +1245,7 @@ export declare const zoraTestnet: {
1245
1245
  v?: `0x${string}` | undefined;
1246
1246
  accessList?: import("../../index.js").AccessList | undefined;
1247
1247
  chainId?: `0x${string}` | undefined;
1248
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
1248
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
1249
1249
  isSystemTx?: undefined;
1250
1250
  mint?: undefined;
1251
1251
  sourceHash?: undefined;
@@ -1269,7 +1269,7 @@ export declare const zoraTestnet: {
1269
1269
  v?: `0x${string}` | undefined;
1270
1270
  accessList?: import("../../index.js").AccessList | undefined;
1271
1271
  chainId?: `0x${string}` | undefined;
1272
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
1272
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
1273
1273
  isSystemTx?: undefined;
1274
1274
  mint?: undefined;
1275
1275
  sourceHash?: undefined;
@@ -1495,7 +1495,7 @@ export declare const zoraTestnet: {
1495
1495
  };
1496
1496
  readonly transactionReceipt: {
1497
1497
  exclude: [] | undefined;
1498
- format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcTransactionReceipt>, import("../optimism/types.js").OptimismRpcTransactionReceiptOverrides>) => {
1498
+ format: (args: import("../index.js").Assign<Partial<import("../../index.js").RpcTransactionReceipt>, import("../utils.js").OptimismRpcTransactionReceiptOverrides>) => {
1499
1499
  blockHash: `0x${string}`;
1500
1500
  blockNumber: bigint;
1501
1501
  contractAddress: `0x${string}` | null;
@@ -53,7 +53,7 @@ export declare const formattersOptimism: {
53
53
  v?: `0x${string}` | undefined;
54
54
  accessList?: undefined;
55
55
  chainId?: `0x${string}` | undefined;
56
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
56
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
57
57
  isSystemTx?: undefined;
58
58
  mint?: undefined;
59
59
  sourceHash?: undefined;
@@ -102,7 +102,7 @@ export declare const formattersOptimism: {
102
102
  v?: `0x${string}` | undefined;
103
103
  accessList?: import("../../index.js").AccessList | undefined;
104
104
  chainId?: `0x${string}` | undefined;
105
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
105
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
106
106
  isSystemTx?: undefined;
107
107
  mint?: undefined;
108
108
  sourceHash?: undefined;
@@ -126,7 +126,7 @@ export declare const formattersOptimism: {
126
126
  v?: `0x${string}` | undefined;
127
127
  accessList?: import("../../index.js").AccessList | undefined;
128
128
  chainId?: `0x${string}` | undefined;
129
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
129
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
130
130
  isSystemTx?: undefined;
131
131
  mint?: undefined;
132
132
  sourceHash?: undefined;
@@ -150,7 +150,7 @@ export declare const formattersOptimism: {
150
150
  v?: `0x${string}` | undefined;
151
151
  accessList?: import("../../index.js").AccessList | undefined;
152
152
  chainId?: `0x${string}` | undefined;
153
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
153
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
154
154
  isSystemTx?: undefined;
155
155
  mint?: undefined;
156
156
  sourceHash?: undefined;
@@ -199,7 +199,7 @@ export declare const formattersOptimism: {
199
199
  v?: `0x${string}` | undefined;
200
200
  accessList?: import("../../index.js").AccessList | undefined;
201
201
  chainId?: `0x${string}` | undefined;
202
- } & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
202
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
203
203
  isSystemTx?: undefined;
204
204
  mint?: undefined;
205
205
  sourceHash?: undefined;
@@ -223,7 +223,7 @@ export declare const formattersOptimism: {
223
223
  v?: `0x${string}` | undefined;
224
224
  accessList?: import("../../index.js").AccessList | undefined;
225
225
  chainId?: `0x${string}` | undefined;
226
- } & Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
226
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex"> & {
227
227
  isSystemTx?: undefined;
228
228
  mint?: undefined;
229
229
  sourceHash?: undefined;
@@ -247,7 +247,7 @@ export declare const formattersOptimism: {
247
247
  v?: `0x${string}` | undefined;
248
248
  accessList?: import("../../index.js").AccessList | undefined;
249
249
  chainId?: `0x${string}` | undefined;
250
- } & Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
250
+ } & import("../../types/utils.js").Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex"> & {
251
251
  isSystemTx?: undefined;
252
252
  mint?: undefined;
253
253
  sourceHash?: undefined;
@@ -1,7 +1,7 @@
1
- export { formattersCelo } from '../celo/formatters.js';
2
- export { serializeTransactionCelo, serializersCelo, } from '../celo/serializers.js';
3
- export { parseTransactionCelo } from '../celo/parsers.js';
4
- export type { CeloBlock, CeloBlockOverrides, CeloRpcBlock, CeloRpcBlockOverrides, CeloRpcTransaction, CeloRpcTransactionReceipt, CeloRpcTransactionReceiptOverrides, CeloRpcTransactionRequest, CeloTransaction, CeloTransactionReceipt, CeloTransactionReceiptOverrides, CeloTransactionRequest, CeloTransactionSerializable, CeloTransactionSerialized, CeloTransactionType, RpcTransactionCIP42, RpcTransactionRequestCIP42, TransactionCIP42, TransactionRequestCIP42, TransactionSerializableCIP42, TransactionSerializedCIP42, } from '../celo/types.js';
5
- export { formattersOptimism } from '../optimism/formatters.js';
6
- export type { OptimismBlock, OptimismBlockOverrides, OptimismDepositTransaction, OptimismRpcBlock, OptimismRpcBlockOverrides, OptimismRpcDepositTransaction, OptimismRpcTransaction, OptimismRpcTransactionReceipt, OptimismRpcTransactionReceiptOverrides, OptimismTransaction, OptimismTransactionReceipt, OptimismTransactionReceiptOverrides, } from '../optimism/types.js';
7
- //# sourceMappingURL=index.d.ts.map
1
+ export { formattersCelo } from './celo/formatters.js';
2
+ export { serializeTransactionCelo, serializersCelo, } from './celo/serializers.js';
3
+ export { parseTransactionCelo } from './celo/parsers.js';
4
+ export type { CeloBlock, CeloBlockOverrides, CeloRpcBlock, CeloRpcBlockOverrides, CeloRpcTransaction, CeloRpcTransactionReceipt, CeloRpcTransactionReceiptOverrides, CeloRpcTransactionRequest, CeloTransaction, CeloTransactionReceipt, CeloTransactionReceiptOverrides, CeloTransactionRequest, CeloTransactionSerializable, CeloTransactionSerialized, CeloTransactionType, RpcTransactionCIP42, RpcTransactionRequestCIP42, TransactionCIP42, TransactionRequestCIP42, TransactionSerializableCIP42, TransactionSerializedCIP42, } from './celo/types.js';
5
+ export { formattersOptimism } from './optimism/formatters.js';
6
+ export type { OptimismBlock, OptimismBlockOverrides, OptimismDepositTransaction, OptimismRpcBlock, OptimismRpcBlockOverrides, OptimismRpcDepositTransaction, OptimismRpcTransaction, OptimismRpcTransactionReceipt, OptimismRpcTransactionReceiptOverrides, OptimismTransaction, OptimismTransactionReceipt, OptimismTransactionReceiptOverrides, } from './optimism/types.js';
7
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../chains/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EACL,wBAAwB,EACxB,eAAe,GAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,kCAAkC,EAClC,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,+BAA+B,EAC/B,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,YAAY,EACV,aAAa,EACb,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,sCAAsC,EACtC,mBAAmB,EACnB,0BAA0B,EAC1B,mCAAmC,GACpC,MAAM,qBAAqB,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const version = "2.0.0-alpha.3";
1
+ export declare const version = "2.0.0-alpha.5";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -92,13 +92,7 @@ export type NeverBy<T, K extends keyof T> = {
92
92
  * => string
93
93
  */
94
94
  export type NoUndefined<T> = T extends undefined ? never : T;
95
- /**
96
- * @description Construct a type with the properties of union type T except for those in type K.
97
- * @example
98
- * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
99
- * => { b: number } | { b: undefined, c: number }
100
- */
101
- export type UnionOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
95
+ export type Omit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;
102
96
  /**
103
97
  * @description Combines members of an intersection into a readable type.
104
98
  *
@@ -110,7 +104,6 @@ export type UnionOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : nev
110
104
  export type Prettify<T> = {
111
105
  [K in keyof T]: T[K];
112
106
  } & {};
113
- export type UnionEvaluate<type> = type extends object ? Prettify<type> : type;
114
107
  /**
115
108
  * @description Creates a type that extracts the values of T.
116
109
  *
@@ -131,5 +124,16 @@ export type OneOf<union extends object, keys extends KeyofUnion<union> = KeyofUn
131
124
  [K in Exclude<keys, keyof Item>]?: undefined;
132
125
  }> : never;
133
126
  type KeyofUnion<type> = type extends type ? keyof type : never;
127
+ /** Loose version of {@link Omit} */
128
+ export type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>;
129
+ export type UnionEvaluate<type> = type extends object ? Prettify<type> : type;
130
+ export type UnionLooseOmit<type, keys extends string> = type extends any ? LooseOmit<type, keys> : never;
131
+ /**
132
+ * @description Construct a type with the properties of union type T except for those in type K.
133
+ * @example
134
+ * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
135
+ * => { b: number } | { b: undefined, c: number }
136
+ */
137
+ export type UnionOmit<type, keys extends keyof type> = type extends any ? Omit<type, keys> : never;
134
138
  export {};
135
139
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../types/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,MAAM,CAChB,CAAC,SAAS,SAAS,OAAO,EAAE,EAC5B,CAAC,EACD,GAAG,SAAS,SAAS,OAAO,EAAE,GAAG,EAAE,IACjC,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,IAAI,SAAS,SAAS,OAAO,EA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ACnE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAChB,KAAK,CAAA"}
@@ -3,13 +3,13 @@ import type { Chain } from '../../types/chain.js';
3
3
  import type { ExtractChainFormatterExclude, ExtractChainFormatterReturnType } from '../../types/chain.js';
4
4
  import type { RpcTransaction } from '../../types/rpc.js';
5
5
  import type { Transaction } from '../../types/transaction.js';
6
- import type { UnionOmit } from '../../types/utils.js';
6
+ import type { UnionLooseOmit } from '../../types/utils.js';
7
7
  type TransactionPendingDependencies = 'blockHash' | 'blockNumber' | 'transactionIndex';
8
8
  export type FormattedTransaction<TChain extends {
9
9
  formatters?: Chain['formatters'];
10
10
  } | undefined = {
11
11
  formatters?: Chain['formatters'];
12
- } | undefined, TBlockTag extends BlockTag = BlockTag, _FormatterReturnType = ExtractChainFormatterReturnType<TChain, 'transaction', Transaction>, _ExcludedPendingDependencies extends string = TransactionPendingDependencies & ExtractChainFormatterExclude<TChain, 'transaction'>> = UnionOmit<_FormatterReturnType, TransactionPendingDependencies> & {
12
+ } | undefined, TBlockTag extends BlockTag = BlockTag, _FormatterReturnType = ExtractChainFormatterReturnType<TChain, 'transaction', Transaction>, _ExcludedPendingDependencies extends string = TransactionPendingDependencies & ExtractChainFormatterExclude<TChain, 'transaction'>> = UnionLooseOmit<_FormatterReturnType, TransactionPendingDependencies> & {
13
13
  [K in _ExcludedPendingDependencies]: never;
14
14
  } & Pick<Transaction<bigint, number, TBlockTag extends 'pending' ? true : false>, TransactionPendingDependencies>;
15
15
  export declare const transactionType: {
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../utils/formatters/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EACV,4BAA4B,EAC5B,+BAA+B,EAChC,MAAM,sBAAsB,CAAA;AAC7B,OAA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AC5B,+BAA+B,EAChC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAI1D,KAAK,8BAA8B,GAC/B,WAAW,GACX,aAAa,GACb,kBAAkB,CAAA;AAEtB,MAAM,MAAM,oBAAoB,CAC9B,MAAM,SAAS;IAAE,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;CAAE,GAAG,SAAS,GAC3D;IAAE,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAA;CAAE,GACpC,SAAS,EACb,SAAS,SAAS,QAAQ,GAAG,QAAQ,EACrC,oBAAoB,GAAG,+BAA+B,CACpD,MAAM,EACN,aAAa,EACb,WAAW,CACZ,EACD,4BAA4B,SAAS,MAAM,GAAG,8BAA8B,GAC1E,4BAA4B,CAAC,MAAM,EAAE,aAAa,CAAC,IACnD,cAAc,CAAC,oBAAoB,EAAE,8BAA8B,CAAC,GAAG;KACxE,CAAC,IAAI,4BAA4B,GAAG,KAAK;CAC3C,GAAG,IAAI,CACJ,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,SAAS,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC,EACvE,8BAA8B,CAC/B,CAAA;AAEH,eAAO,MAAM,eAAe;;;;CAIlB,CAAA;AAEV,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,eAqCrE;AAED,eAAO,MAAM,iBAAiB;;;;;;;CAG7B,CAAA"}
@@ -12,7 +12,7 @@ import type {
12
12
  GetValue,
13
13
  } from '../../types/contract.js'
14
14
  import type { Hex } from '../../types/misc.js'
15
- import type { UnionOmit } from '../../types/utils.js'
15
+ import type { Prettify, UnionEvaluate, UnionOmit } from '../../types/utils.js'
16
16
  import { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js'
17
17
  import type { FormattedTransactionRequest } from '../../utils/formatters/transactionRequest.js'
18
18
  import {
@@ -37,35 +37,41 @@ export type WriteContractParameters<
37
37
  chainOverride extends Chain | undefined = Chain | undefined,
38
38
  ///
39
39
  allFunctionNames = ContractFunctionName<abi, 'nonpayable' | 'payable'>,
40
- > = ContractFunctionParameters<
41
- abi,
42
- 'nonpayable' | 'payable',
43
- functionName,
44
- args,
45
- allFunctionNames
46
- > &
47
- UnionOmit<
48
- FormattedTransactionRequest<
49
- chainOverride extends Chain ? chainOverride : chain
50
- >,
51
- 'data' | 'from' | 'to' | 'value'
40
+ > = UnionEvaluate<
41
+ UnionEvaluate<
42
+ UnionOmit<
43
+ FormattedTransactionRequest<
44
+ chainOverride extends Chain ? chainOverride : chain
45
+ >,
46
+ 'data' | 'from' | 'to' | 'value'
47
+ >
52
48
  > &
53
- GetAccountParameter<account> &
54
- GetChain<chain, chainOverride> &
55
- GetValue<
56
- abi,
57
- functionName,
58
- SendTransactionParameters<
59
- chain,
60
- account,
61
- chainOverride
62
- > extends SendTransactionParameters
63
- ? SendTransactionParameters<chain, account, chainOverride>['value']
64
- : SendTransactionParameters['value']
65
- > & {
66
- /** Data to append to the end of the calldata. Useful for adding a ["domain" tag](https://opensea.notion.site/opensea/Seaport-Order-Attributions-ec2d69bf455041a5baa490941aad307f). */
67
- dataSuffix?: Hex
68
- }
49
+ ContractFunctionParameters<
50
+ abi,
51
+ 'nonpayable' | 'payable',
52
+ functionName,
53
+ args,
54
+ allFunctionNames
55
+ > &
56
+ Prettify<
57
+ GetAccountParameter<account> &
58
+ GetChain<chain, chainOverride> &
59
+ GetValue<
60
+ abi,
61
+ functionName,
62
+ SendTransactionParameters<
63
+ chain,
64
+ account,
65
+ chainOverride
66
+ > extends SendTransactionParameters
67
+ ? SendTransactionParameters<chain, account, chainOverride>['value']
68
+ : SendTransactionParameters['value']
69
+ > & {
70
+ /** Data to append to the end of the calldata. Useful for adding a ["domain" tag](https://opensea.notion.site/opensea/Seaport-Order-Attributions-ec2d69bf455041a5baa490941aad307f). */
71
+ dataSuffix?: Hex
72
+ }
73
+ >
74
+ >
69
75
 
70
76
  export type WriteContractReturnType = SendTransactionReturnType
71
77
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "type": "module",
3
- "types": "../../_types/chains/utils/index.d.ts",
4
- "module": "../../_esm/chains/utils/index.js",
5
- "main": "../../_cjs/chains/utils/index.js"
3
+ "types": "../../_types/chains/utils.d.ts",
4
+ "module": "../../_esm/chains/utils.js",
5
+ "main": "../../_cjs/chains/utils.js"
6
6
  }
@@ -1,9 +1,9 @@
1
- export { formattersCelo } from '../celo/formatters.js'
1
+ export { formattersCelo } from './celo/formatters.js'
2
2
  export {
3
3
  serializeTransactionCelo,
4
4
  serializersCelo,
5
- } from '../celo/serializers.js'
6
- export { parseTransactionCelo } from '../celo/parsers.js'
5
+ } from './celo/serializers.js'
6
+ export { parseTransactionCelo } from './celo/parsers.js'
7
7
  export type {
8
8
  CeloBlock,
9
9
  CeloBlockOverrides,
@@ -26,9 +26,9 @@ export type {
26
26
  TransactionRequestCIP42,
27
27
  TransactionSerializableCIP42,
28
28
  TransactionSerializedCIP42,
29
- } from '../celo/types.js'
29
+ } from './celo/types.js'
30
30
 
31
- export { formattersOptimism } from '../optimism/formatters.js'
31
+ export { formattersOptimism } from './optimism/formatters.js'
32
32
  export type {
33
33
  OptimismBlock,
34
34
  OptimismBlockOverrides,
@@ -42,4 +42,4 @@ export type {
42
42
  OptimismTransaction,
43
43
  OptimismTransactionReceipt,
44
44
  OptimismTransactionReceiptOverrides,
45
- } from '../optimism/types.js'
45
+ } from './optimism/types.js'
@@ -682,6 +682,6 @@ export function walletActions<
682
682
  signTypedData: (args) => signTypedData(client, args),
683
683
  switchChain: (args) => switchChain(client, args),
684
684
  watchAsset: (args) => watchAsset(client, args),
685
- writeContract: (args) => writeContract(client, args),
685
+ writeContract: (args) => writeContract(client, args as any),
686
686
  }
687
687
  }
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.0.0-alpha.3'
1
+ export const version = '2.0.0-alpha.5'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.0.0-alpha.3",
4
+ "version": "2.0.0-alpha.5",
5
5
  "type": "module",
6
6
  "main": "./_cjs/index.js",
7
7
  "module": "./_esm/index.js",
@@ -43,9 +43,9 @@
43
43
  "default": "./_cjs/chains/index.js"
44
44
  },
45
45
  "./chains/utils": {
46
- "types": "./_types/chains/utils/index.d.ts",
47
- "import": "./_esm/chains/utils/index.js",
48
- "default": "./_cjs/chains/utils/index.js"
46
+ "types": "./_types/chains/utils.d.ts",
47
+ "import": "./_esm/chains/utils.js",
48
+ "default": "./_cjs/chains/utils.js"
49
49
  },
50
50
  "./contract": {
51
51
  "types": "./_types/contract/index.d.ts",
@@ -90,7 +90,7 @@
90
90
  "accounts": ["./_types/accounts/index.d.ts"],
91
91
  "actions": ["./_types/actions/index.d.ts"],
92
92
  "chains": ["./_types/chains/index.d.ts"],
93
- "chains/utils": ["./_types/chains/utils/index.d.ts"],
93
+ "chains/utils": ["./_types/chains/utils.d.ts"],
94
94
  "contract": ["./_types/contract/index.d.ts"],
95
95
  "ens": ["./_types/ens/index.d.ts"],
96
96
  "public": ["./_types/public/index.d.ts"],