import { grpc } from "@improbable-eng/grpc-web"; import Long from "long"; import _m0 from "protobufjs/minimal"; import { Block } from "../../../tendermint/types/block"; import { BlockID } from "../../../tendermint/types/types"; import { GasInfo, Result, TxResponse } from "../../base/abci/v1beta1/abci"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { Tx } from "./tx"; export declare const protobufPackage = "cosmos.tx.v1beta1"; /** OrderBy defines the sorting order */ export declare enum OrderBy { /** * ORDER_BY_UNSPECIFIED - ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults * to ASC in this case. */ ORDER_BY_UNSPECIFIED = 0, /** ORDER_BY_ASC - ORDER_BY_ASC defines ascending order */ ORDER_BY_ASC = 1, /** ORDER_BY_DESC - ORDER_BY_DESC defines descending order */ ORDER_BY_DESC = 2, UNRECOGNIZED = -1 } export declare function orderByFromJSON(object: any): OrderBy; export declare function orderByToJSON(object: OrderBy): string; /** * BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC * method. */ export declare enum BroadcastMode { /** BROADCAST_MODE_UNSPECIFIED - zero-value for mode ordering */ BROADCAST_MODE_UNSPECIFIED = 0, /** * BROADCAST_MODE_BLOCK - DEPRECATED: use BROADCAST_MODE_SYNC instead, * BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. * * @deprecated */ BROADCAST_MODE_BLOCK = 1, /** * BROADCAST_MODE_SYNC - BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits * for a CheckTx execution response only. */ BROADCAST_MODE_SYNC = 2, /** * BROADCAST_MODE_ASYNC - BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client * returns immediately. */ BROADCAST_MODE_ASYNC = 3, UNRECOGNIZED = -1 } export declare function broadcastModeFromJSON(object: any): BroadcastMode; export declare function broadcastModeToJSON(object: BroadcastMode): string; /** * GetTxsEventRequest is the request type for the Service.TxsByEvents * RPC method. */ export interface GetTxsEventRequest { /** * events is the list of transaction event type. * Deprecated post v0.47.x: use query instead, which should contain a valid * events query. * * @deprecated */ events: string[]; /** * pagination defines a pagination for the request. * Deprecated post v0.46.x: use page and limit instead. * * @deprecated */ pagination: PageRequest | undefined; orderBy: OrderBy; /** * page is the page number to query, starts at 1. If not provided, will * default to first page. */ page: Long; /** * limit is the total number of results to be returned in the result page. * If left empty it will default to a value to be set by each app. */ limit: Long; /** * query defines the transaction event query that is proxied to Tendermint's * TxSearch RPC method. The query must be valid. */ query: string; } /** * GetTxsEventResponse is the response type for the Service.TxsByEvents * RPC method. */ export interface GetTxsEventResponse { /** txs is the list of queried transactions. */ txs: Tx[]; /** tx_responses is the list of queried TxResponses. */ txResponses: TxResponse[]; /** * pagination defines a pagination for the response. * Deprecated post v0.46.x: use total instead. * * @deprecated */ pagination: PageResponse | undefined; /** total is total number of results available */ total: Long; } /** * BroadcastTxRequest is the request type for the Service.BroadcastTxRequest * RPC method. */ export interface BroadcastTxRequest { /** tx_bytes is the raw transaction. */ txBytes: Uint8Array; mode: BroadcastMode; } /** * BroadcastTxResponse is the response type for the * Service.BroadcastTx method. */ export interface BroadcastTxResponse { /** tx_response is the queried TxResponses. */ txResponse: TxResponse | undefined; } /** * SimulateRequest is the request type for the Service.Simulate * RPC method. */ export interface SimulateRequest { /** * tx is the transaction to simulate. * Deprecated. Send raw tx bytes instead. * * @deprecated */ tx: Tx | undefined; /** tx_bytes is the raw transaction. */ txBytes: Uint8Array; } /** * SimulateResponse is the response type for the * Service.SimulateRPC method. */ export interface SimulateResponse { /** gas_info is the information about gas used in the simulation. */ gasInfo: GasInfo | undefined; /** result is the result of the simulation. */ result: Result | undefined; } /** * GetTxRequest is the request type for the Service.GetTx * RPC method. */ export interface GetTxRequest { /** hash is the tx hash to query, encoded as a hex string. */ hash: string; } /** GetTxResponse is the response type for the Service.GetTx method. */ export interface GetTxResponse { /** tx is the queried transaction. */ tx: Tx | undefined; /** tx_response is the queried TxResponses. */ txResponse: TxResponse | undefined; } /** * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs * RPC method. */ export interface GetBlockWithTxsRequest { /** height is the height of the block to query. */ height: Long; /** pagination defines a pagination for the request. */ pagination: PageRequest | undefined; } /** * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs * method. */ export interface GetBlockWithTxsResponse { /** txs are the transactions in the block. */ txs: Tx[]; blockId: BlockID | undefined; block: Block | undefined; /** pagination defines a pagination for the response. */ pagination: PageResponse | undefined; } /** * TxDecodeRequest is the request type for the Service.TxDecode * RPC method. */ export interface TxDecodeRequest { /** tx_bytes is the raw transaction. */ txBytes: Uint8Array; } /** * TxDecodeResponse is the response type for the * Service.TxDecode method. */ export interface TxDecodeResponse { /** tx is the decoded transaction. */ tx: Tx | undefined; } /** * TxEncodeRequest is the request type for the Service.TxEncode * RPC method. */ export interface TxEncodeRequest { /** tx is the transaction to encode. */ tx: Tx | undefined; } /** * TxEncodeResponse is the response type for the * Service.TxEncode method. */ export interface TxEncodeResponse { /** tx_bytes is the encoded transaction bytes. */ txBytes: Uint8Array; } /** * TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino * RPC method. */ export interface TxEncodeAminoRequest { aminoJson: string; } /** * TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino * RPC method. */ export interface TxEncodeAminoResponse { aminoBinary: Uint8Array; } /** * TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino * RPC method. */ export interface TxDecodeAminoRequest { aminoBinary: Uint8Array; } /** * TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino * RPC method. */ export interface TxDecodeAminoResponse { aminoJson: string; } export declare const GetTxsEventRequest: { encode(message: GetTxsEventRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetTxsEventRequest; fromJSON(object: any): GetTxsEventRequest; toJSON(message: GetTxsEventRequest): unknown; create(base?: DeepPartial): GetTxsEventRequest; fromPartial(object: DeepPartial): GetTxsEventRequest; }; export declare const GetTxsEventResponse: { encode(message: GetTxsEventResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetTxsEventResponse; fromJSON(object: any): GetTxsEventResponse; toJSON(message: GetTxsEventResponse): unknown; create(base?: DeepPartial): GetTxsEventResponse; fromPartial(object: DeepPartial): GetTxsEventResponse; }; export declare const BroadcastTxRequest: { encode(message: BroadcastTxRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): BroadcastTxRequest; fromJSON(object: any): BroadcastTxRequest; toJSON(message: BroadcastTxRequest): unknown; create(base?: DeepPartial): BroadcastTxRequest; fromPartial(object: DeepPartial): BroadcastTxRequest; }; export declare const BroadcastTxResponse: { encode(message: BroadcastTxResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): BroadcastTxResponse; fromJSON(object: any): BroadcastTxResponse; toJSON(message: BroadcastTxResponse): unknown; create(base?: DeepPartial): BroadcastTxResponse; fromPartial(object: DeepPartial): BroadcastTxResponse; }; export declare const SimulateRequest: { encode(message: SimulateRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SimulateRequest; fromJSON(object: any): SimulateRequest; toJSON(message: SimulateRequest): unknown; create(base?: DeepPartial): SimulateRequest; fromPartial(object: DeepPartial): SimulateRequest; }; export declare const SimulateResponse: { encode(message: SimulateResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SimulateResponse; fromJSON(object: any): SimulateResponse; toJSON(message: SimulateResponse): unknown; create(base?: DeepPartial): SimulateResponse; fromPartial(object: DeepPartial): SimulateResponse; }; export declare const GetTxRequest: { encode(message: GetTxRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetTxRequest; fromJSON(object: any): GetTxRequest; toJSON(message: GetTxRequest): unknown; create(base?: DeepPartial): GetTxRequest; fromPartial(object: DeepPartial): GetTxRequest; }; export declare const GetTxResponse: { encode(message: GetTxResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetTxResponse; fromJSON(object: any): GetTxResponse; toJSON(message: GetTxResponse): unknown; create(base?: DeepPartial): GetTxResponse; fromPartial(object: DeepPartial): GetTxResponse; }; export declare const GetBlockWithTxsRequest: { encode(message: GetBlockWithTxsRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsRequest; fromJSON(object: any): GetBlockWithTxsRequest; toJSON(message: GetBlockWithTxsRequest): unknown; create(base?: DeepPartial): GetBlockWithTxsRequest; fromPartial(object: DeepPartial): GetBlockWithTxsRequest; }; export declare const GetBlockWithTxsResponse: { encode(message: GetBlockWithTxsResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GetBlockWithTxsResponse; fromJSON(object: any): GetBlockWithTxsResponse; toJSON(message: GetBlockWithTxsResponse): unknown; create(base?: DeepPartial): GetBlockWithTxsResponse; fromPartial(object: DeepPartial): GetBlockWithTxsResponse; }; export declare const TxDecodeRequest: { encode(message: TxDecodeRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxDecodeRequest; fromJSON(object: any): TxDecodeRequest; toJSON(message: TxDecodeRequest): unknown; create(base?: DeepPartial): TxDecodeRequest; fromPartial(object: DeepPartial): TxDecodeRequest; }; export declare const TxDecodeResponse: { encode(message: TxDecodeResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxDecodeResponse; fromJSON(object: any): TxDecodeResponse; toJSON(message: TxDecodeResponse): unknown; create(base?: DeepPartial): TxDecodeResponse; fromPartial(object: DeepPartial): TxDecodeResponse; }; export declare const TxEncodeRequest: { encode(message: TxEncodeRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxEncodeRequest; fromJSON(object: any): TxEncodeRequest; toJSON(message: TxEncodeRequest): unknown; create(base?: DeepPartial): TxEncodeRequest; fromPartial(object: DeepPartial): TxEncodeRequest; }; export declare const TxEncodeResponse: { encode(message: TxEncodeResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxEncodeResponse; fromJSON(object: any): TxEncodeResponse; toJSON(message: TxEncodeResponse): unknown; create(base?: DeepPartial): TxEncodeResponse; fromPartial(object: DeepPartial): TxEncodeResponse; }; export declare const TxEncodeAminoRequest: { encode(message: TxEncodeAminoRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxEncodeAminoRequest; fromJSON(object: any): TxEncodeAminoRequest; toJSON(message: TxEncodeAminoRequest): unknown; create(base?: DeepPartial): TxEncodeAminoRequest; fromPartial(object: DeepPartial): TxEncodeAminoRequest; }; export declare const TxEncodeAminoResponse: { encode(message: TxEncodeAminoResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxEncodeAminoResponse; fromJSON(object: any): TxEncodeAminoResponse; toJSON(message: TxEncodeAminoResponse): unknown; create(base?: DeepPartial): TxEncodeAminoResponse; fromPartial(object: DeepPartial): TxEncodeAminoResponse; }; export declare const TxDecodeAminoRequest: { encode(message: TxDecodeAminoRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxDecodeAminoRequest; fromJSON(object: any): TxDecodeAminoRequest; toJSON(message: TxDecodeAminoRequest): unknown; create(base?: DeepPartial): TxDecodeAminoRequest; fromPartial(object: DeepPartial): TxDecodeAminoRequest; }; export declare const TxDecodeAminoResponse: { encode(message: TxDecodeAminoResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): TxDecodeAminoResponse; fromJSON(object: any): TxDecodeAminoResponse; toJSON(message: TxDecodeAminoResponse): unknown; create(base?: DeepPartial): TxDecodeAminoResponse; fromPartial(object: DeepPartial): TxDecodeAminoResponse; }; /** Service defines a gRPC service for interacting with transactions. */ export interface Service { /** Simulate simulates executing a transaction for estimating gas usage. */ Simulate(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** GetTx fetches a tx by hash. */ GetTx(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** BroadcastTx broadcast transaction. */ BroadcastTx(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** GetTxsEvent fetches txs by event. */ GetTxsEvent(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** GetBlockWithTxs fetches a block with decoded txs. */ GetBlockWithTxs(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** TxDecode decodes the transaction. */ TxDecode(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** TxEncode encodes the transaction. */ TxEncode(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. */ TxEncodeAmino(request: DeepPartial, metadata?: grpc.Metadata): Promise; /** TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. */ TxDecodeAmino(request: DeepPartial, metadata?: grpc.Metadata): Promise; } export declare class ServiceClientImpl implements Service { private readonly rpc; constructor(rpc: Rpc); Simulate(request: DeepPartial, metadata?: grpc.Metadata): Promise; GetTx(request: DeepPartial, metadata?: grpc.Metadata): Promise; BroadcastTx(request: DeepPartial, metadata?: grpc.Metadata): Promise; GetTxsEvent(request: DeepPartial, metadata?: grpc.Metadata): Promise; GetBlockWithTxs(request: DeepPartial, metadata?: grpc.Metadata): Promise; TxDecode(request: DeepPartial, metadata?: grpc.Metadata): Promise; TxEncode(request: DeepPartial, metadata?: grpc.Metadata): Promise; TxEncodeAmino(request: DeepPartial, metadata?: grpc.Metadata): Promise; TxDecodeAmino(request: DeepPartial, metadata?: grpc.Metadata): Promise; } export declare const ServiceDesc: { serviceName: string; }; export declare const ServiceSimulateDesc: UnaryMethodDefinitionish; export declare const ServiceGetTxDesc: UnaryMethodDefinitionish; export declare const ServiceBroadcastTxDesc: UnaryMethodDefinitionish; export declare const ServiceGetTxsEventDesc: UnaryMethodDefinitionish; export declare const ServiceGetBlockWithTxsDesc: UnaryMethodDefinitionish; export declare const ServiceTxDecodeDesc: UnaryMethodDefinitionish; export declare const ServiceTxEncodeDesc: UnaryMethodDefinitionish; export declare const ServiceTxEncodeAminoDesc: UnaryMethodDefinitionish; export declare const ServiceTxDecodeAminoDesc: UnaryMethodDefinitionish; interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } type UnaryMethodDefinitionish = UnaryMethodDefinitionishR; interface Rpc { unary(methodDesc: T, request: any, metadata: grpc.Metadata | undefined): Promise; } export declare class GrpcWebImpl { private host; private options; constructor(host: string, options: { transport?: grpc.TransportFactory; debug?: boolean; metadata?: grpc.Metadata; upStreamRetryCodes?: number[]; }); unary(methodDesc: T, _request: any, metadata: grpc.Metadata | undefined): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export declare class GrpcWebError extends globalThis.Error { code: grpc.Code; metadata: grpc.Metadata; constructor(message: string, code: grpc.Code, metadata: grpc.Metadata); } export {};