Class EndpointAbstract

Hierarchy

Constructors

Properties

cryptoOptions: Partial<NodeCryptoOptions>
id: string
identityKeyPair: CryptoKeyPair
keyStores: KeyStoreSet

Methods

  • Generate and store a new session key.

    Parameters

    • Optional peerId: string

      The peer to bind the key to, unless it's an initial key

    Returns Promise<SessionKey>

  • Type Parameters

    • S extends Signer<S>

    Parameters

    • peerId: string
    • signerClass: (new (certificate, privateKey) => S)
        • new (certificate, privateKey): S
        • Parameters

          Returns S

    Returns Promise<null | S>

  • Decrypt and return the payload in the message.

    Also store the session key from the sender.

    Type Parameters

    Parameters

    Returns Promise<P>

  • Validate the message and report whether it's correctly bound for this node.

    Parameters

    Returns Promise<void>

    Throws

    If the message is invalid

Generated using TypeDoc