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:
Setting up Privy
Setting per-application configurations
Initializing and Depositing onto the OneBalance Smart Account
Displaying Chain-Aggregated Balances
Fetch a quote for transaction execution
Signing transactions with Privy
Executing transactions
Getting execution status
Account overview
A OneBalance account includes three main roles:
Admin Role: A single key with on-chain encoded rights to manage all other roles within the account.
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.
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