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

kardia-js-sdk

v0.6.0

Published

---

Downloads

1,024

Readme

Welcome to Kardia Javascript SDK


Javascript library to interact with Kardia Chain.

Install

npm

  npm install kardia-js-sdk

yarn

  yarn add kardia-js-sdk

From source

  npm install https://github.com/kardiachain/kardia-js-sdk

Usage

es2015/nodejs

var KardiaClient = require('kardia-js-sdk').default;
var kardiaClient = new KardiaClient('http://<host>:port');

// transaction module
var transaction = kardiaClient.transaction;

// account module
var account = kardiaClient.account;

// Kardia chain module
var account = kardiaClient.account;

// Kardia SMC module
var contract = kardiaClient.contract;

es6

import KardiaClient from 'kardia-js-sdk';
const kardiaClient = new KardiaClient({ endpoint: 'http://<host>:port' });

// transaction module
const transaction = kardiaClient.transaction;

// account module
const account = kardiaClient.account;

// Kardia chain module
const account = kardiaClient.account;

// Kardia SMC module
const contract = kardiaClient.contract;

Example

Get account balance

import KardiaClient from 'kardia-js-sdk';
const kardiaClient = new KardiaClient({ endpoint: 'http://<host>:port' });

const latestBalance = await kardiaClient.account.getBalance(ADDRESS);

const balanceAtHeight = await kardiaClient.account.getBalance(ADDRESS, {blockHeight: 1});

const balanceAtHash = await kardiaClient.account.getBalance(ADDRESS, {blockHash: BLOCK_HASH});

Create a transaction

import KardiaClient from 'kardia-js-sdk';
const kardiaClient = new KardiaClient({ endpoint: 'http://<host>:port' });

const nonce = await kardiaClient.account.getNonce(ADDRESS);

const txData = {
  receiver: RECEIVING_ADDRESS,
  nonce,
  gas: 29000, // Minumum Gas Price = 29000, Max Gas Price Max = 20000000
  gasPrice: 1*10**9, // Minimum Gas Price = 1OXY
  amount: '1000000000000000000' // Value in HYDRO (1 KAI = 1*10^18 HYDRO = 1*10^9 OXY)
};

const txHash = await kardiaClient.transaction.sendTransaction(
  txData,
  PRIVATE_KEY,
);

Development

Source

  • Source at src folder

Test

  • This project is using jest framework
  • Run test: npm run test if you have a local node running or npm run test-public to test with public dev node

Build

  • Run npm run build to build
  • CJS, ESModules, and UMD module formats are supported.

Release guideline

  1. Make sure pass all test case
  2. npm run build to create es5 version to support node and older browser. For more detail check here
  3. Pump version by npm version https://docs.npmjs.com/cli/version
  4. Create pull request and wait for review and chain ready.

Version guideline

  • Syntax: https://docs.npmjs.com/cli/version
  • Rule:
    • Prerelease: Development version
    • Patch: Improvement, bug fixing, P2, P3 features
    • Minor: alpha testnet version (version 1), beta testnet version (version 2)
    • Major: Launch main net or big refactor.