@unicitylabs/sphere-sdk 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -69
- package/dist/core/index.cjs +944 -465
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +127 -6
- package/dist/core/index.d.ts +127 -6
- package/dist/core/index.js +833 -351
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +115 -19
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +115 -19
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/browser/ipfs.cjs +3 -1
- package/dist/impl/browser/ipfs.cjs.map +1 -1
- package/dist/impl/browser/ipfs.js +3 -1
- package/dist/impl/browser/ipfs.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +85 -17
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +22 -0
- package/dist/impl/nodejs/index.d.ts +22 -0
- package/dist/impl/nodejs/index.js +85 -17
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +1083 -644
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +118 -6
- package/dist/index.d.ts +118 -6
- package/dist/index.js +993 -554
- package/dist/index.js.map +1 -1
- package/dist/l1/index.cjs +18 -0
- package/dist/l1/index.cjs.map +1 -1
- package/dist/l1/index.d.cts +4 -0
- package/dist/l1/index.d.ts +4 -0
- package/dist/l1/index.js +18 -0
- package/dist/l1/index.js.map +1 -1
- package/package.json +1 -1
package/dist/l1/index.cjs
CHANGED
|
@@ -944,6 +944,24 @@ var VestingClassifier = class {
|
|
|
944
944
|
tx.objectStore(this.storeName).clear();
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
|
+
/**
|
|
948
|
+
* Destroy caches and delete the IndexedDB database entirely.
|
|
949
|
+
*/
|
|
950
|
+
async destroy() {
|
|
951
|
+
this.memoryCache.clear();
|
|
952
|
+
if (this.db) {
|
|
953
|
+
this.db.close();
|
|
954
|
+
this.db = null;
|
|
955
|
+
}
|
|
956
|
+
if (typeof indexedDB !== "undefined") {
|
|
957
|
+
await new Promise((resolve) => {
|
|
958
|
+
const req = indexedDB.deleteDatabase(this.dbName);
|
|
959
|
+
req.onsuccess = () => resolve();
|
|
960
|
+
req.onerror = () => resolve();
|
|
961
|
+
req.onblocked = () => resolve();
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
}
|
|
947
965
|
};
|
|
948
966
|
var vestingClassifier = new VestingClassifier();
|
|
949
967
|
|