Socket
Socket
Sign inDemoInstall

@synonymdev/lightning-channel-id

Package Overview
Dependencies
1
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @synonymdev/lightning-channel-id

Convert lightning channel id formats


Version published
Weekly downloads
3
increased by200%
Maintainers
7
Install size
121 kB
Created
Weekly downloads
 

Readme

Source

lightning-channel-id-js

Convert between various channel id formats in Lightning network.

Usage


npm install @synonymdev/lightning-channel-id

const parseChannelId = require("lightning-channel-js")

parseChannelId("807896954914930688") // long channel id format
parseChannelId("734778:1235:0") // : seperated
parseChannelId("734778x1235x0") // x seperated 
parseChannelId("734778$1235$0","$) // custom marker

// All of the above should output same result
{
  block: '734778',
  tx: '1235',
  output: '0',
  lnd_notation: '807896954914930688',
  cln_format: '734778:1235:0'
}


FAQs

Last updated on 23 May 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc