-
Notifications
You must be signed in to change notification settings - Fork 36
/
query.proto
45 lines (37 loc) · 1.64 KB
/
query.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
syntax = "proto3";
package provenance.oracle.v1;
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/any.proto";
option go_package = "github.com/provenance-io/provenance/x/oracle/types";
option java_package = "io.provenance.oracle.v1";
option java_multiple_files = true;
// Query defines the gRPC querier service for oracle module.
service Query {
// OracleAddress returns the address of the oracle
rpc OracleAddress(QueryOracleAddressRequest) returns (QueryOracleAddressResponse) {
option (google.api.http).get = "/provenance/oracle/v1/oracle_address";
}
// Oracle forwards a query to the module's oracle
rpc Oracle(QueryOracleRequest) returns (QueryOracleResponse) {
option (google.api.http).get = "/provenance/oracle/v1/oracle";
}
}
// QueryOracleAddressRequest queries for the address of the oracle.
message QueryOracleAddressRequest {}
// QueryOracleAddressResponse contains the address of the oracle.
message QueryOracleAddressResponse {
// The address of the oracle
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// QueryOracleRequest queries the module's oracle.
message QueryOracleRequest {
// Query contains the query data passed to the oracle.
bytes query = 1 [(gogoproto.casttype) = "github.com/CosmWasm/wasmd/x/wasm/types.RawContractMessage"];
}
// QueryOracleResponse contains the result of the query sent to the oracle.
message QueryOracleResponse {
// Data contains the json data returned from the oracle.
bytes data = 1 [(gogoproto.casttype) = "github.com/CosmWasm/wasmd/x/wasm/types.RawContractMessage"];
}