stx_getAddresses
Request the Bitcoin and Stacks addresses for the active account of the user's wallet, using the SIP-030 method name.
Method name
stx_getAddresses
stx_getAddresses is the SIP-030 name for getAddresses. Leather runs both through the same connection flow and returns the same response shape, so the guidance on the getAddresses page applies here too: every call opens a connection prompt, and addresses must be read by symbol and type, never by index.
Unlike getAddresses, it takes no chains parameter. It always requests both Bitcoin and Stacks addresses.
Parameters
Parameter
Description
Required
Type
network
Network identifier
❌
string
Example request
try {
const response = await window.LeatherProvider.request("stx_getAddresses");
const stxAddress = response.result.addresses.find(
(address) => address.symbol === "STX"
);
console.log("Stacks address:", stxAddress?.address);
} catch (error) {
console.log("Request error:", error);
}Example Response
Was this helpful?