Conex_resource.AuthorSourceAn author contains a list of approved resources (name, typ, digest). It also contains a list of key and signature pairs, and a list of accounts. Keys have to be approved by a quorum of janitors, but the resource list is modified only by the author themselves.
The type of a resource in the approved list: a counter (the index), a name, a typ, and its digest.
pp_r is a pretty printer.
r idx name typ dgst is a constructor.
r_equal r r' is true is the name, type, and digest of r and r' are equal.
type account = [ | `Email of identifier| `GitHub of identifier| `Other of identifier * string ]Variant of accounts
pp_account a is a pretty printer.
wire_account id a is the wire representation of a.
type t = private {created : Conex_utils.Uint.t;counter : Conex_utils.Uint.t;wraps : Conex_utils.Uint.t;name : identifier;resources : r list;accounts : account list;keys : (Key.t * Signature.t) list;queued : r list;}The record of an author: name, key/signature pairs, created, counter, approved and queued resource lists.
pp is a pretty printer.
val t :
?counter:Conex_utils.Uint.t ->
?wraps:Conex_utils.Uint.t ->
?accounts:account list ->
?keys:(Key.t * Signature.t) list ->
?resources:r list ->
?queued:r list ->
Conex_utils.Uint.t ->
identifier ->
tt ~counter ~wraps ~accounts ~keys ~resources ~queued created name is a constructor.
wire_raw t is the raw wire representation of t, including only header and resource list. This is used for signing.
contains ~queued author resource is true if resource is in author.resources (or author.queued if queued is true (default: false).
next_id t is the next free identitifer of the resource list index.
equal t t' is true if name, keys, accounts, resource lists, and queued are equal.
prep_sig t increments t.counter. Returns the carry bit as second component.
replace_sig t (k, s) adds k,s to t.keys, filtering existing pairs where the same public key is used.