@konemono/nostr-login 1.13.2 → 1.13.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.
@@ -16,6 +16,10 @@ declare class NostrRpc extends NDKNostrRpc {
16
16
  protected _useNip44: boolean;
17
17
  constructor(ndk: NDK, signer: PrivateKeySigner);
18
18
  subscribe(filter: NDKFilter): Promise<NDKSubscription>;
19
+ /**
20
+ * subscription が無ければ作る。localSigner の pubkey で kind:24133 を購読。
21
+ */
22
+ ensureSubscription(): Promise<void>;
19
23
  stop(): void;
20
24
  /**
21
25
  * リレー再接続後にsubscriptionを再開する。
@@ -37,7 +41,15 @@ declare class NostrRpc extends NDKNostrRpc {
37
41
  private isNip04;
38
42
  parseEvent(event: NDKEvent): Promise<NDKRpcRequest | NDKRpcResponse>;
39
43
  parseNostrConnectReply(reply: any, secret: string): Promise<string>;
44
+ /**
45
+ * subscriptionを開始してから connect response を待つ。
46
+ * listen 後もsubscriptionは維持する(後続の get_public_key 等で必要)。
47
+ */
40
48
  listen(nostrConnectSecret: string): Promise<string>;
49
+ /**
50
+ * subscriptionが無ければ開始してから connect リクエストを送る。
51
+ * レスポンスは subscription の event ハンドラ経由で受け取る。
52
+ */
41
53
  connect(pubkey: string, token?: string, perms?: string): Promise<void>;
42
54
  protected getId(): string;
43
55
  sendRequest(remotePubkey: string, method: string, params?: string[], kind?: number, cb?: (res: NDKRpcResponse) => void): Promise<NDKRpcResponse>;