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

doichain

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doichain - npm Package Compare versions

Comparing version 0.1.15 to 0.1.16

11

lib/getInputAddress.js

@@ -13,6 +13,9 @@ import { getElectrumClient } from "./network";

export const getInputAddress = async (address) => {
let script = bitcoin.address.toOutputScript(address);
let hash = bitcoin.crypto.sha256(script);
export const getInputAddress = async (address, o_options) => {
let options = {}
if(o_options===undefined || o_options.network===undefined)
options.network=bitcoin.networks.bitcoin
else options.network = o_options.network
const script = bitcoin.address.toOutputScript(address,options.network);
const hash = bitcoin.crypto.sha256(script);
let reversedHash = new Buffer.from(hash.reverse());

@@ -19,0 +22,0 @@ console.log(address, " maps to ", reversedHash.toString("hex"))

{
"name": "doichain",
"version": "0.1.15",
"version": "0.1.16",
"description": "A js-Doichain library. The goal is to fully cover the Doichain protocol",

@@ -5,0 +5,0 @@ "main": "index.js",

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