The form of a waycast
- A waycast is a directory enclosing waysource and ancillary components which together comprise
a way declaration.
+ Further require that the directory be named `way` and directly contain a file named `README.brec`.
- This is soley to enable identifying a waycast as such, pending some other means of doing so.
: see e.g. `isIntracast` @ non-fractal ~/code/WP3/wayic/Web/imager/WaybreccianFileTranslator.java
: private
ancillary components
- The ancillary components include a certificate of authority.
waysource
- The waysource includes one thoroughfractum, which models the caster’s way.
━━━━━━━━━━━
Authority
───────────
- The waycaster retains authority over the waycast in all its copies.
- A copy of a waycast is authoritative iff:
- Its certificate of authority is valid.
- Its location is among the `authoritative_waycast_locations` of the certificate.
certificate of authority
/ An ancillary component of the waycast.
- The waycast includes a certificate of authority issued by the waycaster.
- It is a file that contains:
/ The precise form here is yet to be detailed.
waycaster_identifier
- The identifier of the waycaster.
authoritative_waycast_locations
- The locations of the nominally authoritative copies of the waycast.
- Each location has the form of a URI.
: re `form of a URI` see https://www.rfc-editor.org/rfc/rfc3986#section-3
- The canonical location must be included.
timestamp
- A timestamp including a date.
- A certificate is valid iff:
- It is properly signed, viz. by a cryptographic private key
that matches its `waycaster_identifier`, itself a public key.
/ The precise form of signature is yet to be detailed.
- No other known certificate among waycast copies has all of:
- the same `waycaster_identifier`
- a proper signature
- an equal or later `timestamp`
- a difference in the rest of its content
identifier of a waycaster
- The identifier of a waycaster is a cryptographic public key.
━━━━━━━━━━━━━━━━━━━━
Canonical location
────────────────────
- Each waycast has a standard, public (canonical) location.
- In form, it is a URI ending with `/`.
: re `URI` see https://www.rfc-editor.org/rfc/rfc3986#section-3
canonicalize( URI `u` )
: re `URI` see https://www.rfc-editor.org/rfc/rfc3986#section-3
if( `u` refers outside of a waycast )
throw+ Uncast referent
deem+ `w` the waycast wherein `u` refers;
`p` a relative path, that of `u` relativized against the location of `w`
`aa` the `authoritative_waycast_locations` of `w`
if( `aa` excludes `w` )
+ Set `w` to a waycast of `aa`.
+ Set `u` to the resolution of `p` against the canonical location of `w`
return+ `u`
\ Copyright © 2019, 2021-2022 Michael Allan. Licence MIT.