PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@babylonlabs-io/babylon-proto-ts/dist/generated/babylon/btclightclient/v1

Просмотр файла: query.d.ts

import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination";
import { Params } from "./params";
export declare const protobufPackage = "babylon.btclightclient.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;
}
/**
 * QueryHashesRequest is request type for the Query/Hashes RPC method.
 * It involves retrieving all hashes that are maintained by the module.
 */
export interface QueryHashesRequest {
    pagination: PageRequest | undefined;
}
/** QueryHashesResponse is response type for the Query/Hashes RPC method. */
export interface QueryHashesResponse {
    hashes: Uint8Array[];
    pagination: PageResponse | undefined;
}
/**
 * QueryContainsRequest is request type for the Query/Contains RPC method.
 * It involves checking whether a hash is maintained by the module.
 */
export interface QueryContainsRequest {
    hash: Uint8Array;
}
/** QueryContainsResponse is response type for the Query/Contains RPC method. */
export interface QueryContainsResponse {
    contains: boolean;
}
/**
 * QueryContainsRequest is request type for the temporary Query/ContainsBytes
 * RPC method. It involves checking whether a hash is maintained by the module.
 */
export interface QueryContainsBytesRequest {
    hash: Uint8Array;
}
/**
 * QueryContainsResponse is response type for the temporary Query/ContainsBytes
 * RPC method.
 */
export interface QueryContainsBytesResponse {
    contains: boolean;
}
/**
 * QueryMainChainRequest is request type for the Query/MainChain RPC method.
 * It involves retrieving the canonical chain maintained by the module.
 */
export interface QueryMainChainRequest {
    pagination: PageRequest | undefined;
}
/** QueryMainChainResponse is response type for the Query/MainChain RPC method. */
export interface QueryMainChainResponse {
    headers: BTCHeaderInfoResponse[];
    pagination: PageResponse | undefined;
}
/** QueryTipRequest is the request type for the Query/Tip RPC method. */
export interface QueryTipRequest {
}
/** QueryTipResponse is the response type for the Query/Tip RPC method. */
export interface QueryTipResponse {
    header: BTCHeaderInfoResponse | undefined;
}
/**
 * QueryBaseHeaderRequest is the request type for the Query/BaseHeader RPC
 * method.
 */
export interface QueryBaseHeaderRequest {
}
/**
 * QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC
 * method.
 */
export interface QueryBaseHeaderResponse {
    header: BTCHeaderInfoResponse | undefined;
}
/**
 * QueryMainChainDepthRequest is the request type for the Query/MainChainDepth RPC
 * it contains hex encoded hash of btc block header as parameter
 */
export interface QueryHeaderDepthRequest {
    hash: string;
}
/**
 * QueryMainChainDepthResponse is the response type for the Query/MainChainDepth RPC
 * it contains depth of the block in main chain
 */
export interface QueryHeaderDepthResponse {
    depth: number;
}
/**
 * BTCHeaderInfoResponse is a structure that contains all relevant information about a
 * BTC header response
 *  - Full header as string hex.
 *  - Header hash for easy retrieval as string hex.
 *  - Height of the header in the BTC chain.
 *  - Total work spent on the header. This is the sum of the work corresponding
 *  to the header Bits field
 *    and the total work of the header.
 */
export interface BTCHeaderInfoResponse {
    headerHex: string;
    hashHex: string;
    height: number;
    /** Work is the sdkmath.Uint as string. */
    work: string;
}
export declare const QueryParamsRequest: MessageFns<QueryParamsRequest>;
export declare const QueryParamsResponse: MessageFns<QueryParamsResponse>;
export declare const QueryHashesRequest: MessageFns<QueryHashesRequest>;
export declare const QueryHashesResponse: MessageFns<QueryHashesResponse>;
export declare const QueryContainsRequest: MessageFns<QueryContainsRequest>;
export declare const QueryContainsResponse: MessageFns<QueryContainsResponse>;
export declare const QueryContainsBytesRequest: MessageFns<QueryContainsBytesRequest>;
export declare const QueryContainsBytesResponse: MessageFns<QueryContainsBytesResponse>;
export declare const QueryMainChainRequest: MessageFns<QueryMainChainRequest>;
export declare const QueryMainChainResponse: MessageFns<QueryMainChainResponse>;
export declare const QueryTipRequest: MessageFns<QueryTipRequest>;
export declare const QueryTipResponse: MessageFns<QueryTipResponse>;
export declare const QueryBaseHeaderRequest: MessageFns<QueryBaseHeaderRequest>;
export declare const QueryBaseHeaderResponse: MessageFns<QueryBaseHeaderResponse>;
export declare const QueryHeaderDepthRequest: MessageFns<QueryHeaderDepthRequest>;
export declare const QueryHeaderDepthResponse: MessageFns<QueryHeaderDepthResponse>;
export declare const BTCHeaderInfoResponse: MessageFns<BTCHeaderInfoResponse>;
/** Query defines the gRPC querier service. */
export interface Query {
    /** Params queries the parameters of the module. */
    Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
    /** Hashes retrieves the hashes maintained by the module. */
    Hashes(request: QueryHashesRequest): Promise<QueryHashesResponse>;
    /** Contains checks whether a hash is maintained by the module. */
    Contains(request: QueryContainsRequest): Promise<QueryContainsResponse>;
    /**
     * ContainsBytes is a temporary method that
     * checks whether a hash is maintained by the module.
     * See discussion at https://github.com/babylonlabs-io/babylon/pull/132
     * for more details.
     */
    ContainsBytes(request: QueryContainsBytesRequest): Promise<QueryContainsBytesResponse>;
    /** MainChain returns the canonical chain */
    MainChain(request: QueryMainChainRequest): Promise<QueryMainChainResponse>;
    /** Tip return best header on canonical chain */
    Tip(request: QueryTipRequest): Promise<QueryTipResponse>;
    /**
     * BaseHeader returns the base BTC header of the chain. This header is defined
     * on genesis.
     */
    BaseHeader(request: QueryBaseHeaderRequest): Promise<QueryBaseHeaderResponse>;
    /**
     * HeaderDepth returns the depth of the header in main chain or error if the
     * block is not found or it exists on fork
     */
    HeaderDepth(request: QueryHeaderDepthRequest): Promise<QueryHeaderDepthResponse>;
}
export declare const QueryServiceName = "babylon.btclightclient.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>;
    Hashes(request: QueryHashesRequest): Promise<QueryHashesResponse>;
    Contains(request: QueryContainsRequest): Promise<QueryContainsResponse>;
    ContainsBytes(request: QueryContainsBytesRequest): Promise<QueryContainsBytesResponse>;
    MainChain(request: QueryMainChainRequest): Promise<QueryMainChainResponse>;
    Tip(request: QueryTipRequest): Promise<QueryTipResponse>;
    BaseHeader(request: QueryBaseHeaderRequest): Promise<QueryBaseHeaderResponse>;
    HeaderDepth(request: QueryHeaderDepthRequest): Promise<QueryHeaderDepthResponse>;
}
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

Выполнить команду


Для локальной разработки. Не используйте в интернете!