import Long from "long"; import _m0 from "protobufjs/minimal"; import { Coin } from "../../../cosmos/base/v1beta1/coin"; import { Duration } from "../../../google/protobuf/duration"; /** Params defines the module parameters for the x/oracle module. */ export interface Params { /** VotePeriod defines the number of blocks during which voting takes place. */ votePeriod: Long; /** * VoteThreshold specifies the minimum proportion of votes that must be * received for a ballot to pass. */ voteThreshold: string; /** * RewardBand defines a maximum divergence that a price vote can have from the * weighted median in the ballot. If a vote lies within the valid range * defined by: * μ := weightedMedian, * validRange := μ ± (μ * rewardBand / 2), * then rewards are added to the validator performance. * Note that if the reward band is smaller than 1 standard * deviation, the band is taken to be 1 standard deviation.a price */ rewardBand: string; /** * The set of whitelisted markets, or asset pairs, for the module. * Ex. '["unibi:uusd","ubtc:uusd"]' */ whitelist: string[]; /** * SlashFraction returns the proportion of an oracle's stake that gets * slashed in the event of slashing. `SlashFraction` specifies the exact * penalty for failing a voting period. */ slashFraction: string; /** * SlashWindow returns the number of voting periods that specify a * "slash window". After each slash window, all oracles that have missed more * than the penalty threshold are slashed. Missing the penalty threshold is * synonymous with submitting fewer valid votes than `MinValidPerWindow`. */ slashWindow: Long; minValidPerWindow: string; /** * Amount of time to look back for TWAP calculations. * Ex: "900.000000069s" corresponds to 900 seconds and 69 nanoseconds in JSON. */ twapLookbackWindow?: Duration; /** * The minimum number of voters (i.e. oracle validators) per pair for it to be * considered a passing ballot. Recommended at least 4. */ minVoters: Long; /** The validator fee ratio that is given to validators every epoch. */ validatorFeeRatio: string; expirationBlocks: Long; } /** * Struct for aggregate prevoting on the ExchangeRateVote. * The purpose of aggregate prevote is to hide vote exchange rates with hash * which is formatted as hex string in * SHA256("{salt}:({pair},{exchange_rate})|...|({pair},{exchange_rate}):{voter}") */ export interface AggregateExchangeRatePrevote { hash: string; voter: string; submitBlock: Long; } /** * MsgAggregateExchangeRateVote - struct for voting on * the exchange rates different assets. */ export interface AggregateExchangeRateVote { exchangeRateTuples: ExchangeRateTuple[]; voter: string; } /** ExchangeRateTuple - struct to store interpreted exchange rates data to store */ export interface ExchangeRateTuple { pair: string; exchangeRate: string; } export interface ExchangeRateAtBlock { exchangeRate: string; createdBlock: Long; /** * Block timestamp for the block where the oracle came to consensus for this * price. This timestamp is a conventional Unix millisecond time, i.e. the * number of milliseconds elapsed since January 1, 1970 UTC. */ blockTimestampMs: Long; } /** * Rewards defines a credit object towards validators * which provide prices faithfully for different pairs. */ export interface Rewards { /** id uniquely identifies the rewards instance of the pair */ id: Long; /** * vote_periods defines the vote periods left in which rewards will be * distributed. */ votePeriods: Long; /** Coins defines the amount of coins to distribute in a single vote period. */ coins: Coin[]; } export declare const Params: { encode(message: Params, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Params; fromJSON(object: any): Params; toJSON(message: Params): unknown; create, I>>(base?: I): Params; fromPartial, I>>(object: I): Params; }; export declare const AggregateExchangeRatePrevote: { encode(message: AggregateExchangeRatePrevote, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AggregateExchangeRatePrevote; fromJSON(object: any): AggregateExchangeRatePrevote; toJSON(message: AggregateExchangeRatePrevote): unknown; create, I>>(base?: I): AggregateExchangeRatePrevote; fromPartial, I>>(object: I): AggregateExchangeRatePrevote; }; export declare const AggregateExchangeRateVote: { encode(message: AggregateExchangeRateVote, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AggregateExchangeRateVote; fromJSON(object: any): AggregateExchangeRateVote; toJSON(message: AggregateExchangeRateVote): unknown; create, I>>(base?: I): AggregateExchangeRateVote; fromPartial, I>>(object: I): AggregateExchangeRateVote; }; export declare const ExchangeRateTuple: { encode(message: ExchangeRateTuple, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ExchangeRateTuple; fromJSON(object: any): ExchangeRateTuple; toJSON(message: ExchangeRateTuple): unknown; create, I>>(base?: I): ExchangeRateTuple; fromPartial, I>>(object: I): ExchangeRateTuple; }; export declare const ExchangeRateAtBlock: { encode(message: ExchangeRateAtBlock, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ExchangeRateAtBlock; fromJSON(object: any): ExchangeRateAtBlock; toJSON(message: ExchangeRateAtBlock): unknown; create, I>>(base?: I): ExchangeRateAtBlock; fromPartial, I>>(object: I): ExchangeRateAtBlock; }; export declare const Rewards: { encode(message: Rewards, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Rewards; fromJSON(object: any): Rewards; toJSON(message: Rewards): unknown; create, I>>(base?: I): Rewards; fromPartial, I>>(object: I): Rewards; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & { [K in Exclude>]: never; }; export {}; //# sourceMappingURL=oracle.d.ts.map