2020-08-18 11:32:48 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package neo.fs.v2.accounting;
|
|
|
|
|
2022-12-09 11:18:06 +00:00
|
|
|
option go_package = "github.com/TrueCloudLab/frostfs-api-go/v2/accounting/grpc;accounting";
|
2021-03-10 10:54:06 +00:00
|
|
|
option csharp_namespace = "Neo.FileStorage.API.Accounting";
|
2020-08-18 11:32:48 +00:00
|
|
|
|
2020-10-13 09:57:07 +00:00
|
|
|
// Standard floating point data type can't be used in NeoFS due to inexactness
|
|
|
|
// of the result when doing lots of small number operations. To solve the lost
|
|
|
|
// precision issue, special `Decimal` format is used for monetary computations.
|
|
|
|
//
|
|
|
|
// Please see [The General Decimal Arithmetic
|
|
|
|
// Specification](http://speleotrove.com/decimal/) for detailed problem
|
|
|
|
// description.
|
2020-08-18 11:32:48 +00:00
|
|
|
message Decimal {
|
2022-04-13 06:21:33 +00:00
|
|
|
// Number in the smallest Token fractions.
|
2020-10-19 06:32:00 +00:00
|
|
|
int64 value = 1 [json_name = "value"];
|
2020-08-18 11:32:48 +00:00
|
|
|
|
2020-10-13 09:57:07 +00:00
|
|
|
// Precision value indicating how many smallest fractions can be in one
|
|
|
|
// integer.
|
2020-10-19 06:32:00 +00:00
|
|
|
uint32 precision = 2 [json_name = "precision"];
|
2020-10-13 09:57:07 +00:00
|
|
|
}
|