UNPKG

@firmachain/firma-js

Version:

The Official FirmaChain Javascript SDK written in Typescript

146 lines (145 loc) 6.08 kB
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin"; import { Any } from "../google/protobuf/any"; import { BinaryWriter } from "cosmjs-types/binary"; import { Timestamp } from "cosmjs-types/google/protobuf/timestamp"; export interface GenericAuthorization { /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */ msg: string; } export interface Grant { authorization?: Any; expiration?: Timestamp; } export interface MsgGrant { granter: string; grantee: string; grant?: Grant; } /** MsgExecResponse defines the Msg/MsgExecResponse response type. */ export interface MsgExecResponse { results: Uint8Array[]; } /** * MsgExec 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. */ export interface MsgExec { grantee: string; /** * Authorization Msg requests to execute. Each msg must implement Authorization interface * The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) * triple and validate it. */ msgs: Any[]; } /** MsgGrantResponse defines the Msg/MsgGrant response type. */ export interface MsgGrantResponse { } /** * MsgRevoke revokes any authorization with the provided sdk.Msg type on the * granter's account with that has been granted to the grantee. */ export interface MsgRevoke { granter: string; grantee: string; msgTypeUrl: string; } /** MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. */ export interface MsgRevokeResponse { } export declare const MsgGrant: { encode(message: MsgGrant, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<MsgGrant>): MsgGrant; }; export declare const MsgExecResponse: { encode(message: MsgExecResponse, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<MsgExecResponse>): MsgExecResponse; }; export declare const MsgExec: { encode(message: MsgExec, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<MsgExec>): MsgExec; }; export declare const MsgGrantResponse: { encode(_: MsgGrantResponse, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<MsgGrantResponse>): MsgGrantResponse; }; export declare const MsgRevoke: { encode(message: MsgRevoke, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<MsgRevoke>): MsgRevoke; }; export declare const MsgRevokeResponse: { encode(_: MsgRevokeResponse, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<MsgRevokeResponse>): MsgRevokeResponse; }; export declare const Grant: { encode(message: Grant, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<Grant>): Grant; }; export declare const GenericAuthorization: { encode(message: GenericAuthorization, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<GenericAuthorization>): GenericAuthorization; }; /** * AuthorizationType defines the type of staking module authorization type * * Since: cosmos-sdk 0.43 */ export declare enum AuthorizationType { /** AUTHORIZATION_TYPE_UNSPECIFIED - AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type */ AUTHORIZATION_TYPE_UNSPECIFIED = 0, /** AUTHORIZATION_TYPE_DELEGATE - AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate */ AUTHORIZATION_TYPE_DELEGATE = 1, /** AUTHORIZATION_TYPE_UNDELEGATE - AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate */ AUTHORIZATION_TYPE_UNDELEGATE = 2, /** AUTHORIZATION_TYPE_REDELEGATE - AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate */ AUTHORIZATION_TYPE_REDELEGATE = 3, UNRECOGNIZED = -1 } export declare function authorizationTypeFromJSON(object: any): AuthorizationType; export declare function authorizationTypeToJSON(object: AuthorizationType): string; /** * StakeAuthorization defines authorization for delegate/undelegate/redelegate. * * Since: cosmos-sdk 0.43 */ export interface StakeAuthorization { /** * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is * empty, there is no spend limit and any amount of coins can be delegated. */ maxTokens?: Coin; /** * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's * account. */ allowList?: StakeAuthorization_Validators | undefined; /** deny_list specifies list of validator addresses to whom grantee can not delegate tokens. */ denyList?: StakeAuthorization_Validators | undefined; /** authorization_type defines one of AuthorizationType. */ authorizationType: AuthorizationType; } /** Validators defines list of validator addresses. */ export interface StakeAuthorization_Validators { address: string[]; } export declare const StakeAuthorization: { encode(message: StakeAuthorization, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<StakeAuthorization>): StakeAuthorization; }; export declare const StakeAuthorization_Validators: { encode(message: StakeAuthorization_Validators, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<StakeAuthorization_Validators>): StakeAuthorization_Validators; }; export interface SendAuthorization { spendLimit: Coin[]; } export declare const SendAuthorization: { encode(message: SendAuthorization, writer?: BinaryWriter): BinaryWriter; fromPartial(object: DeepPartial<SendAuthorization>): SendAuthorization; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | bigint; export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>; export {};