@asoltys/blech32
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Blech32.js

build status

A Elements extended BIP173 compatible Blech32 encoding/decoding library.

Example

Check out tests that also demonstrate how to serialize a pubkey and a witness program for generating a confidential address.

Installation

Install dependencies:

$ npm install

Build (with Emscripten installed via emsdk):

$ source path/to/emsdk_env.sh
$ emcc src/blech32.c -o src/blech32.js -O3 -s WASM=0 -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "getValue", "setValue", "allocate", "intArrayFromString", "ALLOC_NORMAL"]' -s EXPORT_ALL=1 -s LINKABLE=1 -s NO_EXIT_RUNTIME=1

Build (with Docker)

$ git submodule update --init
$ docker build -t blech32-js .
$ npm run compile

Bundle

$ browserify lib/index.js --standalone blech32 > bundle.js

Test

$ npm run test

Credits

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i @asoltys/blech32

    Weekly Downloads

    2

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    1.88 MB

    Total Files

    15

    Last publish

    Collaborators

    • asoltys