Skip to main content
This server-side example requests one executable partner quote, resolves an ERC-20 approval when needed, refreshes the quote, broadcasts it, and reports the receipt.
.env
This example loads a private key for simplicity. Production systems should use a wallet service, HSM, or user wallet and must keep both the private key and AKKA API key off the client.
swap.ts
Run it with npx tsx swap.ts. For ERC-20 input, change SRC and use that token’s actual decimals when calling parseUnits.