PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@babylonlabs-io/babylon-proto-ts/dist/generated/babylon/epoching/v1
Просмотр файла: query.d.ts
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
import { DelegationLifecycle, Validator } from "./epoching";
import { Params } from "./params";
export declare const protobufPackage = "babylon.epoching.v1";
/** QueryParamsRequest is the request type for the Query/Params RPC method. */
export interface QueryParamsRequest {
}
/** QueryParamsResponse is the response type for the Query/Params RPC method. */
export interface QueryParamsResponse {
/** params holds all the parameters of this module. */
params: Params | undefined;
}
/** QueryEpochInfoRequest is the request type for the Query/EpochInfo method */
export interface QueryEpochInfoRequest {
epochNum: number;
}
/** QueryEpochInfoRequest is the response type for the Query/EpochInfo method */
export interface QueryEpochInfoResponse {
epoch: EpochResponse | undefined;
}
/** QueryEpochInfosRequest is the request type for the Query/EpochInfos method */
export interface QueryEpochsInfoRequest {
/** pagination defines whether to have the pagination in the request */
pagination: PageRequest | undefined;
}
/** QueryEpochsInfoResponse is the response type for the Query/EpochInfos method */
export interface QueryEpochsInfoResponse {
epochs: EpochResponse[];
/** pagination defines the pagination in the response */
pagination: PageResponse | undefined;
}
/**
* QueryCurrentEpochRequest is the request type for the Query/CurrentEpoch RPC
* method
*/
export interface QueryCurrentEpochRequest {
}
/**
* QueryCurrentEpochResponse is the response type for the Query/CurrentEpoch RPC
* method
*/
export interface QueryCurrentEpochResponse {
/** current_epoch is the current epoch number */
currentEpoch: number;
/** epoch_boundary is the height of this epoch's last block */
epochBoundary: number;
}
/** QueryEpochMsgsRequest is the request type for the Query/EpochMsgs RPC method */
export interface QueryEpochMsgsRequest {
/** epoch_num is the number of epoch of the requested msg queue */
epochNum: number;
/** pagination defines whether to have the pagination in the request */
pagination: PageRequest | undefined;
}
/**
* QueryEpochMsgsResponse is the response type for the Query/EpochMsgs RPC
* method
*/
export interface QueryEpochMsgsResponse {
/** msgs is the list of messages queued in the current epoch */
msgs: QueuedMessageResponse[];
/** pagination defines the pagination in the response */
pagination: PageResponse | undefined;
}
/**
* QueryLatestEpochMsgsRequest is the request type for the Query/LatestEpochMsgs
* RPC method it returns epoch msgs within epoch [max(1,
* end_epoch-epoch_count+1), end_epoch]
*/
export interface QueryLatestEpochMsgsRequest {
/** end_epoch is the number of the last epoch to query */
endEpoch: number;
/** epoch_count is the number of epochs to query */
epochCount: number;
pagination: PageRequest | undefined;
}
/**
* QueryLatestEpochMsgsResponse is the response type for the
* Query/LatestEpochMsgs RPC method
*/
export interface QueryLatestEpochMsgsResponse {
/**
* latest_epoch_msgs is a list of QueuedMessageList
* each QueuedMessageList has a field identifying the epoch number
*/
latestEpochMsgs: QueuedMessageList[];
pagination: PageResponse | undefined;
}
/**
* QueryValidatorLifecycleRequest is the request type for the
* Query/ValidatorLifecycle RPC method
*/
export interface QueryValidatorLifecycleRequest {
valAddr: string;
}
/**
* QueryValidatorLifecycleResponse is the response type for the
* Query/ValidatorLifecycle RPC method
*/
export interface QueryValidatorLifecycleResponse {
valAddr: string;
valLife: ValStateUpdateResponse[];
}
/**
* QueryDelegationLifecycleRequest is the request type for the
* Query/DelegationLifecycle RPC method
*/
export interface QueryDelegationLifecycleRequest {
delAddr: string;
}
/**
* QueryDelegationLifecycleRequest is the response type for the
* Query/DelegationLifecycle RPC method
*/
export interface QueryDelegationLifecycleResponse {
delLife: DelegationLifecycle | undefined;
}
/**
* QueryEpochValSetRequest is the request type for the Query/EpochValSet RPC
* method
*/
export interface QueryEpochValSetRequest {
epochNum: number;
pagination: PageRequest | undefined;
}
/**
* QueryEpochValSetRequest is the response type for the Query/EpochValSet RPC
* method
*/
export interface QueryEpochValSetResponse {
validators: Validator[];
totalVotingPower: number;
pagination: PageResponse | undefined;
}
/** EpochResponse is a structure that contains the metadata of an epoch */
export interface EpochResponse {
/** epoch_number is the number of this epoch */
epochNumber: number;
/** current_epoch_interval is the epoch interval at the time of this epoch */
currentEpochInterval: number;
/** first_block_height is the height of the first block in this epoch */
firstBlockHeight: number;
/**
* last_block_time is the time of the last block in this epoch.
* Babylon needs to remember the last header's time of each epoch to complete
* unbonding validators/delegations when a previous epoch's checkpoint is
* finalised. The last_block_time field is nil in the epoch's beginning, and
* is set upon the end of this epoch.
*/
lastBlockTime: Date | undefined;
/**
* sealer is the last block of the sealed epoch
* sealer_app_hash points to the sealer but stored in the 1st header
* of the next epoch as hex string.
*/
sealerAppHashHex: string;
/**
* sealer_block_hash is the hash of the sealer
* the validator set has generated a BLS multisig on the hash,
* i.e., hash of the last block in the epoch as hex string.
*/
sealerBlockHash: string;
}
/**
* QueuedMessageResponse is a message that can change the validator set and is delayed
* to the end of an epoch
*/
export interface QueuedMessageResponse {
/** tx_id is the ID of the tx that contains the message as hex. */
txId: string;
/** msg_id is the original message ID, i.e., hash of the marshaled message as hex. */
msgId: string;
/** block_height is the height when this msg is submitted to Babylon */
blockHeight: number;
/** block_time is the timestamp when this msg is submitted to Babylon */
blockTime: Date | undefined;
/**
* msg is the actual message that is sent by a user and is queued by the
* epoching module as string.
*/
msg: string;
}
/**
* QueuedMessageList is a message that contains a list of staking-related
* messages queued for an epoch
*/
export interface QueuedMessageList {
epochNumber: number;
msgs: QueuedMessageResponse[];
}
/** ValStateUpdateResponse is a message response that records a state update of a validator. */
export interface ValStateUpdateResponse {
/** StateDesc defines the descriptive state. */
stateDesc: string;
blockHeight: number;
blockTime: Date | undefined;
}
export declare const QueryParamsRequest: MessageFns<QueryParamsRequest>;
export declare const QueryParamsResponse: MessageFns<QueryParamsResponse>;
export declare const QueryEpochInfoRequest: MessageFns<QueryEpochInfoRequest>;
export declare const QueryEpochInfoResponse: MessageFns<QueryEpochInfoResponse>;
export declare const QueryEpochsInfoRequest: MessageFns<QueryEpochsInfoRequest>;
export declare const QueryEpochsInfoResponse: MessageFns<QueryEpochsInfoResponse>;
export declare const QueryCurrentEpochRequest: MessageFns<QueryCurrentEpochRequest>;
export declare const QueryCurrentEpochResponse: MessageFns<QueryCurrentEpochResponse>;
export declare const QueryEpochMsgsRequest: MessageFns<QueryEpochMsgsRequest>;
export declare const QueryEpochMsgsResponse: MessageFns<QueryEpochMsgsResponse>;
export declare const QueryLatestEpochMsgsRequest: MessageFns<QueryLatestEpochMsgsRequest>;
export declare const QueryLatestEpochMsgsResponse: MessageFns<QueryLatestEpochMsgsResponse>;
export declare const QueryValidatorLifecycleRequest: MessageFns<QueryValidatorLifecycleRequest>;
export declare const QueryValidatorLifecycleResponse: MessageFns<QueryValidatorLifecycleResponse>;
export declare const QueryDelegationLifecycleRequest: MessageFns<QueryDelegationLifecycleRequest>;
export declare const QueryDelegationLifecycleResponse: MessageFns<QueryDelegationLifecycleResponse>;
export declare const QueryEpochValSetRequest: MessageFns<QueryEpochValSetRequest>;
export declare const QueryEpochValSetResponse: MessageFns<QueryEpochValSetResponse>;
export declare const EpochResponse: MessageFns<EpochResponse>;
export declare const QueuedMessageResponse: MessageFns<QueuedMessageResponse>;
export declare const QueuedMessageList: MessageFns<QueuedMessageList>;
export declare const ValStateUpdateResponse: MessageFns<ValStateUpdateResponse>;
/** Query defines the gRPC querier service. */
export interface Query {
/** Params queries the parameters of the module. */
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
/** EpochInfo queries the information of a given epoch */
EpochInfo(request: QueryEpochInfoRequest): Promise<QueryEpochInfoResponse>;
/**
* EpochsInfo queries the metadata of epochs in a given range, depending on
* the parameters in the pagination request. Th main use case will be querying
* the latest epochs in time order.
*/
EpochsInfo(request: QueryEpochsInfoRequest): Promise<QueryEpochsInfoResponse>;
/** CurrentEpoch queries the current epoch */
CurrentEpoch(request: QueryCurrentEpochRequest): Promise<QueryCurrentEpochResponse>;
/** EpochMsgs queries the messages of a given epoch */
EpochMsgs(request: QueryEpochMsgsRequest): Promise<QueryEpochMsgsResponse>;
/**
* LatestEpochMsgs queries the messages within a given number of most recent
* epochs
*/
LatestEpochMsgs(request: QueryLatestEpochMsgsRequest): Promise<QueryLatestEpochMsgsResponse>;
/** ValidatorLifecycle queries the lifecycle of a given validator */
ValidatorLifecycle(request: QueryValidatorLifecycleRequest): Promise<QueryValidatorLifecycleResponse>;
/** DelegationLifecycle queries the lifecycle of a given delegation */
DelegationLifecycle(request: QueryDelegationLifecycleRequest): Promise<QueryDelegationLifecycleResponse>;
/** EpochValSet queries the validator set of a given epoch */
EpochValSet(request: QueryEpochValSetRequest): Promise<QueryEpochValSetResponse>;
}
export declare const QueryServiceName = "babylon.epoching.v1.Query";
export declare class QueryClientImpl implements Query {
private readonly rpc;
private readonly service;
constructor(rpc: Rpc, opts?: {
service?: string;
});
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
EpochInfo(request: QueryEpochInfoRequest): Promise<QueryEpochInfoResponse>;
EpochsInfo(request: QueryEpochsInfoRequest): Promise<QueryEpochsInfoResponse>;
CurrentEpoch(request: QueryCurrentEpochRequest): Promise<QueryCurrentEpochResponse>;
EpochMsgs(request: QueryEpochMsgsRequest): Promise<QueryEpochMsgsResponse>;
LatestEpochMsgs(request: QueryLatestEpochMsgsRequest): Promise<QueryLatestEpochMsgsResponse>;
ValidatorLifecycle(request: QueryValidatorLifecycleRequest): Promise<QueryValidatorLifecycleResponse>;
DelegationLifecycle(request: QueryDelegationLifecycleRequest): Promise<QueryDelegationLifecycleResponse>;
EpochValSet(request: QueryEpochValSetRequest): Promise<QueryEpochValSetResponse>;
}
interface Rpc {
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
}
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
[K in keyof P]: Exact<P[K], I[K]>;
} & {
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
};
export interface MessageFns<T> {
encode(message: T, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): T;
fromJSON(object: any): T;
toJSON(message: T): unknown;
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
}
export {};
//# sourceMappingURL=query.d.ts.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!