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

bolt07

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bolt07 - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

lib/chan_format.js

9

index.js

@@ -0,1 +1,2 @@

const {chanFormat} = require('./lib');
const {chanNumber} = require('./lib');

@@ -6,3 +7,9 @@ const {decodeChanId} = require('./lib');

module.exports = {chanNumber, decodeChanId, encodeChanId, rawChanId};
module.exports = {
chanFormat,
chanNumber,
decodeChanId,
encodeChanId,
rawChanId,
};

@@ -13,2 +13,5 @@ const BN = require('bn.js');

@throws
<ExpectedChannelIdOrComponentsToConvertToNumber Error>
@returns

@@ -15,0 +18,0 @@ {

4

lib/components_from_buffer.js
const {blockIndexByteLen} = require('./constants');
const {blockIndexOffset} = require('./constants');
const {decBase} = require('./constants');
const {heightByteLen} = require('./constants');

@@ -19,3 +18,4 @@ const {heightByteOffset} = require('./constants');

@throws
<Error>
<ExpectedChannelIdBuffer Error>
<UnexpectedByteCountForShortChannelId Error>

@@ -22,0 +22,0 @@ @returns

@@ -6,3 +6,2 @@ const {blockIndexByteLen} = require('./constants');

const {decBase} = require('./constants');
const {endian} = require('./constants');
const {heightByteLen} = require('./constants');

@@ -25,3 +24,5 @@ const {heightByteOffset} = require('./constants');

@throws
<Error>
<ExpectedShortChannelIdToDecode Error>
<UnexpectedErrorDecodingChannelIdNumber Error>
<UnexpectedLengthOfShortChannelId Error>

@@ -36,2 +37,3 @@ @returns

module.exports = ({channel, id, number}) => {
// Exit early when there is no need to decode components from a buffer
if (!!channel) {

@@ -38,0 +40,0 @@ const [height, blockIndex, outputindex] = channel.split(chanDelimiter);

@@ -22,7 +22,9 @@ const BN = require('bn.js');

@throws
<Error>
<ExpectedBlockHeightForChannelId Error>
<ExpectedBlockIndexForChannelId Error>
<ExpectedTransactionOutputIndexForChannelId Error>
@returns
{
channel: <Channel Components String>
channel: <Channel Components Format String>
id: <Channel Id Hex String>

@@ -34,3 +36,3 @@ number: <Channel Number String>

if (args.block_height === undefined) {
throw new Error('ExpectedBlockHeightForChannelid');
throw new Error('ExpectedBlockHeightForChannelId');
}

@@ -37,0 +39,0 @@

@@ -0,1 +1,2 @@

const chanFormat = require('./chan_format');
const chanNumber = require('./chan_number');

@@ -6,3 +7,9 @@ const decodeChanId = require('./decode_chan_id');

module.exports = {chanNumber, decodeChanId, encodeChanId, rawChanId};
module.exports = {
chanFormat,
chanNumber,
decodeChanId,
encodeChanId,
rawChanId,
};

@@ -11,3 +11,3 @@ {

"devDependencies": {
"tap": "12.1.0"
"tap": "12.1.1"
},

@@ -32,3 +32,3 @@ "keywords": [

},
"version": "1.3.0"
"version": "1.4.0"
}
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