Class YlidePrivateKey

Description

This class is designate to store and interact with Ylide communication keypairs

See

Basics of key storage to understand common concepts used here

Hierarchy

Constructors

  • Parameters

    • blockchainGroup: string
    • address: string
    • publicKey: PublicKey
    • privateKey: null | {
          isEncrypted: false;
          privateKey: Uint8Array;
      } | {
          encryptedPrivateKey: Uint8Array;
          isEncrypted: true;
      }

    Returns YlidePrivateKey

Properties

_keypair: null | BoxKeyPair = null
address: string
blockchainGroup: string
keyIndex: 1 = 1
privateKey: null | {
    isEncrypted: false;
    privateKey: Uint8Array;
} | {
    encryptedPrivateKey: Uint8Array;
    isEncrypted: true;
}
publicKey: PublicKey

Accessors

Methods

  • Method to switch from plaintext storage to encrypted storage of the key

    Parameters

    • oldPassword: string
    • newPassword: string

    Returns Promise<void>

  • Method to decrypt internally stored private key

    Returns

    Raw private key

    Parameters

    • password: string

      Ylide password

    Returns Promise<Uint8Array>

  • Method to switch from plaintext storage to encrypted storage of the key

    Parameters

    • password: string

      Ylide password

    Returns Promise<void>

  • Method to switch from encrypted storage to plaintext storage of the key

    Parameters

    • password: string

      Ylide password

    Returns Promise<void>

  • Method to serialize YlidePrivateKeyPair to raw bytes

    Returns

    Raw Ylide key bytes

    Returns Uint8Array

Generated using TypeDoc