@1sat/client 0.0.8 → 0.0.9
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/services/OrdfsClient.d.ts +3 -3
- package/dist/services/OrdfsClient.js +3 -3
- package/dist/services/OwnerClient.d.ts +8 -36
- package/dist/services/OwnerClient.d.ts.map +1 -1
- package/dist/services/OwnerClient.js +81 -174
- package/dist/services/OwnerClient.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,9 +17,9 @@ export declare class OrdfsClient extends BaseClient {
|
|
|
17
17
|
*/
|
|
18
18
|
getMetadata(outpoint: string, seq?: number): Promise<OrdfsMetadata>;
|
|
19
19
|
/**
|
|
20
|
-
* Get metadata for multiple outpoints in a single request
|
|
21
|
-
* @param outpoints - Array of outpoints (txid_vout)
|
|
22
|
-
* @returns Map of outpoint to metadata (null if not found)
|
|
20
|
+
* Get metadata for multiple outpoints in a single request.
|
|
21
|
+
* @param outpoints - Array of outpoints (txid_vout). Supports `:seq` suffix (e.g. `txid_0:-2` for origin resolution).
|
|
22
|
+
* @returns Map of outpoint (as provided) to metadata (null if not found)
|
|
23
23
|
*/
|
|
24
24
|
bulkMetadata(outpoints: string[]): Promise<Record<string, OrdfsMetadata | null>>;
|
|
25
25
|
/**
|
|
@@ -23,9 +23,9 @@ export class OrdfsClient extends BaseClient {
|
|
|
23
23
|
return this.request(`/metadata/${path}`);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Get metadata for multiple outpoints in a single request
|
|
27
|
-
* @param outpoints - Array of outpoints (txid_vout)
|
|
28
|
-
* @returns Map of outpoint to metadata (null if not found)
|
|
26
|
+
* Get metadata for multiple outpoints in a single request.
|
|
27
|
+
* @param outpoints - Array of outpoints (txid_vout). Supports `:seq` suffix (e.g. `txid_0:-2` for origin resolution).
|
|
28
|
+
* @returns Map of outpoint (as provided) to metadata (null if not found)
|
|
29
29
|
*/
|
|
30
30
|
async bulkMetadata(outpoints) {
|
|
31
31
|
return this.request('/metadata', {
|
|
@@ -27,58 +27,30 @@ export type TxoStreamEvent = {
|
|
|
27
27
|
export declare class OwnerClient extends BaseClient {
|
|
28
28
|
constructor(baseUrl: string, options?: ClientOptions);
|
|
29
29
|
/**
|
|
30
|
-
* Stream TXOs owned by an address/owner
|
|
30
|
+
* Stream TXOs owned by an address/owner as an async iterator.
|
|
31
31
|
*
|
|
32
32
|
* The stream has three phases:
|
|
33
33
|
* 1. Sync — progress events report blockchain sync status (when refresh=true)
|
|
34
34
|
* 2. Data — each matching TXO is delivered individually
|
|
35
35
|
* 3. Done — signals the stream is complete
|
|
36
|
-
*
|
|
37
|
-
* @param owner - Owner identifier (address, pubkey, or script hash)
|
|
38
|
-
* @param opts - Query options and callbacks
|
|
39
|
-
* @returns Unsubscribe function to close the stream
|
|
40
36
|
*/
|
|
41
37
|
getTxos(owner: string, opts?: TxoQueryOptions & {
|
|
42
38
|
refresh?: boolean;
|
|
43
|
-
|
|
44
|
-
onTxo?: (output: IndexedOutput) => void;
|
|
45
|
-
onDone?: (outputs: IndexedOutput[]) => void;
|
|
46
|
-
onError?: (error: Error) => void;
|
|
47
|
-
}): () => void;
|
|
48
|
-
/**
|
|
49
|
-
* Stream TXOs as an async iterator yielding typed events.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* for await (const event of client.owner.getTxosIterator(address)) {
|
|
54
|
-
* if (event.type === 'sync') updateProgress(event.data)
|
|
55
|
-
* if (event.type === 'txo') addOutput(event.data)
|
|
56
|
-
* }
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
getTxosIterator(owner: string, opts?: TxoQueryOptions & {
|
|
60
|
-
refresh?: boolean;
|
|
61
|
-
}): AsyncGenerator<TxoStreamEvent, void, unknown>;
|
|
39
|
+
}): AsyncGenerator<TxoStreamEvent>;
|
|
62
40
|
/**
|
|
63
41
|
* Get balance for an address/owner
|
|
64
42
|
*/
|
|
65
43
|
getBalance(owner: string): Promise<BalanceResponse>;
|
|
66
44
|
/**
|
|
67
|
-
* Sync outputs for owner(s) via
|
|
68
|
-
* The server merges results from all owners in score order
|
|
45
|
+
* Sync outputs for owner(s) via streaming fetch.
|
|
46
|
+
* The server merges results from all owners in score order,
|
|
47
|
+
* triggers lazy indexing (JungleBus sync), and streams results.
|
|
69
48
|
*
|
|
70
49
|
* @param owners - Array of addresses/owners to sync
|
|
71
|
-
* @param onOutput - Callback for each output
|
|
72
50
|
* @param from - Starting score (for pagination/resumption)
|
|
73
|
-
* @param
|
|
74
|
-
* @
|
|
75
|
-
* @returns Unsubscribe function
|
|
76
|
-
*/
|
|
77
|
-
sync(owners: string[], onOutput: (output: SyncOutput) => void, from?: number, onDone?: () => void, onError?: (error: Error) => void): () => void;
|
|
78
|
-
/**
|
|
79
|
-
* Sync outputs as an async iterator.
|
|
80
|
-
* Yields SyncOutput objects until the stream is done.
|
|
51
|
+
* @param onProgress - Optional callback for progress updates
|
|
52
|
+
* @yields SyncOutput for each output
|
|
81
53
|
*/
|
|
82
|
-
|
|
54
|
+
sync(owners: string[], from?: number, onProgress?: (progress: SyncProgress) => void): AsyncGenerator<SyncOutput>;
|
|
83
55
|
}
|
|
84
56
|
//# sourceMappingURL=OwnerClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerClient.d.ts","sourceRoot":"","sources":["../../src/services/OwnerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACV,YAAY,EACZ,eAAe,EACf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,cAAc,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,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
|
|
|
1
1
|
import { BaseClient } from './BaseClient';
|
|
2
|
+
/**
|
|
3
|
+
* Parse SSE events from a fetch Response body.
|
|
4
|
+
* Works in browsers, Node, and Bun — no EventSource dependency.
|
|
5
|
+
*/
|
|
6
|
+
async function* parseSSE(response) {
|
|
7
|
+
const reader = response.body?.getReader();
|
|
8
|
+
if (!reader)
|
|
9
|
+
throw new Error('Response body is not readable');
|
|
10
|
+
const decoder = new TextDecoder();
|
|
11
|
+
let buffer = '';
|
|
12
|
+
try {
|
|
13
|
+
while (true) {
|
|
14
|
+
const { done, value } = await reader.read();
|
|
15
|
+
if (done)
|
|
16
|
+
break;
|
|
17
|
+
buffer += decoder.decode(value, { stream: true });
|
|
18
|
+
// Split on double newline (SSE event boundary)
|
|
19
|
+
const parts = buffer.split('\n\n');
|
|
20
|
+
// Last part is incomplete — keep it in buffer
|
|
21
|
+
buffer = parts.pop() || '';
|
|
22
|
+
for (const part of parts) {
|
|
23
|
+
if (!part.trim())
|
|
24
|
+
continue;
|
|
25
|
+
const event = { data: '' };
|
|
26
|
+
for (const line of part.split('\n')) {
|
|
27
|
+
if (line.startsWith('data: ')) {
|
|
28
|
+
event.data = line.slice(6);
|
|
29
|
+
}
|
|
30
|
+
else if (line.startsWith('event: ')) {
|
|
31
|
+
event.event = line.slice(7);
|
|
32
|
+
}
|
|
33
|
+
else if (line.startsWith('id: ')) {
|
|
34
|
+
event.id = line.slice(4);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
yield event;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
reader.releaseLock();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
2
45
|
/**
|
|
3
46
|
* Client for /1sat/owner/* routes.
|
|
4
47
|
* Provides owner (address) queries and sync.
|
|
@@ -13,18 +56,14 @@ export class OwnerClient extends BaseClient {
|
|
|
13
56
|
super(`${baseUrl}/1sat/owner`, options);
|
|
14
57
|
}
|
|
15
58
|
/**
|
|
16
|
-
* Stream TXOs owned by an address/owner
|
|
59
|
+
* Stream TXOs owned by an address/owner as an async iterator.
|
|
17
60
|
*
|
|
18
61
|
* The stream has three phases:
|
|
19
62
|
* 1. Sync — progress events report blockchain sync status (when refresh=true)
|
|
20
63
|
* 2. Data — each matching TXO is delivered individually
|
|
21
64
|
* 3. Done — signals the stream is complete
|
|
22
|
-
*
|
|
23
|
-
* @param owner - Owner identifier (address, pubkey, or script hash)
|
|
24
|
-
* @param opts - Query options and callbacks
|
|
25
|
-
* @returns Unsubscribe function to close the stream
|
|
26
65
|
*/
|
|
27
|
-
getTxos(owner, opts) {
|
|
66
|
+
async *getTxos(owner, opts) {
|
|
28
67
|
const qs = this.buildQueryString({
|
|
29
68
|
tags: opts?.tags,
|
|
30
69
|
from: opts?.from,
|
|
@@ -38,110 +77,26 @@ export class OwnerClient extends BaseClient {
|
|
|
38
77
|
refresh: opts?.refresh,
|
|
39
78
|
});
|
|
40
79
|
const url = `${this.baseUrl}/${owner}/txos${qs}`;
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
catch (e) {
|
|
49
|
-
opts?.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
eventSource.addEventListener('txo', (event) => {
|
|
53
|
-
try {
|
|
54
|
-
const output = JSON.parse(event.data);
|
|
55
|
-
collected.push(output);
|
|
56
|
-
opts?.onTxo?.(output);
|
|
80
|
+
const response = await this.fetchFn(url);
|
|
81
|
+
if (!response.ok) {
|
|
82
|
+
throw new Error(`SSE request failed: ${response.status}`);
|
|
83
|
+
}
|
|
84
|
+
for await (const sse of parseSSE(response)) {
|
|
85
|
+
if (sse.event === 'sync') {
|
|
86
|
+
yield { type: 'sync', data: JSON.parse(sse.data) };
|
|
57
87
|
}
|
|
58
|
-
|
|
59
|
-
|
|
88
|
+
else if (sse.event === 'txo') {
|
|
89
|
+
yield { type: 'txo', data: JSON.parse(sse.data) };
|
|
60
90
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
opts?.onDone?.(collected);
|
|
65
|
-
});
|
|
66
|
-
eventSource.addEventListener('error', (event) => {
|
|
67
|
-
try {
|
|
68
|
-
const data = event.data;
|
|
69
|
-
const msg = data ? String(data) : 'SSE stream error';
|
|
70
|
-
opts?.onError?.(new Error(msg));
|
|
91
|
+
else if (sse.event === 'done') {
|
|
92
|
+
yield { type: 'done' };
|
|
93
|
+
return;
|
|
71
94
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
eventSource.onerror = () => {
|
|
77
|
-
eventSource.close();
|
|
78
|
-
opts?.onError?.(new Error('SSE connection error'));
|
|
79
|
-
};
|
|
80
|
-
return () => {
|
|
81
|
-
eventSource.close();
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Stream TXOs as an async iterator yielding typed events.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```ts
|
|
89
|
-
* for await (const event of client.owner.getTxosIterator(address)) {
|
|
90
|
-
* if (event.type === 'sync') updateProgress(event.data)
|
|
91
|
-
* if (event.type === 'txo') addOutput(event.data)
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
async *getTxosIterator(owner, opts) {
|
|
96
|
-
const events = [];
|
|
97
|
-
let done = false;
|
|
98
|
-
let error = null;
|
|
99
|
-
let resolve = null;
|
|
100
|
-
const unsubscribe = this.getTxos(owner, {
|
|
101
|
-
...opts,
|
|
102
|
-
onSync: (progress) => {
|
|
103
|
-
events.push({ type: 'sync', data: progress });
|
|
104
|
-
resolve?.();
|
|
105
|
-
},
|
|
106
|
-
onTxo: (output) => {
|
|
107
|
-
events.push({ type: 'txo', data: output });
|
|
108
|
-
resolve?.();
|
|
109
|
-
},
|
|
110
|
-
onDone: () => {
|
|
111
|
-
done = true;
|
|
112
|
-
resolve?.();
|
|
113
|
-
},
|
|
114
|
-
onError: (e) => {
|
|
115
|
-
error = e;
|
|
116
|
-
resolve?.();
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
try {
|
|
120
|
-
while (!done && !error) {
|
|
121
|
-
if (events.length > 0) {
|
|
122
|
-
const event = events.shift();
|
|
123
|
-
if (event)
|
|
124
|
-
yield event;
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
await new Promise((r) => {
|
|
128
|
-
resolve = r;
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
// Yield remaining events
|
|
133
|
-
while (events.length > 0) {
|
|
134
|
-
const event = events.shift();
|
|
135
|
-
if (event)
|
|
136
|
-
yield event;
|
|
137
|
-
}
|
|
138
|
-
if (error) {
|
|
139
|
-
yield { type: 'error', error };
|
|
95
|
+
else if (sse.event === 'error') {
|
|
96
|
+
yield { type: 'error', error: new Error(sse.data) };
|
|
97
|
+
return;
|
|
140
98
|
}
|
|
141
99
|
}
|
|
142
|
-
finally {
|
|
143
|
-
unsubscribe();
|
|
144
|
-
}
|
|
145
100
|
}
|
|
146
101
|
/**
|
|
147
102
|
* Get balance for an address/owner
|
|
@@ -150,17 +105,16 @@ export class OwnerClient extends BaseClient {
|
|
|
150
105
|
return this.request(`/${owner}/balance`);
|
|
151
106
|
}
|
|
152
107
|
/**
|
|
153
|
-
* Sync outputs for owner(s) via
|
|
154
|
-
* The server merges results from all owners in score order
|
|
108
|
+
* Sync outputs for owner(s) via streaming fetch.
|
|
109
|
+
* The server merges results from all owners in score order,
|
|
110
|
+
* triggers lazy indexing (JungleBus sync), and streams results.
|
|
155
111
|
*
|
|
156
112
|
* @param owners - Array of addresses/owners to sync
|
|
157
|
-
* @param onOutput - Callback for each output
|
|
158
113
|
* @param from - Starting score (for pagination/resumption)
|
|
159
|
-
* @param
|
|
160
|
-
* @
|
|
161
|
-
* @returns Unsubscribe function
|
|
114
|
+
* @param onProgress - Optional callback for progress updates
|
|
115
|
+
* @yields SyncOutput for each output
|
|
162
116
|
*/
|
|
163
|
-
sync(owners,
|
|
117
|
+
async *sync(owners, from, onProgress) {
|
|
164
118
|
const params = new URLSearchParams();
|
|
165
119
|
for (const owner of owners) {
|
|
166
120
|
params.append('owner', owner);
|
|
@@ -169,73 +123,26 @@ export class OwnerClient extends BaseClient {
|
|
|
169
123
|
params.set('from', String(from));
|
|
170
124
|
}
|
|
171
125
|
const url = `${this.baseUrl}/sync?${params.toString()}`;
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
126
|
+
const response = await this.fetchFn(url);
|
|
127
|
+
if (!response.ok) {
|
|
128
|
+
throw new Error(`Sync request failed: ${response.status}`);
|
|
129
|
+
}
|
|
130
|
+
for await (const sse of parseSSE(response)) {
|
|
131
|
+
if (sse.event === 'done') {
|
|
132
|
+
return;
|
|
180
133
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
eventSource.close();
|
|
184
|
-
onDone?.();
|
|
185
|
-
});
|
|
186
|
-
eventSource.onerror = () => {
|
|
187
|
-
eventSource.close();
|
|
188
|
-
onError?.(new Error('SSE connection error'));
|
|
189
|
-
};
|
|
190
|
-
return () => {
|
|
191
|
-
eventSource.close();
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Sync outputs as an async iterator.
|
|
196
|
-
* Yields SyncOutput objects until the stream is done.
|
|
197
|
-
*/
|
|
198
|
-
async *syncIterator(owners, from) {
|
|
199
|
-
const outputs = [];
|
|
200
|
-
let done = false;
|
|
201
|
-
let error = null;
|
|
202
|
-
let resolve = null;
|
|
203
|
-
const unsubscribe = this.sync(owners, (output) => {
|
|
204
|
-
outputs.push(output);
|
|
205
|
-
resolve?.();
|
|
206
|
-
}, from, () => {
|
|
207
|
-
done = true;
|
|
208
|
-
resolve?.();
|
|
209
|
-
}, (e) => {
|
|
210
|
-
error = e;
|
|
211
|
-
resolve?.();
|
|
212
|
-
});
|
|
213
|
-
try {
|
|
214
|
-
while (!done && !error) {
|
|
215
|
-
if (outputs.length > 0) {
|
|
216
|
-
const output = outputs.shift();
|
|
217
|
-
if (output)
|
|
218
|
-
yield output;
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
await new Promise((r) => {
|
|
222
|
-
resolve = r;
|
|
223
|
-
});
|
|
224
|
-
}
|
|
134
|
+
if (sse.event === 'error') {
|
|
135
|
+
throw new Error(sse.data);
|
|
225
136
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (output)
|
|
230
|
-
yield output;
|
|
137
|
+
if (sse.event === 'sync' && onProgress) {
|
|
138
|
+
onProgress(JSON.parse(sse.data));
|
|
139
|
+
continue;
|
|
231
140
|
}
|
|
232
|
-
|
|
233
|
-
|
|
141
|
+
// Default message events (no event: prefix) contain SyncOutput data
|
|
142
|
+
if (!sse.event && sse.data) {
|
|
143
|
+
yield JSON.parse(sse.data);
|
|
234
144
|
}
|
|
235
145
|
}
|
|
236
|
-
finally {
|
|
237
|
-
unsubscribe();
|
|
238
|
-
}
|
|
239
146
|
}
|
|
240
147
|
}
|
|
241
148
|
//# sourceMappingURL=OwnerClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerClient.js","sourceRoot":"","sources":["../../src/services/OwnerClient.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"OwnerClient.js","sourceRoot":"","sources":["../../src/services/OwnerClient.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAoBzC;;;GAGG;AACH,KAAK,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAkB;IAC1C,MAAM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