Learn the key concepts for building a production-ready chain-abstracted token swap interface using OneBalance API and Privy embedded wallets.
npm install -g pnpm
or follow the official installation guide..env.example
into .env
:
sessionAddress
and adminAddress
for simplicity. The predicted address becomes your user’s primary account identifier.
useQuotes.ts
):
privySigningUtils.ts
):
ChainOperation
objects that need individual signaturestypedDataToSign
field contains the EIP-712 structure for each operationPENDING
: Transaction submitted to blockchainIN_PROGRESS
: Being processed across chainsCOMPLETED
: Successfully completedFAILED
: Transaction failedREFUNDED
: Funds returned to user