Getting started with OneBalance and Privy

Build a chain-free Web3 dApp in a few minutes

This guide explains how to integrate OneBalance with Privy to create a dApp that feels seamless, like a traditional Web2 app. It features user-friendly authentication without chains, gas fees for the user, or bridging, saving months of engineering work.

CA Toolkit is currently in closed beta. Contact us today to get your API key.

Overview of Steps

Overall, these are the steps that app developers needs to perform:

  1. Setting up Privy

  2. Setting per-application configurations

  3. Initializing and Depositing onto the OneBalance Smart Account

  4. Displaying Chain-Aggregated Balances

  5. Fetch a quote for transaction execution

  6. Signing transactions with Privy

  7. Executing transactions

  8. Getting execution status

Account Overview

Every OneBalance account includes three main roles:

  1. Admin Role: A single key with on-chain encoded rights to manage all other roles within the account.

  2. User Signing Role: Multiple keys for user signing (often called session keys). For an optimal user experience, it is recommended to create a session key for each user and store this externally owned address (EOA) within Privy.

  3. Co-signer Role: A unique key held by OneBalance that co-signs each transaction. This is essential to ensure transactions are executed at the destination chain's speed.

Read more about Resource Lock here.

The core setup for a OneBalance smart account with Privy involves storing a user signing key within Privy and organizing user authentication through this key using Privy’s tools.

Note: The account that holds the balance and performs transactions is the Smart Contract Account (SCA) address, not any of the roles listed above.

Last updated