XYO Platform SDK - v3.10.6
    Preparing search index...

    Class ObjectHasher<T>

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    • Type Parameters

      • T extends object = object

      Parameters

      • obj: T

      Returns ObjectHasher<T>

    Properties

    obj: T
    allowHashPooling: boolean
    allowSubtle: boolean
    createBrowserWorker?: (url?: URL) => undefined | Worker
    createNodeWorker: (func?: () => unknown) => Worker
    initialized: void
    subtleHashWorkerUrl?: URL
    warnIfUsingJsHash: boolean
    wasmHashWorkerUrl?: URL
    wasmInitialized: Promise<void>
    wasmSupport: WasmSupport

    Accessors

    • get stringKeyObj(): StringKeyObject

      Returns StringKeyObject

    Methods

    • Returns Promise<Lowercase<string>>

    • Returns a clone of the payload that is JSON safe

      Parameters

      • Optionalmeta: boolean

        Keeps underscore (meta) fields if set to true

      Returns T

      Returns a clone of the payload that is JSON safe

    • Parameters

      • Optionalurl: URL
      • Optionalfunc: () => unknown

      Returns Worker

    • Type Parameters

      • T extends object

      Parameters

      • objs: undefined | T[]
      • hash: Lowercase<string> | Lowercase<string>[]

      Returns Promise<T[]>

    • Type Parameters

      • T extends object

      Parameters

      • objs: undefined | T[]
      • hash: Lowercase<string> | Lowercase<string>[]

      Returns Promise<T[]>

    • Type Parameters

      • T extends object

      Parameters

      • objs: undefined | T[]
      • hash: Lowercase<string>

      Returns Promise<undefined | T>

    • Asynchronously hashes a payload

      Type Parameters

      • T extends object

      Parameters

      • obj: T

        A payload

      Returns Promise<Lowercase<string>>

      The payload hash

    • Creates an array of payload hashes based on the payloads passed in

      Type Parameters

      • T extends object

      Parameters

      • Optionalobjs: T[]

        Any array of payloads

      Returns Promise<undefined | Lowercase<string>[]>

      An array of payload hashes

    • Type Parameters

      • T extends object

      Parameters

      • obj: T

      Returns T

    • Creates an array of payload/hash tuples based on the payloads passed in

      Type Parameters

      • T extends object

      Parameters

      • objs: T[]

        Any array of payloads

      Returns Promise<[T, Lowercase<string>][]>

      An array of payload/hash tuples

    • Returns a clone of the payload that is JSON safe

      Type Parameters

      • T extends object

      Parameters

      • payload: T
      • Optionalmeta: boolean

        Keeps underscore (meta) fields if set to true

      Returns T

      Returns a clone of the payload that is JSON safe

    • Type Parameters

      • T extends object

      Parameters

      • payload: T
      • Optionalmeta: boolean

      Returns T

      us json instead

    • Type Parameters

      • T extends object

      Parameters

      • obj: T

      Returns string

    • Parameters

      • data: Uint8Array

      Returns Promise<ArrayBuffer>

    • Parameters

      • data: string

      Returns Promise<any>