Skip to main content

Module transport

Module transport 

Source
Expand description

Relay transport for fee payer / sponsor support. Relay transport for routing sponsored transactions through a fee payer service.

RelayTransport wraps two transports:

  • a default Tempo RPC transport for ordinary requests and sign-only broadcasts.
  • a sponsor transport for signing or sign-and-relay raw transaction submissions.

When a single eth_sendRawTransaction or eth_sendRawTransactionSync request is submitted, the raw unsigned Tempo AA transaction is locally preflighted. In SponsorshipMode::SignAndRelay it is re-encoded for the fee-payer service and forwarded to the sponsor, which signs, broadcasts, and returns the transaction hash or sync response. In SponsorshipMode::SignOnly the sponsor signs via eth_signRawTransaction, then the signed raw transaction is broadcast through the default transport using the original submission method. Non-transaction requests are forwarded unchanged to the default transport. JSON-RPC batches containing raw transaction submissions are rejected; use Tempo AA native call batching instead.

Sign-and-relay can forward original request headers to the sponsor; sign-only never forwards them to sponsor signing and preserves them only for the final default-transport broadcast.

Structsยง

AuthHeaderTransport ๐Ÿ”’
Transport wrapper that applies a configured authorization header to every request.
RelayConnector
Transport connector that combines default and sponsor relay connectors into a RelayTransport.
RelayTransport
A Tempo transport that routes sponsored eth_sendRawTransaction requests.

Enumsยง

SponsorshipMode
How sponsored raw transactions are handled by RelayTransport.

Constantsยง

SEND_METHODS ๐Ÿ”’
SIGN_METHOD ๐Ÿ”’
SPONSOR_SIGNED_TX_HEX_LEN_SLACK ๐Ÿ”’

Traitsยง

RpcService ๐Ÿ”’

Functionsยง

decode_tempo_aa ๐Ÿ”’
decode_tempo_envelope ๐Ÿ”’
decode_unsigned_tempo_aa ๐Ÿ”’
encode_for_fee_payer_service ๐Ÿ”’
extract_raw_transaction ๐Ÿ”’
recover_tempo_aa_signer ๐Ÿ”’
tx_request ๐Ÿ”’
validate_send_raw_request ๐Ÿ”’
validate_signed_tempo_aa ๐Ÿ”’
validate_sponsor_signed_same_payload ๐Ÿ”’
Validate that the sponsor only replaced the fee-payer signature.
validate_sponsor_signed_tx_len ๐Ÿ”’