Introduction
Learn about the Leather API
Leather empowers developers to build apps with the Bitcoin and Stacks blockchains, tapping into the multilayered Bitcoin economy.
Connect and interact with user wallets via the Leather browser extension using our suite of simple JavaScript methods.
Provider object
The Leather extension injects a global object that can be used to call its API.
Look for the presence of LeatherProvider
to see if the Leather is installed:
This object implements the .request
method standard from Modern Wallet APIs proposal.
Simply provide the method name and any necessary parameters, such as sendTransfer
for sending Bitcoin:
Methods

getAddresses
Request the Bitcoin addresses (Native SegWit and Taproot) and Stacks addresses for the active account of the user's wallet

signMessage
Request the signature of an arbitrary message with the first Bitcoin address (Native SegWit or Taproot) of an account

sendTransfer
Request the signature and broadcast of a Bitcoin transaction

signPsbt
Request the signature and broadcast of a Partially Signed Bitcoin Transaction (PSBT)

Stacks libraries
Execute smart contracts and transfer assets on the Stacks blockchain
Last updated