@tari-project/ootle-indexer 0.1.0 → 0.3.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/index.d.ts +6 -2
- package/dist/index.js +164 -37
- package/package.json +12 -4
package/dist/index.d.ts
CHANGED
|
@@ -7,11 +7,12 @@ import { IndexerGetTransactionResultResponse } from '@tari-project/ootle-ts-bind
|
|
|
7
7
|
import { IndexerSubmitTransactionResponse } from '@tari-project/ootle-ts-bindings';
|
|
8
8
|
import { ListRecentTransactionsRequest } from '@tari-project/ootle-ts-bindings';
|
|
9
9
|
import { ListRecentTransactionsResponse } from '@tari-project/ootle-ts-bindings';
|
|
10
|
+
import { ListTemplatesResponse } from '@tari-project/ootle-ts-bindings';
|
|
10
11
|
import { Network } from '@tari-project/ootle';
|
|
11
12
|
import { Provider } from '@tari-project/ootle';
|
|
12
13
|
import { SubstateId } from '@tari-project/ootle-ts-bindings';
|
|
13
14
|
import { SubstateRequirement } from '@tari-project/ootle-ts-bindings';
|
|
14
|
-
import {
|
|
15
|
+
import { TemplateMeta } from '@tari-project/ootle-ts-bindings';
|
|
15
16
|
import { TransactionEntry } from '@tari-project/ootle-ts-bindings';
|
|
16
17
|
import { TransactionEnvelope } from '@tari-project/ootle-ts-bindings';
|
|
17
18
|
import { transports } from '@tari-project/indexer-client';
|
|
@@ -45,6 +46,7 @@ export declare class IndexerProvider implements Provider {
|
|
|
45
46
|
*/
|
|
46
47
|
stopWatcher(): void;
|
|
47
48
|
network(): Network;
|
|
49
|
+
getCurrentEpoch(): Promise<number>;
|
|
48
50
|
getSubstate(substateId: string, version?: number | null): Promise<IndexerGetSubstateResponse>;
|
|
49
51
|
getStealthUtxo(resourceAddress: string, commitment: Uint8Array): Promise<IndexerGetSubstateResponse | null>;
|
|
50
52
|
fetchSubstates(requests: SubstateId[]): Promise<GetSubstatesResponse>;
|
|
@@ -72,6 +74,8 @@ export declare interface IndexerSseEvent {
|
|
|
72
74
|
data: unknown;
|
|
73
75
|
}
|
|
74
76
|
|
|
77
|
+
export { ListTemplatesResponse }
|
|
78
|
+
|
|
75
79
|
/**
|
|
76
80
|
* Opens a persistent SSE connection to `url` using `fetch` and yields
|
|
77
81
|
* parsed events as an async generator.
|
|
@@ -202,7 +206,7 @@ declare type SseFinalizedDecision = {
|
|
|
202
206
|
decision: "Indeterminate";
|
|
203
207
|
};
|
|
204
208
|
|
|
205
|
-
export {
|
|
209
|
+
export { TemplateMeta }
|
|
206
210
|
|
|
207
211
|
export { TransactionEntry }
|
|
208
212
|
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,88 @@ var l = Object.defineProperty, u = (e5, t3) => {
|
|
|
9
9
|
enumerable: true
|
|
10
10
|
});
|
|
11
11
|
return t3 || l(n2, Symbol.toStringTag, { value: "Module" }), n2;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
function d(e5) {
|
|
14
|
+
return JSON.stringify(e5, f);
|
|
15
|
+
}
|
|
16
|
+
function f(e5, t3) {
|
|
17
|
+
return typeof t3 == "bigint" ? t3.toString() : t3;
|
|
18
|
+
}
|
|
19
|
+
function p(e5, t3) {
|
|
20
|
+
let n2 = new AbortController();
|
|
21
|
+
return t3.signal && (t3.signal.aborted ? n2.abort() : t3.signal.addEventListener("abort", () => n2.abort(), { once: true })), (async () => {
|
|
22
|
+
let r2 = await fetch(e5, {
|
|
23
|
+
method: "GET",
|
|
24
|
+
headers: { Accept: "text/event-stream" },
|
|
25
|
+
signal: n2.signal
|
|
26
|
+
});
|
|
27
|
+
if (!r2.ok) {
|
|
28
|
+
let e6 = await r2.text();
|
|
29
|
+
throw Error(`HTTP ${r2.status}: ${r2.statusText}${e6 ? ` - ${e6}` : ""}`);
|
|
30
|
+
}
|
|
31
|
+
if (!r2.body) throw Error("Response body is not readable");
|
|
32
|
+
let i2 = r2.body.getReader(), a2 = new TextDecoder(), o2 = "", s2 = "", c2 = [], l2, u2, d2 = () => {
|
|
33
|
+
if (c2.length === 0) {
|
|
34
|
+
s2 = "", l2 = void 0, u2 = void 0;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
let e6 = {
|
|
38
|
+
event: s2 || "message",
|
|
39
|
+
data: c2.join("\n"),
|
|
40
|
+
id: l2,
|
|
41
|
+
retry: u2
|
|
42
|
+
};
|
|
43
|
+
t3.onEvent(e6), s2 = "", c2 = [], l2 = void 0, u2 = void 0;
|
|
44
|
+
}, f2 = (e6) => {
|
|
45
|
+
if (e6 === "") {
|
|
46
|
+
d2();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (e6.startsWith(":")) return;
|
|
50
|
+
let t4 = e6.indexOf(":"), n3, r3;
|
|
51
|
+
switch (t4 === -1 ? (n3 = e6, r3 = "") : (n3 = e6.slice(0, t4), r3 = e6.slice(t4 + 1), r3.startsWith(" ") && (r3 = r3.slice(1))), n3) {
|
|
52
|
+
case "event":
|
|
53
|
+
s2 = r3;
|
|
54
|
+
break;
|
|
55
|
+
case "data":
|
|
56
|
+
c2.push(r3);
|
|
57
|
+
break;
|
|
58
|
+
case "id":
|
|
59
|
+
l2 = r3;
|
|
60
|
+
break;
|
|
61
|
+
case "retry": {
|
|
62
|
+
let e7 = parseInt(r3, 10);
|
|
63
|
+
isNaN(e7) || (u2 = e7);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
try {
|
|
69
|
+
for (; ; ) {
|
|
70
|
+
let { done: e6, value: t4 } = await i2.read();
|
|
71
|
+
if (e6) break;
|
|
72
|
+
o2 += a2.decode(t4, { stream: true });
|
|
73
|
+
let n3 = /\r\n|\r|\n/, r3;
|
|
74
|
+
for (; (r3 = n3.exec(o2)) !== null; ) {
|
|
75
|
+
let e7 = o2.slice(0, r3.index);
|
|
76
|
+
o2 = o2.slice(r3.index + r3[0].length), f2(e7);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
o2.length > 0 && (f2(o2), d2());
|
|
80
|
+
} finally {
|
|
81
|
+
i2.releaseLock();
|
|
82
|
+
}
|
|
83
|
+
})().then(() => {
|
|
84
|
+
var _a;
|
|
85
|
+
return (_a = t3.onClose) == null ? void 0 : _a.call(t3);
|
|
86
|
+
}).catch((e6) => {
|
|
87
|
+
var _a, _b;
|
|
88
|
+
n2.signal.aborted ? (_a = t3.onClose) == null ? void 0 : _a.call(t3) : (_b = t3.onError) == null ? void 0 : _b.call(t3, e6 instanceof Error ? e6 : Error(String(e6)));
|
|
89
|
+
}), { close() {
|
|
90
|
+
n2.abort();
|
|
91
|
+
} };
|
|
92
|
+
}
|
|
93
|
+
var m = class e2 {
|
|
13
94
|
constructor(e5) {
|
|
14
95
|
__publicField(this, "url");
|
|
15
96
|
this.url = e5;
|
|
@@ -48,6 +129,17 @@ var l = Object.defineProperty, u = (e5, t3) => {
|
|
|
48
129
|
body: t3
|
|
49
130
|
}, n2);
|
|
50
131
|
}
|
|
132
|
+
sendSse(e5, t3, n2) {
|
|
133
|
+
e5.startsWith("/") && (e5 = e5.slice(1));
|
|
134
|
+
let r2 = `${this.url}/${e5}`;
|
|
135
|
+
if (typeof t3 == "object" && t3) {
|
|
136
|
+
let e6 = new URLSearchParams();
|
|
137
|
+
for (let [n4, r3] of Object.entries(t3)) r3 != null && e6.append(n4, r3.toString());
|
|
138
|
+
let n3 = e6.toString();
|
|
139
|
+
n3.length > 0 && (r2 += `?${n3}`);
|
|
140
|
+
}
|
|
141
|
+
return p(r2, n2);
|
|
142
|
+
}
|
|
51
143
|
async sendRequest(e5, t3, n2) {
|
|
52
144
|
let r2 = new AbortController(), i2 = r2.signal, a2 = (n2 == null ? void 0 : n2.timeout_millis) ? setTimeout(() => {
|
|
53
145
|
r2.abort("Timeout");
|
|
@@ -59,7 +151,7 @@ var l = Object.defineProperty, u = (e5, t3) => {
|
|
|
59
151
|
for (let [n3, r3] of Object.entries(t3.params)) r3 != null && e6.append(n3, r3.toString());
|
|
60
152
|
o2 = e6;
|
|
61
153
|
}
|
|
62
|
-
typeof t3.body == "object" && t3.body !== null && (t3.headers || (t3.headers = {}), t3.headers["Content-Type"] = "application/json", t3.body =
|
|
154
|
+
typeof t3.body == "object" && t3.body !== null && (t3.headers || (t3.headers = {}), t3.headers["Content-Type"] = "application/json", t3.body = d(t3.body));
|
|
63
155
|
let s2 = `${this.url}/${e5}`;
|
|
64
156
|
o2 && o2.toString().length > 0 && (s2 += `?${o2.toString()}`);
|
|
65
157
|
let c2 = await fetch(s2, {
|
|
@@ -74,17 +166,16 @@ var l = Object.defineProperty, u = (e5, t3) => {
|
|
|
74
166
|
if (l2.error) throw Error(`${l2.error.code}: ${l2.error.message}`);
|
|
75
167
|
return l2;
|
|
76
168
|
}
|
|
77
|
-
},
|
|
169
|
+
}, h = /* @__PURE__ */ u({ FetchTransport: () => m }), g = class e3 {
|
|
78
170
|
constructor(e5) {
|
|
79
171
|
__publicField(this, "transport");
|
|
80
|
-
__publicField(this, "p");
|
|
81
172
|
this.transport = e5;
|
|
82
173
|
}
|
|
83
174
|
static new(t3) {
|
|
84
175
|
return new e3(t3);
|
|
85
176
|
}
|
|
86
177
|
static usingFetchTransport(t3) {
|
|
87
|
-
return e3.new(
|
|
178
|
+
return e3.new(m.new(t3));
|
|
88
179
|
}
|
|
89
180
|
getTransport() {
|
|
90
181
|
return this.transport;
|
|
@@ -107,6 +198,9 @@ var l = Object.defineProperty, u = (e5, t3) => {
|
|
|
107
198
|
getConnections() {
|
|
108
199
|
return this.transport.sendGet("network/connections", {});
|
|
109
200
|
}
|
|
201
|
+
listValidators(e5 = {}) {
|
|
202
|
+
return this.transport.sendGet("validators", e5);
|
|
203
|
+
}
|
|
110
204
|
getNonFungibles(e5) {
|
|
111
205
|
return this.transport.sendGet("non-fungibles", e5);
|
|
112
206
|
}
|
|
@@ -119,6 +213,9 @@ var l = Object.defineProperty, u = (e5, t3) => {
|
|
|
119
213
|
submitTransaction(e5) {
|
|
120
214
|
return this.transport.sendPost("transactions", e5);
|
|
121
215
|
}
|
|
216
|
+
getTransaction(e5) {
|
|
217
|
+
return this.transport.sendGet(`transactions/${encodeURIComponent(e5)}`, {});
|
|
218
|
+
}
|
|
122
219
|
getTransactionResult(e5) {
|
|
123
220
|
return this.transport.sendGet(`transactions/${encodeURIComponent(e5)}/result`, {});
|
|
124
221
|
}
|
|
@@ -137,17 +234,44 @@ var l = Object.defineProperty, u = (e5, t3) => {
|
|
|
137
234
|
templatesGet(e5) {
|
|
138
235
|
return this.transport.sendGet(`templates/${encodeURIComponent(e5)}`, {});
|
|
139
236
|
}
|
|
140
|
-
|
|
141
|
-
return this.transport.sendGet("templates", { limit: e5 });
|
|
142
|
-
}
|
|
143
|
-
templatesListAuthored(e5) {
|
|
144
|
-
return this.transport.sendPost("templates", e5);
|
|
237
|
+
templatesListCached(e5 = 0) {
|
|
238
|
+
return this.transport.sendGet("templates/cached", { limit: e5 });
|
|
145
239
|
}
|
|
146
240
|
resourcesGet(e5) {
|
|
147
241
|
return this.transport.sendGet(`resources/${encodeURIComponent(e5)}`, {});
|
|
148
242
|
}
|
|
243
|
+
resourceGetTari() {
|
|
244
|
+
return this.transport.sendGet("resources/tari", {});
|
|
245
|
+
}
|
|
246
|
+
getNetworkEconomics() {
|
|
247
|
+
return this.transport.sendGet("network/economics", {});
|
|
248
|
+
}
|
|
249
|
+
listWatchedTemplates() {
|
|
250
|
+
return this.transport.sendGet("templates/watched", {});
|
|
251
|
+
}
|
|
252
|
+
listWatchedSubstates(e5) {
|
|
253
|
+
return this.transport.sendGet("substates/watched", e5);
|
|
254
|
+
}
|
|
255
|
+
streamTransactionEvents(e5, t3) {
|
|
256
|
+
return this.transport.sendSse("transactions/events/stream", e5, {
|
|
257
|
+
onEvent(e6) {
|
|
258
|
+
var _a;
|
|
259
|
+
let n2;
|
|
260
|
+
try {
|
|
261
|
+
n2 = JSON.parse(e6.data);
|
|
262
|
+
} catch (e7) {
|
|
263
|
+
(_a = t3.onError) == null ? void 0 : _a.call(t3, /* @__PURE__ */ Error(`Failed to parse TransactionEvent: ${e7}`));
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
e6.id && (n2.id = parseInt(e6.id, 10)), t3.onEvent(n2);
|
|
267
|
+
},
|
|
268
|
+
onError: t3.onError,
|
|
269
|
+
onClose: t3.onClose,
|
|
270
|
+
signal: t3.signal
|
|
271
|
+
});
|
|
272
|
+
}
|
|
149
273
|
};
|
|
150
|
-
function
|
|
274
|
+
function _(e5) {
|
|
151
275
|
let t3 = [], n2 = e5.split(/\n\n|\r\n\r\n/), r2 = n2.pop() ?? "";
|
|
152
276
|
for (let e6 of n2) {
|
|
153
277
|
if (!e6.trim()) continue;
|
|
@@ -169,7 +293,7 @@ function m(e5) {
|
|
|
169
293
|
remainder: r2
|
|
170
294
|
};
|
|
171
295
|
}
|
|
172
|
-
async function*
|
|
296
|
+
async function* v(t3, n2) {
|
|
173
297
|
for (; !n2.aborted; ) {
|
|
174
298
|
let r2 = new AbortController(), i2 = () => r2.abort();
|
|
175
299
|
n2.addEventListener("abort", i2, { once: true });
|
|
@@ -194,7 +318,7 @@ async function* h(t3, n2) {
|
|
|
194
318
|
let { done: e5, value: t4 } = await a2.read();
|
|
195
319
|
if (e5) break;
|
|
196
320
|
s2 += o2.decode(t4, { stream: true });
|
|
197
|
-
let { events: n3, remainder: r3 } =
|
|
321
|
+
let { events: n3, remainder: r3 } = _(s2);
|
|
198
322
|
s2 = r3;
|
|
199
323
|
for (let e6 of n3) yield e6;
|
|
200
324
|
}
|
|
@@ -214,7 +338,7 @@ async function* h(t3, n2) {
|
|
|
214
338
|
}
|
|
215
339
|
}
|
|
216
340
|
}
|
|
217
|
-
var
|
|
341
|
+
var y = 500, b = 3e3, x = class {
|
|
218
342
|
constructor(e5) {
|
|
219
343
|
__publicField(this, "baseUrl");
|
|
220
344
|
__publicField(this, "pending", /* @__PURE__ */ new Map());
|
|
@@ -233,7 +357,7 @@ var g = 500, _ = 3e3, v = class {
|
|
|
233
357
|
this.pending.clear();
|
|
234
358
|
}
|
|
235
359
|
watch(e5, t3, n2 = 32e3) {
|
|
236
|
-
return this.start(), new
|
|
360
|
+
return this.start(), new S(e5, this, t3, n2);
|
|
237
361
|
}
|
|
238
362
|
register(e5) {
|
|
239
363
|
return new Promise((t3, n2) => {
|
|
@@ -248,7 +372,7 @@ var g = 500, _ = 3e3, v = class {
|
|
|
248
372
|
}
|
|
249
373
|
async run(e5) {
|
|
250
374
|
let t3 = `${this.baseUrl}/events`;
|
|
251
|
-
for await (let n2 of
|
|
375
|
+
for await (let n2 of v(t3, e5)) {
|
|
252
376
|
if (n2.type !== "TransactionFinalized") continue;
|
|
253
377
|
let e6 = n2.data, t4 = this.pending.get(e6.transaction_id);
|
|
254
378
|
if (!t4) continue;
|
|
@@ -264,7 +388,7 @@ var g = 500, _ = 3e3, v = class {
|
|
|
264
388
|
} else t4.resolve({ decision: "Indeterminate" });
|
|
265
389
|
}
|
|
266
390
|
}
|
|
267
|
-
},
|
|
391
|
+
}, S = class {
|
|
268
392
|
constructor(e5, t3, n2, r2) {
|
|
269
393
|
__publicField(this, "txId");
|
|
270
394
|
__publicField(this, "watcher");
|
|
@@ -291,7 +415,7 @@ var g = 500, _ = 3e3, v = class {
|
|
|
291
415
|
r2,
|
|
292
416
|
this.cancellation.promise
|
|
293
417
|
]);
|
|
294
|
-
if (n2 !== null && clearTimeout(n2), i3 === "sse-timeout") return await Promise.race([this.restPollUntilFinal(Date.now() +
|
|
418
|
+
if (n2 !== null && clearTimeout(n2), i3 === "sse-timeout") return await Promise.race([this.restPollUntilFinal(Date.now() + b, o2.signal, b), a2]);
|
|
295
419
|
if (i3.decision === "Indeterminate") return await Promise.race([this.restPollUntilFinal(t3, o2.signal, 0), a2]);
|
|
296
420
|
if (i3.decision === "Commit") return { outcome: "Commit" };
|
|
297
421
|
let s2 = await this.client.getTransactionResult(this.txId);
|
|
@@ -327,7 +451,7 @@ var g = 500, _ = 3e3, v = class {
|
|
|
327
451
|
if (e6) return e6.outcome === "Commit" ? { outcome: "Commit" } : this.throwFromReceipt(r3, e6.reason ?? "");
|
|
328
452
|
}
|
|
329
453
|
if (Date.now() >= e5) break;
|
|
330
|
-
await this.delay(
|
|
454
|
+
await this.delay(y, t3);
|
|
331
455
|
} while (Date.now() < e5 && !t3.aborted);
|
|
332
456
|
if (t3.aborted) throw new n(`Wait for transaction ${this.txId} was cancelled`);
|
|
333
457
|
let s2 = this.timeoutMs + r2, c2 = r2 > 0 ? ` (incl. ${r2}ms grace)` : "";
|
|
@@ -358,11 +482,11 @@ var g = 500, _ = 3e3, v = class {
|
|
|
358
482
|
return this.client.getTransactionResult(this.txId);
|
|
359
483
|
}
|
|
360
484
|
};
|
|
361
|
-
function
|
|
485
|
+
function C(e5) {
|
|
362
486
|
let t3 = e5 instanceof Error ? e5.message : String(e5);
|
|
363
487
|
return /not found/i.test(t3) || t3.includes("404");
|
|
364
488
|
}
|
|
365
|
-
var
|
|
489
|
+
var w = class t2 {
|
|
366
490
|
constructor(e5, t3, n2, r2) {
|
|
367
491
|
__publicField(this, "client");
|
|
368
492
|
__publicField(this, "_network");
|
|
@@ -372,14 +496,14 @@ var x = class t2 {
|
|
|
372
496
|
this.client = e5, this._network = t3, this._url = n2, this.defaultTransactionTimeoutMs = r2;
|
|
373
497
|
}
|
|
374
498
|
static async connect(e5) {
|
|
375
|
-
let n2 =
|
|
499
|
+
let n2 = g.usingFetchTransport(e5.url);
|
|
376
500
|
return await n2.identityGet(), new t2(n2, e5.network, e5.url, e5.defaultTransactionTimeoutMs ?? 6e4);
|
|
377
501
|
}
|
|
378
502
|
getClient() {
|
|
379
503
|
return this.client;
|
|
380
504
|
}
|
|
381
505
|
watchTransactionSSE(e5, t3) {
|
|
382
|
-
return this._watcher || (this._watcher = new
|
|
506
|
+
return this._watcher || (this._watcher = new x(this._url), this._watcher.start()), this._watcher.watch(e5, this.client, t3 ?? this.defaultTransactionTimeoutMs);
|
|
383
507
|
}
|
|
384
508
|
stopWatcher() {
|
|
385
509
|
var _a;
|
|
@@ -388,6 +512,9 @@ var x = class t2 {
|
|
|
388
512
|
network() {
|
|
389
513
|
return this._network;
|
|
390
514
|
}
|
|
515
|
+
async getCurrentEpoch() {
|
|
516
|
+
return (await this.client.epochManagerStats()).current_epoch;
|
|
517
|
+
}
|
|
391
518
|
async getSubstate(e5, t3 = null) {
|
|
392
519
|
return this.client.substatesGet(e5, {
|
|
393
520
|
version: t3,
|
|
@@ -399,7 +526,7 @@ var x = class t2 {
|
|
|
399
526
|
try {
|
|
400
527
|
return await this.getSubstate(n2);
|
|
401
528
|
} catch (e6) {
|
|
402
|
-
if (
|
|
529
|
+
if (C(e6)) return null;
|
|
403
530
|
throw e6;
|
|
404
531
|
}
|
|
405
532
|
}
|
|
@@ -432,7 +559,7 @@ var x = class t2 {
|
|
|
432
559
|
};
|
|
433
560
|
} catch (n2) {
|
|
434
561
|
let r2 = n2 instanceof Error ? n2.message : String(n2);
|
|
435
|
-
throw
|
|
562
|
+
throw C(n2) ? new e(`Failed to find input "${t4.substate_id}": ${r2}. Verify the substate id is correct (typo? wrong network?) or wait for the producing transaction to finalize.`, {
|
|
436
563
|
cause: n2,
|
|
437
564
|
url: this._url
|
|
438
565
|
}) : new e(`Failed to resolve input "${t4.substate_id}": ${r2}. Check the indexer URL points at the same network as the substate.`, {
|
|
@@ -445,7 +572,7 @@ var x = class t2 {
|
|
|
445
572
|
async listRecentTransactions(e5) {
|
|
446
573
|
return await this.client.listRecentTransactions(e5);
|
|
447
574
|
}
|
|
448
|
-
},
|
|
575
|
+
}, T = class e4 {
|
|
449
576
|
constructor() {
|
|
450
577
|
__publicField(this, "_network", t.LocalNet);
|
|
451
578
|
__publicField(this, "_url", null);
|
|
@@ -469,10 +596,10 @@ var x = class t2 {
|
|
|
469
596
|
network: this._network,
|
|
470
597
|
defaultTransactionTimeoutMs: this._transactionTimeoutMs
|
|
471
598
|
};
|
|
472
|
-
return
|
|
599
|
+
return w.connect(e5);
|
|
473
600
|
}
|
|
474
601
|
};
|
|
475
|
-
async function
|
|
602
|
+
async function E(e5, t3) {
|
|
476
603
|
return Promise.all(t3.map(async (t4) => {
|
|
477
604
|
if (t4.type === "SpecificSubstate") {
|
|
478
605
|
if (t4.version != null) return {
|
|
@@ -501,13 +628,13 @@ async function C(e5, t3) {
|
|
|
501
628
|
}));
|
|
502
629
|
}
|
|
503
630
|
export {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
631
|
+
g as IndexerClient,
|
|
632
|
+
w as IndexerProvider,
|
|
633
|
+
S as PendingTransaction,
|
|
634
|
+
T as ProviderBuilder,
|
|
635
|
+
x as TransactionWatcher,
|
|
636
|
+
v as openEventStream,
|
|
637
|
+
_ as parseSseChunk,
|
|
638
|
+
E as resolveWantInputs,
|
|
639
|
+
h as transports
|
|
513
640
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tari-project/ootle-indexer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/tari-project/ootle.ts.git",
|
|
7
|
+
"directory": "packages/ootle-indexer"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
4
12
|
"type": "module",
|
|
5
13
|
"main": "./dist/index.js",
|
|
6
14
|
"types": "./dist/index.d.ts",
|
|
@@ -17,9 +25,9 @@
|
|
|
17
25
|
}
|
|
18
26
|
},
|
|
19
27
|
"dependencies": {
|
|
20
|
-
"@tari-project/indexer-client": "^1.
|
|
21
|
-
"@tari-project/ootle-ts-bindings": "^1.
|
|
22
|
-
"@tari-project/ootle": "0.
|
|
28
|
+
"@tari-project/indexer-client": "^1.6.0",
|
|
29
|
+
"@tari-project/ootle-ts-bindings": "^1.49.1",
|
|
30
|
+
"@tari-project/ootle": "0.3.0"
|
|
23
31
|
},
|
|
24
32
|
"devDependencies": {
|
|
25
33
|
"@types/node": "^25.5.0",
|