2020-10-30 05:32:02 -07:00
|
|
|
syntax = "proto3";
|
|
|
|
package cosmos.tx.v1beta1;
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "cosmos/base/abci/v1beta1/abci.proto";
|
|
|
|
import "cosmos/tx/v1beta1/tx.proto";
|
2020-11-12 06:22:54 -08:00
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
2020-10-30 05:32:02 -07:00
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/types/tx";
|
|
|
|
|
|
|
|
// Service defines a gRPC service for interacting with transactions.
|
|
|
|
service Service {
|
2020-11-13 08:36:58 -08:00
|
|
|
// Simulate simulates executing a transaction for estimating gas usage.
|
|
|
|
rpc Simulate(SimulateRequest) returns (SimulateResponse) {
|
|
|
|
option (google.api.http).post = "/cosmos/tx/v1beta1/simulate";
|
|
|
|
}
|
|
|
|
// GetTx fetches a tx by hash.
|
|
|
|
rpc GetTx(GetTxRequest) returns (GetTxResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/tx/v1beta1/tx/{hash}";
|
|
|
|
}
|
2020-11-12 06:22:54 -08:00
|
|
|
|
2020-11-13 08:36:58 -08:00
|
|
|
// GetTxsEvent fetches txs by event.
|
|
|
|
rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/tx/v1beta1/txs";
|
|
|
|
}
|
2020-11-12 06:22:54 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// GetTxsEventRequest is the request type for the Service.TxsByEvents
|
|
|
|
// RPC method.
|
|
|
|
message GetTxsEventRequest {
|
2020-11-13 08:36:58 -08:00
|
|
|
// event is the transaction event type.
|
|
|
|
string event = 1;
|
|
|
|
// pagination defines an pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
2020-11-12 06:22:54 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// GetTxsEventResponse is the response type for the Service.TxsByEvents
|
|
|
|
// RPC method.
|
|
|
|
message GetTxsEventResponse {
|
2020-11-13 08:36:58 -08:00
|
|
|
// txs is the list of queried transactions.
|
|
|
|
repeated cosmos.tx.v1beta1.Tx txs = 1;
|
|
|
|
// tx_responses is the list of queried TxResponses.
|
|
|
|
repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2;
|
|
|
|
// pagination defines an pagination for the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 3;
|
2020-10-30 05:32:02 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// SimulateRequest is the request type for the Service.Simulate
|
|
|
|
// RPC method.
|
|
|
|
message SimulateRequest {
|
2020-11-13 08:36:58 -08:00
|
|
|
// tx is the transaction to simulate.
|
|
|
|
cosmos.tx.v1beta1.Tx tx = 1;
|
2020-10-30 05:32:02 -07:00
|
|
|
}
|
2020-11-13 08:36:58 -08:00
|
|
|
|
2020-10-30 05:32:02 -07:00
|
|
|
// SimulateResponse is the response type for the
|
|
|
|
// Service.SimulateRPC method.
|
|
|
|
message SimulateResponse {
|
2020-11-13 08:36:58 -08:00
|
|
|
// gas_info is the information about gas used in the simulation.
|
|
|
|
cosmos.base.abci.v1beta1.GasInfo gas_info = 1;
|
|
|
|
// result is the result of the simulation.
|
|
|
|
cosmos.base.abci.v1beta1.Result result = 2;
|
2020-10-30 05:32:02 -07:00
|
|
|
}
|
|
|
|
|
2020-11-12 06:22:54 -08:00
|
|
|
// GetTxRequest is the request type for the Service.GetTx
|
2020-10-30 05:32:02 -07:00
|
|
|
// RPC method.
|
|
|
|
message GetTxRequest {
|
2020-11-13 08:36:58 -08:00
|
|
|
// hash is the tx hash to query, encoded as a hex string.
|
|
|
|
string hash = 1;
|
2020-10-30 05:32:02 -07:00
|
|
|
}
|
2020-11-12 06:22:54 -08:00
|
|
|
|
2020-10-30 05:32:02 -07:00
|
|
|
// GetTxResponse is the response type for the Service.GetTx method.
|
|
|
|
message GetTxResponse {
|
2020-11-13 08:36:58 -08:00
|
|
|
// tx is the queried transaction.
|
|
|
|
cosmos.tx.v1beta1.Tx tx = 1;
|
|
|
|
// tx_response is the queried TxResponses.
|
|
|
|
cosmos.base.abci.v1beta1.TxResponse tx_response = 2;
|
2020-11-12 06:22:54 -08:00
|
|
|
}
|