gnolang / tm2-js-client

The Tendermint2 JS/TS client (SDK)
https://gno.land
Apache License 2.0
9 stars 2 forks source link
client gno js sdk tendermint2 tm2 ts

⚛️ Tendermint2 JS/TS Client ⚛️

Overview

@gnolang/tm2-js-client is a JavaScript/TypeScript client implementation for Tendermint2-based chains. It is designed to make it easy for developers to interact with TM2 chains, providing a simplified API for account and transaction management. By doing all the heavy lifting behind the scenes, @gnolang/tm2-js-client enables developers to focus on what really matters - building their dApps.

Key Features

Installation

To install @gnolang/tm2-js-client, use your preferred package manager:

yarn add @gnolang/tm2-js-client
npm install @gnolang/tm2-js-client

Common Terminology

Provider

A Provider is an interface that abstracts the interaction with the Tendermint2 chain, making it easier for users to communicate with it. Rather than requiring users to understand which endpoints are exposed, what their return types are, and how they are parsed, the Provider abstraction handles all of this behind the scenes. It exposes useful API methods that users can use and expects concrete types in return.

Currently, the @gnolang/tm2-js-client package provides support for two Provider implementations:

Signer

A Signer is an interface that abstracts the interaction with a single Secp256k1 key pair. It exposes methods for signing data, verifying signatures, and getting metadata associated with the key pair, such as the address.

Currently, the @gnolang/tm2-js-client package provides support for two Signer implementations:

Wallet

A Wallet is a user-facing API that is used to interact with an account. A Wallet instance is tied to a single key pair and essentially wraps the given Provider for that specific account.

A wallet can be generated from a randomly generated seed, a private key, or instantiated using a Ledger device.

Using the Wallet, users can easily interact with the Tendermint2 chain using their account without having to worry about account management.

Documentation

For the sake of keeping the README short and sweet, you can find the documentation and usage examples for the package here.

Acknowledgements

@gnolang/tm2-js-client is, and will continue to be, licensed under Apache 2.

It is made by the community, for the community, and any contribution is greatly appreciated.

A special thank-you goes out to the Onbloc team, building Adena wallet and other gno projects, whose extended supported made this package possible.