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ยง
- Auth
Header ๐Transport - Transport wrapper that applies a configured authorization header to every request.
- Relay
Connector - Transport connector that combines default and sponsor relay connectors into a
RelayTransport. - Relay
Transport - A Tempo transport that routes sponsored
eth_sendRawTransactionrequests.
Enumsยง
- Sponsorship
Mode - 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