@unicitylabs/sphere-sdk 0.2.1 → 0.2.2

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.
@@ -1510,7 +1510,7 @@ var NostrTransportProvider = class {
1510
1510
  return this.resolveNametagInfo(identifier);
1511
1511
  }
1512
1512
  async resolveNametag(nametag) {
1513
- this.ensureReady();
1513
+ this.ensureConnected();
1514
1514
  const hashedNametag = (0, import_nostr_js_sdk.hashNametag)(nametag);
1515
1515
  let events = await this.queryEvents({
1516
1516
  kinds: [EVENT_KINDS.NAMETAG_BINDING],
@@ -1534,7 +1534,7 @@ var NostrTransportProvider = class {
1534
1534
  return null;
1535
1535
  }
1536
1536
  async resolveNametagInfo(nametag) {
1537
- this.ensureReady();
1537
+ this.ensureConnected();
1538
1538
  const hashedNametag = (0, import_nostr_js_sdk.hashNametag)(nametag);
1539
1539
  let events = await this.queryEvents({
1540
1540
  kinds: [EVENT_KINDS.NAMETAG_BINDING],
@@ -1611,7 +1611,7 @@ var NostrTransportProvider = class {
1611
1611
  * Works with both new identity binding events and legacy nametag binding events.
1612
1612
  */
1613
1613
  async resolveAddressInfo(address) {
1614
- this.ensureReady();
1614
+ this.ensureConnected();
1615
1615
  const addressHash = hashAddressForTag(address);
1616
1616
  const events = await this.queryEvents({
1617
1617
  kinds: [EVENT_KINDS.NAMETAG_BINDING],
@@ -1646,7 +1646,7 @@ var NostrTransportProvider = class {
1646
1646
  * Queries binding events authored by the given pubkey.
1647
1647
  */
1648
1648
  async resolveTransportPubkeyInfo(transportPubkey) {
1649
- this.ensureReady();
1649
+ this.ensureConnected();
1650
1650
  const events = await this.queryEvents({
1651
1651
  kinds: [EVENT_KINDS.NAMETAG_BINDING],
1652
1652
  authors: [transportPubkey],
@@ -2264,10 +2264,13 @@ var NostrTransportProvider = class {
2264
2264
  // ===========================================================================
2265
2265
  // Private: Helpers
2266
2266
  // ===========================================================================
2267
- ensureReady() {
2267
+ ensureConnected() {
2268
2268
  if (!this.isConnected()) {
2269
2269
  throw new Error("NostrTransportProvider not connected");
2270
2270
  }
2271
+ }
2272
+ ensureReady() {
2273
+ this.ensureConnected();
2271
2274
  if (!this.identity) {
2272
2275
  throw new Error("Identity not set");
2273
2276
  }