Appearance
Custom wallet tags
To simplify management of wallets, Privy allows you to associate custom tags for each wallet. Tags do not need to be unique per wallet, and can be used to conceptually group wallets together.
You can set custom tags when creating wallets with Privy (per the creation interface above). After a wallet has been created, you can also add tags to it.
Fetching wallet tags
To information about a wallet, including its tags and policy, make a GET
request to
sh
https://api.privy.io/v1/wallets/address/<insert-address>
In the response, Privy will return the following:
Field | Type | Description |
---|---|---|
chain_type | 'ethereum' | 'solana | Chain type of the wallet. |
policy | JSON | The policy associated with a wallet |
tags | string[] | An array of tags associated with the wallet |
Updating tags for a wallet
To update the tags for a wallet by its address
, make a POST
request to:
sh
https://api.privy.io/v1/wallets/address/<insert-address>/tags
In the body of the request, include the following:
Field | Type | Description |
---|---|---|
tags | string[] | An array of tags to associate with the wallet. |
Getting all wallets with a given tag
You can also get a list of all wallets that fall under a given tag. To do so, make a GET
request to:
sh
https://api.privy.io/v1/wallets/tags/<insert-tag>
In the response, Privy will include the following:
Field | Type | Description |
---|---|---|
wallets | {address: string, chain_type: 'ethereum' | 'solana'}[] | An array of {address, chain_type} for wallets associated with that tag. |