bucky-objects 0.1.0

Bucky objects library
Documentation
syntax="proto3";

// object body ext
message ObjectBodyExt {
    optional bytes object_id = 1;
}

// contract
message ContractBodyContent {
    bytes data = 1;
}

// device
message DeviceBodyContent {
    repeated bytes endpoints = 1;
    repeated bytes sn_list = 2;
    repeated bytes passive_pn_list = 3;
    optional string name = 4;
    optional uint32 bdt_version = 5;
}

// dir
message DirBodyContent {
    enum Type {
        Chunk = 0;
        ObjList = 1;
    }
    Type type = 1;
    optional bytes chunk_id = 2;

    // 使用list编码hash_map
    message ObjItem {
        bytes obj_id = 1;
        bytes value = 2;
    }
    repeated ObjItem obj_list = 3;
}

// file
message ChunkList {
    enum Type {
        ChunkInList = 0;
        ChunkInFile = 1;
        ChunkInBundle = 2;
    }
    enum HashMethod {
        Serial = 0;
    }

    Type type = 1;
    repeated bytes chunk_id_list = 2;
    bytes file_id = 3;
    optional HashMethod hash_method = 4;
}

message FileBodyContent {
    ChunkList chunk_list = 1;
}

// people
message PeopleBodyContent {
    repeated bytes ood_list = 1;
    optional string name = 2;
    optional bytes icon = 3;
    optional string ood_work_mode = 4;
}

message GroupMember {
    bytes id = 1;
    string title = 2;
}

message CommonGroupBodyContent {
    optional string name = 1;
    optional string icon = 2;
    optional string description = 3;

    repeated GroupMember members = 4; // sort by id deduplicated ascending order

    repeated bytes ood_list = 5; // sort by id deduplicated ascending order
    
    optional bytes prev_shell_id = 6;
    uint64 version = 7;
}

// simple_group
message SimpleGroupDescContent {
    bytes unique_id = 1;
    optional bytes founder_id = 2;
    repeated GroupMember admins = 3; // sort by id deduplicated ascending order
}

message SimpleGroupBodyContent {
    CommonGroupBodyContent common = 1;
}

// org
message OrgDescContent {
    bytes unique_id = 1;
    optional bytes founder_id = 2;
}

message OrgBodyContent {
    repeated GroupMember admins = 1; // sort by id deduplicated ascending order
    CommonGroupBodyContent common = 2;
}

// tx
message TxBodyContent {
    bytes data = 1;
}

// proof_of_service
message ProofData {
    bytes data = 1;
}

message ProofOfServiceBodyContent {
    ProofData data = 1;
}