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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bitahon/client

v1.0.0

Published

Bitahon Protocol Client

Readme

@bitahon/client

The library implements core types of application-level actions for the Bitahon Protocol, as well as auxiliary classes that facilitate interactions with sessions and more.

Installation

General

To obtain the latest version, simply require the project using npm:

npm install @bitahon/client

Usage

Let's start by initializing the crypto-provider.

import {initCryptoProvider} from '@bitahon/crypto';

const provider = await import('@bitahon/browser-crypto');
initCryptoProvider(provider.default);

Additionally, it is necessary to implement the communication provider. Here, you can encode requests into QR Codes; check the IClientConnectionProvider interface.

import {
  IClientConnectionProvider,
} from '@bitahon/client';

const connectionProvider: IClientConnectionProvider = {
  send: async (data: Buffer) => {
    // function for sending a Request that returns a Response buffers.
  },
};

Session creation. You can save the session if needed; check the ClientSession class.

import {Client} from '@bitahon/client';

const client = new Client(connectionProvider);

await client.auth({
  title: 'Awesome Wallet',
  description: 'Wallet for Awesome Things',
});

localStorage.setItem('wallet_session', client.session.toString());

Session restoration may look like this.

import {ClientSession, Client} from '@bitahon/client';

const sessionData = localStorage.getItem('wallet_session');
const session = ClientSession.fromString(sessionData);

const client = new Client(connectionProvider, session);

An example of communication within a session, such as retrieving a public key, could be as follows:

import {bitcoin} from '@bitahon/client';
import * as protocol from '@bitahon/protocol';

const action = new bitcoin.GetPublicKeyAction({
  network: protocol.bitcoin.NETWORK_ID.BITCOIN_TESTNET,
  path: "44'/1'/0'/0/0",
});

const pub = await client.request(action);
console.log(pub);

API

Interfaces

Classes

BIP32

Bip32Curve

| Curve | uint32 | | --- | --- | | secp256k1 | 1 | | secp256k1-decred | 2 | | secp256k1-groestl | 3 | | secp256k1-smart | 4 | | nist256p1 | 5 | | ed25519 | 6 | | ed25519-sha3 | 7 | | ed25519-keccak | 8 | | curve25519 | 9 |

Interfaces

Classes

Functions

Actions Classes

wallet

bitcoin

ethereum

tron

License

MIT