chain-nodelib
v0.3.0
Published
Crypto.com Chain library for Node.js
Downloads
4
Readme
Crypto.com Chain library for Node.js
This repository contains the Node.js library for interacting with Crypto.com Chain.
Warning
Crypto.com Chain and this library is currently in the alpha development phase and subjects to changes. Before proceeding, please be aware of the following:
This library is not production-ready, do not use in production systems.
Do not transfer any ERC20 tokens to addresses generated by this sample code as it can cause loss of funds.
Crypto.com is not liable for any potential damage, loss of data/files arising from the use of the library.
Installation
Build manually
Clone this repository to your project
git clone https://github.com/crypto-com/chain-nodelib
Install and build
chain-nodelib
cd chain-node-lib npm install npm build
Add chain-nodelib to your
package.json
{ ... "dependencies": { "@cryptocom/chain-nodelib": "file:./chain-nodelib", } }
NPM
Right now the library has not been published to NPM yet. It will be available once a publishable version is ready.
Examples
An example is worth a thousand words, we provide code examples of different use cases below.
If you couldn't find an example for your use case, please open an issue and tell us.
Address
- Generate random transfer address
- Create transfer address from private/public key
- Generate random staking address
- Create staking address from private/public key
View Key
Transaction
Staking and Council Node
- Create deposit transaction
- Create unbond transaction
- Create withdraw staked transaction
- Create node-join transaction
- Create unjail transaction
HD Wallet
- Generate mnemonic words
- Restore from mnemonic words and create addresses and view key at bip39 path
- Create addresses and view key at Crypto.com chain default bip44 path
- create at particular path with format argument
- Spend UTXO of transfer address generated with HD wallet
Browser support
Right now the library does not support Browser.