waytale - v0.5.1
    Preparing search index...

    Class WaytaleUserIdentity

    The information defining a user, composed of a public key ("identity") used to verify signatures, and a history of previously used public keys for peers to recognise the user after identity changes.

    Index

    Constructors

    • Constructor. Do not use. Use one of the static factory methods instead.

      Parameters

      • key: any
      • publicKey: CryptoKey
      • publicKeyBytes: BufferSource
      • privateKey: CryptoKey | null
      • timestamp: number | null

      Returns WaytaleUserIdentity

    Properties

    pastKeys: BufferSource[]

    Previously used public keys.

    publicKey: BufferSource

    Public identification.

    timestamp: number

    Date of generation of this identity in seconds.

    Methods

    • Sign the object with this identity's private key (if available).

      Parameters

      • object: object

      Returns Promise<Uint8Array<ArrayBuffer>>

    • Verify that the object's signature matches using the public key of this identity.

      Parameters

      • signature: BufferSource
      • object: object

      Returns Promise<boolean>