Sign and register a statement
register_statementSign payload bytes with the log key and register them under a Forestrie-Grant; the signed statement is saved before sending, so call check_registration to verify acceptance.
Instructions
Sign a payload with the log key and register it under your Forestrie-Grant. Takes the payload bytes (inline base64 or a file path, up to canopy's 4 MiB statement limit) and its content type. The signed statement is saved before it is sent, so the returned content hash always names it, even if the request fails. A payload path may not point at the log key or inside this server's home. Registration is accepted, not yet sequenced: call check_registration next.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grant | No | the Forestrie-Grant: base64 (standard or URL-safe) of the completed grant, or a path to a file holding it as raw bytes or base64 text; falls back to FORESTRIE_GRANT | |
| issuer | No | CWT iss; defaults to the hex of the key id | |
| baseUrl | No | the canopy SCRAPI base URL; falls back to FORESTRIE_BASE_URL — never defaulted by the package itself | |
| payload | Yes | the payload to sign and register, up to 4 MiB — { b64 } | { base64 } | { path } | |
| subject | No | CWT sub; defaults to sha-256:<hex of the payload> | |
| rootLogId | No | the forest's root log id (R in /register/{R}/entries); falls back to FORESTRIE_ROOT_LOG_ID | |
| contentType | Yes | the payload's media type, e.g. application/json |