Sign In

chainkit-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chainkit-sdk

Multi-chain wallet SDK. 30 blockchains, unified API, zero external chain SDK dependencies.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
4
300%
Maintainers
1
Weekly downloads
 
Created
Source

ChainKit

Cross-chain wallet SDK. One unified API for 30 blockchains -- wallet creation, address validation, balance queries, transaction signing, and token operations.

Zero external chain SDK dependencies. Pure JavaScript crypto via @noble/@scure.

Playground Chains Zero Deps

Installation

# Install the client and only the chains you need
npm install @chainkit/client @chainkit/ethereum @chainkit/bitcoin @chainkit/solana

# Full list of chain packages:
# @chainkit/{ethereum,bitcoin,solana,tron,ton,cosmos,aptos,sui,near,cardano,
#   xrp,stellar,starknet,stacks,kaia,eos,polkadot,hedera,filecoin,icp,
#   algorand,vechain,tezos,theta,multiversx,iota,neo,flow,icon,mina}

Quick Start

import { createClient } from '@chainkit/client'
import { ethereum } from '@chainkit/ethereum'
import { bitcoin } from '@chainkit/bitcoin'
import { solana } from '@chainkit/solana'

const client = await createClient({
  chains: {
    ethereum: {
      chain: ethereum,
      rpcs: ['https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY'],
      privateKey: '0x...',
    },
    bitcoin: {
      chain: bitcoin,
      rpcs: ['https://btc-rpc.example.com'],
    },
    solana: {
      chain: solana,
      rpcs: ['https://api.mainnet-beta.solana.com'],
      mnemonic: 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about',
      hdPath: "m/44'/501'/0'/0'",
    },
  },
})

// Read (all chains)
await client.ethereum.getBalance('0x...')
await client.bitcoin.getBalance('bc1...')
await client.solana.getBalance('HAgk...')

// Write (only when privateKey or mnemonic is provided)
const txHash = await client.ethereum.send({ to: '0x...', amount: '1000000000000000000' })

// Wait for confirmation
const confirmedTx = await client.ethereum.waitForTransaction(txHash)

// Clean up key material when done
client.ethereum.destroy()

Unified API Reference

ChainSigner (Offline -- all 30 chains)

Every chain signer implements these methods identically:

import { EthereumSigner } from '@chainkit/ethereum'
import { BitcoinSigner } from '@chainkit/bitcoin'
import { SolanaSigner } from '@chainkit/solana'

// Works the same on ALL chains
const signer = new EthereumSigner()

// --- Mnemonic ---
const mnemonic = signer.generateMnemonic()        // 12 words (128 bits)
signer.generateMnemonic(256)                       // 24 words
signer.validateMnemonic(mnemonic)                  // true/false

// --- Key derivation ---
const pk = await signer.derivePrivateKey(mnemonic, "m/44'/60'/0'/0/0")

// --- Address ---
const address = signer.getAddress(pk)
signer.validateAddress(address)                    // true
signer.validateAddress('invalid')                  // false

// --- Default HD path ---
signer.getDefaultHdPath()                          // "m/44'/60'/0'/0/0"

// --- Sign transaction (unified params object) ---
const signed = await signer.signTransaction({
  privateKey: pk,
  tx: {
    to: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD68',
    value: '1000000000000000000',
    fee: { gasLimit: '0x5208', maxFeePerGas: '0x2540be400' },
    extra: { chainId: 1 },
  },
})

// --- Sign message ---
const sig = await signer.signMessage({
  privateKey: pk,
  message: 'Hello ChainKit',
})

ChainSigner Method Reference

MethodParametersReturnDescription
generateMnemonicstrength?: number (128 or 256)stringGenerate BIP39 mnemonic (12 or 24 words)
validateMnemonicmnemonic: stringbooleanValidate a BIP39 mnemonic
derivePrivateKeymnemonic: string, hdPath: stringPromise<string> | stringDerive private key from mnemonic via BIP44
getAddressprivateKey: stringstringGet address from private key
validateAddressaddress: stringbooleanValidate address format for this chain
signTransactionparams: { privateKey, tx }Promise<string>Sign a transaction, returns signed tx hex
signMessageparams: { privateKey, message }Promise<string> | stringSign an arbitrary message
getDefaultHdPath(none)stringGet the default HD derivation path

ChainProvider (Online -- all 30 chains)

import { EthereumProvider } from '@chainkit/ethereum'

