signEip3009Authorization builds and signs a real EIP-3009 TransferWithAuthorization payload — ready to send as the eip3009 scheme’s paymentPayload to /verify or /settle, or to hand a merchant directly as an X-PAYMENT header.
Signature
Parameters
Eip3009TokenDomain
Returns — Eip3009SchemePayload
The underlying EIP-712 type
buildEip3009Domain(token: Eip3009TokenDomain) builds the matching EIP-712 domain object ({ name, version, chainId, verifyingContract }) if you need to construct or verify a signature manually rather than through signEip3009Authorization.
Example: custom nonce for idempotency
Security notes
validBeforeis set fromvaliditySeconds(default 5 minutes) — keep this short. A long-lived signed authorization is a bearer instrument until it either expires or is consumed.validAfteris always0in the current implementation (immediately valid).- The signature never leaves the caller’s process during signing — only the final
Eip3009SchemePayload(which includes the signature, not the private key) is transmitted anywhere.
Next steps
Payer Guide
See this used in a full 402 round trip.
API Reference
X402FacilitatorClient and the rest of the type surface.
