@bandprotocol/bandchain.js
Version:
TypeScript library for Cosmos SDK and BandChain
1,363 lines • 53.9 kB
TypeScript
import { Coin, CoinAmino, CoinSDKType } from "../../../cosmos/base/v1beta1/coin";
import { BinaryReader, BinaryWriter } from "../../../binary";
/** ResolveStatus encodes the status of an oracle request. */
export declare enum ResolveStatus {
/** RESOLVE_STATUS_OPEN_UNSPECIFIED - Open - the request is not yet resolved. */
RESOLVE_STATUS_OPEN_UNSPECIFIED = 0,
/** RESOLVE_STATUS_SUCCESS - Success - the request has been resolved successfully with no errors. */
RESOLVE_STATUS_SUCCESS = 1,
/** RESOLVE_STATUS_FAILURE - Failure - an error occurred during the request's resolve call. */
RESOLVE_STATUS_FAILURE = 2,
/**
* RESOLVE_STATUS_EXPIRED - Expired - the request does not get enough reports from validator within the
* timeframe.
*/
RESOLVE_STATUS_EXPIRED = 3,
UNRECOGNIZED = -1
}
export declare const ResolveStatusSDKType: typeof ResolveStatus;
export declare const ResolveStatusAmino: typeof ResolveStatus;
export declare function resolveStatusFromJSON(object: any): ResolveStatus;
export declare function resolveStatusToJSON(object: ResolveStatus): string;
/** Encoder is an enumerator that defines the mode of encoding message in tss module. */
export declare enum Encoder {
/** ENCODER_UNSPECIFIED - ENCODER_UNSPECIFIED is for unspecified value */
ENCODER_UNSPECIFIED = 0,
/** ENCODER_PROTO - ENCODER_PROTO is for proto encoding */
ENCODER_PROTO = 1,
/** ENCODER_FULL_ABI - ENCODER_FULL_ABI is for ABI encoding for full data */
ENCODER_FULL_ABI = 2,
/** ENCODER_PARTIAL_ABI - ENCODER_PARTIAL_ABI is for ABI encoding for only important data */
ENCODER_PARTIAL_ABI = 3,
UNRECOGNIZED = -1
}
export declare const EncoderSDKType: typeof Encoder;
export declare const EncoderAmino: typeof Encoder;
export declare function encoderFromJSON(object: any): Encoder;
export declare function encoderToJSON(object: Encoder): string;
/** DataSource is the data structure for storing data sources in the storage. */
export interface DataSource {
/** Owner is an address of the account who own the data source */
owner: string;
/** Name is data source name used for display */
name: string;
/** Description is data source description used for display */
description: string;
/**
* Filename is string of file name used as reference for locating
* data source file stored in bandchain nodes
*/
filename: string;
/** Treasury is the account address who receive data source fee from requester. */
treasury: string;
/**
* Fee is the data source fee per ask_count that data provider will receive
* from requester.
*/
fee: Coin[];
}
export interface DataSourceProtoMsg {
typeUrl: "/band.oracle.v1.DataSource";
value: Uint8Array;
}
/** DataSource is the data structure for storing data sources in the storage. */
export interface DataSourceAmino {
/** Owner is an address of the account who own the data source */
owner?: string;
/** Name is data source name used for display */
name?: string;
/** Description is data source description used for display */
description?: string;
/**
* Filename is string of file name used as reference for locating
* data source file stored in bandchain nodes
*/
filename?: string;
/** Treasury is the account address who receive data source fee from requester. */
treasury?: string;
/**
* Fee is the data source fee per ask_count that data provider will receive
* from requester.
*/
fee?: CoinAmino[];
}
export interface DataSourceAminoMsg {
type: "/band.oracle.v1.DataSource";
value: DataSourceAmino;
}
/** DataSource is the data structure for storing data sources in the storage. */
export interface DataSourceSDKType {
owner: string;
name: string;
description: string;
filename: string;
treasury: string;
fee: CoinSDKType[];
}
/** OracleScript is the data structure for storing oracle scripts in the storage. */
export interface OracleScript {
/** Owner is an address of the account who own the oracle script */
owner: string;
/** Name is oracle script name used for display */
name: string;
/** Description is oracle script description used for display */
description: string;
/**
* Filename is string of file name used as reference for locating
* compiled oracle script WASM file stored in bandchain nodes
*/
filename: string;
/**
* Schema is the schema of the oracle script input/output
* which is formatted in OBI format e.g.
* "{symbol:string,multiplier:u64}/{px:u64}"
*/
schema: string;
/**
* SourceCodeURL is the URL of oracle script's source code.
* It is recommendded to store source code on IPFS and get its URL to preserve
* decentralization.
*/
sourceCodeUrl: string;
}
export interface OracleScriptProtoMsg {
typeUrl: "/band.oracle.v1.OracleScript";
value: Uint8Array;
}
/** OracleScript is the data structure for storing oracle scripts in the storage. */
export interface OracleScriptAmino {
/** Owner is an address of the account who own the oracle script */
owner?: string;
/** Name is oracle script name used for display */
name?: string;
/** Description is oracle script description used for display */
description?: string;
/**
* Filename is string of file name used as reference for locating
* compiled oracle script WASM file stored in bandchain nodes
*/
filename?: string;
/**
* Schema is the schema of the oracle script input/output
* which is formatted in OBI format e.g.
* "{symbol:string,multiplier:u64}/{px:u64}"
*/
schema?: string;
/**
* SourceCodeURL is the URL of oracle script's source code.
* It is recommendded to store source code on IPFS and get its URL to preserve
* decentralization.
*/
source_code_url?: string;
}
export interface OracleScriptAminoMsg {
type: "/band.oracle.v1.OracleScript";
value: OracleScriptAmino;
}
/** OracleScript is the data structure for storing oracle scripts in the storage. */
export interface OracleScriptSDKType {
owner: string;
name: string;
description: string;
filename: string;
schema: string;
source_code_url: string;
}
/** RawRequest is the data structure for storing raw requests in the storage. */
export interface RawRequest {
/** ExternalID is an ID of the raw request */
externalId: bigint;
/** DataSourceID is an ID of data source script that relates to the raw request */
dataSourceId: bigint;
/**
* Calldata is the data used as argument params for executing data source
* script
*/
calldata: Uint8Array;
}
export interface RawRequestProtoMsg {
typeUrl: "/band.oracle.v1.RawRequest";
value: Uint8Array;
}
/** RawRequest is the data structure for storing raw requests in the storage. */
export interface RawRequestAmino {
/** ExternalID is an ID of the raw request */
external_id?: string;
/** DataSourceID is an ID of data source script that relates to the raw request */
data_source_id?: string;
/**
* Calldata is the data used as argument params for executing data source
* script
*/
calldata?: string;
}
export interface RawRequestAminoMsg {
type: "/band.oracle.v1.RawRequest";
value: RawRequestAmino;
}
/** RawRequest is the data structure for storing raw requests in the storage. */
export interface RawRequestSDKType {
external_id: bigint;
data_source_id: bigint;
calldata: Uint8Array;
}
/** RawRequest is the data structure for storing raw reporter in the storage. */
export interface RawReport {
/** ExternalID is an ID of the raw request */
externalId: bigint;
/**
* ExitCode is status code provided by validators to specify error, if any.
* Exit code is usually filled by the exit code returned from execution of
* specified data source script. With code 0 means there is no error.
*/
exitCode: number;
/**
* Data is raw result provided by validators.
* It is usually filled by the result from execution of specified data source
* script.
*/
data: Uint8Array;
}
export interface RawReportProtoMsg {
typeUrl: "/band.oracle.v1.RawReport";
value: Uint8Array;
}
/** RawRequest is the data structure for storing raw reporter in the storage. */
export interface RawReportAmino {
/** ExternalID is an ID of the raw request */
external_id?: string;
/**
* ExitCode is status code provided by validators to specify error, if any.
* Exit code is usually filled by the exit code returned from execution of
* specified data source script. With code 0 means there is no error.
*/
exit_code?: number;
/**
* Data is raw result provided by validators.
* It is usually filled by the result from execution of specified data source
* script.
*/
data?: string;
}
export interface RawReportAminoMsg {
type: "/band.oracle.v1.RawReport";
value: RawReportAmino;
}
/** RawRequest is the data structure for storing raw reporter in the storage. */
export interface RawReportSDKType {
external_id: bigint;
exit_code: number;
data: Uint8Array;
}
/** Request is the data structure for storing requests in the storage. */
export interface Request {
/** OracleScriptID is ID of an oracle script */
oracleScriptId: bigint;
/** Calldata is the data used as argument params for the oracle script */
calldata: Uint8Array;
/**
* RequestedValidators is a list of validator addresses that are assigned for
* fulfilling the request
*/
requestedValidators: string[];
/**
* MinCount is minimum number of validators required for fulfilling the
* request
*/
minCount: bigint;
/** RequestHeight is block height that the request has been created */
requestHeight: bigint;
/** RequestTime is timestamp of the chain's block which contains the request */
requestTime: bigint;
/**
* ClientID is arbitrary id provided by requester.
* It is used by client-side for referencing the request
*/
clientId: string;
/**
* RawRequests is a list of raw requests specified by execution of oracle
* script
*/
rawRequests: RawRequest[];
/**
* IBCChannel is an IBC channel info of the other chain, which contains a
* channel and a port to allow bandchain connect to that chain. This field
* allows other chain be able to request data from bandchain via IBC.
*/
ibcChannel?: IBCChannel;
/** ExecuteGas is amount of gas to reserve for executing */
executeGas: bigint;
/** TSSEncoder is the mode of encoding oracle result signature order. */
tssEncoder: Encoder;
/** Requester is the address of person who requests the data. */
requester: string;
/** FeeLimit is the maximum tokens that will be paid for this request. */
feeLimit: Coin[];
}
export interface RequestProtoMsg {
typeUrl: "/band.oracle.v1.Request";
value: Uint8Array;
}
/** Request is the data structure for storing requests in the storage. */
export interface RequestAmino {
/** OracleScriptID is ID of an oracle script */
oracle_script_id?: string;
/** Calldata is the data used as argument params for the oracle script */
calldata?: string;
/**
* RequestedValidators is a list of validator addresses that are assigned for
* fulfilling the request
*/
requested_validators?: string[];
/**
* MinCount is minimum number of validators required for fulfilling the
* request
*/
min_count?: string;
/** RequestHeight is block height that the request has been created */
request_height?: string;
/** RequestTime is timestamp of the chain's block which contains the request */
request_time?: string;
/**
* ClientID is arbitrary id provided by requester.
* It is used by client-side for referencing the request
*/
client_id?: string;
/**
* RawRequests is a list of raw requests specified by execution of oracle
* script
*/
raw_requests?: RawRequestAmino[];
/**
* IBCChannel is an IBC channel info of the other chain, which contains a
* channel and a port to allow bandchain connect to that chain. This field
* allows other chain be able to request data from bandchain via IBC.
*/
ibc_channel?: IBCChannelAmino;
/** ExecuteGas is amount of gas to reserve for executing */
execute_gas?: string;
/** TSSEncoder is the mode of encoding oracle result signature order. */
tss_encoder?: Encoder;
/** Requester is the address of person who requests the data. */
requester?: string;
/** FeeLimit is the maximum tokens that will be paid for this request. */
fee_limit?: CoinAmino[];
}
export interface RequestAminoMsg {
type: "/band.oracle.v1.Request";
value: RequestAmino;
}
/** Request is the data structure for storing requests in the storage. */
export interface RequestSDKType {
oracle_script_id: bigint;
calldata: Uint8Array;
requested_validators: string[];
min_count: bigint;
request_height: bigint;
request_time: bigint;
client_id: string;
raw_requests: RawRequestSDKType[];
ibc_channel?: IBCChannelSDKType;
execute_gas: bigint;
tss_encoder: Encoder;
requester: string;
fee_limit: CoinSDKType[];
}
/** Report is the data structure for storing reports in the storage. */
export interface Report {
/** Validator is a validator address who submit the report */
validator: string;
/**
* InBeforeResolve indicates whether the report is submitted before the
* request resolved
*/
inBeforeResolve: boolean;
/**
* RawReports is list of raw reports provided by the validator.
* Each raw report has different external ID
*/
rawReports: RawReport[];
}
export interface ReportProtoMsg {
typeUrl: "/band.oracle.v1.Report";
value: Uint8Array;
}
/** Report is the data structure for storing reports in the storage. */
export interface ReportAmino {
/** Validator is a validator address who submit the report */
validator?: string;
/**
* InBeforeResolve indicates whether the report is submitted before the
* request resolved
*/
in_before_resolve?: boolean;
/**
* RawReports is list of raw reports provided by the validator.
* Each raw report has different external ID
*/
raw_reports?: RawReportAmino[];
}
export interface ReportAminoMsg {
type: "/band.oracle.v1.Report";
value: ReportAmino;
}
/** Report is the data structure for storing reports in the storage. */
export interface ReportSDKType {
validator: string;
in_before_resolve: boolean;
raw_reports: RawReportSDKType[];
}
/**
* OracleRequestPacketData encodes an oracle request sent from other blockchains
* to BandChain.
*/
export interface OracleRequestPacketData {
/**
* ClientID is the unique identifier of this oracle request, as specified by
* the client. This same unique ID will be sent back to the requester with the
* oracle response.
*/
clientId: string;
/**
* OracleScriptID is the unique identifier of the oracle script to be
* executed.
*/
oracleScriptId: bigint;
/**
* Calldata is the OBI-encoded calldata bytes available for oracle executor to
* read.
*/
calldata: Uint8Array;
/**
* AskCount is the number of validators that are requested to respond to this
* oracle request. Higher value means more security, at a higher gas cost.
*/
askCount: bigint;
/**
* MinCount is the minimum number of validators necessary for the request to
* proceed to the execution phase. Higher value means more security, at the
* cost of liveness.
*/
minCount: bigint;
/**
* FeeLimit is the maximum tokens that will be paid to all data source
* providers.
*/
feeLimit: Coin[];
/** PrepareGas is amount of gas to pay to prepare raw requests */
prepareGas: bigint;
/** ExecuteGas is amount of gas to reserve for executing */
executeGas: bigint;
/** TSSEncoder is the mode of encoding oracle result signature order. */
tssEncoder: Encoder;
}
export interface OracleRequestPacketDataProtoMsg {
typeUrl: "/band.oracle.v1.OracleRequestPacketData";
value: Uint8Array;
}
/**
* OracleRequestPacketData encodes an oracle request sent from other blockchains
* to BandChain.
*/
export interface OracleRequestPacketDataAmino {
/**
* ClientID is the unique identifier of this oracle request, as specified by
* the client. This same unique ID will be sent back to the requester with the
* oracle response.
*/
client_id?: string;
/**
* OracleScriptID is the unique identifier of the oracle script to be
* executed.
*/
oracle_script_id?: string;
/**
* Calldata is the OBI-encoded calldata bytes available for oracle executor to
* read.
*/
calldata?: string;
/**
* AskCount is the number of validators that are requested to respond to this
* oracle request. Higher value means more security, at a higher gas cost.
*/
ask_count?: string;
/**
* MinCount is the minimum number of validators necessary for the request to
* proceed to the execution phase. Higher value means more security, at the
* cost of liveness.
*/
min_count?: string;
/**
* FeeLimit is the maximum tokens that will be paid to all data source
* providers.
*/
fee_limit?: CoinAmino[];
/** PrepareGas is amount of gas to pay to prepare raw requests */
prepare_gas?: string;
/** ExecuteGas is amount of gas to reserve for executing */
execute_gas?: string;
/** TSSEncoder is the mode of encoding oracle result signature order. */
tss_encoder?: Encoder;
}
export interface OracleRequestPacketDataAminoMsg {
type: "/band.oracle.v1.OracleRequestPacketData";
value: OracleRequestPacketDataAmino;
}
/**
* OracleRequestPacketData encodes an oracle request sent from other blockchains
* to BandChain.
*/
export interface OracleRequestPacketDataSDKType {
client_id: string;
oracle_script_id: bigint;
calldata: Uint8Array;
ask_count: bigint;
min_count: bigint;
fee_limit: CoinSDKType[];
prepare_gas: bigint;
execute_gas: bigint;
tss_encoder: Encoder;
}
/**
* OracleRequestPacketAcknowledgement encodes an oracle request acknowledgement
* send back to requester chain.
*/
export interface OracleRequestPacketAcknowledgement {
/** RequestID is BandChain's unique identifier for this oracle request. */
requestId: bigint;
}
export interface OracleRequestPacketAcknowledgementProtoMsg {
typeUrl: "/band.oracle.v1.OracleRequestPacketAcknowledgement";
value: Uint8Array;
}
/**
* OracleRequestPacketAcknowledgement encodes an oracle request acknowledgement
* send back to requester chain.
*/
export interface OracleRequestPacketAcknowledgementAmino {
/** RequestID is BandChain's unique identifier for this oracle request. */
request_id?: string;
}
export interface OracleRequestPacketAcknowledgementAminoMsg {
type: "/band.oracle.v1.OracleRequestPacketAcknowledgement";
value: OracleRequestPacketAcknowledgementAmino;
}
/**
* OracleRequestPacketAcknowledgement encodes an oracle request acknowledgement
* send back to requester chain.
*/
export interface OracleRequestPacketAcknowledgementSDKType {
request_id: bigint;
}
/**
* OracleResponsePacketData encodes an oracle response from BandChain to the
* requester.
*/
export interface OracleResponsePacketData {
/**
* ClientID is the unique identifier matched with that of the oracle request
* packet.
*/
clientId: string;
/** RequestID is BandChain's unique identifier for this oracle request. */
requestId: bigint;
/**
* AnsCount is the number of validators among to the asked validators that
* actually responded to this oracle request prior to this oracle request
* being resolved.
*/
ansCount: bigint;
/**
* RequestTime is the UNIX epoch time at which the request was sent to
* BandChain.
*/
requestTime: bigint;
/**
* ResolveTime is the UNIX epoch time at which the request was resolved to the
* final result.
*/
resolveTime: bigint;
/**
* ResolveStatus is the status of this oracle request, which can be OK,
* FAILURE, or EXPIRED.
*/
resolveStatus: ResolveStatus;
/**
* Result is the final aggregated value encoded in OBI format. Only available
* if status if OK.
*/
result: Uint8Array;
}
export interface OracleResponsePacketDataProtoMsg {
typeUrl: "/band.oracle.v1.OracleResponsePacketData";
value: Uint8Array;
}
/**
* OracleResponsePacketData encodes an oracle response from BandChain to the
* requester.
*/
export interface OracleResponsePacketDataAmino {
/**
* ClientID is the unique identifier matched with that of the oracle request
* packet.
*/
client_id?: string;
/** RequestID is BandChain's unique identifier for this oracle request. */
request_id?: string;
/**
* AnsCount is the number of validators among to the asked validators that
* actually responded to this oracle request prior to this oracle request
* being resolved.
*/
ans_count?: string;
/**
* RequestTime is the UNIX epoch time at which the request was sent to
* BandChain.
*/
request_time?: string;
/**
* ResolveTime is the UNIX epoch time at which the request was resolved to the
* final result.
*/
resolve_time?: string;
/**
* ResolveStatus is the status of this oracle request, which can be OK,
* FAILURE, or EXPIRED.
*/
resolve_status?: ResolveStatus;
/**
* Result is the final aggregated value encoded in OBI format. Only available
* if status if OK.
*/
result?: string;
}
export interface OracleResponsePacketDataAminoMsg {
type: "/band.oracle.v1.OracleResponsePacketData";
value: OracleResponsePacketDataAmino;
}
/**
* OracleResponsePacketData encodes an oracle response from BandChain to the
* requester.
*/
export interface OracleResponsePacketDataSDKType {
client_id: string;
request_id: bigint;
ans_count: bigint;
request_time: bigint;
resolve_time: bigint;
resolve_status: ResolveStatus;
result: Uint8Array;
}
/** Result encodes a result of request and store in chain */
export interface Result {
/**
* ClientID is the unique identifier of this oracle request, as specified by
* the client. This same unique ID will be sent back to the requester with the
* oracle response.
*/
clientId: string;
/**
* OracleScriptID is the unique identifier of the oracle script to be
* executed.
*/
oracleScriptId: bigint;
/** Calldata is the calldata bytes available for oracle executor to read. */
calldata: Uint8Array;
/**
* AskCount is the number of validators that are requested to respond to this
* oracle request. Higher value means more security, at a higher gas cost.
*/
askCount: bigint;
/**
* MinCount is the minimum number of validators necessary for the request to
* proceed to the execution phase. Higher value means more security, at the
* cost of liveness.
*/
minCount: bigint;
/** RequestID is BandChain's unique identifier for this oracle request. */
requestId: bigint;
/**
* AnsCount is the number of validators among to the asked validators that
* actually responded to this oracle request prior to this oracle request
* being resolved.
*/
ansCount: bigint;
/**
* RequestTime is the UNIX epoch time at which the request was sent to
* BandChain.
*/
requestTime: bigint;
/**
* ResolveTime is the UNIX epoch time at which the request was resolved to the
* final result.
*/
resolveTime: bigint;
/**
* ResolveStatus is the status of this oracle request, which can be OK,
* FAILURE, or EXPIRED.
*/
resolveStatus: ResolveStatus;
/** Result is the final aggregated value only available if status if OK. */
result: Uint8Array;
}
export interface ResultProtoMsg {
typeUrl: "/band.oracle.v1.Result";
value: Uint8Array;
}
/** Result encodes a result of request and store in chain */
export interface ResultAmino {
/**
* ClientID is the unique identifier of this oracle request, as specified by
* the client. This same unique ID will be sent back to the requester with the
* oracle response.
*/
client_id?: string;
/**
* OracleScriptID is the unique identifier of the oracle script to be
* executed.
*/
oracle_script_id?: string;
/** Calldata is the calldata bytes available for oracle executor to read. */
calldata?: string;
/**
* AskCount is the number of validators that are requested to respond to this
* oracle request. Higher value means more security, at a higher gas cost.
*/
ask_count?: string;
/**
* MinCount is the minimum number of validators necessary for the request to
* proceed to the execution phase. Higher value means more security, at the
* cost of liveness.
*/
min_count?: string;
/** RequestID is BandChain's unique identifier for this oracle request. */
request_id?: string;
/**
* AnsCount is the number of validators among to the asked validators that
* actually responded to this oracle request prior to this oracle request
* being resolved.
*/
ans_count?: string;
/**
* RequestTime is the UNIX epoch time at which the request was sent to
* BandChain.
*/
request_time?: string;
/**
* ResolveTime is the UNIX epoch time at which the request was resolved to the
* final result.
*/
resolve_time?: string;
/**
* ResolveStatus is the status of this oracle request, which can be OK,
* FAILURE, or EXPIRED.
*/
resolve_status?: ResolveStatus;
/** Result is the final aggregated value only available if status if OK. */
result?: string;
}
export interface ResultAminoMsg {
type: "/band.oracle.v1.Result";
value: ResultAmino;
}
/** Result encodes a result of request and store in chain */
export interface ResultSDKType {
client_id: string;
oracle_script_id: bigint;
calldata: Uint8Array;
ask_count: bigint;
min_count: bigint;
request_id: bigint;
ans_count: bigint;
request_time: bigint;
resolve_time: bigint;
resolve_status: ResolveStatus;
result: Uint8Array;
}
/** SigningResult encodes a result of signing of request */
export interface SigningResult {
/** signing_id is the id of the bandtss signing */
signingId: bigint;
/** error_codespace is the codespace of the error */
errorCodespace: string;
/** error_code is the code in the codespace of the error */
errorCode: bigint;
}
export interface SigningResultProtoMsg {
typeUrl: "/band.oracle.v1.SigningResult";
value: Uint8Array;
}
/** SigningResult encodes a result of signing of request */
export interface SigningResultAmino {
/** signing_id is the id of the bandtss signing */
signing_id?: string;
/** error_codespace is the codespace of the error */
error_codespace?: string;
/** error_code is the code in the codespace of the error */
error_code?: string;
}
export interface SigningResultAminoMsg {
type: "/band.oracle.v1.SigningResult";
value: SigningResultAmino;
}
/** SigningResult encodes a result of signing of request */
export interface SigningResultSDKType {
signing_id: bigint;
error_codespace: string;
error_code: bigint;
}
/** ValidatorStatus maintains whether a validator is an active oracle provider. */
export interface ValidatorStatus {
/**
* IsActive is a boolean indicating active status of validator.
* The validator will be deactivated when they are unable to send reports
* to fulfill oracle request before the request expired.
*/
isActive: boolean;
/** Since is a block timestamp when validator has been activated/deactivated */
since: Date;
}
export interface ValidatorStatusProtoMsg {
typeUrl: "/band.oracle.v1.ValidatorStatus";
value: Uint8Array;
}
/** ValidatorStatus maintains whether a validator is an active oracle provider. */
export interface ValidatorStatusAmino {
/**
* IsActive is a boolean indicating active status of validator.
* The validator will be deactivated when they are unable to send reports
* to fulfill oracle request before the request expired.
*/
is_active?: boolean;
/** Since is a block timestamp when validator has been activated/deactivated */
since?: string;
}
export interface ValidatorStatusAminoMsg {
type: "/band.oracle.v1.ValidatorStatus";
value: ValidatorStatusAmino;
}
/** ValidatorStatus maintains whether a validator is an active oracle provider. */
export interface ValidatorStatusSDKType {
is_active: boolean;
since: Date;
}
/** ActiveValidator is information of currently active validator */
export interface ActiveValidator {
/** Address is a validator address */
address: string;
/** Power is an amount of token that the validator is holding */
power: bigint;
}
export interface ActiveValidatorProtoMsg {
typeUrl: "/band.oracle.v1.ActiveValidator";
value: Uint8Array;
}
/** ActiveValidator is information of currently active validator */
export interface ActiveValidatorAmino {
/** Address is a validator address */
address?: string;
/** Power is an amount of token that the validator is holding */
power?: string;
}
export interface ActiveValidatorAminoMsg {
type: "/band.oracle.v1.ActiveValidator";
value: ActiveValidatorAmino;
}
/** ActiveValidator is information of currently active validator */
export interface ActiveValidatorSDKType {
address: string;
power: bigint;
}
/** Params is the data structure that keeps the parameters of the oracle module. */
export interface Params {
/**
* MaxRawRequestCount is the maximum number of data source raw requests a
* request can make.
*/
maxRawRequestCount: bigint;
/** MaxAskCount is the maximum number of validators a request can target. */
maxAskCount: bigint;
/** MaxCalldataSize is the maximum size limit of calldata (bytes) in a request. */
maxCalldataSize: bigint;
/**
* MaxReportDataSize is the maximum size limit of report data (bytes) in a
* report.
*/
maxReportDataSize: bigint;
/**
* ExpirationBlockCount is the number of blocks a request stays valid before
* it gets expired due to insufficient reports.
*/
expirationBlockCount: bigint;
/**
* BaseOwasmGas is the base amount of Cosmos-SDK gas charged for owasm
* execution.
*/
baseOwasmGas: bigint;
/**
* PerValidatorRequestGas is the amount of Cosmos-SDK gas charged per
* requested validator.
*/
perValidatorRequestGas: bigint;
/**
* SamplingTryCount the number of validator sampling tries to pick the highest
* voting power subset of validators to perform an oracle task.
*/
samplingTryCount: bigint;
/**
* OracleRewardPercentage is the percentage of block rewards allocated to
* active oracle validators.
*/
oracleRewardPercentage: bigint;
/**
* InactivePenaltyDuration is the duration period where a validator cannot
* activate back after missing an oracle report.
*/
inactivePenaltyDuration: bigint;
/**
* IBCRequestEnabled is a flag indicating whether sending oracle request via
* IBC is allowed
*/
ibcRequestEnabled: boolean;
}
export interface ParamsProtoMsg {
typeUrl: "/band.oracle.v1.Params";
value: Uint8Array;
}
/** Params is the data structure that keeps the parameters of the oracle module. */
export interface ParamsAmino {
/**
* MaxRawRequestCount is the maximum number of data source raw requests a
* request can make.
*/
max_raw_request_count?: string;
/** MaxAskCount is the maximum number of validators a request can target. */
max_ask_count?: string;
/** MaxCalldataSize is the maximum size limit of calldata (bytes) in a request. */
max_calldata_size?: string;
/**
* MaxReportDataSize is the maximum size limit of report data (bytes) in a
* report.
*/
max_report_data_size?: string;
/**
* ExpirationBlockCount is the number of blocks a request stays valid before
* it gets expired due to insufficient reports.
*/
expiration_block_count?: string;
/**
* BaseOwasmGas is the base amount of Cosmos-SDK gas charged for owasm
* execution.
*/
base_owasm_gas?: string;
/**
* PerValidatorRequestGas is the amount of Cosmos-SDK gas charged per
* requested validator.
*/
per_validator_request_gas?: string;
/**
* SamplingTryCount the number of validator sampling tries to pick the highest
* voting power subset of validators to perform an oracle task.
*/
sampling_try_count?: string;
/**
* OracleRewardPercentage is the percentage of block rewards allocated to
* active oracle validators.
*/
oracle_reward_percentage?: string;
/**
* InactivePenaltyDuration is the duration period where a validator cannot
* activate back after missing an oracle report.
*/
inactive_penalty_duration?: string;
/**
* IBCRequestEnabled is a flag indicating whether sending oracle request via
* IBC is allowed
*/
ibc_request_enabled?: boolean;
}
export interface ParamsAminoMsg {
type: "/band.oracle.v1.Params";
value: ParamsAmino;
}
/** Params is the data structure that keeps the parameters of the oracle module. */
export interface ParamsSDKType {
max_raw_request_count: bigint;
max_ask_count: bigint;
max_calldata_size: bigint;
max_report_data_size: bigint;
expiration_block_count: bigint;
base_owasm_gas: bigint;
per_validator_request_gas: bigint;
sampling_try_count: bigint;
oracle_reward_percentage: bigint;
inactive_penalty_duration: bigint;
ibc_request_enabled: boolean;
}
/** PendingResolveList is a list of requests that are waiting to be resolved */
export interface PendingResolveList {
/** RequestIDs is a list of request IDs that are waiting to be resolved */
requestIds: bigint[];
}
export interface PendingResolveListProtoMsg {
typeUrl: "/band.oracle.v1.PendingResolveList";
value: Uint8Array;
}
/** PendingResolveList is a list of requests that are waiting to be resolved */
export interface PendingResolveListAmino {
/** RequestIDs is a list of request IDs that are waiting to be resolved */
request_ids?: string[];
}
export interface PendingResolveListAminoMsg {
type: "/band.oracle.v1.PendingResolveList";
value: PendingResolveListAmino;
}
/** PendingResolveList is a list of requests that are waiting to be resolved */
export interface PendingResolveListSDKType {
request_ids: bigint[];
}
/**
* IBCChannel is information of IBC protocol to allow communicating with other
* chain
*/
export interface IBCChannel {
/**
* PortID is port ID used for sending response packet when request is
* resolved.
*/
portId: string;
/**
* ChannelID is channel ID used for sending response packet when request is
* resolved.
*/
channelId: string;
}
export interface IBCChannelProtoMsg {
typeUrl: "/band.oracle.v1.IBCChannel";
value: Uint8Array;
}
/**
* IBCChannel is information of IBC protocol to allow communicating with other
* chain
*/
export interface IBCChannelAmino {
/**
* PortID is port ID used for sending response packet when request is
* resolved.
*/
port_id?: string;
/**
* ChannelID is channel ID used for sending response packet when request is
* resolved.
*/
channel_id?: string;
}
export interface IBCChannelAminoMsg {
type: "/band.oracle.v1.IBCChannel";
value: IBCChannelAmino;
}
/**
* IBCChannel is information of IBC protocol to allow communicating with other
* chain
*/
export interface IBCChannelSDKType {
port_id: string;
channel_id: string;
}
/**
* RequestVerification is a message that is constructed and signed by a reporter
* to be used as a part of verification of oracle request.
*/
export interface RequestVerification {
/** ChainID is the ID of targeted chain */
chainId: string;
/** Validator is an validator address */
validator: string;
/** RequestID is the targeted request ID */
requestId: bigint;
/** ExternalID is the oracle's external ID of data source */
externalId: bigint;
/** DataSourceID is the ID of data source */
dataSourceId: bigint;
}
export interface RequestVerificationProtoMsg {
typeUrl: "/band.oracle.v1.RequestVerification";
value: Uint8Array;
}
/**
* RequestVerification is a message that is constructed and signed by a reporter
* to be used as a part of verification of oracle request.
*/
export interface RequestVerificationAmino {
/** ChainID is the ID of targeted chain */
chain_id?: string;
/** Validator is an validator address */
validator?: string;
/** RequestID is the targeted request ID */
request_id?: string;
/** ExternalID is the oracle's external ID of data source */
external_id?: string;
/** DataSourceID is the ID of data source */
data_source_id?: string;
}
export interface RequestVerificationAminoMsg {
type: "/band.oracle.v1.RequestVerification";
value: RequestVerificationAmino;
}
/**
* RequestVerification is a message that is constructed and signed by a reporter
* to be used as a part of verification of oracle request.
*/
export interface RequestVerificationSDKType {
chain_id: string;
validator: string;
request_id: bigint;
external_id: bigint;
data_source_id: bigint;
}
/** PriceResult is a result from standard price reference */
export interface PriceResult {
/**
* Symbol is unit of data indicating what the data is. It is price currencies
* for this case.
*/
symbol: string;
/**
* Multiplier is a number used for left-shifting value to eliminate decimal
* digits
*/
multiplier: bigint;
/** Px is the actual data, which is rate number multiplied by the multiplier. */
px: bigint;
/** RequestID is oracle request ID that contains this price */
requestId: bigint;
/**
* ResolveTime is epoch timestamp indicating the time when the request had
* been resolved
*/
resolveTime: bigint;
}
export interface PriceResultProtoMsg {
typeUrl: "/band.oracle.v1.PriceResult";
value: Uint8Array;
}
/** PriceResult is a result from standard price reference */
export interface PriceResultAmino {
/**
* Symbol is unit of data indicating what the data is. It is price currencies
* for this case.
*/
symbol?: string;
/**
* Multiplier is a number used for left-shifting value to eliminate decimal
* digits
*/
multiplier?: string;
/** Px is the actual data, which is rate number multiplied by the multiplier. */
px?: string;
/** RequestID is oracle request ID that contains this price */
request_id?: string;
/**
* ResolveTime is epoch timestamp indicating the time when the request had
* been resolved
*/
resolve_time?: string;
}
export interface PriceResultAminoMsg {
type: "/band.oracle.v1.PriceResult";
value: PriceResultAmino;
}
/** PriceResult is a result from standard price reference */
export interface PriceResultSDKType {
symbol: string;
multiplier: bigint;
px: bigint;
request_id: bigint;
resolve_time: bigint;
}
/** OracleResultSignatureOrder defines a request id to request bandtss signature from the oracle result. */
export interface OracleResultSignatureOrder {
/** RequestID is oracle's unique identifier for this oracle request. */
requestId: bigint;
/** encoder is the mode of encoding oracle result signature order. */
encoder: Encoder;
}
export interface OracleResultSignatureOrderProtoMsg {
typeUrl: "/band.oracle.v1.OracleResultSignatureOrder";
value: Uint8Array;
}
/** OracleResultSignatureOrder defines a request id to request bandtss signature from the oracle result. */
export interface OracleResultSignatureOrderAmino {
/** RequestID is oracle's unique identifier for this oracle request. */
request_id?: string;
/** encoder is the mode of encoding oracle result signature order. */
encoder?: Encoder;
}
export interface OracleResultSignatureOrderAminoMsg {
type: "/band.oracle.v1.OracleResultSignatureOrder";
value: OracleResultSignatureOrderAmino;
}
/** OracleResultSignatureOrder defines a request id to request bandtss signature from the oracle result. */
export interface OracleResultSignatureOrderSDKType {
request_id: bigint;
encoder: Encoder;
}
export declare const DataSource: {
typeUrl: string;
encode(message: DataSource, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): DataSource;
fromPartial(object: Partial<DataSource>): DataSource;
fromAmino(object: DataSourceAmino): DataSource;
toAmino(message: DataSource): DataSourceAmino;
fromAminoMsg(object: DataSourceAminoMsg): DataSource;
fromProtoMsg(message: DataSourceProtoMsg): DataSource;
toProto(message: DataSource): Uint8Array;
toProtoMsg(message: DataSource): DataSourceProtoMsg;
};
export declare const OracleScript: {
typeUrl: string;
encode(message: OracleScript, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): OracleScript;
fromPartial(object: Partial<OracleScript>): OracleScript;
fromAmino(object: OracleScriptAmino): OracleScript;
toAmino(message: OracleScript): OracleScriptAmino;
fromAminoMsg(object: OracleScriptAminoMsg): OracleScript;
fromProtoMsg(message: OracleScriptProtoMsg): OracleScript;
toProto(message: OracleScript): Uint8Array;
toProtoMsg(message: OracleScript): OracleScriptProtoMsg;
};
export declare const RawRequest: {
typeUrl: string;
encode(message: RawRequest, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): RawRequest;
fromPartial(object: Partial<RawRequest>): RawRequest;
fromAmino(object: RawRequestAmino): RawRequest;
toAmino(message: RawRequest): RawRequestAmino;
fromAminoMsg(object: RawRequestAminoMsg): RawRequest;
fromProtoMsg(message: RawRequestProtoMsg): RawRequest;
toProto(message: RawRequest): Uint8Array;
toProtoMsg(message: RawRequest): RawRequestProtoMsg;
};
export declare const RawReport: {
typeUrl: string;
encode(message: RawReport, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): RawReport;
fromPartial(object: Partial<RawReport>): RawReport;
fromAmino(object: RawReportAmino): RawReport;
toAmino(message: RawReport): RawReportAmino;
fromAminoMsg(object: RawReportAminoMsg): RawReport;
fromProtoMsg(message: RawReportProtoMsg): RawReport;
toProto(message: RawReport): Uint8Array;
toProtoMsg(message: RawReport): RawReportProtoMsg;
};
export declare const Request: {
typeUrl: string;
encode(message: Request, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Request;
fromPartial(object: Partial<Request>): Request;
fromAmino(object: RequestAmino): Request;
toAmino(message: Request): RequestAmino;
fromAminoMsg(object: RequestAminoMsg): Request;
fromProtoMsg(message: RequestProtoMsg): Request;
toProto(message: Request): Uint8Array;
toProtoMsg(message: Request): RequestProtoMsg;
};
export declare const Report: {
typeUrl: string;
encode(message: Report, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Report;
fromPartial(object: Partial<Report>): Report;
fromAmino(object: ReportAmino): Report;
toAmino(message: Report): ReportAmino;
fromAminoMsg(object: ReportAminoMsg): Report;
fromProtoMsg(message: ReportProtoMsg): Report;
toProto(message: Report): Uint8Array;
toProtoMsg(message: Report): ReportProtoMsg;
};
export declare const OracleRequestPacketData: {
typeUrl: string;
encode(message: OracleRequestPacketData, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): OracleRequestPacketData;
fromPartial(object: Partial<OracleRequestPacketData>): OracleRequestPacketData;
fromAmino(object: OracleRequestPacketDataAmino): OracleRequestPacketData;
toAmino(message: OracleRequestPacketData): OracleRequestPacketDataAmino;
fromAminoMsg(object: OracleRequestPacketDataAminoMsg): OracleRequestPacketData;
fromProtoMsg(message: OracleRequestPacketDataProtoMsg): OracleRequestPacketData;
toProto(message: OracleRequestPacketData): Uint8Array;
toProtoMsg(message: OracleRequestPacketData): OracleRequestPacketDataProtoMsg;
};
export declare const OracleRequestPacketAcknowledgement: {
typeUrl: string;
encode(message: OracleRequestPacketAcknowledgement, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): OracleRequestPacketAcknowledgement;
fromPartial(object: Partial<OracleRequestPacketAcknowledgement>): OracleRequestPacketAcknowledgement;
fromAmino(object: OracleRequestPacketAcknowledgementAmino): OracleRequestPacketAcknowledgement;
toAmino(message: OracleRequestPacketAcknowledgement): OracleRequestPacketAcknowledgementAmino;
fromAminoMsg(object: OracleRequestPacketAcknowledgementAminoMsg): OracleRequestPacketAcknowledgement;
fromProtoMsg(message: OracleRequestPacketAcknowledgementProtoMsg): OracleRequestPacketAcknowledgement;
toProto(message: OracleRequestPacketAcknowledgement): Uint8Array;
toProtoMsg(message: OracleRequestPacketAcknowledgement): OracleRequestPacketAcknowledgementProtoMsg;
};
export declare const OracleResponsePacketData: {
typeUrl: string;
encode(message: OracleResponsePacketData, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): OracleResponsePacketData;
fromPartial(object: Partial<OracleResponsePacketData>): OracleResponsePacketData;
fromAmino(object: OracleResponsePacketDataAmino): OracleResponsePacketData;
toAmino(message: OracleResponsePacketData): OracleResponsePacketDataAmino;
fromAminoMsg(object: OracleResponsePacketDataAminoMsg): OracleResponsePacketData;
fromProtoMsg(message: OracleResponsePacketDataProtoMsg): OracleResponsePacketData;
toProto(message: OracleResponsePacketData): Uint8Array;
toProtoMsg(message: OracleResponsePacketData): OracleResponsePacketDataProtoMsg;
};
export declare const Result: {
typeUrl: string;
encode(message: Result, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): Result;
fromPartial(object: Partial<Result>): Result;
fromAmino(object: ResultAmino): Result;
toAmino(message: Result): ResultAmino;
fromAminoMsg(object: ResultAminoMsg): Result;
fromProtoMsg(message: ResultProtoMsg): Result;
toProto(message: Result): Uint8Array;
toProtoMsg(message: Result): ResultProtoMsg;
};
export declare const SigningResult: {
typeUrl: string;
encode(message: SigningResult, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): SigningResult;
fromPartial(object: Partial<SigningResult>): SigningResult;
fromAmino(object: SigningResultAmino): SigningResult;
toAmino(message: SigningResult): SigningResultAmino;
fromAminoMsg(object: SigningResultAminoMsg): SigningResult;
fromProtoMsg(message: SigningResultProtoMsg): SigningResult;
toProto(message: SigningResult): Uint8Array;
toProtoMsg(message: SigningResult): SigningResultProtoMsg;
};
export declare const ValidatorStatus: {
typeUrl: string;
encode(message: ValidatorStatus, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): ValidatorStatus;
fromPartial(object: Partial<ValidatorStatus>): ValidatorStatus;
fromAmino(object: ValidatorStatusAmino): ValidatorStatus;
toAmino(message: ValidatorStatus): ValidatorStatusAmino;
fromAminoMsg(object: ValidatorStatusAminoMsg): ValidatorStatus;
fromProtoMsg(message: ValidatorStatusProtoMsg): ValidatorStatus;
toProto(message: ValidatorStatus): Uint8Array;
toProtoMsg(message: ValidatorStatus): ValidatorStatusProtoMsg;
};
export declare const ActiveValidator: {
typeUrl: string;
encode(message: ActiveValidator, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): ActiveValidator;
fromPartial(object: Partial<ActiveValidator>): ActiveValidator;
fromAmino(object: ActiveValidatorAmino): ActiveValidator;
toAmino(message: ActiveValidator): ActiveValidatorAmino;
fromAminoMsg(object: ActiveValidatorAminoMsg): ActiveValidator;
fromProtoMsg(message: ActiveValidatorProtoMsg): ActiveValidator;
toProto(message: ActiveValidator): Uint8Array;
toProtoMsg(message: ActiveValidator): ActiveValidatorProtoMsg;
};
export declare const Params: {
typeUrl: string;
encode(message: Params,