const provider = new EthereumProvider({
  endpoints: ['https://eth-mainnet.example.com'],
  strategy: 'failover',    // 'failover' | 'round-robin' | 'fastest'
  timeout: 10000,
  retries: 2,
})

// Balance
const balance = await provider.getBalance('0x...')
// { address: '0x...', amount: '1000000000000000000', decimals: 18, symbol: 'ETH' }

// Nonce / sequence number
const nonce = await provider.getNonce('0x...')

// Transaction info
const tx = await provider.getTransaction('0xabc...')
// { hash, from, to, value, fee, blockNumber, blockHash, status, timestamp, data, nonce }

// Block info
const block = await provider.getBlock(12345)
// { number, hash, parentHash, timestamp, transactions }

// Fee estimation (slow / average / fast)
const fee = await provider.estimateFee()
// { slow: '...', average: '...', fast: '...', unit: 'wei' }

// Broadcast signed transaction
const txHash = await provider.broadcastTransaction(signedTxHex)

// Chain info
const info = await provider.getChainInfo()
// { chainId: '1', name: 'Ethereum Mainnet', symbol: 'ETH', decimals: 18, testnet: false, blockHeight: 12345 }

// Wait for transaction confirmation
const confirmedTx = await provider.waitForTransaction('0xabc...', {
  timeoutMs: 60000,    // default: 60000 (1 minute)
  intervalMs: 3000,    // default: 3000 (3 seconds)
})

ChainProvider Method Reference

MethodParametersReturnDescription
getBalanceaddress: stringPromise<Balance>Get native token balance
getNativeBalancesaddress: stringPromise<Balance[]>Get all native balances (dual-token chains, optional)
getTransactionhash: stringPromise<TransactionInfo | null>Get transaction by hash
getBlockhashOrNumber: string | numberPromise<BlockInfo | null>Get block by number or hash
getNonceaddress: stringPromise<string | number>Get nonce/sequence number
estimateFee(none)Promise<FeeEstimate>Estimate fees (slow/average/fast)
broadcastTransactionsignedTx: stringPromise<string>Broadcast signed tx, returns tx hash
getChainInfo(none)Promise<ChainInfo>Get chain metadata
waitForTransactionhash: string, options?: WaitForTransactionOptionsPromise<TransactionInfo>Poll until confirmed/failed/timeout

Capabilities (chain-specific extensions)

Not all chains support all features. Capabilities are type-safe extensions:

ContractCapable

// EVM, Solana, Cosmos, Tron, TON, Aptos, Sui, NEAR, Tezos, etc.
await provider.callContract(contractAddress, 'balanceOf(address)', ['0x...'])
await provider.estimateGas(contractAddress, 'transfer(address,uint256)', ['0x...', 1000n])

TokenCapable

// Get single token balance
await provider.getTokenBalance(address, tokenAddress)

// Get multiple token balances at once
await provider.getMultipleTokenBalances(address, [token1, token2, token3])

// Get token metadata (name, symbol, decimals, totalSupply)
await provider.getTokenMetadata(tokenAddress)

UtxoCapable

// Bitcoin, Cardano (eUTXO)
await provider.getUtxos(address)
await provider.selectUtxos(address, '100000')  // coin selection

SubscriptionCapable

// Poll-based subscriptions
const unsubscribe = await provider.subscribeBlocks(blockNumber => { ... })
const unsubscribe = await provider.subscribeTransactions(address, tx => { ... })

EvmSignerCapable (EIP-712)

// Ethereum, Kaia
const sig = await signer.signTypedData({
  privateKey: pk,
  domain: { name: 'MyDApp', version: '1', chainId: 1 },
  types: {
    Order: [
      { name: 'maker', type: 'address' },
      { name: 'amount', type: 'uint256' },
    ],
  },
  primaryType: 'Order',
  message: { maker: '0x...', amount: '1000' },
})

Dual-Token Chains

// VeChain (VET/VTHO), Theta (THETA/TFUEL), Neo (NEO/GAS), EOS (CPU/NET/RAM)
await provider.getBalance(address)             // primary token
await provider.getNativeBalances?.(address)     // all native tokens

Unified Client

The unified client wraps signer and provider into a single ergonomic interface:

import { createClient } from '@chainkit/client'
import { ethereum } from '@chainkit/ethereum'
import { bitcoin } from '@chainkit/bitcoin'

const client = await createClient({
  chains: {
    ethereum: {
      chain: ethereum,
      rpcs: ['https://...'],
      privateKey: '0x...',     // optional: omit for read-only
      network: 'mainnet',      // optional: 'mainnet' | 'testnet'
    },
    bitcoin: {
      chain: bitcoin,
      rpcs: ['https://...'],
      network: 'testnet',      // affects address format (bc1 vs tb1)
    },
  },
})

// --- Read (all chains) ---
await client.ethereum.getBalance('0x...')
await client.ethereum.getTransaction('0xabc...')
await client.ethereum.getBlock(12345)
await client.ethereum.estimateFee()
await client.ethereum.getChainInfo()

// --- Write (only when privateKey or mnemonic provided) ---

// send() auto-fetches nonce and fee, signs, and broadcasts
const txHash = await client.ethereum.send({
  to: '0x742d35Cc6634C0532925a3b844Bc9e7595f2bD68',
  amount: '1000000000000000000',
  memo: 'optional memo',
  data: '0x...',               // optional calldata
  options: { chainId: 1 },     // chain-specific overrides
})

// Wait for confirmation
const confirmed = await client.ethereum.waitForTransaction(txHash, {
  timeoutMs: 120000,
  intervalMs: 5000,
})

// prepareTransaction() builds an unsigned tx without signing
const unsignedTx = await client.ethereum.prepareTransaction({
  to: '0x...',
  amount: '1000000000000000000',
})

// Low-level signing (bypasses auto-fetch)
await client.ethereum.signTransaction({
  privateKey: '0x...',
  tx: { to: '0x...', value: '1000' },
})
await client.ethereum.signMessage({
  privateKey: '0x...',
  message: 'Hello',
})

// Get the address derived from the configured key
const myAddress = client.ethereum.getAddress()

// Access underlying signer/provider directly
client.ethereum.provider   // ChainProvider instance
client.ethereum.signer     // ChainSigner instance (only when key provided)

// Zero out stored private key material when done
client.ethereum.destroy()

Client Configuration Reference

OptionTypeDefaultDescription
chainChainDefinition(required)Chain definition from @chainkit/<chain>
rpcsstring[](required)RPC endpoint URLs
network'mainnet' | 'testnet''mainnet'Controls address generation and default HD paths
strategy'failover' | 'round-robin' | 'fastest''failover'RPC endpoint selection strategy
timeoutnumber10000Request timeout in milliseconds
retriesnumber2Number of retries per endpoint
privateKeystring(optional)Private key for signing (hex string)
mnemonicstring(optional)BIP39 mnemonic for key derivation
hdPathstringchain defaultBIP44 HD derivation path

Security note: When a signing client uses strategy: 'fastest', the client automatically downgrades to 'failover' to prevent a rogue endpoint from supplying manipulated nonce or fee data.

ABI Encoder

ChainKit includes a built-in ABI encoder/decoder for EVM contract interactions. No external ABI libraries needed.

import {
  encodeFunctionCall,
  encodeFunctionSelector,
  decodeFunctionResult,
  ERC20,
} from '@chainkit/core'

// --- Encode a function call ---
const transferData = encodeFunctionCall(
  'transfer(address,uint256)',
  ['0x742d35Cc6634C0532925a3b844Bc9e7595f2bD68', 1000000n],
)
// Returns: "0xa9059cbb000000000000000000000000742d35cc6634c0532925a3b844bc9e7595f2bd6800000000000000000000000000000000000000000000000000000000000f4240"

// --- ERC-20 presets ---
const approveData = encodeFunctionCall(ERC20.approve, ['0xSpender...', 1000000n])
const balanceData = encodeFunctionCall(ERC20.balanceOf, ['0xHolder...'])
// Available presets: ERC20.transfer, ERC20.approve, ERC20.balanceOf,
// ERC20.allowance, ERC20.totalSupply, ERC20.decimals, ERC20.symbol, ERC20.name

// --- Get function selector ---
const selector = encodeFunctionSelector('transfer(address,uint256)')
// "0xa9059cbb"

// --- Decode return data ---
const [balance] = decodeFunctionResult(['uint256'], '0x00000000000000000000000000000000000000000000000000000000000f4240')
// balance = 1000000n

// Decode multiple return values
const [addr, amount] = decodeFunctionResult(
  ['address', 'uint256'],
  returnDataHex,
)

Supported ABI Types

