// Since: cosmos-sdk 0.43 // @generated by protoc-gen-es v1.3.1 with parameter "target=ts" // @generated from file cosmos/feegrant/v1beta1/feegrant.proto (package cosmos.feegrant.v1beta1, syntax proto3) /* eslint-disable */ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Any, Duration, Message, proto3, Timestamp } from "@bufbuild/protobuf"; import { Coin } from "../../base/v1beta1/coin_pb.js"; /** * BasicAllowance implements Allowance with a one-time grant of coins * that optionally expires. The grantee can use up to SpendLimit to cover fees. * * @generated from message cosmos.feegrant.v1beta1.BasicAllowance */ export class BasicAllowance extends Message { /** * spend_limit specifies the maximum amount of coins that can be spent * by this allowance and will be updated as coins are spent. If it is * empty, there is no spend limit and any amount of coins can be spent. * * @generated from field: repeated cosmos.base.v1beta1.Coin spend_limit = 1; */ spendLimit: Coin[] = []; /** * expiration specifies an optional time when this allowance expires * * @generated from field: google.protobuf.Timestamp expiration = 2; */ expiration?: Timestamp; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.feegrant.v1beta1.BasicAllowance"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "spend_limit", kind: "message", T: Coin, repeated: true }, { no: 2, name: "expiration", kind: "message", T: Timestamp }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): BasicAllowance { return new BasicAllowance().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): BasicAllowance { return new BasicAllowance().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): BasicAllowance { return new BasicAllowance().fromJsonString(jsonString, options); } static equals(a: BasicAllowance | PlainMessage | undefined, b: BasicAllowance | PlainMessage | undefined): boolean { return proto3.util.equals(BasicAllowance, a, b); } } /** * PeriodicAllowance extends Allowance to allow for both a maximum cap, * as well as a limit per time period. * * @generated from message cosmos.feegrant.v1beta1.PeriodicAllowance */ export class PeriodicAllowance extends Message { /** * basic specifies a struct of `BasicAllowance` * * @generated from field: cosmos.feegrant.v1beta1.BasicAllowance basic = 1; */ basic?: BasicAllowance; /** * period specifies the time duration in which period_spend_limit coins can * be spent before that allowance is reset * * @generated from field: google.protobuf.Duration period = 2; */ period?: Duration; /** * period_spend_limit specifies the maximum number of coins that can be spent * in the period * * @generated from field: repeated cosmos.base.v1beta1.Coin period_spend_limit = 3; */ periodSpendLimit: Coin[] = []; /** * period_can_spend is the number of coins left to be spent before the period_reset time * * @generated from field: repeated cosmos.base.v1beta1.Coin period_can_spend = 4; */ 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 * * @generated from field: google.protobuf.Timestamp period_reset = 5; */ periodReset?: Timestamp; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.feegrant.v1beta1.PeriodicAllowance"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "basic", kind: "message", T: BasicAllowance }, { no: 2, name: "period", kind: "message", T: Duration }, { no: 3, name: "period_spend_limit", kind: "message", T: Coin, repeated: true }, { no: 4, name: "period_can_spend", kind: "message", T: Coin, repeated: true }, { no: 5, name: "period_reset", kind: "message", T: Timestamp }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): PeriodicAllowance { return new PeriodicAllowance().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): PeriodicAllowance { return new PeriodicAllowance().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): PeriodicAllowance { return new PeriodicAllowance().fromJsonString(jsonString, options); } static equals(a: PeriodicAllowance | PlainMessage | undefined, b: PeriodicAllowance | PlainMessage | undefined): boolean { return proto3.util.equals(PeriodicAllowance, a, b); } } /** * AllowedMsgAllowance creates allowance only for specified message types. * * @generated from message cosmos.feegrant.v1beta1.AllowedMsgAllowance */ export class AllowedMsgAllowance extends Message { /** * allowance can be any of basic and periodic fee allowance. * * @generated from field: google.protobuf.Any allowance = 1; */ allowance?: Any; /** * allowed_messages are the messages for which the grantee has the access. * * @generated from field: repeated string allowed_messages = 2; */ allowedMessages: string[] = []; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.feegrant.v1beta1.AllowedMsgAllowance"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "allowance", kind: "message", T: Any }, { no: 2, name: "allowed_messages", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): AllowedMsgAllowance { return new AllowedMsgAllowance().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): AllowedMsgAllowance { return new AllowedMsgAllowance().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): AllowedMsgAllowance { return new AllowedMsgAllowance().fromJsonString(jsonString, options); } static equals(a: AllowedMsgAllowance | PlainMessage | undefined, b: AllowedMsgAllowance | PlainMessage | undefined): boolean { return proto3.util.equals(AllowedMsgAllowance, a, b); } } /** * Grant is stored in the KVStore to record a grant with full context * * @generated from message cosmos.feegrant.v1beta1.Grant */ export class Grant extends Message { /** * granter is the address of the user granting an allowance of their funds. * * @generated from field: string granter = 1; */ granter = ""; /** * grantee is the address of the user being granted an allowance of another user's funds. * * @generated from field: string grantee = 2; */ grantee = ""; /** * allowance can be any of basic, periodic, allowed fee allowance. * * @generated from field: google.protobuf.Any allowance = 3; */ allowance?: Any; constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); } static readonly runtime: typeof proto3 = proto3; static readonly typeName = "cosmos.feegrant.v1beta1.Grant"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "granter", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "grantee", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "allowance", kind: "message", T: Any }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Grant { return new Grant().fromBinary(bytes, options); } static fromJson(jsonValue: JsonValue, options?: Partial): Grant { return new Grant().fromJson(jsonValue, options); } static fromJsonString(jsonString: string, options?: Partial): Grant { return new Grant().fromJsonString(jsonString, options); } static equals(a: Grant | PlainMessage | undefined, b: Grant | PlainMessage | undefined): boolean { return proto3.util.equals(Grant, a, b); } }