Skip to main content

Application Layer

Responsible for the structure and format of data at the application level. It includes the formats for requests (ApiRequest) and responses (ApiResponse) in Protocol Buffers format, defined according to the application's logic.

ApiRequest

request.pb
message ApiRequest {
uint32 id = 1;
uint32 app = 2;
uint32 method = 3;
bytes params = 4;
}
  • id: Request identifier, analogous to the identifier in JSON-RPC.

  • app: Application identifier.

  • method: Identifier of the invoked action, specific to the application (app).

  • params: Method call parameters presented in protobuf format, specific to the application and method.

ApiResponse

response.pb
message ApiResponse {
uint32 id = 1;
bytes result = 2;
}
  • id: Request identifier, corresponding to the same identifier in the request (ApiRequest).

  • result: Data representing the result of the method call, also presented in protobuf format.