Typescript SDK
CCL IBC SDK for typescript developers
Typescript Demo
Dependencies
npm install --save @solar-republic/neutrinonpm install --save @cosmjs/crypto @cosmjs/amino @cosmjs/encodingnpm install --save @cosmjs/stargate
# or
npm install --save @cosmjs/cosmwasm-stargateGenerating Wallets
import { Slip10Curve, Random, Bip39, Slip10, stringToPath, Secp256k1 } from "@cosmjs/crypto"
const seed = await Bip39.mnemonicToSeed(Bip39.encode(Random.getBytes(16)));
const { privateKey } = Slip10.derivePath(Slip10Curve.Secp256k1, seed, stringToPath("m/44'/1'/0'/0"));
const pair = await Secp256k1.makeKeypair(privateKey);
// must be compressed to 33 bytes from 65
const publicKey = Secp256k1.compressPubkey(pair.pubkey);Query Client
Signatures
Browser Wallets
Getting Signer and Signer Address
Generating the message and StdSignDoc
StdSignDocEncryption
Encrypting + Signing
Broadcasting the message
Last updated
Was this helpful?