For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

Here you can find instructions explaining how to use the SDK in your own project.

Installation

To install the tBTC SDK in your project, run:

yarn add @keep-network/tbtc-v2.ts
npm i @keep-network/tbtc-v2.ts

Please note that you will also need to install the ethers v5 library to initialize a signer or provider. To do so, invoke:

yarn add ethers@legacy-v5
npm i ethers@legacy-v5

Usage

Here is a brief example demonstrating the use of the SDK in Ethereum:

// Import SDK entrypoint component.
import { TBTC } from "@keep-network/tbtc-v2.ts"

// Create an instance of ethers signer.
const signer = (...)

// Initialize the SDK for Ethereum only.
const sdk = await TBTC.initializeMainnet(signer)

// Access SDK features.
sdk.deposits.(...)
sdk.redemptions.(...)

// Access tBTC smart contracts directly.
sdk.tbtcContracts.(...)

// Access Bitcoin client directly.
sdk.bitcoinClient.(...)

Crosschain

Here is a brief example demonstrating the use of the SDK in some L2, e.g. Arbitrum:

Last updated

Was this helpful?