https://github.com/codechain-io/foundry-primitives-js
Primitive types used by Foundry
https://github.com/codechain-io/foundry-primitives-js
Last synced: 7 months ago
JSON representation
Primitive types used by Foundry
- Host: GitHub
- URL: https://github.com/codechain-io/foundry-primitives-js
- Owner: CodeChain-io
- Created: 2020-02-18T10:26:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-02T01:02:28.000Z (about 2 years ago)
- Last Synced: 2024-11-20T11:04:33.290Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 97.7 KB
- Stars: 3
- Watchers: 7
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# foundry-primitives-js [](https://travis-ci.org/CodeChain-io/foundry-primitives-js)
JavaScript functions and classes for Foundry primitives
## Installing a package
```sh
# npm
npm install foundry-primitives
# yarn
yarn add foundry-primitives
```## Getting started
```javascript
// 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## API Documentation
[https://codechain-io.github.io/foundry-primitives-js](https://codechain-io.github.io/foundry-primitives-js)