2.4.1 • Published 18 days ago

@keep-network/tbtc-v2.ts v2.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
18 days ago

tBTC v2 SDK

build npm documentation

tBTC SDK is a TypeScript library that provides effortless access to the fundamental features of the tBTC Bitcoin bridge. The SDK allows developers to integrate tBTC into their own applications and offer the power of trustless tokenized Bitcoin to their users.

Table of contents:

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 using yarn, run:

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

If you prefer to use npm, do:

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 using yarn, invoke:

yarn add ethers@legacy-v5

To do the same using npm, run:

npm i ethers@legacy-v5

The SDK depends on ethers v5. Proper support for newer ethers versions is not guaranteed right now.

Usage

Here is a short example demonstrating SDK usage:

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

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

// Initialize the SDK.
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.(...)

Contributing

Contributions are always welcome! Feel free to open any issue or send a pull request. Please refer the repository-level CONTRIBUTING.adoc document for general contribution guidelines. Below, you can find how to set up the SDK module for development.

Prerequisites

Please make sure you have the following prerequisites installed on your machine:

Although the below commands use yarn you can easily use npm instead.

Install dependencies

To install dependencies, run:

yarn install

Build

To build the library, invoke:

yarn build

A dist directory containing the resulting artifacts will be created.

Test

To run unit tests, do:

yarn test

Format

To format code automatically, invoke:

yarn format:fix

Auto-generated API reference

There is an auto-generated API reference documentation that must be re-generated in case of modifications in the source code. This can be done automatically using a pre-commit hook or manually using:

yarn docs

Generated API reference in form of Markdown files is saved to the api-reference directory.

Documentation

This README provides just a basic guidance. Comprehensive documentation for this SDK can be found on the Threshold Network Docs website.

2.4.1

18 days ago

2.5.0-dev.2

18 days ago

2.5.0-dev.1

22 days ago

2.4.0

28 days ago

2.4.0-dev.8

28 days ago

2.4.0-dev.9

28 days ago

2.5.0-dev.0

28 days ago

2.4.0-dev.7

2 months ago

2.4.0-dev.6

2 months ago

2.4.0-dev.5

2 months ago

2.4.0-dev.4

3 months ago

2.4.0-dev.3

4 months ago

2.4.0-dev.2

4 months ago

2.4.0-dev.1

4 months ago

2.0.0

7 months ago

2.3.0-dev.1

6 months ago

2.3.0-dev.2

6 months ago

2.3.0-dev.3

6 months ago

2.3.0-dev.4

6 months ago

2.3.0-dev.0

6 months ago

2.3.0-dev.5

6 months ago

2.3.0-dev.6

6 months ago

2.3.0-dev.7

6 months ago

1.3.0-goerli.0

10 months ago

1.3.0-goerli.1

10 months ago

2.3.0

6 months ago

2.4.0-dev.0

6 months ago

1.4.0-goerli.1

7 months ago

1.4.0-goerli.0

7 months ago

2.0.0-dev.1

7 months ago

2.0.0-dev.0

7 months ago

1.4.0-dev.1

9 months ago

1.4.0-dev.2

8 months ago

1.4.0-dev.3

8 months ago

1.4.0-dev.4

8 months ago

1.4.0-dev.0

10 months ago

1.4.0-dev.5

7 months ago

1.4.1

7 months ago

1.4.0-dev.6

7 months ago

1.4.0

7 months ago

1.4.0-dev.7

7 months ago

1.4.0-dev.8

7 months ago

2.2.0

6 months ago

2.1.0-dev.4

6 months ago

2.1.0-dev.3

6 months ago

2.1.0-dev.0

7 months ago

2.1.0-dev.2

7 months ago

2.1.0-dev.1

7 months ago

1.4.1-goerli.0

7 months ago

1.3.0-dev.7

10 months ago

1.3.0-dev.6

10 months ago

1.3.0-dev.9

10 months ago

1.3.0-dev.8

10 months ago

1.3.0-dev.5

10 months ago

1.3.0

10 months ago

2.1.0

6 months ago

2.2.0-dev.6

6 months ago

2.2.0-dev.7

6 months ago

2.2.0-dev.8

6 months ago

2.2.0-dev.9

6 months ago

2.2.0-dev.0

6 months ago

2.2.0-dev.1

6 months ago

2.2.0-dev.2

6 months ago

2.2.0-dev.3

6 months ago

2.2.0-dev.4

6 months ago

2.2.0-dev.5

6 months ago

1.3.0-sepolia.0

7 months ago

1.3.0-dev.4

11 months ago

1.3.0-dev.1

11 months ago

1.3.0-dev.3

11 months ago

1.3.0-dev.2

11 months ago

1.2.0

1 year ago

1.2.0-dev.0

1 year ago

1.2.0-dev.1

1 year ago

1.1.0-dev.12

1 year ago

1.1.0-dev.11

1 year ago

1.1.0-dev.14

1 year ago

1.1.0-dev.13

1 year ago

1.2.0-goerli.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.3.0-dev.0

1 year ago

1.1.0-goerli.3

1 year ago

1.0.0

1 year ago

1.1.0-dev

1 year ago

1.0.0-goerli.2

1 year ago

1.0.0-goerli.3

1 year ago

1.1.0-dev.10

1 year ago

1.0.0-dev.35

1 year ago

1.0.0-dev.34

1 year ago

1.1.0-goerli.1

1 year ago

1.1.0-dev.2

1 year ago

1.1.0-goerli.2

1 year ago

1.1.0-dev.3

1 year ago

1.1.0-dev.0

1 year ago

1.1.0-dev.1

1 year ago

1.1.0-dev.6

1 year ago

1.1.0-dev.7

1 year ago

1.1.0-dev.4

1 year ago

1.1.0-goerli.0

1 year ago

1.1.0-dev.5

1 year ago

1.1.0-dev.8

1 year ago

1.1.0-dev.9

1 year ago

1.0.1-dev.0

1 year ago

1.0.0-dev.19

1 year ago

1.0.0-dev.18

1 year ago

1.0.0-dev.13

1 year ago

1.0.0-dev.12

1 year ago

1.0.0-dev.33

1 year ago

1.0.0-dev.32

1 year ago

1.0.0-dev.17

1 year ago

1.0.0-feature.2

1 year ago

1.0.0-dev.16

1 year ago

1.0.0-feature.1

1 year ago

1.0.0-dev.15

1 year ago

1.0.0-feature.0

1 year ago

1.0.0-dev.14

1 year ago

1.0.0-dev.31

1 year ago

1.0.0-dev.30

1 year ago

1.0.0-goerli.0

1 year ago

1.0.0-goerli.1

1 year ago

1.0.0-dev.29

1 year ago

1.0.0-dev.24

1 year ago

1.0.0-dev.23

1 year ago

1.0.0-dev.22

1 year ago

1.0.0-dev.21

1 year ago

1.0.0-dev.28

1 year ago

1.0.0-dev.27

1 year ago

1.0.0-dev.26

1 year ago

1.0.0-dev.25

1 year ago

1.0.0-dev.20

1 year ago

1.0.0-dev.11

2 years ago

1.0.0-dev.10

2 years ago

1.0.0-dev.8

2 years ago

1.0.0-dev.9

2 years ago

1.0.0-dev.7

2 years ago

1.0.0-dev.6

2 years ago

1.0.0-dev.5

2 years ago

1.0.0-dev.4

2 years ago

1.0.0-dev.3

2 years ago

1.0.0-dev.2

2 years ago

1.0.0-dev.1

2 years ago

1.0.0-dev.0

2 years ago

1.0.0-dev

2 years ago

0.1.1-dev

2 years ago