@unicitylabs/sphere-sdk 0.2.0 → 0.2.1
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/core/index.cjs +69 -5
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +6 -3
- package/dist/core/index.d.ts +6 -3
- package/dist/core/index.js +69 -5
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +4 -7
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +4 -7
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +4 -7
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.d.cts +4 -3
- package/dist/impl/nodejs/index.d.ts +4 -3
- package/dist/impl/nodejs/index.js +4 -7
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +69 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +69 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1335,7 +1335,7 @@ var NostrTransportProvider = class {
|
|
|
1335
1335
|
// ===========================================================================
|
|
1336
1336
|
// TransportProvider Implementation
|
|
1337
1337
|
// ===========================================================================
|
|
1338
|
-
setIdentity(identity) {
|
|
1338
|
+
async setIdentity(identity) {
|
|
1339
1339
|
this.identity = identity;
|
|
1340
1340
|
const secretKey = import_buffer.Buffer.from(identity.privateKey, "hex");
|
|
1341
1341
|
this.keyManager = import_nostr_js_sdk.NostrKeyManager.fromPrivateKey(secretKey);
|
|
@@ -1365,12 +1365,9 @@ var NostrTransportProvider = class {
|
|
|
1365
1365
|
this.log("NostrClient reconnected to relay:", url);
|
|
1366
1366
|
}
|
|
1367
1367
|
});
|
|
1368
|
-
this.nostrClient.connect(...this.config.relays)
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
}).catch((err) => {
|
|
1372
|
-
this.log("Failed to reconnect with new identity:", err);
|
|
1373
|
-
});
|
|
1368
|
+
await this.nostrClient.connect(...this.config.relays);
|
|
1369
|
+
this.subscribeToEvents();
|
|
1370
|
+
oldClient.disconnect();
|
|
1374
1371
|
} else if (this.isConnected()) {
|
|
1375
1372
|
this.subscribeToEvents();
|
|
1376
1373
|
}
|