Skip to content

SshResult ​

SshResult ​

Success-or-failure result of the SSH key import functions.

code is 'malformed' for structurally invalid input, 'unsupported' for a valid construct this module does not read (encrypted keys, multi-key files, other key types, RSA below the minimum size, compressed points unless accepted), 'limit_exceeded' for an implementation bound, and 'key_mismatch' when the declared key types or the embedded public and private keys disagree. No message contains private key material.

ts
type SshResult<T> = {
  readonly ok: true;
  readonly value: T
} | ErrorResult<SshErrorCode, Record<never, never>, SshFailure>

Released under the MIT License.