Skip to content

feat(tempo): support direct TempoAddress inputs#185

Merged
jxom merged 1 commit intomainfrom
jxom/tempo-address-compat
Mar 5, 2026
Merged

feat(tempo): support direct TempoAddress inputs#185
jxom merged 1 commit intomainfrom
jxom/tempo-address-compat

Conversation

@jxom
Copy link
Member

@jxom jxom commented Mar 5, 2026

Adds support for Tempo bech32m addresses (tempo1... / tempoz1...) across all tempo modules.

Changes

  • TempoAddress: resolve() converts bech32m or hex addresses to hex; Address union type accepts both formats
  • AuthorizationTempo: from() resolves bech32m addresses at input boundary
  • KeyAuthorization: from() resolves address and token limit fields
  • TxEnvelopeTempo: from() resolves calls[].to and from; serialize() resolves before RLP encoding
  • TokenId: fromAddress(), toAddress(), compute() accept bech32m inputs
  • TransactionRequest: toRpc() resolves call addresses
  • Namespace imports (import * as TempoAddress) used consistently
  • Tests use explicit bech32m string literals instead of TempoAddress.format() calls

- Add TempoAddress.resolve() to convert bech32m (tempo1.../tempoz1...) addresses to hex at input boundaries
- Update AuthorizationTempo, KeyAuthorization, TxEnvelopeTempo, TokenId, TransactionRequest to accept TempoAddress inputs
- Resolve addresses in serialize() to ensure RLP encoding receives hex strings
- Use namespace imports (import * as TempoAddress) consistently
- Replace TempoAddress.format() calls in tests with explicit bech32m literals

Amp-Thread-ID: https://ampcode.com/threads/T-019cbba1-87d6-75f0-a887-8361637420ab
Co-authored-by: Amp <amp@ampcode.com>
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ox Ready Ready Preview, Comment Mar 5, 2026 2:03am

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 5, 2026

Open in StackBlitz

npm i https://pkg.pr.new/ox@185

commit: 31bd916

@jxom jxom changed the title feat(tempo): support bech32m TempoAddress format across tempo modules feat(tempo): support direct TempoAddress inputs Mar 5, 2026
@jxom jxom marked this pull request as ready for review March 5, 2026 03:19
@jxom jxom merged commit bae90c8 into main Mar 5, 2026
17 of 19 checks passed
@jxom jxom deleted the jxom/tempo-address-compat branch March 5, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant