@synonymdev/lightning-channel-id

0.0.3 • Public • Published

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'
}

/@synonymdev/lightning-channel-id/

    Package Sidebar

    Install

    npm i @synonymdev/lightning-channel-id

    Weekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    4.93 kB

    Total Files

    5

    Last publish

    Collaborators

    • dzdidi_restored
    • pwltr
    • miguelmedeirosweb
    • rbndg
    • bitcoinerrorlog
    • jayvdb
    • coreyphillips
    • nzh