tempo.ts 0.8.2 → 0.9.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 (51) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/ox/KeyAuthorization.d.ts +3 -3
  3. package/dist/ox/KeyAuthorization.js +2 -2
  4. package/dist/ox/Transaction.d.ts +8 -8
  5. package/dist/ox/Transaction.d.ts.map +1 -1
  6. package/dist/ox/Transaction.js +3 -3
  7. package/dist/ox/Transaction.js.map +1 -1
  8. package/dist/ox/{TransactionEnvelopeAA.d.ts → TransactionEnvelopeTempo.d.ts} +70 -70
  9. package/dist/ox/TransactionEnvelopeTempo.d.ts.map +1 -0
  10. package/dist/ox/{TransactionEnvelopeAA.js → TransactionEnvelopeTempo.js} +57 -57
  11. package/dist/ox/TransactionEnvelopeTempo.js.map +1 -0
  12. package/dist/ox/TransactionReceipt.d.ts +3 -3
  13. package/dist/ox/TransactionReceipt.d.ts.map +1 -1
  14. package/dist/ox/TransactionReceipt.js +2 -2
  15. package/dist/ox/TransactionReceipt.js.map +1 -1
  16. package/dist/ox/TransactionRequest.d.ts +1 -1
  17. package/dist/ox/TransactionRequest.d.ts.map +1 -1
  18. package/dist/ox/TransactionRequest.js +2 -2
  19. package/dist/ox/TransactionRequest.js.map +1 -1
  20. package/dist/ox/index.d.ts +1 -1
  21. package/dist/ox/index.d.ts.map +1 -1
  22. package/dist/ox/index.js +1 -1
  23. package/dist/ox/index.js.map +1 -1
  24. package/dist/viem/Chain.d.ts +4 -6
  25. package/dist/viem/Chain.d.ts.map +1 -1
  26. package/dist/viem/Formatters.d.ts +2 -4
  27. package/dist/viem/Formatters.d.ts.map +1 -1
  28. package/dist/viem/Formatters.js +10 -8
  29. package/dist/viem/Formatters.js.map +1 -1
  30. package/dist/viem/Transaction.d.ts +17 -17
  31. package/dist/viem/Transaction.d.ts.map +1 -1
  32. package/dist/viem/Transaction.js +16 -16
  33. package/dist/viem/Transaction.js.map +1 -1
  34. package/dist/viem/internal/types.d.ts +2 -2
  35. package/dist/viem/internal/types.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/src/ox/KeyAuthorization.ts +3 -3
  38. package/src/ox/Transaction.test.ts +6 -6
  39. package/src/ox/Transaction.ts +11 -11
  40. package/src/ox/{TransactionEnvelopeAA.test.ts → TransactionEnvelopeTempo.test.ts} +154 -139
  41. package/src/ox/{TransactionEnvelopeAA.ts → TransactionEnvelopeTempo.ts} +78 -76
  42. package/src/ox/TransactionReceipt.ts +3 -3
  43. package/src/ox/TransactionRequest.ts +3 -3
  44. package/src/ox/e2e.test.ts +79 -70
  45. package/src/ox/index.ts +1 -1
  46. package/src/viem/Formatters.ts +18 -13
  47. package/src/viem/Transaction.ts +43 -40
  48. package/src/viem/e2e.test.ts +14 -14
  49. package/src/viem/internal/types.ts +2 -2
  50. package/dist/ox/TransactionEnvelopeAA.d.ts.map +0 -1
  51. package/dist/ox/TransactionEnvelopeAA.js.map +0 -1
@@ -19,7 +19,7 @@ import * as SignatureEnvelope from './SignatureEnvelope.js'
19
19
  import * as TokenId from './TokenId.js'
20
20
 
21
21
  /**
22
- * Represents a single call within an AA transaction.
22
+ * Represents a single call within a Tempo transaction.
23
23
  */
24
24
  export type Call<bigintType = bigint> = {
25
25
  /** Call data. */
@@ -30,7 +30,7 @@ export type Call<bigintType = bigint> = {
30
30
  value?: bigintType | undefined
31
31
  }
32
32
 
33
- export type TransactionEnvelopeAA<
33
+ export type TransactionEnvelopeTempo<
34
34
  signed extends boolean = boolean,
35
35
  bigintType = bigint,
36
36
  numberType = number,
@@ -93,7 +93,7 @@ export type TransactionEnvelopeAA<
93
93
  })
