Skip to main content

Module bundle

Module bundle 

Source
Expand description

bundle 1 (CONTRACT-1.8b H2, docs/bundle-1.md): a namespace’s function descriptors, name bindings and signed receipts as one JSON object, with a manifest signed by the namespace’s host (Ed25519, RFC 8032, over the JCS bytes of the names, the namespace and the receipt hashes). Operator format, not spec: the body of the plan-3.1 write endpoint and of import-signed.

Structs§

Imported
What an import did.

Enums§

BundleError
Why a bundle is refused. The first failing check is reported; nothing is written unless all pass.

Functions§

build
Builds a bundle 1 (see the module documentation): descriptors (each a canonical function descriptor), names ((name, fn_hash)), receipts (each a receipt’s JSON), signed with the key of seed as the manifest of namespace. The names and the receipts are put in ascending order. Errors: Format for a receipt or descriptor that does not parse.
import_signed
Imports the bundle bytes for the mesh host, whose own namespaces are owned, at the clock’s now (CONTRACT-1.8b H2). Checks run in the order of the contract, and nothing is written unless they all pass. The writes are, in order: the descriptors; the receipts (each put_receipt), then the versions (each put_version); the name bindings last, so that a crash part-way leaves no name answering. A re-run completes a partial import: a version or a binding already there is skipped.
manifest_bytes
The bytes the manifest signs (CONTRACT-1.8b H2): the JCS object of the names ((name, fn_hash), ascending by name), the namespace and the receipt hashes (ascending).