Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 641 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 641 Bytes

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
}