Set up a smart contract account for chain-abstracted transactions
predictAccountAddress
function makes an API call to OneBalance’s /account/predict-address
endpoint with the Privy wallet address as both the session and admin address. This deterministically calculates the smart contract account address that will be used for all your OneBalance operations.
useWallets()
hook shown
above./account/predict-address
) is your deposit address where funds are stored - The Privy-managed
EOA wallet acts as a signer for your SCA, authorizing transactions - Always send funds to
the SCA address, not to the Privy wallet addressds:usdc
, ds:eth
). This prefix indicates that these are aggregated assets that represent the same token across multiple chains. For example, ds:usdc
represents USDC from Ethereum, Polygon, Arbitrum, and other supported networks as a single unified asset.Learn more about how aggregated assets work in Aggregated Assets.predictedAddress
returned from the API. This is your SCA’s deposit address.