@terra-rebels/msg-reader
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

@terra-rebels/msg-reader

Convert common terra.js msg to a sentence

Installation

npm i @terra-rebels/msg-reader

Example codes

import { Coins, Coin, MsgSend } from "@terra-rebels/terra.js"
import { readMsg } from "@terra-rebels/msg-reader"

const coins = new Coins([new Coin("uluna", 1000000), new Coin("ukrw", 1000000)])

const address = "terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v"
const recipient = "terra17lmam6zguazs5q5u6z5mmx76uj63gldnse2pdp"

const msg = new MsgSend(address, recipient, [coin])

console.log(readMsg(msg))
// Send 1 Luna to terra17lmam6zguazs5q5u6z5mmx76uj63gldnse2pdp

Readme

Keywords

none

Package Sidebar

Install

npm i @terra-rebels/msg-reader

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

21.2 kB

Total Files

14

Last publish

Collaborators

  • echel0n