holosphere 2.0.0-alpha15 → 2.0.0-alpha16
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/dist/{2019-ATLjawsU.cjs → 2019-C9IgM3mu.cjs} +2 -2
- package/dist/{2019-ATLjawsU.cjs.map → 2019-C9IgM3mu.cjs.map} +1 -1
- package/dist/{2019-BfjzDRje.js → 2019-CyFQLuqg.js} +2 -2
- package/dist/{2019-BfjzDRje.js.map → 2019-CyFQLuqg.js.map} +1 -1
- package/dist/{browser-CKTczilW.js → browser-BIvmkBi9.js} +2 -2
- package/dist/{browser-CKTczilW.js.map → browser-BIvmkBi9.js.map} +1 -1
- package/dist/{browser-GOg6KKOV.cjs → browser-CZ1l8nhY.cjs} +2 -2
- package/dist/{browser-GOg6KKOV.cjs.map → browser-CZ1l8nhY.cjs.map} +1 -1
- package/dist/cjs/holosphere.cjs +1 -1
- package/dist/esm/holosphere.js +1 -1
- package/dist/{index-C3Cag0SV.js → index-B7ERi4ng.js} +137 -59
- package/dist/index-B7ERi4ng.js.map +1 -0
- package/dist/{index-D_QecZNu.cjs → index-Cc-_uNpt.cjs} +2 -2
- package/dist/{index-D_QecZNu.cjs.map → index-Cc-_uNpt.cjs.map} +1 -1
- package/dist/{index-ChpSfdYS.cjs → index-DXFsE8r6.cjs} +7 -7
- package/dist/index-DXFsE8r6.cjs.map +1 -0
- package/dist/{index-nMC3dWZ5.js → index-DusXavIT.js} +2 -2
- package/dist/{index-nMC3dWZ5.js.map → index-DusXavIT.js.map} +1 -1
- package/dist/{index-BdnrGafX.js → index-HW9kbrzC.js} +2 -2
- package/dist/{index-BdnrGafX.js.map → index-HW9kbrzC.js.map} +1 -1
- package/dist/{index-z5HWfWMu.cjs → index-VrRkpshF.cjs} +2 -2
- package/dist/{index-z5HWfWMu.cjs.map → index-VrRkpshF.cjs.map} +1 -1
- package/dist/{indexeddb-storage-DWSeL-YF.cjs → indexeddb-storage-CVz4Q3lo.cjs} +2 -2
- package/dist/{indexeddb-storage-DWSeL-YF.cjs.map → indexeddb-storage-CVz4Q3lo.cjs.map} +1 -1
- package/dist/{indexeddb-storage-dx01N0ET.js → indexeddb-storage-yEswGGMG.js} +2 -2
- package/dist/{indexeddb-storage-dx01N0ET.js.map → indexeddb-storage-yEswGGMG.js.map} +1 -1
- package/dist/{memory-storage-BPIfkpcf.js → memory-storage-CSB5_IfU.js} +2 -2
- package/dist/{memory-storage-BPIfkpcf.js.map → memory-storage-CSB5_IfU.js.map} +1 -1
- package/dist/{memory-storage-CKUGDq2d.cjs → memory-storage-Q8mEQ6Ix.cjs} +2 -2
- package/dist/{memory-storage-CKUGDq2d.cjs.map → memory-storage-Q8mEQ6Ix.cjs.map} +1 -1
- package/package.json +1 -1
- package/src/crypto/secp256k1.js +3 -3
- package/src/federation/hologram.js +2 -2
- package/src/index.js +83 -12
- package/src/storage/nostr-async.js +47 -31
- package/src/storage/nostr-wrapper.js +18 -4
- package/src/storage/unified-storage.js +10 -4
- package/dist/index-C3Cag0SV.js.map +0 -1
- package/dist/index-ChpSfdYS.cjs.map +0 -1
|
@@ -106,9 +106,12 @@ export async function update(client, path, updates) {
|
|
|
106
106
|
* Delete data at path
|
|
107
107
|
* @param {Object} client - Client instance
|
|
108
108
|
* @param {string} path - Storage path
|
|
109
|
+
* @param {Object} [options] - Delete options
|
|
110
|
+
* @param {string} [options.signingKey] - Private key for signing tombstones (hex format)
|
|
111
|
+
* @param {string} [options.authorPubkey] - Public key of the data author
|
|
109
112
|
* @returns {Promise<boolean>} Success indicator
|
|
110
113
|
*/
|
|
111
|
-
export async function deleteData(client, path) {
|
|
114
|
+
export async function deleteData(client, path, options = {}) {
|
|
112
115
|
// Check if this is a GunDB client with backend methods (preferred - has write cache)
|
|
113
116
|
if (client.delete && client.gun) {
|
|
114
117
|
return client.delete(path);
|
|
@@ -117,21 +120,24 @@ export async function deleteData(client, path) {
|
|
|
117
120
|
if (client.gun) {
|
|
118
121
|
return gunWrapper.deleteData(client.gun, path);
|
|
119
122
|
}
|
|
120
|
-
return nostrWrapper.deleteData(client, path);
|
|
123
|
+
return nostrWrapper.deleteData(client, path, options);
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
/**
|
|
124
127
|
* Delete all data under path prefix
|
|
125
128
|
* @param {Object} client - Client instance
|
|
126
129
|
* @param {string} path - Path prefix
|
|
130
|
+
* @param {Object} [options] - Delete options
|
|
131
|
+
* @param {string} [options.signingKey] - Private key for signing tombstones (hex format)
|
|
132
|
+
* @param {string} [options.authorPubkey] - Public key of the data author
|
|
127
133
|
* @returns {Promise<Object>} Deletion results
|
|
128
134
|
*/
|
|
129
|
-
export async function deleteAll(client, path) {
|
|
135
|
+
export async function deleteAll(client, path, options = {}) {
|
|
130
136
|
// Fallback to direct gunWrapper (deleteAll not typically in client interface)
|
|
131
137
|
if (client.gun) {
|
|
132
138
|
return gunWrapper.deleteAll(client.gun, path);
|
|
133
139
|
}
|
|
134
|
-
return nostrWrapper.deleteAll(client, path);
|
|
140
|
+
return nostrWrapper.deleteAll(client, path, options);
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
/**
|