Expand description
Tempo session payment provider with expiring nonces.
Custom implementation that mirrors tempoxyz/walletβs approach: uses
expiring nonces (nonce=0, nonceKey=MAX, validBefore=now+25s) for
channel open transactions instead of fetching sequential nonces via
eth_getTransactionCount. This avoids the chicken-and-egg problem when
the RPC endpoint is itself 402-gated.
StructsΒ§
- Session
Provider - Tempo session provider using expiring nonces.
EnumsΒ§
- Pending
Action π - Tracks uncommitted channel state from the most recent payment.
ConstantsΒ§
- EXPIRING_
NONCE_ πKEY - Expiring nonce key (U256::MAX) β matches the charge flow.
- MAX_
FEE_ πPER_ GAS - Max fee per gas (20 gwei β Tempoβs fixed base fee).
- MAX_
PRIORITY_ πFEE_ PER_ GAS - Max priority fee per gas.
- MAX_
PRIORITY_ πFEE_ PER_ GAS_ FEE_ PAYER - Priority fee per gas when the sponsor pays (
feePayer: true). Must stay under the server-enforcedMAX_PRIORITY_FEE_PER_GAS_DEFAULT(10 gwei) defined by the mpp-rsFeePayerPolicy. - SESSION_
OPEN_ πFEE_ PAYER_ GAS_ LIMIT - Gas limit for session open transactions when the sponsor pays
(
feePayer: true). Set to the mpp-rsFeePayerPolicy::max_gasceiling (MAX_FEE_PAYER_GAS_LIMIT = 2_000_000, inclusive); exceeding it causes the sponsor to reject the tx withverification-failed. The previous value of 1M was too tight for Tempo mainnet passkey-walletescrow.open, which together with the innerapproveconsumes ~1.2M gas and ran out of gas on-chain (tx reverted, sponsor returned genericverification-failed). - SESSION_
OPEN_ πGAS_ LIMIT - Default gas limit for session open transactions.
- VALID_
BEFORE_ πSECS - Validity window (in seconds) for expiring nonce transactions.
StaticsΒ§
- GLOBAL_
CHANNELS π - Process-wide channel state registry, keyed by origin URL.
- GLOBAL_
PERSISTED π - Process-wide persisted channel state, shared across ALL origins.
Type AliasesΒ§
- Shared
Channel πState - Shared per-origin in-memory channel state: (channels, precompile descriptors, key_provisioned).