@unicitylabs/sphere-sdk 0.7.1-dev.2 → 0.7.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.
@@ -1,4 +1,4 @@
1
- import { NostrKeyManager, Event } from '@unicitylabs/nostr-js-sdk';
1
+ import { NostrClient, NostrKeyManager, Event } from '@unicitylabs/nostr-js-sdk';
2
2
  import { StateTransitionClient } from '@unicitylabs/state-transition-sdk/lib/StateTransitionClient';
3
3
  import { AggregatorClient } from '@unicitylabs/state-transition-sdk/lib/api/AggregatorClient';
4
4
  import { RootTrustBase } from '@unicitylabs/state-transition-sdk/lib/bft/RootTrustBase';
@@ -677,6 +677,15 @@ declare class NostrTransportProvider implements TransportProvider {
677
677
  * Get the storage adapter.
678
678
  */
679
679
  getStorageAdapter(): TransportStorageAdapter | null;
680
+ /**
681
+ * Get the underlying NostrClient (or null if not yet connected).
682
+ *
683
+ * Exposed so {@link MultiAddressTransportMux} can share the same
684
+ * client/socket pair instead of opening a duplicate WebSocket per
685
+ * relay (#123). The transport owns the client's lifecycle — callers
686
+ * MUST NOT call {@code disconnect()} on the returned instance.
687
+ */
688
+ getNostrClient(): NostrClient | null;
680
689
  /**
681
690
  * Suppress event subscriptions — unsubscribe wallet/chat filters
682
691
  * but keep the connection alive for resolve/identity-binding operations.
@@ -1,4 +1,4 @@
1
- import { NostrKeyManager, Event } from '@unicitylabs/nostr-js-sdk';
1
+ import { NostrClient, NostrKeyManager, Event } from '@unicitylabs/nostr-js-sdk';
2
2
  import { StateTransitionClient } from '@unicitylabs/state-transition-sdk/lib/StateTransitionClient';
3
3
  import { AggregatorClient } from '@unicitylabs/state-transition-sdk/lib/api/AggregatorClient';
4
4
  import { RootTrustBase } from '@unicitylabs/state-transition-sdk/lib/bft/RootTrustBase';
@@ -677,6 +677,15 @@ declare class NostrTransportProvider implements TransportProvider {
677
677
  * Get the storage adapter.
678
678
  */
679
679
  getStorageAdapter(): TransportStorageAdapter | null;
680
+ /**
681
+ * Get the underlying NostrClient (or null if not yet connected).
682
+ *
683
+ * Exposed so {@link MultiAddressTransportMux} can share the same
684
+ * client/socket pair instead of opening a duplicate WebSocket per
685
+ * relay (#123). The transport owns the client's lifecycle — callers
686
+ * MUST NOT call {@code disconnect()} on the returned instance.
687
+ */
688
+ getNostrClient(): NostrClient | null;
680
689
  /**
681
690
  * Suppress event subscriptions — unsubscribe wallet/chat filters
682
691
  * but keep the connection alive for resolve/identity-binding operations.
@@ -24758,6 +24758,17 @@ var NostrTransportProvider = class _NostrTransportProvider {
24758
24758
  getStorageAdapter() {
24759
24759
  return this.storage;
24760
24760
  }
24761
+ /**
24762
+ * Get the underlying NostrClient (or null if not yet connected).
24763
+ *
24764
+ * Exposed so {@link MultiAddressTransportMux} can share the same
24765
+ * client/socket pair instead of opening a duplicate WebSocket per
24766
+ * relay (#123). The transport owns the client's lifecycle — callers
24767
+ * MUST NOT call {@code disconnect()} on the returned instance.
24768
+ */
24769
+ getNostrClient() {
24770
+ return this.nostrClient;
24771
+ }
24761
24772
  /**
24762
24773
  * Suppress event subscriptions — unsubscribe wallet/chat filters
24763
24774
  * but keep the connection alive for resolve/identity-binding operations.