94
94
  >
95
95
 
96
- export type Rpc<signed extends boolean = boolean> = TransactionEnvelopeAA<
96
+ export type Rpc<signed extends boolean = boolean> = TransactionEnvelopeTempo<
97
97
  signed,
98
98
  Hex.Hex,
99
99
  Hex.Hex,
@@ -105,22 +105,22 @@ export type FeePayerMagic = typeof feePayerMagic
105
105
 
106
106
  export type Serialized = `${SerializedType}${string}`
107
107
 
108
- export type Signed = TransactionEnvelopeAA<true>
108
+ export type Signed = TransactionEnvelopeTempo<true>
109
109
 
110
110
  export const serializedType = '0x76' as const
111
111
  export type SerializedType = typeof serializedType
112
112
 
113
- export const type = 'aa' as const
113
+ export const type = 'tempo' as const
114
114
  export type Type = typeof type
115
115
 
116
116
  /**
117
- * Asserts a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA} is valid.
117
+ * Asserts a {@link ox#TransactionEnvelopeTempo.TransactionEnvelopeTempo} is valid.
118
118
  *
119
119
  * @example
120
120
  * ```ts twoslash
121
- * import { TransactionEnvelopeAA } from 'ox/tempo'
121
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
122
122
  *
123
- * TransactionEnvelopeAA.assert({
123
+ * TransactionEnvelopeTempo.assert({
124
124
  * calls: [{ to: '0x0000000000000000000000000000000000000000', value: 0n }],
125
125
  * chainId: 1,
126
126
  * maxFeePerGas: 1000000000n,
@@ -129,7 +129,7 @@ export type Type = typeof type
129
129
  *
130
130
  * @param envelope - The transaction envelope to assert.
131
131
  */
