Skip to content

JavaScript functions and classes for CodeChain primitives

License

Notifications You must be signed in to change notification settings

CodeChain-io/codechain-primitives-js

Repository files navigation

codechain-primitives-js npm version Build Status codecov

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

API Documentation

https://codechain-io.github.io/codechain-primitives-js

About

JavaScript functions and classes for CodeChain primitives

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published