TypeEncodeDecode
addressencodeAddressdecodeAddress
uint256 (and all uint*)encodeUint256decodeUint256
int256 (and all int*)encodeInt256decodeInt256
boolencodeBooldecodeBool
bytes32 (and all fixed bytes*)encodeBytes32decodeBytes32
stringencodeStringdecodeString
bytesencodeBytes(via decodeFunctionResult)

Limitation: Dynamic arrays (e.g., uint256[]) are not supported in the encoder. For complex ABI encoding with arrays, use an external ABI library.

SecureKey

JavaScript strings are immutable and cannot be cleared from memory. SecureKey stores private key material as a mutable Uint8Array that can be explicitly zeroed.

import { SecureKey } from '@chainkit/core'

// Create from hex string or Uint8Array
const key = new SecureKey('0xabc123...')

// Access key material
key.hex     // "0xabc123..." (0x-prefixed hex string)
key.bytes   // Uint8Array

// Check if destroyed
key.isDestroyed  // false

// Zero out key material
key.destroy()

// After destroy, accessing .hex or .bytes throws an error
key.isDestroyed  // true
key.hex           // throws Error: 'SecureKey has been destroyed'

The unified client uses SecureKey internally. Call client.<chain>.destroy() to zero the stored key material when the client is no longer needed.

RPC Strategies

// Failover: try endpoints in order, fall back on failure
{ endpoints: ['rpc1', 'rpc2'], strategy: 'failover' }

// Round-robin: distribute requests across endpoints
{ endpoints: ['rpc1', 'rpc2', 'rpc3'], strategy: 'round-robin' }

// Fastest: race all endpoints, use the first successful response
{ endpoints: ['rpc1', 'rpc2'], strategy: 'fastest' }

All strategies include automatic retry (configurable retries, default 2) and per-request timeout (configurable timeout, default 10000ms). JSON-RPC errors are not retried -- only network/timeout failures trigger retries.

strictHttps

Enable strictHttps: true to reject non-HTTPS endpoints (except localhost/127.0.0.1). Without this flag, insecure endpoints produce a console warning but are still used.

const provider = new EthereumProvider({
  endpoints: ['https://eth-mainnet.example.com'],
  strictHttps: true,  // throws on http:// endpoints
})

RPC URL Redaction

Error messages from RPC failures automatically redact endpoint URLs to prevent API key leakage. For example, https://eth-mainnet.g.alchemy.com/v2/sk_abc123 becomes https://eth-mainnet.g.alchemy.com/....

JSON-RPC Response Validation

The RPC manager validates that:

  • Responses conform to JSON-RPC 2.0 structure
  • Response IDs match request IDs (prevents response desynchronization from a malicious endpoint)

