Package Exports
- foundry-primitives
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (foundry-primitives) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
foundry-primitives-js
JavaScript functions and classes for Foundry primitives
Installing a package
# npm
npm install foundry-primitives
# yarn
yarn add foundry-primitivesGetting started
// Using require
var primitives = require("foundry-primitives");
var H256 = primitives.H256;
var blake256 = primitives.blake256;
// Using import
import { blake256, H256 } from "foundry-primitives";Functions
- blake256
- blake256WithKey
- ripemd160
- signEd25519
- verifyEd25519
- generatePrivateKey
- getPublicFromPrivate
- toHex
- toArray
- getAccountIdFromPrivate
- getAccountIdFromPublic
Classes
- H128, H160, H256, H512
- U64, U128, U256
- Address