github.com/Finschia/finschia-sdk@v0.49.1/proto/cosmos/base/reflection/v2alpha1/reflection.proto (about)

     1  // Since: cosmos-sdk 0.43
     2  syntax = "proto3";
     3  package cosmos.base.reflection.v2alpha1;
     4  
     5  import "google/api/annotations.proto";
     6  
     7  option go_package = "github.com/Finschia/finschia-sdk/server/grpc/reflection/v2";
     8  
     9  // AppDescriptor describes a cosmos-sdk based application
    10  message AppDescriptor {
    11    // AuthnDescriptor provides information on how to authenticate transactions on the application
    12    // NOTE: experimental and subject to change in future releases.
    13    AuthnDescriptor authn = 1;
    14    // chain provides the chain descriptor
    15    ChainDescriptor chain = 2;
    16    // codec provides metadata information regarding codec related types
    17    CodecDescriptor codec = 3;
    18    // configuration provides metadata information regarding the sdk.Config type
    19    ConfigurationDescriptor configuration = 4;
    20    // query_services provides metadata information regarding the available queriable endpoints
    21    QueryServicesDescriptor query_services = 5;
    22    // tx provides metadata information regarding how to send transactions to the given application
    23    TxDescriptor tx = 6;
    24  }
    25  
    26  // TxDescriptor describes the accepted transaction type
    27  message TxDescriptor {
    28    // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type)
    29    // it is not meant to support polymorphism of transaction types, it is supposed to be used by
    30    // reflection clients to understand if they can handle a specific transaction type in an application.
    31    string fullname = 1;
    32    // msgs lists the accepted application messages (sdk.Msg)
    33    repeated MsgDescriptor msgs = 2;
    34  }
    35  
    36  // AuthnDescriptor provides information on how to sign transactions without relying
    37  // on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures
    38  message AuthnDescriptor {
    39    // sign_modes defines the supported signature algorithm
    40    repeated SigningModeDescriptor sign_modes = 1;
    41  }
    42  
    43  // SigningModeDescriptor provides information on a signing flow of the application
    44  // NOTE(fdymylja): here we could go as far as providing an entire flow on how
    45  // to sign a message given a SigningModeDescriptor, but it's better to think about
    46  // this another time
    47  message SigningModeDescriptor {
    48    // name defines the unique name of the signing mode
    49    string name = 1;
    50    // number is the unique int32 identifier for the sign_mode enum
    51    int32 number = 2;
    52    // authn_info_provider_method_fullname defines the fullname of the method to call to get
    53    // the metadata required to authenticate using the provided sign_modes
    54    string authn_info_provider_method_fullname = 3;
    55  }
    56  
    57  // ChainDescriptor describes chain information of the application
    58  message ChainDescriptor {
    59    // id is the chain id
    60    string id = 1;
    61  }
    62  
    63  // CodecDescriptor describes the registered interfaces and provides metadata information on the types
    64  message CodecDescriptor {
    65    // interfaces is a list of the registerted interfaces descriptors
    66    repeated InterfaceDescriptor interfaces = 1;
    67  }
    68  
    69  // InterfaceDescriptor describes the implementation of an interface
    70  message InterfaceDescriptor {
    71    // fullname is the name of the interface
    72    string fullname = 1;
    73    // interface_accepting_messages contains information regarding the proto messages which contain the interface as
    74    // google.protobuf.Any field
    75    repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2;
    76    // interface_implementers is a list of the descriptors of the interface implementers
    77    repeated InterfaceImplementerDescriptor interface_implementers = 3;
    78  }
    79  
    80  // InterfaceImplementerDescriptor describes an interface implementer
    81  message InterfaceImplementerDescriptor {
    82    // fullname is the protobuf queryable name of the interface implementer
    83    string fullname = 1;
    84    // type_url defines the type URL used when marshalling the type as any
    85    // this is required so we can provide type safe google.protobuf.Any marshalling and
    86    // unmarshalling, making sure that we don't accept just 'any' type
    87    // in our interface fields
    88    string type_url = 2;
    89  }
    90  
    91  // InterfaceAcceptingMessageDescriptor describes a protobuf message which contains
    92  // an interface represented as a google.protobuf.Any
    93  message InterfaceAcceptingMessageDescriptor {
    94    // fullname is the protobuf fullname of the type containing the interface
    95    string fullname = 1;
    96    // field_descriptor_names is a list of the protobuf name (not fullname) of the field
    97    // which contains the interface as google.protobuf.Any (the interface is the same, but
    98    // it can be in multiple fields of the same proto message)
    99    repeated string field_descriptor_names = 2;
   100  }
   101  
   102  // ConfigurationDescriptor contains metadata information on the sdk.Config
   103  message ConfigurationDescriptor {
   104    // bech32_account_address_prefix is the account address prefix
   105    string bech32_account_address_prefix = 1;
   106  }
   107  
   108  // MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction
   109  message MsgDescriptor {
   110    // msg_type_url contains the TypeURL of a sdk.Msg.
   111    string msg_type_url = 1;
   112  }
   113  
   114  // ReflectionService defines a service for application reflection.
   115  service ReflectionService {
   116    // GetAuthnDescriptor returns information on how to authenticate transactions in the application
   117    // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in
   118    // future releases of the cosmos-sdk.
   119    rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) {
   120      option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn";
   121    }
   122    // GetChainDescriptor returns the description of the chain
   123    rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) {
   124      option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain";
   125    };
   126    // GetCodecDescriptor returns the descriptor of the codec of the application
   127    rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) {
   128      option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec";
   129    }
   130    // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application
   131    rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) {
   132      option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration";
   133    }
   134    // GetQueryServicesDescriptor returns the available gRPC queryable services of the application
   135    rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) {
   136      option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services";
   137    }
   138    // GetTxDescriptor returns information on the used transaction object and available msgs that can be used
   139    rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) {
   140      option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor";
   141    }
   142  }
   143  
   144  // GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC
   145  message GetAuthnDescriptorRequest {}
   146  // GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC
   147  message GetAuthnDescriptorResponse {
   148    // authn describes how to authenticate to the application when sending transactions
   149    AuthnDescriptor authn = 1;
   150  }
   151  
   152  // GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC
   153  message GetChainDescriptorRequest {}
   154  // GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC
   155  message GetChainDescriptorResponse {
   156    // chain describes application chain information
   157    ChainDescriptor chain = 1;
   158  }
   159  
   160  // GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC
   161  message GetCodecDescriptorRequest {}
   162  // GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC
   163  message GetCodecDescriptorResponse {
   164    // codec describes the application codec such as registered interfaces and implementations
   165    CodecDescriptor codec = 1;
   166  }
   167  
   168  // GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC
   169  message GetConfigurationDescriptorRequest {}
   170  // GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC
   171  message GetConfigurationDescriptorResponse {
   172    // config describes the application's sdk.Config
   173    ConfigurationDescriptor config = 1;
   174  }
   175  
   176  // GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC
   177  message GetQueryServicesDescriptorRequest {}
   178  // GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC
   179  message GetQueryServicesDescriptorResponse {
   180    // queries provides information on the available queryable services
   181    QueryServicesDescriptor queries = 1;
   182  }
   183  
   184  // GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC
   185  message GetTxDescriptorRequest {}
   186  // GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC
   187  message GetTxDescriptorResponse {
   188    // tx provides information on msgs that can be forwarded to the application
   189    // alongside the accepted transaction protobuf type
   190    TxDescriptor tx = 1;
   191  }
   192  
   193  // QueryServicesDescriptor contains the list of cosmos-sdk queriable services
   194  message QueryServicesDescriptor {
   195    // query_services is a list of cosmos-sdk QueryServiceDescriptor
   196    repeated QueryServiceDescriptor query_services = 1;
   197  }
   198  
   199  // QueryServiceDescriptor describes a cosmos-sdk queryable service
   200  message QueryServiceDescriptor {
   201    // fullname is the protobuf fullname of the service descriptor
   202    string fullname = 1;
   203    // is_module describes if this service is actually exposed by an application's module
   204    bool is_module = 2;
   205    // methods provides a list of query service methods
   206    repeated QueryMethodDescriptor methods = 3;
   207  }
   208  
   209  // QueryMethodDescriptor describes a queryable method of a query service
   210  // no other info is provided beside method name and tendermint queryable path
   211  // because it would be redundant with the grpc reflection service
   212  message QueryMethodDescriptor {
   213    // name is the protobuf name (not fullname) of the method
   214    string name = 1;
   215    // full_query_path is the path that can be used to query
   216    // this method via tendermint abci.Query
   217    string full_query_path = 2;
   218  }