Skip to main content
AKKA’s recommended wagmi flow uses GET /partner/v1/{chainId}/quote for both price display and transaction construction. The endpoint returns the payer checks, approval target, expiry, simulation status, and transaction together.

Install and configure

config.ts

Protect the API key

Do not put the partner API key in NEXT_PUBLIC_* variables. Add the backend proxy and fetchPartnerQuote helper from the React Hooks guide. Your UI calls /api/akka/quote; only your server calls AKKA with the apikey header.

Complete swap component

The reusable hook handles fresh quoting, exact-target approval, EIP-1559 versus legacy fees, and receipt confirmation.
SwapPage.tsx
The execution hook intentionally obtains a new quote when the button is clicked. Never broadcast a debounced display quote after user delay, and never retry a reverted transaction with old calldata.

Production checks

  • Confirm the connected wallet is on the requested chain.
  • Treat non-empty issues as blocking until resolved.
  • Independently validate any check whose status is UNKNOWN.
  • Preserve tx.to, tx.data, and tx.value exactly.
  • Report SUBMITTED, then CONFIRMED or REVERTED, through POST /partner/v1/executions from your backend.