UNPKG

interchainjs

Version:

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

36 lines (35 loc) 1.17 kB
import { buildTx } from "../../../helper-func-types"; import { MsgGrant, MsgExec, MsgRevoke } from "./tx"; /** * Grant grants the provided authorization to the grantee on the granter's * account with the provided expiration time. If there is already a grant * for the given (granter, grantee, Authorization) triple, then the grant * will be overwritten. * @name grant * @package cosmos.authz.v1beta1 * @see proto service: cosmos.authz.v1beta1.Grant */ export const grant = buildTx({ msg: MsgGrant }); /** * Exec attempts to execute the provided messages using * authorizations granted to the grantee. Each message should have only * one signer corresponding to the granter of the authorization. * @name exec * @package cosmos.authz.v1beta1 * @see proto service: cosmos.authz.v1beta1.Exec */ export const exec = buildTx({ msg: MsgExec }); /** * Revoke revokes any authorization corresponding to the provided method name on the * granter's account that has been granted to the grantee. * @name revoke * @package cosmos.authz.v1beta1 * @see proto service: cosmos.authz.v1beta1.Revoke */ export const revoke = buildTx({ msg: MsgRevoke });