@dcspark/cip5-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

CIP5-JS

This is a reference implementation of Cardano's CIP5 which defines standard prefixes (or so-called human-readable part in the bech32) encoding format) for various bech32-encoded binary data across the Cardano ecosystem.

Install

npm i @dcspark/cip5-js --save

Usage

import Cip5 from "@dcspark/cip5-js";
import { bech32 } from "bech32";
const bech32Info = bech32.decode(address);

if (bech32Info.prefix === Cip5.hashes.addr_vkh) {
  // whatever parsing logic you want
}

/@dcspark/cip5-js/

    Package Sidebar

    Install

    npm i @dcspark/cip5-js

    Weekly Downloads

    7

    Version

    1.0.0

    License

    Apache-2.0 OR MIT

    Unpacked Size

    27.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • robkorn
    • sebastiengllmt