New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dappid

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dappid

dappid

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

BDIP-2 Codec

BITBOX lib for encoding/decoding BDIP-2

Installation

npm install dappid --save

Usage

Encode BDIP-2

// require lib
let dappid = require('dappid')

// create instance
let d = new dappid()

// encode BDIP-2
d.encodeBDIP2(
  '00',
  '0000',
  '00',
  'BitcoinCashApp',
  '0eac357541b0ba572849113c5faa1d1990f6382741dc3e2f5507e3ca8346dc0e',
  'web3bch.cash',
  'Hello Bitcoin Cash'
)

// OP_RETURN 64617070 00 0000 00 426974636f696e43617368417070 0eac357541b0ba572849113c5faa1d1990f6382741dc3e2f5507e3ca8346dc0e 776562336263682e63617368 48656c6c6f20426974636f696e2043617368

Decode BDIP-2

d.decodeBDIP2(
  'OP_RETURN 64617070 00 0000 00 426974636f696e43617368417070 0eac357541b0ba572849113c5faa1d1990f6382741dc3e2f5507e3ca8346dc0e 776562336263682e63617368 48656c6c6f20426974636f696e2043617368'
)

// { magicNumber: '64617070',
//   txType: '00',
//   txVersion: '0000',
//   appType: '00',
//   name: 'itcoinCashApp',
//   protocolSpec: '0eac357541b0ba572849113c5faa1d1990f6382741dc3e2f5507e3ca8346dc0e',
//   url: '119,101,98,bch.cash',
//   metaData: 'ello Bitcoin Cash' }

FAQs

Package last updated on 03 Nov 2018

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