Document format
KeyHold v1 is a strict JSON object with six top-level fields:
| Field | Meaning |
|---|---|
format | Always keyhold for this format. |
version | The supported document version, currently 1. |
label | A human-readable, non-empty label. |
publicKeyHex | A compressed secp256k1 public key in lowercase hex. |
keyDerivation | PBKDF2-HMAC-SHA-256 parameters and salt. |
cipher | AES-GCM parameters, IV, and ciphertext with tag. |
The private key never appears as a JSON field. It is recovered only after password-based decryption and public-key matching.
Both SDKs reject extra fields and non-canonical base64url/hex values. Read the generated TypeScript API or Go API for exact signatures.