@aigne/afs-ocap 1.12.0-beta.5
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/LICENSE.md +26 -0
- package/README.md +144 -0
- package/aup/accounts/default.json +64 -0
- package/aup/accounts/item.json +510 -0
- package/aup/assets/default.json +70 -0
- package/aup/assets/item.json +360 -0
- package/aup/bridges/_addr/blocks/item.json +168 -0
- package/aup/bridges/default.json +79 -0
- package/aup/bridges/item.json +868 -0
- package/aup/config/default.json +806 -0
- package/aup/default.json +387 -0
- package/aup/delegates/default.json +71 -0
- package/aup/delegates/item.json +241 -0
- package/aup/factories/default.json +78 -0
- package/aup/factories/item.json +310 -0
- package/aup/stakes/default.json +76 -0
- package/aup/stakes/item.json +374 -0
- package/aup/tokens/default.json +76 -0
- package/aup/tokens/item.json +384 -0
- package/aup/transactions/default.json +102 -0
- package/aup/transactions/item.json +286 -0
- package/aup/validators/default.json +57 -0
- package/aup/validators/item.json +99 -0
- package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.cjs +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.mjs +10 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +4 -0
- package/dist/method-colors.cjs +137 -0
- package/dist/method-colors.mjs +136 -0
- package/dist/method-colors.mjs.map +1 -0
- package/dist/provider.cjs +2490 -0
- package/dist/provider.d.cts +453 -0
- package/dist/provider.d.cts.map +1 -0
- package/dist/provider.d.mts +453 -0
- package/dist/provider.d.mts.map +1 -0
- package/dist/provider.mjs +2490 -0
- package/dist/provider.mjs.map +1 -0
- package/dist/remote-source.cjs +338 -0
- package/dist/remote-source.d.cts +62 -0
- package/dist/remote-source.d.cts.map +1 -0
- package/dist/remote-source.d.mts +62 -0
- package/dist/remote-source.d.mts.map +1 -0
- package/dist/remote-source.mjs +339 -0
- package/dist/remote-source.mjs.map +1 -0
- package/dist/source.d.cts +77 -0
- package/dist/source.d.cts.map +1 -0
- package/dist/source.d.mts +77 -0
- package/dist/source.d.mts.map +1 -0
- package/dist/types.d.cts +572 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +572 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/utils.cjs +581 -0
- package/dist/utils.mjs +557 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { makeNsLog } from "@aigne/afs";
|
|
2
|
+
|
|
3
|
+
//#region src/remote-source.ts
|
|
4
|
+
const log = makeNsLog("provider:ocap");
|
|
5
|
+
let _clientCtorPromise = null;
|
|
6
|
+
function loadGraphQLClientCtor() {
|
|
7
|
+
if (!_clientCtorPromise) _clientCtorPromise = import("@ocap/client").then((mod) => {
|
|
8
|
+
return mod.default ?? mod;
|
|
9
|
+
});
|
|
10
|
+
return _clientCtorPromise;
|
|
11
|
+
}
|
|
12
|
+
function toGraphQLPaging(paging) {
|
|
13
|
+
return {
|
|
14
|
+
size: paging.size,
|
|
15
|
+
cursor: String(paging.offset)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function fromPageInfo(page, items) {
|
|
19
|
+
return {
|
|
20
|
+
total: page?.total ?? items.length,
|
|
21
|
+
hasNext: page?.next ?? false
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var OcapRemoteSource = class {
|
|
25
|
+
/**
|
|
26
|
+
* Lazily-instantiated GraphQL client. Initialized on the first method call,
|
|
27
|
+
* not at construction time, because `@ocap/client` is loaded via dynamic
|
|
28
|
+
* `import()` so bundlers can keep it out of the cold-start path.
|
|
29
|
+
*/
|
|
30
|
+
clientPromise = null;
|
|
31
|
+
url;
|
|
32
|
+
constructor(endpoint) {
|
|
33
|
+
this.url = /^https?:\/\//i.test(endpoint) ? endpoint : `https://${endpoint}`;
|
|
34
|
+
}
|
|
35
|
+
getClient() {
|
|
36
|
+
if (!this.clientPromise) this.clientPromise = loadGraphQLClientCtor().then((Ctor) => new Ctor(this.url));
|
|
37
|
+
return this.clientPromise;
|
|
38
|
+
}
|
|
39
|
+
async getChainInfo() {
|
|
40
|
+
return (await (await this.getClient()).getChainInfo()).info;
|
|
41
|
+
}
|
|
42
|
+
async getConfig() {
|
|
43
|
+
const res = await (await this.getClient()).getConfig({ parsed: true });
|
|
44
|
+
try {
|
|
45
|
+
return JSON.parse(res.config);
|
|
46
|
+
} catch {
|
|
47
|
+
return { raw: res.config };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async getValidatorsInfo() {
|
|
51
|
+
return (await (await this.getClient()).getValidatorsInfo()).validatorsInfo?.validators || [];
|
|
52
|
+
}
|
|
53
|
+
async getForgeStats() {
|
|
54
|
+
const f = (await (await this.getClient()).getForgeStats()).forgeStats || {};
|
|
55
|
+
return { forgeStats: {
|
|
56
|
+
numTxs: f.numTxs ?? [],
|
|
57
|
+
numStakes: f.numStakes ?? [],
|
|
58
|
+
numValidators: f.numValidators ?? [],
|
|
59
|
+
numDeclareTxs: f.numDeclareTxs ?? []
|
|
60
|
+
} };
|
|
61
|
+
}
|
|
62
|
+
async getTx(hash) {
|
|
63
|
+
return (await (await this.getClient()).getTx({ hash })).info ?? null;
|
|
64
|
+
}
|
|
65
|
+
async listTransactions(paging, filters) {
|
|
66
|
+
const params = { paging: toGraphQLPaging(paging) };
|
|
67
|
+
if (filters?.addressFilter) params.addressFilter = filters.addressFilter;
|
|
68
|
+
if (filters?.typeFilter) params.typeFilter = filters.typeFilter;
|
|
69
|
+
if (filters?.tokenFilter) params.tokenFilter = filters.tokenFilter;
|
|
70
|
+
if (filters?.assetFilter) params.assetFilter = filters.assetFilter;
|
|
71
|
+
if (filters?.factoryFilter) params.factoryFilter = filters.factoryFilter;
|
|
72
|
+
if (filters?.accountFilter) params.accountFilter = filters.accountFilter;
|
|
73
|
+
if (filters?.rollupFilter) params.rollupFilter = filters.rollupFilter;
|
|
74
|
+
if (filters?.stakeFilter) params.stakeFilter = filters.stakeFilter;
|
|
75
|
+
if (filters?.delegationFilter) params.delegationFilter = filters.delegationFilter;
|
|
76
|
+
if (filters?.validityFilter) params.validityFilter = filters.validityFilter;
|
|
77
|
+
if (filters?.timeFilter) params.timeFilter = filters.timeFilter;
|
|
78
|
+
const res = await (await this.getClient()).listTransactions(params);
|
|
79
|
+
const items = res.transactions || [];
|
|
80
|
+
return {
|
|
81
|
+
items,
|
|
82
|
+
...fromPageInfo(res.page, items)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
async getAccountState(address) {
|
|
86
|
+
const res = await (await this.getClient()).getAccountState({ address });
|
|
87
|
+
if (!res.state) return null;
|
|
88
|
+
const { context, ...rest } = res.state;
|
|
89
|
+
return {
|
|
90
|
+
...rest,
|
|
91
|
+
genesisTime: context?.genesisTime ?? void 0,
|
|
92
|
+
renaissanceTime: context?.renaissanceTime ?? void 0
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async getAccountTokens(address) {
|
|
96
|
+
return (await (await this.getClient()).getAccountTokens({ address })).tokens || [];
|
|
97
|
+
}
|
|
98
|
+
async listTopAccounts(paging, filters) {
|
|
99
|
+
const res = await (await this.getClient()).listTopAccounts({
|
|
100
|
+
paging: toGraphQLPaging(paging),
|
|
101
|
+
...filters?.tokenAddress && { tokenAddress: filters.tokenAddress },
|
|
102
|
+
...filters?.timeFilter && { timeFilter: filters.timeFilter }
|
|
103
|
+
});
|
|
104
|
+
const items = res.accounts || [];
|
|
105
|
+
return {
|
|
106
|
+
items,
|
|
107
|
+
...fromPageInfo(res.page, items)
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
async getTokenState(address) {
|
|
111
|
+
return (await (await this.getClient()).getTokenState({ address })).state ?? null;
|
|
112
|
+
}
|
|
113
|
+
async listTokens(paging, filters) {
|
|
114
|
+
const res = await (await this.getClient()).listTokens({
|
|
115
|
+
paging: toGraphQLPaging(paging),
|
|
116
|
+
...filters?.issuerAddress && { issuerAddress: filters.issuerAddress },
|
|
117
|
+
...filters?.timeFilter && { timeFilter: filters.timeFilter }
|
|
118
|
+
});
|
|
119
|
+
const items = res.tokens || [];
|
|
120
|
+
return {
|
|
121
|
+
items,
|
|
122
|
+
...fromPageInfo(res.page, items)
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
async getAssetState(address) {
|
|
126
|
+
const res = await (await this.getClient()).getAssetState({ address });
|
|
127
|
+
if (!res.state) return null;
|
|
128
|
+
const { context, ...rest } = res.state;
|
|
129
|
+
return {
|
|
130
|
+
...rest,
|
|
131
|
+
genesisTime: context?.genesisTime ?? void 0,
|
|
132
|
+
renaissanceTime: context?.renaissanceTime ?? void 0
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
async listAssets(paging, filters) {
|
|
136
|
+
const res = await (await this.getClient()).listAssets({
|
|
137
|
+
paging: toGraphQLPaging(paging),
|
|
138
|
+
...filters?.ownerAddress && { ownerAddress: filters.ownerAddress },
|
|
139
|
+
...filters?.factoryAddress && { factoryAddress: filters.factoryAddress },
|
|
140
|
+
...filters?.timeFilter && { timeFilter: filters.timeFilter }
|
|
141
|
+
});
|
|
142
|
+
const items = res.assets || [];
|
|
143
|
+
return {
|
|
144
|
+
items,
|
|
145
|
+
...fromPageInfo(res.page, items)
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
async getFactoryState(address) {
|
|
149
|
+
const res = await (await this.getClient()).getFactoryState({ address });
|
|
150
|
+
if (!res.state) return null;
|
|
151
|
+
const { context, ...rest } = res.state;
|
|
152
|
+
return {
|
|
153
|
+
...rest,
|
|
154
|
+
genesisTime: context?.genesisTime ?? void 0,
|
|
155
|
+
renaissanceTime: context?.renaissanceTime ?? void 0
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
async listFactories(paging, filters) {
|
|
159
|
+
const res = await (await this.getClient()).listFactories({
|
|
160
|
+
paging: toGraphQLPaging(paging),
|
|
161
|
+
...filters?.ownerAddress && { ownerAddress: filters.ownerAddress },
|
|
162
|
+
...filters?.addressList && { addressList: filters.addressList },
|
|
163
|
+
...filters?.timeFilter && { timeFilter: filters.timeFilter }
|
|
164
|
+
});
|
|
165
|
+
const items = res.factories || [];
|
|
166
|
+
return {
|
|
167
|
+
items,
|
|
168
|
+
...fromPageInfo(res.page, items)
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
async getStakeState(address) {
|
|
172
|
+
return (await (await this.getClient()).getStakeState({ address })).state ?? null;
|
|
173
|
+
}
|
|
174
|
+
async listStakes(paging, filters) {
|
|
175
|
+
const params = { paging: toGraphQLPaging(paging) };
|
|
176
|
+
if (filters?.addressFilter) params.addressFilter = filters.addressFilter;
|
|
177
|
+
if (filters?.timeFilter) params.timeFilter = filters.timeFilter;
|
|
178
|
+
const res = await (await this.getClient()).listStakes(params);
|
|
179
|
+
const items = res.stakes || [];
|
|
180
|
+
return {
|
|
181
|
+
items,
|
|
182
|
+
...fromPageInfo(res.page, items)
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
async getRollupState(address) {
|
|
186
|
+
return (await (await this.getClient()).getRollupState({ address })).state ?? null;
|
|
187
|
+
}
|
|
188
|
+
async listRollups(paging, filters) {
|
|
189
|
+
const res = await (await this.getClient()).listRollups({
|
|
190
|
+
paging: toGraphQLPaging(paging),
|
|
191
|
+
...filters?.tokenAddress && { tokenAddress: filters.tokenAddress },
|
|
192
|
+
...filters?.timeFilter && { timeFilter: filters.timeFilter }
|
|
193
|
+
});
|
|
194
|
+
const items = res.rollups || [];
|
|
195
|
+
return {
|
|
196
|
+
items,
|
|
197
|
+
...fromPageInfo(res.page, items)
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
async getRollupBlock(hash, rollupAddress) {
|
|
201
|
+
return (await (await this.getClient()).getRollupBlock({
|
|
202
|
+
hash,
|
|
203
|
+
rollupAddress
|
|
204
|
+
})).block ?? null;
|
|
205
|
+
}
|
|
206
|
+
async listRollupBlocks(rollupAddress, paging, filters) {
|
|
207
|
+
const res = await (await this.getClient()).listRollupBlocks({
|
|
208
|
+
rollupAddress,
|
|
209
|
+
paging: toGraphQLPaging(paging),
|
|
210
|
+
...filters?.validatorFilter && { validatorFilter: filters.validatorFilter }
|
|
211
|
+
});
|
|
212
|
+
const items = res.blocks || [];
|
|
213
|
+
return {
|
|
214
|
+
items,
|
|
215
|
+
...fromPageInfo(res.page, items)
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
async listRollupValidators(rollupAddress, paging) {
|
|
219
|
+
const res = await (await this.getClient()).listRollupValidators({
|
|
220
|
+
rollupAddress,
|
|
221
|
+
paging: toGraphQLPaging(paging)
|
|
222
|
+
});
|
|
223
|
+
const items = res.validators || [];
|
|
224
|
+
return {
|
|
225
|
+
items,
|
|
226
|
+
...fromPageInfo(res.page, items)
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
async getDelegateState(address) {
|
|
230
|
+
const res = await (await this.getClient()).getDelegateState({ address });
|
|
231
|
+
if (!res.state) return null;
|
|
232
|
+
const { ops, ...rest } = res.state;
|
|
233
|
+
const opsArray = ops ? Object.entries(ops).map(([key, value]) => ({
|
|
234
|
+
key,
|
|
235
|
+
value
|
|
236
|
+
})) : void 0;
|
|
237
|
+
return {
|
|
238
|
+
...rest,
|
|
239
|
+
ops: opsArray
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
async listDelegations(paging, filters) {
|
|
243
|
+
const res = await (await this.getClient()).listDelegations({
|
|
244
|
+
paging: toGraphQLPaging(paging),
|
|
245
|
+
...filters?.from && { from: filters.from },
|
|
246
|
+
...filters?.to && { to: filters.to },
|
|
247
|
+
...filters?.timeFilter && { timeFilter: filters.timeFilter }
|
|
248
|
+
});
|
|
249
|
+
const items = res.delegations || [];
|
|
250
|
+
return {
|
|
251
|
+
items,
|
|
252
|
+
...fromPageInfo(res.page, items)
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
async search(keyword, paging) {
|
|
256
|
+
const res = await (await this.getClient()).search({
|
|
257
|
+
keyword,
|
|
258
|
+
paging: toGraphQLPaging(paging)
|
|
259
|
+
});
|
|
260
|
+
const items = (res.results || []).map((r) => ({
|
|
261
|
+
type: r.type,
|
|
262
|
+
id: r.id,
|
|
263
|
+
title: r.title || "",
|
|
264
|
+
subtitle: r.subtitle || "",
|
|
265
|
+
description: r.description || "",
|
|
266
|
+
tags: r.tags || [],
|
|
267
|
+
timestamp: r.timestamp || ""
|
|
268
|
+
}));
|
|
269
|
+
return {
|
|
270
|
+
items,
|
|
271
|
+
...fromPageInfo(res.page, items)
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
async listTokenFlows(accountAddress, paging, options) {
|
|
275
|
+
const res = await (await this.getClient()).listTokenFlows({
|
|
276
|
+
accountAddress,
|
|
277
|
+
paging: toGraphQLPaging(paging),
|
|
278
|
+
...options?.tokenAddress && { tokenAddress: options.tokenAddress },
|
|
279
|
+
...options?.depth != null && { depth: options.depth },
|
|
280
|
+
...options?.direction && { direction: options.direction }
|
|
281
|
+
});
|
|
282
|
+
const items = (res.data ?? []).map((d) => ({
|
|
283
|
+
hash: d.hash,
|
|
284
|
+
from: d.from,
|
|
285
|
+
to: d.to,
|
|
286
|
+
value: d.value
|
|
287
|
+
}));
|
|
288
|
+
return {
|
|
289
|
+
items,
|
|
290
|
+
...fromPageInfo(res.page, items)
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Install `@ocap/client/subscribe` on the GraphQL client and forward
|
|
295
|
+
* topic events to the supplied callback. The install is lazy — it
|
|
296
|
+
* waits for the client to be constructed via `getClient()` so we
|
|
297
|
+
* don't pay the import cost on instances that never subscribe.
|
|
298
|
+
*
|
|
299
|
+
* Returns an unsub fn. Failures during install (e.g. the bundled
|
|
300
|
+
* runtime can't resolve `@arcblock/ws`) bubble up so
|
|
301
|
+
* `AFSOCAP.onMount` can fall back to `live: false` without
|
|
302
|
+
* misreporting capability.
|
|
303
|
+
*/
|
|
304
|
+
subscribe(topic, callback) {
|
|
305
|
+
let cancelled = false;
|
|
306
|
+
let installedUnsub = null;
|
|
307
|
+
const installAsync = async () => {
|
|
308
|
+
const client = await this.getClient();
|
|
309
|
+
if (!Object.hasOwn(client, "_ensureSocketClient")) {
|
|
310
|
+
const mod = await import("@ocap/client/subscribe");
|
|
311
|
+
const install = mod.install ?? mod.default?.install;
|
|
312
|
+
if (typeof install !== "function") throw new Error("@ocap/client/subscribe: install() not found on imported module");
|
|
313
|
+
install(client);
|
|
314
|
+
}
|
|
315
|
+
if (cancelled) return;
|
|
316
|
+
const handler = (payload) => {
|
|
317
|
+
try {
|
|
318
|
+
callback(payload);
|
|
319
|
+
} catch {}
|
|
320
|
+
};
|
|
321
|
+
client.subscribe?.(topic, handler);
|
|
322
|
+
installedUnsub = () => client.unsubscribe?.(topic, handler);
|
|
323
|
+
};
|
|
324
|
+
installAsync().catch((err) => {
|
|
325
|
+
if (typeof console !== "undefined") log.warn("[OcapRemoteSource] subscribe install failed", err);
|
|
326
|
+
});
|
|
327
|
+
return () => {
|
|
328
|
+
if (cancelled) return;
|
|
329
|
+
cancelled = true;
|
|
330
|
+
try {
|
|
331
|
+
installedUnsub?.();
|
|
332
|
+
} catch {}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
//#endregion
|
|
338
|
+
export { OcapRemoteSource };
|
|
339
|
+
//# sourceMappingURL=remote-source.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-source.mjs","names":[],"sources":["../src/remote-source.ts"],"sourcesContent":["import { makeNsLog } from \"@aigne/afs\";\nimport type { OcapDataSource } from \"./source.js\";\nimport type {\n AccountFilters,\n AccountState,\n AccountToken,\n AssetFactoryState,\n AssetFilters,\n AssetState,\n BridgeFilters,\n ChainConfig,\n ChainInfo,\n DelegateState,\n DelegationFilters,\n FactoryFilters,\n IndexedAccountState,\n IndexedAssetState,\n IndexedDelegationState,\n IndexedFactoryState,\n IndexedRollupBlock,\n IndexedRollupState,\n IndexedRollupValidator,\n IndexedStakeState,\n IndexedTokenState,\n IndexedTransaction,\n PagedResult,\n Paging,\n RollupBlock,\n RollupBlockFilters,\n RollupState,\n SearchResult,\n StakeFilters,\n StakeState,\n TokenFilters,\n TokenState,\n TransactionInfo,\n TxFilters,\n ValidatorInfo,\n} from \"./types.js\";\n\nconst log = makeNsLog(\"provider:ocap\");\n\n// @ocap/client is CJS, uses `export = GraphQLClient`. Loading via dynamic\n// `import()` lets bundlers (esbuild on Cloudflare Workers, Vite, …) chase the\n// dep through its `exports` map and emit a lazy chunk, instead of leaving a\n// runtime `require(\"@ocap/client\")` call that workerd can't resolve.\ntype GraphQLClientType = import(\"@ocap/client\");\n\nlet _clientCtorPromise: Promise<new (url: string) => GraphQLClientType> | null = null;\nfunction loadGraphQLClientCtor(): Promise<new (url: string) => GraphQLClientType> {\n if (!_clientCtorPromise) {\n _clientCtorPromise = import(\"@ocap/client\").then((mod) => {\n // CJS interop: `module.exports = GraphQLClient`. Different bundlers shape\n // the namespace differently — esbuild puts the class on `.default`,\n // Node ESM-from-CJS exposes it the same way, but accept the bare ns too\n // for runtimes that don't synthesize a default export.\n const ns = mod as unknown as { default?: unknown };\n const ctor = (ns.default ?? mod) as unknown as new (url: string) => GraphQLClientType;\n return ctor;\n });\n }\n return _clientCtorPromise;\n}\n\n/**\n * @internal Test-only seam. Clears the module-level client-ctor cache so a\n * `mock.module(\"@ocap/client\", …)` set up by a test takes effect even when an\n * earlier test in the same bun process already resolved the real ctor (the\n * cached promise otherwise wins over the freshly-registered mock). Mirrors the\n * `__reset*` convention in providers/basic/http/src/retry.ts.\n */\nexport function __resetClientCtorCacheForTest(): void {\n _clientCtorPromise = null;\n}\n\ninterface PageInfo {\n cursor: string;\n next: boolean;\n total: number;\n}\n\nfunction toGraphQLPaging(paging: Paging): { cursor: string; size: number } {\n return {\n size: paging.size,\n cursor: String(paging.offset),\n };\n}\n\nfunction fromPageInfo(page: PageInfo, items: unknown[]): { total: number; hasNext: boolean } {\n return {\n total: page?.total ?? items.length,\n hasNext: page?.next ?? false,\n };\n}\n\nexport class OcapRemoteSource implements OcapDataSource {\n /**\n * Lazily-instantiated GraphQL client. Initialized on the first method call,\n * not at construction time, because `@ocap/client` is loaded via dynamic\n * `import()` so bundlers can keep it out of the cold-start path.\n */\n private clientPromise: Promise<GraphQLClientType> | null = null;\n private readonly url: string;\n\n constructor(endpoint: string) {\n // Ensure endpoint has a protocol (URI template parsing strips it)\n this.url = /^https?:\\/\\//i.test(endpoint) ? endpoint : `https://${endpoint}`;\n }\n\n private getClient(): Promise<GraphQLClientType> {\n if (!this.clientPromise) {\n this.clientPromise = loadGraphQLClientCtor().then((Ctor) => new Ctor(this.url));\n }\n return this.clientPromise;\n }\n\n async getChainInfo(): Promise<ChainInfo> {\n const res = await (await this.getClient()).getChainInfo();\n return res.info;\n }\n\n async getConfig(): Promise<ChainConfig> {\n const res = await (await this.getClient()).getConfig({ parsed: true });\n try {\n return JSON.parse(res.config);\n } catch {\n return { raw: res.config };\n }\n }\n\n async getValidatorsInfo(): Promise<ValidatorInfo[]> {\n const res = await (await this.getClient()).getValidatorsInfo();\n return res.validatorsInfo?.validators || [];\n }\n\n async getForgeStats(): Promise<{ forgeStats: import(\"./source.js\").ForgeStatsSlice }> {\n const res = await (await this.getClient()).getForgeStats();\n const f = res.forgeStats || ({} as Record<string, unknown>);\n return {\n forgeStats: {\n numTxs: (f as { numTxs?: string[] }).numTxs ?? [],\n numStakes: (f as { numStakes?: string[] }).numStakes ?? [],\n numValidators: (f as { numValidators?: number[] }).numValidators ?? [],\n numDeclareTxs: (f as { numDeclareTxs?: string[] }).numDeclareTxs ?? [],\n },\n };\n }\n\n async getTx(hash: string): Promise<TransactionInfo | null> {\n const res = await (await this.getClient()).getTx({ hash });\n return res.info ?? null;\n }\n\n async listTransactions(\n paging: Paging,\n filters?: TxFilters,\n ): Promise<PagedResult<IndexedTransaction>> {\n const params: any = {\n paging: toGraphQLPaging(paging),\n };\n if (filters?.addressFilter) params.addressFilter = filters.addressFilter;\n if (filters?.typeFilter) params.typeFilter = filters.typeFilter;\n if (filters?.tokenFilter) params.tokenFilter = filters.tokenFilter;\n if (filters?.assetFilter) params.assetFilter = filters.assetFilter;\n if (filters?.factoryFilter) params.factoryFilter = filters.factoryFilter;\n if (filters?.accountFilter) params.accountFilter = filters.accountFilter;\n if (filters?.rollupFilter) params.rollupFilter = filters.rollupFilter;\n if (filters?.stakeFilter) params.stakeFilter = filters.stakeFilter;\n if (filters?.delegationFilter) params.delegationFilter = filters.delegationFilter;\n if (filters?.validityFilter) params.validityFilter = filters.validityFilter;\n if (filters?.timeFilter) params.timeFilter = filters.timeFilter;\n const res = await (await this.getClient()).listTransactions(params);\n const items: IndexedTransaction[] = res.transactions || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getAccountState(address: string): Promise<AccountState | null> {\n const res = await (await this.getClient()).getAccountState({ address });\n if (!res.state) return null;\n const { context, ...rest } = res.state;\n return {\n ...rest,\n genesisTime: context?.genesisTime ?? undefined,\n renaissanceTime: context?.renaissanceTime ?? undefined,\n };\n }\n\n async getAccountTokens(address: string): Promise<AccountToken[]> {\n const res = await (await this.getClient()).getAccountTokens({ address });\n return res.tokens || [];\n }\n\n async listTopAccounts(\n paging: Paging,\n filters?: AccountFilters,\n ): Promise<PagedResult<IndexedAccountState>> {\n const res = await (await this.getClient()).listTopAccounts({\n paging: toGraphQLPaging(paging),\n ...(filters?.tokenAddress && { tokenAddress: filters.tokenAddress }),\n ...(filters?.timeFilter && { timeFilter: filters.timeFilter }),\n });\n const items: IndexedAccountState[] = res.accounts || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getTokenState(address: string): Promise<TokenState | null> {\n const res = await (await this.getClient()).getTokenState({ address });\n return res.state ?? null;\n }\n\n async listTokens(\n paging: Paging,\n filters?: TokenFilters,\n ): Promise<PagedResult<IndexedTokenState>> {\n const res = await (await this.getClient()).listTokens({\n paging: toGraphQLPaging(paging),\n ...(filters?.issuerAddress && { issuerAddress: filters.issuerAddress }),\n ...(filters?.timeFilter && { timeFilter: filters.timeFilter }),\n });\n const items: IndexedTokenState[] = res.tokens || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getAssetState(address: string): Promise<AssetState | null> {\n const res = await (await this.getClient()).getAssetState({ address });\n if (!res.state) return null;\n const { context, ...rest } = res.state;\n return {\n ...rest,\n genesisTime: context?.genesisTime ?? undefined,\n renaissanceTime: context?.renaissanceTime ?? undefined,\n };\n }\n\n async listAssets(\n paging: Paging,\n filters?: AssetFilters,\n ): Promise<PagedResult<IndexedAssetState>> {\n const res = await (await this.getClient()).listAssets({\n paging: toGraphQLPaging(paging),\n ...(filters?.ownerAddress && { ownerAddress: filters.ownerAddress }),\n ...(filters?.factoryAddress && { factoryAddress: filters.factoryAddress }),\n ...(filters?.timeFilter && { timeFilter: filters.timeFilter }),\n });\n const items: IndexedAssetState[] = res.assets || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getFactoryState(address: string): Promise<AssetFactoryState | null> {\n const res = await (await this.getClient()).getFactoryState({ address });\n if (!res.state) return null;\n const { context, ...rest } = res.state;\n return {\n ...rest,\n genesisTime: context?.genesisTime ?? undefined,\n renaissanceTime: context?.renaissanceTime ?? undefined,\n };\n }\n\n async listFactories(\n paging: Paging,\n filters?: FactoryFilters,\n ): Promise<PagedResult<IndexedFactoryState>> {\n const res = await (await this.getClient()).listFactories({\n paging: toGraphQLPaging(paging),\n ...(filters?.ownerAddress && { ownerAddress: filters.ownerAddress }),\n ...(filters?.addressList && { addressList: filters.addressList }),\n ...(filters?.timeFilter && { timeFilter: filters.timeFilter }),\n });\n const items: IndexedFactoryState[] = res.factories || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getStakeState(address: string): Promise<StakeState | null> {\n const res = await (await this.getClient()).getStakeState({ address });\n return res.state ?? null;\n }\n\n async listStakes(\n paging: Paging,\n filters?: StakeFilters,\n ): Promise<PagedResult<IndexedStakeState>> {\n const params: any = {\n paging: toGraphQLPaging(paging),\n };\n if (filters?.addressFilter) params.addressFilter = filters.addressFilter;\n if (filters?.timeFilter) params.timeFilter = filters.timeFilter;\n const res = await (await this.getClient()).listStakes(params);\n const items: IndexedStakeState[] = res.stakes || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getRollupState(address: string): Promise<RollupState | null> {\n const res = await (await this.getClient()).getRollupState({ address });\n return res.state ?? null;\n }\n\n async listRollups(\n paging: Paging,\n filters?: BridgeFilters,\n ): Promise<PagedResult<IndexedRollupState>> {\n const res = await (await this.getClient()).listRollups({\n paging: toGraphQLPaging(paging),\n ...(filters?.tokenAddress && { tokenAddress: filters.tokenAddress }),\n ...(filters?.timeFilter && { timeFilter: filters.timeFilter }),\n });\n const items: IndexedRollupState[] = res.rollups || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getRollupBlock(hash: string, rollupAddress: string): Promise<RollupBlock | null> {\n const res = await (await this.getClient()).getRollupBlock({ hash, rollupAddress });\n return res.block ?? null;\n }\n\n async listRollupBlocks(\n rollupAddress: string,\n paging: Paging,\n filters?: RollupBlockFilters,\n ): Promise<PagedResult<IndexedRollupBlock>> {\n const res = await (await this.getClient()).listRollupBlocks({\n rollupAddress,\n paging: toGraphQLPaging(paging),\n ...(filters?.validatorFilter && { validatorFilter: filters.validatorFilter }),\n });\n const items: IndexedRollupBlock[] = res.blocks || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async listRollupValidators(\n rollupAddress: string,\n paging: Paging,\n ): Promise<PagedResult<IndexedRollupValidator>> {\n const res = await (await this.getClient()).listRollupValidators({\n rollupAddress,\n paging: toGraphQLPaging(paging),\n });\n const items: IndexedRollupValidator[] = (res.validators as IndexedRollupValidator[]) || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async getDelegateState(address: string): Promise<DelegateState | null> {\n const res = await (await this.getClient()).getDelegateState({ address });\n if (!res.state) return null;\n const { ops, ...rest } = res.state;\n // Upstream returns ops as Record<typeUrl, op>; flatten to array for local consumers.\n const opsArray = ops ? Object.entries(ops).map(([key, value]) => ({ key, value })) : undefined;\n return { ...rest, ops: opsArray } as DelegateState;\n }\n\n async listDelegations(\n paging: Paging,\n filters?: DelegationFilters,\n ): Promise<PagedResult<IndexedDelegationState>> {\n const res = await (await this.getClient()).listDelegations({\n paging: toGraphQLPaging(paging),\n ...(filters?.from && { from: filters.from }),\n ...(filters?.to && { to: filters.to }),\n ...(filters?.timeFilter && { timeFilter: filters.timeFilter }),\n });\n const items: IndexedDelegationState[] = res.delegations || [];\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async search(keyword: string, paging: Paging): Promise<PagedResult<SearchResult>> {\n const res = await (await this.getClient()).search({\n keyword,\n paging: toGraphQLPaging(paging),\n });\n const items: SearchResult[] = (res.results || []).map((r) => ({\n type: r.type,\n id: r.id,\n title: r.title || \"\",\n subtitle: r.subtitle || \"\",\n description: r.description || \"\",\n tags: r.tags || [],\n timestamp: r.timestamp || \"\",\n }));\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n async listTokenFlows(\n accountAddress: string,\n paging: Paging,\n options?: {\n tokenAddress?: string;\n depth?: number;\n direction?: import(\"./types.js\").TokenFlowDirection;\n },\n ): Promise<PagedResult<import(\"./types.js\").IndexedTokenFlow>> {\n const res = await (await this.getClient()).listTokenFlows({\n accountAddress,\n paging: toGraphQLPaging(paging),\n ...(options?.tokenAddress && { tokenAddress: options.tokenAddress }),\n ...(options?.depth != null && { depth: options.depth }),\n ...(options?.direction && { direction: options.direction as never }),\n });\n const items: import(\"./types.js\").IndexedTokenFlow[] = (res.data ?? []).map((d) => ({\n hash: d.hash,\n from: d.from,\n to: d.to,\n value: d.value,\n }));\n return { items, ...fromPageInfo(res.page, items) };\n }\n\n // ── Live subscribe (afs-live-updates Phase 3b T3b.2) ─────────────────\n /**\n * Install `@ocap/client/subscribe` on the GraphQL client and forward\n * topic events to the supplied callback. The install is lazy — it\n * waits for the client to be constructed via `getClient()` so we\n * don't pay the import cost on instances that never subscribe.\n *\n * Returns an unsub fn. Failures during install (e.g. the bundled\n * runtime can't resolve `@arcblock/ws`) bubble up so\n * `AFSOCAP.onMount` can fall back to `live: false` without\n * misreporting capability.\n */\n subscribe(topic: string, callback: (payload: unknown) => void): () => void {\n let cancelled = false;\n let installedUnsub: (() => void) | null = null;\n\n const installAsync = async () => {\n const client = (await this.getClient()) as unknown as {\n subscribe?: (t: string, cb: (p: unknown) => void) => void;\n unsubscribe?: (t: string, cb: (p: unknown) => void) => void;\n _ensureSocketClient?: unknown;\n };\n // The browser-entry GraphQLClient ships stubs as prototype methods\n // that throw SUBSCRIBE_NOT_INSTALLED until install() patches them.\n // `typeof` succeeds against the throwing stub, so we'd skip the\n // install and call the throwing subscribe(). install() adds\n // `_ensureSocketClient` as an OWN property on the instance; check\n // for own-property existence rather than typeof so we don't\n // confuse prototype stubs with the installed patch.\n if (!Object.hasOwn(client, \"_ensureSocketClient\")) {\n // Static specifier so esbuild lifts this into a precompiled\n // chunk in the worker bundle; Cloudflare Workers reject\n // truly-dynamic `import(variable)` calls but accept pre-resolved\n // chunk loads. CJS interop: `@ocap/client/subscribe` is CommonJS\n // — esbuild's worker bundle exposes the installer at\n // `default.install`, while Node ESM-from-CJS puts it on the\n // bare namespace. Try both shapes so the same code path works\n // in both runtimes.\n const mod = (await import(\"@ocap/client/subscribe\")) as unknown as {\n install?: (c: unknown) => void;\n default?: { install?: (c: unknown) => void };\n };\n const install = mod.install ?? mod.default?.install;\n if (typeof install !== \"function\") {\n throw new Error(\"@ocap/client/subscribe: install() not found on imported module\");\n }\n install(client);\n }\n if (cancelled) return;\n const handler = (payload: unknown) => {\n try {\n callback(payload);\n } catch {\n // INV: subscriber failure must not propagate\n }\n };\n client.subscribe?.(topic, handler);\n installedUnsub = () => client.unsubscribe?.(topic, handler);\n };\n\n // Fire-and-forget install — the caller can disregard the promise.\n // Any thrown error is observable via the AFS event sink falling silent.\n installAsync().catch((err) => {\n if (typeof console !== \"undefined\") {\n log.warn(\"[OcapRemoteSource] subscribe install failed\", err);\n }\n });\n\n return () => {\n if (cancelled) return;\n cancelled = true;\n try {\n installedUnsub?.();\n } catch {\n // tolerate teardown errors\n }\n };\n }\n}\n"],"mappings":";;;AAwCA,MAAM,MAAM,UAAU,gBAAgB;AAQtC,IAAI,qBAA6E;AACjF,SAAS,wBAAyE;AAChF,KAAI,CAAC,mBACH,sBAAqB,OAAO,gBAAgB,MAAM,QAAQ;AAOxD,SAFW,IACM,WAAW;GAE5B;AAEJ,QAAO;;AAoBT,SAAS,gBAAgB,QAAkD;AACzE,QAAO;EACL,MAAM,OAAO;EACb,QAAQ,OAAO,OAAO,OAAO;EAC9B;;AAGH,SAAS,aAAa,MAAgB,OAAuD;AAC3F,QAAO;EACL,OAAO,MAAM,SAAS,MAAM;EAC5B,SAAS,MAAM,QAAQ;EACxB;;AAGH,IAAa,mBAAb,MAAwD;;;;;;CAMtD,AAAQ,gBAAmD;CAC3D,AAAiB;CAEjB,YAAY,UAAkB;AAE5B,OAAK,MAAM,gBAAgB,KAAK,SAAS,GAAG,WAAW,WAAW;;CAGpE,AAAQ,YAAwC;AAC9C,MAAI,CAAC,KAAK,cACR,MAAK,gBAAgB,uBAAuB,CAAC,MAAM,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AAEjF,SAAO,KAAK;;CAGd,MAAM,eAAmC;AAEvC,UADY,OAAO,MAAM,KAAK,WAAW,EAAE,cAAc,EAC9C;;CAGb,MAAM,YAAkC;EACtC,MAAM,MAAM,OAAO,MAAM,KAAK,WAAW,EAAE,UAAU,EAAE,QAAQ,MAAM,CAAC;AACtE,MAAI;AACF,UAAO,KAAK,MAAM,IAAI,OAAO;UACvB;AACN,UAAO,EAAE,KAAK,IAAI,QAAQ;;;CAI9B,MAAM,oBAA8C;AAElD,UADY,OAAO,MAAM,KAAK,WAAW,EAAE,mBAAmB,EACnD,gBAAg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,77 @@
|
|
|
1
|
+
import { AccountFilters, AccountState, AccountToken, AssetFactoryState, AssetFilters, AssetState, BridgeFilters, ChainConfig, ChainInfo, DelegateState, DelegationFilters, FactoryFilters, IndexedAccountState, IndexedAssetState, IndexedDelegationState, IndexedFactoryState, IndexedRollupBlock, IndexedRollupState, IndexedRollupValidator, IndexedStakeState, IndexedTokenFlow, IndexedTokenState, IndexedTransaction, PagedResult, Paging, RollupBlock, RollupBlockFilters, RollupState, SearchResult, StakeFilters, StakeState, TokenFilters, TokenFlowDirection, TokenState, TransactionInfo, TxFilters, ValidatorInfo } from "./types.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/source.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Subset of @ocap/client's ForgeStats covering the fields chain-explorer
|
|
6
|
+
* actually consumes. We re-declare locally to avoid leaking the full GQL
|
|
7
|
+
* type surface into the OCAP provider's public interface.
|
|
8
|
+
*/
|
|
9
|
+
interface ForgeStatsSlice {
|
|
10
|
+
numTxs: string[];
|
|
11
|
+
numStakes: string[];
|
|
12
|
+
numValidators: number[];
|
|
13
|
+
numDeclareTxs: string[];
|
|
14
|
+
}
|
|
15
|
+
interface OcapDataSource {
|
|
16
|
+
getChainInfo(): Promise<ChainInfo>;
|
|
17
|
+
getConfig(): Promise<ChainConfig>;
|
|
18
|
+
getValidatorsInfo(): Promise<ValidatorInfo[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the chain-level forge stats (cumulative tx counters per type +
|
|
21
|
+
* historical TPS / block time). Used by readRoot to surface the
|
|
22
|
+
* "accountCount" metric — old block-explorer's account total comes from
|
|
23
|
+
* `numDeclareTxs[-1]`, not the indexer's listTopAccounts total. See
|
|
24
|
+
* planning/experience-upgrade § A.4.
|
|
25
|
+
*/
|
|
26
|
+
getForgeStats(): Promise<{
|
|
27
|
+
forgeStats: ForgeStatsSlice;
|
|
28
|
+
}>;
|
|
29
|
+
getTx(hash: string): Promise<TransactionInfo | null>;
|
|
30
|
+
listTransactions(paging: Paging, filters?: TxFilters): Promise<PagedResult<IndexedTransaction>>;
|
|
31
|
+
getAccountState(address: string): Promise<AccountState | null>;
|
|
32
|
+
getAccountTokens(address: string): Promise<AccountToken[]>;
|
|
33
|
+
listTopAccounts(paging: Paging, filters?: AccountFilters): Promise<PagedResult<IndexedAccountState>>;
|
|
34
|
+
getTokenState(address: string): Promise<TokenState | null>;
|
|
35
|
+
listTokens(paging: Paging, filters?: TokenFilters): Promise<PagedResult<IndexedTokenState>>;
|
|
36
|
+
getAssetState(address: string): Promise<AssetState | null>;
|
|
37
|
+
listAssets(paging: Paging, filters?: AssetFilters): Promise<PagedResult<IndexedAssetState>>;
|
|
38
|
+
getFactoryState(address: string): Promise<AssetFactoryState | null>;
|
|
39
|
+
listFactories(paging: Paging, filters?: FactoryFilters): Promise<PagedResult<IndexedFactoryState>>;
|
|
40
|
+
getStakeState(address: string): Promise<StakeState | null>;
|
|
41
|
+
listStakes(paging: Paging, filters?: StakeFilters): Promise<PagedResult<IndexedStakeState>>;
|
|
42
|
+
getRollupState(address: string): Promise<RollupState | null>;
|
|
43
|
+
listRollups(paging: Paging, filters?: BridgeFilters): Promise<PagedResult<IndexedRollupState>>;
|
|
44
|
+
getRollupBlock(hash: string, rollupAddress: string): Promise<RollupBlock | null>;
|
|
45
|
+
listRollupBlocks(rollupAddress: string, paging: Paging, filters?: RollupBlockFilters): Promise<PagedResult<IndexedRollupBlock>>;
|
|
46
|
+
listRollupValidators(rollupAddress: string, paging: Paging): Promise<PagedResult<IndexedRollupValidator>>;
|
|
47
|
+
getDelegateState(address: string): Promise<DelegateState | null>;
|
|
48
|
+
listDelegations(paging: Paging, filters?: DelegationFilters): Promise<PagedResult<IndexedDelegationState>>;
|
|
49
|
+
search(keyword: string, paging: Paging): Promise<PagedResult<SearchResult>>;
|
|
50
|
+
/**
|
|
51
|
+
* Optional event subscription primitive. Sources that wrap a live phoenix
|
|
52
|
+
* upstream (e.g. `@ocap/client.subscribe`) implement this; static / mock
|
|
53
|
+
* sources omit it.
|
|
54
|
+
*
|
|
55
|
+
* @param topic phoenix topic string — typically `"tx.create"` or
|
|
56
|
+
* `"tx.<type>"` (e.g. `"tx.transfer_v2"`).
|
|
57
|
+
* @param callback invoked with the raw upstream payload (subset of
|
|
58
|
+
* `IndexedTransaction`). Must be tolerant of partial payloads — the
|
|
59
|
+
* wire schema is provider-defined.
|
|
60
|
+
* @returns unsubscribe function. Calling it must idempotently release
|
|
61
|
+
* the underlying upstream subscription.
|
|
62
|
+
*/
|
|
63
|
+
subscribe?(topic: string, callback: (payload: unknown) => void): () => void;
|
|
64
|
+
/**
|
|
65
|
+
* Phase 0.2 — Token flow trail for an account, optionally restricted to a
|
|
66
|
+
* single token. Wraps @ocap/client.listTokenFlows; the upstream call
|
|
67
|
+
* resolves IN/OUT counterparties and amount values for a given depth.
|
|
68
|
+
*/
|
|
69
|
+
listTokenFlows(accountAddress: string, paging: Paging, options?: {
|
|
70
|
+
tokenAddress?: string;
|
|
71
|
+
depth?: number;
|
|
72
|
+
direction?: TokenFlowDirection;
|
|
73
|
+
}): Promise<PagedResult<IndexedTokenFlow>>;
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { ForgeStatsSlice, OcapDataSource };
|
|
77
|
+
//# sourceMappingURL=source.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.d.cts","names":[],"sources":["../src/source.ts"],"mappings":";;;;;AA6CA;;;UAAiB,eAAA;EACf,MAAA;EACA,SAAA;EACA,aAAA;EACA,aAAA;AAAA;AAAA,UAKe,cAAA;EAEf,YAAA,IAAgB,OAAA,CAAQ,SAAA;EACxB,SAAA,IAAa,OAAA,CAAQ,WAAA;EACrB,iBAAA,IAAqB,OAAA,CAAQ,aAAA;EAFL;;;;;;;EAUxB,aAAA,IAAiB,OAAA;IAAU,UAAA,EAAY,eAAA;EAAA;EAGvC,KAAA,CAAM,IAAA,WAAe,OAAA,CAAQ,eAAA;EAC7B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Y,kBAAA;EAGvB,oBAAA,CACE,aAAA,UACA,MAAA,EAAQ,MAAA,GACP,OAAA,CAAQ,WAAA,CAAY,sBAAA;EAGvB,gBAAA,CAAiB,OAAA,WAAkB,OAAA,CAAQ,aAAA;EAC3C,eAAA,CACE,MAAA,EAAQ,MAAA,EACR,OAAA,GAAU,iBAAA,GACT,OAAA,CAAQ,WAAA,CAAY,sBAAA;EAGvB,MAAA,CAAO,OAAA,UAAiB,MAAA,EAAQ,MAAA,GAAS,OAAA,CAAQ,WAAA,CAAY,YAAA;EAxCrB;;;;;;;;;;;;;EAuDxC,SAAA,EAAW,KAAA,UAAe,QAAA,GAAW,OAAA;EA5CG;;;;;EAmDxC,cAAA,CACE,cAAA,UACA,MAAA,EAAQ,MAAA,EACR,OAAA;IACE,YAAA;IACA,KAAA;IACA,SAAA,GAAY,kBAAA;EAAA,IAEb,OAAA,CAAQ,WAAA,CAAY,gBAAA;AAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { AccountFilters, AccountState, AccountToken, AssetFactoryState, AssetFilters, AssetState, BridgeFilters, ChainConfig, ChainInfo, DelegateState, DelegationFilters, FactoryFilters, IndexedAccountState, IndexedAssetState, IndexedDelegationState, IndexedFactoryState, IndexedRollupBlock, IndexedRollupState, IndexedRollupValidator, IndexedStakeState, IndexedTokenFlow, IndexedTokenState, IndexedTransaction, PagedResult, Paging, RollupBlock, RollupBlockFilters, RollupState, SearchResult, StakeFilters, StakeState, TokenFilters, TokenFlowDirection, TokenState, TransactionInfo, TxFilters, ValidatorInfo } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/source.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Subset of @ocap/client's ForgeStats covering the fields chain-explorer
|
|
6
|
+
* actually consumes. We re-declare locally to avoid leaking the full GQL
|
|
7
|
+
* type surface into the OCAP provider's public interface.
|
|
8
|
+
*/
|
|
9
|
+
interface ForgeStatsSlice {
|
|
10
|
+
numTxs: string[];
|
|
11
|
+
numStakes: string[];
|
|
12
|
+
numValidators: number[];
|
|
13
|
+
numDeclareTxs: string[];
|
|
14
|
+
}
|
|
15
|
+
interface OcapDataSource {
|
|
16
|
+
getChainInfo(): Promise<ChainInfo>;
|
|
17
|
+
getConfig(): Promise<ChainConfig>;
|
|
18
|
+
getValidatorsInfo(): Promise<ValidatorInfo[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the chain-level forge stats (cumulative tx counters per type +
|
|
21
|
+
* historical TPS / block time). Used by readRoot to surface the
|
|
22
|
+
* "accountCount" metric — old block-explorer's account total comes from
|
|
23
|
+
* `numDeclareTxs[-1]`, not the indexer's listTopAccounts total. See
|
|
24
|
+
* planning/experience-upgrade § A.4.
|
|
25
|
+
*/
|
|
26
|
+
getForgeStats(): Promise<{
|
|
27
|
+
forgeStats: ForgeStatsSlice;
|
|
28
|
+
}>;
|
|
29
|
+
getTx(hash: string): Promise<TransactionInfo | null>;
|
|
30
|
+
listTransactions(paging: Paging, filters?: TxFilters): Promise<PagedResult<IndexedTransaction>>;
|
|
31
|
+
getAccountState(address: string): Promise<AccountState | null>;
|
|
32
|
+
getAccountTokens(address: string): Promise<AccountToken[]>;
|
|
33
|
+
listTopAccounts(paging: Paging, filters?: AccountFilters): Promise<PagedResult<IndexedAccountState>>;
|
|
34
|
+
getTokenState(address: string): Promise<TokenState | null>;
|
|
35
|
+
listTokens(paging: Paging, filters?: TokenFilters): Promise<PagedResult<IndexedTokenState>>;
|
|
36
|
+
getAssetState(address: string): Promise<AssetState | null>;
|
|
37
|
+
listAssets(paging: Paging, filters?: AssetFilters): Promise<PagedResult<IndexedAssetState>>;
|
|
38
|
+
getFactoryState(address: string): Promise<AssetFactoryState | null>;
|
|
39
|
+
listFactories(paging: Paging, filters?: FactoryFilters): Promise<PagedResult<IndexedFactoryState>>;
|
|
40
|
+
getStakeState(address: string): Promise<StakeState | null>;
|
|
41
|
+
listStakes(paging: Paging, filters?: StakeFilters): Promise<PagedResult<IndexedStakeState>>;
|
|
42
|
+
getRollupState(address: string): Promise<RollupState | null>;
|
|
43
|
+
listRollups(paging: Paging, filters?: BridgeFilters): Promise<PagedResult<IndexedRollupState>>;
|
|
44
|
+
getRollupBlock(hash: string, rollupAddress: string): Promise<RollupBlock | null>;
|
|
45
|
+
listRollupBlocks(rollupAddress: string, paging: Paging, filters?: RollupBlockFilters): Promise<PagedResult<IndexedRollupBlock>>;
|
|
46
|
+
listRollupValidators(rollupAddress: string, paging: Paging): Promise<PagedResult<IndexedRollupValidator>>;
|
|
47
|
+
getDelegateState(address: string): Promise<DelegateState | null>;
|
|
48
|
+
listDelegations(paging: Paging, filters?: DelegationFilters): Promise<PagedResult<IndexedDelegationState>>;
|
|
49
|
+
search(keyword: string, paging: Paging): Promise<PagedResult<SearchResult>>;
|
|
50
|
+
/**
|
|
51
|
+
* Optional event subscription primitive. Sources that wrap a live phoenix
|
|
52
|
+
* upstream (e.g. `@ocap/client.subscribe`) implement this; static / mock
|
|
53
|
+
* sources omit it.
|
|
54
|
+
*
|
|
55
|
+
* @param topic phoenix topic string — typically `"tx.create"` or
|
|
56
|
+
* `"tx.<type>"` (e.g. `"tx.transfer_v2"`).
|
|
57
|
+
* @param callback invoked with the raw upstream payload (subset of
|
|
58
|
+
* `IndexedTransaction`). Must be tolerant of partial payloads — the
|
|
59
|
+
* wire schema is provider-defined.
|
|
60
|
+
* @returns unsubscribe function. Calling it must idempotently release
|
|
61
|
+
* the underlying upstream subscription.
|
|
62
|
+
*/
|
|
63
|
+
subscribe?(topic: string, callback: (payload: unknown) => void): () => void;
|
|
64
|
+
/**
|
|
65
|
+
* Phase 0.2 — Token flow trail for an account, optionally restricted to a
|
|
66
|
+
* single token. Wraps @ocap/client.listTokenFlows; the upstream call
|
|
67
|
+
* resolves IN/OUT counterparties and amount values for a given depth.
|
|
68
|
+
*/
|
|
69
|
+
listTokenFlows(accountAddress: string, paging: Paging, options?: {
|
|
70
|
+
tokenAddress?: string;
|
|
71
|
+
depth?: number;
|
|
72
|
+
direction?: TokenFlowDirection;
|
|
73
|
+
}): Promise<PagedResult<IndexedTokenFlow>>;
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { ForgeStatsSlice, OcapDataSource };
|
|
77
|
+
//# sourceMappingURL=source.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source.d.mts","names":[],"sources":["../src/source.ts"],"mappings":";;;;;AA6CA;;;UAAiB,eAAA;EACf,MAAA;EACA,SAAA;EACA,aAAA;EACA,aAAA;AAAA;AAAA,UAKe,cAAA;EAEf,YAAA,IAAgB,OAAA,CAAQ,SAAA;EACxB,SAAA,IAAa,OAAA,CAAQ,WAAA;EACrB,iBAAA,IAAqB,OAAA,CAAQ,aAAA;EAFL;;;;;;;EAUxB,aAAA,IAAiB,OAAA;IAAU,UAAA,EAAY,eAAA;EAAA;EAGvC,KAAA,CAAM,IAAA,WAAe,OAAA,CAAQ,eAAA;EAC7B,gBAAA,CAAiB,MAAA,EAAQ,MAAA,EAAQ,OAAA,GAAU,SAAA,GAAY,OAAA,CAAQ,WAAA,CAAY,kBAAA;EAG3E,eAAA,CAAgB,OAAA,WAAkB,OAAA,CAAQ,YAAA;EAC1C,gBAAA,CAAiB,OAAA,WAAkB,OAAA,CAAQ,YAAA;EAC3C,eAAA,CACE,MAAA,EAAQ,MAAA,EACR,OAAA,GAAU,cAAA,GACT,OAAA,CAAQ,WAAA,CAAY,mBAAA;EAGvB,aAAA,CAAc,OAAA,WAAkB,OAAA,CAAQ,UAAA;EACxC,UAAA,CAAW,MAAA,EAAQ,MAAA,EAAQ,OAAA,GAAU,YAAA,GAAe,OAAA,CAAQ,WAAA,CAAY,iBAAA;EAGxE,aAAA,CAAc,OAAA,WAAkB,OAAA,CAAQ,UAAA;EACxC,UAAA,CAAW,MAAA,EAAQ,MAAA,EAAQ,OAAA,GAAU,YAAA,GAAe,OAAA,CAAQ,WAAA,CAAY,iBAAA;EAGxE,eAAA,CAAgB,OAA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