@dxos/react-client
    Preparing search index...

    Class PublicKey

    The purpose of this class is to assure consistent use of keys throughout the project. Keys should be maintained as buffers in objects and proto definitions, and converted to hex strings as late as possible (eg, to log/display).

    Implements

    • Equatable
    Index

    Constructors

    • Parameters

      • _value: Uint8Array

      Returns PublicKey

    Properties

    ZERO: PublicKey

    Accessors

    • get "[devtoolsFormatter]"(): DevtoolsFormatter

      Returns DevtoolsFormatter

    • get length(): number

      Returns number

    Methods

    • Parameters

      • other: any

      Returns boolean

    • Used by Node.js to get textual representation of this object when it's printed with a console.log statement.

      Parameters

      • depth: number
      • options: InspectOptionsStylized
      • inspectFn: typeof inspect

      Returns string

    • Returns Buffer

    • Returns Uint8Array

    • Test this key for equality with some other key.

      Parameters

      Returns boolean

    • Parameters

      • modulo: number

      Returns number

    • Returns string

    • Returns string

    • Returns string

    • Returns string

    • Returns a string representation of an object.

      Returns string

    • Parameters

      • Optionallength: undefined

      Returns string

    • Asserts that provided values is an instance of PublicKey.

      Parameters

      • value: any

      Returns asserts value is PublicKey

    • Parameters

      • str: string

        string representation of key.

      Returns Buffer

      Key buffer.

      All keys should be represented as instances of PublicKey.

    • Creates new instance of PublicKey automatically determining the input format.

      Parameters

      • source: PublicKeyLike

        A Buffer, or Uint8Array, or hex encoded string, or something with an asUint8Array method on it

      Returns PublicKey

      PublicKey

    • Creates new instance of PublicKey from hex string.

      Parameters

      • hex: string

      Returns PublicKey

    • Parameters

      • encoded: string

      Returns PublicKey

    • To be used with ComplexMap and ComplexSet. Returns a scalar representation for this key.

      Parameters

      Returns string

    • Tests if provided values is an instance of PublicKey.

      Parameters

      • value: any

      Returns value is PublicKey

    • Creates a new key.

      Returns PublicKey

    • Parameters

      • length: number

      Returns PublicKey

    • Returns Generator<PublicKey>

    • Same as PublicKey.from but does not throw and instead returns a { key: PublicKey } or { error: Error }

      Parameters

      • Optionalsource: PublicKeyLike

        Same PublicKeyLike argument as for PublicKey.from

      Returns undefined | PublicKey

      PublicKey

    • Parameters

      • key: ArrayBuffer | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

        key like data structure (but not PublicKey which should use toString).

      Returns string

      Hex string representation of key.

      All keys should be represented as instances of PublicKey.