Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dcspark/cip5-js
A JS / Typescript implementation of CIP5 (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0005)
https://github.com/dcspark/cip5-js
Last synced: about 1 month ago
JSON representation
A JS / Typescript implementation of CIP5 (https://github.com/cardano-foundation/CIPs/tree/master/CIP-0005)
- Host: GitHub
- URL: https://github.com/dcspark/cip5-js
- Owner: dcSpark
- License: apache-2.0
- Created: 2022-04-27T09:37:07.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-20T08:21:14.000Z (almost 2 years ago)
- Last Synced: 2024-11-17T08:47:16.711Z (about 2 months ago)
- Language: TypeScript
- Size: 63.5 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CIP5-JS
This is a reference implementation of Cardano's [CIP5](https://github.com/cardano-foundation/CIPs/tree/master/CIP-0005) which defines standard prefixes (or so-called human-readable part in the [bech32](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)) encoding format) for various bech32-encoded binary data across the Cardano ecosystem.
## Install
```sh
npm i @dcspark/cip5-js --save
```## Usage
```js
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
}
```