ox 1.7.5 → 1.8.1
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 +16 -0
- package/dist/core/Frame.d.ts +290 -0
- package/dist/core/Frame.d.ts.map +1 -0
- package/dist/core/Frame.js +306 -0
- package/dist/core/Frame.js.map +1 -0
- package/dist/core/FrameReceipt.d.ts +92 -0
- package/dist/core/FrameReceipt.d.ts.map +1 -0
- package/dist/core/FrameReceipt.js +72 -0
- package/dist/core/FrameReceipt.js.map +1 -0
- package/dist/core/FrameSignature.d.ts +357 -0
- package/dist/core/FrameSignature.d.ts.map +1 -0
- package/dist/core/FrameSignature.js +411 -0
- package/dist/core/FrameSignature.js.map +1 -0
- package/dist/core/Transaction.d.ts +29 -4
- package/dist/core/Transaction.d.ts.map +1 -1
- package/dist/core/Transaction.js +25 -4
- package/dist/core/Transaction.js.map +1 -1
- package/dist/core/TransactionReceipt.d.ts +13 -4
- package/dist/core/TransactionReceipt.d.ts.map +1 -1
- package/dist/core/TransactionReceipt.js +14 -0
- package/dist/core/TransactionReceipt.js.map +1 -1
- package/dist/core/TransactionRequest.d.ts +15 -7
- package/dist/core/TransactionRequest.d.ts.map +1 -1
- package/dist/core/TransactionRequest.js +47 -1
- package/dist/core/TransactionRequest.js.map +1 -1
- package/dist/core/TxEnvelope.d.ts +35 -21
- package/dist/core/TxEnvelope.d.ts.map +1 -1
- package/dist/core/TxEnvelope.js +46 -6
- package/dist/core/TxEnvelope.js.map +1 -1
- package/dist/core/TxEnvelopeEip8141.d.ts +341 -0
- package/dist/core/TxEnvelopeEip8141.d.ts.map +1 -0
- package/dist/core/TxEnvelopeEip8141.js +484 -0
- package/dist/core/TxEnvelopeEip8141.js.map +1 -0
- package/dist/core/internal/curves.d.ts +2 -0
- package/dist/core/internal/curves.d.ts.map +1 -1
- package/dist/core/internal/curves.js +2 -0
- package/dist/core/internal/curves.js.map +1 -1
- package/dist/index.d.ts +73 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -1
- package/dist/tempo/Transaction.d.ts +2 -0
- package/dist/tempo/Transaction.d.ts.map +1 -1
- package/dist/tempo/TransactionReceipt.d.ts +2 -0
- package/dist/tempo/TransactionReceipt.d.ts.map +1 -1
- package/dist/zod/Block.d.ts +123 -0
- package/dist/zod/Block.d.ts.map +1 -1
- package/dist/zod/Frame.d.ts +73 -0
- package/dist/zod/Frame.d.ts.map +1 -0
- package/dist/zod/Frame.js +74 -0
- package/dist/zod/Frame.js.map +1 -0
- package/dist/zod/FrameReceipt.d.ts +50 -0
- package/dist/zod/FrameReceipt.d.ts.map +1 -0
- package/dist/zod/FrameReceipt.js +37 -0
- package/dist/zod/FrameReceipt.js.map +1 -0
- package/dist/zod/FrameSignature.d.ts +63 -0
- package/dist/zod/FrameSignature.d.ts.map +1 -0
- package/dist/zod/FrameSignature.js +66 -0
- package/dist/zod/FrameSignature.js.map +1 -0
- package/dist/zod/RpcSchema.d.ts +806 -11
- package/dist/zod/RpcSchema.d.ts.map +1 -1
- package/dist/zod/Transaction.d.ts +252 -0
- package/dist/zod/Transaction.d.ts.map +1 -1
- package/dist/zod/Transaction.js +54 -0
- package/dist/zod/Transaction.js.map +1 -1
- package/dist/zod/TransactionEnvelope.d.ts +233 -4
- package/dist/zod/TransactionEnvelope.d.ts.map +1 -1
- package/dist/zod/TransactionEnvelope.js +9 -0
- package/dist/zod/TransactionEnvelope.js.map +1 -1
- package/dist/zod/TransactionReceipt.d.ts +48 -0
- package/dist/zod/TransactionReceipt.d.ts.map +1 -1
- package/dist/zod/TransactionReceipt.js +8 -3
- package/dist/zod/TransactionReceipt.js.map +1 -1
- package/dist/zod/TransactionRequest.d.ts +50 -2
- package/dist/zod/TransactionRequest.d.ts.map +1 -1
- package/dist/zod/TransactionRequest.js +10 -4
- package/dist/zod/TransactionRequest.js.map +1 -1
- package/dist/zod/TxEnvelopeEip8141.d.ts +166 -0
- package/dist/zod/TxEnvelopeEip8141.d.ts.map +1 -0
- package/dist/zod/TxEnvelopeEip8141.js +76 -0
- package/dist/zod/TxEnvelopeEip8141.js.map +1 -0
- package/dist/zod/internal/Frame.d.ts +4 -0
- package/dist/zod/internal/Frame.d.ts.map +1 -0
- package/dist/zod/internal/Frame.js +17 -0
- package/dist/zod/internal/Frame.js.map +1 -0
- package/dist/zod/internal/rpcSchemas/Eth.d.ts +842 -11
- package/dist/zod/internal/rpcSchemas/Eth.d.ts.map +1 -1
- package/dist/zod/internal/rpcSchemas/Wallet.d.ts +56 -2
- package/dist/zod/internal/rpcSchemas/Wallet.d.ts.map +1 -1
- package/dist/zod/tempo/RpcSchemaTempo.d.ts +140 -0
- package/dist/zod/tempo/RpcSchemaTempo.d.ts.map +1 -1
- package/dist/zod/tempo/Transaction.d.ts +123 -0
- package/dist/zod/tempo/Transaction.d.ts.map +1 -1
- package/dist/zod/z.d.ts +4 -0
- package/dist/zod/z.d.ts.map +1 -1
- package/dist/zod/z.js +4 -0
- package/dist/zod/z.js.map +1 -1
- package/package.json +41 -1
- package/src/core/Frame.ts +442 -0
- package/src/core/FrameReceipt.ts +117 -0
- package/src/core/FrameSignature.ts +593 -0
- package/src/core/Transaction.ts +82 -5
- package/src/core/TransactionReceipt.ts +41 -3
- package/src/core/TransactionRequest.ts +71 -4
- package/src/core/TxEnvelope.ts +159 -90
- package/src/core/TxEnvelopeEip8141.ts +714 -0
- package/src/core/_test/Frame.test-d.ts +108 -0
- package/src/core/_test/Frame.test.ts +280 -0
- package/src/core/_test/FrameReceipt.test.ts +86 -0
- package/src/core/_test/FrameSignature.test-d.ts +93 -0
- package/src/core/_test/FrameSignature.test.ts +554 -0
- package/src/core/_test/Transaction.test.ts +33 -0
- package/src/core/_test/TransactionEnvelope.test-d.ts +74 -0
- package/src/core/_test/TransactionEnvelope.test.ts +107 -0
- package/src/core/_test/TransactionReceipt.test.ts +59 -0
- package/src/core/_test/TransactionRequest.test-d.ts +50 -0
- package/src/core/_test/TransactionRequest.test.ts +88 -1
- package/src/core/_test/TxEnvelopeEip8141.test-d.ts +44 -0
- package/src/core/_test/TxEnvelopeEip8141.test.ts +1775 -0
- package/src/core/_test/curves.test.ts +6 -1
- package/src/core/_test/index.test.ts +4 -0
- package/src/core/internal/curves.ts +4 -0
- package/src/index.ts +77 -0
- package/src/version.ts +1 -1
- package/src/zod/Frame.ts +82 -0
- package/src/zod/FrameReceipt.ts +48 -0
- package/src/zod/FrameSignature.ts +78 -0
- package/src/zod/Transaction.ts +63 -0
- package/src/zod/TransactionEnvelope.ts +33 -0
- package/src/zod/TransactionReceipt.ts +14 -3
- package/src/zod/TransactionRequest.ts +18 -3
- package/src/zod/TxEnvelopeEip8141.ts +102 -0
- package/src/zod/_test/Frame.test-d.ts +41 -0
- package/src/zod/_test/Frame.test.ts +57 -0
- package/src/zod/_test/FrameReceipt.test.ts +75 -0
- package/src/zod/_test/FrameSignature.test.ts +94 -0
- package/src/zod/_test/TxEnvelopeEip8141.test.ts +116 -0
- package/src/zod/internal/Frame.ts +26 -0
- package/src/zod/z.ts +4 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as Address from './Address.js';
|
|
2
2
|
import type * as Errors from './Errors.js';
|
|
3
|
+
import * as FrameReceipt from './FrameReceipt.js';
|
|
3
4
|
import * as Hex from './Hex.js';
|
|
4
5
|
import type { Compute } from './internal/types.js';
|
|
5
6
|
import * as Log from './Log.js';
|
|
@@ -19,6 +20,8 @@ export type TransactionReceipt<status = Status, type = Type, bigintType = bigint
|
|
|
19
20
|
cumulativeGasUsed: bigintType;
|
|
20
21
|
/** Pre-London, it is equal to the transaction's gasPrice. Post-London, it is equal to the actual gas price paid for inclusion. */
|
|
21
22
|
effectiveGasPrice: bigintType;
|
|
23
|
+
/** Receipts for each EIP-8141 frame, in execution order. */
|
|
24
|
+
frameReceipts?: readonly ([bigintType] extends [Hex.Hex] ? FrameReceipt.Rpc : FrameReceipt.FrameReceipt<bigintType>)[] | undefined;
|
|
22
25
|
/** Transaction sender */
|
|
23
26
|
from: Address.Address;
|
|
24
27
|
/** Gas used by this transaction */
|
|
@@ -27,6 +30,8 @@ export type TransactionReceipt<status = Status, type = Type, bigintType = bigint
|
|
|
27
30
|
logs: Log.Log<false, bigintType, numberType>[];
|
|
28
31
|
/** Logs bloom filter */
|
|
29
32
|
logsBloom: Hex.Hex;
|
|
33
|
+
/** Account that paid the transaction fees. */
|
|
34
|
+
payer?: Address.Address | undefined;
|
|
30
35
|
/** The post-transaction state root. Only specified for transactions included before the Byzantium upgrade. */
|
|
31
36
|
root?: Hex.Hex | undefined;
|
|
32
37
|
/** `success` if this transaction was successful or `reverted` if it failed */
|
|
@@ -64,9 +69,10 @@ export type RpcStatus = '0x0' | '0x1';
|
|
|
64
69
|
* - `eip2930`
|
|
65
70
|
* - `eip4844`
|
|
66
71
|
* - `eip7702`
|
|
72
|
+
* - `eip8141`
|
|
67
73
|
* - any other string
|
|
68
74
|
*/
|
|
69
|
-
export type Type = 'legacy' | 'eip1559' | 'eip2930' | 'eip4844' | 'eip7702' | (string & {});
|
|
75
|
+
export type Type = 'legacy' | 'eip1559' | 'eip2930' | 'eip4844' | 'eip7702' | 'eip8141' | (string & {});
|
|
70
76
|
/**
|
|
71
77
|
* Union of RPC Transaction Receipt types.
|
|
72
78
|
*
|
|
@@ -75,9 +81,10 @@ export type Type = 'legacy' | 'eip1559' | 'eip2930' | 'eip4844' | 'eip7702' | (s
|
|
|
75
81
|
* - `0x2`: EIP-2930 transactions
|
|
76
82
|
* - `0x3`: EIP-4844 transactions
|
|
77
83
|
* - `0x4`: EIP-7702 transactions
|
|
84
|
+
* - `0x6`: EIP-8141 transactions
|
|
78
85
|
* - any other string
|
|
79
86
|
*/
|
|
80
|
-
export type RpcType = '0x0' | '0x1' | '0x2' | '0x3' | '0x4' | (string & {});
|
|
87
|
+
export type RpcType = '0x0' | '0x1' | '0x2' | '0x3' | '0x4' | '0x6' | (string & {});
|
|
81
88
|
/** RPC status to status mapping. */
|
|
82
89
|
export declare const fromRpcStatus: {
|
|
83
90
|
readonly '0x0': "reverted";
|
|
@@ -95,6 +102,7 @@ export declare const fromRpcType: {
|
|
|
95
102
|
readonly '0x2': "eip1559";
|
|
96
103
|
readonly '0x3': "eip4844";
|
|
97
104
|
readonly '0x4': "eip7702";
|
|
105
|
+
readonly '0x6': "eip8141";
|
|
98
106
|
};
|
|
99
107
|
/** Type to RPC type mapping. */
|
|
100
108
|
export declare const toRpcType: {
|
|
@@ -103,6 +111,7 @@ export declare const toRpcType: {
|
|
|
103
111
|
readonly eip1559: "0x2";
|
|
104
112
|
readonly eip4844: "0x3";
|
|
105
113
|
readonly eip7702: "0x4";
|
|
114
|
+
readonly eip8141: "0x6";
|
|
106
115
|
};
|
|
107
116
|
/**
|
|
108
117
|
* Converts a {@link ox#TransactionReceipt.Rpc} to an {@link ox#TransactionReceipt.TransactionReceipt}.
|
|
@@ -203,7 +212,7 @@ export declare const toRpcType: {
|
|
|
203
212
|
*/
|
|
204
213
|
export declare function fromRpc<const receipt extends Rpc | null>(receipt: receipt | Rpc | null): receipt extends Rpc ? TransactionReceipt : null;
|
|
205
214
|
export declare namespace fromRpc {
|
|
206
|
-
type ErrorType = Log.fromRpc.ErrorType | Errors.GlobalErrorType;
|
|
215
|
+
type ErrorType = Log.fromRpc.ErrorType | FrameReceipt.fromRpc.ErrorType | Errors.GlobalErrorType;
|
|
207
216
|
}
|
|
208
217
|
/**
|
|
209
218
|
* Converts a {@link ox#TransactionReceipt.TransactionReceipt} to a {@link ox#TransactionReceipt.Rpc}.
|
|
@@ -262,6 +271,6 @@ export declare function toRpc(receipt: toRpc.Input): Rpc;
|
|
|
262
271
|
export declare namespace toRpc {
|
|
263
272
|
/** Numberish input accepted by {@link ox#TransactionReceipt.(toRpc:function)}. */
|
|
264
273
|
type Input = TransactionReceipt<Status, Type, Hex.Hex | bigint | number, Hex.Hex | number>;
|
|
265
|
-
type ErrorType = Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
|
|
274
|
+
type ErrorType = Hex.fromNumber.ErrorType | FrameReceipt.toRpc.ErrorType | Errors.GlobalErrorType;
|
|
266
275
|
}
|
|
267
276
|
//# sourceMappingURL=TransactionReceipt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionReceipt.d.ts","sourceRoot":"","sources":["../../src/core/TransactionReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAE/B,6JAA6J;AAC7J,MAAM,MAAM,kBAAkB,CAC5B,MAAM,GAAG,MAAM,EACf,IAAI,GAAG,IAAI,EACX,UAAU,GAAG,MAAM,EACnB,UAAU,GAAG,MAAM,IACjB,OAAO,CAAC;IACV,6IAA6I;IAC7I,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IACrC,gGAAgG;IAChG,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IACpC,gDAAgD;IAChD,SAAS,EAAE,GAAG,CAAC,GAAG,CAAA;IAClB,kDAAkD;IAClD,WAAW,EAAE,UAAU,CAAA;IACvB,mEAAmE;IACnE,eAAe,CAAC,EAAE,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;IACpD,oEAAoE;IACpE,iBAAiB,EAAE,UAAU,CAAA;IAC7B,kIAAkI;IAClI,iBAAiB,EAAE,UAAU,CAAA;IAC7B,yBAAyB;IACzB,IAAI,EAAE,OAAO,CAAC,OAAO,CAAA;IACrB,mCAAmC;IACnC,OAAO,EAAE,UAAU,CAAA;IACnB,wDAAwD;IACxD,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE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jD;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,KAAY,SAAS,GACjB,GAAG,CAAC,OAAO,CAAC,SAAS,GACrB,YAAY,CAAC,OAAO,CAAC,SAAS,GAC9B,MAAM,CAAC,eAAe,CAAA;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,GAAG,GAAG,CA8B/C;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,kFAAkF;IAClF,KAAY,KAAK,GAAG,kBAAkB,CACpC,MAAM,EACN,IAAI,EACJ,GAAG,CAAC,GAAG,GAAG,MAAM,GAAG,MAAM,EACzB,GAAG,CAAC,GAAG,GAAG,MAAM,CACjB,CAAA;IAED,KAAY,SAAS,GACjB,GAAG,CAAC,UAAU,CAAC,SAAS,GACxB,YAAY,CAAC,KAAK,CAAC,SAAS,GAC5B,MAAM,CAAC,eAAe,CAAA;CAC3B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as FrameReceipt from './FrameReceipt.js';
|
|
1
2
|
import * as Quantity from './internal/quantity.js';
|
|
2
3
|
import * as Log from './Log.js';
|
|
3
4
|
/** RPC status to status mapping. */
|
|
@@ -17,6 +18,7 @@ export const fromRpcType = {
|
|
|
17
18
|
'0x2': 'eip1559',
|
|
18
19
|
'0x3': 'eip4844',
|
|
19
20
|
'0x4': 'eip7702',
|
|
21
|
+
'0x6': 'eip8141',
|
|
20
22
|
};
|
|
21
23
|
/** Type to RPC type mapping. */
|
|
22
24
|
export const toRpcType = {
|
|
@@ -25,6 +27,7 @@ export const toRpcType = {
|
|
|
25
27
|
eip1559: '0x2',
|
|
26
28
|
eip4844: '0x3',
|
|
27
29
|
eip7702: '0x4',
|
|
30
|
+
eip8141: '0x6',
|
|
28
31
|
};
|
|
29
32
|
/**
|
|
30
33
|
* Converts a {@link ox#TransactionReceipt.Rpc} to an {@link ox#TransactionReceipt.TransactionReceipt}.
|
|
@@ -128,6 +131,11 @@ export function fromRpc(receipt) {
|
|
|
128
131
|
return null;
|
|
129
132
|
return {
|
|
130
133
|
...receipt,
|
|
134
|
+
...(receipt.frameReceipts
|
|
135
|
+
? {
|
|
136
|
+
frameReceipts: receipt.frameReceipts.map(FrameReceipt.fromRpc),
|
|
137
|
+
}
|
|
138
|
+
: {}),
|
|
131
139
|
blobGasPrice: receipt.blobGasPrice
|
|
132
140
|
? BigInt(receipt.blobGasPrice)
|
|
133
141
|
: undefined,
|
|
@@ -208,10 +216,16 @@ export function toRpc(receipt) {
|
|
|
208
216
|
contractAddress: receipt.contractAddress,
|
|
209
217
|
cumulativeGasUsed: Quantity.fromNumberish(receipt.cumulativeGasUsed),
|
|
210
218
|
effectiveGasPrice: Quantity.fromNumberish(receipt.effectiveGasPrice),
|
|
219
|
+
...(receipt.frameReceipts
|
|
220
|
+
? {
|
|
221
|
+
frameReceipts: receipt.frameReceipts.map(FrameReceipt.toRpc),
|
|
222
|
+
}
|
|
223
|
+
: {}),
|
|
211
224
|
from: receipt.from,
|
|
212
225
|
gasUsed: Quantity.fromNumberish(receipt.gasUsed),
|
|
213
226
|
logs: receipt.logs.map(Log.toRpc),
|
|
214
227
|
logsBloom: receipt.logsBloom,
|
|
228
|
+
...(receipt.payer === undefined ? {} : { payer: receipt.payer }),
|
|
215
229
|
root: receipt.root,
|
|
216
230
|
status: toRpcStatus[receipt.status],
|
|
217
231
|
to: receipt.to,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionReceipt.js","sourceRoot":"","sources":["../../src/core/TransactionReceipt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransactionReceipt.js","sourceRoot":"","sources":["../../src/core/TransactionReceipt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD,OAAO,KAAK,QAAQ,MAAM,wB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CAAC;QACxD,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,iBAAiB,EAAE,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACpE,iBAAiB,EAAE,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC;QACpE,GAAG,CAAC,OAAO,CAAC,aAAa;YACvB,CAAC,CAAC;gBACE,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC;aAC7D;YACH,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC;QAChD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAc,CAAC;QAC1C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;QAChE,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC;QACnC,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,gBAAgB,CAAC;QAClE,IAAI,EAAG,SAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI;KACvD,CAAA;AACH,CAAC"}
|
|
@@ -3,12 +3,16 @@ import type * as Address from './Address.js';
|
|
|
3
3
|
import * as Authorization from './Authorization.js';
|
|
4
4
|
import * as Blobs from './Blobs.js';
|
|
5
5
|
import * as Errors from './Errors.js';
|
|
6
|
+
import * as Frame from './Frame.js';
|
|
7
|
+
import * as FrameSignature from './FrameSignature.js';
|
|
6
8
|
import * as Hex from './Hex.js';
|
|
9
|
+
import * as Quantity from './internal/quantity.js';
|
|
7
10
|
import type { Compute } from './internal/types.js';
|
|
8
11
|
import type * as Kzg from './Kzg.js';
|
|
9
12
|
import * as TxEnvelope from './TxEnvelope.js';
|
|
13
|
+
import * as TxEnvelopeEip8141 from './TxEnvelopeEip8141.js';
|
|
10
14
|
/** A Transaction Request that is generic to all transaction types, as defined in the [Execution API specification](https://github.com/ethereum/execution-apis/blob/4aca1d7a3e5aab24c8f6437131289ad386944eaa/src/schemas/transaction.yaml#L358-L423). */
|
|
11
|
-
export type TransactionRequest<bigintType = bigint, numberType = number, type extends string = string> = Compute<{
|
|
15
|
+
export type TransactionRequest<bigintType = bigint, numberType = number, type extends string = string, frame = [bigintType] extends [Hex.Hex] ? Frame.Rpc : Frame.Frame<bigintType>, signature = [bigintType] extends [Hex.Hex] ? FrameSignature.Rpc : FrameSignature.FrameSignature> = Compute<{
|
|
12
16
|
/** EIP-2930 Access List. */
|
|
13
17
|
accessList?: AccessList.AccessList | undefined;
|
|
14
18
|
/** EIP-7702 Authorization List. */
|
|
@@ -21,14 +25,16 @@ export type TransactionRequest<bigintType = bigint, numberType = number, type ex
|
|
|
21
25
|
chainId?: numberType | undefined;
|
|
22
26
|
/** Contract code or a hashed method call with encoded args */
|
|
23
27
|
data?: Hex.Hex | undefined;
|
|
24
|
-
/**
|
|
25
|
-
|
|
28
|
+
/** Frames in execution order for EIP-8141 transactions. */
|
|
29
|
+
frames?: readonly frame[] | undefined;
|
|
26
30
|
/** Sender of the transaction. */
|
|
27
31
|
from?: Address.Address | undefined;
|
|
28
32
|
/** Gas provided for transaction execution */
|
|
29
33
|
gas?: bigintType | undefined;
|
|
30
34
|
/** Base fee per gas. */
|
|
31
35
|
gasPrice?: bigintType | undefined;
|
|
36
|
+
/** @alias `data` – added for TransactionEnvelope - Transaction compatibility. */
|
|
37
|
+
input?: Hex.Hex | undefined;
|
|
32
38
|
/** Maximum total fee per gas sender is willing to pay for blob gas (in wei). */
|
|
33
39
|
maxFeePerBlobGas?: bigintType | undefined;
|
|
34
40
|
/** Total fee per gas in wei (gasPrice/baseFeePerGas + maxPriorityFeePerGas). */
|
|
@@ -37,6 +43,8 @@ export type TransactionRequest<bigintType = bigint, numberType = number, type ex
|
|
|
37
43
|
maxPriorityFeePerGas?: bigintType | undefined;
|
|
38
44
|
/** Unique number identifying this transaction */
|
|
39
45
|
nonce?: bigintType | undefined;
|
|
46
|
+
/** Frame signature entries for EIP-8141 transactions. */
|
|
47
|
+
signatures?: readonly signature[] | undefined;
|
|
40
48
|
/** Transaction recipient */
|
|
41
49
|
to?: Address.Address | null | undefined;
|
|
42
50
|
/** Transaction type */
|
|
@@ -53,7 +61,7 @@ export type TransactionRequest<bigintType = bigint, numberType = number, type ex
|
|
|
53
61
|
v?: numberType | undefined;
|
|
54
62
|
}>;
|
|
55
63
|
/** RPC representation of a {@link ox#TransactionRequest.TransactionRequest}. */
|
|
56
|
-
export type Rpc = TransactionRequest<Hex.Hex, Hex.Hex, string>;
|
|
64
|
+
export type Rpc = TransactionRequest<Hex.Hex, Hex.Hex, string, Frame.Rpc, FrameSignature.Rpc>;
|
|
57
65
|
/**
|
|
58
66
|
* Converts a {@link ox#TransactionRequest.Rpc} to a {@link ox#TransactionRequest.TransactionRequest}.
|
|
59
67
|
*
|
|
@@ -72,7 +80,7 @@ export type Rpc = TransactionRequest<Hex.Hex, Hex.Hex, string>;
|
|
|
72
80
|
*/
|
|
73
81
|
export declare function fromRpc(request: Rpc): TransactionRequest;
|
|
74
82
|
export declare namespace fromRpc {
|
|
75
|
-
type ErrorType = Authorization.fromRpcList.ErrorType | Hex.toNumber.ErrorType | Hex.toBigInt.ErrorType | Errors.GlobalErrorType;
|
|
83
|
+
type ErrorType = Authorization.fromRpcList.ErrorType | Frame.fromRpc.ErrorType | FrameSignature.fromRpc.ErrorType | Hex.toNumber.ErrorType | Hex.toBigInt.ErrorType | Errors.GlobalErrorType;
|
|
76
84
|
}
|
|
77
85
|
/**
|
|
78
86
|
* Converts a {@link ox#TransactionRequest.TransactionRequest} to a {@link ox#TransactionRequest.Rpc}.
|
|
@@ -118,7 +126,7 @@ export declare function toRpc(request: toRpc.Input): Rpc;
|
|
|
118
126
|
export declare namespace toRpc {
|
|
119
127
|
/** Numberish input accepted by {@link ox#TransactionRequest.(toRpc:function)}. */
|
|
120
128
|
type Input = TransactionRequest<Hex.Hex | bigint | number, Hex.Hex | number, string>;
|
|
121
|
-
type ErrorType = Authorization.toRpcList.ErrorType | Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
|
|
129
|
+
type ErrorType = Authorization.toRpcList.ErrorType | Frame.toRpc.ErrorType | FrameSignature.toRpc.ErrorType | Hex.fromNumber.ErrorType | Errors.GlobalErrorType;
|
|
122
130
|
}
|
|
123
131
|
/**
|
|
124
132
|
* Converts a {@link ox#TransactionRequest.TransactionRequest} to a {@link ox#(TransactionEnvelope:namespace).TxEnvelope}.
|
|
@@ -169,7 +177,7 @@ export declare namespace toEnvelope {
|
|
|
169
177
|
*/
|
|
170
178
|
kzg?: Kzg.Kzg | undefined;
|
|
171
179
|
};
|
|
172
|
-
type ErrorType = TxEnvelope.getType.ErrorType | TxEnvelope.from.ErrorType | Blobs.toCommitments.ErrorType | Blobs.toCellProofs.ErrorType | Blobs.commitmentsToVersionedHashes.ErrorType | MissingKzgError | MissingAuthorizationListError | Errors.GlobalErrorType;
|
|
180
|
+
type ErrorType = TxEnvelope.getType.ErrorType | TxEnvelope.from.ErrorType | Quantity.MissingFieldError | TxEnvelopeEip8141.from.ErrorType | Blobs.toCommitments.ErrorType | Blobs.toCellProofs.ErrorType | Blobs.commitmentsToVersionedHashes.ErrorType | MissingKzgError | MissingAuthorizationListError | Errors.GlobalErrorType;
|
|
173
181
|
}
|
|
174
182
|
/** Thrown when a 4844 conversion is requested but no `kzg` context is provided. */
|
|
175
183
|
export declare class MissingKzgError extends Errors.BaseError {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionRequest.d.ts","sourceRoot":"","sources":["../../src/core/TransactionRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"TransactionRequest.d.ts","sourceRoot":"","sources":["../../src/core/TransactionRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAA;AAEpC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAG3D,wPAAwP;AACxP,MAAM,MAAM,kBAAkB,CAC5B,UAAU,GAAG,MAAM,EACnB,UAAU,GAAG,MAAM,EACnB,IAAI,SAAS,MAAM,GAAG,MAAM,EAC5B,KAAK,GAAG,CAAC,UAAU,CA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AAa,eAAgB,SAAQ,MAAM,CAAC,SAAS;IACnD,SAAkB,IAAI,wCAAuC;;CAS9D;AAED,yFAAyF;AACzF,qBAAa,6BAA8B,SAAQ,MAAM,CAAC,SAAS;IACjE,SAAkB,IAAI,sDAAqD;;CAM5E"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as Authorization from './Authorization.js';
|
|
2
2
|
import * as Blobs from './Blobs.js';
|
|
3
3
|
import * as Errors from './Errors.js';
|
|
4
|
+
import * as Frame from './Frame.js';
|
|
5
|
+
import * as FrameSignature from './FrameSignature.js';
|
|
4
6
|
import * as Hex from './Hex.js';
|
|
5
7
|
import * as Quantity from './internal/quantity.js';
|
|
6
8
|
import * as Transaction from './Transaction.js';
|
|
7
9
|
import * as TxEnvelope from './TxEnvelope.js';
|
|
10
|
+
import * as TxEnvelopeEip8141 from './TxEnvelopeEip8141.js';
|
|
8
11
|
/**
|
|
9
12
|
* Converts a {@link ox#TransactionRequest.Rpc} to a {@link ox#TransactionRequest.TransactionRequest}.
|
|
10
13
|
*
|
|
@@ -27,6 +30,10 @@ export function fromRpc(request) {
|
|
|
27
30
|
request_.authorizationList = Authorization.fromRpcList(request.authorizationList);
|
|
28
31
|
if (typeof request.chainId !== 'undefined')
|
|
29
32
|
request_.chainId = Hex.toNumber(request.chainId);
|
|
33
|
+
if (request.frames !== undefined)
|
|
34
|
+
request_.frames = request.frames.map(Frame.fromRpc);
|
|
35
|
+
if (request.signatures !== undefined)
|
|
36
|
+
request_.signatures = request.signatures.map(FrameSignature.fromRpc);
|
|
30
37
|
if (typeof request.gas !== 'undefined')
|
|
31
38
|
request_.gas = Hex.toBigInt(request.gas);
|
|
32
39
|
if (typeof request.gasPrice !== 'undefined')
|
|
@@ -110,6 +117,10 @@ export function toRpc(request) {
|
|
|
110
117
|
request_rpc.data = request.input;
|
|
111
118
|
request_rpc.input = request.input;
|
|
112
119
|
}
|
|
120
|
+
if (request.frames !== undefined)
|
|
121
|
+
request_rpc.frames = request.frames.map(Frame.toRpc);
|
|
122
|
+
if (request.signatures !== undefined)
|
|
123
|
+
request_rpc.signatures = request.signatures.map(FrameSignature.toRpc);
|
|
113
124
|
if (typeof request.from !== 'undefined')
|
|
114
125
|
request_rpc.from = request.from;
|
|
115
126
|
if (typeof request.gas !== 'undefined')
|
|
@@ -205,7 +216,7 @@ export function toEnvelope(request, options = {}) {
|
|
|
205
216
|
? { gasPrice: request.gasPrice }
|
|
206
217
|
: {}),
|
|
207
218
|
});
|
|
208
|
-
if (type === 'eip4844') {
|
|
219
|
+
if (type === 'eip4844' || type === 'eip8141') {
|
|
209
220
|
const { kzg } = options;
|
|
210
221
|
const blobs = request.blobs;
|
|
211
222
|
const hasSidecars = request.sidecars !== undefined;
|
|
@@ -226,6 +237,10 @@ export function toEnvelope(request, options = {}) {
|
|
|
226
237
|
};
|
|
227
238
|
})();
|
|
228
239
|
const blobVersionedHashes = (() => {
|
|
240
|
+
if (type === 'eip8141' && sidecars)
|
|
241
|
+
return Blobs.commitmentsToVersionedHashes(sidecars.commitments, {
|
|
242
|
+
as: 'Hex',
|
|
243
|
+
});
|
|
229
244
|
if (request.blobVersionedHashes)
|
|
230
245
|
return request.blobVersionedHashes;
|
|
231
246
|
if (sidecars) {
|
|
@@ -237,6 +252,37 @@ export function toEnvelope(request, options = {}) {
|
|
|
237
252
|
}
|
|
238
253
|
return [];
|
|
239
254
|
})();
|
|
255
|
+
if (type === 'eip8141') {
|
|
256
|
+
if (request.chainId === undefined)
|
|
257
|
+
throw new Quantity.MissingFieldError({
|
|
258
|
+
container: 'TransactionRequest',
|
|
259
|
+
field: 'chainId',
|
|
260
|
+
});
|
|
261
|
+
if (request.frames === undefined)
|
|
262
|
+
throw new Quantity.MissingFieldError({
|
|
263
|
+
container: 'TransactionRequest',
|
|
264
|
+
field: 'frames',
|
|
265
|
+
});
|
|
266
|
+
if (request.from === undefined)
|
|
267
|
+
throw new Quantity.MissingFieldError({
|
|
268
|
+
container: 'TransactionRequest',
|
|
269
|
+
field: 'from',
|
|
270
|
+
});
|
|
271
|
+
return TxEnvelopeEip8141.from({
|
|
272
|
+
...(request.blobVersionedHashes || sidecars
|
|
273
|
+
? { blobVersionedHashes }
|
|
274
|
+
: {}),
|
|
275
|
+
chainId: request.chainId,
|
|
276
|
+
frames: request.frames,
|
|
277
|
+
maxFeePerBlobGas: request.maxFeePerBlobGas,
|
|
278
|
+
maxFeePerGas: request.maxFeePerGas,
|
|
279
|
+
maxPriorityFeePerGas: request.maxPriorityFeePerGas,
|
|
280
|
+
nonce: request.nonce,
|
|
281
|
+
sender: request.from,
|
|
282
|
+
sidecars,
|
|
283
|
+
signatures: request.signatures,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
240
286
|
return TxEnvelope.from({
|
|
241
287
|
type: 'eip4844',
|
|
242
288
|
...pickBase(request),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionRequest.js","sourceRoot":"","sources":["../../src/core/TransactionRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAA;AAGlD,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AA0D7C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,OAAO,CAAC,OAAY;IAClC,MAAM,QAAQ,GAAG,EAAE,GAAG,OAAO,EAAwB,CAAA;IAErD,IAAI,OAAO,OAAO,CAAC,iBAAiB,KAAK,WAAW;QAClD,QAAQ,CAAC,iBAAiB,GAAG,aAAa,CAAC,WAAW,CACpD,OAAO,CAAC,iBAAiB,CAC1B,CAAA;IACH,IAAI,OAAO,OAAO,CAAC,OAAO,K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AA;IACxD,OAAO,IAAI,CAAA;AACb,CAAC;AAED,mFAAmF;AACnF,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,SAAS;IACjC,IAAI,GAAG,oCAAoC,CAAA;IAC7D;QACE,KAAK,CACH,2FAA2F,EAC3F;YACE,QAAQ,EAAE,oCAAoC;SAC/C,CACF,CAAA;IACH,CAAC;CACF;AAED,yFAAyF;AACzF,MAAM,OAAO,6BAA8B,SAAQ,MAAM,CAAC,SAAS;IAC/C,IAAI,GAAG,kDAAkD,CAAA;IAC3E;QACE,KAAK,CACH,2GAA2G,CAC5G,CAAA;IACH,CAAC;CACF"}
|
|
@@ -2,13 +2,14 @@ import type * as Address from './Address.js';
|
|
|
2
2
|
import * as Errors from './Errors.js';
|
|
3
3
|
import type * as Hash from './Hash.js';
|
|
4
4
|
import * as Hex from './Hex.js';
|
|
5
|
-
import type { Compute, UnionPartialBy } from './internal/types.js';
|
|
5
|
+
import type { Compute, PartialBy, UnionPartialBy } from './internal/types.js';
|
|
6
6
|
import type * as Signature from './Signature.js';
|
|
7
7
|
import type * as TransactionRequest from './TransactionRequest.js';
|
|
8
8
|
import * as TxEnvelopeEip1559 from './TxEnvelopeEip1559.js';
|
|
9
9
|
import * as TxEnvelopeEip2930 from './TxEnvelopeEip2930.js';
|
|
10
10
|
import * as TxEnvelopeEip4844 from './TxEnvelopeEip4844.js';
|
|
11
11
|
import * as TxEnvelopeEip7702 from './TxEnvelopeEip7702.js';
|
|
12
|
+
import * as TxEnvelopeEip8141 from './TxEnvelopeEip8141.js';
|
|
12
13
|
import * as TxEnvelopeLegacy from './TxEnvelopeLegacy.js';
|
|
13
14
|
/** Base type for a Transaction Envelope. Transaction Envelopes inherit this type. */
|
|
14
15
|
export type Base<type extends string = string, signed extends boolean = boolean, bigintType = bigint, numberType = number> = Compute<{
|
|
@@ -52,13 +53,13 @@ export type BaseRpc<type extends string = string, signed extends boolean = boole
|
|
|
52
53
|
/** Signed representation of a {@link ox#(TransactionEnvelope:namespace).Base}. */
|
|
53
54
|
export type BaseSigned<type extends string = string> = Base<type, true>;
|
|
54
55
|
/** Transaction Envelope. */
|
|
55
|
-
export type TxEnvelope<signed extends boolean = false, bigintType = bigint, numberType = number> = UnionPartialBy<TxEnvelopeLegacy.TxEnvelopeLegacy<signed, bigintType, numberType> | TxEnvelopeEip2930.TxEnvelopeEip2930<signed, bigintType, numberType> | TxEnvelopeEip1559.TxEnvelopeEip1559<signed, bigintType, numberType> | TxEnvelopeEip4844.TxEnvelopeEip4844<signed, bigintType, numberType> | TxEnvelopeEip7702.TxEnvelopeEip7702<signed, bigintType, numberType
|
|
56
|
+
export type TxEnvelope<signed extends boolean = false, bigintType = bigint, numberType = number> = UnionPartialBy<TxEnvelopeLegacy.TxEnvelopeLegacy<signed, bigintType, numberType> | TxEnvelopeEip2930.TxEnvelopeEip2930<signed, bigintType, numberType> | TxEnvelopeEip1559.TxEnvelopeEip1559<signed, bigintType, numberType> | TxEnvelopeEip4844.TxEnvelopeEip4844<signed, bigintType, numberType> | TxEnvelopeEip7702.TxEnvelopeEip7702<signed, bigintType, numberType> | TxEnvelopeEip8141.TxEnvelopeEip8141, 'type'>;
|
|
56
57
|
/** RPC representation of a {@link ox#(TransactionEnvelope:namespace).TxEnvelope}. */
|
|
57
|
-
export type Rpc<signed extends boolean = false> = TxEnvelopeLegacy.Rpc<signed> | TxEnvelopeEip2930.Rpc<signed> | TxEnvelopeEip1559.Rpc<signed> | TxEnvelopeEip4844.Rpc<signed> | TxEnvelopeEip7702.Rpc<signed
|
|
58
|
+
export type Rpc<signed extends boolean = false> = TxEnvelopeLegacy.Rpc<signed> | TxEnvelopeEip2930.Rpc<signed> | TxEnvelopeEip1559.Rpc<signed> | TxEnvelopeEip4844.Rpc<signed> | TxEnvelopeEip7702.Rpc<signed> | TxEnvelopeEip8141.Rpc;
|
|
58
59
|
/** Serialized Transaction Envelope. */
|
|
59
|
-
export type Serialized = TxEnvelopeLegacy.Serialized | TxEnvelopeEip2930.Serialized | TxEnvelopeEip1559.Serialized | TxEnvelopeEip4844.Serialized | TxEnvelopeEip7702.Serialized;
|
|
60
|
+
export type Serialized = TxEnvelopeLegacy.Serialized | TxEnvelopeEip2930.Serialized | TxEnvelopeEip1559.Serialized | TxEnvelopeEip4844.Serialized | TxEnvelopeEip7702.Serialized | TxEnvelopeEip8141.Serialized;
|
|
60
61
|
/** Transaction Envelope type. */
|
|
61
|
-
export type Type = TxEnvelopeLegacy.Type | TxEnvelopeEip2930.Type | TxEnvelopeEip1559.Type | TxEnvelopeEip4844.Type | TxEnvelopeEip7702.Type;
|
|
62
|
+
export type Type = TxEnvelopeLegacy.Type | TxEnvelopeEip2930.Type | TxEnvelopeEip1559.Type | TxEnvelopeEip4844.Type | TxEnvelopeEip7702.Type | TxEnvelopeEip8141.Type;
|
|
62
63
|
type Typeable = TxEnvelope | {
|
|
63
64
|
readonly [key: string]: unknown;
|
|
64
65
|
readonly type?: string | undefined;
|
|
@@ -84,7 +85,7 @@ type HasDefined<envelope, key extends string> = envelope extends {
|
|
|
84
85
|
*/
|
|
85
86
|
export declare function assert(envelope: TxEnvelope): void;
|
|
86
87
|
export declare namespace assert {
|
|
87
|
-
type ErrorType = TxEnvelopeLegacy.assert.ErrorType | TxEnvelopeEip2930.assert.ErrorType | TxEnvelopeEip1559.assert.ErrorType | TxEnvelopeEip4844.assert.ErrorType | TxEnvelopeEip7702.assert.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
88
|
+
type ErrorType = TxEnvelopeLegacy.assert.ErrorType | TxEnvelopeEip2930.assert.ErrorType | TxEnvelopeEip1559.assert.ErrorType | TxEnvelopeEip4844.assert.ErrorType | TxEnvelopeEip7702.assert.ErrorType | TxEnvelopeEip8141.assert.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
88
89
|
}
|
|
89
90
|
/**
|
|
90
91
|
* Deserializes a {@link ox#(TransactionEnvelope:namespace).TxEnvelope} from its serialized form.
|
|
@@ -103,8 +104,8 @@ export declare namespace assert {
|
|
|
103
104
|
*/
|
|
104
105
|
export declare function deserialize<const serialized extends Serialized | Hex.Hex>(serialized: serialized | Serialized | Hex.Hex): deserialize.ReturnType<serialized>;
|
|
105
106
|
export declare namespace deserialize {
|
|
106
|
-
type ReturnType<serialized extends Serialized | Hex.Hex = Serialized> = serialized extends TxEnvelopeLegacy.Serialized ? TxEnvelopeLegacy.TxEnvelopeLegacy : serialized extends TxEnvelopeEip2930.Serialized ? TxEnvelopeEip2930.TxEnvelopeEip2930 : serialized extends TxEnvelopeEip1559.Serialized ? TxEnvelopeEip1559.TxEnvelopeEip1559 : serialized extends TxEnvelopeEip4844.Serialized ? TxEnvelopeEip4844.TxEnvelopeEip4844 : serialized extends TxEnvelopeEip7702.Serialized ? TxEnvelopeEip7702.TxEnvelopeEip7702 : TxEnvelope;
|
|
107
|
-
type ErrorType = getSerializedType.ErrorType | TxEnvelopeLegacy.deserialize.ErrorType | TxEnvelopeEip2930.deserialize.ErrorType | TxEnvelopeEip1559.deserialize.ErrorType | TxEnvelopeEip4844.deserialize.ErrorType | TxEnvelopeEip7702.deserialize.ErrorType | Errors.GlobalErrorType;
|
|
107
|
+
type ReturnType<serialized extends Serialized | Hex.Hex = Serialized> = serialized extends TxEnvelopeEip8141.Serialized ? TxEnvelopeEip8141.TxEnvelopeEip8141 : serialized extends TxEnvelopeLegacy.Serialized ? TxEnvelopeLegacy.TxEnvelopeLegacy : serialized extends TxEnvelopeEip2930.Serialized ? TxEnvelopeEip2930.TxEnvelopeEip2930 : serialized extends TxEnvelopeEip1559.Serialized ? TxEnvelopeEip1559.TxEnvelopeEip1559 : serialized extends TxEnvelopeEip4844.Serialized ? TxEnvelopeEip4844.TxEnvelopeEip4844 : serialized extends TxEnvelopeEip7702.Serialized ? TxEnvelopeEip7702.TxEnvelopeEip7702 : TxEnvelope;
|
|
108
|
+
type ErrorType = getSerializedType.ErrorType | TxEnvelopeLegacy.deserialize.ErrorType | TxEnvelopeEip2930.deserialize.ErrorType | TxEnvelopeEip1559.deserialize.ErrorType | TxEnvelopeEip4844.deserialize.ErrorType | TxEnvelopeEip7702.deserialize.ErrorType | TxEnvelopeEip8141.deserialize.ErrorType | Errors.GlobalErrorType;
|
|
108
109
|
}
|
|
109
110
|
/**
|
|
110
111
|
* Converts an arbitrary transaction object or serialized transaction into a Transaction Envelope.
|
|
@@ -120,6 +121,19 @@ export declare namespace deserialize {
|
|
|
120
121
|
* })
|
|
121
122
|
* ```
|
|
122
123
|
*
|
|
124
|
+
* @example
|
|
125
|
+
* ### Frame Transaction
|
|
126
|
+
*
|
|
127
|
+
* ```ts twoslash
|
|
128
|
+
* import { Frame, TransactionEnvelope } from 'ox'
|
|
129
|
+
*
|
|
130
|
+
* const envelope = TransactionEnvelope.from({
|
|
131
|
+
* chainId: 1,
|
|
132
|
+
* frames: [Frame.from({ gas: 50_000n, mode: 'sender' })],
|
|
133
|
+
* sender: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8'
|
|
134
|
+
* })
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
123
137
|
* @param envelope - The transaction envelope.
|
|
124
138
|
* @param options - Options.
|
|
125
139
|
* @returns Transaction Envelope.
|
|
@@ -127,12 +141,12 @@ export declare namespace deserialize {
|
|
|
127
141
|
export declare function from<const envelope extends Typeable | Hex.Hex, const signature extends Signature.Signature | undefined = undefined>(envelope: envelope | Typeable | Hex.Hex, options?: from.Options<signature>): from.ReturnType<envelope>;
|
|
128
142
|
export declare namespace from {
|
|
129
143
|
type Options<signature extends Signature.Signature | undefined = undefined> = {
|
|
130
|
-
/**
|
|
144
|
+
/** Outer signature to append. EIP-8141 uses the envelope’s `signatures` list. */
|
|
131
145
|
signature?: signature | Signature.Signature | undefined;
|
|
132
146
|
};
|
|
133
147
|
type ReturnType<envelope extends Typeable | Hex.Hex = TxEnvelope | Hex.Hex, signature extends Signature.Signature | undefined = undefined> = envelope extends Hex.Hex ? deserialize.ReturnType<envelope> : ReturnType_object<Extract<envelope, Typeable>, signature>;
|
|
134
|
-
type ReturnType_object<envelope extends Typeable, signature extends Signature.Signature | undefined = undefined> = getType.ReturnType<envelope> extends 'legacy' ? TxEnvelopeLegacy.from.ReturnType<envelope & TxEnvelopeLegacy.TxEnvelopeLegacy, signature> : getType.ReturnType<envelope> extends 'eip2930' ? TxEnvelopeEip2930.from.ReturnType<envelope & TxEnvelopeEip2930.TxEnvelopeEip2930, signature> : getType.ReturnType<envelope> extends 'eip4844' ? TxEnvelopeEip4844.from.ReturnType<envelope & TxEnvelopeEip4844.TxEnvelopeEip4844, signature> : getType.ReturnType<envelope> extends 'eip7702' ? TxEnvelopeEip7702.from.ReturnType<envelope & TxEnvelopeEip7702.TxEnvelopeEip7702, signature> : TxEnvelopeEip1559.from.ReturnType<Omit<envelope, 'type'> & TxEnvelopeEip1559.TxEnvelopeEip1559, signature>;
|
|
135
|
-
type ErrorType = deserialize.ErrorType | TxEnvelopeLegacy.from.ErrorType | TxEnvelopeEip2930.from.ErrorType | TxEnvelopeEip1559.from.ErrorType | TxEnvelopeEip4844.from.ErrorType | TxEnvelopeEip7702.from.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
148
|
+
type ReturnType_object<envelope extends Typeable, signature extends Signature.Signature | undefined = undefined> = getType.ReturnType<envelope> extends 'eip8141' ? envelope extends PartialBy<TxEnvelopeEip8141.TxEnvelopeEip8141, 'type'> ? TxEnvelopeEip8141.from.ReturnType<envelope> : never : getType.ReturnType<envelope> extends 'legacy' ? TxEnvelopeLegacy.from.ReturnType<envelope & TxEnvelopeLegacy.TxEnvelopeLegacy, signature> : getType.ReturnType<envelope> extends 'eip2930' ? TxEnvelopeEip2930.from.ReturnType<envelope & TxEnvelopeEip2930.TxEnvelopeEip2930, signature> : getType.ReturnType<envelope> extends 'eip4844' ? TxEnvelopeEip4844.from.ReturnType<envelope & TxEnvelopeEip4844.TxEnvelopeEip4844, signature> : getType.ReturnType<envelope> extends 'eip7702' ? TxEnvelopeEip7702.from.ReturnType<envelope & TxEnvelopeEip7702.TxEnvelopeEip7702, signature> : TxEnvelopeEip1559.from.ReturnType<Omit<envelope, 'type'> & TxEnvelopeEip1559.TxEnvelopeEip1559, signature>;
|
|
149
|
+
type ErrorType = deserialize.ErrorType | TxEnvelopeLegacy.from.ErrorType | TxEnvelopeEip2930.from.ErrorType | TxEnvelopeEip1559.from.ErrorType | TxEnvelopeEip4844.from.ErrorType | TxEnvelopeEip7702.from.ErrorType | TxEnvelopeEip8141.from.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
136
150
|
}
|
|
137
151
|
/**
|
|
138
152
|
* Returns the payload to sign for a {@link ox#(TransactionEnvelope:namespace).TxEnvelope}.
|
|
@@ -154,7 +168,7 @@ export declare namespace from {
|
|
|
154
168
|
export declare function getSignPayload(envelope: TxEnvelope<false>): Hex.Hex;
|
|
155
169
|
export declare namespace getSignPayload {
|
|
156
170
|
type ReturnType = Hex.Hex;
|
|
157
|
-
type ErrorType = TxEnvelopeLegacy.getSignPayload.ErrorType | TxEnvelopeEip2930.getSignPayload.ErrorType | TxEnvelopeEip1559.getSignPayload.ErrorType | TxEnvelopeEip4844.getSignPayload.ErrorType | TxEnvelopeEip7702.getSignPayload.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
171
|
+
type ErrorType = TxEnvelopeLegacy.getSignPayload.ErrorType | TxEnvelopeEip2930.getSignPayload.ErrorType | TxEnvelopeEip1559.getSignPayload.ErrorType | TxEnvelopeEip4844.getSignPayload.ErrorType | TxEnvelopeEip7702.getSignPayload.ErrorType | TxEnvelopeEip8141.getSignPayload.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
158
172
|
}
|
|
159
173
|
/**
|
|
160
174
|
* Returns the type of a Transaction Envelope.
|
|
@@ -176,7 +190,7 @@ export declare function getType<const envelope extends Typeable>(envelope: envel
|
|
|
176
190
|
export declare namespace getType {
|
|
177
191
|
type ReturnType<envelope extends Typeable> = envelope extends {
|
|
178
192
|
type: infer type extends string;
|
|
179
|
-
} ? type : HasDefined<envelope, 'authorizationList'> extends true ? TxEnvelopeEip7702.Type : HasDefined<envelope, 'blobs'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'blobVersionedHashes'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'sidecars'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'maxFeePerBlobGas'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'maxFeePerGas'> extends true ? TxEnvelopeEip1559.Type : HasDefined<envelope, 'maxPriorityFeePerGas'> extends true ? TxEnvelopeEip1559.Type : HasDefined<envelope, 'gasPrice'> extends true ? HasDefined<envelope, 'accessList'> extends true ? TxEnvelopeEip2930.Type : TxEnvelopeLegacy.Type : TxEnvelopeEip1559.Type;
|
|
193
|
+
} ? type : HasDefined<envelope, 'frames'> extends true ? TxEnvelopeEip8141.Type : HasDefined<envelope, 'authorizationList'> extends true ? TxEnvelopeEip7702.Type : HasDefined<envelope, 'blobs'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'blobVersionedHashes'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'sidecars'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'maxFeePerBlobGas'> extends true ? TxEnvelopeEip4844.Type : HasDefined<envelope, 'maxFeePerGas'> extends true ? TxEnvelopeEip1559.Type : HasDefined<envelope, 'maxPriorityFeePerGas'> extends true ? TxEnvelopeEip1559.Type : HasDefined<envelope, 'gasPrice'> extends true ? HasDefined<envelope, 'accessList'> extends true ? TxEnvelopeEip2930.Type : TxEnvelopeLegacy.Type : TxEnvelopeEip1559.Type;
|
|
180
194
|
type ErrorType = InvalidTypeError | Errors.GlobalErrorType;
|
|
181
195
|
}
|
|
182
196
|
/**
|
|
@@ -197,7 +211,7 @@ export declare namespace getType {
|
|
|
197
211
|
*/
|
|
198
212
|
export declare function getSerializedType<const serialized extends Serialized | Hex.Hex>(serialized: serialized | Serialized | Hex.Hex): getSerializedType.ReturnType<serialized>;
|
|
199
213
|
export declare namespace getSerializedType {
|
|
200
|
-
type ReturnType<serialized extends Serialized | Hex.Hex = Serialized> = serialized extends TxEnvelopeEip2930.Serialized ? TxEnvelopeEip2930.Type : serialized extends TxEnvelopeEip1559.Serialized ? TxEnvelopeEip1559.Type : serialized extends TxEnvelopeEip4844.Serialized ? TxEnvelopeEip4844.Type : serialized extends TxEnvelopeEip7702.Serialized ? TxEnvelopeEip7702.Type : serialized extends TxEnvelopeLegacy.Serialized ? TxEnvelopeLegacy.Type : Type;
|
|
214
|
+
type ReturnType<serialized extends Serialized | Hex.Hex = Serialized> = serialized extends TxEnvelopeEip8141.Serialized ? TxEnvelopeEip8141.Type : serialized extends TxEnvelopeEip2930.Serialized ? TxEnvelopeEip2930.Type : serialized extends TxEnvelopeEip1559.Serialized ? TxEnvelopeEip1559.Type : serialized extends TxEnvelopeEip4844.Serialized ? TxEnvelopeEip4844.Type : serialized extends TxEnvelopeEip7702.Serialized ? TxEnvelopeEip7702.Type : serialized extends TxEnvelopeLegacy.Serialized ? TxEnvelopeLegacy.Type : Type;
|
|
201
215
|
type ErrorType = Hex.size.ErrorType | Hex.slice.ErrorType | Hex.toNumber.ErrorType | InvalidSerializedTypeError | Errors.GlobalErrorType;
|
|
202
216
|
}
|
|
203
217
|
/**
|
|
@@ -251,13 +265,13 @@ export declare namespace hash {
|
|
|
251
265
|
export declare function serialize<const envelope extends Typeable>(envelope: envelope | Typeable, options?: serialize.Options): serialize.ReturnType<envelope>;
|
|
252
266
|
export declare namespace serialize {
|
|
253
267
|
type Options = {
|
|
254
|
-
/**
|
|
268
|
+
/** Outer signature to append. EIP-8141 uses the envelope’s `signatures` list. */
|
|
255
269
|
signature?: Signature.Signature | undefined;
|
|
256
270
|
/** PeerDAS sidecars to append, producing the 5-element network wrapper. */
|
|
257
271
|
sidecars?: TxEnvelopeEip4844.Sidecars<Hex.Hex> | undefined;
|
|
258
272
|
};
|
|
259
|
-
type ReturnType<envelope extends Typeable = TxEnvelope> = getType.ReturnType<envelope> extends 'legacy' ? TxEnvelopeLegacy.Serialized : getType.ReturnType<envelope> extends 'eip2930' ? TxEnvelopeEip2930.Serialized : getType.ReturnType<envelope> extends 'eip4844' ? TxEnvelopeEip4844.Serialized : getType.ReturnType<envelope> extends 'eip7702' ? TxEnvelopeEip7702.Serialized : TxEnvelopeEip1559.Serialized;
|
|
260
|
-
type ErrorType = TxEnvelopeLegacy.serialize.ErrorType | TxEnvelopeEip2930.serialize.ErrorType | TxEnvelopeEip1559.serialize.ErrorType | TxEnvelopeEip4844.serialize.ErrorType | TxEnvelopeEip7702.serialize.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
273
|
+
type ReturnType<envelope extends Typeable = TxEnvelope> = getType.ReturnType<envelope> extends 'eip8141' ? TxEnvelopeEip8141.Serialized : getType.ReturnType<envelope> extends 'legacy' ? TxEnvelopeLegacy.Serialized : getType.ReturnType<envelope> extends 'eip2930' ? TxEnvelopeEip2930.Serialized : getType.ReturnType<envelope> extends 'eip4844' ? TxEnvelopeEip4844.Serialized : getType.ReturnType<envelope> extends 'eip7702' ? TxEnvelopeEip7702.Serialized : TxEnvelopeEip1559.Serialized;
|
|
274
|
+
type ErrorType = TxEnvelopeLegacy.serialize.ErrorType | TxEnvelopeEip2930.serialize.ErrorType | TxEnvelopeEip1559.serialize.ErrorType | TxEnvelopeEip4844.serialize.ErrorType | TxEnvelopeEip7702.serialize.ErrorType | TxEnvelopeEip8141.serialize.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
261
275
|
}
|
|
262
276
|
/**
|
|
263
277
|
* Converts a {@link ox#(TransactionEnvelope:namespace).TxEnvelope} to an {@link ox#(TransactionEnvelope:namespace).Rpc}.
|
|
@@ -279,9 +293,9 @@ export declare namespace serialize {
|
|
|
279
293
|
export declare function toRpc<const envelope extends toRpc.Input>(envelope: envelope | toRpc.Input): toRpc.ReturnType<envelope>;
|
|
280
294
|
export declare namespace toRpc {
|
|
281
295
|
/** Numberish input accepted by {@link ox#(TransactionEnvelope:namespace).(toRpc:function)}. */
|
|
282
|
-
type Input = TxEnvelope<boolean, Hex.Hex | bigint | number, Hex.Hex | number
|
|
283
|
-
type ReturnType<envelope extends Typeable = TxEnvelope> = getType.ReturnType<envelope> extends 'legacy' ? TxEnvelopeLegacy.Rpc : getType.ReturnType<envelope> extends 'eip2930' ? TxEnvelopeEip2930.Rpc : getType.ReturnType<envelope> extends 'eip4844' ? TxEnvelopeEip4844.Rpc : getType.ReturnType<envelope> extends 'eip7702' ? TxEnvelopeEip7702.Rpc : TxEnvelopeEip1559.Rpc;
|
|
284
|
-
type ErrorType = TxEnvelopeLegacy.toRpc.ErrorType | TxEnvelopeEip2930.toRpc.ErrorType | TxEnvelopeEip1559.toRpc.ErrorType | TxEnvelopeEip4844.toRpc.ErrorType | TxEnvelopeEip7702.toRpc.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
296
|
+
type Input = TxEnvelope<boolean, Hex.Hex | bigint | number, Hex.Hex | number> | TxEnvelopeEip8141.toRpc.Input;
|
|
297
|
+
type ReturnType<envelope extends Typeable = TxEnvelope> = getType.ReturnType<envelope> extends 'eip8141' ? TxEnvelopeEip8141.Rpc : getType.ReturnType<envelope> extends 'legacy' ? TxEnvelopeLegacy.Rpc : getType.ReturnType<envelope> extends 'eip2930' ? TxEnvelopeEip2930.Rpc : getType.ReturnType<envelope> extends 'eip4844' ? TxEnvelopeEip4844.Rpc : getType.ReturnType<envelope> extends 'eip7702' ? TxEnvelopeEip7702.Rpc : TxEnvelopeEip1559.Rpc;
|
|
298
|
+
type ErrorType = TxEnvelopeLegacy.toRpc.ErrorType | TxEnvelopeEip2930.toRpc.ErrorType | TxEnvelopeEip1559.toRpc.ErrorType | TxEnvelopeEip4844.toRpc.ErrorType | TxEnvelopeEip7702.toRpc.ErrorType | TxEnvelopeEip8141.toRpc.ErrorType | InvalidTypeError | Errors.GlobalErrorType;
|
|
285
299
|
}
|
|
286
300
|
/**
|
|
287
301
|
* Converts a {@link ox#(TransactionEnvelope:namespace).TxEnvelope} to a {@link ox#TransactionRequest.TransactionRequest}.
|
|
@@ -326,7 +340,7 @@ export declare namespace toRpc {
|
|
|
326
340
|
*/
|
|
327
341
|
export declare function toTransactionRequest(envelope: TxEnvelope): TransactionRequest.TransactionRequest;
|
|
328
342
|
export declare namespace toTransactionRequest {
|
|
329
|
-
type ErrorType = Errors.GlobalErrorType;
|
|
343
|
+
type ErrorType = getType.ErrorType | Hex.fromNumber.ErrorType | Hex.toNumber.ErrorType | Errors.GlobalErrorType;
|
|
330
344
|
}
|
|
331
345
|
/**
|
|
332
346
|
* Validates a {@link ox#(TransactionEnvelope:namespace).TxEnvelope}. Returns `true` if the envelope is valid, `false` otherwise.
|