Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@samouraiwallet/bip47

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samouraiwallet/bip47

A set of utilities for working with BIP47 and bitcoinjs-lib

  • 0.6.1
  • npm
  • Socket score

Version published
Weekly downloads
49
increased by44.12%
Maintainers
1
Weekly downloads
 
Created
Source

BIP47

A set of utilities for working with BIP47 and bitcoinjs-lib.

This library uses ES Modules. Node.js v14 or later is required.

Source code was written in Typescript. Type definitions are included in the published bundle.

Usage

All necessary documentation of usage is provided via test files.

Mainnet

import {PaymentCode} from '@samouraiwallet/bip47';

const b58PCode = 'PM8TJS2JxQ5ztXUpBBRnpTbcUXbUHy2T1abfrb3KkAAtMEGNbey4oumH7Hc578WgQJhPjBxteQ5GHHToTYHE3A1w6p7tU6KSoFmWBVbFGjKPisZDbP97';

const pcode = PaymentCode.fromBase58(b58PCode);
const notifAddr = pcode.getNotificationAddress();

const myPrivKey0 = Buffer.from('8d6a8ecd8ee5e0042ad0cb56e3a971c760b5145c3917a8e7beaf0ed92d7a520c', 'hex');
const paymentAddr1 = pcode.getPaymentAddress(myPrivKey0, 1);
const paymentAddr2 = pcode.getPaymentAddress(myPrivKey0, 2);

Testnet

import {PaymentCode, utils} from '@samouraiwallet/bip47';

const networks = utils.networks;

const b58PCode = 'PM8TJS2JxQ5ztXUpBBRnpTbcUXbUHy2T1abfrb3KkAAtMEGNbey4oumH7Hc578WgQJhPjBxteQ5GHHToTYHE3A1w6p7tU6KSoFmWBVbFGjKPisZDbP97';

const pcode = PaymentCode.fromBase58(b58PCode, networks.testnet);
const notifAddr = pcode.getNotificationAddress();

Keywords

FAQs

Package last updated on 25 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc