Getting global wallets
Once a user has successfully linked their account from a provider app, an account of type: 'cross_app'
will be added to the linkedAccounts
array of their user
object.
This crossAppAccount
is an object with the following properties:
Indicates that the linked account is a cross-app account.
An array of the user’s embedded wallet(s) from the provider app for the cross-app account.
Metadata about the provider app for the cross-app account.
Datetime when the cross-app account was first linked to the user.
Datetime for when the user last logged in/linked the cross-app account.
To find a user’s cross-app embedded wallet, first find the account of type: 'cross_app'
from their linkedAccounts
array. If your app permits users to link cross-app accounts from multiple provider apps, you should also filter the linkedAccounts
by the providerApp.id
on the cross-app account.
Next, from the crossAppAccount
, inspect the embeddedWallets
array to get the user’s embedded wallet address(es) from the source app.
Most users only have one embedded wallet per app. Certain apps, however, leverage multiple
embedded wallets (e.g. HD wallets) per user to support certain use cases. In kind, the
embeddedWallets
field is designed as an array, but generally will be a singleton containing one
entry.
Cross-app operations on Smart Wallets work exactly the same! Just use the right wallet address and all hooks will work as usual.
Was this page helpful?