0.0.2 • Published 2 years ago

@nerds.sh/elrond-decoder v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Nerds' Elrond Decoder

Npm package for decoding Elrond smart contract queries based on ABIs.

Installation

Using npm:

npm install -E elrond-decoder

Using yarn:

yarn add -E elrond-decoder

Example

const { decode } = require('@nerds.sh/elrond-decoder')

const input = {
	abi: {
		type: 'file',
		value: './raffle.abi.json',
	},
	contract: 'erd1qqqqqqqqqqqqqpgqvul86784zrj47hkn0y0pd4pzn8qyw0z6c32q558mf5',
	environment: 'devnet',
	func: 'getWinners',
    // optional preserveTypes flag to preserve type information
}

decode(input)
    .then(console.log)
    .catch(console.error)