@tangleid/mnid
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@tangleid/mnid

Utilities for Multi Network Identifier (MNID).

Installation

Install using npm:

npm install @tangleid/mnid

or using yarn:

yarn add @tangleid/mnid

Network Identifiers

Used to describe which Tangle network interacts.

Identitier Network
0x1 Tangle Mainnet
0x2 Tangle Devnet

API Reference

mnid~generateChecksum(payload)

Param Type Description
payload Array.<Buffer> payload.

Generate checksum from the payload

Returns: - 4-bytes checksum of the payload.

mnid~encodeToMnid(params)

Param Type Description
params object Encode parameters.
params.network string Network identifier.
params.address string Address in 81-trytes format.

Encode MNID with specific network and address.

Returns: string - MNID

mnid~decodeFromMnid(mnid)

Param Type Description
mnid string MNID will be decoded.

Decode infromation of network and address from MNID.

Returns: Object - The infromation of network and address.

Readme

Keywords

none

Package Sidebar

Install

npm i @tangleid/mnid

Weekly Downloads

8

Version

1.2.0

License

MIT

Unpacked Size

17.1 kB

Total Files

13

Last publish

Collaborators

  • ender503