Package Exports
- @olympus-protocol/bip32-bls
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@olympus-protocol/bip32-bls) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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')
})