2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
2020-08-05 22:23:57 +00:00
|
|
|
|
2020-08-12 21:43:51 +00:00
|
|
|
package neo.fs.v2.refs;
|
2020-08-05 22:23:57 +00:00
|
|
|
|
2020-08-14 18:27:31 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc;refs";
|
2020-08-12 21:43:51 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.v2.Refs";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// Object in NeoFS can be addressed by it's ContainerID and ObjectID. In string
|
|
|
|
// format there MUST be a '/' delimeter between them.
|
2020-01-30 11:41:24 +00:00
|
|
|
message Address {
|
2020-10-15 20:50:40 +00:00
|
|
|
// Container identifier
|
2020-10-16 13:17:49 +00:00
|
|
|
ContainerID container_id = 1 [json_name = "container"];
|
2020-10-15 20:50:40 +00:00
|
|
|
// Object identifier
|
2020-10-16 13:17:49 +00:00
|
|
|
ObjectID object_id = 2 [json_name = "object"];
|
2020-01-30 11:41:24 +00:00
|
|
|
}
|
2020-08-04 12:52:14 +00:00
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// NeoFS Object unique identifier. Objects are immutable and content-addressed.
|
|
|
|
// It means `ObjectID` will change if `header` or `payload` changes. `ObjectID`
|
|
|
|
// is calculated as a hash of `header` field, which contains hash of object's
|
|
|
|
// payload.
|
2020-08-04 12:52:14 +00:00
|
|
|
message ObjectID {
|
2020-10-15 20:50:40 +00:00
|
|
|
// Object identifier in a binary format
|
2020-10-16 13:17:49 +00:00
|
|
|
bytes value = 1 [json_name = "value"];
|
2020-08-05 14:39:57 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// NeoFS container identifier. Container structures are immutable and
|
|
|
|
// content-addressed. `ContainerID` is a 32 byte long SHA256 hash of
|
|
|
|
// stable-marshalled container message.
|
2020-08-05 14:39:57 +00:00
|
|
|
message ContainerID {
|
2020-10-15 20:50:40 +00:00
|
|
|
// Container identifier in a binary format.
|
2020-10-16 13:17:49 +00:00
|
|
|
bytes value = 1 [json_name = "value"];
|
2020-08-05 14:39:57 +00:00
|
|
|
}
|
2020-08-05 15:11:00 +00:00
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// OwnerID is a derivative of a user's main public key. The transformation
|
|
|
|
// algorithm is the same as for Neo3 wallet addresses. Neo3 wallet address can
|
|
|
|
// be directly used as `OwnerID`.
|
2020-08-05 15:11:00 +00:00
|
|
|
message OwnerID {
|
2020-10-15 20:50:40 +00:00
|
|
|
// Identifier of the container owner in a binary format
|
2020-10-16 13:17:49 +00:00
|
|
|
bytes value = 1 [json_name = "value"];
|
2020-08-18 13:14:25 +00:00
|
|
|
}
|
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// API version used by a node.
|
2020-08-18 13:14:25 +00:00
|
|
|
message Version {
|
2020-10-15 20:50:40 +00:00
|
|
|
// Major API version
|
2020-10-16 13:17:49 +00:00
|
|
|
uint32 major = 1 [json_name = "major"];
|
2020-08-18 13:14:25 +00:00
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// Minor API version
|
2020-10-16 13:17:49 +00:00
|
|
|
uint32 minor = 2 [json_name = "minor"];
|
2020-08-18 13:14:25 +00:00
|
|
|
}
|
2020-08-18 13:41:47 +00:00
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// Signature of something in NeoFS.
|
2020-08-18 13:41:47 +00:00
|
|
|
message Signature {
|
2020-10-15 20:50:40 +00:00
|
|
|
// Public key used for signing
|
2020-10-16 13:17:49 +00:00
|
|
|
bytes key = 1 [json_name = "key"];
|
2020-08-18 13:41:47 +00:00
|
|
|
// Signature
|
2020-10-16 13:17:49 +00:00
|
|
|
bytes sign = 2 [json_name = "signature"];
|
2020-08-18 13:41:47 +00:00
|
|
|
}
|
2020-08-18 15:26:51 +00:00
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// Checksum algorithm type.
|
2020-08-18 15:26:51 +00:00
|
|
|
enum ChecksumType {
|
|
|
|
// Unknown. Not used
|
|
|
|
CHECKSUM_TYPE_UNSPECIFIED = 0;
|
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// Tillich-Zemor homomorphic hash function
|
2020-08-18 15:26:51 +00:00
|
|
|
TZ = 1;
|
|
|
|
|
|
|
|
// SHA-256
|
|
|
|
SHA256 = 2;
|
|
|
|
}
|
|
|
|
|
2020-10-15 20:50:40 +00:00
|
|
|
// Checksum message.
|
2020-08-18 15:26:51 +00:00
|
|
|
message Checksum {
|
2020-08-18 15:41:25 +00:00
|
|
|
// Checksum algorithm type
|
2020-10-16 13:17:49 +00:00
|
|
|
ChecksumType type = 1 [json_name = "type"];
|
2020-08-18 15:41:25 +00:00
|
|
|
|
|
|
|
// Checksum itself
|
2020-10-16 13:17:49 +00:00
|
|
|
bytes sum = 2 [json_name = "sum"];
|
2020-08-18 15:26:51 +00:00
|
|
|
}
|