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.
- 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.
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
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 moreReturns
A
Promise
for the linked account object for the created wallet.Callbacks
You can optionally register anonSuccess
or onError
callback on the useCreateWallet
hook.Optional callback to run after a user successfully creates a wallet.
Optional callback to run after there is an error during wallet creation.