@catalyst-net-js/wallet

Utilities for handling Catalyst keys

Usage no npm install needed!

<script type="module">
  import catalystNetJsWallet from 'https://cdn.skypack.dev/@catalyst-net-js/wallet';
</script>

README

ReDoc logo

Catalyst-js/wallet

Discord Twitter Follow

A lightweight wallet implementation.

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(); 

License

GPLv3