Create EIP-2612 permit signature
Viem wallet client for signing
Viem public client for reading nonce
Token contract address
Spender address (X402Facilitator contract)
Amount to approve
Permit deadline (Unix timestamp)
Chain ID
Permit signature data
const permit = await createPermitSignature( walletClient, publicClient, '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC '0x1234...', // Facilitator address 1000000n, // 1 USDC BigInt(Math.floor(Date.now() / 1000) + 3600), // 1 hour 8453 // Base); Copy
const permit = await createPermitSignature( walletClient, publicClient, '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC '0x1234...', // Facilitator address 1000000n, // 1 USDC BigInt(Math.floor(Date.now() / 1000) + 3600), // 1 hour 8453 // Base);
Create EIP-2612 permit signature