Core Concepts
EIP-7702 Delegation
EIP-7702 allows users to delegate transaction execution to a smart contract. This is essential for enabling cross-chain transactions without requiring users to sign multiple transactions. Read more about EIP-7702 here.Intent
An Intent is the parent action which containsChainBatch(es) wherein each ChainBatch is for a specific chain and has many Call(s).
Chain Batch
Each chain involved in a cross-chain transaction requires its own batch with:- Chain ID
- Call data (what to execute)
- Recent block number
Chain Batch
A Chain Batch is the per-chain unit containingcalls and chainId. Each Chain Batch is hashed (via hashChainBatches) to create its hash, which is included in the intent signature.
Setup and Dependencies
Required Dependencies
viem
Used for interacting with EVM chains. Documentationwagmi
Used for wallet management and signing. DocumentationCore Type Definitions

Intent Creation Implementation
This page is the low-level, roll-it-yourself path. For most apps, use the prebuilt
components and hooks (
useSpiceExecution) instead. Even on the manual
path, do not reimplement the intent hashing: import it from @spicenet-io/spiceflow-core.Intent hashing
Import the hashing functions from the SDK rather than hand-rolling them. Two things that changed from older examples: a chain batch is{ chainId, calls } (there is no recentBlock), and the intent
hash includes the signatureType, nbf, and exp values.
Utility Functions
Creating Intent with Chain Batches
Delegation Signing
EIP-7702 Delegation Process
Each chain requires a separate EIP-7702 delegation signature.Produce EIP-7702 authorizations with viem’s
signAuthorization (see the
Native Swap guide), not a custom EIP-712 signTypedData scheme. The delegate
contract differs per chain: read it with getDelegateContract(chainId) from
@spicenet-io/spiceflow-core.