Getting started with OneBalance and Privy

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

Please contact us using this link. We are happy to follow your requirements to adjust or add new functionality.

Overview of steps

Overall, these are the steps that app developer 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

A 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. TODO: 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