@qntx/nostr 0.5.0 → 0.7.0
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/{abort-Ba8tDrOI.mjs → abort-DBq2STPj.mjs} +13 -6
- package/dist/abort-DBq2STPj.mjs.map +1 -0
- package/dist/{builder-9tjI6WQ3.mjs → builder-CdLE4J6O.mjs} +11 -17
- package/dist/builder-CdLE4J6O.mjs.map +1 -0
- package/dist/{builder-sSflu6nB.d.mts → builder-DgkqDylK.d.mts} +5 -6
- package/dist/{client-BtIAtxrL.mjs → client-CILhdfsF.mjs} +104 -314
- package/dist/client-CILhdfsF.mjs.map +1 -0
- package/dist/client.d.mts +2 -2
- package/dist/client.mjs +2 -2
- package/dist/collections-DtwMc1NU.mjs +33 -0
- package/dist/collections-DtwMc1NU.mjs.map +1 -0
- package/dist/core.d.mts +9 -8
- package/dist/core.mjs +7 -7
- package/dist/{error-BW7re1UN.d.mts → error-BD_0QFKT.d.mts} +2 -2
- package/dist/{error-CR8Urc84.d.mts → error-BquXDmIN.d.mts} +4 -4
- package/dist/{error-DrEIM7FO.mjs → error-L_QdmSnV.mjs} +2 -2
- package/dist/{error-DrEIM7FO.mjs.map → error-L_QdmSnV.mjs.map} +1 -1
- package/dist/{error-B__OMBRY.mjs → error-gtJvV6YS.mjs} +2 -2
- package/dist/{error-B__OMBRY.mjs.map → error-gtJvV6YS.mjs.map} +1 -1
- package/dist/{event-fU3Y01PR.d.mts → event-DJeb_DIL.d.mts} +4 -2
- package/dist/{event-D8Nfoh4K.mjs → event-DinQMmJ1.mjs} +16 -10
- package/dist/event-DinQMmJ1.mjs.map +1 -0
- package/dist/{filter-C0IMByE3.d.mts → filter-jI_9htF7.d.mts} +2 -2
- package/dist/{gossip-DpIvkBuj.d.mts → gossip-C7HLW5kI.d.mts} +35 -26
- package/dist/{gossip-oloDMWEj.mjs → gossip-CcTp9VpU.mjs} +23 -33
- package/dist/gossip-CcTp9VpU.mjs.map +1 -0
- package/dist/gossip.d.mts +1 -1
- package/dist/gossip.mjs +1 -1
- package/dist/{index-CvkvqB16.d.mts → index-DU9tRFTZ.d.mts} +7 -20
- package/dist/{index-q4MDce_r.d.mts → index-DiXwNn2M.d.mts} +6 -8
- package/dist/{index-QxvrpMfF.d.mts → index-DocgD9K0.d.mts} +92 -167
- package/dist/{index-D1bqFHKB.d.mts → index-InQZpHyQ.d.mts} +18 -18
- package/dist/{index-MxC28S4P.d.mts → index-Tx15HGAD.d.mts} +26 -28
- package/dist/{index-Dmc8FJgO.d.mts → index-iLT8UzY3.d.mts} +19 -37
- package/dist/index.d.mts +23 -21
- package/dist/index.mjs +21 -19
- package/dist/instance-BcKzxHIP.mjs +220 -0
- package/dist/instance-BcKzxHIP.mjs.map +1 -0
- package/dist/instance-DjsL8h84.d.mts +15 -0
- package/dist/{key-Cv4_pN3x.d.mts → key-D_5OgGT7.d.mts} +11 -7
- package/dist/{key-Bps-LqX7.mjs → key-bshqfmZL.mjs} +13 -9
- package/dist/key-bshqfmZL.mjs.map +1 -0
- package/dist/{loaders-o6YXB_Ri.mjs → loaders-DD0XAGzw.mjs} +73 -82
- package/dist/loaders-DD0XAGzw.mjs.map +1 -0
- package/dist/loaders.d.mts +3 -3
- package/dist/loaders.mjs +2 -2
- package/dist/{memory-C2EVx0_O.mjs → memory-D_-5-T31.mjs} +2 -2
- package/dist/memory-D_-5-T31.mjs.map +1 -0
- package/dist/{memory-index-Do1mz0WF.mjs → memory-index-C6rujtoc.mjs} +30 -247
- package/dist/memory-index-C6rujtoc.mjs.map +1 -0
- package/dist/message-CWLcFTQ1.mjs +194 -0
- package/dist/message-CWLcFTQ1.mjs.map +1 -0
- package/dist/{message-iGPIqnn0.d.mts → message-CbBZOhq3.d.mts} +3 -3
- package/dist/{nip17-CKIufV98.d.mts → nip17-cTDFfFVt.d.mts} +5 -6
- package/dist/{nip19-BevCJZsp.d.mts → nip19-D1OnJ192.d.mts} +3 -9
- package/dist/{nip46-DDV4dC56.d.mts → nip46-DrsPI8EX.d.mts} +3 -5
- package/dist/nip51-DoPUvQ--.d.mts +87 -0
- package/dist/{nip59-zQgdLcEr.d.mts → nip59-BFIihLYY.d.mts} +3 -4
- package/dist/nip65-52HiwiyD.d.mts +23 -0
- package/dist/{nip77-DH4RhS5r.d.mts → nip77-C9QcZn7b.d.mts} +3 -4
- package/dist/nips/blossom.d.mts +12 -8
- package/dist/nips/blossom.mjs +30 -9
- package/dist/nips/blossom.mjs.map +1 -1
- package/dist/nips/nip04.mjs +17 -7
- package/dist/nips/nip04.mjs.map +1 -1
- package/dist/nips/nip05.d.mts +2 -3
- package/dist/nips/nip05.mjs +1 -4
- package/dist/nips/nip05.mjs.map +1 -1
- package/dist/nips/nip10.d.mts +3 -3
- package/dist/nips/nip10.mjs +3 -3
- package/dist/nips/nip11.d.mts +1 -1
- package/dist/nips/nip11.mjs +4 -4
- package/dist/nips/nip11.mjs.map +1 -1
- package/dist/nips/nip13.d.mts +7 -7
- package/dist/nips/nip13.mjs +32 -10
- package/dist/nips/nip13.mjs.map +1 -1
- package/dist/nips/nip17.d.mts +1 -1
- package/dist/nips/nip17.mjs +13 -33
- package/dist/nips/nip17.mjs.map +1 -1
- package/dist/nips/nip19.d.mts +2 -2
- package/dist/nips/nip19.mjs +16 -28
- package/dist/nips/nip19.mjs.map +1 -1
- package/dist/nips/nip21.d.mts +6 -1
- package/dist/nips/nip21.mjs +15 -5
- package/dist/nips/nip21.mjs.map +1 -1
- package/dist/nips/nip27.d.mts +4 -4
- package/dist/nips/nip27.mjs.map +1 -1
- package/dist/nips/nip42.d.mts +1 -1
- package/dist/nips/nip42.mjs +2 -1
- package/dist/nips/nip42.mjs.map +1 -1
- package/dist/nips/nip44.mjs +1 -1
- package/dist/nips/nip46.d.mts +2 -2
- package/dist/nips/nip46.mjs +15 -19
- package/dist/nips/nip46.mjs.map +1 -1
- package/dist/nips/nip49.d.mts +5 -5
- package/dist/nips/nip49.mjs +4 -4
- package/dist/nips/nip49.mjs.map +1 -1
- package/dist/nips/nip51.d.mts +2 -86
- package/dist/nips/nip51.mjs +7 -23
- package/dist/nips/nip51.mjs.map +1 -1
- package/dist/nips/nip57.d.mts +7 -5
- package/dist/nips/nip57.mjs +12 -17
- package/dist/nips/nip57.mjs.map +1 -1
- package/dist/nips/nip59.d.mts +1 -1
- package/dist/nips/nip59.mjs +16 -16
- package/dist/nips/nip59.mjs.map +1 -1
- package/dist/nips/nip65.d.mts +2 -2
- package/dist/nips/nip65.mjs +14 -37
- package/dist/nips/nip65.mjs.map +1 -1
- package/dist/nips/nip77.d.mts +1 -1
- package/dist/nips/nip77.mjs +33 -32
- package/dist/nips/nip77.mjs.map +1 -1
- package/dist/nips/nip98.d.mts +5 -5
- package/dist/nips/nip98.mjs +8 -8
- package/dist/nips/nip98.mjs.map +1 -1
- package/dist/nostr_crypto_wasm_bg.wasm +0 -0
- package/dist/{pool-DBIYMtwy.d.mts → pool-SzJKPIa3.d.mts} +96 -91
- package/dist/pool-YHRZgcQ3.mjs +596 -0
- package/dist/pool-YHRZgcQ3.mjs.map +1 -0
- package/dist/put-DS0yzVJx.mjs +187 -0
- package/dist/put-DS0yzVJx.mjs.map +1 -0
- package/dist/{reactive-DFpqtIf_.d.mts → reactive-BJ1ggn4d.d.mts} +9 -22
- package/dist/{reactive-DDlThDSZ.mjs → reactive-BJRoVHxU.mjs} +113 -64
- package/dist/reactive-BJRoVHxU.mjs.map +1 -0
- package/dist/{pool-As20OGxB.mjs → relay-CvxPiQ_m.mjs} +178 -721
- package/dist/relay-CvxPiQ_m.mjs.map +1 -0
- package/dist/relay.d.mts +4 -4
- package/dist/relay.mjs +3 -2
- package/dist/serial-Bzpw-xz3.mjs +21 -0
- package/dist/serial-Bzpw-xz3.mjs.map +1 -0
- package/dist/{signer-CYQutDzD.mjs → signer-yW3slDC2.mjs} +12 -14
- package/dist/signer-yW3slDC2.mjs.map +1 -0
- package/dist/signer.d.mts +2 -2
- package/dist/signer.mjs +2 -2
- package/dist/{storage-Dky3wuoH.mjs → storage-CZ52ifcQ.mjs} +17 -42
- package/dist/storage-CZ52ifcQ.mjs.map +1 -0
- package/dist/storage.d.mts +3 -3
- package/dist/storage.mjs +4 -4
- package/dist/store.d.mts +1 -1
- package/dist/store.mjs +1 -1
- package/dist/testing.d.mts +18 -18
- package/dist/testing.mjs +9 -9
- package/dist/testing.mjs.map +1 -1
- package/dist/{types-2pCUprRU.d.mts → types-Cm-XMgtH.d.mts} +6 -6
- package/dist/{types-CRQEk0Oi.d.mts → types-DNmiscfd.d.mts} +2 -2
- package/dist/{util-LfQirgDk.mjs → util-yFYzlbrm.mjs} +29 -7
- package/dist/util-yFYzlbrm.mjs.map +1 -0
- package/dist/{verifier-t5WoWbtY.mjs → verifier-BTLOpo1n.mjs} +3 -3
- package/dist/verifier-BTLOpo1n.mjs.map +1 -0
- package/dist/verifier-CgTFpgsC.d.mts +22 -0
- package/dist/wasm.browser.d.mts +8 -0
- package/dist/wasm.browser.mjs +19 -0
- package/dist/wasm.browser.mjs.map +1 -0
- package/dist/wasm.d.mts +3 -13
- package/dist/wasm.mjs +7 -208
- package/dist/wasm.mjs.map +1 -1
- package/package.json +13 -10
- package/dist/abort-Ba8tDrOI.mjs.map +0 -1
- package/dist/builder-9tjI6WQ3.mjs.map +0 -1
- package/dist/client-BtIAtxrL.mjs.map +0 -1
- package/dist/event-D8Nfoh4K.mjs.map +0 -1
- package/dist/gossip-oloDMWEj.mjs.map +0 -1
- package/dist/key-Bps-LqX7.mjs.map +0 -1
- package/dist/loaders-o6YXB_Ri.mjs.map +0 -1
- package/dist/memory-C2EVx0_O.mjs.map +0 -1
- package/dist/memory-index-Do1mz0WF.mjs.map +0 -1
- package/dist/message-DcY6Fi9o.mjs +0 -193
- package/dist/message-DcY6Fi9o.mjs.map +0 -1
- package/dist/nip65-CjgmdpPB.d.mts +0 -26
- package/dist/nips/nip96.d.mts +0 -40
- package/dist/nips/nip96.mjs +0 -118
- package/dist/nips/nip96.mjs.map +0 -1
- package/dist/pool-As20OGxB.mjs.map +0 -1
- package/dist/reactive-DDlThDSZ.mjs.map +0 -1
- package/dist/signer-CYQutDzD.mjs.map +0 -1
- package/dist/storage-Dky3wuoH.mjs.map +0 -1
- package/dist/util-LfQirgDk.mjs.map +0 -1
- package/dist/verifier-t5WoWbtY.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Event } from "./event-
|
|
2
|
-
import { t as Filter } from "./filter-
|
|
3
|
-
import { i as PutResult, n as NegentropyItem, r as OutboxBound, t as EventStore } from "./types-
|
|
1
|
+
import { t as Event } from "./event-DJeb_DIL.mjs";
|
|
2
|
+
import { t as Filter } from "./filter-jI_9htF7.mjs";
|
|
3
|
+
import { i as PutResult, n as NegentropyItem, r as OutboxBound, t as EventStore } from "./types-Cm-XMgtH.mjs";
|
|
4
4
|
//#region src/storage/memory-index.d.ts
|
|
5
5
|
type MemoryIndexOptions = {
|
|
6
6
|
/**
|
|
@@ -8,7 +8,7 @@ type MemoryIndexOptions = {
|
|
|
8
8
|
* e-tag ids, and coordinate tombstones. Default unbounded. Trade-off: once an entry is trimmed, a
|
|
9
9
|
* re-arriving old deleted event or replaceable version can be accepted again.
|
|
10
10
|
*/
|
|
11
|
-
maxTombstones?: number;
|
|
11
|
+
maxTombstones?: number | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* FIFO cap on replaceable/addressable winner watermarks recorded by {@link evict}. A watermark
|
|
14
14
|
* keeps only `{ id, created_at }` per address so stale versions stay rejected after the winner's
|
|
@@ -16,11 +16,11 @@ type MemoryIndexOptions = {
|
|
|
16
16
|
* retention); callers that evict should pass a bound. Once a watermark is trimmed, an older
|
|
17
17
|
* evicted version can be accepted again — the same trade-off as deletion tombstones.
|
|
18
18
|
*/
|
|
19
|
-
maxWatermarks?: number;
|
|
19
|
+
maxWatermarks?: number | undefined;
|
|
20
20
|
/** Fires after every physical index insert (accept, replace, deletion event). */
|
|
21
|
-
onInsert?: (event: Event) => void;
|
|
21
|
+
onInsert?: ((event: Event) => void) | undefined;
|
|
22
22
|
/** Fires after every physical index remove (replace, delete, evict, remove, clear). */
|
|
23
|
-
onRemove?: (event: Event) => void;
|
|
23
|
+
onRemove?: ((event: Event) => void) | undefined;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Synchronous in-memory event index with NIP-01 replaceable / addressable / ephemeral handling and
|
|
@@ -68,10 +68,10 @@ declare class MemoryEventStore implements EventStore {
|
|
|
68
68
|
/** Sequential `put` in input order. No transaction: a throw leaves earlier events applied. */
|
|
69
69
|
putMany(events: ReadonlyArray<Event>): Promise<PutResult[]>;
|
|
70
70
|
get(id: string): Promise<Event | undefined>;
|
|
71
|
-
query(filters: Filter
|
|
72
|
-
count(filters: Filter
|
|
71
|
+
query(filters: ReadonlyArray<Filter>): Promise<Event[]>;
|
|
72
|
+
count(filters: ReadonlyArray<Filter>): Promise<number>;
|
|
73
73
|
negentropyItems(filter: Filter): Promise<NegentropyItem[]>;
|
|
74
|
-
remove(ids: string
|
|
74
|
+
remove(ids: ReadonlyArray<string>): Promise<number>;
|
|
75
75
|
getOutboxBound(pubkey: string, kind: number): Promise<OutboxBound | undefined>;
|
|
76
76
|
setOutboxBound(pubkey: string, kind: number, bound: OutboxBound): Promise<void>;
|
|
77
77
|
clear(): Promise<void>;
|
|
@@ -82,7 +82,7 @@ declare class MemoryEventStore implements EventStore {
|
|
|
82
82
|
/** Options for {@link IndexedDbEventStore}. */
|
|
83
83
|
type IndexedDbEventStoreOptions = {
|
|
84
84
|
/** IndexedDB database name. */
|
|
85
|
-
dbName?: string;
|
|
85
|
+
dbName?: string | undefined;
|
|
86
86
|
};
|
|
87
87
|
/**
|
|
88
88
|
* Browser IndexedDB event store with the same replaceable / deletion semantics as
|
|
@@ -100,12 +100,12 @@ declare class IndexedDbEventStore implements EventStore {
|
|
|
100
100
|
/** One readwrite transaction; abort rejects the whole batch with no partial persist. */
|
|
101
101
|
putMany(events: ReadonlyArray<Event>): Promise<PutResult[]>;
|
|
102
102
|
get(id: string): Promise<Event | undefined>;
|
|
103
|
-
query(filters: Filter
|
|
104
|
-
count(filters: Filter
|
|
103
|
+
query(filters: ReadonlyArray<Filter>): Promise<Event[]>;
|
|
104
|
+
count(filters: ReadonlyArray<Filter>): Promise<number>;
|
|
105
105
|
negentropyItems(filter: Filter): Promise<NegentropyItem[]>;
|
|
106
106
|
getOutboxBound(pubkey: string, kind: number): Promise<OutboxBound | undefined>;
|
|
107
107
|
setOutboxBound(pubkey: string, kind: number, bound: OutboxBound): Promise<void>;
|
|
108
|
-
remove(ids: string
|
|
108
|
+
remove(ids: ReadonlyArray<string>): Promise<number>;
|
|
109
109
|
clear(): Promise<void>;
|
|
110
110
|
close(): void;
|
|
111
111
|
}
|
|
@@ -175,14 +175,14 @@ declare class SqliteEventStore implements EventStore {
|
|
|
175
175
|
put(event: Event): Promise<PutResult>;
|
|
176
176
|
putMany(events: ReadonlyArray<Event>): Promise<PutResult[]>;
|
|
177
177
|
get(id: string): Promise<Event | undefined>;
|
|
178
|
-
query(filters: Filter
|
|
179
|
-
count(filters: Filter
|
|
178
|
+
query(filters: ReadonlyArray<Filter>): Promise<Event[]>;
|
|
179
|
+
count(filters: ReadonlyArray<Filter>): Promise<number>;
|
|
180
180
|
negentropyItems(filter: Filter): Promise<NegentropyItem[]>;
|
|
181
181
|
getOutboxBound(pubkey: string, kind: number): Promise<OutboxBound | undefined>;
|
|
182
182
|
setOutboxBound(pubkey: string, kind: number, bound: OutboxBound): Promise<void>;
|
|
183
|
-
remove(ids: string
|
|
183
|
+
remove(ids: ReadonlyArray<string>): Promise<number>;
|
|
184
184
|
clear(): Promise<void>;
|
|
185
185
|
}
|
|
186
186
|
//#endregion
|
|
187
187
|
export { IndexedDbEventStoreOptions as a, MemoryIndexOptions as c, IndexedDbEventStore as i, SqlValue as n, MemoryEventStore as o, SqliteEventStore as r, MemoryIndex as s, SqlDriver as t };
|
|
188
|
-
//# sourceMappingURL=index-
|
|
188
|
+
//# sourceMappingURL=index-InQZpHyQ.d.mts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as EventTemplate, r as UnsignedEvent, t as Event } from "./event-
|
|
2
|
-
import {
|
|
3
|
-
import { t as Filter } from "./filter-
|
|
4
|
-
import { a as NostrError } from "./error-
|
|
5
|
-
import { t as NostrSigner } from "./types-
|
|
6
|
-
import { n as
|
|
1
|
+
import { n as EventTemplate, r as UnsignedEvent, t as Event } from "./event-DJeb_DIL.mjs";
|
|
2
|
+
import { i as SecretKeyInput, t as Keys } from "./key-D_5OgGT7.mjs";
|
|
3
|
+
import { t as Filter } from "./filter-jI_9htF7.mjs";
|
|
4
|
+
import { a as NostrError } from "./error-BquXDmIN.mjs";
|
|
5
|
+
import { t as NostrSigner } from "./types-DNmiscfd.mjs";
|
|
6
|
+
import { n as ClientMetadata, t as BunkerPointer } from "./nip46-DrsPI8EX.mjs";
|
|
7
7
|
//#region src/signer/error.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Thrown by a lazy NIP-42 AUTH sign function when no signer is configured at challenge time.
|
|
@@ -18,7 +18,7 @@ declare class NoSignerError extends NostrError {
|
|
|
18
18
|
/** Local secret-key signer with NIP-04 (legacy) and NIP-44 support. */
|
|
19
19
|
declare class KeysSigner implements NostrSigner {
|
|
20
20
|
#private;
|
|
21
|
-
constructor(secretKey:
|
|
21
|
+
constructor(secretKey: SecretKeyInput | Keys);
|
|
22
22
|
get keys(): Keys;
|
|
23
23
|
getPublicKey(): Promise<string>;
|
|
24
24
|
signEvent(unsigned: UnsignedEvent): Promise<Event>;
|
|
@@ -77,49 +77,47 @@ type Nip46SubscribeOptions = {
|
|
|
77
77
|
* constructed above the signer layer so `signer` never imports `relay` (ADR-0001).
|
|
78
78
|
*/
|
|
79
79
|
type Nip46Transport = {
|
|
80
|
-
subscribe: (relays: string
|
|
80
|
+
subscribe: (relays: ReadonlyArray<string>, filters: ReadonlyArray<Filter>, opts?: Nip46SubscribeOptions) => {
|
|
81
81
|
close: (reason?: string) => void;
|
|
82
82
|
};
|
|
83
|
-
publish: (relays: string
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
error?: string;
|
|
83
|
+
publish: (relays: ReadonlyArray<string>, event: Event) => Promise<ReadonlyArray<{
|
|
84
|
+
readonly status: "ok" | "rejected" | "failed";
|
|
85
|
+
readonly message?: string;
|
|
86
|
+
readonly error?: string;
|
|
89
87
|
}>>;
|
|
90
88
|
close: (urls?: string[]) => void;
|
|
91
89
|
};
|
|
92
90
|
/** Options for {@link Nip46Signer}: transport, timeouts, and relay hints. */
|
|
93
91
|
type Nip46SignerOptions = {
|
|
94
92
|
/** Shared transport. When set, the signer does not close it on {@link Nip46Signer.close}. */
|
|
95
|
-
pool?: Nip46Transport;
|
|
93
|
+
pool?: Nip46Transport | undefined;
|
|
96
94
|
/**
|
|
97
95
|
* Factory for a private transport when `pool` is omitted. Typical: `() => new Pool({
|
|
98
96
|
* websocketImplementation, enableReconnect: true })`.
|
|
99
97
|
*/
|
|
100
|
-
createPool?: () => Nip46Transport;
|
|
98
|
+
createPool?: (() => Nip46Transport) | undefined;
|
|
101
99
|
/**
|
|
102
100
|
* Relays used when the bunker pointer has none, and merged uniquely onto a nonempty pointer
|
|
103
101
|
* (pointer first).
|
|
104
102
|
*/
|
|
105
|
-
relays?: string
|
|
103
|
+
relays?: ReadonlyArray<string> | undefined;
|
|
106
104
|
/** Bunker connection secret when the pointer or bunker:// URL has none. */
|
|
107
105
|
secret?: string | undefined;
|
|
108
106
|
/** Local client key used to encrypt RPC (not the remote user key). */
|
|
109
|
-
clientSecretKey?:
|
|
107
|
+
clientSecretKey?: SecretKeyInput | undefined;
|
|
110
108
|
/** Called when bunker returns `auth_url` for a pending request. */
|
|
111
|
-
onAuthUrl?: (url: string) => void;
|
|
109
|
+
onAuthUrl?: ((url: string) => void) | undefined;
|
|
112
110
|
/** Per-request timeout in ms. Default 30s. */
|
|
113
|
-
timeoutMs?: number;
|
|
111
|
+
timeoutMs?: number | undefined;
|
|
114
112
|
/**
|
|
115
113
|
* Timeout in ms applied after the bunker replies `auth_url`: the request keeps waiting for the
|
|
116
114
|
* real response until this elapses. Default 300s.
|
|
117
115
|
*/
|
|
118
|
-
authTimeoutMs?: number;
|
|
116
|
+
authTimeoutMs?: number | undefined;
|
|
119
117
|
/** Requested permissions sent with `connect` (`method[:kind]` list). */
|
|
120
|
-
perms?: string
|
|
118
|
+
perms?: ReadonlyArray<string> | undefined;
|
|
121
119
|
/** Client metadata sent with bunker-initiated `connect`. */
|
|
122
|
-
metadata?: ClientMetadata;
|
|
120
|
+
metadata?: ClientMetadata | undefined;
|
|
123
121
|
};
|
|
124
122
|
/**
|
|
125
123
|
* NIP-46 remote signer (bunker / nostrconnect). Implements {@link NostrSigner}; never holds the
|
|
@@ -136,7 +134,7 @@ declare class Nip46Signer implements NostrSigner {
|
|
|
136
134
|
* identity.
|
|
137
135
|
*/
|
|
138
136
|
static fromBunker(pointer: BunkerPointer, opts: Nip46SignerOptions & {
|
|
139
|
-
clientSecretKey:
|
|
137
|
+
clientSecretKey: SecretKeyInput;
|
|
140
138
|
}): Nip46Signer;
|
|
141
139
|
/**
|
|
142
140
|
* Connect using a `bunker://` URL or pre-parsed pointer. Invalid strings throw. A NIP-05
|
|
@@ -150,13 +148,13 @@ declare class Nip46Signer implements NostrSigner {
|
|
|
150
148
|
* {@link createNostrConnectURI} after generating keys).
|
|
151
149
|
*/
|
|
152
150
|
static fromNostrConnectURI(connectionURI: string, opts: Nip46SignerOptions & {
|
|
153
|
-
clientSecretKey:
|
|
151
|
+
clientSecretKey: SecretKeyInput;
|
|
154
152
|
signal?: AbortSignal;
|
|
155
153
|
handshakeTimeoutMs?: number;
|
|
156
154
|
}): Promise<Nip46Signer>;
|
|
157
155
|
connectRemote(overrides?: {
|
|
158
|
-
metadata?: ClientMetadata;
|
|
159
|
-
perms?: string
|
|
156
|
+
metadata?: ClientMetadata | undefined;
|
|
157
|
+
perms?: ReadonlyArray<string> | undefined;
|
|
160
158
|
}): Promise<void>;
|
|
161
159
|
/**
|
|
162
160
|
* Ask the bunker for its preferred relay list and resubscribe when it changes. Spec result is a
|
|
@@ -176,4 +174,4 @@ declare class Nip46Signer implements NostrSigner {
|
|
|
176
174
|
}
|
|
177
175
|
//#endregion
|
|
178
176
|
export { Nip07Signer as a, isNip07Available as c, Nip46Transport as i, KeysSigner as l, Nip46SignerOptions as n, WindowNostr as o, Nip46SubscribeOptions as r, getWindowNostr as s, Nip46Signer as t, NoSignerError as u };
|
|
179
|
-
//# sourceMappingURL=index-
|
|
177
|
+
//# sourceMappingURL=index-Tx15HGAD.d.mts.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { t as Event } from "./event-
|
|
2
|
-
import { n as ProfileMetadata } from "./builder-
|
|
3
|
-
import { t as RelayListItem } from "./nip65-
|
|
4
|
-
import { t as Gossip } from "./gossip-
|
|
5
|
-
import { a as NostrError } from "./error-
|
|
6
|
-
import { n as Pool } from "./pool-
|
|
7
|
-
import { r as OutboxBound, t as EventStore } from "./types-
|
|
8
|
-
import { t as ReactiveEventStore } from "./reactive-
|
|
9
|
-
import { i as EventPointer, t as AddressPointer } from "./nip19-
|
|
1
|
+
import { t as Event } from "./event-DJeb_DIL.mjs";
|
|
2
|
+
import { n as ProfileMetadata } from "./builder-DgkqDylK.mjs";
|
|
3
|
+
import { t as RelayListItem } from "./nip65-52HiwiyD.mjs";
|
|
4
|
+
import { t as Gossip } from "./gossip-C7HLW5kI.mjs";
|
|
5
|
+
import { a as NostrError } from "./error-BquXDmIN.mjs";
|
|
6
|
+
import { g as Closer, n as Pool } from "./pool-SzJKPIa3.mjs";
|
|
7
|
+
import { r as OutboxBound, t as EventStore } from "./types-Cm-XMgtH.mjs";
|
|
8
|
+
import { t as ReactiveEventStore } from "./reactive-BJ1ggn4d.mjs";
|
|
9
|
+
import { i as EventPointer, t as AddressPointer } from "./nip19-D1OnJ192.mjs";
|
|
10
|
+
import { t as MuteItem } from "./nip51-DoPUvQ--.mjs";
|
|
10
11
|
//#region src/loaders/event.d.ts
|
|
11
12
|
type EventRef = string | EventPointer | AddressPointer;
|
|
12
13
|
/**
|
|
@@ -39,27 +40,13 @@ type ListResult<T> = {
|
|
|
39
40
|
items: T[];
|
|
40
41
|
fresh: boolean;
|
|
41
42
|
};
|
|
42
|
-
/** One muted entity decoded from a kind:10000 mute list. */
|
|
43
|
-
type MutedEntity = {
|
|
44
|
-
label: "pubkey";
|
|
45
|
-
value: string;
|
|
46
|
-
} | {
|
|
47
|
-
label: "thread";
|
|
48
|
-
value: string;
|
|
49
|
-
} | {
|
|
50
|
-
label: "hashtag";
|
|
51
|
-
value: string;
|
|
52
|
-
} | {
|
|
53
|
-
label: "word";
|
|
54
|
-
value: string;
|
|
55
|
-
};
|
|
56
43
|
type ListLoaderOpts = {
|
|
57
44
|
hints?: string[] | undefined;
|
|
58
45
|
style?: LoadStyle | undefined;
|
|
59
46
|
};
|
|
60
47
|
type ListLoaders = {
|
|
61
48
|
follows: (pubkey: string, opts?: ListLoaderOpts) => Promise<ListResult<string>>;
|
|
62
|
-
muteList: (pubkey: string, opts?: ListLoaderOpts) => Promise<ListResult<
|
|
49
|
+
muteList: (pubkey: string, opts?: ListLoaderOpts) => Promise<ListResult<MuteItem>>;
|
|
63
50
|
relayList: (pubkey: string, opts?: ListLoaderOpts) => Promise<ListResult<RelayListItem>>;
|
|
64
51
|
dmRelayList: (pubkey: string, opts?: ListLoaderOpts) => Promise<ListResult<string>>;
|
|
65
52
|
};
|
|
@@ -90,7 +77,7 @@ type ProfileLoader = {
|
|
|
90
77
|
declare class OutboxError extends NostrError {
|
|
91
78
|
name: string;
|
|
92
79
|
}
|
|
93
|
-
/** Options for {@link
|
|
80
|
+
/** Options for {@link OutboxFeed}. */
|
|
94
81
|
type OutboxFeedOptions = {
|
|
95
82
|
pool: Pool;
|
|
96
83
|
gossip: Gossip;
|
|
@@ -156,21 +143,16 @@ declare class OutboxFeed {
|
|
|
156
143
|
startLive(opts?: {
|
|
157
144
|
signal?: AbortSignal | undefined;
|
|
158
145
|
since?: number | undefined;
|
|
159
|
-
}):
|
|
160
|
-
close: (reason?: string) => void;
|
|
161
|
-
};
|
|
146
|
+
}): Closer;
|
|
162
147
|
/** Convenience: hydrate + sync + startLive. */
|
|
163
148
|
start(opts?: {
|
|
164
149
|
limit?: number | undefined;
|
|
165
150
|
signal?: AbortSignal | undefined;
|
|
166
|
-
}): Promise<{
|
|
167
|
-
close: (reason?: string) => void;
|
|
151
|
+
}): Promise<Closer & {
|
|
168
152
|
events: Event[];
|
|
169
153
|
}>;
|
|
170
154
|
close(): void;
|
|
171
155
|
}
|
|
172
|
-
/** Factory matching other loaders helpers. */
|
|
173
|
-
declare function createOutboxFeed(opts: OutboxFeedOptions): OutboxFeed;
|
|
174
156
|
//#endregion
|
|
175
157
|
//#region src/loaders/index.d.ts
|
|
176
158
|
/** The loader surface returned by {@link createLoaders}. */
|
|
@@ -196,12 +178,12 @@ type CreateLoadersOptions = {
|
|
|
196
178
|
* Inbound-event sink for fetched events; defaults to `index.add`. Client wires its single ingest
|
|
197
179
|
* path so loader fetches get gossip meta and persistence like every other inbound event.
|
|
198
180
|
*/
|
|
199
|
-
ingest?: (event: Event, relayUrl: string) => void;
|
|
200
|
-
staleAfterSec?: number;
|
|
201
|
-
fetchTimeoutMs?: number;
|
|
181
|
+
ingest?: ((event: Event, relayUrl: string) => void) | undefined;
|
|
182
|
+
staleAfterSec?: number | undefined;
|
|
183
|
+
fetchTimeoutMs?: number | undefined;
|
|
202
184
|
};
|
|
203
185
|
/** Build an instance-scoped loader suite (no module globals). */
|
|
204
186
|
declare function createLoaders(opts: CreateLoadersOptions): Loaders;
|
|
205
187
|
//#endregion
|
|
206
|
-
export {
|
|
207
|
-
//# sourceMappingURL=index-
|
|
188
|
+
export { EventRef as _, OutboxFeed as a, NostrUser as c, ListLoaders as d, ListResult as f, EventLoader as g, ReplaceableLoader as h, OutboxError as i, ProfileLoader as l, ReplaceableLoadResult as m, Loaders as n, OutboxFeedOptions as o, LoadStyle as p, createLoaders as r, groupAuthorsByOutboxRelay as s, CreateLoadersOptions as t, bareNostrUser as u };
|
|
189
|
+
//# sourceMappingURL=index-iLT8UzY3.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { a as
|
|
3
|
-
import { n as ProfileMetadata, t as EventBuilder } from "./builder-
|
|
4
|
-
import { a as getFilterLimit, c as mergeFilters, i as filterFingerprint, n as canonicalizeFilter, o as matchFilter, r as canonicalizeFilters, s as matchFilters, t as Filter } from "./filter-
|
|
5
|
-
import { a as
|
|
6
|
-
import { i as RoutedFilter, r as PubkeyRoutes, t as Gossip } from "./gossip-
|
|
7
|
-
import { a as assertSubscriptionId, c as encodeRelayMessage, d as parseRelayMessage, i as SubscriptionId, l as mergeCountHll, n as CountResult, o as createSubscriptionId, r as RelayMessage, s as encodeClientMessage, t as ClientMessage, u as parseClientMessage } from "./message-
|
|
8
|
-
import {
|
|
9
|
-
import { a as
|
|
1
|
+
import { C as isTag, E as tagValue, S as getDTag, T as tagName, _ as Tag, d as signedMatchesUnsigned, f as sortEvents, g as EventAddress, h as validateSignedEvent, i as getEventHash, m as validateEvent, n as EventTemplate, o as isReplaceableWinner, p as sortedEvents, r as UnsignedEvent, s as itemCompare, t as Event, u as serializeEvent, v as TagInput, w as parseEventAddress, x as formatEventAddress, y as eventAddress } from "./event-DJeb_DIL.mjs";
|
|
2
|
+
import { a as SigningBackend, c as publicKeyFromHex, i as SecretKeyInput, l as signEvent, n as PublicKey, o as finalizeEvent, r as SecretKey, s as getPublicKey, t as Keys, u as toSecretKey } from "./key-D_5OgGT7.mjs";
|
|
3
|
+
import { n as ProfileMetadata, t as EventBuilder } from "./builder-DgkqDylK.mjs";
|
|
4
|
+
import { a as getFilterLimit, c as mergeFilters, i as filterFingerprint, n as canonicalizeFilter, o as matchFilter, r as canonicalizeFilters, s as matchFilters, t as Filter } from "./filter-jI_9htF7.mjs";
|
|
5
|
+
import { a as relayListEventBuilder, i as readRelays, n as RelayMarker, o as relayListToTags, r as parseRelayList, s as writeRelays, t as RelayListItem } from "./nip65-52HiwiyD.mjs";
|
|
6
|
+
import { i as RoutedFilter, r as PubkeyRoutes, t as Gossip } from "./gossip-C7HLW5kI.mjs";
|
|
7
|
+
import { a as assertSubscriptionId, c as encodeRelayMessage, d as parseRelayMessage, i as SubscriptionId, l as mergeCountHll, n as CountResult, o as createSubscriptionId, r as RelayMessage, s as encodeClientMessage, t as ClientMessage, u as parseClientMessage } from "./message-CbBZOhq3.mjs";
|
|
8
|
+
import { i as verifyEvent, n as SerializedEventVerifier, r as createEventVerifier, t as EventVerifier } from "./verifier-CgTFpgsC.mjs";
|
|
9
|
+
import { a as NostrError, i as MessageError, n as EventValidationError, o as UrlError, r as HexError, s as WasmPoisonedError, t as CryptoError } from "./error-BquXDmIN.mjs";
|
|
10
|
+
import { _ as RelaySubscription, a as PoolOptions, c as PublishResult, d as RelayOptions, f as RelayStatus, g as Closer, h as RelayFetchResult, i as PoolFetchResult, l as Relay, m as RelayFetchEnd, n as Pool, o as PoolPublishResult, p as RelayStatusName, r as PoolCountResult, s as PoolSubscribeOptions, t as InvalidEventPolicy, u as RelayEventMap, v as SubscribeOptions } from "./pool-SzJKPIa3.mjs";
|
|
10
11
|
import { i as useWebSocketImplementation } from "./websocket-CmeqvAkp.mjs";
|
|
11
|
-
import { i as PutResult, n as NegentropyItem, r as OutboxBound, t as EventStore } from "./types-
|
|
12
|
-
import { n as ReactiveEventStoreOptions, r as Watch, t as ReactiveEventStore } from "./reactive-
|
|
13
|
-
import { _ as
|
|
14
|
-
import {
|
|
15
|
-
import { t as NostrSigner } from "./types-
|
|
16
|
-
import { t as StorageError } from "./error-
|
|
17
|
-
import { _ as SyncSummary, c as PrivateMessageSendResult, d as SendPrivateMessageOptions, g as SyncOptions, h as SyncDirectionName, i as ClientOptions, m as SyncDirection, n as
|
|
18
|
-
import {
|
|
19
|
-
import { a as Nip07Signer, c as isNip07Available, i as Nip46Transport, l as KeysSigner, n as Nip46SignerOptions, o as WindowNostr, r as Nip46SubscribeOptions, s as getWindowNostr, t as Nip46Signer, u as NoSignerError } from "./index-
|
|
12
|
+
import { i as PutResult, n as NegentropyItem, r as OutboxBound, t as EventStore } from "./types-Cm-XMgtH.mjs";
|
|
13
|
+
import { n as ReactiveEventStoreOptions, r as Watch, t as ReactiveEventStore } from "./reactive-BJ1ggn4d.mjs";
|
|
14
|
+
import { _ as noteEncode, a as NAddr, b as nsecEncode, c as NPub, d as Note, f as ProfilePointer, g as neventEncode, h as naddrEncode, i as EventPointer, l as NSec, n as Bech32MaxSize, o as NEvent, p as decode, r as DecodedResult, s as NProfile, t as AddressPointer, u as Nip19Error, v as nprofileEncode, y as npubEncode } from "./nip19-D1OnJ192.mjs";
|
|
15
|
+
import { a as OutboxFeed, c as NostrUser, f as ListResult, h as ReplaceableLoader, i as OutboxError, m as ReplaceableLoadResult, n as Loaders, o as OutboxFeedOptions, p as LoadStyle, r as createLoaders, s as groupAuthorsByOutboxRelay, u as bareNostrUser } from "./index-iLT8UzY3.mjs";
|
|
16
|
+
import { t as NostrSigner } from "./types-DNmiscfd.mjs";
|
|
17
|
+
import { t as StorageError } from "./error-BD_0QFKT.mjs";
|
|
18
|
+
import { _ as SyncSummary, c as PrivateMessageSendResult, d as SendPrivateMessageOptions, g as SyncOptions, h as SyncDirectionName, i as ClientOptions, m as SyncDirection, n as ClientError, p as SubscribePrivateMessagesOptions, r as ClientEventMap, s as FetchPrivateMessagesOptions, t as Client, u as ReceivedPrivateMessage } from "./index-DocgD9K0.mjs";
|
|
19
|
+
import { S as SUBSCRIPTION_ID_MAX_CHARS, _ as normalizeURL, a as classifyKind, b as SECRET_KEY_BYTES, c as isRegularKind, f as bytesToHex, h as isHex64, i as KnownKind, l as isReplaceableKind, m as isHex32, n as KindClassification, o as isAddressableKind, p as hexToBytes, r as KindName, s as isEphemeralKind, t as Kind, v as EVENT_ID_BYTES, x as SIGNATURE_BYTES, y as PUBLIC_KEY_BYTES } from "./index-DU9tRFTZ.mjs";
|
|
20
|
+
import { a as Nip07Signer, c as isNip07Available, i as Nip46Transport, l as KeysSigner, n as Nip46SignerOptions, o as WindowNostr, r as Nip46SubscribeOptions, s as getWindowNostr, t as Nip46Signer, u as NoSignerError } from "./index-Tx15HGAD.mjs";
|
|
21
|
+
import { Nip21Error, NostrURI, isNostrURI, parseNostrURI } from "./nips/nip21.mjs";
|
|
20
22
|
import { ReplyTagsOptions, ThreadReferences, buildReplyTags, parseThreadTags, replyTo } from "./nips/nip10.mjs";
|
|
21
23
|
import { isAuthRequired, makeAuthEvent } from "./nips/nip42.mjs";
|
|
22
|
-
import { a as isInsecureRelayUrl, c as RelayError, d as RelayTimeoutError, l as RelayPublishError, o as RelayClosedError, s as RelayConnectionError, u as RelaySuspendedError } from "./index-
|
|
23
|
-
import { a as IndexedDbEventStoreOptions, i as IndexedDbEventStore, n as SqlValue, o as MemoryEventStore, r as SqliteEventStore, t as SqlDriver } from "./index-
|
|
24
|
-
export { type AddressPointer, Bech32MaxSize, Client,
|
|
24
|
+
import { a as isInsecureRelayUrl, c as RelayError, d as RelayTimeoutError, l as RelayPublishError, o as RelayClosedError, s as RelayConnectionError, u as RelaySuspendedError } from "./index-DiXwNn2M.mjs";
|
|
25
|
+
import { a as IndexedDbEventStoreOptions, i as IndexedDbEventStore, n as SqlValue, o as MemoryEventStore, r as SqliteEventStore, t as SqlDriver } from "./index-InQZpHyQ.mjs";
|
|
26
|
+
export { type AddressPointer, Bech32MaxSize, Client, ClientError, type ClientEventMap, type ClientMessage, type ClientOptions, type Closer, type CountResult, CryptoError, type DecodedResult, EVENT_ID_BYTES, type Event, type EventAddress, EventBuilder, type EventPointer, type EventStore, type EventTemplate, EventValidationError, type EventVerifier, type FetchPrivateMessagesOptions, type Filter, Gossip, HexError, IndexedDbEventStore, type IndexedDbEventStoreOptions, type InvalidEventPolicy, Keys, KeysSigner, Kind, type KindClassification, type KindName, type KnownKind, type ListResult, type LoadStyle, type Loaders, MemoryEventStore, MessageError, type NAddr, type NEvent, type NProfile, type NPub, type NSec, type NegentropyItem, Nip07Signer, Nip19Error, Nip21Error, Nip46Signer, type Nip46SignerOptions, type Nip46SubscribeOptions, type Nip46Transport, NoSignerError, NostrError, type NostrSigner, type NostrURI, type NostrUser, type Note, type OutboxBound, OutboxError, OutboxFeed, type OutboxFeedOptions, PUBLIC_KEY_BYTES, Pool, type PoolCountResult, type PoolFetchResult, type PoolOptions, type PoolPublishResult, type PoolSubscribeOptions, type PrivateMessageSendResult, type ProfileMetadata, type ProfilePointer, type PubkeyRoutes, type PublicKey, type PublishResult, type PutResult, ReactiveEventStore, type ReactiveEventStoreOptions, type ReceivedPrivateMessage, Relay, RelayClosedError, RelayConnectionError, RelayError, type RelayEventMap, type RelayFetchEnd, type RelayFetchResult, type RelayListItem, type RelayMarker, type RelayMessage, type RelayOptions, RelayPublishError, RelayStatus, type RelayStatusName, type RelaySubscription, RelaySuspendedError, RelayTimeoutError, type ReplaceableLoadResult, type ReplaceableLoader, type ReplyTagsOptions, type RoutedFilter, SECRET_KEY_BYTES, SIGNATURE_BYTES, SUBSCRIPTION_ID_MAX_CHARS, SecretKey, type SecretKeyInput, type SendPrivateMessageOptions, type SerializedEventVerifier, type SigningBackend, type SqlDriver, type SqlValue, SqliteEventStore, StorageError, type SubscribeOptions, type SubscribePrivateMessagesOptions, type SubscriptionId, SyncDirection, type SyncDirectionName, type SyncOptions, type SyncSummary, Tag, type TagInput, type ThreadReferences, type UnsignedEvent, UrlError, WasmPoisonedError, type Watch, type WindowNostr, assertSubscriptionId, bareNostrUser, buildReplyTags, bytesToHex, canonicalizeFilter, canonicalizeFilters, classifyKind, createEventVerifier, createLoaders, createSubscriptionId, encodeClientMessage, encodeRelayMessage, eventAddress, filterFingerprint, finalizeEvent, formatEventAddress, getDTag, getEventHash, getFilterLimit, getPublicKey, getWindowNostr, groupAuthorsByOutboxRelay, hexToBytes, isAddressableKind, isAuthRequired, isEphemeralKind, isHex32, isHex64, isInsecureRelayUrl, isNip07Available, isNostrURI, isRegularKind, isReplaceableKind, isReplaceableWinner, isTag, itemCompare, makeAuthEvent, matchFilter, matchFilters, mergeCountHll, mergeFilters, naddrEncode, neventEncode, decode as nip19Decode, normalizeURL, noteEncode, nprofileEncode, npubEncode, nsecEncode, parseClientMessage, parseEventAddress, parseNostrURI, parseRelayList, parseRelayMessage, parseThreadTags, publicKeyFromHex, readRelays, relayListEventBuilder, relayListToTags, replyTo, serializeEvent, signEvent, signedMatchesUnsigned, sortEvents, sortedEvents, tagName, tagValue, toSecretKey, useWebSocketImplementation, validateEvent, validateSignedEvent, verifyEvent, writeRelays };
|
package/dist/index.mjs
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { C as SUBSCRIPTION_ID_MAX_CHARS, S as SIGNATURE_BYTES, _ as
|
|
1
|
+
import { C as PUBLIC_KEY_BYTES, E as SUBSCRIPTION_ID_MAX_CHARS, S as EVENT_ID_BYTES, T as SIGNATURE_BYTES, _ as MessageError, a as hexToBytes, b as WasmPoisonedError, g as HexError, h as EventValidationError, i as bytesToHex, m as CryptoError, o as isHex32, s as isHex64, u as normalizeURL, v as NostrError, w as SECRET_KEY_BYTES, y as UrlError } from "./util-yFYzlbrm.mjs";
|
|
2
2
|
import { a as isRegularKind, i as isEphemeralKind, n as classifyKind, o as isReplaceableKind, r as isAddressableKind, t as Kind } from "./kind-Cxwhhkx8.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { a as publicKeyFromHex, i as getPublicKey, n as SecretKey, o as signEvent, r as finalizeEvent, t as Keys } from "./key-
|
|
5
|
-
import { n as verifyEvent, t as createEventVerifier } from "./verifier-
|
|
6
|
-
import { t as EventBuilder } from "./builder-
|
|
3
|
+
import { C as tagValue, S as tagName, a as isReplaceableWinner, b as isTag, d as sortEvents, f as sortedEvents, g as eventAddress, h as Tag, l as serializeEvent, m as validateSignedEvent, n as getEventHash, o as itemCompare, p as validateEvent, u as signedMatchesUnsigned, v as formatEventAddress, x as parseEventAddress, y as getDTag } from "./event-DinQMmJ1.mjs";
|
|
4
|
+
import { a as publicKeyFromHex, i as getPublicKey, n as SecretKey, o as signEvent, r as finalizeEvent, s as toSecretKey, t as Keys } from "./key-bshqfmZL.mjs";
|
|
5
|
+
import { n as verifyEvent, t as createEventVerifier } from "./verifier-BTLOpo1n.mjs";
|
|
6
|
+
import { t as EventBuilder } from "./builder-CdLE4J6O.mjs";
|
|
7
7
|
import { a as matchFilter, i as getFilterLimit, n as canonicalizeFilters, o as matchFilters, r as filterFingerprint, s as mergeFilters, t as canonicalizeFilter } from "./filter-BQl3GlHt.mjs";
|
|
8
|
-
import { a as mergeCountHll, i as encodeRelayMessage, n as createSubscriptionId, o as parseClientMessage, r as encodeClientMessage, s as parseRelayMessage, t as assertSubscriptionId } from "./message-
|
|
9
|
-
import { t as NoSignerError } from "./error-
|
|
10
|
-
import { a as KeysSigner, i as isNip07Available, n as Nip07Signer, r as getWindowNostr, t as Nip46Signer } from "./signer-
|
|
11
|
-
import { Bech32MaxSize, Nip19Error, decode,
|
|
8
|
+
import { a as mergeCountHll, i as encodeRelayMessage, n as createSubscriptionId, o as parseClientMessage, r as encodeClientMessage, s as parseRelayMessage, t as assertSubscriptionId } from "./message-CWLcFTQ1.mjs";
|
|
9
|
+
import { t as NoSignerError } from "./error-gtJvV6YS.mjs";
|
|
10
|
+
import { a as KeysSigner, i as isNip07Available, n as Nip07Signer, r as getWindowNostr, t as Nip46Signer } from "./signer-yW3slDC2.mjs";
|
|
11
|
+
import { Bech32MaxSize, Nip19Error, decode, naddrEncode, neventEncode, noteEncode, nprofileEncode, npubEncode, nsecEncode } from "./nips/nip19.mjs";
|
|
12
|
+
import { Nip21Error, isNostrURI, parseNostrURI } from "./nips/nip21.mjs";
|
|
12
13
|
import { buildReplyTags, parseThreadTags, replyTo } from "./nips/nip10.mjs";
|
|
13
14
|
import { isAuthRequired, makeAuthEvent } from "./nips/nip42.mjs";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
15
|
+
import { parseRelayList, readRelays, relayListEventBuilder, relayListToTags, writeRelays } from "./nips/nip65.mjs";
|
|
16
|
+
import { c as RelayConnectionError, d as RelaySuspendedError, f as RelayTimeoutError, l as RelayError, n as Relay, o as useWebSocketImplementation, r as RelayStatus, s as RelayClosedError, u as RelayPublishError } from "./relay-CvxPiQ_m.mjs";
|
|
17
|
+
import { i as isInsecureRelayUrl, t as Pool } from "./pool-YHRZgcQ3.mjs";
|
|
16
18
|
import "./relay.mjs";
|
|
17
|
-
import { t as Gossip } from "./gossip-
|
|
18
|
-
import { a as
|
|
19
|
-
import { t as StorageError } from "./error-
|
|
20
|
-
import { t as MemoryEventStore } from "./memory-
|
|
21
|
-
import { t as ReactiveEventStore } from "./reactive-
|
|
22
|
-
import {
|
|
23
|
-
import { n as IndexedDbEventStore, t as SqliteEventStore } from "./storage-
|
|
19
|
+
import { t as Gossip } from "./gossip-CcTp9VpU.mjs";
|
|
20
|
+
import { a as bareNostrUser, i as groupAuthorsByOutboxRelay, n as OutboxError, r as OutboxFeed, t as createLoaders } from "./loaders-DD0XAGzw.mjs";
|
|
21
|
+
import { t as StorageError } from "./error-L_QdmSnV.mjs";
|
|
22
|
+
import { t as MemoryEventStore } from "./memory-D_-5-T31.mjs";
|
|
23
|
+
import { t as ReactiveEventStore } from "./reactive-BJRoVHxU.mjs";
|
|
24
|
+
import { n as ClientError, r as SyncDirection, t as Client } from "./client-CILhdfsF.mjs";
|
|
25
|
+
import { n as IndexedDbEventStore, t as SqliteEventStore } from "./storage-CZ52ifcQ.mjs";
|
|
24
26
|
import "./store.mjs";
|
|
25
|
-
export { Bech32MaxSize, Client,
|
|
27
|
+
export { Bech32MaxSize, Client, ClientError, CryptoError, EVENT_ID_BYTES, EventBuilder, EventValidationError, Gossip, HexError, IndexedDbEventStore, Keys, KeysSigner, Kind, MemoryEventStore, MessageError, Nip07Signer, Nip19Error, Nip21Error, Nip46Signer, NoSignerError, NostrError, OutboxError, OutboxFeed, PUBLIC_KEY_BYTES, Pool, ReactiveEventStore, Relay, RelayClosedError, RelayConnectionError, RelayError, RelayPublishError, RelayStatus, RelaySuspendedError, RelayTimeoutError, SECRET_KEY_BYTES, SIGNATURE_BYTES, SUBSCRIPTION_ID_MAX_CHARS, SecretKey, SqliteEventStore, StorageError, SyncDirection, Tag, UrlError, WasmPoisonedError, assertSubscriptionId, bareNostrUser, buildReplyTags, bytesToHex, canonicalizeFilter, canonicalizeFilters, classifyKind, createEventVerifier, createLoaders, createSubscriptionId, encodeClientMessage, encodeRelayMessage, eventAddress, filterFingerprint, finalizeEvent, formatEventAddress, getDTag, getEventHash, getFilterLimit, getPublicKey, getWindowNostr, groupAuthorsByOutboxRelay, hexToBytes, isAddressableKind, isAuthRequired, isEphemeralKind, isHex32, isHex64, isInsecureRelayUrl, isNip07Available, isNostrURI, isRegularKind, isReplaceableKind, isReplaceableWinner, isTag, itemCompare, makeAuthEvent, matchFilter, matchFilters, mergeCountHll, mergeFilters, naddrEncode, neventEncode, decode as nip19Decode, normalizeURL, noteEncode, nprofileEncode, npubEncode, nsecEncode, parseClientMessage, parseEventAddress, parseNostrURI, parseRelayList, parseRelayMessage, parseThreadTags, publicKeyFromHex, readRelays, relayListEventBuilder, relayListToTags, replyTo, serializeEvent, signEvent, signedMatchesUnsigned, sortEvents, sortedEvents, tagName, tagValue, toSecretKey, useWebSocketImplementation, validateEvent, validateSignedEvent, verifyEvent, writeRelays };
|