@synonymdev/pubky
    Preparing search index...

    Class Keypair

    Index
    publicKey: PublicKey

    Returns the [PublicKey] of this keypair.

    Use .toString() on the returned PublicKey to get the string form or .z32() to get the z32 string form without prefix. Transport/storage (query params, headers, persistence) should use .z32().

    const who = keypair.publicKey.toString();
    
    • Returns void

    • Create a recovery file for this keypair (encrypted with the given passphrase).

      Parameters

      • passphrase: string

      Returns Uint8Array

    • Returns void

    • Returns the secret of this keypair.

      Returns Uint8Array

    • Decrypt a recovery file and return a Keypair (decrypted with the given passphrase).

      Parameters

      • recovery_file: Uint8Array
      • passphrase: string

      Returns Keypair

    • Generate a [Keypair] from a 32-byte secret.

      Parameters

      • secret: Uint8Array

      Returns Keypair

    • Generate a random [Keypair]

      Returns Keypair