đ getAddresses
Get addresses for the currently active account
Your app can request the current account's Bitcoin addresses with getAddresses
. The app must have first connected to the wallet and obtained account read permissions.
Apps can specify which wallet addresses they require: Bitcoin ordinals address, Bitcoin payment address or Stacks address, using the
purposes
request parameterThe
message
request param gives apps the option to display a message the user when requesting their addresses.
purposes
Array of strings used to specify the purpose of the address(es) to request:
'ordinals'
is preferably used to manage the userâs ordinals
'payment'
is preferably used to manage the userâs bitcoin
Example: ['ordinals', 'payment']
message
âšī¸ Optional a message to be displayed to the user in the request prompt.
Once resolved, the method returns GetAccountResult
: an array of the userâs wallet address objects, defined as:
Apps can use these addresses to make further requests such as signing a message, signing a transaction, etc.
Currently, apps can retrieve two types of Bitcoin addresses, the user's Bitcoin payment address and the Ordinals address which is a taproot address.
An example response:
Where:
address
string - the userâs connected wallet address
publicKey
A hex string representing the bytes of the public key of the account. You can use this to construct partially signed Bitcoin transactions (PSBT).
purpose
string - The purpose of the address:
ordinals
is preferably used to manage the userâs ordinalspayment
is preferably used to manage the userâs bitcoin
addressType
string - the addressâs format:
P2TR
for ordinalsP2SH
for paymentP2WPKH
for payment using Ledger
network
string - the network where the address is being used:
mainnet
for Bitcoin Mainnettestnet
for Bitcoin TestnetSignet
for Bitcoin Signet
walletType
string - the type of wallet used for the account
ledger
if the user's account is using a Ledger devicesoftware
otherwise
Last updated