KardiaChain JS SDK
  • Overview
  • Getting Started
  • Guides
    • Connecting to KardiaChain
      • Front-end
      • Back-end
    • Working with wallet
    • Sending your first transaction
    • Smart Contract: decentralize application
    • KRC20 tokens
    • KAI Chain module
    • Utilities
  • Reference
    • KardiaClient
    • Account
    • Transaction
    • KAI Chain
    • Smart contract
    • KRC20
    • Objects reference
Powered by GitBook
On this page
  • Installation
  • Usage

Was this helpful?

Getting Started

PreviousOverviewNextConnecting to KardiaChain

Last updated 3 years ago

Was this helpful?

KardiaChain JS SDK is a wrapper built on top of KardiaChain RPC protocol that helps developers to interact with KardiaChain’s blockchain network easily. Other than KardiaChain JS SDK, other Ethereum library such as , can be used to interact with KardiaChain RPC too.

Installation

KardiaChain JS SDK can be installed from NPM

npm i kardia-js-sdk

Usage

import KardiaClient from 'kardia-js-sdk';
const RPC_ENDPOINT = 'YOUR_RPC_ENDPOINT';

const kardiaClient = new KardiaClient({ endpoint: RPC_ENDPOINT });

// Account module
const accountModule = kardiaClient.account;

// KAI module
const kaiModule = kardiaClient.kaiChain;

// Smart contract module
const smcModule = kardiaClient.contract;

// KRC20 module
const krcModule = kardiaClient.krc20;

// Transaction module
const transactionModule = kardiaClient.transaction;
web3
ethers