codechain-primitives
v1.0.4
Published
JavaScript classes for CodeChain primitives
Downloads
1,326
Keywords
Readme
codechain-primitives-js
JavaScript functions and classes for CodeChain primitives
Installing a package
# npm
npm install codechain-primitives
# yarn
yarn add codechain-primitives
Getting started
// Using require
var primitives = require("codechain-primitives");
var H256 = primitives.H256;
var blake256 = primitives.blake256;
// Using import
import { blake256, H256 } from "codechain-primitives";
Functions
- blake256
- blake256WithKey
- ripemd160
- signEcdsa
- verifyEcdsa
- recoverEcdsa
- generatePrivateKey
- getPublicFromPrivate
- toHex
- getAccountIdFromPrivate
- getAccountIdFromPublic
Classes
- H128, H160, H256, H512
- U64, U128, U256
- AssetAddres
- PlatformAddress