Class PrivateKeyStoreAbstract

Hierarchy (view full)

Constructors

Methods

  • Return the private component of a node key pair if it exists.

    Parameters

    • nodeId: string

    Returns Promise<null | CryptoKey>

    Throws

    if the backend failed to retrieve the key due to an error

  • Retrieve private session key, regardless of whether it's an initial key or not.

    Parameters

    • keyId: Buffer

      The key pair id (typically the serial number)

    • nodeId: string

      The id of the node that owns the key

    • peerId: string

      The id of the recipient, in case the key is bound to a recipient

    Returns Promise<CryptoKey>

    Throws

    UnknownKeyError when the key does not exist

    Throws

    PrivateKeyStoreError when the look-up could not be done

  • Return the public key of the latest, unbound session key pair for the specified nodeId.

    Parameters

    • nodeId: string

      The id of the node that owns the key

    Returns Promise<null | SessionKey>

    The public key if it exists or null otherwise

    Throws

    PrivateKeyStoreError when the look-up could not be done

  • Parameters

    • privateKey: CryptoKey
    • keyId: Buffer
    • nodeId: string
    • Optional peerId: string

    Returns Promise<void>

Generated using TypeDoc