Key Management

  • BIP39 mnemonic: 12 or 24 word phrases (128/256 bit entropy)
  • BIP32/44 HD derivation: Standard derivation paths per chain (e.g., m/44'/60'/0'/0/0 for Ethereum)
  • Raw private key: Direct hex-encoded private key input
  • WIF: Bitcoin Wallet Import Format
  • Address validation: Per-chain format validation (EIP-55 checksum, bech32, base58, base58check, SS58, etc.)

Network Configuration

The network option on createClient controls address generation and default HD paths. This matters for chains where mainnet and testnet use different address formats or coin types.

// Bitcoin: network affects address prefix (bc1 vs tb1) and HD path coin type
const client = await createClient({
  chains: {
    bitcoin: {
      chain: bitcoin,
      rpcs: ['https://...'],
      network: 'testnet',  // generates tb1... addresses, uses m/84'/1'/0'/0/0
      mnemonic: '...',
    },
  },
})

// Stacks: network affects address prefix (SP vs ST) and tx chain ID
const client = await createClient({
  chains: {
    stacks: {
      chain: stacks,
      rpcs: ['https://api.testnet.hiro.so'],
      network: 'testnet',  // generates ST... addresses
      mnemonic: '...',
    },
  },
})

Chains where network affects behavior:

  • Bitcoin: Address prefix (bc1 vs tb1), HD path coin type (0' vs 1'), address validation
  • Stacks: Address prefix (SP vs ST), transaction chain ID

For all other chains, network is accepted but does not change address derivation.

Default HD Paths

ChainDefault HD PathCoin Type
Ethereumm/44'/60'/0'/0/060
Bitcoin (mainnet)m/84'/0'/0'/0/00
Bitcoin (testnet)m/84'/1'/0'/0/01
Solanam/44'/501'/0'/0'501
Tronm/44'/195'/0'/0/0195
TONm/44'/607'/0'/0'/0'607
Cosmosm/44'/118'/0'/0/0118
Aptosm/44'/637'/0'/0'/0'637
Suim/44'/784'/0'/0'/0'784
NEARm/44'/397'/0'397
Cardanom/1852'/1815'/0'/0/01815
XRPm/44'/144'/0'/0/0144
Stellarm/44'/148'/0'148
StarkNetm/44'/9004'/0'/0/09004
Stacksm/44'/5757'/0'/0/05757
Kaiam/44'/8217'/0'/0/08217
EOSm/44'/194'/0'/0/0194
Polkadotm/44'/354'/0'/0/0354
Hederam/44'/3030'/0'/0/03030
Filecoinm/44'/461'/0'/0/0461
ICPm/44'/223'/0'/0/0223
Algorandm/44'/283'/0'/0/0283
VeChainm/44'/818'/0'/0/0818
Tezosm/44'/1729'/0'/0'1729
Thetam/44'/500'/0'/0/0500
MultiversXm/44'/508'/0'/0'/0'508
IOTAm/44'/4218'/0'/0'/0'4218
Neom/44'/888'/0'/0/0888
Flowm/44'/539'/0'/0/0539
Iconm/44'/4801074'/0'/0/04801074
Minam/44'/12586'/0'/0/012586

Signature Algorithm Categories

CategoryCurveChains
Secp256k1secp256k1 ECDSAEthereum, Bitcoin, Tron, Cosmos, XRP, Stacks, Kaia, EOS, Filecoin, VeChain, Theta, Icon
ED25519Ed25519 EdDSASolana, TON, Aptos, Sui, NEAR, Cardano, Stellar, Hedera, ICP, Algorand, Tezos, MultiversX, IOTA
SR25519Schnorrkel/RistrettoPolkadot
STARKStark curveStarkNet
Secp256r1NIST P-256 ECDSANeo
ECDSA_P256ECDSA P-256Flow
PastaPallas curve SchnorrMina

Packages

PackageDescription
@chainkit/coreShared interfaces, types, crypto utilities (BIP39/32), RPC manager, ABI encoder/decoder, SecureKey
@chainkit/clientUnified client that composes chain packages
@chainkit/ethereumEthereum + all EVM chains
@chainkit/bitcoinBitcoin + UTXO forks
@chainkit/solanaSolana + SPL tokens
@chainkit/tronTron + TRC-20 tokens
@chainkit/tonTON + Jetton tokens
@chainkit/cosmosCosmos Hub + IBC/Cosmos SDK chains
@chainkit/aptosAptos
@chainkit/suiSui
@chainkit/nearNEAR Protocol
@chainkit/cardanoCardano
@chainkit/xrpXRP Ledger
@chainkit/stellarStellar
@chainkit/starknetStarkNet
@chainkit/stacksStacks
@chainkit/kaiaKaia (prev Klaytn) + KIP-7 tokens
@chainkit/eosEOS / Vaulta
@chainkit/polkadotPolkadot + Substrate parachains
@chainkit/hederaHedera (ED25519 + ECDSA signers)
@chainkit/filecoinFilecoin
@chainkit/icpInternet Computer
@chainkit/algorandAlgorand
@chainkit/vechainVeChain
@chainkit/tezosTezos
@chainkit/thetaTheta
@chainkit/multiversxMultiversX
@chainkit/iotaIOTA
@chainkit/neoNeo
@chainkit/flowFlow
@chainkit/iconIcon
@chainkit/minaMina

Supported Chains & Exchange Coverage

ChainKit covers ~230/246 coins on Upbit KRW market (~93.5%) and ~420/438 coins on Binance USDT spot (~95.9%).

Below is the full breakdown of which coins each package supports.

@chainkit/ethereum (Secp256k1)

Covers Ethereum and all EVM-compatible L1/L2 chains. Any ERC-20 token or EVM chain is supported.

Native: ETH

EVM L1/L2 chains covered (native tokens):

ChainTokenUpbitBinance
PolygonPOL (MATIC)OO
ArbitrumARBOO
OptimismOPOO
BNB Smart ChainBNB-O
Avalanche C-ChainAVAXOO
Sonic (prev Fantom)S (FTM)-O
CronosCROO-
MantleMNTO-
CeloCELOOO
BlastBLASTO-
Base(tokens below)OO
LineaLINEAOO
zkSyncZKOO
ZoraZORAO-
TaikoTAIKOO-
BerachainBERAOO
MonadMONO-
MantaMANTA-O
MetisMETIS-O
ScrollSCR-O
RoninRON-O
MoonbeamGLMR-O
MoonriverMOVR-O
KAVAKAVAOO
Ethereum ClassicETCOO

Major ERC-20 / EVM tokens:

TokenNameUpbitBinance
USDTTetherOO
USDCUSD CoinOO
LINKChainlinkOO
UNIUniswapOO
AAVEAaveOO
PEPEPepeOO
SHIBShiba InuOO
MKRMakerOO
LDOLidoOO
ENSENSOO
ONDOOndoOO
IMXImmutableOO
PENDLEPendleOO
GRTThe GraphOO
SNXSynthetixOO
CRVCurveOO
COMPCompoundOO
1INCH1inchOO
AXSAxie InfinityOO
SANDThe SandboxOO
MANADecentralandOO
ENJEnjinOO
CHZChilizOO
BATBasic AttentionOO
WLDWorldcoinOO
ENAEthenaOO
ETHFIEtherFiOO
BLURBlurOO
MASKMask NetworkOO
FLOKIFlokiOO
YFIYearnOO
SUSHISushiSwapOO
ANKRAnkrOO
SKLSKALEOO
STORJStorjOO
KNCKyber NetworkOO
ZRX0xOO
LPTLivepeerOO
GTCGitcoinOO
EIGENEigenLayerOO
ZROLayerZeroOO
ARKMArkhamOO
IDSPACE IDOO
CYBERCyberOO
ORBSOrbsO-
PUNDIXPundi XO-
IQIQO-
AXLAxelarOO
SAFESafeOO
COWCoW ProtocolOO
WWormholeOO
FETFetch.aiOO
RSRReserve RightsOO
GMXGMX-O
SSVSSV Network-O
CVXConvex-O
RPLRocket Pool-O
SNTStatusO-
CVCCivicO-
MTLMetalO-
POWRPower LedgerO-
WBTCWrapped BitcoinOO
PAXGPAX Gold-O

Plus 50+ additional ERC-20 tokens. Any token deployed on Ethereum or EVM chains is supported.

Estimated total: ~120+ coins

@chainkit/bitcoin (Secp256k1)

Covers Bitcoin and UTXO-model forks sharing Bitcoin's transaction primitives.

Native: BTC

TokenChainUpbitBinance
BTCBitcoinOO
DOGEDogecoinOO
BCHBitcoin CashOO
LTCLitecoin-O
BSVBitcoin SVO-
ORDIBitcoin (BRC-20)-O
1000SATSBitcoin (BRC-20)-O

Note: XEC (eCash), DASH, DGB, RVN, ZEC, DCR, PIVX, XVG are Bitcoin-derived UTXO chains that share similar primitives but may need address format adjustments.

Estimated total: ~14 coins

@chainkit/solana (ED25519)

Covers Solana and all SPL tokens.

Native: SOL

TokenNameUpbitBinance
SOLSolanaOO
BONKBonkOO
JTOJitoOO
JUPJupiterOO
PYTHPythOO
RENDERRenderOO
RAYRaydiumOO
MEMagic EdenOO
TRUMPTRUMPOO
PENGUPudgy PenguinsOO
MOODENGMoo DengOO
MEWcat in a dogs worldOO
LAYERSolayerOO
PUMPPump.funOO
DOODDoodlesOO
WIFdogwifhat-O
DRIFTDriftO-
SONICSonic SVMO-
ORCAOrcaOO
BOMEBOOK OF MEME-O
PNUTPeanut-O
TNSRTensor-O
FIDABonfida-O
NEIRONeiro-O

Plus additional SPL tokens. Any token on Solana is supported.

Estimated total: ~32+ coins

@chainkit/tron (Secp256k1)

Covers Tron and all TRC-20 tokens.

Native: TRX

TokenNameUpbitBinance
TRXTronOO
BTTBitTorrentOO
JSTJUSTOO
SUNSunOO
WINWINkLink-O
USDTTether (TRC-20)OO

Estimated total: ~6 coins

@chainkit/ton (ED25519)

Covers TON and Jetton tokens.

Native: TON

TokenNameUpbitBinance
TONTON-O
NOTNotcoin-O
DOGSDOGS-O
HMSTRHamster Kombat-O
CATICatizen-O

Estimated total: ~5 coins

@chainkit/cosmos (Secp256k1)

Covers Cosmos Hub and all Cosmos SDK / IBC-connected chains. Supports custom bech32 prefixes.

Native: ATOM

TokenChainUpbitBinance
ATOMCosmos HubOO
INJInjectiveOO
SEISeiOO
TIACelestiaOO
OMMANTRAOO
AKTAkashO-
DYDXdYdX v4-O
OSMOOsmosis-O
RUNETHORChain-O
LUNATerra-O
LUNCTerra Classic-O
SAGASaga-O
DYMDymension-O
INITInitia-O
BANDBand Protocol-O
SCRTSecret-O
KAVAKava (also EVM)OO
STEEMSteemOO
HIVEHiveOO

Note: Any Cosmos SDK chain with IBC support can use this package with a custom bech32 prefix.

Estimated total: ~21 coins

@chainkit/kaia (Secp256k1)

Covers Kaia (prev Klaytn) and KIP-7 tokens. EVM-compatible with klay_ RPC prefix.

Native: KAIA (KLAY)

TokenNameUpbitBinance
KAIAKaia-O
BORABORAO-
MBLMovieBlocOO
MLKMiL.kO-
MVLMVLO-
MEDMediBlocO-
METAMetadiumO-
MOCMoss CoinO-
CBKCobakO-
DKAdKargoO-
HUNTHuntO-

Estimated total: ~13 coins

@chainkit/polkadot (SR25519)

Covers Polkadot, Kusama, and all Substrate-based parachains. Supports custom SS58 network prefixes.

Native: DOT

TokenChainUpbitBinance
DOTPolkadotOO
KSMKusama-O
ASTRAstarOO
GLMRMoonbeam-O
MOVRMoonriver-O
PHAPhala-O
POLYXPolymeshOO
CFGCentrifugeOO

Estimated total: ~8 coins

@chainkit/xrp (Secp256k1)

Native: XRP

TokenNameUpbitBinance
XRPXRPOO
RLUSDRipple USD-O

Estimated total: ~2 coins

@chainkit/sui (ED25519)

Native: SUI

TokenNameUpbitBinance
SUISuiOO
WALWalrusOO
DEEPDeepBookOO
CETUSCetus-O
HAEDALHaedal-O

Estimated total: ~5 coins

@chainkit/aptos (ED25519)

Native: APT

TokenUpbitBinance
APTOO

Estimated total: ~1 coin

@chainkit/near (ED25519)

Native: NEAR

TokenUpbitBinance
NEAROO

Estimated total: ~1 coin

@chainkit/cardano (ED25519)

Native: ADA

TokenUpbitBinance
ADAOO

Estimated total: ~1 coin

@chainkit/stellar (ED25519)

Native: XLM

TokenUpbitBinance
XLMOO

Estimated total: ~1 coin

@chainkit/starknet (STARK)

Native: STRK

TokenUpbitBinance
STRK-O

Estimated total: ~1 coin

@chainkit/stacks (Secp256k1)

Native: STX

TokenUpbitBinance
STXOO

Estimated total: ~1 coin

@chainkit/eos (Secp256k1)

Native: A (Vaulta, prev EOS)

TokenUpbitBinance
A (EOS)OO

Estimated total: ~1 coin

@chainkit/hedera (ED25519)

Native: HBAR

Hedera provides two signers:

  • HederaSigner (default, ED25519) -- Hedera-native transactions with public key alias addresses
  • HederaEcdsaSigner (Secp256k1) -- EVM-compatible mode with 0x addresses, for use with Hedera's EVM relay
TokenUpbitBinance
HBAROO

Estimated total: ~1 coin

@chainkit/filecoin (Secp256k1)

Native: FIL

TokenUpbitBinance
FILOO

Estimated total: ~1 coin

@chainkit/icp (ED25519)

Native: ICP

TokenUpbitBinance
ICPOO

Estimated total: ~1 coin

@chainkit/algorand (ED25519)

Native: ALGO

TokenUpbitBinance
ALGOOO

Estimated total: ~1 coin

@chainkit/vechain (Secp256k1)

Native: VET

TokenUpbitBinance
VET-O
VTHO-O

Estimated total: ~2 coins

@chainkit/tezos (ED25519)

Native: XTZ

TokenUpbitBinance
XTZOO

Estimated total: ~1 coin

@chainkit/theta (Secp256k1)

Native: THETA

TokenUpbitBinance
THETAOO
TFUELOO

Estimated total: ~2 coins

@chainkit/multiversx (ED25519)

Native: EGLD

TokenUpbitBinance
EGLD-O

Estimated total: ~1 coin

@chainkit/iota (ED25519)

Native: IOTA

TokenUpbitBinance
IOTA-O

Estimated total: ~1 coin

@chainkit/neo (Secp256r1)

Native: NEO

TokenUpbitBinance
NEO-O
GAS-O

Estimated total: ~2 coins

@chainkit/flow (ECDSA_P256)

Native: FLOW

TokenUpbitBinance
FLOWOO

Estimated total: ~1 coin

@chainkit/icon (Secp256k1)

Native: ICX

TokenUpbitBinance
ICXOO

Estimated total: ~1 coin

@chainkit/mina (Pasta)

Native: MINA

TokenUpbitBinance
MINA-O

Estimated total: ~1 coin

Security

Key security properties:

  • No third-party chain SDKs -- eliminates supply chain attack surface
  • All crypto via Cure53-audited libraries -- @noble/hashes, @noble/secp256k1, @noble/ed25519, @scure/bip39, @scure/base
  • Private key zeroing -- SecureKey stores keys as Uint8Array, explicitly zeroed via destroy()
  • Address validation before signing -- recipient addresses validated against chain format before transaction construction
  • ChainId enforcement for EVM -- extra.chainId required, preventing cross-chain replay attacks
  • strictHttps option -- reject non-HTTPS RPC endpoints in production
  • Nonce mutex -- concurrent send() calls use a serialized nonce counter to prevent nonce collisions
  • RPC response validation -- JSON-RPC 2.0 structure verification and request/response ID matching
  • URL redaction -- API keys in RPC URLs are never exposed in error messages
  • Bitcoin fee sanity check -- fee cannot exceed 50% of total input value
  • Network enforcement -- Bitcoin signer rejects addresses from wrong network (mainnet/testnet)
  • Mnemonic validation -- invalid mnemonics rejected before seed derivation
  • Strategy auto-downgrade -- signing clients using fastest strategy automatically downgrade to failover
  • Input sanitization -- send() strips signing-critical fields (outputs, inputs) from user-provided options

Independently audited with 24 security findings identified and remediated.

Playground

Try it live -- no installation required

ChainKit includes a browser-based playground for testing all 30 chains interactively.

Features

FeatureDescription
Global WalletEnter one mnemonic, derive addresses for all 30 chains instantly
Per-Chain TestingSelect any chain to test balance queries, transaction signing, RPC connectivity
Address ValidationReal-time validation with checksum verification per chain
Copy & Explorer LinksOne-click copy addresses, direct links to block explorers
Dark ThemeMonospace-friendly UI designed for crypto data

Run Locally

cd playground
pnpm install
pnpm dev

Architecture

@chainkit/client (unified multi-chain client)
  |
  +-- createClient() --> ReadOnlyChainInstance (no key = read-only)
  |                  --> FullChainInstance     (key provided = read+write)
  |                      +-- send()              auto nonce+fee, sign, broadcast
  |                      +-- prepareTransaction() build unsigned tx
  |                      +-- waitForTransaction() poll until confirmed
  |                      +-- destroy()            zero key material
  |
  +-- @chainkit/core
  |     +-- ChainSigner interface    (generateMnemonic, derivePrivateKey, getAddress,
  |     |                             signTransaction, signMessage, validateAddress,
  |     |                             getDefaultHdPath)
  |     +-- ChainProvider interface  (getBalance, getTransaction, getBlock, getNonce,
  |     |                             estimateFee, broadcastTransaction, getChainInfo,
  |     |                             waitForTransaction)
  |     +-- Capabilities             (ContractCapable, TokenCapable, UtxoCapable,
  |     |                             SubscriptionCapable, EvmSignerCapable)
  |     +-- RpcManager               (failover, round-robin, fastest, strictHttps)
  |     +-- ABI Encoder/Decoder      (encodeFunctionCall, decodeFunctionResult, ERC20 presets)
  |     +-- SecureKey                (Uint8Array key storage with explicit zeroing)
  |     +-- Crypto utilities         (BIP39 mnemonic, BIP32 HD derivation via @scure/bip39
  |                                   + @noble/hashes)
  |
  +-- @chainkit/<chain>
        +-- signer.ts    (offline: key generation, address derivation, tx signing,
        |                 message signing)
        +-- provider.ts  (online: RPC queries, balance, blocks, broadcasting,
        |                 token ops)
        +-- types.ts     (chain-specific types)

License

MIT

Keywords

blockchain

FAQs

Package last updated on 17 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts