Skip to main content
Privy enables you to programmatically create wallets embedded within your application. When you create a wallet, you can specify its owner, which defines who controls the wallet.
  • To create a user wallet, specify a user ID as an owner of the wallet. This ensures only the authenticated user has access to their wallet. All client-side SDKs create user wallets by default and automatically set the wallet owner as the authenticated user.
  • To create an organization wallet, specify the organization as the wallet’s entity. Privy automatically sets the organization’s default key quorum as the wallet’s owner, unless you specify a different owner or owner_id.
  • Or, you can specify an authorization key as an owner on a wallet. The holder of the authorization key, typically your application backend, controls the wallet. You must use a server-side SDK to create wallets owned by an authorization key.
You can also optionally set a wallet’s entity to record the user that it belongs to. Entity assignment does not grant control of the wallet and cannot be changed after it is set.
Prior to creating a wallet, we strongly recommend you learn about wallet controls and policies to understand the right configuration for your wallets.
The React SDK supports automatically creating embedded wallets for your users when they log in to your app. View this guide to learn more and configure automatic wallet creation.
To create a wallet with the React SDK, use the createWallet method from the useCreateWallet hook:

Usage

Parameters

boolean
Whether or not to create an additional Ethereum wallet for the user if they already have an existing Ethereum embedded wallet. Must be set to true to create additional wallets. Defaults to false. Learn more
{signerId: string, policyIds?: string[]}[]
An array of signers to add to the wallet at creation time. Each signer object accepts a signerId (the key quorum ID) and an optional policyIds array to scope the signer’s permissions.

Returns

Promise<Wallet>
A Promise for the linked account object for the created wallet.

Callbacks

You can optionally register an onSuccess or onError callback on the useCreateWallet hook.
({wallet: Wallet}) => void
Optional callback to run after a user successfully creates a wallet.
(error: string) => void
Optional callback to run after there is an error during wallet creation.