saphan order
Order sidecars: sign a document under a delegate (or root) key
saphan order
Order sidecars: sign a document under a delegate (or root) key
Subcommands
| Subcommand | What it does |
|---|---|
saphan order show | Return a registered order's exact bytes from its recorded commit |
saphan order sign | Sign <path>'s exact bytes and REGISTER them, printing the ref |
saphan order show
Return a registered order's exact bytes from its recorded commit
Resolves slug@<hex> (at least 12 lowercase hex characters), a full
64-character digest with or without its slug, then reads the document from
the COMMIT stored in its registration. Text format writes only the exact
document bytes to stdout and metadata to stderr; JSON carries metadata plus
the bytes in base64. A bare short digest is a usage error.
Options
| Option | Type | Default | Description |
|---|---|---|---|
--format | string | unset | output format: text|json (default: text; global --json/--output-format json also supported) |
saphan order sign
Sign <path>'s exact bytes and REGISTER them, printing the ref
Signs <path>'s EXACT bytes (no canonicalization, §0a) with the ed25519
private key at --key, writes the composed v1 envelope to <path>.sig
(overwriting any prior sidecar — re-signing after an edit is expected;
O_EXCL custody lives on the KEY files, not on this output), and then
REGISTERS those bytes: one immutable row plus its registered act, in a
single transaction, printing the ref they are addressable by.
The signer's key-id is derived from the key itself (sign.ActorKeyID), never taken on faith from a flag — a caller cannot claim a key-id that key does not actually derive to.
--key names EITHER the root private key OR a delegate's private key —
this verb signs unconditionally; whether the resulting signature actually
authorizes anything is instr.Verify's job at read time (saphan verify),
not this verb's.
REGISTRATION RECORDS A COMMIT, so the document must already be committed
(the sidecar need not be). A document no landed commit carries refuses
with the named class order-uncommitted — and the sidecar stays on disk,
because it is a file you asked for and its bytes are correct.
Options
| Option | Type | Default | Description |
|---|---|---|---|
--actor | string | unset | signing actor label (flag > SAPHAN_ACTOR > ~/.saphan/config) |
--expires | string | unset | RFC3339 expiry; absent means the registration never expires |
--key | string | unset | signing private key path (required — root or delegate) |
--slug | string | unset | registration slug, the typable half of the ref (default: the document's basename stem) |
--ts | string | unset | RFC3339 timestamp (default: now) |