Typescript Utilities for Provenance Blockchain Wallet
Import the dependency
npm install @provenanceio/wallet-utils --save
The package json import will look like this: "@provenanceio/wallet-utils": "^0.2.0"
Below is a quick example of how to use the utils to prepare a message:
import { buildMessage, createAnyMessageBase64 } from "@provenanceio/wallet-utils";
const type = 'MsgDelegate';
const sendMessage = {
delegatorAddress,
validatorAddress,
amount: { denom: 'nhash', amount: sendAmountNHash },
};
const messageMsgSend = buildMessage(type, sendMessage);
const message = createAnyMessageBase64(type, messageMsgSend as Message);
node >= 16.14
(LTS)npm >= 8.0
(included with node 16)
It's recommended to use
n
(GitHub) ornvm
(GitHub) to manage your local node/npm versions
Read the contributing guide to learn about our development process, how to submit bugfixes and improvements, and how to build and test your changes.