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.
Files changed (195) hide show
  1. package/dist/chains.d.ts +244 -541
  2. package/dist/chains.d.ts.map +1 -1
  3. package/dist/chains.js +10 -23
  4. package/dist/chains.js.map +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/ox/SignatureEnvelope.d.ts +245 -0
  7. package/dist/ox/SignatureEnvelope.d.ts.map +1 -0
  8. package/dist/ox/SignatureEnvelope.js +437 -0
  9. package/dist/ox/SignatureEnvelope.js.map +1 -0
  10. package/dist/ox/Transaction.d.ts +61 -24
  11. package/dist/ox/Transaction.d.ts.map +1 -1
  12. package/dist/ox/Transaction.js +63 -18
  13. package/dist/ox/Transaction.js.map +1 -1
  14. package/dist/ox/TransactionEnvelopeAA.d.ts +461 -0
  15. package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -0
  16. package/dist/ox/TransactionEnvelopeAA.js +528 -0
  17. package/dist/ox/TransactionEnvelopeAA.js.map +1 -0
  18. package/dist/ox/TransactionRequest.d.ts +7 -5
  19. package/dist/ox/TransactionRequest.d.ts.map +1 -1
  20. package/dist/ox/TransactionRequest.js +21 -12
  21. package/dist/ox/TransactionRequest.js.map +1 -1
  22. package/dist/ox/index.d.ts +5 -4
  23. package/dist/ox/index.d.ts.map +1 -1
  24. package/dist/ox/index.js +5 -4
  25. package/dist/ox/index.js.map +1 -1
  26. package/dist/prool/Instance.d.ts +0 -4
  27. package/dist/prool/Instance.d.ts.map +1 -1
  28. package/dist/prool/Instance.js +7 -7
  29. package/dist/prool/Instance.js.map +1 -1
  30. package/dist/prool/index.d.ts +1 -1
  31. package/dist/prool/index.d.ts.map +1 -1
  32. package/dist/prool/index.js +1 -1
  33. package/dist/prool/index.js.map +1 -1
  34. package/dist/viem/{abis.d.ts → Abis.d.ts} +523 -9
  35. package/dist/viem/Abis.d.ts.map +1 -0
  36. package/dist/viem/{abis.js → Abis.js} +321 -9
  37. package/dist/viem/Abis.js.map +1 -0
  38. package/dist/viem/{actions → Actions}/amm.d.ts +21 -21
  39. package/dist/viem/Actions/amm.d.ts.map +1 -0
  40. package/dist/viem/{actions → Actions}/amm.js +55 -43
  41. package/dist/viem/Actions/amm.js.map +1 -0
  42. package/dist/viem/Actions/dex.d.ts +3263 -0
  43. package/dist/viem/Actions/dex.d.ts.map +1 -0
  44. package/dist/viem/Actions/dex.js +1357 -0
  45. package/dist/viem/Actions/dex.js.map +1 -0
  46. package/dist/viem/{actions → Actions}/fee.d.ts +8 -8
  47. package/dist/viem/Actions/fee.d.ts.map +1 -0
  48. package/dist/viem/{actions → Actions}/fee.js +14 -13
  49. package/dist/viem/Actions/fee.js.map +1 -0
  50. package/dist/viem/Actions/index.d.ts +6 -0
  51. package/dist/viem/Actions/index.d.ts.map +1 -0
  52. package/dist/viem/Actions/index.js +6 -0
  53. package/dist/viem/Actions/index.js.map +1 -0
  54. package/dist/viem/{actions → Actions}/policy.d.ts +19 -19
  55. package/dist/viem/Actions/policy.d.ts.map +1 -0
  56. package/dist/viem/{actions → Actions}/policy.js +59 -46
  57. package/dist/viem/Actions/policy.js.map +1 -0
  58. package/dist/viem/{actions → Actions}/token.d.ts +3250 -700
  59. package/dist/viem/Actions/token.d.ts.map +1 -0
  60. package/dist/viem/{actions → Actions}/token.js +419 -83
  61. package/dist/viem/Actions/token.js.map +1 -0
  62. package/dist/viem/Addresses.d.ts +9 -0
  63. package/dist/viem/Addresses.d.ts.map +1 -0
  64. package/dist/viem/Addresses.js +9 -0
  65. package/dist/viem/Addresses.js.map +1 -0
  66. package/dist/viem/{chain.d.ts → Chain.d.ts} +81 -57
  67. package/dist/viem/Chain.d.ts.map +1 -0
  68. package/dist/viem/{chain.js → Chain.js} +7 -7
  69. package/dist/viem/Chain.js.map +1 -0
  70. package/dist/viem/{client.d.ts → Client.d.ts} +4 -4
  71. package/dist/viem/Client.d.ts.map +1 -0
  72. package/dist/viem/{client.js → Client.js} +3 -3
  73. package/dist/viem/Client.js.map +1 -0
  74. package/dist/viem/{decorator.d.ts → Decorator.d.ts} +507 -5
  75. package/dist/viem/Decorator.d.ts.map +1 -0
  76. package/dist/viem/{decorator.js → Decorator.js} +31 -5
  77. package/dist/viem/Decorator.js.map +1 -0
  78. package/dist/viem/{formatters.d.ts → Formatters.d.ts} +2 -2
  79. package/dist/viem/Formatters.d.ts.map +1 -0
  80. package/dist/viem/{formatters.js → Formatters.js} +24 -17
  81. package/dist/viem/Formatters.js.map +1 -0
  82. package/dist/viem/Tick.d.ts +111 -0
  83. package/dist/viem/Tick.d.ts.map +1 -0
  84. package/dist/viem/Tick.js +127 -0
  85. package/dist/viem/Tick.js.map +1 -0
  86. package/dist/viem/TokenIds.d.ts +3 -0
  87. package/dist/viem/TokenIds.d.ts.map +1 -0
  88. package/dist/viem/TokenIds.js +3 -0
  89. package/dist/viem/TokenIds.js.map +1 -0
  90. package/dist/viem/Transaction.d.ts +57 -0
  91. package/dist/viem/Transaction.d.ts.map +1 -0
  92. package/dist/viem/Transaction.js +137 -0
  93. package/dist/viem/Transaction.js.map +1 -0
  94. package/dist/viem/{transport.d.ts → Transport.d.ts} +3 -3
  95. package/dist/viem/Transport.d.ts.map +1 -0
  96. package/dist/viem/{transport.js → Transport.js} +3 -3
  97. package/dist/viem/Transport.js.map +1 -0
  98. package/dist/viem/index.d.ts +13 -9
  99. package/dist/viem/index.d.ts.map +1 -1
  100. package/dist/viem/index.js +13 -9
  101. package/dist/viem/index.js.map +1 -1
  102. package/dist/viem/{types.d.ts → internal/types.d.ts} +3 -3
  103. package/dist/viem/internal/types.d.ts.map +1 -0
  104. package/dist/viem/{types.js.map → internal/types.js.map} +1 -1
  105. package/dist/viem/internal/utils.d.ts.map +1 -0
  106. package/dist/viem/internal/utils.js.map +1 -0
  107. package/package.json +87 -101
  108. package/src/chains.ts +10 -24
  109. package/src/ox/SignatureEnvelope.test.ts +1252 -0
  110. package/src/ox/SignatureEnvelope.ts +709 -0
  111. package/src/ox/Transaction.test.ts +144 -89
  112. package/src/ox/Transaction.ts +104 -29
  113. package/src/ox/TransactionEnvelopeAA.test.ts +1533 -0
  114. package/src/ox/TransactionEnvelopeAA.ts +858 -0
  115. package/src/ox/TransactionRequest.ts +25 -17
  116. package/src/ox/index.ts +2 -1
  117. package/src/prool/Instance.ts +6 -14
  118. package/src/prool/internal/chain.json +101 -27
  119. package/src/viem/{abis.ts → Abis.ts} +322 -8
  120. package/src/viem/{actions → Actions}/amm.test.ts +65 -68
  121. package/src/viem/{actions → Actions}/amm.ts +72 -60
  122. package/src/viem/Actions/dex.test.ts +1608 -0
  123. package/src/viem/Actions/dex.ts +2026 -0
  124. package/src/viem/{actions → Actions}/fee.test.ts +34 -36
  125. package/src/viem/{actions → Actions}/fee.ts +18 -17
  126. package/src/viem/{actions → Actions}/index.ts +1 -0
  127. package/src/viem/{actions → Actions}/policy.test.ts +2 -2
  128. package/src/viem/{actions → Actions}/policy.ts +77 -64
  129. package/src/viem/{actions → Actions}/token.test.ts +403 -64
  130. package/src/viem/{actions → Actions}/token.ts +672 -133
  131. package/src/viem/Addresses.ts +9 -0
  132. package/src/viem/{chain.ts → Chain.ts} +6 -6
  133. package/src/viem/{client.bench-d.ts → Client.bench-d.ts} +2 -2
  134. package/src/viem/{client.test.ts → Client.test.ts} +31 -6
  135. package/src/viem/{client.ts → Client.ts} +1 -1
  136. package/src/viem/{decorator.bench-d.ts → Decorator.bench-d.ts} +2 -2
  137. package/src/viem/{decorator.test.ts → Decorator.test.ts} +1 -0
  138. package/src/viem/{decorator.ts → Decorator.ts} +586 -4
  139. package/src/viem/{formatters.ts → Formatters.ts} +31 -20
  140. package/src/viem/Tick.test.ts +281 -0
  141. package/src/viem/Tick.ts +176 -0
  142. package/src/viem/TokenIds.ts +2 -0
  143. package/src/viem/Transaction.ts +303 -0
  144. package/src/viem/{transport.ts → Transport.ts} +5 -5
  145. package/src/viem/e2e.test.ts +153 -78
  146. package/src/viem/index.ts +13 -9
  147. package/src/viem/{types.ts → internal/types.ts} +3 -3
  148. package/dist/ox/TransactionEnvelopeFeeToken.d.ts +0 -393
  149. package/dist/ox/TransactionEnvelopeFeeToken.d.ts.map +0 -1
  150. package/dist/ox/TransactionEnvelopeFeeToken.js +0 -452
  151. package/dist/ox/TransactionEnvelopeFeeToken.js.map +0 -1
  152. package/dist/viem/abis.d.ts.map +0 -1
  153. package/dist/viem/abis.js.map +0 -1
  154. package/dist/viem/actions/amm.d.ts.map +0 -1
  155. package/dist/viem/actions/amm.js.map +0 -1
  156. package/dist/viem/actions/fee.d.ts.map +0 -1
  157. package/dist/viem/actions/fee.js.map +0 -1
  158. package/dist/viem/actions/index.d.ts +0 -5
  159. package/dist/viem/actions/index.d.ts.map +0 -1
  160. package/dist/viem/actions/index.js +0 -5
  161. package/dist/viem/actions/index.js.map +0 -1
  162. package/dist/viem/actions/policy.d.ts.map +0 -1
  163. package/dist/viem/actions/policy.js.map +0 -1
  164. package/dist/viem/actions/token.d.ts.map +0 -1
  165. package/dist/viem/actions/token.js.map +0 -1
  166. package/dist/viem/addresses.d.ts +0 -8
  167. package/dist/viem/addresses.d.ts.map +0 -1
  168. package/dist/viem/addresses.js +0 -8
  169. package/dist/viem/addresses.js.map +0 -1
  170. package/dist/viem/chain.d.ts.map +0 -1
  171. package/dist/viem/chain.js.map +0 -1
  172. package/dist/viem/client.d.ts.map +0 -1
  173. package/dist/viem/client.js.map +0 -1
  174. package/dist/viem/decorator.d.ts.map +0 -1
  175. package/dist/viem/decorator.js.map +0 -1
  176. package/dist/viem/formatters.d.ts.map +0 -1
  177. package/dist/viem/formatters.js.map +0 -1
  178. package/dist/viem/transaction.d.ts +0 -54
  179. package/dist/viem/transaction.d.ts.map +0 -1
  180. package/dist/viem/transaction.js +0 -108
  181. package/dist/viem/transaction.js.map +0 -1
  182. package/dist/viem/transport.d.ts.map +0 -1
  183. package/dist/viem/transport.js.map +0 -1
  184. package/dist/viem/types.d.ts.map +0 -1
  185. package/dist/viem/utils.d.ts.map +0 -1
  186. package/dist/viem/utils.js.map +0 -1
  187. package/src/ox/TransactionEnvelopeFeeToken.test.ts +0 -1119
  188. package/src/ox/TransactionEnvelopeFeeToken.ts +0 -717
  189. package/src/prool/internal/consensus.toml +0 -32
  190. package/src/viem/addresses.ts +0 -10
  191. package/src/viem/transaction.ts +0 -253
  192. /package/dist/viem/{types.js → internal/types.js} +0 -0
  193. /package/dist/viem/{utils.d.ts → internal/utils.d.ts} +0 -0
  194. /package/dist/viem/{utils.js → internal/utils.js} +0 -0
  195. /package/src/viem/{utils.ts → internal/utils.ts} +0 -0
