Permissions
The Permissions Module facilitates the management of namespaces, roles, and permissions within the Injective ecosystem. This documentation outlines the key message types and their usage for interacting with permissions-related data.
Messages
Let's explore (and provide examples) the Messages that the Permissions module exports and we can use to interact with the Injective chain.
MsgClaimVoucher
MsgClaimVoucherThis message is used to claim a voucher tied to a specific address within a namespace.
import {
MsgClaimVoucher,
MsgBroadcasterWithPk,
} from "@injectivelabs/sdk-ts";
import { Network } from "@injectivelabs/networks";
const injectiveAddress = "inj1...";
const privateKey = "0x...";
const denom = "inj";
const msg = MsgClaimVoucher.fromJSON({
injectiveAddress,
denom,
});
const txHash = await new MsgBroadcasterWithPk({
privateKey,
network: Network.Testnet
}).broadcast({
msgs: msg
});
console.log(txHash);
MsgCreateNamespace
MsgCreateNamespaceThis message is used to creates a new namespace with permissions and roles.
MsgDeleteNamespace
MsgDeleteNamespaceThis message is used to delete an existing namespace.
MsgRevokeNamespaceRoles
MsgRevokeNamespaceRolesThis message is used to revoke roles from specified addresses in a namespace.
MsgUpdateNamespace
MsgUpdateNamespaceThis message is used to update namespace properties like mints, sends, and burns.
MsgUpdateNamespaceRoles
MsgUpdateNamespaceRolesThis message is used to modify the roles and permissions for addresses in a namespace.
Last updated
