frostfs-api/refs/types.proto

79 lines
2.1 KiB
Protocol Buffer
Raw Normal View History

2020-01-30 11:41:24 +00:00
syntax = "proto3";
package neo.fs.v2.refs;
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc;refs";
option csharp_namespace = "NeoFS.API.v2.Refs";
2020-01-30 11:41:24 +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 {
// Container identifier
ContainerID container_id = 1 [json_name = "containerID"];
// Object identifier
ObjectID object_id = 2 [json_name = "objectID"];
2020-01-30 11:41:24 +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.
message ObjectID {
// Object identifier in a binary format
bytes value = 1 [json_name = "value"];
}
// NeoFS container identifier. Container structures are immutable and
// content-addressed. `ContainerID` is a 32 byte long SHA256 hash of
// stable-marshalled container message.
message ContainerID {
// Container identifier in a binary format.
bytes value = 1 [json_name = "value"];
}
// 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`.
message OwnerID {
// Identifier of the container owner in a binary format
bytes value = 1 [json_name = "value"];
}
// API version used by a node.
message Version {
// Major API version
uint32 major = 1 [json_name = "major"];
// Minor API version
uint32 minor = 2 [json_name = "minor"];
}
// Signature of something in NeoFS.
message Signature {
// Public key used for signing
bytes key = 1 [json_name = "key"];
// Signature
bytes sign = 2 [json_name = "signature"];
}
// Checksum algorithm type.
enum ChecksumType {
// Unknown. Not used
CHECKSUM_TYPE_UNSPECIFIED = 0;
// Tillich-Zemor homomorphic hash function
TZ = 1;
// SHA-256
SHA256 = 2;
}
// Checksum message.
message Checksum {
// Checksum algorithm type
ChecksumType type = 1 [json_name = "type"];
// Checksum itself
bytes sum = 2 [json_name = "sum"];
}