@catalyst-net-js/wallet
v0.3.7
Published
Utilities for handling Catalyst keys
Downloads
37
Readme
Catalyst-js/wallet
Status: Active development. This repository is being actively worked on, mostly in feature branches.
Install
npm install @catalyst-js/wallet
Usage
Constructors
import Wallet from '@catalyst-net-js/wallet'
// create an instance based on a new random key
const wallet = Wallet.generate();
// create an instance based on a raw private key
const wallet = Wallet.generateFromPrivateKey(privateKey);
// create an instance based on a seed
const wallet = Wallet.generateFromSeed(seed);
Instance methods
// return the private key
const privateKey = wallet.getPrivateKey();
// return the private key as a base32 string
const privateKeyString = wallet.getPrivateKeyString();
// return the private key
const privateKey = wallet.getPublicKey();
// return the private key as a base32 string
const privateKeyString = wallet.getPublicKeyString();