@konemono/nostr-login 1.15.8 → 1.16.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/index.d.ts +0 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/modules/nip46/Nip46Signer.d.ts +25 -0
- package/dist/unpkg.js +5 -5
- package/dist/utils/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/index.ts +1 -22
- package/src/modules/AuthNostrService.ts +33 -3
- package/src/modules/BannerManager.ts +0 -4
- package/src/modules/ModalManager.ts +0 -4
- package/src/modules/nip46/Nip46Signer.ts +87 -0
- package/src/utils/index.ts +0 -42
|
@@ -26,6 +26,31 @@ export declare class Nip46Signer extends EventEmitter {
|
|
|
26
26
|
* NIP-46 remote decrypt (NIP-04)
|
|
27
27
|
*/
|
|
28
28
|
decrypt(senderPubkey: string, ciphertext: string): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* NIP-46 ping — signer の死活確認
|
|
31
|
+
*/
|
|
32
|
+
ping(): Promise<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* NIP-46 switch_relays — リレーリストの更新
|
|
35
|
+
* Spec: 接続確立後に client が即時送信、signer が relay リストを返す
|
|
36
|
+
*/
|
|
37
|
+
switchRelays(): Promise<string[] | null>;
|
|
38
|
+
/**
|
|
39
|
+
* NIP-46 logout — リモート signer にセッション終了を通知
|
|
40
|
+
*/
|
|
41
|
+
logout(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* NIP-46 remote encrypt (NIP-44)
|
|
44
|
+
*/
|
|
45
|
+
nip44Encrypt(recipientPubkey: string, plaintext: string): Promise<string>;
|
|
46
|
+
/**
|
|
47
|
+
* NIP-46 remote decrypt (NIP-44)
|
|
48
|
+
*/
|
|
49
|
+
nip44Decrypt(senderPubkey: string, ciphertext: string): Promise<string>;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated NIP-46 spec から create_account は別 NIP へ移動済み。
|
|
52
|
+
* 将来的に削除されます。
|
|
53
|
+
*/
|
|
29
54
|
createAccount2({ bunkerPubkey, name, domain, perms }: {
|
|
30
55
|
bunkerPubkey: string;
|
|
31
56
|
name: string;
|