import { Tx } from "./tx"; import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; import { TxResponse, GasInfo, Result } from "../../base/abci/v1beta1/abci"; import { BlockID } from "../../../tendermint/types/types"; import { Block } from "../../../tendermint/types/block"; import { BinaryReader, BinaryWriter } from "../../../binary"; import { DeepPartial, Exact, Rpc } from "../../../helpers"; import { JsonSafe } from "../../../json-safe"; 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. */ 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; orderBy: OrderBy; /** * page is the page number to query, starts at 1. If not provided, will * default to first page. */ page: bigint; /** * 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: bigint; /** * 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; /** total is total number of results available */ total: bigint; } /** * 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; } /** * 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; /** 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; /** result is the result of the simulation. */ result?: Result; } /** * 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; /** tx_response is the queried TxResponses. */ txResponse?: TxResponse; } /** * GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs * RPC method. */ export interface GetBlockWithTxsRequest { /** height is the height of the block to query. */ height: bigint; /** pagination defines a pagination for the request. */ pagination?: PageRequest; } /** * GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs * method. */ export interface GetBlockWithTxsResponse { /** txs are the transactions in the block. */ txs: Tx[]; blockId?: BlockID; block?: Block; /** pagination defines a pagination for the response. */ pagination?: PageResponse; } /** * 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; } /** * TxEncodeRequest is the request type for the Service.TxEncode * RPC method. */ export interface TxEncodeRequest { /** tx is the transaction to encode. */ tx?: Tx; } /** * 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: { typeUrl: string; encode(message: GetTxsEventRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventRequest; fromJSON(object: any): GetTxsEventRequest; toJSON(message: GetTxsEventRequest): JsonSafe; fromPartial, I>>(object: I): GetTxsEventRequest; }; export declare const GetTxsEventResponse: { typeUrl: string; encode(message: GetTxsEventResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): GetTxsEventResponse; fromJSON(object: any): GetTxsEventResponse; toJSON(message: GetTxsEventResponse): JsonSafe; fromPartial, I>>(object: I): GetTxsEventResponse; }; export declare const BroadcastTxRequest: { typeUrl: string; encode(message: BroadcastTxRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxRequest; fromJSON(object: any): BroadcastTxRequest; toJSON(message: BroadcastTxRequest): JsonSafe; fromPartial, I>>(object: I): BroadcastTxRequest; }; export declare const BroadcastTxResponse: { typeUrl: string; encode(message: BroadcastTxResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): BroadcastTxResponse; fromJSON(object: any): BroadcastTxResponse; toJSON(message: BroadcastTxResponse): JsonSafe; fromPartial, I>>(object: I): BroadcastTxResponse; }; export declare const SimulateRequest: { typeUrl: string; encode(message: SimulateRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): SimulateRequest; fromJSON(object: any): SimulateRequest; toJSON(message: SimulateRequest): JsonSafe; fromPartial, I>>(object: I): SimulateRequest; }; export declare const SimulateResponse: { typeUrl: string; encode(message: SimulateResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): SimulateResponse; fromJSON(object: any): SimulateResponse; toJSON(message: SimulateResponse): JsonSafe; fromPartial, I>>(object: I): SimulateResponse; }; export declare const GetTxRequest: { typeUrl: string; encode(message: GetTxRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): GetTxRequest; fromJSON(object: any): GetTxRequest; toJSON(message: GetTxRequest): JsonSafe; fromPartial, I>>(object: I): GetTxRequest; }; export declare const GetTxResponse: { typeUrl: string; encode(message: GetTxResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): GetTxResponse; fromJSON(object: any): GetTxResponse; toJSON(message: GetTxResponse): JsonSafe; fromPartial, I>>(object: I): GetTxResponse; }; export declare const GetBlockWithTxsRequest: { typeUrl: string; encode(message: GetBlockWithTxsRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsRequest; fromJSON(object: any): GetBlockWithTxsRequest; toJSON(message: GetBlockWithTxsRequest): JsonSafe; fromPartial, I>>(object: I): GetBlockWithTxsRequest; }; export declare const GetBlockWithTxsResponse: { typeUrl: string; encode(message: GetBlockWithTxsResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): GetBlockWithTxsResponse; fromJSON(object: any): GetBlockWithTxsResponse; toJSON(message: GetBlockWithTxsResponse): JsonSafe; fromPartial, I>>(object: I): GetBlockWithTxsResponse; }; export declare const TxDecodeRequest: { typeUrl: string; encode(message: TxDecodeRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeRequest; fromJSON(object: any): TxDecodeRequest; toJSON(message: TxDecodeRequest): JsonSafe; fromPartial, I>>(object: I): TxDecodeRequest; }; export declare const TxDecodeResponse: { typeUrl: string; encode(message: TxDecodeResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeResponse; fromJSON(object: any): TxDecodeResponse; toJSON(message: TxDecodeResponse): JsonSafe; fromPartial, I>>(object: I): TxDecodeResponse; }; export declare const TxEncodeRequest: { typeUrl: string; encode(message: TxEncodeRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeRequest; fromJSON(object: any): TxEncodeRequest; toJSON(message: TxEncodeRequest): JsonSafe; fromPartial, I>>(object: I): TxEncodeRequest; }; export declare const TxEncodeResponse: { typeUrl: string; encode(message: TxEncodeResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeResponse; fromJSON(object: any): TxEncodeResponse; toJSON(message: TxEncodeResponse): JsonSafe; fromPartial, I>>(object: I): TxEncodeResponse; }; export declare const TxEncodeAminoRequest: { typeUrl: string; encode(message: TxEncodeAminoRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeAminoRequest; fromJSON(object: any): TxEncodeAminoRequest; toJSON(message: TxEncodeAminoRequest): JsonSafe; fromPartial, I>>(object: I): TxEncodeAminoRequest; }; export declare const TxEncodeAminoResponse: { typeUrl: string; encode(message: TxEncodeAminoResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxEncodeAminoResponse; fromJSON(object: any): TxEncodeAminoResponse; toJSON(message: TxEncodeAminoResponse): JsonSafe; fromPartial, I>>(object: I): TxEncodeAminoResponse; }; export declare const TxDecodeAminoRequest: { typeUrl: string; encode(message: TxDecodeAminoRequest, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeAminoRequest; fromJSON(object: any): TxDecodeAminoRequest; toJSON(message: TxDecodeAminoRequest): JsonSafe; fromPartial, I>>(object: I): TxDecodeAminoRequest; }; export declare const TxDecodeAminoResponse: { typeUrl: string; encode(message: TxDecodeAminoResponse, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): TxDecodeAminoResponse; fromJSON(object: any): TxDecodeAminoResponse; toJSON(message: TxDecodeAminoResponse): JsonSafe; fromPartial, I>>(object: I): TxDecodeAminoResponse; }; /** Service defines a gRPC service for interacting with transactions. */ export interface Service { /** Simulate simulates executing a transaction for estimating gas usage. */ Simulate(request: SimulateRequest): Promise; /** GetTx fetches a tx by hash. */ GetTx(request: GetTxRequest): Promise; /** BroadcastTx broadcast transaction. */ BroadcastTx(request: BroadcastTxRequest): Promise; /** GetTxsEvent fetches txs by event. */ GetTxsEvent(request: GetTxsEventRequest): Promise; /** GetBlockWithTxs fetches a block with decoded txs. */ GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; /** TxDecode decodes the transaction. */ TxDecode(request: TxDecodeRequest): Promise; /** TxEncode encodes the transaction. */ TxEncode(request: TxEncodeRequest): Promise; /** TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. */ TxEncodeAmino(request: TxEncodeAminoRequest): Promise; /** TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. */ TxDecodeAmino(request: TxDecodeAminoRequest): Promise; } export declare class ServiceClientImpl implements Service { private readonly rpc; constructor(rpc: Rpc); Simulate(request: SimulateRequest): Promise; GetTx(request: GetTxRequest): Promise; BroadcastTx(request: BroadcastTxRequest): Promise; GetTxsEvent(request: GetTxsEventRequest): Promise; GetBlockWithTxs(request: GetBlockWithTxsRequest): Promise; TxDecode(request: TxDecodeRequest): Promise; TxEncode(request: TxEncodeRequest): Promise; TxEncodeAmino(request: TxEncodeAminoRequest): Promise; TxDecodeAmino(request: TxDecodeAminoRequest): Promise; }