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§
- Bundle
Error - 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 ofseedas the manifest ofnamespace. The names and the receipts are put in ascending order. Errors:Formatfor a receipt or descriptor that does not parse. - build_
with_ catalog - As
build, with the publisher’s catalogue (CONTRACT-build2-part2-read R5):catalogis a list of entries{"name", "kind", "label", "description", "args", "examples", "dictionary"}(each a JSON object), checked as a publish’s catalogue lines are, and sorted by name into the bundle’scatalogmember, which the manifest signs. An empty list makes a bundle without the member. Errors:Formatfor an entry that breaks its bounds. - build_
with_ tests - As
build_with_catalog, with the bundle’s tests (Build 2 Part 3, E5):testsare the test objects oftestlines (each{"test", "call", "asof"?, "inputs"?, "expect"}), sorted by function name then by case id into the bundle’stestsmember, which the manifest signs. No tests make a bundle without the member. Errors:Formatfor a test that is not a test. - import_
signed - Imports the bundle
bytesfor the meshhost, whose own namespaces areowned, 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 (eachput_receipt), then the versions (eachput_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).