@@ -0,0 +1,528 @@
1
+ import * as AccessList from 'ox/AccessList';
2
+ import * as Address from 'ox/Address';
3
+ import * as Errors from 'ox/Errors';
4
+ import * as Hash from 'ox/Hash';
5
+ import * as Hex from 'ox/Hex';
6
+ import * as Rlp from 'ox/Rlp';
7
+ import * as Signature from 'ox/Signature';
8
+ import * as TransactionEnvelope from 'ox/TransactionEnvelope';
9
+ import * as SignatureEnvelope from './SignatureEnvelope.js';
10
+ import * as TokenId from './TokenId.js';
11
+ export const feePayerMagic = '0x78';
12
+ export const serializedType = '0x76';
13
+ export const type = 'aa';
14
+ /**
15
+ * Asserts a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA} is valid.
16
+ *
17
+ * @example
18
+ * ```ts twoslash
19
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
20
+ *
21
+ * TransactionEnvelopeAA.assert({
22
+ * calls: [{ to: '0x0000000000000000000000000000000000000000', value: 0n }],
23
+ * chainId: 1,
24
+ * maxFeePerGas: 1000000000n,
25
+ * })
26
+ * ```
27
+ *
28
+ * @param envelope - The transaction envelope to assert.
29
+ */
30
+ export function assert(envelope) {
31
+ const { calls, chainId, maxFeePerGas, maxPriorityFeePerGas, validBefore, validAfter, } = envelope;
32
+ // Calls must not be empty
33
+ if (!calls || calls.length === 0)
34
+ throw new CallsEmptyError();
35
+ // validBefore must be greater than validAfter if both are set
36
+ if (typeof validBefore === 'number' &&
37
+ typeof validAfter === 'number' &&
38
+ validBefore <= validAfter) {
39
+ throw new InvalidValidityWindowError({
40
+ validBefore: validBefore,
41
+ validAfter: validAfter,
42
+ });
43
+ }
44
+ // Validate each call
45
+ if (calls)
46
+ for (const call of calls)
47
+ if (call.to)
48
+ Address.assert(call.to, { strict: false });
49
+ // Validate chain ID
50
+ if (chainId <= 0)
51
+ throw new TransactionEnvelope.InvalidChainIdError({ chainId });
52
+ // Validate max fee per gas
53
+ if (maxFeePerGas && BigInt(maxFeePerGas) > 2n ** 256n - 1n)
54
+ throw new TransactionEnvelope.FeeCapTooHighError({
55
+ feeCap: maxFeePerGas,
56
+ });
57
+ if (maxPriorityFeePerGas &&
58
+ maxFeePerGas &&
59
+ maxPriorityFeePerGas > maxFeePerGas)
60
+ throw new TransactionEnvelope.TipAboveFeeCapError({
61
+ maxFeePerGas,
62
+ maxPriorityFeePerGas,
63
+ });
64
+ }
65
+ /**
66
+ * Deserializes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA} from its serialized form.
67
+ *
68
+ * @example
69
+ * ```ts twoslash
70
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
71
+ *
72
+ * const envelope = TransactionEnvelopeAA.deserialize('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
73
+ * // @log: {
74
+ * // @log: type: 'aa',
75
+ * // @log: nonce: 785n,
76
+ * // @log: maxFeePerGas: 2000000000n,
77
+ * // @log: gas: 1000000n,
78
+ * // @log: calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
79
+ * // @log: }
80
+ * ```
81
+ *
82
+ * @param serialized - The serialized transaction.
83
+ * @returns Deserialized Transaction Envelope.
84
+ */
85
+ export function deserialize(serialized) {
86
+ const transactionArray = Rlp.toHex(Hex.slice(serialized, 1));
87
+ const [chainId, maxPriorityFeePerGas, maxFeePerGas, gas, calls, accessList, nonceKey, nonce, validBefore, validAfter, feeToken, feePayerSignatureOrSender, signature,] = transactionArray;
88
+ if (!(transactionArray.length === 12 || transactionArray.length === 13))
89
+ throw new TransactionEnvelope.InvalidSerializedError({
90
+ attributes: {
91
+ chainId,
92
+ maxPriorityFeePerGas,
93
+ maxFeePerGas,
94
+ gas,
95
+ calls,
96
+ accessList,
97
+ nonceKey,
98
+ nonce,
99
+ validBefore,
100
+ validAfter,
101
+ feeToken,
102
+ feePayerSignatureOrSender,
103
+ ...(transactionArray.length > 12
104
+ ? {
105
+ signature,
106
+ }
107
+ : {}),
108
+ },
109
+ serialized,
110
+ type,
111
+ });
112
+ let transaction = {
113
+ chainId: Number(chainId),
114
+ type,
115
+ };
116
+ if (Hex.validate(gas) && gas !== '0x')
117
+ transaction.gas = BigInt(gas);
118
+ if (Hex.validate(nonce))
119
+ transaction.nonce = nonce === '0x' ? 0n : BigInt(nonce);
120
+ if (Hex.validate(maxFeePerGas) && maxFeePerGas !== '0x')
121
+ transaction.maxFeePerGas = BigInt(maxFeePerGas);
122
+ if (Hex.validate(maxPriorityFeePerGas) && maxPriorityFeePerGas !== '0x')
123
+ transaction.maxPriorityFeePerGas = BigInt(maxPriorityFeePerGas);
124
+ if (Hex.validate(nonceKey))
125
+ transaction.nonceKey = nonceKey === '0x' ? 0n : BigInt(nonceKey);
126
+ if (Hex.validate(validBefore) && validBefore !== '0x')
127
+ transaction.validBefore = Number(validBefore);
128
+ if (Hex.validate(validAfter) && validAfter !== '0x')
129
+ transaction.validAfter = Number(validAfter);
130
+ if (Hex.validate(feeToken) && feeToken !== '0x')
131
+ transaction.feeToken = feeToken;
132
+ // Parse calls array
133
+ if (calls && calls !== '0x') {
134
+ const callsArray = calls;
135
+ transaction.calls = callsArray.map((callTuple) => {
136
+ const [to, value, data] = callTuple;
137
+ const call = {};
138
+ if (to && to !== '0x')
139
+ call.to = to;
140
+ if (value && value !== '0x')
141
+ call.value = BigInt(value);
142
+ if (data && data !== '0x')
143
+ call.data = data;
144
+ return call;
145
+ });
146
+ }
147
+ if (accessList?.length !== 0 && accessList !== '0x')
148
+ transaction.accessList = AccessList.fromTupleList(accessList);
149
+ if (feePayerSignatureOrSender !== '0x' &&
150
+ feePayerSignatureOrSender !== undefined) {
151
+ if (feePayerSignatureOrSender === '0x00' ||
152
+ Address.validate(feePayerSignatureOrSender))
153
+ transaction.feePayerSignature = null;
154
+ else
155
+ transaction.feePayerSignature = Signature.fromTuple(feePayerSignatureOrSender);
156
+ }
157
+ const signatureEnvelope = signature
158
+ ? SignatureEnvelope.deserialize(signature)
159
+ : undefined;
160
+ if (signatureEnvelope)
161
+ transaction = {
162
+ ...transaction,
163
+ signature: signatureEnvelope,
164
+ };
165
+ assert(transaction);
166
+ return transaction;
167
+ }
168
+ /**
169
+ * Converts an arbitrary transaction object into an AA Transaction Envelope.
170
+ *
171
+ * @example
172
+ * ```ts twoslash
173
+ * import { Value } from 'ox'
174
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
175
+ *
176
+ * const envelope = TransactionEnvelopeAA.from({ // [!code focus]
177
+ * chainId: 1, // [!code focus]
178
+ * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }], // [!code focus]
179
+ * maxFeePerGas: Value.fromGwei('10'), // [!code focus]
180
+ * maxPriorityFeePerGas: Value.fromGwei('1'), // [!code focus]
181
+ * }) // [!code focus]
182
+ * ```
183
+ *
184
+ * @example
185
+ * ### Attaching Signatures
186
+ *
187
+ * It is possible to attach a `signature` to the transaction envelope.
188
+ *
189
+ * ```ts twoslash
190
+ * // @noErrors
191
+ * import { Secp256k1, Value } from 'ox'
192
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
193
+ *
194
+ * const envelope = TransactionEnvelopeAA.from({
195
+ * chainId: 1,
196
+ * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
197
+ * maxFeePerGas: Value.fromGwei('10'),
198
+ * maxPriorityFeePerGas: Value.fromGwei('1'),
199
+ * })
200
+ *
201
+ * const signature = Secp256k1.sign({
202
+ * payload: TransactionEnvelopeAA.getSignPayload(envelope),
203
+ * privateKey: '0x...',
204
+ * })
205
+ *
206
+ * const envelope_signed = TransactionEnvelopeAA.from(envelope, { // [!code focus]
207
+ * signature, // [!code focus]
208
+ * }) // [!code focus]
209
+ * // @log: {
210
+ * // @log: chainId: 1,
211
+ * // @log: calls: [{ to: '0x0000000000000000000000000000000000000000', value: 1000000000000000000n }],
212
+ * // @log: maxFeePerGas: 10000000000n,
213
+ * // @log: maxPriorityFeePerGas: 1000000000n,
214
+ * // @log: type: 'aa',
215
+ * // @log: r: 125...n,
216
+ * // @log: s: 642...n,
217
+ * // @log: yParity: 0,
218
+ * // @log: }
219
+ * ```
220
+ *
221
+ * @example
222
+ * ### From Serialized
223
+ *
224
+ * It is possible to instantiate an AA Transaction Envelope from a {@link ox#TransactionEnvelopeAA.Serialized} value.
225
+ *
226
+ * ```ts twoslash
227
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
228
+ *
229
+ * const envelope = TransactionEnvelopeAA.from('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
230
+ * // @log: {
231
+ * // @log: chainId: 1,
232
+ * // @log: calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
233
+ * // @log: maxFeePerGas: 10000000000n,
234
+ * // @log: type: 'aa',
235
+ * // @log: }
236
+ * ```
237
+ *
238
+ * @param envelope - The transaction object to convert.
239
+ * @param options - Options.
240
+ * @returns An AA Transaction Envelope.
241
+ */
242
+ export function from(envelope, options = {}) {
243
+ const { feePayerSignature, signature } = options;
244
+ const envelope_ = (typeof envelope === 'string' ? deserialize(envelope) : envelope);
245
+ assert(envelope_);
246
+ return {
247
+ ...envelope_,
248
+ ...(signature ? { signature: SignatureEnvelope.from(signature) } : {}),
249
+ ...(feePayerSignature
250
+ ? { feePayerSignature: Signature.from(feePayerSignature) }
251
+ : {}),
252
+ type: 'aa',
253
+ };
254
+ }
255
+ /**
256
+ * Serializes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
257
+ *
258
+ * @example
259
+ * ```ts twoslash
260
+ * // @noErrors
261
+ * import { Value } from 'ox'
262
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
263
+ *
264
+ * const envelope = TransactionEnvelopeAA.from({
265
+ * chainId: 1,
266
+ * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
267
+ * maxFeePerGas: Value.fromGwei('10'),
268
+ * })
269
+ *
270
+ * const serialized = TransactionEnvelopeAA.serialize(envelope) // [!code focus]
271
+ * ```
272
+ *
273
+ * @example
274
+ * ### Attaching Signatures
275
+ *
276
+ * It is possible to attach a `signature` to the serialized Transaction Envelope.
277
+ *
278
+ * ```ts twoslash
279
+ * // @noErrors
280
+ * import { Secp256k1, Value } from 'ox'
281
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
282
+ *
283
+ * const envelope = TransactionEnvelopeAA.from({
284
+ * chainId: 1,
285
+ * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
286
+ * maxFeePerGas: Value.fromGwei('10'),
287
+ * })
288
+ *
289
+ * const signature = Secp256k1.sign({
290
+ * payload: TransactionEnvelopeAA.getSignPayload(envelope),
291
+ * privateKey: '0x...',
292
+ * })
293
+ *
294
+ * const serialized = TransactionEnvelopeAA.serialize(envelope, { // [!code focus]
295
+ * signature, // [!code focus]
296
+ * }) // [!code focus]
297
+ *
298
+ * // ... send `serialized` transaction to JSON-RPC `eth_sendRawTransaction`
299
+ * ```
300
+ *
301
+ * @param envelope - The Transaction Envelope to serialize.
302
+ * @param options - Options.
303
+ * @returns The serialized Transaction Envelope.
304
+ */
305
+ export function serialize(envelope, options = {}) {
306
+ const { accessList, calls, chainId, feeToken, gas, nonce, nonceKey, maxFeePerGas, maxPriorityFeePerGas, validBefore, validAfter, } = envelope;
307
+ assert(envelope);
308
+ const accessTupleList = AccessList.toTupleList(accessList);
309
+ const signature = options.signature || envelope.signature;
310
+ // Encode calls as RLP list of [to, value, data] tuples
311
+ const callsTupleList = calls.map((call) => [
312
+ call.to ?? '0x',
313
+ call.value ? Hex.fromNumber(call.value) : '0x',
314
+ call.data ?? '0x',
315
+ ]);
316
+ const feePayerSignatureOrSender = (() => {
317
+ if (options.sender)
318
+ return options.sender;
319
+ const feePayerSignature = typeof options.feePayerSignature !== 'undefined'
320
+ ? options.feePayerSignature
321
+ : envelope.feePayerSignature;
322
+ if (feePayerSignature === null)
323
+ return '0x00';
324
+ if (!feePayerSignature)
325
+ return '0x';
326
+ return Signature.toTuple(feePayerSignature);
327
+ })();
328
+ const serialized = [
329
+ Hex.fromNumber(chainId),
330
+ maxPriorityFeePerGas ? Hex.fromNumber(maxPriorityFeePerGas) : '0x',
331
+ maxFeePerGas ? Hex.fromNumber(maxFeePerGas) : '0x',
332
+ gas ? Hex.fromNumber(gas) : '0x',
333
+ callsTupleList,
334
+ accessTupleList,
335
+ nonceKey ? Hex.fromNumber(nonceKey) : '0x',
336
+ nonce ? Hex.fromNumber(nonce) : '0x',
337
+ typeof validBefore === 'number' ? Hex.fromNumber(validBefore) : '0x',
338
+ typeof validAfter === 'number' ? Hex.fromNumber(validAfter) : '0x',
339
+ typeof feeToken === 'bigint' || typeof feeToken === 'string'
340
+ ? TokenId.toAddress(feeToken)
341
+ : '0x',
342
+ feePayerSignatureOrSender,
343
+ ...(signature
344
+ ? [SignatureEnvelope.serialize(SignatureEnvelope.from(signature))]
345
+ : []),
346
+ ];
347
+ return Hex.concat(options.format === 'feePayer' ? feePayerMagic : serializedType, Rlp.fromHex(serialized));
348
+ }
349
+ /**
350
+ * Returns the payload to sign for a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
351
+ *
352
+ * @example
353
+ * The example below demonstrates how to compute the sign payload which can be used
354
+ * with ECDSA signing utilities like {@link ox#Secp256k1.(sign:function)}.
355
+ *
356
+ * ```ts twoslash
357
+ * // @noErrors
358
+ * import { Secp256k1 } from 'ox'
359
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
360
+ *
361
+ * const envelope = TransactionEnvelopeAA.from({
362
+ * chainId: 1,
363
+ * calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
364
+ * nonce: 0n,
365
+ * maxFeePerGas: 1000000000n,
366
+ * gas: 21000n,
367
+ * })
368
+ *
369
+ * const payload = TransactionEnvelopeAA.getSignPayload(envelope) // [!code focus]
370
+ * // @log: '0x...'
371
+ *
372
+ * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
373
+ * ```
374
+ *
375
+ * @param envelope - The transaction envelope to get the sign payload for.
376
+ * @returns The sign payload.
377
+ */
378
+ export function getSignPayload(envelope) {
379
+ return hash(envelope, { presign: true });
380
+ }
381
+ /**
382
+ * Hashes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}. This is the "transaction hash".
383
+ *
384
+ * @example
385
+ * ```ts twoslash
386
+ * // @noErrors
387
+ * import { Secp256k1 } from 'ox'
388
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
389
+ *
390
+ * const envelope = TransactionEnvelopeAA.from({
391
+ * chainId: 1,
392
+ * calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
393
+ * nonce: 0n,
394
+ * maxFeePerGas: 1000000000n,
395
+ * gas: 21000n,
396
+ * })
397
+ *
398
+ * const signature = Secp256k1.sign({
399
+ * payload: TransactionEnvelopeAA.getSignPayload(envelope),
400
+ * privateKey: '0x...'
401
+ * })
402
+ *
403
+ * const envelope_signed = TransactionEnvelopeAA.from(envelope, { signature })
404
+ *
405
+ * const hash = TransactionEnvelopeAA.hash(envelope_signed) // [!code focus]
406
+ * ```
407
+ *
408
+ * @param envelope - The AA Transaction Envelope to hash.
409
+ * @param options - Options.
410
+ * @returns The hash of the transaction envelope.
411
+ */
412
+ export function hash(envelope, options = {}) {
413
+ const serialized = serialize({
414
+ ...envelope,
415
+ ...(options.presign
416
+ ? {
417
+ signature: undefined,
418
+ }
419
+ : {}),
420
+ });
421
+ return Hash.keccak256(serialized);
422
+ }
423
+ /**
424
+ * Returns the fee payer payload to sign for a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
425
+ *
426
+ * @example
427
+ * ```ts twoslash
428
+ * // @noErrors
429
+ * import { Secp256k1 } from 'ox'
430
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
431
+ *
432
+ * const envelope = TransactionEnvelopeAA.from({
433
+ * chainId: 1,
434
+ * calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
435
+ * nonce: 0n,
436
+ * maxFeePerGas: 1000000000n,
437
+ * gas: 21000n,
438
+ * })
439
+ *
440
+ * const payload = TransactionEnvelopeAA.getFeePayerSignPayload(envelope, {
441
+ * sender: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
442
+ * }) // [!code focus]
443
+ * // @log: '0x...'
444
+ *
445
+ * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
446
+ * ```
447
+ *
448
+ * @param envelope - The transaction envelope to get the fee payer sign payload for.
449
+ * @param options - Options.
450
+ * @returns The fee payer sign payload.
451
+ */
452
+ export function getFeePayerSignPayload(envelope, options) {
453
+ const { sender } = options;
454
+ const serialized = serialize({ ...envelope, signature: undefined }, {
455
+ sender,
456
+ format: 'feePayer',
457
+ });
458
+ return Hash.keccak256(serialized);
459
+ }
460
+ /**
461
+ * Validates a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}. Returns `true` if the envelope is valid, `false` otherwise.
462
+ *
463
+ * @example
464
+ * ```ts twoslash
465
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
466
+ *
467
+ * const valid = TransactionEnvelopeAA.validate({
468
+ * calls: [{ to: '0x0000000000000000000000000000000000000000', value: 0n }],
469
+ * chainId: 1,
470
+ * maxFeePerGas: 1000000000n,
471
+ * })
472
+ * // @log: true
473
+ * ```
474
+ *
475
+ * @param envelope - The transaction envelope to validate.
476
+ */
477
+ export function validate(envelope) {
478
+ try {
479
+ assert(envelope);
480
+ return true;
481
+ }
482
+ catch {
483
+ return false;
484
+ }
485
+ }
486
+ /**
487
+ * Thrown when a transaction's calls list is empty.
488
+ *
489
+ * @example
490
+ * ```ts twoslash
491
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
492
+ *
493
+ * TransactionEnvelopeAA.assert({
494
+ * calls: [],
495
+ * chainId: 1,
496
+ * })
497
+ * // @error: TransactionEnvelopeAA.CallsEmptyError: Calls list cannot be empty.
498
+ * ```
499
+ */
500
+ export class CallsEmptyError extends Errors.BaseError {
501
+ name = 'TransactionEnvelopeAA.CallsEmptyError';
502
+ constructor() {
503
+ super('Calls list cannot be empty.');
504
+ }
505
+ }
506
+ /**
507
+ * Thrown when validBefore is not greater than validAfter.
508
+ *
509
+ * @example
510
+ * ```ts twoslash
511
+ * import { TransactionEnvelopeAA } from 'ox/tempo'
512
+ *
513
+ * TransactionEnvelopeAA.assert({
514
+ * calls: [{ to: '0x0000000000000000000000000000000000000000' }],
515
+ * chainId: 1,
516
+ * validBefore: 100n,
517
+ * validAfter: 200n,
518
+ * })
519
+ * // @error: TransactionEnvelopeAA.InvalidValidityWindowError: validBefore (100) must be greater than validAfter (200).
520
+ * ```
521
+ */
522
+ export class InvalidValidityWindowError extends Errors.BaseError {
523
+ name = 'TransactionEnvelopeAA.InvalidValidityWindowError';
524
+ constructor({ validBefore, validAfter, }) {
525
+ super(`validBefore (${validBefore}) must be greater than validAfter (${validAfter}).`);
526
+ }
527
+ }
528
+ //# sourceMappingURL=TransactionEnvelopeAA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionEnvelopeAA.js","sourceRoot":"","sources":["../../src/ox/TransactionEnvelopeAA.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,OAAO,MAA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C,UAAU,IAAI,CAChF,CAAA;IACH,CAAC;CACF"}
@@ -1,14 +1,16 @@
1
1
  import type * as Authorization from 'ox/Authorization';
2
2
  import type * as Errors from 'ox/Errors';
3
- import type * as Calls from 'ox/erc7821/Calls';
4
- import type * as Hex from 'ox/Hex';
3
+ import * as Hex from 'ox/Hex';
5
4
  import * as ox_TransactionRequest from 'ox/TransactionRequest';
6
- import type { Compute } from "../internal/types.js";
7
- import * as TokenId from "./TokenId.js";
5
+ import type { Compute } from '../internal/types.js';
6
+ import * as TokenId from './TokenId.js';
7
+ import type { Call } from './TransactionEnvelopeAA.js';
8
8
  /** 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). */
9
9
  export type TransactionRequest<bigintType = bigint, numberType = number, type extends string = string> = Compute<ox_TransactionRequest.TransactionRequest<bigintType, numberType, type> & {
10
- calls?: readonly Calls.Call[] | undefined;
10
+ calls?: readonly Call<bigintType>[] | undefined;
11
11
  feeToken?: TokenId.TokenIdOrAddress | undefined;
12
+ validBefore?: numberType | undefined;
13
+ validAfter?: numberType | undefined;
12
14
  }>;
13
15
  /** RPC representation of a {@link ox#TransactionRequest.TransactionRequest}. */
14
16
  export type Rpc = TransactionRequest<Hex.Hex, Hex.Hex, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionRequest.d.ts","sourceRoot":"","sources":["../../src/ox/TransactionRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,aAAa,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,MAAM,WAAW,CAAA;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,kBAAkB,CAAA;AAE9C,OAAO,KAAK,KAAK,GAAG,MAAM,QAAQ,CAAA;AAClC,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,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AE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AAEtD,wPAAwP;AACxP,MAAM,MAAM,kBAAkB,CAC5B,UAAU,GAAG,MAAM,EACnB,UAAU,GAAG,MAAM,EACnB,IAAI,SAAS,MAAM,GAAG,MAAM,IAC1B,OAAO,CACT,qBAAqB,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG;IACvE,KAAK,CAAC,EAAE,SAAS,IAAI,CAAC,UAAU,CAAC,EAAE,GAAG,SAAS,CAAA;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAA;IAC/C,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IACpC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;CACpC,CACF,CAAA;AAED,gFAAgF;AAChF,MAAM,MAAM,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,GAAG,CA+BtD;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,KAAY,SAAS,GACjB,aAAa,CAAC,SAAS,CAAC,SAAS,GACjC,GAAG,CAAC,UAAU,CAAC,SAAS,GACxB,MAAM,CAAC,eAAe,CAAA;CAC3B"}
