viem 0.0.0-main.20231105T204445 → 0.0.0-main.20231105T212435
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/CHANGELOG.md +8 -0
- package/_cjs/chains/celo/formatters.js +22 -19
- package/_cjs/chains/celo/formatters.js.map +1 -1
- package/_cjs/chains/celo/serializers.js +1 -1
- package/_cjs/chains/celo/serializers.js.map +1 -1
- package/_cjs/chains/celo/utils.js +4 -6
- package/_cjs/chains/celo/utils.js.map +1 -1
- package/_cjs/errors/node.js +11 -11
- package/_cjs/errors/node.js.map +1 -1
- package/_cjs/errors/rpc.js +18 -18
- package/_cjs/errors/rpc.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_esm/chains/celo/formatters.js +22 -19
- package/_esm/chains/celo/formatters.js.map +1 -1
- package/_esm/chains/celo/serializers.js +1 -1
- package/_esm/chains/celo/serializers.js.map +1 -1
- package/_esm/chains/celo/utils.js +4 -6
- package/_esm/chains/celo/utils.js.map +1 -1
- package/_esm/errors/node.js +11 -22
- package/_esm/errors/node.js.map +1 -1
- package/_esm/errors/rpc.js +18 -36
- package/_esm/errors/rpc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_types/chains/celo/formatters.d.ts +6 -6
- package/_types/chains/celo/formatters.d.ts.map +1 -1
- package/_types/chains/celo/types.d.ts +2 -2
- package/_types/chains/celo/types.d.ts.map +1 -1
- package/_types/chains/celo/utils.d.ts.map +1 -1
- package/_types/chains/definitions/celo.d.ts +6 -6
- package/_types/chains/definitions/celoAlfajores.d.ts +6 -6
- package/_types/chains/definitions/celoCannoli.d.ts +6 -6
- package/_types/errors/version.d.ts +1 -1
- package/chains/celo/formatters.ts +23 -21
- package/chains/celo/serializers.ts +1 -1
- package/chains/celo/types.ts +18 -14
- package/chains/celo/utils.ts +2 -6
- package/errors/version.ts +1 -1
- package/package.json +1 -1
@@ -84,12 +84,12 @@ export declare const celo: import("../../types/utils.js").Assign<{
|
|
84
84
|
feeCurrency: `0x${string}` | null;
|
85
85
|
gatewayFee: `0x${string}` | null;
|
86
86
|
gatewayFeeRecipient: `0x${string}` | null;
|
87
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
87
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
88
88
|
feeCurrency: `0x${string}` | null;
|
89
89
|
gatewayFee: `0x${string}` | null;
|
90
90
|
gatewayFeeRecipient: `0x${string}` | null;
|
91
91
|
type: "0x7c";
|
92
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
92
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
93
93
|
feeCurrency: `0x${string}` | null;
|
94
94
|
type: "0x7b";
|
95
95
|
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
|
@@ -104,12 +104,12 @@ export declare const celo: import("../../types/utils.js").Assign<{
|
|
104
104
|
feeCurrency: `0x${string}` | null;
|
105
105
|
gatewayFee: `0x${string}` | null;
|
106
106
|
gatewayFeeRecipient: `0x${string}` | null;
|
107
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
107
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
108
108
|
feeCurrency: `0x${string}` | null;
|
109
109
|
gatewayFee: `0x${string}` | null;
|
110
110
|
gatewayFeeRecipient: `0x${string}` | null;
|
111
111
|
type: "0x7c";
|
112
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
112
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
113
113
|
feeCurrency: `0x${string}` | null;
|
114
114
|
type: "0x7b";
|
115
115
|
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
|
@@ -124,12 +124,12 @@ export declare const celo: import("../../types/utils.js").Assign<{
|
|
124
124
|
feeCurrency: `0x${string}` | null;
|
125
125
|
gatewayFee: `0x${string}` | null;
|
126
126
|
gatewayFeeRecipient: `0x${string}` | null;
|
127
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
127
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
128
128
|
feeCurrency: `0x${string}` | null;
|
129
129
|
gatewayFee: `0x${string}` | null;
|
130
130
|
gatewayFeeRecipient: `0x${string}` | null;
|
131
131
|
type: "0x7c";
|
132
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
132
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
133
133
|
feeCurrency: `0x${string}` | null;
|
134
134
|
type: "0x7b";
|
135
135
|
})) => ({
|
@@ -84,12 +84,12 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
|
|
84
84
|
feeCurrency: `0x${string}` | null;
|
85
85
|
gatewayFee: `0x${string}` | null;
|
86
86
|
gatewayFeeRecipient: `0x${string}` | null;
|
87
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
87
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
88
88
|
feeCurrency: `0x${string}` | null;
|
89
89
|
gatewayFee: `0x${string}` | null;
|
90
90
|
gatewayFeeRecipient: `0x${string}` | null;
|
91
91
|
type: "0x7c";
|
92
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
92
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
93
93
|
feeCurrency: `0x${string}` | null;
|
94
94
|
type: "0x7b";
|
95
95
|
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
|
@@ -104,12 +104,12 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
|
|
104
104
|
feeCurrency: `0x${string}` | null;
|
105
105
|
gatewayFee: `0x${string}` | null;
|
106
106
|
gatewayFeeRecipient: `0x${string}` | null;
|
107
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
107
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
108
108
|
feeCurrency: `0x${string}` | null;
|
109
109
|
gatewayFee: `0x${string}` | null;
|
110
110
|
gatewayFeeRecipient: `0x${string}` | null;
|
111
111
|
type: "0x7c";
|
112
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
112
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
113
113
|
feeCurrency: `0x${string}` | null;
|
114
114
|
type: "0x7b";
|
115
115
|
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
|
@@ -124,12 +124,12 @@ export declare const celoAlfajores: import("../../types/utils.js").Assign<{
|
|
124
124
|
feeCurrency: `0x${string}` | null;
|
125
125
|
gatewayFee: `0x${string}` | null;
|
126
126
|
gatewayFeeRecipient: `0x${string}` | null;
|
127
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
127
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
128
128
|
feeCurrency: `0x${string}` | null;
|
129
129
|
gatewayFee: `0x${string}` | null;
|
130
130
|
gatewayFeeRecipient: `0x${string}` | null;
|
131
131
|
type: "0x7c";
|
132
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
132
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
133
133
|
feeCurrency: `0x${string}` | null;
|
134
134
|
type: "0x7b";
|
135
135
|
})) => ({
|
@@ -77,12 +77,12 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
|
|
77
77
|
feeCurrency: `0x${string}` | null;
|
78
78
|
gatewayFee: `0x${string}` | null;
|
79
79
|
gatewayFeeRecipient: `0x${string}` | null;
|
80
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
80
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
81
81
|
feeCurrency: `0x${string}` | null;
|
82
82
|
gatewayFee: `0x${string}` | null;
|
83
83
|
gatewayFeeRecipient: `0x${string}` | null;
|
84
84
|
type: "0x7c";
|
85
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
85
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
86
86
|
feeCurrency: `0x${string}` | null;
|
87
87
|
type: "0x7b";
|
88
88
|
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
|
@@ -97,12 +97,12 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
|
|
97
97
|
feeCurrency: `0x${string}` | null;
|
98
98
|
gatewayFee: `0x${string}` | null;
|
99
99
|
gatewayFeeRecipient: `0x${string}` | null;
|
100
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
100
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
101
101
|
feeCurrency: `0x${string}` | null;
|
102
102
|
gatewayFee: `0x${string}` | null;
|
103
103
|
gatewayFeeRecipient: `0x${string}` | null;
|
104
104
|
type: "0x7c";
|
105
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
105
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP2930<`0x${string}`, `0x${string}`, boolean, "0x1">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
106
106
|
feeCurrency: `0x${string}` | null;
|
107
107
|
type: "0x7b";
|
108
108
|
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionLegacy<`0x${string}`, `0x${string}`, boolean, "0x0">, "typeHex"> & {
|
@@ -117,12 +117,12 @@ export declare const celoCannoli: import("../../types/utils.js").Assign<{
|
|
117
117
|
feeCurrency: `0x${string}` | null;
|
118
118
|
gatewayFee: `0x${string}` | null;
|
119
119
|
gatewayFeeRecipient: `0x${string}` | null;
|
120
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
120
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
121
121
|
feeCurrency: `0x${string}` | null;
|
122
122
|
gatewayFee: `0x${string}` | null;
|
123
123
|
gatewayFeeRecipient: `0x${string}` | null;
|
124
124
|
type: "0x7c";
|
125
|
-
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
125
|
+
}) | (import("../../types/utils.js").Assign_<Partial<Omit<import("../../index.js").TransactionEIP1559<`0x${string}`, `0x${string}`, boolean, "0x2">, "typeHex">>, import("../celo/types.js").CeloRpcTransaction> & Omit<import("../../index.js").TransactionBase<`0x${string}`, `0x${string}`, boolean>, "typeHex"> & import("../../index.js").FeeValuesEIP1559<`0x${string}`> & {
|
126
126
|
feeCurrency: `0x${string}` | null;
|
127
127
|
type: "0x7b";
|
128
128
|
})) => ({
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const version = "0.0.0-main.
|
1
|
+
export declare const version = "0.0.0-main.20231105T212435";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
@@ -55,15 +55,19 @@ export const formattersCelo = {
|
|
55
55
|
}),
|
56
56
|
transaction: /*#__PURE__*/ defineTransaction({
|
57
57
|
format(args: CeloRpcTransaction): CeloTransaction {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
58
|
+
const transaction = { feeCurrency: args.feeCurrency } as CeloTransaction
|
59
|
+
|
60
|
+
if (args.type === '0x7b') transaction.type = 'cip64'
|
61
|
+
else {
|
62
|
+
if (args.type === '0x7c') transaction.type = 'cip42'
|
63
|
+
|
64
|
+
transaction.gatewayFee = args.gatewayFee
|
65
|
+
? hexToBigInt(args.gatewayFee)
|
66
|
+
: null
|
67
|
+
transaction.gatewayFeeRecipient = args.gatewayFeeRecipient
|
68
|
+
}
|
69
|
+
|
70
|
+
return transaction
|
67
71
|
},
|
68
72
|
}),
|
69
73
|
transactionReceipt: /*#__PURE__*/ defineTransactionReceipt({
|
@@ -80,22 +84,20 @@ export const formattersCelo = {
|
|
80
84
|
|
81
85
|
transactionRequest: /*#__PURE__*/ defineTransactionRequest({
|
82
86
|
format(args: CeloTransactionRequest): CeloRpcTransactionRequest {
|
83
|
-
if (isCIP64(args))
|
84
|
-
return {
|
85
|
-
type: '0x7b',
|
86
|
-
feeCurrency: args.feeCurrency,
|
87
|
-
} as CeloRpcTransactionRequest
|
88
|
-
|
89
87
|
const request = {
|
90
88
|
feeCurrency: args.feeCurrency,
|
91
|
-
gatewayFee:
|
92
|
-
typeof args.gatewayFee !== 'undefined'
|
93
|
-
? numberToHex(args.gatewayFee)
|
94
|
-
: undefined,
|
95
|
-
gatewayFeeRecipient: args.gatewayFeeRecipient,
|
96
89
|
} as CeloRpcTransactionRequest
|
97
90
|
|
98
|
-
if (
|
91
|
+
if (isCIP64(args)) request.type = '0x7b'
|
92
|
+
else {
|
93
|
+
if (isCIP42(args)) request.type = '0x7c'
|
94
|
+
|
95
|
+
request.gatewayFee =
|
96
|
+
typeof args.gatewayFee !== 'undefined'
|
97
|
+
? numberToHex(args.gatewayFee)
|
98
|
+
: undefined
|
99
|
+
request.gatewayFeeRecipient = args.gatewayFeeRecipient
|
100
|
+
}
|
99
101
|
|
100
102
|
return request
|
101
103
|
},
|
package/chains/celo/types.ts
CHANGED
@@ -135,21 +135,25 @@ type RpcTransactionRequest = RpcTransactionRequest_ & {
|
|
135
135
|
gatewayFeeRecipient?: Address
|
136
136
|
}
|
137
137
|
|
138
|
-
export type RpcTransactionCIP42<TPending extends boolean = boolean> =
|
139
|
-
TransactionBase<Quantity, Index, TPending
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
138
|
+
export type RpcTransactionCIP42<TPending extends boolean = boolean> = Omit<
|
139
|
+
TransactionBase<Quantity, Index, TPending>,
|
140
|
+
'typeHex'
|
141
|
+
> &
|
142
|
+
FeeValuesEIP1559<Quantity> & {
|
143
|
+
feeCurrency: Address | null
|
144
|
+
gatewayFee: Hex | null
|
145
|
+
gatewayFeeRecipient: Address | null
|
146
|
+
type: '0x7c'
|
147
|
+
}
|
146
148
|
|
147
|
-
export type RpcTransactionCIP64<TPending extends boolean = boolean> =
|
148
|
-
TransactionBase<Quantity, Index, TPending
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
149
|
+
export type RpcTransactionCIP64<TPending extends boolean = boolean> = Omit<
|
150
|
+
TransactionBase<Quantity, Index, TPending>,
|
151
|
+
'typeHex'
|
152
|
+
> &
|
153
|
+
FeeValuesEIP1559<Quantity> & {
|
154
|
+
feeCurrency: Address | null
|
155
|
+
type: '0x7b'
|
156
|
+
}
|
153
157
|
|
154
158
|
export type RpcTransactionRequestCIP42 = TransactionRequestBase<
|
155
159
|
Quantity,
|
package/chains/celo/utils.ts
CHANGED
@@ -43,9 +43,7 @@ export function isCIP42(
|
|
43
43
|
transaction: CeloTransactionSerializable | CeloTransactionRequest,
|
44
44
|
): transaction is TransactionSerializableCIP42 {
|
45
45
|
// Enable end-user to force the tx to be considered as a cip42
|
46
|
-
if (transaction.type === 'cip42'
|
47
|
-
return true
|
48
|
-
}
|
46
|
+
if (transaction.type) return transaction.type === 'cip42'
|
49
47
|
|
50
48
|
return (
|
51
49
|
isEIP1559(transaction) &&
|
@@ -59,9 +57,7 @@ export function isCIP64(
|
|
59
57
|
transaction: CeloTransactionSerializable | CeloTransactionRequest,
|
60
58
|
): transaction is TransactionSerializableCIP64 {
|
61
59
|
// Enable end-user to force the tx to be considered as a cip64
|
62
|
-
if (transaction.type === 'cip64'
|
63
|
-
return true
|
64
|
-
}
|
60
|
+
if (transaction.type) return transaction.type === 'cip64'
|
65
61
|
|
66
62
|
return (
|
67
63
|
isEIP1559(transaction) &&
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '0.0.0-main.
|
1
|
+
export const version = '0.0.0-main.20231105T212435'
|
package/package.json
CHANGED