ox 0.9.16 → 0.10.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 (216) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +4 -4
  3. package/TxEnvelope/package.json +6 -0
  4. package/TxEnvelopeEip1559/package.json +6 -0
  5. package/TxEnvelopeEip2930/package.json +6 -0
  6. package/TxEnvelopeEip4844/package.json +6 -0
  7. package/TxEnvelopeEip7702/package.json +6 -0
  8. package/TxEnvelopeLegacy/package.json +6 -0
  9. package/_cjs/core/{TransactionEnvelope.js → TxEnvelope.js} +1 -1
  10. package/_cjs/core/TxEnvelope.js.map +1 -0
  11. package/_cjs/core/{TransactionEnvelopeEip1559.js → TxEnvelopeEip1559.js} +2 -2
  12. package/_cjs/core/TxEnvelopeEip1559.js.map +1 -0
  13. package/_cjs/core/{TransactionEnvelopeEip2930.js → TxEnvelopeEip2930.js} +2 -2
  14. package/_cjs/core/TxEnvelopeEip2930.js.map +1 -0
  15. package/_cjs/core/{TransactionEnvelopeEip4844.js → TxEnvelopeEip4844.js} +4 -4
  16. package/_cjs/core/TxEnvelopeEip4844.js.map +1 -0
  17. package/_cjs/core/{TransactionEnvelopeEip7702.js → TxEnvelopeEip7702.js} +4 -4
  18. package/_cjs/core/TxEnvelopeEip7702.js.map +1 -0
  19. package/_cjs/core/{TransactionEnvelopeLegacy.js → TxEnvelopeLegacy.js} +2 -2
  20. package/_cjs/core/TxEnvelopeLegacy.js.map +1 -0
  21. package/_cjs/core/WebAuthnP256.js +1 -1
  22. package/_cjs/core/WebAuthnP256.js.map +1 -1
  23. package/_cjs/erc8021/Attribution.js +36 -6
  24. package/_cjs/erc8021/Attribution.js.map +1 -1
  25. package/_cjs/index.docs.js +1 -0
  26. package/_cjs/index.docs.js.map +1 -1
  27. package/_cjs/index.js +7 -7
  28. package/_cjs/index.js.map +1 -1
  29. package/_cjs/tempo/AuthorizationTempo.js +101 -0
  30. package/_cjs/tempo/AuthorizationTempo.js.map +1 -0
  31. package/_cjs/tempo/KeyAuthorization.js +123 -0
  32. package/_cjs/tempo/KeyAuthorization.js.map +1 -0
  33. package/_cjs/tempo/PoolId.js +10 -0
  34. package/_cjs/tempo/PoolId.js.map +1 -0
  35. package/_cjs/tempo/SignatureEnvelope.js +394 -0
  36. package/_cjs/tempo/SignatureEnvelope.js.map +1 -0
  37. package/_cjs/tempo/Tick.js +77 -0
  38. package/_cjs/tempo/Tick.js.map +1 -0
  39. package/_cjs/tempo/TokenId.js +28 -0
  40. package/_cjs/tempo/TokenId.js.map +1 -0
  41. package/_cjs/tempo/TokenRole.js +26 -0
  42. package/_cjs/tempo/TokenRole.js.map +1 -0
  43. package/_cjs/tempo/Transaction.js +80 -0
  44. package/_cjs/tempo/Transaction.js.map +1 -0
  45. package/_cjs/tempo/TransactionReceipt.js +26 -0
  46. package/_cjs/tempo/TransactionReceipt.js.map +1 -0
  47. package/_cjs/tempo/TransactionRequest.js +53 -0
  48. package/_cjs/tempo/TransactionRequest.js.map +1 -0
  49. package/_cjs/tempo/TxEnvelopeTempo.js +267 -0
  50. package/_cjs/tempo/TxEnvelopeTempo.js.map +1 -0
  51. package/_cjs/tempo/index.js +15 -0
  52. package/_cjs/tempo/index.js.map +1 -0
  53. package/_cjs/version.js +1 -1
  54. package/_esm/core/Blobs.js +8 -8
  55. package/_esm/core/{TransactionEnvelope.js → TxEnvelope.js} +11 -11
  56. package/_esm/core/TxEnvelope.js.map +1 -0
  57. package/_esm/core/{TransactionEnvelopeEip1559.js → TxEnvelopeEip1559.js} +42 -42
  58. package/_esm/core/TxEnvelopeEip1559.js.map +1 -0
  59. package/_esm/core/{TransactionEnvelopeEip2930.js → TxEnvelopeEip2930.js} +43 -43
  60. package/_esm/core/TxEnvelopeEip2930.js.map +1 -0
  61. package/_esm/core/{TransactionEnvelopeEip4844.js → TxEnvelopeEip4844.js} +42 -42
  62. package/_esm/core/TxEnvelopeEip4844.js.map +1 -0
  63. package/_esm/core/{TransactionEnvelopeEip7702.js → TxEnvelopeEip7702.js} +40 -40
  64. package/_esm/core/TxEnvelopeEip7702.js.map +1 -0
  65. package/_esm/core/{TransactionEnvelopeLegacy.js → TxEnvelopeLegacy.js} +42 -42
  66. package/_esm/core/TxEnvelopeLegacy.js.map +1 -0
  67. package/_esm/core/WebAuthnP256.js +1 -1
  68. package/_esm/core/WebAuthnP256.js.map +1 -1
  69. package/_esm/erc8021/Attribution.js +58 -13
  70. package/_esm/erc8021/Attribution.js.map +1 -1
  71. package/_esm/index.docs.js +1 -0
  72. package/_esm/index.docs.js.map +1 -1
  73. package/_esm/index.js +192 -192
  74. package/_esm/index.js.map +1 -1
  75. package/_esm/tempo/AuthorizationTempo.js +664 -0
  76. package/_esm/tempo/AuthorizationTempo.js.map +1 -0
  77. package/_esm/tempo/KeyAuthorization.js +426 -0
  78. package/_esm/tempo/KeyAuthorization.js.map +1 -0
  79. package/_esm/tempo/PoolId.js +28 -0
  80. package/_esm/tempo/PoolId.js.map +1 -0
  81. package/_esm/tempo/SignatureEnvelope.js +660 -0
  82. package/_esm/tempo/SignatureEnvelope.js.map +1 -0
  83. package/_esm/tempo/Tick.js +147 -0
  84. package/_esm/tempo/Tick.js.map +1 -0
  85. package/_esm/tempo/TokenId.js +71 -0
  86. package/_esm/tempo/TokenId.js.map +1 -0
  87. package/_esm/tempo/TokenRole.js +40 -0
  88. package/_esm/tempo/TokenRole.js.map +1 -0
  89. package/_esm/tempo/Transaction.js +167 -0
  90. package/_esm/tempo/Transaction.js.map +1 -0
  91. package/_esm/tempo/TransactionReceipt.js +138 -0
  92. package/_esm/tempo/TransactionReceipt.js.map +1 -0
  93. package/_esm/tempo/TransactionRequest.js +99 -0
  94. package/_esm/tempo/TransactionRequest.js.map +1 -0
  95. package/_esm/tempo/TxEnvelopeTempo.js +607 -0
  96. package/_esm/tempo/TxEnvelopeTempo.js.map +1 -0
  97. package/_esm/tempo/index.js +298 -0
  98. package/_esm/tempo/index.js.map +1 -0
  99. package/_esm/version.js +1 -1
  100. package/_types/core/Blobs.d.ts +8 -8
  101. package/_types/core/{TransactionEnvelope.d.ts → TxEnvelope.d.ts} +11 -11
  102. package/_types/core/TxEnvelope.d.ts.map +1 -0
  103. package/_types/core/{TransactionEnvelopeEip1559.d.ts → TxEnvelopeEip1559.d.ts} +54 -54
  104. package/_types/core/TxEnvelopeEip1559.d.ts.map +1 -0
  105. package/_types/core/{TransactionEnvelopeEip2930.d.ts → TxEnvelopeEip2930.d.ts} +55 -55
  106. package/_types/core/TxEnvelopeEip2930.d.ts.map +1 -0
  107. package/_types/core/{TransactionEnvelopeEip4844.d.ts → TxEnvelopeEip4844.d.ts} +54 -54
  108. package/_types/core/TxEnvelopeEip4844.d.ts.map +1 -0
  109. package/_types/core/{TransactionEnvelopeEip7702.d.ts → TxEnvelopeEip7702.d.ts} +49 -49
  110. package/_types/core/TxEnvelopeEip7702.d.ts.map +1 -0
  111. package/_types/core/{TransactionEnvelopeLegacy.d.ts → TxEnvelopeLegacy.d.ts} +54 -54
  112. package/_types/core/TxEnvelopeLegacy.d.ts.map +1 -0
  113. package/_types/core/WebAuthnP256.d.ts +1 -1
  114. package/_types/core/WebAuthnP256.d.ts.map +1 -1
  115. package/_types/erc8021/Attribution.d.ts +20 -6
  116. package/_types/erc8021/Attribution.d.ts.map +1 -1
  117. package/_types/index.d.ts +192 -192
  118. package/_types/index.d.ts.map +1 -1
  119. package/_types/index.docs.d.ts +1 -0
  120. package/_types/index.docs.d.ts.map +1 -1
  121. package/_types/tempo/AuthorizationTempo.d.ts +688 -0
  122. package/_types/tempo/AuthorizationTempo.d.ts.map +1 -0
  123. package/_types/tempo/KeyAuthorization.d.ts +437 -0
  124. package/_types/tempo/KeyAuthorization.d.ts.map +1 -0
  125. package/_types/tempo/PoolId.d.ts +33 -0
  126. package/_types/tempo/PoolId.d.ts.map +1 -0
  127. package/_types/tempo/SignatureEnvelope.d.ts +438 -0
  128. package/_types/tempo/SignatureEnvelope.d.ts.map +1 -0
  129. package/_types/tempo/Tick.d.ts +120 -0
  130. package/_types/tempo/Tick.d.ts.map +1 -0
  131. package/_types/tempo/TokenId.d.ts +55 -0
  132. package/_types/tempo/TokenId.d.ts.map +1 -0
  133. package/_types/tempo/TokenRole.d.ts +29 -0
  134. package/_types/tempo/TokenRole.d.ts.map +1 -0
  135. package/_types/tempo/Transaction.d.ts +208 -0
  136. package/_types/tempo/Transaction.d.ts.map +1 -0
  137. package/_types/tempo/TransactionReceipt.d.ts +165 -0
  138. package/_types/tempo/TransactionReceipt.d.ts.map +1 -0
  139. package/_types/tempo/TransactionRequest.d.ts +89 -0
  140. package/_types/tempo/TransactionRequest.d.ts.map +1 -0
  141. package/_types/tempo/TxEnvelopeTempo.d.ts +551 -0
  142. package/_types/tempo/TxEnvelopeTempo.d.ts.map +1 -0
  143. package/_types/tempo/index.d.ts +300 -0
  144. package/_types/tempo/index.d.ts.map +1 -0
  145. package/_types/version.d.ts +1 -1
  146. package/core/Blobs.ts +8 -8
  147. package/core/{TransactionEnvelope.ts → TxEnvelope.ts} +10 -10
  148. package/core/{TransactionEnvelopeEip1559.ts → TxEnvelopeEip1559.ts} +60 -69
  149. package/core/{TransactionEnvelopeEip2930.ts → TxEnvelopeEip2930.ts} +61 -72
  150. package/core/{TransactionEnvelopeEip4844.ts → TxEnvelopeEip4844.ts} +62 -71
  151. package/core/{TransactionEnvelopeEip7702.ts → TxEnvelopeEip7702.ts} +58 -67
  152. package/core/{TransactionEnvelopeLegacy.ts → TxEnvelopeLegacy.ts} +59 -68
  153. package/core/WebAuthnP256.ts +3 -1
  154. package/erc8021/Attribution.ts +77 -15
  155. package/index.docs.ts +1 -0
  156. package/index.ts +192 -195
  157. package/package.json +91 -31
  158. package/tempo/AuthorizationTempo/package.json +6 -0
  159. package/tempo/AuthorizationTempo.test.ts +1293 -0
  160. package/tempo/AuthorizationTempo.ts +884 -0
  161. package/tempo/KeyAuthorization/package.json +6 -0
  162. package/tempo/KeyAuthorization.test.ts +1373 -0
  163. package/tempo/KeyAuthorization.ts +622 -0
  164. package/tempo/PoolId/package.json +6 -0
  165. package/tempo/PoolId.test.ts +33 -0
  166. package/tempo/PoolId.ts +42 -0
  167. package/tempo/SignatureEnvelope/package.json +6 -0
  168. package/tempo/SignatureEnvelope.test.ts +1877 -0
  169. package/tempo/SignatureEnvelope.ts +973 -0
  170. package/tempo/Tick/package.json +6 -0
  171. package/tempo/Tick.test.ts +281 -0
  172. package/tempo/Tick.ts +186 -0
  173. package/tempo/TokenId/package.json +6 -0
  174. package/tempo/TokenId.test.ts +40 -0
  175. package/tempo/TokenId.ts +80 -0
  176. package/tempo/TokenRole/package.json +6 -0
  177. package/tempo/TokenRole.test.ts +16 -0
  178. package/tempo/TokenRole.ts +45 -0
  179. package/tempo/Transaction/package.json +6 -0
  180. package/tempo/Transaction.test.ts +523 -0
  181. package/tempo/Transaction.ts +339 -0
  182. package/tempo/TransactionReceipt/package.json +6 -0
  183. package/tempo/TransactionReceipt.ts +200 -0
  184. package/tempo/TransactionRequest/package.json +6 -0
  185. package/tempo/TransactionRequest.ts +160 -0
  186. package/tempo/TxEnvelopeTempo/package.json +6 -0
  187. package/tempo/TxEnvelopeTempo.test.ts +1371 -0
  188. package/tempo/TxEnvelopeTempo.ts +972 -0
  189. package/tempo/e2e.test.ts +1387 -0
  190. package/tempo/index.ts +308 -0
  191. package/tempo/package.json +6 -0
  192. package/version.ts +1 -1
  193. package/TransactionEnvelope/package.json +0 -6
  194. package/TransactionEnvelopeEip1559/package.json +0 -6
  195. package/TransactionEnvelopeEip2930/package.json +0 -6
  196. package/TransactionEnvelopeEip4844/package.json +0 -6
  197. package/TransactionEnvelopeEip7702/package.json +0 -6
  198. package/TransactionEnvelopeLegacy/package.json +0 -6
  199. package/_cjs/core/TransactionEnvelope.js.map +0 -1
  200. package/_cjs/core/TransactionEnvelopeEip1559.js.map +0 -1
  201. package/_cjs/core/TransactionEnvelopeEip2930.js.map +0 -1
  202. package/_cjs/core/TransactionEnvelopeEip4844.js.map +0 -1
  203. package/_cjs/core/TransactionEnvelopeEip7702.js.map +0 -1
  204. package/_cjs/core/TransactionEnvelopeLegacy.js.map +0 -1
  205. package/_esm/core/TransactionEnvelope.js.map +0 -1
  206. package/_esm/core/TransactionEnvelopeEip1559.js.map +0 -1
  207. package/_esm/core/TransactionEnvelopeEip2930.js.map +0 -1
  208. package/_esm/core/TransactionEnvelopeEip4844.js.map +0 -1
  209. package/_esm/core/TransactionEnvelopeEip7702.js.map +0 -1
  210. package/_esm/core/TransactionEnvelopeLegacy.js.map +0 -1
  211. package/_types/core/TransactionEnvelope.d.ts.map +0 -1
  212. package/_types/core/TransactionEnvelopeEip1559.d.ts.map +0 -1
  213. package/_types/core/TransactionEnvelopeEip2930.d.ts.map +0 -1
  214. package/_types/core/TransactionEnvelopeEip4844.d.ts.map +0 -1
  215. package/_types/core/TransactionEnvelopeEip7702.d.ts.map +0 -1
  216. package/_types/core/TransactionEnvelopeLegacy.d.ts.map +0 -1