@@ -1,7 +1,7 @@
1
- import * as Execute from 'ox/erc7821/Execute';
1
+ import * as Hex from 'ox/Hex';
2
2
  import * as ox_TransactionRequest from 'ox/TransactionRequest';
3
- import * as TokenId from "./TokenId.js";
4
- import * as Transaction from "./Transaction.js";
3
+ import * as TokenId from './TokenId.js';
4
+ import * as Transaction from './Transaction.js';
5
5
  /**
6
6
  * Converts a {@link ox#TransactionRequest.TransactionRequest} to a {@link ox#TransactionRequest.Rpc}.
7
7
  *
@@ -47,20 +47,29 @@ import * as Transaction from "./Transaction.js";
47
47
  */
48
48
  export function toRpc(request) {
49
49
  const request_rpc = ox_TransactionRequest.toRpc(request);
50
- request_rpc.calls = request.calls;
50
+ if (request.calls)
51
+ request_rpc.calls = request.calls.map((call) => ({
52
+ to: call.to ?? '0x',
53
+ value: call.value ? Hex.fromNumber(call.value) : '0x',
54
+ data: call.data ?? '0x',
55
+ }));
51
56
  if (typeof request.feeToken !== 'undefined')
52
57
  request_rpc.feeToken = TokenId.toAddress(request.feeToken);
53
- if (request.calls && request.from) {
58
+ if (typeof request.validBefore !== 'undefined')
59
+ request_rpc.validBefore = Hex.fromNumber(request.validBefore);
60
+ if (typeof request.validAfter !== 'undefined')
61
+ request_rpc.validAfter = Hex.fromNumber(request.validAfter);
62
+ if (request.calls ||
63
+ typeof request.feeToken !== 'undefined' ||
64
+ typeof request.validBefore !== 'undefined' ||
65
+ typeof request.validAfter !== 'undefined' ||
66
+ request.type === 'aa') {
67
+ request_rpc.type = Transaction.toRpcType.aa;
68
+ delete request_rpc.data;
69
+ delete request_rpc.input;
54
70
  delete request_rpc.to;
55
71
  delete request_rpc.value;
56
- delete request_rpc.data;
57
- request_rpc.to = request.from;
58
- request_rpc.data = Execute.encodeData(request.calls);
59
72
  }
60
- if (request.calls ||
61
- typeof request.feeToken !== 'undefined' ||
62
- request.type === 'feeToken')
63
- request_rpc.type = Transaction.toRpcType.feeToken;
64
73
  return request_rpc;
65
74
  }
66
75
  //# sourceMappingURL=TransactionRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransactionRequest.js","sourceRoot":"","sources":["../../src/ox/TransactionRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAE7C,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAA;AAE9D,OAAO,KAAK,OAAO,qBAAoB;AACvC,OAAO,KAAK,WAAW,yBAAwB;AAiB/C;;;;;;;;;;;;;;;;;;;;;;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AAA;QACrB,OAAO,WAAW,CAAC,KAAK,CAAA;IAC1B,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -1,5 +1,6 @@
1
- export * as TokenId from "./TokenId.js";
2
- export * as TokenRole from "./TokenRole.js";
3
- export * as Transaction from "./Transaction.js";
4
- export * as TransactionEnvelopeFeeToken from "./TransactionEnvelopeFeeToken.js";
1
+ export * as SignatureEnvelope from './SignatureEnvelope.js';
2
+ export * as TokenId from './TokenId.js';
3
+ export * as TokenRole from './TokenRole.js';
4
+ export * as Transaction from './Transaction.js';
5
+ export * as TransactionEnvelopeAA from './TransactionEnvelopeAA.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,qBAAoB;AACvC,OAAO,KAAK,SAAS,uBAAsB;AAC3C,OAAO,KAAK,WAAW,yBAAwB;AAC/C,OAAO,KAAK,2BAA2B,yCAAwC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAA"}
package/dist/ox/index.js CHANGED
@@ -1,5 +1,6 @@
1
- export * as TokenId from "./TokenId.js";
2
- export * as TokenRole from "./TokenRole.js";
3
- export * as Transaction from "./Transaction.js";
4
- export * as TransactionEnvelopeFeeToken from "./TransactionEnvelopeFeeToken.js";
1
+ export * as SignatureEnvelope from './SignatureEnvelope.js';
2
+ export * as TokenId from './TokenId.js';
3
+ export * as TokenRole from './TokenRole.js';
4
+ export * as Transaction from './Transaction.js';
5
+ export * as TransactionEnvelopeAA from './TransactionEnvelopeAA.js';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,qBAAoB;AACvC,OAAO,KAAK,SAAS,uBAAsB;AAC3C,OAAO,KAAK,WAAW,yBAAwB;AAC/C,OAAO,KAAK,2BAA2B,yCAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAA"}