Rune Decoder
A simple JavaScript libary for decoding runes.
Still in Beta and may have some bugs and may have breaking API changes in future
Install
Install directly from the repo:
Yarn
yarn add https://github.com/clams-tech/rune-decoder
NPM
npm i https://github.com/clams-tech/rune-decoder
Usage
Using the decode method you can get a similar result to that of passing a rune to the Core Lightning Decode method:
import { decode } from 'decode-rune'
const rune =
'aTEhoWOAllxYDgWSUyGPEKVeUwr-MG_Il1HXZis1MYs9NCZtZXRob2RebGlzdHxtZXRob2ReZ2V0fG1ldGhvZD1zdW1tYXJ5Jm1ldGhvZC9saXN0ZGF0YXN0b3Jl'
const decoded = decode(rune)
console.log(decoded)
If a rune is invalid, null
will be returned.