npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@gnolang/tm2-js-client

v1.2.0

Published

Tendermint2 JS / TS Client

Downloads

1,384

Readme

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

  • JSON-RPC and WebSocket client support via a Provider
  • Simple account and transaction management API with a Wallet
  • Designed for easy extension for custom TM2 chains, such as Gnoland

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:

  • JSON-RPC Provider: executes each call as a separate HTTP RPC call.
  • WS Provider: executes each call through an active WebSocket connection, which requires closing when not needed anymore.

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:

  • Key: a signer that is based on a raw Secp256k1 key pair.
  • Ledger: a signer that is based on a Ledger device, with all interaction flowing through the user's device.

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.