Use JavaScript libraries to connect your app to Leather and interact with the Stacks blockchain.
Overview
Several open-source libraries make it easy to execute smart contracts, sign messages, and transfer assets on Stacks via Leather. These SDKs abstract common interactions and simplify the developer experience for both web and dApp environments.
Supported libraries
@stacks/connect A robust SDK from Hiro Systems used widely in Clarity-based web apps. It offers tools for authentication, contract calls, and message signing through Stacks-compatible wallets like Leather.
micro-stacks A modular and modern library developed by Fungible Systems, designed for lightweight integrations and customizable transaction handling. Ideal for React and TypeScript-heavy projects.
These libraries are compatible with Leather and can be used to invoke methods such as:
stx_signMessage
stx_signTransaction
stx_callContract
stx_deployContract
Use case
Use these libraries when:
Building browser-based dApps or developer tools
Needing wallet-connect style integration with Leather
Implementing custom UI/UX for user approval flows
Calling any of the supported Stacks API methods with session management