@@ -0,0 +1,551 @@
1
+ import * as AccessList from '../core/AccessList.js';
2
+ import * as Address from '../core/Address.js';
3
+ import * as Errors from '../core/Errors.js';
4
+ import * as Hash from '../core/Hash.js';
5
+ import * as Hex from '../core/Hex.js';
6
+ import type { Assign, Compute, OneOf, PartialBy, UnionPartialBy } from '../core/internal/types.js';
7
+ import * as Rlp from '../core/Rlp.js';
8
+ import * as Signature from '../core/Signature.js';
9
+ import * as AuthorizationTempo from './AuthorizationTempo.js';
10
+ import * as KeyAuthorization from './KeyAuthorization.js';
11
+ import * as SignatureEnvelope from './SignatureEnvelope.js';
12
+ import * as TokenId from './TokenId.js';
13
+ /**
14
+ * Represents a single call within a Tempo transaction.
15
+ *
16
+ * Tempo transactions support batching multiple calls for atomic execution.
17
+ *
18
+ * [Batch Calls](https://docs.tempo.xyz/protocol/transactions#batch-calls)
19
+ */
20
+ export type Call<bigintType = bigint> = {
21
+ /** Call data. */
22
+ data?: Hex.Hex | undefined;
23
+ /** The target address or contract creation. */
24
+ to?: Address.Address | undefined;
25
+ /** Value to send (in wei). */
26
+ value?: bigintType | undefined;
27
+ };
28
+ /**
29
+ * Tempo transaction envelope (type `0x76`).
30
+ *
31
+ * A new EIP-2718 transaction type exclusively available on Tempo, designed for payment
32
+ * use cases with the following features:
33
+ *
34
+ * - **Configurable Fee Tokens**: Pay transaction fees with any USD-denominated TIP-20 token.
35
+ * The Fee AMM automatically converts to the validator's preferred token.
36
+ *
37
+ * - **Fee Sponsorship**: A third-party fee payer can pay fees on behalf of the sender using
38
+ * a dual-signature scheme (sender signs tx, fee payer signs over tx + sender address).
39
+ *
40
+ * - **Batch Calls**: Execute multiple operations atomically in a single transaction via
41
+ * the `calls` array, reducing overhead and simplifying wallet management.
42
+ *
43
+ * - **Access Keys**: Delegate signing to secondary keys with expiry and per-TIP-20 spending
44
+ * limits via `keyAuthorization`. Enables passkey UX without repeated prompts.
45
+ *
46
+ * - **Parallelizable Nonces**: Use different `nonceKey` values to submit multiple transactions
47
+ * in parallel without waiting for sequential nonce confirmation.
48
+ *
49
+ * - **Scheduled Transactions**: Set `validAfter` and `validBefore` timestamps to define a
50
+ * time window for when the transaction can be included in a block.
51
+ *
52
+ * - **Multi-Signature Support**: Sign with secp256k1, P256 (passkeys), or WebAuthn credentials.
53
+ *
54
+ * [Tempo Transaction Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction)
55
+ */
56
+ export type TxEnvelopeTempo<signed extends boolean = boolean, bigintType = bigint, numberType = number, type extends string = Type> = Compute<{
57
+ /** EIP-2930 Access List. */
58
+ accessList?: AccessList.AccessList | undefined;
59
+ /** EIP-7702 (Tempo) Authorization list for the transaction. */
60
+ authorizationList?: AuthorizationTempo.ListSigned<bigintType, numberType> | undefined;
61
+ /** Array of calls to execute. */
62
+ calls: readonly Call<bigintType>[];
63
+ /** EIP-155 Chain ID. */
64
+ chainId: numberType;
65
+ /** Sender of the transaction. */
66
+ from?: Address.Address | undefined;
67
+ /** Gas provided for transaction execution */
68
+ gas?: bigintType | undefined;
69
+ /** Fee payer signature. */
70
+ feePayerSignature?: Signature.Signature<true, bigintType, numberType> | null | undefined;
71
+ /** Fee token preference. Address or ID of the TIP-20 token. */
72
+ feeToken?: TokenId.TokenIdOrAddress | undefined;
73
+ /**
74
+ * Key authorization for provisioning a new access key.
75
+ *
76
+ * When present, this transaction will add the specified key to the AccountKeychain precompile,
77
+ * before verifying the transaction signature.
78
+ * The authorization must be signed with the root key, the tx can be signed by the Keychain signature.
79
+ */
80
+ keyAuthorization?: KeyAuthorization.Signed<bigintType, numberType> | undefined;
81
+ /** Total fee per gas in wei (gasPrice/baseFeePerGas + maxPriorityFeePerGas). */
82
+ maxFeePerGas?: bigintType | undefined;
83
+ /** Max priority fee per gas (in wei). */
84
+ maxPriorityFeePerGas?: bigintType | undefined;
85
+ /** Nonce key for 2D nonce system (192 bits). */
86
+ nonceKey?: bigintType | undefined;
87
+ /** Unique number identifying this transaction */
88
+ nonce?: bigintType | undefined;
89
+ /** Transaction type */
90
+ type: type;
91
+ /** Transaction can only be included in a block before this timestamp. */
92
+ validBefore?: numberType | undefined;
93
+ /** Transaction can only be included in a block after this timestamp. */
94
+ validAfter?: numberType | undefined;
95
+ } & (signed extends true ? {
96
+ signature: SignatureEnvelope.SignatureEnvelope<bigintType, numberType>;
97
+ } : {
98
+ signature?: SignatureEnvelope.SignatureEnvelope<bigintType, numberType> | undefined;
99
+ })>;
100
+ export type Rpc<signed extends boolean = boolean> = TxEnvelopeTempo<signed, Hex.Hex, Hex.Hex, '0x76'>;
101
+ export declare const feePayerMagic: "0x78";
102
+ export type FeePayerMagic = typeof feePayerMagic;
103
+ export type Serialized = `${SerializedType}${string}`;
104
+ export type Signed = TxEnvelopeTempo<true>;
105
+ export declare const serializedType: "0x76";
106
+ export type SerializedType = typeof serializedType;
107
+ export declare const type: "tempo";
108
+ export type Type = typeof type;
109
+ /**
110
+ * Asserts a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo} is valid.
111
+ *
112
+ * @example
113
+ * ```ts twoslash
114
+ * import { TxEnvelopeTempo } from 'ox/tempo'
115
+ *
116
+ * TxEnvelopeTempo.assert({
117
+ * calls: [{ to: '0x0000000000000000000000000000000000000000', value: 0n }],
118
+ * chainId: 1,
119
+ * maxFeePerGas: 1000000000n,
120
+ * })
121
+ * ```
122
+ *
123
+ * @param envelope - The transaction envelope to assert.
124
+ */
125
+ export declare function assert(envelope: PartialBy<TxEnvelopeTempo, 'type'>): void;
126
+ export declare namespace assert {
127
+ type ErrorType = Address.assert.ErrorType | CallsEmptyError | InvalidValidityWindowError | Errors.GlobalErrorType;
128
+ }
129
+ /**
130
+ * Deserializes a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo} from its serialized form.
131
+ *
132
+ * @example
133
+ * ```ts twoslash
134
+ * import { TxEnvelopeTempo } from 'ox/tempo'
135
+ *
136
+ * const envelope = TxEnvelopeTempo.deserialize('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
137
+ * // @log: {
138
+ * // @log: type: 'tempo',
139
+ * // @log: nonce: 785n,
140
+ * // @log: maxFeePerGas: 2000000000n,
141
+ * // @log: gas: 1000000n,
142
+ * // @log: calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
143
+ * // @log: }
144
+ * ```
145
+ *
146
+ * @param serialized - The serialized transaction.
147
+ * @returns Deserialized Transaction Envelope.
148
+ */
149
+ export declare function deserialize(serialized: Serialized): Compute<TxEnvelopeTempo>;
150
+ export declare namespace deserialize {
151
+ type ErrorType = Errors.GlobalErrorType;
152
+ }
153
+ /**
154
+ * Converts an arbitrary transaction object into a Tempo Transaction Envelope.
155
+ *
156
+ * Use this to create transaction envelopes with Tempo-specific features like batched calls,
157
+ * fee tokens, access keys, and scheduled execution. Attach a signature using the `signature`
158
+ * option after signing with {@link ox#TxEnvelopeTempo.(getSignPayload:function)}.
159
+ *
160
+ * [Tempo Transaction Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction)
161
+ *
162
+ * @example
163
+ * ```ts twoslash
164
+ * import { Value } from 'ox'
165
+ * import { TxEnvelopeTempo } from 'ox/tempo'
166
+ *
167
+ * const envelope = TxEnvelopeTempo.from({ // [!code focus]
168
+ * chainId: 1, // [!code focus]
169
+ * calls: [{ // [!code focus]
170
+ * data: '0xdeadbeef', // [!code focus]
171
+ * to: '0x0000000000000000000000000000000000000000', // [!code focus]
172
+ * }], // [!code focus]
173
+ * maxFeePerGas: Value.fromGwei('10'), // [!code focus]
174
+ * maxPriorityFeePerGas: Value.fromGwei('1'), // [!code focus]
175
+ * }) // [!code focus]
176
+ * ```
177
+ *
178
+ * @example
179
+ * ### Attaching Signatures
180
+ *
181
+ * It is possible to attach a `signature` to the transaction envelope.
182
+ *
183
+ * ```ts twoslash
184
+ * // @noErrors
185
+ * import { Secp256k1, Value } from 'ox'
186
+ * import { TxEnvelopeTempo } from 'ox/tempo'
187
+ *
188
+ * const envelope = TxEnvelopeTempo.from({
189
+ * chainId: 1,
190
+ * calls: [{
191
+ * data: '0xdeadbeef',
192
+ * to: '0x0000000000000000000000000000000000000000',
193
+ * }],
194
+ * maxFeePerGas: Value.fromGwei('10'),
195
+ * maxPriorityFeePerGas: Value.fromGwei('1'),
196
+ * })
197
+ *
198
+ * const signature = Secp256k1.sign({
199
+ * payload: TxEnvelopeTempo.getSignPayload(envelope),
200
+ * privateKey: '0x...',
201
+ * })
202
+ *
203
+ * const envelope_signed = TxEnvelopeTempo.from(envelope, { // [!code focus]
204
+ * signature, // [!code focus]
205
+ * }) // [!code focus]
206
+ * // @log: {
207
+ * // @log: chainId: 1,
208
+ * // @log: calls: [{ to: '0x0000000000000000000000000000000000000000', value: 1000000000000000000n }],
209
+ * // @log: maxFeePerGas: 10000000000n,
210
+ * // @log: maxPriorityFeePerGas: 1000000000n,
211
+ * // @log: type: 'tempo',
212
+ * // @log: r: 125...n,
213
+ * // @log: s: 642...n,
214
+ * // @log: yParity: 0,
215
+ * // @log: }
216
+ * ```
217
+ *
218
+ * @example
219
+ * ### From Serialized
220
+ *
221
+ * It is possible to instantiate a Tempo Transaction Envelope from a {@link ox#TxEnvelopeTempo.Serialized} value.
222
+ *
223
+ * ```ts twoslash
224
+ * import { TxEnvelopeTempo } from 'ox/tempo'
225
+ *
226
+ * const envelope = TxEnvelopeTempo.from('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
227
+ * // @log: {
228
+ * // @log: chainId: 1,
229
+ * // @log: calls: [{
230
+ * // @log: data: '0xdeadbeef',
231
+ * // @log: to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
232
+ * // @log: }],
233
+ * // @log: maxFeePerGas: 10000000000n,
234
+ * // @log: type: 'tempo',
235
+ * // @log: }
236
+ * ```
237
+ *
238
+ * @param envelope - The transaction object to convert.
239
+ * @param options - Options.
240
+ * @returns A Tempo Transaction Envelope.
241
+ */
242
+ export declare function from<const envelope extends UnionPartialBy<TxEnvelopeTempo, 'type'> | Serialized, const signature extends SignatureEnvelope.from.Value | undefined = undefined>(envelope: envelope | UnionPartialBy<TxEnvelopeTempo, 'type'> | Serialized, options?: from.Options<signature>): from.ReturnValue<envelope, signature>;
243
+ export declare namespace from {
244
+ type Options<signature extends SignatureEnvelope.from.Value | undefined = undefined> = {
245
+ feePayerSignature?: Signature.Signature | null | undefined;
246
+ signature?: signature | SignatureEnvelope.from.Value | undefined;
247
+ };
248
+ type ReturnValue<envelope extends UnionPartialBy<TxEnvelopeTempo, 'type'> | Hex.Hex = TxEnvelopeTempo | Hex.Hex, signature extends SignatureEnvelope.from.Value | undefined = undefined> = Compute<envelope extends Hex.Hex ? TxEnvelopeTempo : Assign<envelope, (signature extends SignatureEnvelope.from.Value ? {
249
+ signature: SignatureEnvelope.from.ReturnValue<signature>;
250
+ } : {}) & {
251
+ readonly type: 'tempo';
252
+ }>>;
253
+ type ErrorType = deserialize.ErrorType | assert.ErrorType | Errors.GlobalErrorType;
254
+ }
255
+ /**
256
+ * Serializes a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}.
257
+ *
258
+ * RLP-encodes the transaction with type prefix `0x76`. For fee sponsorship, use `format: 'feePayer'`
259
+ * to serialize with the fee payer magic `0x78` and the sender address.
260
+ *
261
+ * [RLP Encoding](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#rlp-encoding)
262
+ *
263
+ * @example
264
+ * ```ts twoslash
265
+ * // @noErrors
266
+ * import { Value } from 'ox'
267
+ * import { TxEnvelopeTempo } from 'ox/tempo'
268
+ *
269
+ * const envelope = TxEnvelopeTempo.from({
270
+ * chainId: 1,
271
+ * calls: [{
272
+ * data: '0xdeadbeef',
273
+ * to: '0x0000000000000000000000000000000000000000',
274
+ * }],
275
+ * maxFeePerGas: Value.fromGwei('10'),
276
+ * })
277
+ *
278
+ * const serialized = TxEnvelopeTempo.serialize(envelope) // [!code focus]
279
+ * ```
280
+ *
281
+ * @example
282
+ * ### Attaching Signatures
283
+ *
284
+ * It is possible to attach a `signature` to the serialized Transaction Envelope.
285
+ *
286
+ * ```ts twoslash
287
+ * // @noErrors
288
+ * import { Secp256k1, Value } from 'ox'
289
+ * import { TxEnvelopeTempo } from 'ox/tempo'
290
+ *
291
+ * const envelope = TxEnvelopeTempo.from({
292
+ * chainId: 1,
293
+ * calls: [{
294
+ * data: '0xdeadbeef',
295
+ * to: '0x0000000000000000000000000000000000000000',
296
+ * }],
297
+ * maxFeePerGas: Value.fromGwei('10'),
298
+ * })
299
+ *
300
+ * const signature = Secp256k1.sign({
301
+ * payload: TxEnvelopeTempo.getSignPayload(envelope),
302
+ * privateKey: '0x...',
303
+ * })
304
+ *
305
+ * const serialized = TxEnvelopeTempo.serialize(envelope, { // [!code focus]
306
+ * signature, // [!code focus]
307
+ * }) // [!code focus]
308
+ *
309
+ * // ... send `serialized` transaction to JSON-RPC `eth_sendRawTransaction`
310
+ * ```
311
+ *
312
+ * @param envelope - The Transaction Envelope to serialize.
313
+ * @param options - Options.
314
+ * @returns The serialized Transaction Envelope.
315
+ */
316
+ export declare function serialize(envelope: PartialBy<TxEnvelopeTempo, 'type'>, options?: serialize.Options): Serialized;
317
+ export declare namespace serialize {
318
+ type Options = {
319
+ /**
320
+ * Sender signature to append to the serialized envelope.
321
+ */
322
+ signature?: SignatureEnvelope.from.Value | undefined;
323
+ } & OneOf<{
324
+ /**
325
+ * Sender address to cover the fee of.
326
+ */
327
+ sender: Address.Address;
328
+ /**
329
+ * Whether to serialize the transaction in the fee payer format.
330
+ *
331
+ * - If `'feePayer'`, then the transaction will be serialized in the fee payer format.
332
+ * - If `undefined` (default), then the transaction will be serialized in the normal format.
333
+ */
334
+ format: 'feePayer';
335
+ } | {
336
+ /**
337
+ * Fee payer signature or the sender to cover the fee of.
338
+ *
339
+ * - If `Signature.Signature`, then this is the fee payer signature.
340
+ * - If `null`, then this indicates the envelope is intended to be signed by a fee payer.
341
+ */
342
+ feePayerSignature?: Signature.Signature | null | undefined;
343
+ format?: undefined;
344
+ }>;
345
+ type ErrorType = assert.ErrorType | Hex.fromNumber.ErrorType | Signature.toTuple.ErrorType | Hex.concat.ErrorType | Rlp.fromHex.ErrorType | Errors.GlobalErrorType;
346
+ }
347
+ /**
348
+ * Returns the payload to sign for a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}.
349
+ *
350
+ * Computes the keccak256 hash of the unsigned serialized transaction. Sign this payload
351
+ * with secp256k1, P256, or WebAuthn, then attach the signature via {@link ox#TxEnvelopeTempo.(from:function)}.
352
+ *
353
+ * [Tempo Transaction Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction)
354
+ *
355
+ * @example
356
+ * The example below demonstrates how to compute the sign payload which can be used
357
+ * with ECDSA signing utilities like {@link ox#Secp256k1.(sign:function)}.
358
+ *
359
+ * ```ts twoslash
360
+ * // @noErrors
361
+ * import { Secp256k1 } from 'ox'
362
+ * import { TxEnvelopeTempo } from 'ox/tempo'
363
+ *
364
+ * const envelope = TxEnvelopeTempo.from({
365
+ * chainId: 1,
366
+ * calls: [{
367
+ * data: '0xdeadbeef',
368
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
369
+ * }],
370
+ * nonce: 0n,
371
+ * maxFeePerGas: 1000000000n,
372
+ * gas: 21000n,
373
+ * })
374
+ *
375
+ * const payload = TxEnvelopeTempo.getSignPayload(envelope) // [!code focus]
376
+ * // @log: '0x...'
377
+ *
378
+ * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
379
+ * ```
380
+ *
381
+ * @param envelope - The transaction envelope to get the sign payload for.
382
+ * @returns The sign payload.
383
+ */
384
+ export declare function getSignPayload(envelope: TxEnvelopeTempo): getSignPayload.ReturnValue;
385
+ export declare namespace getSignPayload {
386
+ type ReturnValue = Hex.Hex;
387
+ type ErrorType = hash.ErrorType | Errors.GlobalErrorType;
388
+ }
389
+ /**
390
+ * Hashes a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}. This is the "transaction hash".
391
+ *
392
+ * @example
393
+ * ```ts twoslash
394
+ * // @noErrors
395
+ * import { Secp256k1 } from 'ox'
396
+ * import { TxEnvelopeTempo } from 'ox/tempo'
397
+ *
398
+ * const envelope = TxEnvelopeTempo.from({
399
+ * chainId: 1,
400
+ * calls: [{
401
+ * data: '0xdeadbeef',
402
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
403
+ * }],
404
+ * nonce: 0n,
405
+ * maxFeePerGas: 1000000000n,
406
+ * gas: 21000n,
407
+ * })
408
+ *
409
+ * const signature = Secp256k1.sign({
410
+ * payload: TxEnvelopeTempo.getSignPayload(envelope),
411
+ * privateKey: '0x...'
412
+ * })
413
+ *
414
+ * const envelope_signed = TxEnvelopeTempo.from(envelope, { signature })
415
+ *
416
+ * const hash = TxEnvelopeTempo.hash(envelope_signed) // [!code focus]
417
+ * ```
418
+ *
419
+ * @param envelope - The Tempo Transaction Envelope to hash.
420
+ * @param options - Options.
421
+ * @returns The hash of the transaction envelope.
422
+ */
423
+ export declare function hash<presign extends boolean = false>(envelope: TxEnvelopeTempo<presign extends true ? false : true>, options?: hash.Options<presign>): hash.ReturnValue;
424
+ export declare namespace hash {
425
+ type Options<presign extends boolean = false> = {
426
+ /**
427
+ * Whether to hash this transaction for signing.
428
+ *
429
+ * @default false
430
+ */
431
+ presign?: presign | boolean | undefined;
432
+ };
433
+ type ReturnValue = Hex.Hex;
434
+ type ErrorType = Hash.keccak256.ErrorType | serialize.ErrorType | Errors.GlobalErrorType;
435
+ }
436
+ /**
437
+ * Returns the fee payer payload to sign for a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}.
438
+ *
439
+ * Fee sponsorship uses a dual-signature scheme: the sender signs the transaction, then a fee payer
440
+ * signs over the transaction with the sender's address to commit to paying fees. The fee payer's
441
+ * signature includes the `feeToken` and `sender_address`, using magic byte `0x78` for domain separation.
442
+ *
443
+ * [Fee Payer Signature](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#fee-payer-signature)
444
+ * [Fee Sponsorship Guide](https://docs.tempo.xyz/protocol/transactions#fee-sponsorship)
445
+ *
446
+ * @example
447
+ * ```ts twoslash
448
+ * // @noErrors
449
+ * import { Secp256k1 } from 'ox'
450
+ * import { TxEnvelopeTempo } from 'ox/tempo'
451
+ *
452
+ * const envelope = TxEnvelopeTempo.from({
453
+ * chainId: 1,
454
+ * calls: [{
455
+ * data: '0xdeadbeef',
456
+ * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
457
+ * }],
458
+ * nonce: 0n,
459
+ * maxFeePerGas: 1000000000n,
460
+ * gas: 21000n,
461
+ * })
462
+ *
463
+ * const payload = TxEnvelopeTempo.getFeePayerSignPayload(envelope, {
464
+ * sender: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
465
+ * }) // [!code focus]
466
+ * // @log: '0x...'
467
+ *
468
+ * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
469
+ * ```
470
+ *
471
+ * @param envelope - The transaction envelope to get the fee payer sign payload for.
472
+ * @param options - Options.
473
+ * @returns The fee payer sign payload.
474
+ */
475
+ export declare function getFeePayerSignPayload(envelope: TxEnvelopeTempo, options: getFeePayerSignPayload.Options): getFeePayerSignPayload.ReturnValue;
476
+ export declare namespace getFeePayerSignPayload {
477
+ type Options = {
478
+ /**
479
+ * Sender address to cover the fee of.
480
+ */
481
+ sender: Address.Address;
482
+ };
483
+ type ReturnValue = Hex.Hex;
484
+ type ErrorType = hash.ErrorType | Errors.GlobalErrorType;
485
+ }
486
+ /**
487
+ * Validates a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}. Returns `true` if the envelope is valid, `false` otherwise.
488
+ *
489
+ * @example
490
+ * ```ts twoslash
491
+ * import { TxEnvelopeTempo } from 'ox/tempo'
492
+ *
493
+ * const valid = TxEnvelopeTempo.validate({
494
+ * calls: [{
495
+ * data: '0xdeadbeef',
496
+ * to: '0x0000000000000000000000000000000000000000',
497
+ * }],
498
+ * chainId: 1,
499
+ * maxFeePerGas: 1000000000n,
500
+ * })
501
+ * // @log: true
502
+ * ```
503
+ *
504
+ * @param envelope - The transaction envelope to validate.
505
+ */
506
+ export declare function validate(envelope: PartialBy<TxEnvelopeTempo, 'type'>): boolean;
507
+ export declare namespace validate {
508
+ type ErrorType = Errors.GlobalErrorType;
509
+ }
510
+ /**
511
+ * Thrown when a transaction's calls list is empty.
512
+ *
513
+ * @example
514
+ * ```ts twoslash
515
+ * import { TxEnvelopeTempo } from 'ox/tempo'
516
+ *
517
+ * TxEnvelopeTempo.assert({
518
+ * calls: [],
519
+ * chainId: 1,
520
+ * })
521
+ * // @error: TxEnvelopeTempo.CallsEmptyError: Calls list cannot be empty.
522
+ * ```
523
+ */
524
+ export declare class CallsEmptyError extends Errors.BaseError {
525
+ readonly name = "TxEnvelopeTempo.CallsEmptyError";
526
+ constructor();
527
+ }
528
+ /**
529
+ * Thrown when validBefore is not greater than validAfter.
530
+ *
531
+ * @example
532
+ * ```ts twoslash
533
+ * import { TxEnvelopeTempo } from 'ox/tempo'
534
+ *
535
+ * TxEnvelopeTempo.assert({
536
+ * calls: [{ to: '0x0000000000000000000000000000000000000000' }],
537
+ * chainId: 1,
538
+ * validBefore: 100,
539
+ * validAfter: 200,
540
+ * })
541
+ * // @error: TxEnvelopeTempo.InvalidValidityWindowError: validBefore (100) must be greater than validAfter (200).
542
+ * ```
543
+ */
544
+ export declare class InvalidValidityWindowError extends Errors.BaseError {
545
+ readonly name = "TxEnvelopeTempo.InvalidValidityWindowError";
546
+ constructor({ validBefore, validAfter, }: {
547
+ validBefore: number;
548
+ validAfter: number;
549
+ });
550
+ }
551
+ //# sourceMappingURL=TxEnvelopeTempo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TxEnvelopeTempo.d.ts","sourceRoot":"","sources":["../../tempo/TxEnvelopeTempo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,KAAK,EACL,SAAS,EACT,cAAc,EACf,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AAEjD,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,OAAO,MAAM,cAAc,CAAA;AAEvC;;;;;;GAMG;AACH,MAAM,MAAM,IAAI,CAAC,UAAU,GAAG,MAAM,IAAI;IACtC,iBAAiB;IACjB,I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