132
- export function assert(envelope: PartialBy<TransactionEnvelopeAA, 'type'>) {
132
+ export function assert(envelope: PartialBy<TransactionEnvelopeTempo, 'type'>) {
133
133
  const {
134
134
  calls,
135
135
  chainId,
@@ -189,15 +189,15 @@ export declare namespace assert {
189
189
  }
190
190
 
191
191
  /**
192
- * Deserializes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA} from its serialized form.
192
+ * Deserializes a {@link ox#TransactionEnvelopeTempo.TransactionEnvelopeTempo} from its serialized form.
193
193
  *
194
194
  * @example
195
195
  * ```ts twoslash
196
- * import { TransactionEnvelopeAA } from 'ox/tempo'
196
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
197
197
  *
198
- * const envelope = TransactionEnvelopeAA.deserialize('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
198
+ * const envelope = TransactionEnvelopeTempo.deserialize('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
199
199
  * // @log: {
200
- * // @log: type: 'aa',
200
+ * // @log: type: 'tempo',
201
201
  * // @log: nonce: 785n,
202
202
  * // @log: maxFeePerGas: 2000000000n,
203
203
  * // @log: gas: 1000000n,
@@ -210,7 +210,7 @@ export declare namespace assert {
210
210
  */
211
211
  export function deserialize(
212
212
  serialized: Serialized,
213
- ): Compute<TransactionEnvelopeAA> {
213
+ ): Compute<TransactionEnvelopeTempo> {
214
214
  const transactionArray = Rlp.toHex(Hex.slice(serialized, 1))
215
215
 
216
216
  const [
@@ -273,7 +273,7 @@ export function deserialize(
273
273
  let transaction = {
274
274
  chainId: Number(chainId),
275
275
  type,
276
- } as TransactionEnvelopeAA
276
+ } as TransactionEnvelopeTempo
277
277
 
278
278
  if (Hex.validate(gas) && gas !== '0x') transaction.gas = BigInt(gas)
279
279
  if (Hex.validate(nonce))
@@ -346,14 +346,14 @@ export declare namespace deserialize {
346
346
  }
347
347
 
348
348
  /**
349
- * Converts an arbitrary transaction object into an AA Transaction Envelope.
349
+ * Converts an arbitrary transaction object into a Tempo Transaction Envelope.
350
350
  *
351
351
  * @example
352
352
  * ```ts twoslash
353
353
  * import { Value } from 'ox'
354
- * import { TransactionEnvelopeAA } from 'ox/tempo'
354
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
355
355
  *
356
- * const envelope = TransactionEnvelopeAA.from({ // [!code focus]
356
+ * const envelope = TransactionEnvelopeTempo.from({ // [!code focus]
357
357
  * chainId: 1, // [!code focus]
358
358
  * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }], // [!code focus]
359
359
  * maxFeePerGas: Value.fromGwei('10'), // [!code focus]
@@ -369,9 +369,9 @@ export declare namespace deserialize {
369
369
  * ```ts twoslash
370
370
  * // @noErrors
371
371
  * import { Secp256k1, Value } from 'ox'
372
- * import { TransactionEnvelopeAA } from 'ox/tempo'
372
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
373
373
  *
374
- * const envelope = TransactionEnvelopeAA.from({
374
+ * const envelope = TransactionEnvelopeTempo.from({
375
375
  * chainId: 1,
376
376
  * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
377
377
  * maxFeePerGas: Value.fromGwei('10'),
@@ -379,11 +379,11 @@ export declare namespace deserialize {
379
379
  * })
380
380
  *
381
381
  * const signature = Secp256k1.sign({
382
- * payload: TransactionEnvelopeAA.getSignPayload(envelope),
382
+ * payload: TransactionEnvelopeTempo.getSignPayload(envelope),
383
383
  * privateKey: '0x...',
384
384
  * })
385
385
  *
386
- * const envelope_signed = TransactionEnvelopeAA.from(envelope, { // [!code focus]
386
+ * const envelope_signed = TransactionEnvelopeTempo.from(envelope, { // [!code focus]
387
387
  * signature, // [!code focus]
388
388
  * }) // [!code focus]
389
389
  * // @log: {
@@ -391,7 +391,7 @@ export declare namespace deserialize {
391
391
  * // @log: calls: [{ to: '0x0000000000000000000000000000000000000000', value: 1000000000000000000n }],
392
392
  * // @log: maxFeePerGas: 10000000000n,
393
393
  * // @log: maxPriorityFeePerGas: 1000000000n,
394
- * // @log: type: 'aa',
394
+ * // @log: type: 'tempo',
395
395
  * // @log: r: 125...n,
396
396
  * // @log: s: 642...n,
397
397
  * // @log: yParity: 0,
@@ -401,27 +401,27 @@ export declare namespace deserialize {
401
401
  * @example
402
402
  * ### From Serialized
403
403
  *
404
- * It is possible to instantiate an AA Transaction Envelope from a {@link ox#TransactionEnvelopeAA.Serialized} value.
404
+ * It is possible to instantiate a Tempo Transaction Envelope from a {@link ox#TransactionEnvelopeTempo.Serialized} value.
405
405
  *
406
406
  * ```ts twoslash
407
- * import { TransactionEnvelopeAA } from 'ox/tempo'
407
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
408
408
  *
409
- * const envelope = TransactionEnvelopeAA.from('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
409
+ * const envelope = TransactionEnvelopeTempo.from('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')
410
410
  * // @log: {
411
411
  * // @log: chainId: 1,
412
412
  * // @log: calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
413
413
  * // @log: maxFeePerGas: 10000000000n,
414
- * // @log: type: 'aa',
414
+ * // @log: type: 'tempo',
415
415
  * // @log: }
416
416
  * ```
417
417
  *
418
418
  * @param envelope - The transaction object to convert.
419
419
  * @param options - Options.
420
- * @returns An AA Transaction Envelope.
420
+ * @returns A Tempo Transaction Envelope.
421
421
  */
422
422
  export function from<
423
423
  const envelope extends
424
- | UnionPartialBy<TransactionEnvelopeAA, 'type'>
424
+ | UnionPartialBy<TransactionEnvelopeTempo, 'type'>
425
425
  | Serialized,
426
426
  const signature extends
427
427
  | SignatureEnvelope.SignatureEnvelope
@@ -429,7 +429,7 @@ export function from<
429
429
  >(
430
430
  envelope:
431
431
  | envelope
432
- | UnionPartialBy<TransactionEnvelopeAA, 'type'>
432
+ | UnionPartialBy<TransactionEnvelopeTempo, 'type'>
433
433
  | Serialized,
434
434
  options: from.Options<signature> = {},
435
435
  ): from.ReturnValue<envelope, signature> {
@@ -437,7 +437,7 @@ export function from<
437
437
 
438
438
  const envelope_ = (
439
439
  typeof envelope === 'string' ? deserialize(envelope) : envelope
440
- ) as TransactionEnvelopeAA
440
+ ) as TransactionEnvelopeTempo
441
441
 
442
442
  assert(envelope_)
443
443
 
@@ -447,7 +447,7 @@ export function from<
447
447
  ...(feePayerSignature
448
448
  ? { feePayerSignature: Signature.from(feePayerSignature) }
449
449
  : {}),
450
- type: 'aa',
450
+ type: 'tempo',
451
451
  } as never
452
452
  }
453
453
 
@@ -462,21 +462,21 @@ export declare namespace from {
462
462
  }
463
463
 
464
464
  type ReturnValue<
465
- envelope extends UnionPartialBy<TransactionEnvelopeAA, 'type'> | Hex.Hex =
466
- | TransactionEnvelopeAA
467
- | Hex.Hex,
465
+ envelope extends
466
+ | UnionPartialBy<TransactionEnvelopeTempo, 'type'>
467
+ | Hex.Hex = TransactionEnvelopeTempo | Hex.Hex,
468
468
  signature extends
469
469
  | SignatureEnvelope.SignatureEnvelope
470
470
  | undefined = undefined,
471
471
  > = Compute<
472
472
  envelope extends Hex.Hex
473
- ? TransactionEnvelopeAA
473
+ ? TransactionEnvelopeTempo
474
474
  : Assign<
475
475
  envelope,
476
476
  (signature extends SignatureEnvelope.SignatureEnvelope
477
477
  ? { signature: SignatureEnvelope.from.ReturnValue<signature> }
478
478
  : {}) & {
479
- readonly type: 'aa'
479
+ readonly type: 'tempo'
480
480
  }
481
481
  >
482
482
  >
@@ -488,21 +488,21 @@ export declare namespace from {
488
488
  }
489
489
 
490
490
  /**
491
- * Serializes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
491
+ * Serializes a {@link ox#TransactionEnvelopeTempo.TransactionEnvelopeTempo}.
492
492
  *
493
493
  * @example
494
494
  * ```ts twoslash
495
495
  * // @noErrors
496
496
  * import { Value } from 'ox'
497
- * import { TransactionEnvelopeAA } from 'ox/tempo'
497
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
498
498
  *
499
- * const envelope = TransactionEnvelopeAA.from({
499
+ * const envelope = TransactionEnvelopeTempo.from({
500
500
  * chainId: 1,
501
501
  * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
502
502
  * maxFeePerGas: Value.fromGwei('10'),
503
503
  * })
504
504
  *
505
- * const serialized = TransactionEnvelopeAA.serialize(envelope) // [!code focus]
505
+ * const serialized = TransactionEnvelopeTempo.serialize(envelope) // [!code focus]
506
506
  * ```
507
507
  *
508
508
  * @example
@@ -513,20 +513,20 @@ export declare namespace from {
513
513
  * ```ts twoslash
514
514
  * // @noErrors
515
515
  * import { Secp256k1, Value } from 'ox'
516
- * import { TransactionEnvelopeAA } from 'ox/tempo'
516
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
517
517
  *
518
- * const envelope = TransactionEnvelopeAA.from({
518
+ * const envelope = TransactionEnvelopeTempo.from({
519
519
  * chainId: 1,
520
520
  * calls: [{ to: '0x0000000000000000000000000000000000000000', value: Value.fromEther('1') }],
521
521
  * maxFeePerGas: Value.fromGwei('10'),
522
522
  * })
523
523
  *
524
524
  * const signature = Secp256k1.sign({
525
- * payload: TransactionEnvelopeAA.getSignPayload(envelope),
525
+ * payload: TransactionEnvelopeTempo.getSignPayload(envelope),
526
526
  * privateKey: '0x...',
527
527
  * })
528
528
  *
529
- * const serialized = TransactionEnvelopeAA.serialize(envelope, { // [!code focus]
529
+ * const serialized = TransactionEnvelopeTempo.serialize(envelope, { // [!code focus]
530
530
  * signature, // [!code focus]
531
531
  * }) // [!code focus]
532
532
  *
@@ -538,7 +538,7 @@ export declare namespace from {
538
538
  * @returns The serialized Transaction Envelope.
539
539
  */
540
540
  export function serialize(
541
- envelope: PartialBy<TransactionEnvelopeAA, 'type'>,
541
+ envelope: PartialBy<TransactionEnvelopeTempo, 'type'>,
542
542
  options: serialize.Options = {},
543
543
  ): Serialized {
544
544
  const {
@@ -649,7 +649,7 @@ export declare namespace serialize {
649
649
  }
650
650
 
651
651
  /**
652
- * Returns the payload to sign for a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
652
+ * Returns the payload to sign for a {@link ox#TransactionEnvelopeTempo.TransactionEnvelopeTempo}.
653
653
  *
654
654
  * @example
655
655
  * The example below demonstrates how to compute the sign payload which can be used
@@ -658,9 +658,9 @@ export declare namespace serialize {
658
658
  * ```ts twoslash
659
659
  * // @noErrors
660
660
  * import { Secp256k1 } from 'ox'
661
- * import { TransactionEnvelopeAA } from 'ox/tempo'
661
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
662
662
  *
663
- * const envelope = TransactionEnvelopeAA.from({
663
+ * const envelope = TransactionEnvelopeTempo.from({
664
664
  * chainId: 1,
665
665
  * calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
666
666
  * nonce: 0n,
@@ -668,7 +668,7 @@ export declare namespace serialize {
668
668
  * gas: 21000n,
669
669
  * })
670
670
  *
671
- * const payload = TransactionEnvelopeAA.getSignPayload(envelope) // [!code focus]
671
+ * const payload = TransactionEnvelopeTempo.getSignPayload(envelope) // [!code focus]
672
672
  * // @log: '0x...'
673
673
  *
674
674
  * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
@@ -678,7 +678,7 @@ export declare namespace serialize {
678
678
  * @returns The sign payload.
679
679
  */
680
680
  export function getSignPayload(
681
- envelope: TransactionEnvelopeAA,
681
+ envelope: TransactionEnvelopeTempo,
682
682
  ): getSignPayload.ReturnValue {
683
683
  return hash(envelope, { presign: true })
684
684
  }
@@ -690,15 +690,15 @@ export declare namespace getSignPayload {
690
690
  }
691
691
 
692
692
  /**
693
- * Hashes a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}. This is the "transaction hash".
693
+ * Hashes a {@link ox#TransactionEnvelopeTempo.TransactionEnvelopeTempo}. This is the "transaction hash".
694
694
  *
695
695
  * @example
696
696
  * ```ts twoslash
697
697
  * // @noErrors
698
698
  * import { Secp256k1 } from 'ox'
699
- * import { TransactionEnvelopeAA } from 'ox/tempo'
699
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
700
700
  *
701
- * const envelope = TransactionEnvelopeAA.from({
701
+ * const envelope = TransactionEnvelopeTempo.from({
702
702
  * chainId: 1,
703
703
  * calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
704
704
  * nonce: 0n,
@@ -707,21 +707,21 @@ export declare namespace getSignPayload {
707
707
  * })
708
708
  *
709
709
  * const signature = Secp256k1.sign({
710
- * payload: TransactionEnvelopeAA.getSignPayload(envelope),
710
+ * payload: TransactionEnvelopeTempo.getSignPayload(envelope),
711
711
  * privateKey: '0x...'
712
712
  * })
713
713
  *
714
- * const envelope_signed = TransactionEnvelopeAA.from(envelope, { signature })
714
+ * const envelope_signed = TransactionEnvelopeTempo.from(envelope, { signature })
715
715
  *
716
- * const hash = TransactionEnvelopeAA.hash(envelope_signed) // [!code focus]
716
+ * const hash = TransactionEnvelopeTempo.hash(envelope_signed) // [!code focus]
717
717
  * ```
718
718
  *
719
- * @param envelope - The AA Transaction Envelope to hash.
719
+ * @param envelope - The Tempo Transaction Envelope to hash.
720
720
  * @param options - Options.
721
721
  * @returns The hash of the transaction envelope.
722
722
  */
723
723
  export function hash<presign extends boolean = false>(
724
- envelope: TransactionEnvelopeAA<presign extends true ? false : true>,
724
+ envelope: TransactionEnvelopeTempo<presign extends true ? false : true>,
725
725
  options: hash.Options<presign> = {},
726
726
  ): hash.ReturnValue {
727
727
  const serialized = serialize({
@@ -754,15 +754,15 @@ export declare namespace hash {
754
754
  }
755
755
 
756
756
  /**
757
- * Returns the fee payer payload to sign for a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}.
757
+ * Returns the fee payer payload to sign for a {@link ox#TransactionEnvelopeTempo.TransactionEnvelopeTempo}.
758
758
  *
759
759
  * @example
760
760
  * ```ts twoslash
761
761
  * // @noErrors
762
762
  * import { Secp256k1 } from 'ox'
763
- * import { TransactionEnvelopeAA } from 'ox/tempo'
763
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
764
764
  *
765
- * const envelope = TransactionEnvelopeAA.from({
765
+ * const envelope = TransactionEnvelopeTempo.from({
766
766
  * chainId: 1,
767
767
  * calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],
768
768
  * nonce: 0n,
@@ -770,7 +770,7 @@ export declare namespace hash {
770
770
  * gas: 21000n,
771
771
  * })
772
772
  *
773
- * const payload = TransactionEnvelopeAA.getFeePayerSignPayload(envelope, {
773
+ * const payload = TransactionEnvelopeTempo.getFeePayerSignPayload(envelope, {
774
774
  * sender: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
775
775
  * }) // [!code focus]
776
776
  * // @log: '0x...'
@@ -783,7 +783,7 @@ export declare namespace hash {
783
783
  * @returns The fee payer sign payload.
784
784
  */
785
785
  export function getFeePayerSignPayload(
786
- envelope: TransactionEnvelopeAA,
786
+ envelope: TransactionEnvelopeTempo,
787
787
  options: getFeePayerSignPayload.Options,
788
788
  ): getFeePayerSignPayload.ReturnValue {
789
789
  const { sender } = options
@@ -811,13 +811,13 @@ export declare namespace getFeePayerSignPayload {
811
811
  }
812
812
 
813
813
  /**
814
- * Validates a {@link ox#TransactionEnvelopeAA.TransactionEnvelopeAA}. Returns `true` if the envelope is valid, `false` otherwise.
814
+ * Validates a {@link ox#TransactionEnvelopeTempo.TransactionEnvelopeTempo}. Returns `true` if the envelope is valid, `false` otherwise.
815
815
  *
816
816
  * @example
817
817
  * ```ts twoslash
818
- * import { TransactionEnvelopeAA } from 'ox/tempo'
818
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
819
819
  *
820
- * const valid = TransactionEnvelopeAA.validate({
820
+ * const valid = TransactionEnvelopeTempo.validate({
821
821
  * calls: [{ to: '0x0000000000000000000000000000000000000000', value: 0n }],
822
822
  * chainId: 1,
823
823
  * maxFeePerGas: 1000000000n,
@@ -827,7 +827,9 @@ export declare namespace getFeePayerSignPayload {
827
827
  *
828
828
  * @param envelope - The transaction envelope to validate.
829
829
  */
830
- export function validate(envelope: PartialBy<TransactionEnvelopeAA, 'type'>) {
830
+ export function validate(
831
+ envelope: PartialBy<TransactionEnvelopeTempo, 'type'>,
832
+ ) {
831
833
  try {
832
834
  assert(envelope)
833
835
  return true
@@ -845,17 +847,17 @@ export declare namespace validate {
845
847
  *
846
848
  * @example
847
849
  * ```ts twoslash
848
- * import { TransactionEnvelopeAA } from 'ox/tempo'
850
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
849
851
  *
850
- * TransactionEnvelopeAA.assert({
852
+ * TransactionEnvelopeTempo.assert({
851
853
  * calls: [],
852
854
  * chainId: 1,
853
855
  * })
854
- * // @error: TransactionEnvelopeAA.CallsEmptyError: Calls list cannot be empty.
856
+ * // @error: TransactionEnvelopeTempo.CallsEmptyError: Calls list cannot be empty.
855
857
  * ```
856
858
  */
857
859
  export class CallsEmptyError extends Errors.BaseError {
858
- override readonly name = 'TransactionEnvelopeAA.CallsEmptyError'
860
+ override readonly name = 'TransactionEnvelopeTempo.CallsEmptyError'
859
861
  constructor() {
860
862
  super('Calls list cannot be empty.')
861
863
  }
@@ -866,19 +868,19 @@ export class CallsEmptyError extends Errors.BaseError {
866
868
  *
867
869
  * @example
868
870
  * ```ts twoslash
869
- * import { TransactionEnvelopeAA } from 'ox/tempo'
871
+ * import { TransactionEnvelopeTempo } from 'ox/tempo'
870
872
  *
871
- * TransactionEnvelopeAA.assert({
873
+ * TransactionEnvelopeTempo.assert({
872
874
  * calls: [{ to: '0x0000000000000000000000000000000000000000' }],
873
875
  * chainId: 1,
874
876
  * validBefore: 100n,
875
877
  * validAfter: 200n,
876
878
  * })
877
- * // @error: TransactionEnvelopeAA.InvalidValidityWindowError: validBefore (100) must be greater than validAfter (200).
879
+ * // @error: TransactionEnvelopeTempo.InvalidValidityWindowError: validBefore (100) must be greater than validAfter (200).
878
880
  * ```
879
881
  */
880
882
  export class InvalidValidityWindowError extends Errors.BaseError {
881
- override readonly name = 'TransactionEnvelopeAA.InvalidValidityWindowError'
883
+ override readonly name = 'TransactionEnvelopeTempo.InvalidValidityWindowError'
882
884
  constructor({
883
885
  validBefore,
884
886
  validAfter,
@@ -29,7 +29,7 @@ export type Rpc = TransactionReceipt<
29
29
  Hex.Hex
30
30
  >
31
31
 
32
- export type Type = 'aa' | ox_TransactionReceipt.Type
32
+ export type Type = 'tempo' | ox_TransactionReceipt.Type
33
33
 
34
34
  export type RpcType = '0x76' | ox_TransactionReceipt.RpcType
35
35
 
@@ -40,13 +40,13 @@ export type RpcStatus = ox_TransactionReceipt.RpcStatus
40
40
  /** RPC type to type mapping. */
41
41
  export const fromRpcType = {
42
42
  ...ox_TransactionReceipt.fromRpcType,
43
- '0x76': 'aa',
43
+ '0x76': 'tempo',
44
44
  } as const
45
45
 
46
46
  /** Type to RPC type mapping. */
47
47
  export const toRpcType = {
48
48
  ...ox_TransactionReceipt.toRpcType,
49
- aa: '0x76',
49
+ tempo: '0x76',
50
50
  } as const
51
51
 
52
52
  /**
@@ -6,7 +6,7 @@ import type { Compute } from '../internal/types.js'
6
6
  import * as KeyAuthorization from './KeyAuthorization.js'
7
7
  import * as TokenId from './TokenId.js'
8
8
  import * as Transaction from './Transaction.js'
9
- import type { Call } from './TransactionEnvelopeAA.js'
9
+ import type { Call } from './TransactionEnvelopeTempo.js'
10
10
 
11
11
  type KeyType = 'secp256k1' | 'p256' | 'webAuthn'
12
12
 
@@ -113,9 +113,9 @@ export function toRpc(request: TransactionRequest): Rpc {
113
113
  typeof request.feeToken !== 'undefined' ||
114
114
  typeof request.validBefore !== 'undefined' ||
115
115
  typeof request.validAfter !== 'undefined' ||
116
- request.type === 'aa'
116
+ request.type === 'tempo'
117
117
  ) {
118
- request_rpc.type = Transaction.toRpcType.aa
118
+ request_rpc.type = Transaction.toRpcType.tempo
119
119
  delete request_rpc.data
120
120
  delete request_rpc.input
121
121
  delete request_rpc.to