Type Alias KeypairErrorCode
KeypairErrorCode:
| "KEYPAIR_INVALID_PUBLIC_KEY"
| "KEYPAIR_INVALID_SECRET_KEY"
| "KEYPAIR_NON_CONTRIBUTORY_KEY"
| "KEYPAIR_INVALID_SIGNATURE_TYPE"
| "KEYPAIR_HKDF"
| "KEYPAIR_POSEIDON"
| "KEYPAIR_NOT_ED25519"
| "KEYPAIR_PDA_CANNOT_SIGN"
| "KEYPAIR_DERIVATION_INPUT"
| "KEYPAIR_INVALID_DERIVATION_SEED"
| "KEYPAIR_INVALID_LENGTH"
| "KEYPAIR_HASH"
Errors reachable through the TypeScript key APIs, plus the TypeScript-only shape errors below. Rust encodes lengths in its types, so a JavaScript caller can reach malformed inputs Rust cannot express.
A TypeScript-only code is justified at a boundary only when the input it describes cannot be expressed in Rust. Where Rust accepts the same input and answers with a variant, the boundary must raise the code mirroring that variant, or the port reports a divergence Rust does not have.