Function dump

  • Export private key to keystore secret-storage format.

    Parameters

    • name: string

      Key name.

    • password: string | Uint8Array

      User-supplied password.

    • privateKey: string | Uint8Array

      Private key as hex-string or a Buffer.

    • nonce: Uint8Array = ...

      Randomly generated 24byte nonce.

    • salt: Uint8Array = ...

      Randomly generated 16byte salt.

    • Optional options: Partial<{
          cipher_params: {
              nonce: string;
          };
          ciphertext: string;
          kdf: "argon2id";
          kdf_params: {
              memlimit_kib: number;
              opslimit: number;
              parallelism: number;
              salt: string;
          };
          secret_type: "ed25519";
          symmetric_alg: "xsalsa20-poly1305";
      }>

      Encryption parameters.

    Returns Promise<Keystore>

Generated using TypeDoc