interchainjs
Version:
InterchainJS is a JavaScript library for interacting with Cosmos SDK based blockchains.
65 lines (64 loc) • 1.87 kB
JavaScript
import { MsgGrant, MsgExec, MsgRevoke } from "./tx";
export const registry = [["/cosmos.authz.v1beta1.MsgGrant", MsgGrant], ["/cosmos.authz.v1beta1.MsgExec", MsgExec], ["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke]];
export const MessageComposer = {
encoded: {
grant(value) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgGrant",
value: MsgGrant.encode(value).finish()
};
},
exec(value) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgExec",
value: MsgExec.encode(value).finish()
};
},
revoke(value) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
value: 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: MsgGrant.fromPartial(value)
};
},
exec(value) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgExec",
value: MsgExec.fromPartial(value)
};
},
revoke(value) {
return {
typeUrl: "/cosmos.authz.v1beta1.MsgRevoke",
value: MsgRevoke.fromPartial(value)
};
}
}
};