syntax = "proto3"; package accounting; option go_package = "github.com/nspcc-dev/neofs-proto/accounting"; import "decimal/decimal.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.stable_marshaler_all) = true; // Withdraw is a service that provides withdraw assets operations from the NeoFS service Withdraw { // Get returns cheque if it was signed by inner ring nodes rpc Get(GetRequest) returns (GetResponse); // Put ask inner ring nodes to sign a cheque for withdraw invoke rpc Put(PutRequest) returns (PutResponse); // List shows all user's checks rpc List(ListRequest) returns (ListResponse); // Delete allows user to remove unused cheque rpc Delete(DeleteRequest) returns (DeleteResponse); } message Item { // ID is a cheque identifier bytes ID = 1 [(gogoproto.customtype) = "ChequeID", (gogoproto.nullable) = false]; // OwnerID is a wallet address bytes OwnerID = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; // Amount of funds decimal.Decimal Amount = 3; // Height is the neo blockchain height until the cheque is valid uint64 Height = 4; // Payload contains cheque representation in bytes bytes Payload = 5; } message GetRequest { // ID is cheque identifier bytes ID = 1 [(gogoproto.customtype) = "ChequeID", (gogoproto.nullable) = false]; // OwnerID is a wallet address bytes OwnerID = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; // TTL must be larger than zero, it decreased in every neofs-node uint32 TTL = 3; } message GetResponse { // Withdraw is cheque with meta information Item Withdraw = 1; } message PutRequest { // OwnerID is a wallet address bytes OwnerID = 1 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; // Amount of funds decimal.Decimal Amount = 2; // Height is the neo blockchain height until the cheque is valid uint64 Height = 3; // MessageID is a nonce for uniq request (UUIDv4) bytes MessageID = 4 [(gogoproto.customtype) = "MessageID", (gogoproto.nullable) = false]; // Signature is a signature of the sent request bytes Signature = 5; // TTL must be larger than zero, it decreased in every neofs-node uint32 TTL = 6; } message PutResponse { // ID is cheque identifier bytes ID = 1 [(gogoproto.customtype) = "ChequeID", (gogoproto.nullable) = false]; } message ListRequest { // OwnerID is a wallet address bytes OwnerID = 1 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; // TTL must be larger than zero, it decreased in every neofs-node uint32 TTL = 2; } message ListResponse { // Items is a set of cheques with meta information repeated Item Items = 1; } message DeleteRequest { // ID is cheque identifier bytes ID = 1 [(gogoproto.customtype) = "ChequeID", (gogoproto.nullable) = false]; // OwnerID is a wallet address bytes OwnerID = 2 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; // MessageID is a nonce for uniq request (UUIDv4) bytes MessageID = 3 [(gogoproto.customtype) = "MessageID", (gogoproto.nullable) = false]; // Signature is a signature of the sent request bytes Signature = 4; // TTL must be larger than zero, it decreased in every neofs-node uint32 TTL = 5; } // DeleteResponse is empty message DeleteResponse {}