UNPKG

@firmachain/firma-js

Version:

The Official FirmaChain Javascript SDK written in Typescript

77 lines (76 loc) 3.13 kB
/// <reference types="long" /> import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin"; import _m0 from "protobufjs/minimal"; import { Writer } from "protobufjs/minimal"; import { Any } from "../google/protobuf/any"; import { Duration } from "../google/protobuf/duration"; export interface MsgGrantAllowance { granter: string; grantee: string; allowance: Any | undefined; } export interface MsgRevokeAllowance { granter: string; grantee: string; } export declare const MsgGrantAllowance: { encode(message: MsgGrantAllowance, writer?: _m0.Writer): _m0.Writer; fromPartial(object: DeepPartial<MsgGrantAllowance>): MsgGrantAllowance; }; export declare const MsgRevokeAllowance: { encode(message: MsgRevokeAllowance, writer?: _m0.Writer): _m0.Writer; fromPartial(object: DeepPartial<MsgRevokeAllowance>): MsgRevokeAllowance; }; export interface BasicAllowance { /** * spend_limit specifies the maximum amount of tokens that can be spent * by this allowance and will be updated as tokens are spent. If it is * empty, there is no spend limit and any amount of coins can be spent. */ spendLimit: Coin[]; /** expiration specifies an optional time when this allowance expires */ expiration: Date | undefined; } export interface PeriodicAllowance { /** basic specifies a struct of `BasicAllowance` */ basic: BasicAllowance | undefined; /** * period specifies the time duration in which period_spend_limit coins can * be spent before that allowance is reset */ period: Duration | undefined; /** * period_spend_limit specifies the maximum number of coins that can be spent * in the period */ periodSpendLimit: Coin[]; /** period_can_spend is the number of coins left to be spent before the period_reset time */ periodCanSpend: Coin[]; /** * period_reset is the time at which this period resets and a new one begins, * it is calculated from the start time of the first transaction after the * last period ended */ periodReset: Date | undefined; } /** AllowedMsgAllowance creates allowance only for specified message types. */ export interface AllowedMsgAllowance { /** allowance can be any of basic and filtered fee allowance. */ allowance: Any | undefined; /** allowed_messages are the messages for which the grantee has the access. */ allowedMessages: string[]; } export declare const AllowedMsgAllowance: { encode(message: AllowedMsgAllowance, writer?: Writer): Writer; }; export declare const PeriodicAllowance: { encode(message: PeriodicAllowance, writer?: Writer): Writer; }; export declare const BasicAllowance: { encode(message: BasicAllowance, writer?: Writer): Writer; }; declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined | Long; export declare 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 {};