2019-11-18 13:34:06 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package accounting;
|
2020-01-30 13:32:50 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api/accounting";
|
2019-11-18 13:34:06 +00:00
|
|
|
|
2019-11-18 16:22:08 +00:00
|
|
|
import "service/meta.proto";
|
|
|
|
import "service/verify.proto";
|
2019-11-18 13:34:06 +00:00
|
|
|
import "decimal/decimal.proto";
|
|
|
|
import "accounting/types.proto";
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
option (gogoproto.stable_marshaler_all) = true;
|
|
|
|
|
2019-11-20 15:57:51 +00:00
|
|
|
// Accounting is a service that provides access for accounting balance
|
|
|
|
// information
|
2019-11-18 13:34:06 +00:00
|
|
|
service Accounting {
|
2019-11-20 15:57:51 +00:00
|
|
|
// Balance returns current balance status of the NeoFS user
|
2019-11-18 13:34:06 +00:00
|
|
|
rpc Balance(BalanceRequest) returns (BalanceResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message BalanceRequest {
|
2019-11-20 15:57:51 +00:00
|
|
|
// OwnerID is a wallet address
|
2019-11-18 16:22:08 +00:00
|
|
|
bytes OwnerID = 1 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false];
|
|
|
|
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
|
|
|
|
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
|
|
|
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)
|
|
|
|
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
2019-11-18 13:34:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message BalanceResponse {
|
2019-11-20 15:57:51 +00:00
|
|
|
// Balance contains current account balance state
|
2019-11-18 13:34:06 +00:00
|
|
|
decimal.Decimal Balance = 1;
|
2019-11-20 15:57:51 +00:00
|
|
|
// LockAccounts contains information about locked funds. Locked funds appear
|
|
|
|
// when user pays for storage or withdraw assets.
|
2019-11-18 13:34:06 +00:00
|
|
|
repeated Account LockAccounts = 2;
|
|
|
|
}
|