@olympus-protocol/bip32-bls
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

bip32-bls

A BIP32 compatible library using BLS12-381 written in TypeScript with transpiled JavaScript committed to git.

Requirements

To work with BIP32 keys using BLS you first need to initialize the bls module using the bls wasm library

Example

TypeScript

import * as bip32 from '@olympus-protocol/bip32-bls';
import * as bls from '@olympus-protocol/bls-wasm';
import { BIP32Interface } from '@olympus-protocol/bip32-bls';

bls.initModule().then( (mod) => {
    let node: BIP32Interface = bip32.fromBase58(mod, 'xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi');
    let child: BIP32Interface = node.derivePath('m/0/0');
})

NodeJS

let bip32 = require('@olympus-protocol/bip32-bls')
let bls = require('@olympus-protocol/bls-wasm');

bls.initModule().then( (mod) => {
    let node: BIP32Interface = bip32.fromBase58(mod, 'xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi');
    let child = node.derivePath('m/0/0')
})

/@olympus-protocol/bip32-bls/

    Package Sidebar

    Install

    npm i @olympus-protocol/bip32-bls

    Weekly Downloads

    1

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    17 kB

    Total Files

    13

    Last publish

    Collaborators

    • eabz