Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SlotHelpers

Index

Constructors

constructor

Methods

Static addHashAndKey

Static anyDuplicateSlotNames

  • anyDuplicateSlotNames(slots: { name?: string }[]): boolean

Static decryptSlot

  • Updates 'value' to the decrypted 'encrypted_value', decrypts encrypted_value_verification_key and checks value_verification_hash (if present), and sets 'encrypted' to false.

    Parameters

    • credentials: IDEK
    • slot: Slot

    Returns Promise<SDKDecryptedSlot>

Static encryptSlot

  • encryptSlot<T>(credentials: IDEK, slot: T): Promise<Omit<T, "value" | "value_verification_key"> & { encrypted: boolean; encrypted_value: undefined | string; encrypted_value_verification_key: undefined | string }>
  • Encrypt the value in the Slot. Undefined values are not changed.

    After successful encryption, Slot.encrypted = true and Slot.value is deleted.

    Type parameters

    • T: { value?: null | string; value_verification_key?: null | SymmetricKey }

    Parameters

    • credentials: IDEK
    • slot: T

    Returns Promise<Omit<T, "value" | "value_verification_key"> & { encrypted: boolean; encrypted_value: undefined | string; encrypted_value_verification_key: undefined | string }>

Static findWithEncryptedValue

  • findWithEncryptedValue<T>(slots: T[]): undefined | T

Static nameFromLabel

  • nameFromLabel(label: string): string
  • Convert Slot names to labels as per the backend URL-safe encoding. For example A Slot/name? becomes a_slot_name.

    Parameters

    • label: string

    Returns string

Static toEncryptedSlotValue

Generated using TypeDoc