getAddresses
Request the Bitcoin addresses (Native SegWit and Taproot) and Stacks addresses for the active account of the user's wallet
Method name
getAddresses
Parameters
None
Accounts
The number of the account connected by the user can be inferred by the derivationPath
property for addresses returned in the response.
Account values as indicated by derivation paths are one less than account values as represented in the wallet for users (i.e. the account value 6 corresponds to "Account 7").
In the example response below, the user has connected "Account 2" in their wallet (i.e. account value 1 per the derivation path).
This account number can be used for the account
parameter while requesting other methods to indicate the account for which to request them (e.g. for signing transactions with a particular account).
If an account
parameter is not specified while requesting other methods, the user's currently active account will be used for fulfillment.
Example request
Example response
Example use case
You can use response data to store and retrieve data associated with any of the user's addresses.
For example, you can query mempool.space API with a Bitcoin address for on-chain address details:
Sandbox
Install the Leather extension then try out this method below:
Preview
Last updated