viem 2.0.0-alpha.4 → 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.
- package/_cjs/actions/wallet/writeContract.js.map +1 -1
- package/_cjs/clients/decorators/wallet.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_esm/actions/wallet/writeContract.js.map +1 -1
- package/_esm/clients/decorators/wallet.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_types/actions/wallet/writeContract.d.ts +3 -3
- package/_types/actions/wallet/writeContract.d.ts.map +1 -1
- package/_types/chains/celo/formatters.d.ts +7 -7
- package/_types/chains/definitions/base.d.ts +21 -21
- package/_types/chains/definitions/baseGoerli.d.ts +21 -21
- package/_types/chains/definitions/celo.d.ts +21 -21
- package/_types/chains/definitions/celoAlfajores.d.ts +21 -21
- package/_types/chains/definitions/celoCannoli.d.ts +21 -21
- package/_types/chains/definitions/optimism.d.ts +21 -21
- package/_types/chains/definitions/optimismGoerli.d.ts +21 -21
- package/_types/chains/definitions/zora.d.ts +21 -21
- package/_types/chains/definitions/zoraTestnet.d.ts +21 -21
- package/_types/chains/optimism/formatters.d.ts +7 -7
- package/_types/errors/version.d.ts +1 -1
- package/_types/types/utils.d.ts +12 -8
- package/_types/types/utils.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +2 -2
- package/_types/utils/formatters/transaction.d.ts.map +1 -1
- package/actions/wallet/writeContract.ts +35 -29
- package/clients/decorators/wallet.ts +1 -1
- package/errors/version.ts +1 -1
- package/package.json +1 -1
- package/types/utils.ts +32 -11
- package/utils/formatters/transaction.ts +2 -2
@@ -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;
|
@@ -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;
|
@@ -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;
|
@@ -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,2 +1,2 @@
|
|
1
|
-
export declare const version = "2.0.0-alpha.
|
1
|
+
export declare const version = "2.0.0-alpha.5";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/_types/types/utils.d.ts
CHANGED
@@ -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,EAA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AI,GAAG,KAAK,CAAA;AAK9D,oCAAoC;AACpC,MAAM,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,CACrD,IAAI,EACJ,OAAO,CAAC,MAAM,IAAI,EAAE,IAAI,CAAC,CAC1B,CAAA;AAKD,MAAM,MAAM,aAAa,CAAC,IAAI,IAAI,IAAI,SAAS,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAE7E,MAAM,MAAM,cAAc,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,SAAS,GAAG,GACpE,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,GACrB,KAAK,CAAA;AAET;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,SAAS,MAAM,IAAI,IAAI,IAAI,SAAS,GAAG,GACnE,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 {
|
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'>> =
|
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,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,
|
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,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
|
-
> =
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
|
@@ -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.
|
1
|
+
export const version = '2.0.0-alpha.5'
|
package/package.json
CHANGED
package/types/utils.ts
CHANGED
@@ -125,15 +125,10 @@ export type NeverBy<T, K extends keyof T> = {
|
|
125
125
|
*/
|
126
126
|
export type NoUndefined<T> = T extends undefined ? never : T
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
* => { b: number } | { b: undefined, c: number }
|
133
|
-
*/
|
134
|
-
export type UnionOmit<T, K extends keyof any> = T extends any
|
135
|
-
? Omit<T, K>
|
136
|
-
: never
|
128
|
+
export type Omit<type, keys extends keyof type> = Pick<
|
129
|
+
type,
|
130
|
+
Exclude<keyof type, keys>
|
131
|
+
>
|
137
132
|
|
138
133
|
/**
|
139
134
|
* @description Combines members of an intersection into a readable type.
|
@@ -147,8 +142,6 @@ export type Prettify<T> = {
|
|
147
142
|
[K in keyof T]: T[K]
|
148
143
|
} & {}
|
149
144
|
|
150
|
-
export type UnionEvaluate<type> = type extends object ? Prettify<type> : type
|
151
|
-
|
152
145
|
/**
|
153
146
|
* @description Creates a type that extracts the values of T.
|
154
147
|
*
|
@@ -199,3 +192,31 @@ export type OneOf<
|
|
199
192
|
? Prettify<Item & { [K in Exclude<keys, keyof Item>]?: undefined }>
|
200
193
|
: never
|
201
194
|
type KeyofUnion<type> = type extends type ? keyof type : never
|
195
|
+
|
196
|
+
///////////////////////////////////////////////////////////////////////////
|
197
|
+
// Loose types
|
198
|
+
|
199
|
+
/** Loose version of {@link Omit} */
|
200
|
+
export type LooseOmit<type, keys extends string> = Pick<
|
201
|
+
type,
|
202
|
+
Exclude<keyof type, keys>
|
203
|
+
>
|
204
|
+
|
205
|
+
///////////////////////////////////////////////////////////////////////////
|
206
|
+
// Union types
|
207
|
+
|
208
|
+
export type UnionEvaluate<type> = type extends object ? Prettify<type> : type
|
209
|
+
|
210
|
+
export type UnionLooseOmit<type, keys extends string> = type extends any
|
211
|
+
? LooseOmit<type, keys>
|
212
|
+
: never
|
213
|
+
|
214
|
+
/**
|
215
|
+
* @description Construct a type with the properties of union type T except for those in type K.
|
216
|
+
* @example
|
217
|
+
* type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>
|
218
|
+
* => { b: number } | { b: undefined, c: number }
|
219
|
+
*/
|
220
|
+
export type UnionOmit<type, keys extends keyof type> = type extends any
|
221
|
+
? Omit<type, keys>
|
222
|
+
: never
|
@@ -6,7 +6,7 @@ import type {
|
|
6
6
|
} from '../../types/chain.js'
|
7
7
|
import type { RpcTransaction } from '../../types/rpc.js'
|
8
8
|
import type { Transaction } from '../../types/transaction.js'
|
9
|
-
import type {
|
9
|
+
import type { UnionLooseOmit } from '../../types/utils.js'
|
10
10
|
import { hexToNumber } from '../encoding/fromHex.js'
|
11
11
|
import { defineFormatter } from './formatter.js'
|
12
12
|
|
@@ -27,7 +27,7 @@ export type FormattedTransaction<
|
|
27
27
|
>,
|
28
28
|
_ExcludedPendingDependencies extends string = TransactionPendingDependencies &
|
29
29
|
ExtractChainFormatterExclude<TChain, 'transaction'>,
|
30
|
-
> =
|
30
|
+
> = UnionLooseOmit<_FormatterReturnType, TransactionPendingDependencies> & {
|
31
31
|
[K in _ExcludedPendingDependencies]: never
|
32
32
|
} & Pick<
|
33
33
|
Transaction<bigint, number, TBlockTag extends 'pending' ? true : false>,
|