2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 18:01:50 +00:00
|
|
|
|
2020-01-30 11:41:24 +00:00
|
|
|
package accounting;
|
2020-08-05 18:01:50 +00:00
|
|
|
|
2020-03-31 06:58:22 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/accounting";
|
2020-02-05 12:14:39 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.Accounting";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
import "service/meta.proto";
|
|
|
|
import "service/verify.proto";
|
2020-08-05 16:49:16 +00:00
|
|
|
import "refs/types.proto";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-08-05 18:01:50 +00:00
|
|
|
// The service provides methods for obtaining information
|
|
|
|
// about the account balance in NeoFS system.
|
2020-01-30 11:41:24 +00:00
|
|
|
service Accounting {
|
2020-08-05 18:01:50 +00:00
|
|
|
// Returns the amount of funds for the requested NeoFS account.
|
|
|
|
rpc Balance (BalanceRequest) returns (BalanceResponse);
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-05 18:01:50 +00:00
|
|
|
// Message defines the request body of Balance method.
|
|
|
|
//
|
|
|
|
// To indicate the account for which the balance is requested, its identifier is used.
|
|
|
|
//
|
|
|
|
// To gain access to the requested information, the request body must be formed according
|
|
|
|
// to the requirements from the system specification.
|
2020-01-30 11:41:24 +00:00
|
|
|
message BalanceRequest {
|
2020-08-05 18:01:50 +00:00
|
|
|
// Carries user identifier in NeoFS system for which the balance is requested.
|
2020-08-05 16:49:16 +00:00
|
|
|
refs.OwnerID OwnerID = 1;
|
2020-08-05 18:01:50 +00:00
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate message
|
|
|
|
// transport and does not affect request execution.
|
|
|
|
service.RequestMetaHeader MetaHeader = 98;
|
|
|
|
|
|
|
|
// Carries request verification information. This header is used to authenticate
|
|
|
|
// the nodes of the message route and check the correctness of transmission.
|
|
|
|
service.RequestVerificationHeader VerifyHeader = 99;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
|
|
|
|
2020-08-05 17:32:10 +00:00
|
|
|
// Decimal represents the decimal numbers.
|
|
|
|
message Decimal {
|
|
|
|
// Value carries number value.
|
|
|
|
int64 Value = 1;
|
|
|
|
|
|
|
|
// Precision carries value precision.
|
|
|
|
uint32 Precision = 2;
|
|
|
|
}
|
|
|
|
|
2020-08-05 18:01:50 +00:00
|
|
|
// Message defines the response body of Balance method.
|
|
|
|
//
|
|
|
|
// The amount of funds is calculated in decimal numbers.
|
2020-01-30 11:41:24 +00:00
|
|
|
message BalanceResponse {
|
2020-08-05 18:01:50 +00:00
|
|
|
// Carries the amount of funds on the account.
|
2020-08-05 17:32:10 +00:00
|
|
|
Decimal Balance = 1;
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|