UNPKG

interchainjs

Version:

InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.

68 lines (67 loc) 2.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MessageComposer = exports.registry = void 0; const tx_1 = require("./tx"); exports.registry = [["/cosmos.authz.v1beta1.MsgGrant", tx_1.MsgGrant], ["/cosmos.authz.v1beta1.MsgExec", tx_1.MsgExec], ["/cosmos.authz.v1beta1.MsgRevoke", tx_1.MsgRevoke]]; exports.MessageComposer = { encoded: { grant(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: tx_1.MsgGrant.encode(value).finish() }; }, exec(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: tx_1.MsgExec.encode(value).finish() }; }, revoke(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: tx_1.MsgRevoke.encode(value).finish() }; } }, withTypeUrl: { grant(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value }; }, exec(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value }; }, revoke(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value }; } }, fromPartial: { grant(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: tx_1.MsgGrant.fromPartial(value) }; }, exec(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: tx_1.MsgExec.fromPartial(value) }; }, revoke(value) { return { typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: tx_1.MsgRevoke.fromPartial(value) }; } } };