Blockchain Commons XID TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Class Key

    Represents a key in an XID document.

    Implements

    Index

    Methods

    • Create a new Key with only public keys.

      Parameters

      • publicKeys: PublicKeys

      Returns Key

    • Create a new Key with public keys and allow-all permissions.

      Parameters

      • publicKeys: PublicKeys

      Returns Key

    • Create a new Key with private keys.

      Parameters

      • privateKeys: PrivateKeys
      • publicKeys: PublicKeys

      Returns Key

    • Create a new Key with private key base (derives keys from it).

      Parameters

      • privateKeyBase: PrivateKeyBase

      Returns Key

    • Get the public keys.

      Returns PublicKeys

    • Get the private keys, if available and decrypted.

      Returns PrivateKeys | undefined

    • Check if this key has decrypted private keys.

      Returns boolean

    • Check if this key has encrypted private keys.

      Returns boolean

    • Get the salt used for private key decorrelation.

      Returns Salt | undefined

    • Get the reference for this key (based on public keys tagged CBOR).

      Returns Reference

    • Verify a signature against a message.

      Parameters

      • signature: Signature
      • message: Uint8Array

      Returns boolean

    • Get the endpoints set.

      Returns Set<string>

    • Get the endpoints set for mutation.

      Returns Set<string>

    • Add an endpoint.

      Parameters

      • endpoint: string

      Returns void

    • Returns Envelope$1

    • Try to extract a Key from an envelope, optionally with password for decryption.

      Parameters

      • envelope: Envelope$1
      • Optionalpassword: Uint8Array<ArrayBufferLike>

      Returns Key

    • Check equality with another Key.

      Parameters

      Returns boolean

    • Get a hash key for use in Sets/Maps.

      Returns string