mfer/proto/mf.proto

46 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

2021-10-26 09:00:50 +00:00
syntax = "proto3";
option go_package = "mfer";
message MFFile {
enum Version {
NONE = 0;
ONE = 1; // only one for now
}
Version version = 1;
bytes innerMessage = 2;
2021-10-26 09:19:06 +00:00
// these are used solely to detect corruption/truncation
// and not for cryptographic integrity.
2021-10-26 09:00:50 +00:00
uint64 size = 3;
2021-10-26 09:19:06 +00:00
bytes sha256 = 4;
2021-10-26 09:00:50 +00:00
// think we might use gosignify instead of gpg:
// github.com/frankbraun/gosignify
//detached signature, ascii or binary
optional bytes signature = 5;
//full GPG key id
optional bytes signer = 6;
//full GPG signing public key, ascii or binary
optional bytes signingPubKey = 7;
}
message MFFilePath {
string path = 1;
2021-10-26 09:19:06 +00:00
string ipfsHash = 2; // this is the DAG version that you can `ipfs get`
// more info: https://ethereum.stackexchange.com/questions/44506/ipfs-hash-algorithm/53233
bytes multiHash = 3; //this must be sha256 for now
optional string mimeType = 4;
2021-10-26 09:00:50 +00:00
}
message MFFileInner {
enum Version {
NONE = 0;
ONE = 1; // only one for now
}
Version version = 1;
uint64 count = 2;
repeated MFFilePath files = 3;
}