Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Utility methods for working with BOLT 09
Feature flag details for feature flag bit
{
bit: <Feature Flag Bit Number>
}
@throws
<Error>
@returns
{
[type]: <Feature Flag Type String>
}
Example:
const {featureFlagDetails} = require('bolt09');
const {type} = featureFlagDetails({bit: 0});
// Type is string descriptor of feature bit
Encode feature flags into hex serialized bytes
{
features: [<Feature Bit Number>]
}
@throws
<Error>
@returns
{
encoded: <Serialized Feature Bits Hex Encoded String>
}
Example:
const {featureFlagsAsHex} = require('bolt09');
const {encoded} = featureFlagsAsHex({features: [0]});
// Encoded is hex encoded string with a length uint16 prefix
Encode feature flags into a serialized data buffer
{
features: [<Feature Bit Number>]
}
@throws
<Error>
@returns
{
words: [<Bech32 Word Number>]
}
Example:
const {featureFlagsAsWords} = require('bolt09');
const {words} = featureFlagsAsWords({features: [0]});
// Words are word numbers that can be used for encoding in a bolt11 payment req
Feature flags from hex serialized feature flags
{
[hex]: <Data Length Prefixed Hex Encoded String>
}
@throws
<Error>
@returns
{
features: [{
bit: <Feature Bit Number>
is_required: <Feature Bit is Required Bool>
type: <Feature Bit Type String>
}]
}
Example:
const {featureFlagsFromHex} = require('bolt09');
const {features} = featureFlagsFromHex({hex: '00018C'});
// Features is an array of supported features
Feature flags from BOLT 11 tag words
{
words: [<BOLT11 Tag Word Number>]
}
@throws
<Error>
@returns
{
features: [{
bit: <Feature Bit Number>
is_required: <Feature Bit is Required Bool>
type: <Feature Bit Type String>
}]
}
Example:
const {featureFlagsFromWords} = require('bolt09');
const {features} = featureFlagsFromWords({words: [16, 0]});
// Features is an array of supported features
0.1.5
featureFlagDetails
: Add support for anchor channels and anchor zero fee transactionsFAQs
BOLT 09 helper methods
The npm package bolt09 receives a total of 6,235 weekly downloads. As such, bolt09 popularity was classified as popular.
We found that bolt09 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.