JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q36362F
  • License MIT

Package Exports

  • bitcoinjs-api
  • bitcoinjs-api/index.js

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 (bitcoinjs-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

BitcoinJS (bitcoinjs-api)

A library to simplify the NPM package bitcoinjs-lib.

Released under the terms of the MIT LICENSE.

Installation

npm install bitcoinjs-api

npm install ecpair bip32 tiny-secp256k1

Documentation

  • Generate Legacy key pair
const bitcoinjsapi  = require('bitcoinjs-api');

const keypair = new bitcoinjsapi.Bitcoin().generateKeypairLegacy();

console.log(keypair.privateKey);
console.log(keypair.address);
  • Generate Segwit key pair
const bitcoinjsapi  = require('bitcoinjs-api');

const keypair = new bitcoinjsapi.Bitcoin().generateKeypairSegwit();

console.log(keypair.privateKey);
console.log(keypair.address);
  • Generate Legacy address from WIF
const bitcoinjsapi  = require('bitcoinjs-api');

const address = new bitcoinjsapi.Bitcoin().generateLegacyAddress(WIF);

console.log(address);