Once you’ve received the payloads from the API, you need to sign them to approve execution.
Quick Start: Copy-Paste Utilities
For TypeScript users: Copy the utilities below directly into your project.Not using TypeScript? Implement your own version following the same logic shown in the code.
How It Works: Three Signature Types
- The API returns an array of payloads to sign.
- In most cases this array has just one item.
- Each item in the payload is one of three signature types (simple, permit, onchain) depending on your execution mode and token support
Simple (Off-chain Message)
What: Signs a raw hex messageWhen: Smart accounts and EIP-7702 delegated EOAs
Result: Off-chain signature
The Magic: Supertx Hash Embedding
For EOA mode, the API cleverly embeds the supertransaction hash into your signatures. This creates a cryptographic link between funding and execution, enabling single-signature cross-chain operations. For Permit: The supertx hash replaces thedeadline
field
Usage by Execution Mode
Signature Requirements:
- One signature per funding token
- Type depends on token support (permit or onchain)
Summary
- Copy the utilities - They handle all signature types automatically
- Get a quote - The API returns the appropriate payload type
- Sign with utilities -
signQuoteSignablePayload()
routes to the right method - Execute - Send signed payloads back to complete the supertransaction