Internalapi

The storage used in the SDK

Hierarchy

Constructors

Properties

db: null | IDBDatabase = null
dbName: string = 'WALLET_CONNECT_V2_INDEXED_DB'
isSupported: boolean = true
storeName: string = 'keyvaluestorage'

Methods

  • it copies over all key value pairs from a source store into a target one

    Parameters

    • targetDBName: string

      the name of the target DB

    • targetStoreName: string

      the name of the target store

    • skipKeys: string[] = []

      all the keys to ignore

    Returns Promise<void>

  • This event will fire if the storage was modified by someone else, eg. on another tab

    Parameters

    • callback: ((arg) => {})

      The callback to be called when a storage value changes

        • (arg): {}
        • Parameters

          • arg: {
                eventType: "storageCleared" | "entryModified";
                key: null | string;
                newValue: null | string;
                oldValue: null | string;
            }
            • eventType: "storageCleared" | "entryModified"
            • key: null | string
            • newValue: null | string
            • oldValue: null | string

          Returns {}

      Returns Promise<void>

    • Type Parameters

      • T

      Parameters

      • mode: IDBTransactionMode
      • operation: ((store) => Promise<T>)
          • (store): Promise<T>
          • Parameters

            • store: IDBObjectStore

            Returns Promise<T>

      Returns Promise<T>

    • Returns a promise that resolves to true if the storage option is available on this platform.

      Returns Promise<boolean>

    Generated using TypeDoc