@konemono/nostr-login 1.9.13 → 1.9.14

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.
@@ -4,6 +4,7 @@ import { EventEmitter } from 'tseep';
4
4
  import { Signer } from './Nostr';
5
5
  declare class AuthNostrService extends EventEmitter implements Signer {
6
6
  private signer;
7
+ private amberSigner;
7
8
  private localSigner;
8
9
  private params;
9
10
  private signerPromise?;
@@ -24,6 +25,9 @@ declare class AuthNostrService extends EventEmitter implements Signer {
24
25
  decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
25
26
  };
26
27
  constructor(params: NostrParams);
28
+ private checkAmberResponse;
29
+ private handledAmberIds;
30
+ private handleAmberResponse;
27
31
  isIframe(): boolean;
28
32
  waitReady(): Promise<void>;
29
33
  cancelNostrConnect(): void;
@@ -8,16 +8,8 @@ export declare class Nip46Adapter extends EventEmitter {
8
8
  remotePubkey: string;
9
9
  constructor(client: Nip46Client, localSigner: PrivateKeySigner);
10
10
  initUserPubkey(hintPubkey?: string): Promise<void>;
11
- /**
12
- * nostrconnect:// フロー - 受信待機
13
- * サイナーからの接続を待つ
14
- */
15
- listen(nostrConnectSecret: string, timeoutMs?: number): Promise<string>;
16
- /**
17
- * bunker:// フロー - 能動的接続
18
- * サイナーに接続リクエストを送る
19
- */
20
- connect(token?: string, perms?: string, timeoutMs?: number): Promise<void>;
11
+ listen(nostrConnectSecret: string): Promise<string>;
12
+ connect(token?: string, perms?: string): Promise<void>;
21
13
  setListenReply(reply: any, nostrConnectSecret: string): Promise<void>;
22
14
  createAccount2({ bunkerPubkey, name, domain, perms }: {
23
15
  bunkerPubkey: string;
@@ -11,19 +11,12 @@ export declare class Nip46Client extends EventEmitter {
11
11
  private subscription;
12
12
  private isSubscribed;
13
13
  private nip44Codec;
14
- private iframeConfig?;
15
- private retryConfig;
16
- private iframeKeepaliveInterval?;
17
14
  constructor(options: Nip46ClientOptions);
18
15
  get localPubkey(): string;
19
16
  /**
20
- * NIP-46リクエストを送信(リトライ機能付き)
17
+ * NIP-46リクエストを送信
21
18
  */
22
19
  sendRequest(method: string, params?: string[], timeoutMs?: number): Promise<string>;
23
- /**
24
- * NIP-46リクエストを送信(内部実装)
25
- */
26
- private sendRequestInternal;
27
20
  /**
28
21
  * リクエストイベントを作成して送信
29
22
  */
@@ -56,12 +49,4 @@ export declare class Nip46Client extends EventEmitter {
56
49
  * 接続状態を確認
57
50
  */
58
51
  isConnected(): boolean;
59
- /**
60
- * iframeポートを設定
61
- */
62
- setIframePort(port: MessagePort): void;
63
- /**
64
- * iframe用のメッセージハンドラを設定
65
- */
66
- private setupIframePort;
67
52
  }
@@ -21,12 +21,4 @@ export interface Nip46ClientOptions {
21
21
  relays: string[];
22
22
  timeoutMs?: number;
23
23
  useNip44?: boolean;
24
- iframeConfig?: {
25
- origin: string;
26
- port?: MessagePort;
27
- };
28
- retryConfig?: {
29
- maxRetries: number;
30
- retryDelayMs: number;
31
- };
32
24
  }