OpenBalkans is a document annotation protocol for web of documents.
Node.js | Python 3 | C |
---|---|---|
Buffer | bytes | uint8_t[] |
number | int | int32_t |
EncodedPost = concat(bson_encode(Post), bson_encode(Signature))
EncodedPostRef = bson_encode(PostRef)
Field | Type | Required | Što |
---|---|---|---|
Pv | number | Yes | Protocol version |
Id | ObjectId | Yes | ObjectId |
Con | Document[] | Yes | Contents |
Sz | number | Yes | Size, octets (Content-Length) |
Typ | string | Yes | RFC 6838 Media Type (Content-Type) |
Enc | string | No | Encoding (Content-Encoding) |
Has | Buffer | Yes | SHA-256(Contents) |
Re | PostRef | No | Reply to a post (In-Reply-To) |
Upd | PostRef | No | Update a post |
ObjectId is used as a datetime and a nonce. Don't reuse ObjectId.
When updating a post, don't change the Re field.
Posts are equal when their PostRefs are equal.
Encoding | Što |
---|---|
Bro | RFC 7932 Brotli |
Encoding has higher precedence than size and SHA-256.
That is, Sz = length(brotli_compress(Contents))
Field | Type | Required | Što |
---|---|---|---|
Pk | Buffer | Yes | Public key |
Ed | Buffer | Yes | Ed25519 signature |
Field | Type | Required | Što |
---|---|---|---|
Ld | string | Yes | Loader |
Field | Type | Required | Što |
---|---|---|---|
Buf | Buffer | Yes | Contents |
Field | Type | Required | Što |
---|---|---|---|
Web | string | Yes | Web address (http¦https) |
Don't use RFC 2397 Data URLs.
Field | Type | Required | Što |
---|---|---|---|
Web | string | Yes | Web address (http¦https) |
Ref | string[] | Yes | Reference tokens |
Ref is a RFC 6901 JSON Pointer sequence with no ~encoding.
Field | Type | Required | Što |
---|---|---|---|
Pk | Buffer | Yes | Public key |
Has | Buffer | Yes | SHA-256(EncodedPost) |