tempo.ts 0.0.6 → 0.1.0
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/dist/chains.d.ts +244 -541
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +10 -23
- package/dist/chains.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/ox/SignatureEnvelope.d.ts +245 -0
- package/dist/ox/SignatureEnvelope.d.ts.map +1 -0
- package/dist/ox/SignatureEnvelope.js +437 -0
- package/dist/ox/SignatureEnvelope.js.map +1 -0
- package/dist/ox/Transaction.d.ts +61 -24
- package/dist/ox/Transaction.d.ts.map +1 -1
- package/dist/ox/Transaction.js +63 -18
- package/dist/ox/Transaction.js.map +1 -1
- package/dist/ox/TransactionEnvelopeAA.d.ts +461 -0
- package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -0
- package/dist/ox/TransactionEnvelopeAA.js +528 -0
- package/dist/ox/TransactionEnvelopeAA.js.map +1 -0
- package/dist/ox/TransactionRequest.d.ts +7 -5
- package/dist/ox/TransactionRequest.d.ts.map +1 -1
- package/dist/ox/TransactionRequest.js +21 -12
- package/dist/ox/TransactionRequest.js.map +1 -1
- package/dist/ox/index.d.ts +5 -4
- package/dist/ox/index.d.ts.map +1 -1
- package/dist/ox/index.js +5 -4
- package/dist/ox/index.js.map +1 -1
- package/dist/prool/Instance.d.ts +0 -4
- package/dist/prool/Instance.d.ts.map +1 -1
- package/dist/prool/Instance.js +7 -7
- package/dist/prool/Instance.js.map +1 -1
- package/dist/prool/index.d.ts +1 -1
- package/dist/prool/index.d.ts.map +1 -1
- package/dist/prool/index.js +1 -1
- package/dist/prool/index.js.map +1 -1
- package/dist/viem/{abis.d.ts → Abis.d.ts} +523 -9
- package/dist/viem/Abis.d.ts.map +1 -0
- package/dist/viem/{abis.js → Abis.js} +321 -9
- package/dist/viem/Abis.js.map +1 -0
- package/dist/viem/{actions → Actions}/amm.d.ts +21 -21
- package/dist/viem/Actions/amm.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/amm.js +55 -43
- package/dist/viem/Actions/amm.js.map +1 -0
- package/dist/viem/Actions/dex.d.ts +3263 -0
- package/dist/viem/Actions/dex.d.ts.map +1 -0
- package/dist/viem/Actions/dex.js +1357 -0
- package/dist/viem/Actions/dex.js.map +1 -0
- package/dist/viem/{actions → Actions}/fee.d.ts +8 -8
- package/dist/viem/Actions/fee.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/fee.js +14 -13
- package/dist/viem/Actions/fee.js.map +1 -0
- package/dist/viem/Actions/index.d.ts +6 -0
- package/dist/viem/Actions/index.d.ts.map +1 -0
- package/dist/viem/Actions/index.js +6 -0
- package/dist/viem/Actions/index.js.map +1 -0
- package/dist/viem/{actions → Actions}/policy.d.ts +19 -19
- package/dist/viem/Actions/policy.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/policy.js +59 -46
- package/dist/viem/Actions/policy.js.map +1 -0
- package/dist/viem/{actions → Actions}/token.d.ts +3250 -700
- package/dist/viem/Actions/token.d.ts.map +1 -0
- package/dist/viem/{actions → Actions}/token.js +419 -83
- package/dist/viem/Actions/token.js.map +1 -0
- package/dist/viem/Addresses.d.ts +9 -0
- package/dist/viem/Addresses.d.ts.map +1 -0
- package/dist/viem/Addresses.js +9 -0
- package/dist/viem/Addresses.js.map +1 -0
- package/dist/viem/{chain.d.ts → Chain.d.ts} +81 -57
- package/dist/viem/Chain.d.ts.map +1 -0
- package/dist/viem/{chain.js → Chain.js} +7 -7
- package/dist/viem/Chain.js.map +1 -0
- package/dist/viem/{client.d.ts → Client.d.ts} +4 -4
- package/dist/viem/Client.d.ts.map +1 -0
- package/dist/viem/{client.js → Client.js} +3 -3
- package/dist/viem/Client.js.map +1 -0
- package/dist/viem/{decorator.d.ts → Decorator.d.ts} +507 -5
- package/dist/viem/Decorator.d.ts.map +1 -0
- package/dist/viem/{decorator.js → Decorator.js} +31 -5
- package/dist/viem/Decorator.js.map +1 -0
- package/dist/viem/{formatters.d.ts → Formatters.d.ts} +2 -2
- package/dist/viem/Formatters.d.ts.map +1 -0
- package/dist/viem/{formatters.js → Formatters.js} +24 -17
- package/dist/viem/Formatters.js.map +1 -0
- package/dist/viem/Tick.d.ts +111 -0
- package/dist/viem/Tick.d.ts.map +1 -0
- package/dist/viem/Tick.js +127 -0
- package/dist/viem/Tick.js.map +1 -0
- package/dist/viem/TokenIds.d.ts +3 -0
- package/dist/viem/TokenIds.d.ts.map +1 -0
- package/dist/viem/TokenIds.js +3 -0
- package/dist/viem/TokenIds.js.map +1 -0
- package/dist/viem/Transaction.d.ts +57 -0
- package/dist/viem/Transaction.d.ts.map +1 -0
- package/dist/viem/Transaction.js +137 -0
- package/dist/viem/Transaction.js.map +1 -0
- package/dist/viem/{transport.d.ts → Transport.d.ts} +3 -3
- package/dist/viem/Transport.d.ts.map +1 -0
- package/dist/viem/{transport.js → Transport.js} +3 -3
- package/dist/viem/Transport.js.map +1 -0
- package/dist/viem/index.d.ts +13 -9
- package/dist/viem/index.d.ts.map +1 -1
- package/dist/viem/index.js +13 -9
- package/dist/viem/index.js.map +1 -1
- package/dist/viem/{types.d.ts → internal/types.d.ts} +3 -3
- package/dist/viem/internal/types.d.ts.map +1 -0
- package/dist/viem/{types.js.map → internal/types.js.map} +1 -1
- package/dist/viem/internal/utils.d.ts.map +1 -0
- package/dist/viem/internal/utils.js.map +1 -0
- package/package.json +87 -101
- package/src/chains.ts +10 -24
- package/src/ox/SignatureEnvelope.test.ts +1252 -0
- package/src/ox/SignatureEnvelope.ts +709 -0
- package/src/ox/Transaction.test.ts +144 -89
- package/src/ox/Transaction.ts +104 -29
- package/src/ox/TransactionEnvelopeAA.test.ts +1533 -0
- package/src/ox/TransactionEnvelopeAA.ts +858 -0
- package/src/ox/TransactionRequest.ts +25 -17
- package/src/ox/index.ts +2 -1
- package/src/prool/Instance.ts +6 -14
- package/src/prool/internal/chain.json +101 -27
- package/src/viem/{abis.ts → Abis.ts} +322 -8
- package/src/viem/{actions → Actions}/amm.test.ts +65 -68
- package/src/viem/{actions → Actions}/amm.ts +72 -60
- package/src/viem/Actions/dex.test.ts +1608 -0
- package/src/viem/Actions/dex.ts +2026 -0
- package/src/viem/{actions → Actions}/fee.test.ts +34 -36
- package/src/viem/{actions → Actions}/fee.ts +18 -17
- package/src/viem/{actions → Actions}/index.ts +1 -0
- package/src/viem/{actions → Actions}/policy.test.ts +2 -2
- package/src/viem/{actions → Actions}/policy.ts +77 -64
- package/src/viem/{actions → Actions}/token.test.ts +403 -64
- package/src/viem/{actions → Actions}/token.ts +672 -133
- package/src/viem/Addresses.ts +9 -0
- package/src/viem/{chain.ts → Chain.ts} +6 -6
- package/src/viem/{client.bench-d.ts → Client.bench-d.ts} +2 -2
- package/src/viem/{client.test.ts → Client.test.ts} +31 -6
- package/src/viem/{client.ts → Client.ts} +1 -1
- package/src/viem/{decorator.bench-d.ts → Decorator.bench-d.ts} +2 -2
- package/src/viem/{decorator.test.ts → Decorator.test.ts} +1 -0
- package/src/viem/{decorator.ts → Decorator.ts} +586 -4
- package/src/viem/{formatters.ts → Formatters.ts} +31 -20
- package/src/viem/Tick.test.ts +281 -0
- package/src/viem/Tick.ts +176 -0
- package/src/viem/TokenIds.ts +2 -0
- package/src/viem/Transaction.ts +303 -0
- package/src/viem/{transport.ts → Transport.ts} +5 -5
- package/src/viem/e2e.test.ts +153 -78
- package/src/viem/index.ts +13 -9
- package/src/viem/{types.ts → internal/types.ts} +3 -3
- package/dist/ox/TransactionEnvelopeFeeToken.d.ts +0 -393
- package/dist/ox/TransactionEnvelopeFeeToken.d.ts.map +0 -1
- package/dist/ox/TransactionEnvelopeFeeToken.js +0 -452
- package/dist/ox/TransactionEnvelopeFeeToken.js.map +0 -1
- package/dist/viem/abis.d.ts.map +0 -1
- package/dist/viem/abis.js.map +0 -1
- package/dist/viem/actions/amm.d.ts.map +0 -1
- package/dist/viem/actions/amm.js.map +0 -1
- package/dist/viem/actions/fee.d.ts.map +0 -1
- package/dist/viem/actions/fee.js.map +0 -1
- package/dist/viem/actions/index.d.ts +0 -5
- package/dist/viem/actions/index.d.ts.map +0 -1
- package/dist/viem/actions/index.js +0 -5
- package/dist/viem/actions/index.js.map +0 -1
- package/dist/viem/actions/policy.d.ts.map +0 -1
- package/dist/viem/actions/policy.js.map +0 -1
- package/dist/viem/actions/token.d.ts.map +0 -1
- package/dist/viem/actions/token.js.map +0 -1
- package/dist/viem/addresses.d.ts +0 -8
- package/dist/viem/addresses.d.ts.map +0 -1
- package/dist/viem/addresses.js +0 -8
- package/dist/viem/addresses.js.map +0 -1
- package/dist/viem/chain.d.ts.map +0 -1
- package/dist/viem/chain.js.map +0 -1
- package/dist/viem/client.d.ts.map +0 -1
- package/dist/viem/client.js.map +0 -1
- package/dist/viem/decorator.d.ts.map +0 -1
- package/dist/viem/decorator.js.map +0 -1
- package/dist/viem/formatters.d.ts.map +0 -1
- package/dist/viem/formatters.js.map +0 -1
- package/dist/viem/transaction.d.ts +0 -54
- package/dist/viem/transaction.d.ts.map +0 -1
- package/dist/viem/transaction.js +0 -108
- package/dist/viem/transaction.js.map +0 -1
- package/dist/viem/transport.d.ts.map +0 -1
- package/dist/viem/transport.js.map +0 -1
- package/dist/viem/types.d.ts.map +0 -1
- package/dist/viem/utils.d.ts.map +0 -1
- package/dist/viem/utils.js.map +0 -1
- package/src/ox/TransactionEnvelopeFeeToken.test.ts +0 -1119
- package/src/ox/TransactionEnvelopeFeeToken.ts +0 -717
- package/src/prool/internal/consensus.toml +0 -32
- package/src/viem/addresses.ts +0 -10
- package/src/viem/transaction.ts +0 -253
- /package/dist/viem/{types.js → internal/types.js} +0 -0
- /package/dist/viem/{utils.d.ts → internal/utils.d.ts} +0 -0
- /package/dist/viem/{utils.js → internal/utils.js} +0 -0
- /package/src/viem/{utils.ts → internal/utils.ts} +0 -0
package/dist/ox/Transaction.js
CHANGED
|
@@ -2,16 +2,17 @@ import * as Hex from 'ox/Hex';
|
|
|
2
2
|
import * as Secp256k1 from 'ox/Secp256k1';
|
|
3
3
|
import * as Signature from 'ox/Signature';
|
|
4
4
|
import * as ox_Transaction from 'ox/Transaction';
|
|
5
|
-
import * as
|
|
5
|
+
import * as SignatureEnvelope from './SignatureEnvelope.js';
|
|
6
|
+
import * as TransactionEnvelopeAA from './TransactionEnvelopeAA.js';
|
|
6
7
|
/** Type to RPC Type mapping. */
|
|
7
8
|
export const toRpcType = {
|
|
8
9
|
...ox_Transaction.toRpcType,
|
|
9
|
-
|
|
10
|
+
aa: '0x76',
|
|
10
11
|
};
|
|
11
12
|
/** RPC Type to Type mapping. */
|
|
12
13
|
export const fromRpcType = {
|
|
13
14
|
...ox_Transaction.fromRpcType,
|
|
14
|
-
'
|
|
15
|
+
'0x76': 'aa',
|
|
15
16
|
};
|
|
16
17
|
/**
|
|
17
18
|
* Converts an {@link ox#Transaction.Rpc} to an {@link ox#Transaction.Transaction}.
|
|
@@ -26,22 +27,31 @@ export const fromRpcType = {
|
|
|
26
27
|
* blockHash:
|
|
27
28
|
* '0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b',
|
|
28
29
|
* blockNumber: '0x12f296f',
|
|
30
|
+
* calls: [
|
|
31
|
+
* {
|
|
32
|
+
* input: '0xdeadbeef',
|
|
33
|
+
* to: '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad',
|
|
34
|
+
* value: '0x9b6e64a8ec60000',
|
|
35
|
+
* },
|
|
36
|
+
* ],
|
|
29
37
|
* feeToken: '0x20c0000000000000000000000000000000000000',
|
|
30
38
|
* transactionIndex: '0x2',
|
|
31
39
|
* from: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
|
|
32
|
-
* to: '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad',
|
|
33
40
|
* value: '0x9b6e64a8ec60000',
|
|
34
41
|
* gas: '0x43f5d',
|
|
35
42
|
* maxFeePerGas: '0x2ca6ae494',
|
|
36
43
|
* maxPriorityFeePerGas: '0x41cc3c0',
|
|
37
44
|
* input:
|
|
38
45
|
* '0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000006643504700000000000000000000000000000000000000000000000000000000000000040b080604000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000009b6e64a8ec600000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000009b6e64a8ec60000000000000000000000000000000000000000000000000000019124bb5ae978c000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000c56c7a0eaa804f854b536a5f3d5f49d2ec4b12b80000000000000000000000000000000000000000000000000000000000000060000000000000000000000000c56c7a0eaa804f854b536a5f3d5f49d2ec4b12b8000000000000000000000000000000fee13a103a10d593b9ae06b3e05f2e7e1c00000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000060000000000000000000000000c56c7a0eaa804f854b536a5f3d5f49d2ec4b12b800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000190240001b9872b',
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
46
|
+
* signature: {
|
|
47
|
+
* r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',
|
|
48
|
+
* s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',
|
|
49
|
+
* type: 'secp256k1',
|
|
50
|
+
* yParity: '0x0',
|
|
51
|
+
* },
|
|
42
52
|
* chainId: '0x1',
|
|
43
53
|
* accessList: [],
|
|
44
|
-
* type: '
|
|
54
|
+
* type: '0x76',
|
|
45
55
|
* })
|
|
46
56
|
* ```
|
|
47
57
|
*
|
|
@@ -53,17 +63,31 @@ export function fromRpc(transaction, _options = {}) {
|
|
|
53
63
|
return null;
|
|
54
64
|
const transaction_ = ox_Transaction.fromRpc(transaction);
|
|
55
65
|
transaction_.type = fromRpcType[transaction.type];
|
|
66
|
+
if (transaction.calls)
|
|
67
|
+
transaction_.calls = transaction.calls.map((call) => ({
|
|
68
|
+
to: call.to,
|
|
69
|
+
value: call.value ? BigInt(call.value) : undefined,
|
|
70
|
+
data: call.input,
|
|
71
|
+
}));
|
|
72
|
+
if (transaction.feeToken)
|
|
73
|
+
transaction_.feeToken = transaction.feeToken;
|
|
74
|
+
if (transaction.nonceKey)
|
|
75
|
+
transaction_.nonceKey = BigInt(transaction.nonceKey);
|
|
76
|
+
if (transaction.signature)
|
|
77
|
+
transaction_.signature = SignatureEnvelope.fromRpc(transaction.signature);
|
|
78
|
+
if (transaction.validAfter)
|
|
79
|
+
transaction_.validAfter = Number(transaction.validAfter);
|
|
80
|
+
if (transaction.validBefore)
|
|
81
|
+
transaction_.validBefore = Number(transaction.validBefore);
|
|
56
82
|
if (transaction.feePayerSignature) {
|
|
57
83
|
transaction_.feePayerSignature = Signature.fromRpc(transaction.feePayerSignature);
|
|
58
84
|
transaction_.feePayerSignature.v = Signature.yParityToV(transaction_.feePayerSignature.yParity);
|
|
59
85
|
// TODO: remove once `feePayer` returned on `eth_getTxBy*`.
|
|
60
86
|
transaction_.feePayer = Secp256k1.recoverAddress({
|
|
61
|
-
payload:
|
|
87
|
+
payload: TransactionEnvelopeAA.getFeePayerSignPayload(transaction_, { sender: transaction.from }),
|
|
62
88
|
signature: transaction_.feePayerSignature,
|
|
63
89
|
});
|
|
64
90
|
}
|
|
65
|
-
if (transaction.feeToken)
|
|
66
|
-
transaction_.feeToken = transaction.feeToken;
|
|
67
91
|
return transaction_;
|
|
68
92
|
}
|
|
69
93
|
/**
|
|
@@ -78,6 +102,13 @@ export function fromRpc(transaction, _options = {}) {
|
|
|
78
102
|
* blockHash:
|
|
79
103
|
* '0xc350d807505fb835650f0013632c5515592987ba169bbc6626d9fc54d91f0f0b',
|
|
80
104
|
* blockNumber: 19868015n,
|
|
105
|
+
* calls: [
|
|
106
|
+
* {
|
|
107
|
+
* data: '0xdeadbeef',
|
|
108
|
+
* to: '0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad',
|
|
109
|
+
* value: 700000000000000000n,
|
|
110
|
+
* },
|
|
111
|
+
* ],
|
|
81
112
|
* chainId: 1,
|
|
82
113
|
* feeToken: '0x20c0000000000000000000000000000000000000',
|
|
83
114
|
* from: '0x814e5e0e31016b9a7f138c76b7e7b2bb5c1ab6a6',
|
|
@@ -88,14 +119,16 @@ export function fromRpc(transaction, _options = {}) {
|
|
|
88
119
|
* maxFeePerGas: 11985937556n,
|
|
89
120
|
* maxPriorityFeePerGas: 68993984n,
|
|
90
121
|
* nonce: 855n,
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
122
|
+
* signature: {
|
|
123
|
+
* signature: {
|
|
124
|
+
* r: 44944627813007772897391531230081695102703289123332187696115181104739239197517n,
|
|
125
|
+
* s: 36528503505192438307355164441104001310566505351980369085208178712678799181120n,
|
|
126
|
+
* yParity: 0,
|
|
127
|
+
* },
|
|
128
|
+
* type: 'secp256k1',
|
|
129
|
+
* },
|
|
94
130
|
* transactionIndex: 2,
|
|
95
|
-
* type: '
|
|
96
|
-
* v: 27,
|
|
97
|
-
* value: 700000000000000000n,
|
|
98
|
-
* yParity: 0,
|
|
131
|
+
* type: 'aa',
|
|
99
132
|
* })
|
|
100
133
|
* ```
|
|
101
134
|
*
|
|
@@ -105,6 +138,12 @@ export function fromRpc(transaction, _options = {}) {
|
|
|
105
138
|
export function toRpc(transaction, _options) {
|
|
106
139
|
const rpc = ox_Transaction.toRpc(transaction);
|
|
107
140
|
rpc.type = toRpcType[transaction.type];
|
|
141
|
+
if (transaction.calls)
|
|
142
|
+
rpc.calls = transaction.calls.map((call) => ({
|
|
143
|
+
to: call.to,
|
|
144
|
+
value: call.value ? Hex.fromNumber(call.value) : undefined,
|
|
145
|
+
data: call.data,
|
|
146
|
+
}));
|
|
108
147
|
if (transaction.feeToken)
|
|
109
148
|
rpc.feeToken = transaction.feeToken;
|
|
110
149
|
if (transaction.feePayerSignature) {
|
|
@@ -112,6 +151,12 @@ export function toRpc(transaction, _options) {
|
|
|
112
151
|
rpc.feePayerSignature.v = Hex.fromNumber(Signature.yParityToV(transaction.feePayerSignature?.yParity));
|
|
113
152
|
rpc.feePayer = transaction.feePayer;
|
|
114
153
|
}
|
|
154
|
+
if (transaction.signature)
|
|
155
|
+
rpc.signature = SignatureEnvelope.toRpc(transaction.signature);
|
|
156
|
+
if (typeof transaction.validAfter === 'number')
|
|
157
|
+
rpc.validAfter = Hex.fromNumber(transaction.validAfter);
|
|
158
|
+
if (typeof transaction.validBefore === 'number')
|
|
159
|
+
rpc.validBefore = Hex.fromNumber(transaction.validBefore);
|
|
115
160
|
return rpc;
|
|
116
161
|
}
|
|
117
162
|
//# sourceMappingURL=Transaction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../src/ox/Transaction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,cAAc,MAAM,gBAAgB,CAAA;AAEhD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../src/ox/Transaction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,KAA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as Authorization from 'ox/Authorization';
|
|
4
|
+
import * as Errors from 'ox/Errors';
|
|
5
|
+
import * as Hash from 'ox/Hash';
|
|
6
|
+
import * as Hex from 'ox/Hex';
|
|
7
|
+
import * as Rlp from 'ox/Rlp';
|
|
8
|
+
import * as Signature from 'ox/Signature';
|
|
9
|
+
import type { OneOf } from 'viem';
|
|
10
|
+
import type { Assign, Compute, PartialBy, UnionPartialBy } from '../internal/types.js';
|
|
11
|
+
import * as SignatureEnvelope from './SignatureEnvelope.js';
|
|
12
|
+
import * as TokenId from './TokenId.js';
|
|
13
|
+
/**
|
|
14
|
+
* Represents a single call within an AA transaction.
|
|
15
|
+
*/
|
|
16
|
+
export type Call<bigintType = bigint> = {
|
|
17
|
+
/** Call data. */
|
|
18
|
+
data?: Hex.Hex | undefined;
|
|
19
|
+
/** The target address or contract creation. */
|
|
20
|
+
to?: Address.Address | undefined;
|
|
21
|
+
/** Value to send (in wei). */
|
|
22
|
+
value?: bigintType | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type TransactionEnvelopeAA<signed extends boolean = boolean, bigintType = bigint, numberType = number, type extends string = Type> = Compute<{
|
|
25
|
+
/** EIP-2930 Access List. */
|
|
26
|
+
accessList?: AccessList.AccessList | undefined;
|
|
27
|
+
/** EIP-7702 Authorization list for the transaction. */
|
|
28
|
+
authorizationList?: Authorization.ListSigned<bigintType, numberType> | undefined;
|
|
29
|
+
/** EIP-155 Chain ID. */
|
|
30
|
+
chainId: numberType;
|
|
31
|
+
/** Sender of the transaction. */
|
|
32
|
+
from?: Address.Address | undefined;
|
|
33
|
+
/** Gas provided for transaction execution */
|
|
34
|
+
gas?: bigintType | undefined;
|
|
35
|
+
/** Unique number identifying this transaction */
|
|
36
|
+
nonce?: bigintType | undefined;
|
|
37
|
+
/** Transaction type */
|
|
38
|
+
type: type;
|
|
39
|
+
/** Array of calls to execute. */
|
|
40
|
+
calls: readonly Call<bigintType>[];
|
|
41
|
+
/** Fee payer signature. */
|
|
42
|
+
feePayerSignature?: Signature.Signature<true, bigintType, numberType> | null | undefined;
|
|
43
|
+
/** Fee token preference. Address or ID of the TIP-20 token. */
|
|
44
|
+
feeToken?: TokenId.TokenIdOrAddress | undefined;
|
|
45
|
+
/** Total fee per gas in wei (gasPrice/baseFeePerGas + maxPriorityFeePerGas). */
|
|
46
|
+
maxFeePerGas?: bigintType | undefined;
|
|
47
|
+
/** Max priority fee per gas (in wei). */
|
|
48
|
+
maxPriorityFeePerGas?: bigintType | undefined;
|
|
49
|
+
/** Nonce key for 2D nonce system (192 bits). */
|
|
50
|
+
nonceKey?: bigintType | undefined;
|
|
51
|
+
/** Transaction can only be included in a block before this timestamp. */
|
|
52
|
+
validBefore?: numberType | undefined;
|
|
53
|
+
/** Transaction can only be included in a block after this timestamp. */
|
|
54
|
+
validAfter?: numberType | undefined;
|
|
55
|
+
} & (signed extends true ? {
|
|
56
|
+
signature: SignatureEnvelope.SignatureEnvelope<bigintType, numberType>;
|
|
57
|
+
} : {
|
|
58
|
+
signature?: SignatureEnvelope.SignatureEnvelope<bigintType, numberType> | undefined;
|
|
59
|
+
})>;
|
|
60
|
+
export type Rpc<signed extends boolean = boolean> = TransactionEnvelopeAA<signed, Hex.Hex, Hex.Hex, '0x76'>;
|
|
61
|
+
export declare const feePayerMagic: "0x78";
|
|
62
|
+
export type FeePayerMagic = typeof feePayerMagic;
|
|
63
|
+
export type Serialized = `${SerializedType}${string}`;
|
|
64
|
+
export type Signed = TransactionEnvelopeAA<true>;
|
|
65
|
+
export declare const serializedType: "0x76";
|
|
66
|
+
export type SerializedType = typeof serializedType;
|
|
67
|
+
export declare const type: "aa";
|
|
68
|
+
export type Type = typeof type;
|
|
69
|
+
/**
|
|
70
|
+
* Asserts a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA} is valid.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts twoslash
|
|
74
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
75
|
+
*
|
|
76
|
+
* TransactionEnvelopeAA.assert({
|
|
77
|
+
* calls: [{ to: '0x0000000000000000000000000000000000000000', value: 0n }],
|
|
78
|
+
* chainId: 1,
|
|
79
|
+
* maxFeePerGas: 1000000000n,
|
|
80
|
+
* })
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @param envelope - The transaction envelope to assert.
|
|
84
|
+
*/
|
|
85
|
+
export declare function assert(envelope: PartialBy<TransactionEnvelopeAA, 'type'>): void;
|
|
86
|
+
export declare namespace assert {
|
|
87
|
+
type ErrorType = Address.assert.ErrorType | CallsEmptyError | InvalidValidityWindowError | Errors.GlobalErrorType;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Deserializes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA} from its serialized form.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts twoslash
|
|
94
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
95
|
+
*
|
|
96
|
+
* const envelope = TransactionEnvelopeAA.deserialize('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
|
|
97
|
+
* // @log: {
|
|
98
|
+
* // @log: type: 'aa',
|
|
99
|
+
* // @log: nonce: 785n,
|
|
100
|
+
* // @log: maxFeePerGas: 2000000000n,
|
|
101
|
+
* // @log: gas: 1000000n,
|
|
102
|
+
* // @log: calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
|
|
103
|
+
* // @log: }
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @param serialized - The serialized transaction.
|
|
107
|
+
* @returns Deserialized Transaction Envelope.
|
|
108
|
+
*/
|
|
109
|
+
export declare function deserialize(serialized: Serialized): Compute<TransactionEnvelopeAA>;
|
|
110
|
+
export declare namespace deserialize {
|
|
111
|
+
type ErrorType = Errors.GlobalErrorType;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Converts an arbitrary transaction object into an AA Transaction Envelope.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```ts twoslash
|
|
118
|
+
* import { Value } from 'ox'
|
|
119
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
120
|
+
*
|
|
121
|
+
* const envelope = TransactionEnvelopeAA.from({ // [!code focus]
|
|
122
|
+
* chainId: 1, // [!code focus]
|
|
123
|
+
* calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }], // [!code focus]
|
|
124
|
+
* maxFeePerGas: Value.fromGwei('10'), // [!code focus]
|
|
125
|
+
* maxPriorityFeePerGas: Value.fromGwei('1'), // [!code focus]
|
|
126
|
+
* }) // [!code focus]
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ### Attaching Signatures
|
|
131
|
+
*
|
|
132
|
+
* It is possible to attach a `signature` to the transaction envelope.
|
|
133
|
+
*
|
|
134
|
+
* ```ts twoslash
|
|
135
|
+
* // @noErrors
|
|
136
|
+
* import { Secp256k1, Value } from 'ox'
|
|
137
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
138
|
+
*
|
|
139
|
+
* const envelope = TransactionEnvelopeAA.from({
|
|
140
|
+
* chainId: 1,
|
|
141
|
+
* calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
|
|
142
|
+
* maxFeePerGas: Value.fromGwei('10'),
|
|
143
|
+
* maxPriorityFeePerGas: Value.fromGwei('1'),
|
|
144
|
+
* })
|
|
145
|
+
*
|
|
146
|
+
* const signature = Secp256k1.sign({
|
|
147
|
+
* payload: TransactionEnvelopeAA.getSignPayload(envelope),
|
|
148
|
+
* privateKey: '0x...',
|
|
149
|
+
* })
|
|
150
|
+
*
|
|
151
|
+
* const envelope_signed = TransactionEnvelopeAA.from(envelope, { // [!code focus]
|
|
152
|
+
* signature, // [!code focus]
|
|
153
|
+
* }) // [!code focus]
|
|
154
|
+
* // @log: {
|
|
155
|
+
* // @log: chainId: 1,
|
|
156
|
+
* // @log: calls: [{ to: '0x0000000000000000000000000000000000000000', value: 1000000000000000000n }],
|
|
157
|
+
* // @log: maxFeePerGas: 10000000000n,
|
|
158
|
+
* // @log: maxPriorityFeePerGas: 1000000000n,
|
|
159
|
+
* // @log: type: 'aa',
|
|
160
|
+
* // @log: r: 125...n,
|
|
161
|
+
* // @log: s: 642...n,
|
|
162
|
+
* // @log: yParity: 0,
|
|
163
|
+
* // @log: }
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ### From Serialized
|
|
168
|
+
*
|
|
169
|
+
* It is possible to instantiate an AA Transaction Envelope from a {@link ox#TransactionEnvelopeAA.Serialized} value.
|
|
170
|
+
*
|
|
171
|
+
* ```ts twoslash
|
|
172
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
173
|
+
*
|
|
174
|
+
* const envelope = TransactionEnvelopeAA.from('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
|
|
175
|
+
* // @log: {
|
|
176
|
+
* // @log: chainId: 1,
|
|
177
|
+
* // @log: calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
|
|
178
|
+
* // @log: maxFeePerGas: 10000000000n,
|
|
179
|
+
* // @log: type: 'aa',
|
|
180
|
+
* // @log: }
|
|
181
|
+
* ```
|
|
182
|
+
*
|
|
183
|
+
* @param envelope - The transaction object to convert.
|
|
184
|
+
* @param options - Options.
|
|
185
|
+
* @returns An AA Transaction Envelope.
|
|
186
|
+
*/
|
|
187
|
+
export declare function from<const envelope extends UnionPartialBy<TransactionEnvelopeAA, 'type'> | Serialized, const signature extends SignatureEnvelope.SignatureEnvelope | undefined = undefined>(envelope: envelope | UnionPartialBy<TransactionEnvelopeAA, 'type'> | Serialized, options?: from.Options<signature>): from.ReturnValue<envelope, signature>;
|
|
188
|
+
export declare namespace from {
|
|
189
|
+
type Options<signature extends SignatureEnvelope.SignatureEnvelope | undefined = undefined> = {
|
|
190
|
+
feePayerSignature?: Signature.Signature | null | undefined;
|
|
191
|
+
signature?: signature | SignatureEnvelope.SignatureEnvelope | undefined;
|
|
192
|
+
};
|
|
193
|
+
type ReturnValue<envelope extends UnionPartialBy<TransactionEnvelopeAA, 'type'> | Hex.Hex = TransactionEnvelopeAA | Hex.Hex, signature extends SignatureEnvelope.SignatureEnvelope | undefined = undefined> = Compute<envelope extends Hex.Hex ? TransactionEnvelopeAA : Assign<envelope, (signature extends SignatureEnvelope.SignatureEnvelope ? {
|
|
194
|
+
signature: SignatureEnvelope.from.ReturnValue<signature>;
|
|
195
|
+
} : {}) & {
|
|
196
|
+
readonly type: 'aa';
|
|
197
|
+
}>>;
|
|
198
|
+
type ErrorType = deserialize.ErrorType | assert.ErrorType | Errors.GlobalErrorType;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Serializes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts twoslash
|
|
205
|
+
* // @noErrors
|
|
206
|
+
* import { Value } from 'ox'
|
|
207
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
208
|
+
*
|
|
209
|
+
* const envelope = TransactionEnvelopeAA.from({
|
|
210
|
+
* chainId: 1,
|
|
211
|
+
* calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
|
|
212
|
+
* maxFeePerGas: Value.fromGwei('10'),
|
|
213
|
+
* })
|
|
214
|
+
*
|
|
215
|
+
* const serialized = TransactionEnvelopeAA.serialize(envelope) // [!code focus]
|
|
216
|
+
* ```
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ### Attaching Signatures
|
|
220
|
+
*
|
|
221
|
+
* It is possible to attach a `signature` to the serialized Transaction Envelope.
|
|
222
|
+
*
|
|
223
|
+
* ```ts twoslash
|
|
224
|
+
* // @noErrors
|
|
225
|
+
* import { Secp256k1, Value } from 'ox'
|
|
226
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
227
|
+
*
|
|
228
|
+
* const envelope = TransactionEnvelopeAA.from({
|
|
229
|
+
* chainId: 1,
|
|
230
|
+
* calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
|
|
231
|
+
* maxFeePerGas: Value.fromGwei('10'),
|
|
232
|
+
* })
|
|
233
|
+
*
|
|
234
|
+
* const signature = Secp256k1.sign({
|
|
235
|
+
* payload: TransactionEnvelopeAA.getSignPayload(envelope),
|
|
236
|
+
* privateKey: '0x...',
|
|
237
|
+
* })
|
|
238
|
+
*
|
|
239
|
+
* const serialized = TransactionEnvelopeAA.serialize(envelope, { // [!code focus]
|
|
240
|
+
* signature, // [!code focus]
|
|
241
|
+
* }) // [!code focus]
|
|
242
|
+
*
|
|
243
|
+
* // ... send `serialized` transaction to JSON-RPC `eth_sendRawTransaction`
|
|
244
|
+
* ```
|
|
245
|
+
*
|
|
246
|
+
* @param envelope - The Transaction Envelope to serialize.
|
|
247
|
+
* @param options - Options.
|
|
248
|
+
* @returns The serialized Transaction Envelope.
|
|
249
|
+
*/
|
|
250
|
+
export declare function serialize(envelope: PartialBy<TransactionEnvelopeAA, 'type'>, options?: serialize.Options): Serialized;
|
|
251
|
+
export declare namespace serialize {
|
|
252
|
+
type Options = {
|
|
253
|
+
/**
|
|
254
|
+
* Sender signature to append to the serialized envelope.
|
|
255
|
+
*/
|
|
256
|
+
signature?: SignatureEnvelope.SignatureEnvelope | undefined;
|
|
257
|
+
} & OneOf<{
|
|
258
|
+
/**
|
|
259
|
+
* Sender address to cover the fee of.
|
|
260
|
+
*/
|
|
261
|
+
sender: Address.Address;
|
|
262
|
+
/**
|
|
263
|
+
* Whether to serialize the transaction in the fee payer format.
|
|
264
|
+
*
|
|
265
|
+
* - If `'feePayer'`, then the transaction will be serialized in the fee payer format.
|
|
266
|
+
* - If `undefined` (default), then the transaction will be serialized in the normal format.
|
|
267
|
+
*/
|
|
268
|
+
format: 'feePayer';
|
|
269
|
+
} | {
|
|
270
|
+
/**
|
|
271
|
+
* Fee payer signature or the sender to cover the fee of.
|
|
272
|
+
*
|
|
273
|
+
* - If `Signature.Signature`, then this is the fee payer signature.
|
|
274
|
+
* - If `null`, then this indicates the envelope is intended to be signed by a fee payer.
|
|
275
|
+
*/
|
|
276
|
+
feePayerSignature?: Signature.Signature | null | undefined;
|
|
277
|
+
format?: undefined;
|
|
278
|
+
}>;
|
|
279
|
+
type ErrorType = assert.ErrorType | Hex.fromNumber.ErrorType | Signature.toTuple.ErrorType | Hex.concat.ErrorType | Rlp.fromHex.ErrorType | Errors.GlobalErrorType;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Returns the payload to sign for a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* The example below demonstrates how to compute the sign payload which can be used
|
|
286
|
+
* with ECDSA signing utilities like {@link ox#Secp256k1.(sign:function)}.
|
|
287
|
+
*
|
|
288
|
+
* ```ts twoslash
|
|
289
|
+
* // @noErrors
|
|
290
|
+
* import { Secp256k1 } from 'ox'
|
|
291
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
292
|
+
*
|
|
293
|
+
* const envelope = TransactionEnvelopeAA.from({
|
|
294
|
+
* chainId: 1,
|
|
295
|
+
* calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
|
|
296
|
+
* nonce: 0n,
|
|
297
|
+
* maxFeePerGas: 1000000000n,
|
|
298
|
+
* gas: 21000n,
|
|
299
|
+
* })
|
|
300
|
+
*
|
|
301
|
+
* const payload = TransactionEnvelopeAA.getSignPayload(envelope) // [!code focus]
|
|
302
|
+
* // @log: '0x...'
|
|
303
|
+
*
|
|
304
|
+
* const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
|
|
305
|
+
* ```
|
|
306
|
+
*
|
|
307
|
+
* @param envelope - The transaction envelope to get the sign payload for.
|
|
308
|
+
* @returns The sign payload.
|
|
309
|
+
*/
|
|
310
|
+
export declare function getSignPayload(envelope: TransactionEnvelopeAA): getSignPayload.ReturnValue;
|
|
311
|
+
export declare namespace getSignPayload {
|
|
312
|
+
type ReturnValue = Hex.Hex;
|
|
313
|
+
type ErrorType = hash.ErrorType | Errors.GlobalErrorType;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Hashes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}. This is the "transaction hash".
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```ts twoslash
|
|
320
|
+
* // @noErrors
|
|
321
|
+
* import { Secp256k1 } from 'ox'
|
|
322
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
323
|
+
*
|
|
324
|
+
* const envelope = TransactionEnvelopeAA.from({
|
|
325
|
+
* chainId: 1,
|
|
326
|
+
* calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
|
|
327
|
+
* nonce: 0n,
|
|
328
|
+
* maxFeePerGas: 1000000000n,
|
|
329
|
+
* gas: 21000n,
|
|
330
|
+
* })
|
|
331
|
+
*
|
|
332
|
+
* const signature = Secp256k1.sign({
|
|
333
|
+
* payload: TransactionEnvelopeAA.getSignPayload(envelope),
|
|
334
|
+
* privateKey: '0x...'
|
|
335
|
+
* })
|
|
336
|
+
*
|
|
337
|
+
* const envelope_signed = TransactionEnvelopeAA.from(envelope, { signature })
|
|
338
|
+
*
|
|
339
|
+
* const hash = TransactionEnvelopeAA.hash(envelope_signed) // [!code focus]
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* @param envelope - The AA Transaction Envelope to hash.
|
|
343
|
+
* @param options - Options.
|
|
344
|
+
* @returns The hash of the transaction envelope.
|
|
345
|
+
*/
|
|
346
|
+
export declare function hash<presign extends boolean = false>(envelope: TransactionEnvelopeAA<presign extends true ? false : true>, options?: hash.Options<presign>): hash.ReturnValue;
|
|
347
|
+
export declare namespace hash {
|
|
348
|
+
type Options<presign extends boolean = false> = {
|
|
349
|
+
/**
|
|
350
|
+
* Whether to hash this transaction for signing.
|
|
351
|
+
*
|
|
352
|
+
* @default false
|
|
353
|
+
*/
|
|
354
|
+
presign?: presign | boolean | undefined;
|
|
355
|
+
};
|
|
356
|
+
type ReturnValue = Hex.Hex;
|
|
357
|
+
type ErrorType = Hash.keccak256.ErrorType | serialize.ErrorType | Errors.GlobalErrorType;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Returns the fee payer payload to sign for a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* ```ts twoslash
|
|
364
|
+
* // @noErrors
|
|
365
|
+
* import { Secp256k1 } from 'ox'
|
|
366
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
367
|
+
*
|
|
368
|
+
* const envelope = TransactionEnvelopeAA.from({
|
|
369
|
+
* chainId: 1,
|
|
370
|
+
* calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
|
|
371
|
+
* nonce: 0n,
|
|
372
|
+
* maxFeePerGas: 1000000000n,
|
|
373
|
+
* gas: 21000n,
|
|
374
|
+
* })
|
|
375
|
+
*
|
|
376
|
+
* const payload = TransactionEnvelopeAA.getFeePayerSignPayload(envelope, {
|
|
377
|
+
* sender: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
|
|
378
|
+
* }) // [!code focus]
|
|
379
|
+
* // @log: '0x...'
|
|
380
|
+
*
|
|
381
|
+
* const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
|
|
382
|
+
* ```
|
|
383
|
+
*
|
|
384
|
+
* @param envelope - The transaction envelope to get the fee payer sign payload for.
|
|
385
|
+
* @param options - Options.
|
|
386
|
+
* @returns The fee payer sign payload.
|
|
387
|
+
*/
|
|
388
|
+
export declare function getFeePayerSignPayload(envelope: TransactionEnvelopeAA, options: getFeePayerSignPayload.Options): getFeePayerSignPayload.ReturnValue;
|
|
389
|
+
export declare namespace getFeePayerSignPayload {
|
|
390
|
+
type Options = {
|
|
391
|
+
/**
|
|
392
|
+
* Sender address to cover the fee of.
|
|
393
|
+
*/
|
|
394
|
+
sender: Address.Address;
|
|
395
|
+
};
|
|
396
|
+
type ReturnValue = Hex.Hex;
|
|
397
|
+
type ErrorType = hash.ErrorType | Errors.GlobalErrorType;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Validates a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}. Returns `true` if the envelope is valid, `false` otherwise.
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```ts twoslash
|
|
404
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
405
|
+
*
|
|
406
|
+
* const valid = TransactionEnvelopeAA.validate({
|
|
407
|
+
* calls: [{ to: '0x0000000000000000000000000000000000000000', value: 0n }],
|
|
408
|
+
* chainId: 1,
|
|
409
|
+
* maxFeePerGas: 1000000000n,
|
|
410
|
+
* })
|
|
411
|
+
* // @log: true
|
|
412
|
+
* ```
|
|
413
|
+
*
|
|
414
|
+
* @param envelope - The transaction envelope to validate.
|
|
415
|
+
*/
|
|
416
|
+
export declare function validate(envelope: PartialBy<TransactionEnvelopeAA, 'type'>): boolean;
|
|
417
|
+
export declare namespace validate {
|
|
418
|
+
type ErrorType = Errors.GlobalErrorType;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Thrown when a transaction's calls list is empty.
|
|
422
|
+
*
|
|
423
|
+
* @example
|
|
424
|
+
* ```ts twoslash
|
|
425
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
426
|
+
*
|
|
427
|
+
* TransactionEnvelopeAA.assert({
|
|
428
|
+
* calls: [],
|
|
429
|
+
* chainId: 1,
|
|
430
|
+
* })
|
|
431
|
+
* // @error: TransactionEnvelopeAA.CallsEmptyError: Calls list cannot be empty.
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
434
|
+
export declare class CallsEmptyError extends Errors.BaseError {
|
|
435
|
+
readonly name = "TransactionEnvelopeAA.CallsEmptyError";
|
|
436
|
+
constructor();
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Thrown when validBefore is not greater than validAfter.
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* ```ts twoslash
|
|
443
|
+
* import { TransactionEnvelopeAA } from 'ox/tempo'
|
|
444
|
+
*
|
|
445
|
+
* TransactionEnvelopeAA.assert({
|
|
446
|
+
* calls: [{ to: '0x0000000000000000000000000000000000000000' }],
|
|
447
|
+
* chainId: 1,
|
|
448
|
+
* validBefore: 100n,
|
|
449
|
+
* validAfter: 200n,
|
|
450
|
+
* })
|
|
451
|
+
* // @error: TransactionEnvelopeAA.InvalidValidityWindowError: validBefore (100) must be greater than validAfter (200).
|
|
452
|
+
* ```
|
|
453
|
+
*/
|
|
454
|
+
export declare class InvalidValidityWindowError extends Errors.BaseError {
|
|
455
|
+
readonly name = "TransactionEnvelopeAA.InvalidValidityWindowError";
|
|
456
|
+
constructor({ validBefore, validAfter, }: {
|
|
457
|
+
validBefore: number;
|
|
458
|
+
validAfter: number;
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
//# sourceMappingURL=TransactionEnvelopeAA.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionEnvelopeAA.d.ts","sourceRoot":"","sources":["../../src/ox/TransactionEnvelopeAA.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,KAAK,aAAa,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,MAAM,MA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