@archwayhq/arch3-proto
Version:
Protobuf definitions and RPC clients for the Archway Network
344 lines (343 loc) • 14.1 kB
TypeScript
import { DecCoin, DecCoinAmino, Coin, CoinAmino } from "../../../cosmos/base/v1beta1/coin";
import { Timestamp } from "../../../google/protobuf/timestamp";
import { BinaryReader, BinaryWriter } from "../../../binary";
/** Params defines the module parameters. */
export interface Params {
/**
* inflation_rewards_ratio defines the percentage of minted inflation tokens
* that are used for dApp rewards [0.0, 1.0]. If set to 0.0, no inflation
* rewards are distributed.
*/
inflationRewardsRatio: string;
/**
* tx_fee_rebate_ratio defines the percentage of tx fees that are used for
* dApp rewards [0.0, 1.0]. If set to 0.0, no fee rewards are distributed.
*/
txFeeRebateRatio: string;
/**
* max_withdraw_records defines the maximum number of RewardsRecord objects
* used for the withdrawal operation.
*/
maxWithdrawRecords: bigint;
/**
* min_price_of_gas defines the minimum price for each single unit of gas in
* the network. during the min consensus fee ante handler we will be taking
* the max between min consensus fee and minimum price of gas to compute the
* minimum tx computational fees, which are independent from contract flat
* fees (premiums)
*/
minPriceOfGas: DecCoin;
}
export interface ParamsProtoMsg {
typeUrl: "/archway.rewards.v1.Params";
value: Uint8Array;
}
/** Params defines the module parameters. */
export interface ParamsAmino {
/**
* inflation_rewards_ratio defines the percentage of minted inflation tokens
* that are used for dApp rewards [0.0, 1.0]. If set to 0.0, no inflation
* rewards are distributed.
*/
inflation_rewards_ratio?: string;
/**
* tx_fee_rebate_ratio defines the percentage of tx fees that are used for
* dApp rewards [0.0, 1.0]. If set to 0.0, no fee rewards are distributed.
*/
tx_fee_rebate_ratio?: string;
/**
* max_withdraw_records defines the maximum number of RewardsRecord objects
* used for the withdrawal operation.
*/
max_withdraw_records?: string;
/**
* min_price_of_gas defines the minimum price for each single unit of gas in
* the network. during the min consensus fee ante handler we will be taking
* the max between min consensus fee and minimum price of gas to compute the
* minimum tx computational fees, which are independent from contract flat
* fees (premiums)
*/
min_price_of_gas?: DecCoinAmino;
}
export interface ParamsAminoMsg {
type: "/archway.rewards.v1.Params";
value: ParamsAmino;
}
/**
* ContractMetadata defines the contract rewards distribution options for a
* particular contract.
*/
export interface ContractMetadata {
/** contract_address defines the contract address (bech32 encoded). */
contractAddress: string;
/**
* owner_address is the contract owner address that can modify contract reward
* options (bech32 encoded). That could be the contract admin or the contract
* itself. If owner_address is set to contract address, contract can modify
* the metadata on its own using WASM bindings.
*/
ownerAddress: string;
/**
* rewards_address is an address to distribute rewards to (bech32 encoded).
* If not set (empty), rewards are not distributed for this contract.
*/
rewardsAddress: string;
/**
* withdraw_to_wallet is a flag that defines if rewards should be immediately
* withdrawn to the wallet instead of creating a rewards record to be lazily
* withdrawn after.
*/
withdrawToWallet: boolean;
}
export interface ContractMetadataProtoMsg {
typeUrl: "/archway.rewards.v1.ContractMetadata";
value: Uint8Array;
}
/**
* ContractMetadata defines the contract rewards distribution options for a
* particular contract.
*/
export interface ContractMetadataAmino {
/** contract_address defines the contract address (bech32 encoded). */
contract_address?: string;
/**
* owner_address is the contract owner address that can modify contract reward
* options (bech32 encoded). That could be the contract admin or the contract
* itself. If owner_address is set to contract address, contract can modify
* the metadata on its own using WASM bindings.
*/
owner_address?: string;
/**
* rewards_address is an address to distribute rewards to (bech32 encoded).
* If not set (empty), rewards are not distributed for this contract.
*/
rewards_address?: string;
/**
* withdraw_to_wallet is a flag that defines if rewards should be immediately
* withdrawn to the wallet instead of creating a rewards record to be lazily
* withdrawn after.
*/
withdraw_to_wallet?: boolean;
}
export interface ContractMetadataAminoMsg {
type: "/archway.rewards.v1.ContractMetadata";
value: ContractMetadataAmino;
}
/** BlockRewards defines block related rewards distribution data. */
export interface BlockRewards {
/** height defines the block height. */
height: bigint;
/** inflation_rewards is the rewards to be distributed. */
inflationRewards: Coin;
/**
* max_gas defines the maximum gas for the block that is used to distribute
* inflation rewards (consensus parameter).
*/
maxGas: bigint;
}
export interface BlockRewardsProtoMsg {
typeUrl: "/archway.rewards.v1.BlockRewards";
value: Uint8Array;
}
/** BlockRewards defines block related rewards distribution data. */
export interface BlockRewardsAmino {
/** height defines the block height. */
height?: string;
/** inflation_rewards is the rewards to be distributed. */
inflation_rewards?: CoinAmino;
/**
* max_gas defines the maximum gas for the block that is used to distribute
* inflation rewards (consensus parameter).
*/
max_gas?: string;
}
export interface BlockRewardsAminoMsg {
type: "/archway.rewards.v1.BlockRewards";
value: BlockRewardsAmino;
}
/** TxRewards defines transaction related rewards distribution data. */
export interface TxRewards {
/**
* tx_id is the tracking transaction ID (x/tracking is the data source for
* this value).
*/
txId: bigint;
/** height defines the block height. */
height: bigint;
/** fee_rewards is the rewards to be distributed. */
feeRewards: Coin[];
}
export interface TxRewardsProtoMsg {
typeUrl: "/archway.rewards.v1.TxRewards";
value: Uint8Array;
}
/** TxRewards defines transaction related rewards distribution data. */
export interface TxRewardsAmino {
/**
* tx_id is the tracking transaction ID (x/tracking is the data source for
* this value).
*/
tx_id?: string;
/** height defines the block height. */
height?: string;
/** fee_rewards is the rewards to be distributed. */
fee_rewards?: CoinAmino[];
}
export interface TxRewardsAminoMsg {
type: "/archway.rewards.v1.TxRewards";
value: TxRewardsAmino;
}
/**
* RewardsRecord defines a record that is used to distribute rewards later (lazy
* distribution). This record is being created by the x/rewards EndBlocker and
* pruned after the rewards are distributed. An actual rewards x/bank transfer
* might be triggered by a Tx (via CLI for example) or by a contract via WASM
* bindings. For a contract to trigger rewards transfer, contract address must
* be set as the rewards_address in a corresponding ContractMetadata.
*/
export interface RewardsRecord {
/** id is the unique ID of the record. */
id: bigint;
/** rewards_address is the address to distribute rewards to (bech32 encoded). */
rewardsAddress: string;
/** rewards are the rewards to be transferred later. */
rewards: Coin[];
/** calculated_height defines the block height of rewards calculation event. */
calculatedHeight: bigint;
/** calculated_time defines the block time of rewards calculation event. */
calculatedTime: Timestamp;
}
export interface RewardsRecordProtoMsg {
typeUrl: "/archway.rewards.v1.RewardsRecord";
value: Uint8Array;
}
/**
* RewardsRecord defines a record that is used to distribute rewards later (lazy
* distribution). This record is being created by the x/rewards EndBlocker and
* pruned after the rewards are distributed. An actual rewards x/bank transfer
* might be triggered by a Tx (via CLI for example) or by a contract via WASM
* bindings. For a contract to trigger rewards transfer, contract address must
* be set as the rewards_address in a corresponding ContractMetadata.
*/
export interface RewardsRecordAmino {
/** id is the unique ID of the record. */
id?: string;
/** rewards_address is the address to distribute rewards to (bech32 encoded). */
rewards_address?: string;
/** rewards are the rewards to be transferred later. */
rewards?: CoinAmino[];
/** calculated_height defines the block height of rewards calculation event. */
calculated_height?: string;
/** calculated_time defines the block time of rewards calculation event. */
calculated_time?: string;
}
export interface RewardsRecordAminoMsg {
type: "/archway.rewards.v1.RewardsRecord";
value: RewardsRecordAmino;
}
/** FlatFee defines the flat fee for a particular contract. */
export interface FlatFee {
/** contract_address defines the contract address (bech32 encoded). */
contractAddress: string;
/** flat_fee defines the minimum flat fee set by the contract_owner */
flatFee: Coin;
}
export interface FlatFeeProtoMsg {
typeUrl: "/archway.rewards.v1.FlatFee";
value: Uint8Array;
}
/** FlatFee defines the flat fee for a particular contract. */
export interface FlatFeeAmino {
/** contract_address defines the contract address (bech32 encoded). */
contract_address?: string;
/** flat_fee defines the minimum flat fee set by the contract_owner */
flat_fee?: CoinAmino;
}
export interface FlatFeeAminoMsg {
type: "/archway.rewards.v1.FlatFee";
value: FlatFeeAmino;
}
export declare const Params: {
typeUrl: string;
encode(message: Params, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Params;
fromJSON(object: any): Params;
toJSON(message: Params): unknown;
fromPartial(object: Partial<Params>): Params;
fromAmino(object: ParamsAmino): Params;
toAmino(message: Params): ParamsAmino;
fromAminoMsg(object: ParamsAminoMsg): Params;
fromProtoMsg(message: ParamsProtoMsg): Params;
toProto(message: Params): Uint8Array;
toProtoMsg(message: Params): ParamsProtoMsg;
};
export declare const ContractMetadata: {
typeUrl: string;
encode(message: ContractMetadata, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): ContractMetadata;
fromJSON(object: any): ContractMetadata;
toJSON(message: ContractMetadata): unknown;
fromPartial(object: Partial<ContractMetadata>): ContractMetadata;
fromAmino(object: ContractMetadataAmino): ContractMetadata;
toAmino(message: ContractMetadata): ContractMetadataAmino;
fromAminoMsg(object: ContractMetadataAminoMsg): ContractMetadata;
fromProtoMsg(message: ContractMetadataProtoMsg): ContractMetadata;
toProto(message: ContractMetadata): Uint8Array;
toProtoMsg(message: ContractMetadata): ContractMetadataProtoMsg;
};
export declare const BlockRewards: {
typeUrl: string;
encode(message: BlockRewards, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): BlockRewards;
fromJSON(object: any): BlockRewards;
toJSON(message: BlockRewards): unknown;
fromPartial(object: Partial<BlockRewards>): BlockRewards;
fromAmino(object: BlockRewardsAmino): BlockRewards;
toAmino(message: BlockRewards): BlockRewardsAmino;
fromAminoMsg(object: BlockRewardsAminoMsg): BlockRewards;
fromProtoMsg(message: BlockRewardsProtoMsg): BlockRewards;
toProto(message: BlockRewards): Uint8Array;
toProtoMsg(message: BlockRewards): BlockRewardsProtoMsg;
};
export declare const TxRewards: {
typeUrl: string;
encode(message: TxRewards, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): TxRewards;
fromJSON(object: any): TxRewards;
toJSON(message: TxRewards): unknown;
fromPartial(object: Partial<TxRewards>): TxRewards;
fromAmino(object: TxRewardsAmino): TxRewards;
toAmino(message: TxRewards): TxRewardsAmino;
fromAminoMsg(object: TxRewardsAminoMsg): TxRewards;
fromProtoMsg(message: TxRewardsProtoMsg): TxRewards;
toProto(message: TxRewards): Uint8Array;
toProtoMsg(message: TxRewards): TxRewardsProtoMsg;
};
export declare const RewardsRecord: {
typeUrl: string;
encode(message: RewardsRecord, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): RewardsRecord;
fromJSON(object: any): RewardsRecord;
toJSON(message: RewardsRecord): unknown;
fromPartial(object: Partial<RewardsRecord>): RewardsRecord;
fromAmino(object: RewardsRecordAmino): RewardsRecord;
toAmino(message: RewardsRecord): RewardsRecordAmino;
fromAminoMsg(object: RewardsRecordAminoMsg): RewardsRecord;
fromProtoMsg(message: RewardsRecordProtoMsg): RewardsRecord;
toProto(message: RewardsRecord): Uint8Array;
toProtoMsg(message: RewardsRecord): RewardsRecordProtoMsg;
};
export declare const FlatFee: {
typeUrl: string;
encode(message: FlatFee, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): FlatFee;
fromJSON(object: any): FlatFee;
toJSON(message: FlatFee): unknown;
fromPartial(object: Partial<FlatFee>): FlatFee;
fromAmino(object: FlatFeeAmino): FlatFee;
toAmino(message: FlatFee): FlatFeeAmino;
fromAminoMsg(object: FlatFeeAminoMsg): FlatFee;
fromProtoMsg(message: FlatFeeProtoMsg): FlatFee;
toProto(message: FlatFee): Uint8Array;
toProtoMsg(message: FlatFee): FlatFeeProtoMsg;
};