@monolythium/core-sdk 0.1.0 → 0.2.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/README.md +115 -24
- package/dist/crypto/index.cjs +62 -12
- package/dist/crypto/index.cjs.map +1 -1
- package/dist/crypto/index.d.cts +4 -115
- package/dist/crypto/index.d.ts +4 -115
- package/dist/crypto/index.js +61 -13
- package/dist/crypto/index.js.map +1 -1
- package/dist/ethers/index.cjs +2116 -0
- package/dist/ethers/index.cjs.map +1 -0
- package/dist/ethers/index.d.cts +300 -0
- package/dist/ethers/index.d.ts +300 -0
- package/dist/ethers/index.js +2107 -0
- package/dist/ethers/index.js.map +1 -0
- package/dist/index.cjs +7435 -1555
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1555 -346
- package/dist/index.d.ts +1555 -346
- package/dist/index.js +7193 -1548
- package/dist/index.js.map +1 -1
- package/dist/native-events-BEkkGoak.d.cts +3708 -0
- package/dist/native-events-BEkkGoak.d.ts +3708 -0
- package/dist/network-BK2u9br2.d.cts +31 -0
- package/dist/network-BK2u9br2.d.ts +31 -0
- package/dist/submission-BrsftNSl.d.cts +131 -0
- package/dist/submission-CelGfDRQ.d.ts +131 -0
- package/package.json +8 -2
- package/dist/client-CpnpVkrR.d.cts +0 -2237
- package/dist/client-CpnpVkrR.d.ts +0 -2237
|
@@ -0,0 +1,3708 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Third-party bridge route disclosure helpers.
|
|
3
|
+
*
|
|
4
|
+
* These helpers assess caller-supplied route disclosures. They do not call a
|
|
5
|
+
* node route and do not claim any bridge integration is live.
|
|
6
|
+
*/
|
|
7
|
+
declare const BRIDGE_SELECTORS: {
|
|
8
|
+
readonly lockBridgeConfig: "0x8956feb3";
|
|
9
|
+
readonly setBridgeResumeCooldown: "0x1a3a0672";
|
|
10
|
+
readonly setBridgeRouteFinality: "0x8a061e99";
|
|
11
|
+
};
|
|
12
|
+
declare const BRIDGE_REVERT_TAGS: {
|
|
13
|
+
readonly bridgeAdminLocked: "0xf807";
|
|
14
|
+
readonly bridgeResumeCooldownActive: "0xf808";
|
|
15
|
+
readonly bridgeCooldownZero: "0xfd08";
|
|
16
|
+
readonly bridgeFinalityZero: "0xfd09";
|
|
17
|
+
};
|
|
18
|
+
declare const BRIDGE_QUOTE_API_BLOCKED_REASON = "bridge quote requires a mono-core live quote API/runtime primitive";
|
|
19
|
+
declare const BRIDGE_SUBMIT_API_BLOCKED_REASON = "bridge submit requires a mono-core live submit API/runtime primitive";
|
|
20
|
+
type BridgeBytesInput = string | Uint8Array | readonly number[];
|
|
21
|
+
type BridgeAdminControl = "none" | "consensusOnly" | "operatorKey" | "unknown";
|
|
22
|
+
type BridgeCircuitBreakerState = "armed" | "paused" | "disabled" | "unknown";
|
|
23
|
+
type BridgeRiskTier = "low" | "medium" | "high" | "blocked";
|
|
24
|
+
declare class BridgePrecompileError extends Error {
|
|
25
|
+
constructor(message: string);
|
|
26
|
+
}
|
|
27
|
+
declare class BridgeRouteCatalogueError extends Error {
|
|
28
|
+
readonly blockedReasons: string[];
|
|
29
|
+
constructor(blockedReasons: readonly string[]);
|
|
30
|
+
}
|
|
31
|
+
declare function bridgeAddressHex(): string;
|
|
32
|
+
declare function encodeLockBridgeConfigCalldata(bridgeId: BridgeBytesInput): string;
|
|
33
|
+
declare function encodeSetBridgeResumeCooldownCalldata(bridgeId: BridgeBytesInput, cooldownBlocks: bigint | number | string): string;
|
|
34
|
+
declare function encodeSetBridgeRouteFinalityCalldata(bridgeId: BridgeBytesInput, finalityBlocks: bigint | number | string): string;
|
|
35
|
+
declare function isBridgeAdminLockedRevert(data: BridgeBytesInput): boolean;
|
|
36
|
+
declare function isBridgeResumeCooldownActiveRevert(data: BridgeBytesInput): boolean;
|
|
37
|
+
declare function isBridgeCooldownZeroRevert(data: BridgeBytesInput): boolean;
|
|
38
|
+
declare function isBridgeFinalityZeroRevert(data: BridgeBytesInput): boolean;
|
|
39
|
+
interface BridgeVerifierDisclosure {
|
|
40
|
+
model: string;
|
|
41
|
+
participantCount: number;
|
|
42
|
+
threshold: number;
|
|
43
|
+
}
|
|
44
|
+
interface BridgeRouteDisclosure {
|
|
45
|
+
routeId: string;
|
|
46
|
+
bridge: string;
|
|
47
|
+
asset: string;
|
|
48
|
+
sourceChain: string;
|
|
49
|
+
destinationChain: string;
|
|
50
|
+
verifier: BridgeVerifierDisclosure;
|
|
51
|
+
drainCapAtomic: string;
|
|
52
|
+
finalityBlocks: number;
|
|
53
|
+
cooldownSeconds: number;
|
|
54
|
+
adminControl: BridgeAdminControl;
|
|
55
|
+
circuitBreaker: BridgeCircuitBreakerState;
|
|
56
|
+
insuranceAtomic: string;
|
|
57
|
+
lastIncidentDate?: string | null;
|
|
58
|
+
}
|
|
59
|
+
interface BridgeRouteCatalogueRoute {
|
|
60
|
+
tokenId: string;
|
|
61
|
+
routeId: string;
|
|
62
|
+
bridgeId: string;
|
|
63
|
+
wrappedAsset: string;
|
|
64
|
+
bridge: string;
|
|
65
|
+
asset: string;
|
|
66
|
+
sourceChain: string;
|
|
67
|
+
destinationChain: string;
|
|
68
|
+
verifier: BridgeVerifierDisclosure;
|
|
69
|
+
drainCapAtomic: string;
|
|
70
|
+
finalityBlocks: number;
|
|
71
|
+
cooldownSeconds: number;
|
|
72
|
+
adminControl: BridgeAdminControl;
|
|
73
|
+
circuitBreaker: BridgeCircuitBreakerState;
|
|
74
|
+
insuranceAtomic: string;
|
|
75
|
+
updatedAtBlock: number;
|
|
76
|
+
lastIncidentDate?: string | null;
|
|
77
|
+
}
|
|
78
|
+
interface BridgeRouteCatalogue {
|
|
79
|
+
routes: BridgeRouteCatalogueRoute[];
|
|
80
|
+
}
|
|
81
|
+
type BridgeRouteCataloguePayload = BridgeRouteCatalogue | readonly BridgeRouteCatalogueRoute[];
|
|
82
|
+
interface BridgeRouteCatalogueValidation {
|
|
83
|
+
accepted: boolean;
|
|
84
|
+
routeCount: number;
|
|
85
|
+
blockedReasons: string[];
|
|
86
|
+
}
|
|
87
|
+
interface BridgeRouteCatalogueJsonOptions {
|
|
88
|
+
/**
|
|
89
|
+
* Export as `{ routes: [...] }` by default. Set false for mono-core's raw-array import form.
|
|
90
|
+
*/
|
|
91
|
+
envelope?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* JSON.stringify spacing. Defaults to two spaces to match CLI fixture style.
|
|
94
|
+
*/
|
|
95
|
+
space?: number | string;
|
|
96
|
+
}
|
|
97
|
+
interface BridgeRouteAssessment {
|
|
98
|
+
routeId: string;
|
|
99
|
+
accepted: boolean;
|
|
100
|
+
score: number;
|
|
101
|
+
riskTier: BridgeRiskTier;
|
|
102
|
+
blockedReasons: string[];
|
|
103
|
+
warnings: string[];
|
|
104
|
+
}
|
|
105
|
+
interface RankedBridgeRoute {
|
|
106
|
+
route: BridgeRouteDisclosure;
|
|
107
|
+
assessment: BridgeRouteAssessment;
|
|
108
|
+
}
|
|
109
|
+
interface BridgeTransferIntent {
|
|
110
|
+
asset: string;
|
|
111
|
+
amountAtomic: string;
|
|
112
|
+
sourceChain: string;
|
|
113
|
+
destinationChain: string;
|
|
114
|
+
recipient: string;
|
|
115
|
+
sender?: string | null;
|
|
116
|
+
allowedRouteIds?: string[] | null;
|
|
117
|
+
minimumScore?: number | null;
|
|
118
|
+
maxFinalityBlocks?: number | null;
|
|
119
|
+
maxCooldownSeconds?: number | null;
|
|
120
|
+
}
|
|
121
|
+
interface BridgeRouteCandidate {
|
|
122
|
+
route: BridgeRouteDisclosure;
|
|
123
|
+
assessment: BridgeRouteAssessment;
|
|
124
|
+
eligible: boolean;
|
|
125
|
+
score: number;
|
|
126
|
+
blockedReasons: string[];
|
|
127
|
+
warnings: string[];
|
|
128
|
+
}
|
|
129
|
+
interface BridgeTransferRequest {
|
|
130
|
+
intent: BridgeTransferIntent;
|
|
131
|
+
route: BridgeRouteDisclosure;
|
|
132
|
+
assessment: BridgeRouteAssessment;
|
|
133
|
+
}
|
|
134
|
+
interface BridgeRouteSelection {
|
|
135
|
+
selected: BridgeTransferRequest | null;
|
|
136
|
+
candidates: BridgeRouteCandidate[];
|
|
137
|
+
blockedReasons: string[];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* SDK-only readiness report for the quote/submit boundary.
|
|
141
|
+
*
|
|
142
|
+
* The SDK can verify route-selection readiness from supplied disclosures, but
|
|
143
|
+
* live quote and submit remain blocked until mono-core exposes those
|
|
144
|
+
* API/runtime primitives.
|
|
145
|
+
*/
|
|
146
|
+
interface BridgeQuoteSubmitReadiness {
|
|
147
|
+
selection: BridgeRouteSelection;
|
|
148
|
+
routeSelectionReady: boolean;
|
|
149
|
+
quoteReady: boolean;
|
|
150
|
+
submitReady: boolean;
|
|
151
|
+
blockedReasons: string[];
|
|
152
|
+
warnings: string[];
|
|
153
|
+
}
|
|
154
|
+
interface BridgeRoutesRequest {
|
|
155
|
+
address?: string | null;
|
|
156
|
+
intent?: BridgeTransferIntent | null;
|
|
157
|
+
routeDisclosures?: BridgeRouteDisclosure[] | null;
|
|
158
|
+
limit?: number | null;
|
|
159
|
+
}
|
|
160
|
+
interface BridgeRoutesSource {
|
|
161
|
+
address?: string | null;
|
|
162
|
+
routeCount: number;
|
|
163
|
+
globalRouteIndexAvailable: boolean;
|
|
164
|
+
routeDisclosureSource: string;
|
|
165
|
+
}
|
|
166
|
+
interface BridgeRoutesResponse {
|
|
167
|
+
selection: BridgeRouteSelection;
|
|
168
|
+
routeSelectionReady: boolean;
|
|
169
|
+
quoteReady: boolean;
|
|
170
|
+
submitReady: boolean;
|
|
171
|
+
blockedReasons: string[];
|
|
172
|
+
warnings: string[];
|
|
173
|
+
routes?: BridgeRouteDisclosure[] | null;
|
|
174
|
+
bridgeRouteDisclosures?: BridgeRouteDisclosure[] | null;
|
|
175
|
+
source?: BridgeRoutesSource | null;
|
|
176
|
+
}
|
|
177
|
+
declare function assessBridgeRoute(route: BridgeRouteDisclosure): BridgeRouteAssessment;
|
|
178
|
+
declare function rankBridgeRoutes(routes: readonly BridgeRouteDisclosure[]): RankedBridgeRoute[];
|
|
179
|
+
declare function bridgeTransferCandidates(intent: BridgeTransferIntent, routes: readonly BridgeRouteDisclosure[]): BridgeRouteCandidate[];
|
|
180
|
+
declare function selectBridgeTransferRoute(intent: BridgeTransferIntent, routes: readonly BridgeRouteDisclosure[]): BridgeRouteSelection;
|
|
181
|
+
declare function bridgeQuoteSubmitReadiness(intent: BridgeTransferIntent, routes: readonly BridgeRouteDisclosure[]): BridgeQuoteSubmitReadiness;
|
|
182
|
+
declare function bridgeRoutesReadiness(request: BridgeRoutesRequest): BridgeRoutesResponse;
|
|
183
|
+
declare function buildBridgeRouteCatalogue(routes: readonly BridgeRouteCatalogueRoute[]): BridgeRouteCatalogue;
|
|
184
|
+
declare function parseBridgeRouteCatalogueJson(json: string): BridgeRouteCatalogue;
|
|
185
|
+
declare function normalizeBridgeRouteCatalogue(payload: unknown): BridgeRouteCatalogue;
|
|
186
|
+
declare function validateBridgeRouteCatalogue(payload: unknown): BridgeRouteCatalogueValidation;
|
|
187
|
+
declare function exportBridgeRouteCatalogueJson(payload: BridgeRouteCataloguePayload, options?: BridgeRouteCatalogueJsonOptions): string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Market metadata returned inside `lyth_clobMarket`.
|
|
191
|
+
*/
|
|
192
|
+
type ClobMarketRecord = {
|
|
193
|
+
/**
|
|
194
|
+
* Base token id.
|
|
195
|
+
*/
|
|
196
|
+
baseToken: string;
|
|
197
|
+
/**
|
|
198
|
+
* Quote token id.
|
|
199
|
+
*/
|
|
200
|
+
quoteToken: string;
|
|
201
|
+
/**
|
|
202
|
+
* Best bid price as a decimal string.
|
|
203
|
+
*/
|
|
204
|
+
bestBidPrice: string;
|
|
205
|
+
/**
|
|
206
|
+
* Best ask price as a decimal string.
|
|
207
|
+
*/
|
|
208
|
+
bestAskPrice: string;
|
|
209
|
+
/**
|
|
210
|
+
* Last trade price as a decimal string.
|
|
211
|
+
*/
|
|
212
|
+
lastTradePrice: string;
|
|
213
|
+
/**
|
|
214
|
+
* Total traded base volume as a decimal string.
|
|
215
|
+
*/
|
|
216
|
+
totalVolumeBase: string;
|
|
217
|
+
/**
|
|
218
|
+
* Taker fee in basis points.
|
|
219
|
+
*/
|
|
220
|
+
takerFeeBps: number;
|
|
221
|
+
/**
|
|
222
|
+
* Tick size as a decimal string.
|
|
223
|
+
*/
|
|
224
|
+
tickSize: string;
|
|
225
|
+
/**
|
|
226
|
+
* Lot size as a decimal string.
|
|
227
|
+
*/
|
|
228
|
+
lotSize: string;
|
|
229
|
+
/**
|
|
230
|
+
* Minimum notional as a decimal string.
|
|
231
|
+
*/
|
|
232
|
+
minNotional: string;
|
|
233
|
+
/**
|
|
234
|
+
* Whether the market is registered on-chain.
|
|
235
|
+
*/
|
|
236
|
+
isRegistered: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Registration block.
|
|
239
|
+
*/
|
|
240
|
+
registeredAtBlock: bigint;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* `lyth_clobMarket` response.
|
|
245
|
+
*/
|
|
246
|
+
type ClobMarketResponse = {
|
|
247
|
+
/**
|
|
248
|
+
* Response schema version.
|
|
249
|
+
*/
|
|
250
|
+
schemaVersion: number;
|
|
251
|
+
/**
|
|
252
|
+
* Queried market id.
|
|
253
|
+
*/
|
|
254
|
+
marketId: string;
|
|
255
|
+
/**
|
|
256
|
+
* Market metadata, or `null` when the market is not found.
|
|
257
|
+
*/
|
|
258
|
+
market: ClobMarketRecord | null;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Canonical MRC policy-account spending policy body.
|
|
263
|
+
*/
|
|
264
|
+
type MrcPolicyRecord = {
|
|
265
|
+
/**
|
|
266
|
+
* Whether the policy currently allows spending.
|
|
267
|
+
*/
|
|
268
|
+
enabled: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Maximum amount per action as decimal text.
|
|
271
|
+
*/
|
|
272
|
+
perActionLimit: string;
|
|
273
|
+
/**
|
|
274
|
+
* Maximum amount inside one window as decimal text.
|
|
275
|
+
*/
|
|
276
|
+
windowLimit: string;
|
|
277
|
+
/**
|
|
278
|
+
* Assets allowed by this policy.
|
|
279
|
+
*/
|
|
280
|
+
allowedAssets: Array<string>;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Current-state smart/policy account row folded from native MRC account events.
|
|
285
|
+
*/
|
|
286
|
+
type MrcAccountRecord = {
|
|
287
|
+
/**
|
|
288
|
+
* Account row kind: `smart_account` or `policy_account`.
|
|
289
|
+
*/
|
|
290
|
+
kind: string;
|
|
291
|
+
/**
|
|
292
|
+
* Account address this row describes.
|
|
293
|
+
*/
|
|
294
|
+
account: string;
|
|
295
|
+
/**
|
|
296
|
+
* Controller address authorized for this account.
|
|
297
|
+
*/
|
|
298
|
+
controller: string;
|
|
299
|
+
/**
|
|
300
|
+
* Recovery address registered for this account, when smart-account state carries one.
|
|
301
|
+
*/
|
|
302
|
+
recovery: string | null;
|
|
303
|
+
/**
|
|
304
|
+
* Active policy hash, when this row is a policy account.
|
|
305
|
+
*/
|
|
306
|
+
policyHash: string | null;
|
|
307
|
+
/**
|
|
308
|
+
* Active policy body, when this row is a policy account and the node has indexed it.
|
|
309
|
+
*/
|
|
310
|
+
policy: MrcPolicyRecord | null;
|
|
311
|
+
/**
|
|
312
|
+
* Account nonce as decimal text, or `null` when the row has no nonce.
|
|
313
|
+
*/
|
|
314
|
+
nonce: string | null;
|
|
315
|
+
/**
|
|
316
|
+
* Block height of the latest fold into this row.
|
|
317
|
+
*/
|
|
318
|
+
updatedAtBlock: number;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Current-state policy spend row included in `lyth_mrcAccount`.
|
|
323
|
+
*/
|
|
324
|
+
type MrcPolicySpendRecord = {
|
|
325
|
+
/**
|
|
326
|
+
* Policy account address.
|
|
327
|
+
*/
|
|
328
|
+
account: string;
|
|
329
|
+
/**
|
|
330
|
+
* Asset id governed by this spend window.
|
|
331
|
+
*/
|
|
332
|
+
assetId: string;
|
|
333
|
+
/**
|
|
334
|
+
* Spend window identifier as decimal text.
|
|
335
|
+
*/
|
|
336
|
+
window: string;
|
|
337
|
+
/**
|
|
338
|
+
* Window allowance amount as decimal text.
|
|
339
|
+
*/
|
|
340
|
+
amount: string;
|
|
341
|
+
/**
|
|
342
|
+
* Amount already spent in this window as decimal text.
|
|
343
|
+
*/
|
|
344
|
+
spent: string;
|
|
345
|
+
/**
|
|
346
|
+
* Block height of the latest fold into this row.
|
|
347
|
+
*/
|
|
348
|
+
updatedAtBlock: number;
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* `lyth_mrcAccount` exact current-state smart/policy account lookup response.
|
|
353
|
+
*/
|
|
354
|
+
type MrcAccountResponse = {
|
|
355
|
+
/**
|
|
356
|
+
* Response schema version.
|
|
357
|
+
*/
|
|
358
|
+
schemaVersion: number;
|
|
359
|
+
/**
|
|
360
|
+
* Queried account address.
|
|
361
|
+
*/
|
|
362
|
+
account: string;
|
|
363
|
+
/**
|
|
364
|
+
* Policy spend row limit applied by the node.
|
|
365
|
+
*/
|
|
366
|
+
spendLimit: number;
|
|
367
|
+
/**
|
|
368
|
+
* Smart-account row, or `null` when none exists.
|
|
369
|
+
*/
|
|
370
|
+
smartAccount: MrcAccountRecord | null;
|
|
371
|
+
/**
|
|
372
|
+
* Policy-account row, or `null` when none exists.
|
|
373
|
+
*/
|
|
374
|
+
policyAccount: MrcAccountRecord | null;
|
|
375
|
+
/**
|
|
376
|
+
* Policy spend rows for this account.
|
|
377
|
+
*/
|
|
378
|
+
policySpends: Array<MrcPolicySpendRecord>;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* One holder row in `lyth_richList`.
|
|
383
|
+
*/
|
|
384
|
+
type RichListHolder = {
|
|
385
|
+
/**
|
|
386
|
+
* One-based holder rank.
|
|
387
|
+
*/
|
|
388
|
+
rank: number;
|
|
389
|
+
/**
|
|
390
|
+
* Holder address.
|
|
391
|
+
*/
|
|
392
|
+
address: string;
|
|
393
|
+
/**
|
|
394
|
+
* Balance as a decimal string.
|
|
395
|
+
*/
|
|
396
|
+
balance: string;
|
|
397
|
+
/**
|
|
398
|
+
* Block height the balance was last observed at.
|
|
399
|
+
*/
|
|
400
|
+
updatedAtBlock: bigint;
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* `lyth_mrcHolders` response.
|
|
405
|
+
*/
|
|
406
|
+
type MrcHoldersResponse = {
|
|
407
|
+
/**
|
|
408
|
+
* Response schema version.
|
|
409
|
+
*/
|
|
410
|
+
schemaVersion: number;
|
|
411
|
+
/**
|
|
412
|
+
* Queried MRC standard.
|
|
413
|
+
*/
|
|
414
|
+
standard: string;
|
|
415
|
+
/**
|
|
416
|
+
* Queried MRC asset or collection id.
|
|
417
|
+
*/
|
|
418
|
+
assetId: string;
|
|
419
|
+
/**
|
|
420
|
+
* Queried token id, or `null` for MRC-4626 vault scope.
|
|
421
|
+
*/
|
|
422
|
+
tokenId: string | null;
|
|
423
|
+
/**
|
|
424
|
+
* Result limit applied by the node.
|
|
425
|
+
*/
|
|
426
|
+
limit: number;
|
|
427
|
+
/**
|
|
428
|
+
* Holder rows. The row shape is shared with `lyth_richList`.
|
|
429
|
+
*/
|
|
430
|
+
holders: Array<RichListHolder>;
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Current-state metadata folded from native MRC creation/metadata events.
|
|
435
|
+
*/
|
|
436
|
+
type MrcMetadataRecord = {
|
|
437
|
+
/**
|
|
438
|
+
* MRC standard: `mrc20`, `mrc721`, `mrc1155`, or `mrc4626`.
|
|
439
|
+
*/
|
|
440
|
+
standard: string;
|
|
441
|
+
/**
|
|
442
|
+
* Asset, collection, or vault id.
|
|
443
|
+
*/
|
|
444
|
+
assetId: string;
|
|
445
|
+
/**
|
|
446
|
+
* Token id for token-specific metadata rows.
|
|
447
|
+
*/
|
|
448
|
+
tokenId: string | null;
|
|
449
|
+
/**
|
|
450
|
+
* Human-readable name, when carried by the source event.
|
|
451
|
+
*/
|
|
452
|
+
name: string | null;
|
|
453
|
+
/**
|
|
454
|
+
* Short symbol, when carried by the source event.
|
|
455
|
+
*/
|
|
456
|
+
symbol: string | null;
|
|
457
|
+
/**
|
|
458
|
+
* Display decimals, when carried by the source event.
|
|
459
|
+
*/
|
|
460
|
+
decimals: number | null;
|
|
461
|
+
/**
|
|
462
|
+
* Metadata URI, when carried by the source event.
|
|
463
|
+
*/
|
|
464
|
+
uri: string | null;
|
|
465
|
+
/**
|
|
466
|
+
* Block height of the latest fold into this row.
|
|
467
|
+
*/
|
|
468
|
+
updatedAtBlock: number;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* `lyth_mrcMetadata` exact current-state metadata lookup response.
|
|
473
|
+
*/
|
|
474
|
+
type MrcMetadataResponse = {
|
|
475
|
+
/**
|
|
476
|
+
* Response schema version.
|
|
477
|
+
*/
|
|
478
|
+
schemaVersion: number;
|
|
479
|
+
/**
|
|
480
|
+
* Queried asset, collection, or vault id.
|
|
481
|
+
*/
|
|
482
|
+
assetId: string;
|
|
483
|
+
/**
|
|
484
|
+
* Queried token id, or `null` for asset/collection scope.
|
|
485
|
+
*/
|
|
486
|
+
tokenId: string | null;
|
|
487
|
+
/**
|
|
488
|
+
* Metadata row, or `null` when no aggregate exists for the key.
|
|
489
|
+
*/
|
|
490
|
+
metadata: MrcMetadataRecord | null;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* One row in `lyth_pendingRewards`.
|
|
495
|
+
*/
|
|
496
|
+
type PendingRewardsRow = {
|
|
497
|
+
/**
|
|
498
|
+
* Cluster id receiving the delegated weight.
|
|
499
|
+
*/
|
|
500
|
+
cluster: number;
|
|
501
|
+
/**
|
|
502
|
+
* Delegated weight in basis points.
|
|
503
|
+
*/
|
|
504
|
+
weightBps: number;
|
|
505
|
+
/**
|
|
506
|
+
* Unsettled reward-index delta for this cluster, as a hex quantity.
|
|
507
|
+
*/
|
|
508
|
+
unsettledAmountLythoshi: string;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* `lyth_pendingRewards` response.
|
|
513
|
+
*/
|
|
514
|
+
type PendingRewardsResponse = {
|
|
515
|
+
/**
|
|
516
|
+
* Queried wallet address.
|
|
517
|
+
*/
|
|
518
|
+
wallet: string;
|
|
519
|
+
/**
|
|
520
|
+
* Settled plus unsettled claimable rewards, as a hex quantity.
|
|
521
|
+
*/
|
|
522
|
+
totalAmountLythoshi: string;
|
|
523
|
+
/**
|
|
524
|
+
* Wallet-level pending reward already settled in storage.
|
|
525
|
+
*/
|
|
526
|
+
settledPendingLythoshi: string;
|
|
527
|
+
/**
|
|
528
|
+
* Sum of per-cluster unsettled reward-index deltas.
|
|
529
|
+
*/
|
|
530
|
+
unsettledAmountLythoshi: string;
|
|
531
|
+
/**
|
|
532
|
+
* Whether this wallet has auto-compounding enabled.
|
|
533
|
+
*/
|
|
534
|
+
autoCompound: boolean;
|
|
535
|
+
/**
|
|
536
|
+
* Per-cluster unsettled rows.
|
|
537
|
+
*/
|
|
538
|
+
rows: Array<PendingRewardsRow>;
|
|
539
|
+
/**
|
|
540
|
+
* Block selector echoed by the node.
|
|
541
|
+
*/
|
|
542
|
+
block: unknown;
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* One ticket in `lyth_redemptionQueue`.
|
|
547
|
+
*/
|
|
548
|
+
type RedemptionQueueTicket = {
|
|
549
|
+
/**
|
|
550
|
+
* Stable queue index for this wallet.
|
|
551
|
+
*/
|
|
552
|
+
index: bigint;
|
|
553
|
+
/**
|
|
554
|
+
* Cluster id whose delegation weight is redeeming.
|
|
555
|
+
*/
|
|
556
|
+
cluster: number;
|
|
557
|
+
/**
|
|
558
|
+
* Redeeming delegation weight in basis points.
|
|
559
|
+
*/
|
|
560
|
+
weightBps: number;
|
|
561
|
+
/**
|
|
562
|
+
* Block height where the ticket was queued.
|
|
563
|
+
*/
|
|
564
|
+
createdHeight: bigint;
|
|
565
|
+
/**
|
|
566
|
+
* Block height where the cooldown matures.
|
|
567
|
+
*/
|
|
568
|
+
maturityHeight: bigint;
|
|
569
|
+
/**
|
|
570
|
+
* Whether the ticket is mature at the queried block, or `null`
|
|
571
|
+
* when the selector does not resolve to a height.
|
|
572
|
+
*/
|
|
573
|
+
mature: boolean | null;
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* `lyth_redemptionQueue` response.
|
|
578
|
+
*/
|
|
579
|
+
type RedemptionQueueResponse = {
|
|
580
|
+
/**
|
|
581
|
+
* Queried wallet address.
|
|
582
|
+
*/
|
|
583
|
+
wallet: string;
|
|
584
|
+
/**
|
|
585
|
+
* Bounded wallet redemption tickets returned by the node.
|
|
586
|
+
*/
|
|
587
|
+
tickets: Array<RedemptionQueueTicket>;
|
|
588
|
+
/**
|
|
589
|
+
* Total ticket count stored for the wallet.
|
|
590
|
+
*/
|
|
591
|
+
count: bigint;
|
|
592
|
+
/**
|
|
593
|
+
* Number of decoded tickets returned.
|
|
594
|
+
*/
|
|
595
|
+
returned: number;
|
|
596
|
+
/**
|
|
597
|
+
* Block selector echoed by the node.
|
|
598
|
+
*/
|
|
599
|
+
block: unknown;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* `lyth_getAccountPolicy` response.
|
|
604
|
+
*/
|
|
605
|
+
type AccountPolicy = {
|
|
606
|
+
/**
|
|
607
|
+
* Policy mode label — `"public"`, `"stealth"`, `"confidential"`,
|
|
608
|
+
* `"shielded"`.
|
|
609
|
+
*/
|
|
610
|
+
mode: string;
|
|
611
|
+
/**
|
|
612
|
+
* Whether the account accepts shielded transfers.
|
|
613
|
+
*/
|
|
614
|
+
allowShielded: boolean;
|
|
615
|
+
/**
|
|
616
|
+
* Whether the account accepts confidential transfers.
|
|
617
|
+
*/
|
|
618
|
+
allowConfidential: boolean;
|
|
619
|
+
/**
|
|
620
|
+
* Whether the account accepts stealth payments.
|
|
621
|
+
*/
|
|
622
|
+
acceptStealth: boolean;
|
|
623
|
+
/**
|
|
624
|
+
* Whether the account requires originator proof.
|
|
625
|
+
*/
|
|
626
|
+
requireOriginatorProof: boolean;
|
|
627
|
+
/**
|
|
628
|
+
* Whether the account requires allowlist proof.
|
|
629
|
+
*/
|
|
630
|
+
requireAllowlistProof: boolean;
|
|
631
|
+
/**
|
|
632
|
+
* Raw flag word, `0x`-hex two-digit byte.
|
|
633
|
+
*/
|
|
634
|
+
flags: string;
|
|
635
|
+
/**
|
|
636
|
+
* `true` when the account has explicitly set policy bits.
|
|
637
|
+
*/
|
|
638
|
+
explicit: boolean;
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Account proof envelope returned by `eth_getBalance` /
|
|
643
|
+
* `eth_getStorageAt` / `lyth_registryStateProof`.
|
|
644
|
+
*
|
|
645
|
+
* `value` is the raw quantity (or 32-byte word for storage) as returned
|
|
646
|
+
* by the chain. `state_root` is the trie root the proof is verified
|
|
647
|
+
* against. `proof` is `null` when the chain provider could not produce
|
|
648
|
+
* an inclusion proof for this slot at the requested block.
|
|
649
|
+
*/
|
|
650
|
+
type AccountProofResponse = {
|
|
651
|
+
/**
|
|
652
|
+
* `0x`-hex value (balance, storage word, or peer id depending on
|
|
653
|
+
* the calling method).
|
|
654
|
+
*/
|
|
655
|
+
value: string;
|
|
656
|
+
/**
|
|
657
|
+
* State-root hex the proof verifies against.
|
|
658
|
+
*/
|
|
659
|
+
state_root: string;
|
|
660
|
+
/**
|
|
661
|
+
* Block height the proof was generated against.
|
|
662
|
+
*/
|
|
663
|
+
block_number: bigint;
|
|
664
|
+
/**
|
|
665
|
+
* Inclusion proof envelope, omitted when the chain didn't produce
|
|
666
|
+
* one. The shape is intentionally opaque at this layer — callers
|
|
667
|
+
* that need to verify the proof bring an internal state crate in
|
|
668
|
+
* directly.
|
|
669
|
+
*/
|
|
670
|
+
proof?: unknown | null;
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* Retention metadata returned by `lyth_addressActivityKind` for
|
|
675
|
+
* pruned address activity windows.
|
|
676
|
+
*/
|
|
677
|
+
type AddressActivityArchiveRedirect = {
|
|
678
|
+
/**
|
|
679
|
+
* Human-readable archival hint supplied by the node.
|
|
680
|
+
*/
|
|
681
|
+
hint: string;
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* One row in `lyth_getAddressActivity`.
|
|
686
|
+
*/
|
|
687
|
+
type AddressActivityEntry = {
|
|
688
|
+
/**
|
|
689
|
+
* Block height the event landed in.
|
|
690
|
+
*/
|
|
691
|
+
blockHeight: bigint;
|
|
692
|
+
/**
|
|
693
|
+
* Tx index within the block.
|
|
694
|
+
*/
|
|
695
|
+
txIndex: number;
|
|
696
|
+
/**
|
|
697
|
+
* Log index within the tx.
|
|
698
|
+
*/
|
|
699
|
+
logIndex: number;
|
|
700
|
+
/**
|
|
701
|
+
* Source kind: transfer, swap, staking, or delegation.
|
|
702
|
+
*/
|
|
703
|
+
kind: string;
|
|
704
|
+
/**
|
|
705
|
+
* Direction relative to the queried address, when directional.
|
|
706
|
+
*/
|
|
707
|
+
direction: string | null;
|
|
708
|
+
/**
|
|
709
|
+
* Counterparty address for directional value movement.
|
|
710
|
+
*/
|
|
711
|
+
counterparty: string | null;
|
|
712
|
+
/**
|
|
713
|
+
* 32-byte token id when the event involves a token.
|
|
714
|
+
*/
|
|
715
|
+
tokenId: string | null;
|
|
716
|
+
/**
|
|
717
|
+
* Decimal-string amount when the event has an amount.
|
|
718
|
+
*/
|
|
719
|
+
amount: string | null;
|
|
720
|
+
/**
|
|
721
|
+
* Cluster id when the event involves a cluster.
|
|
722
|
+
*/
|
|
723
|
+
cluster: number | null;
|
|
724
|
+
/**
|
|
725
|
+
* Delegation weight in basis points.
|
|
726
|
+
*/
|
|
727
|
+
weightBps: number | null;
|
|
728
|
+
/**
|
|
729
|
+
* Kind-specific sub-label such as delegated, unstake, or stake.
|
|
730
|
+
*/
|
|
731
|
+
subKind: string | null;
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Retention bounds returned by `lyth_addressActivityKind`.
|
|
736
|
+
*/
|
|
737
|
+
type AddressActivityKindRetention = {
|
|
738
|
+
/**
|
|
739
|
+
* Earliest retained block for indexed activity.
|
|
740
|
+
*/
|
|
741
|
+
earliestRetained: bigint;
|
|
742
|
+
/**
|
|
743
|
+
* Optional archive redirect hint.
|
|
744
|
+
*/
|
|
745
|
+
archiveRedirect?: AddressActivityArchiveRedirect;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* `lyth_addressActivityKind` response.
|
|
750
|
+
*/
|
|
751
|
+
type AddressActivityKindResponse = {
|
|
752
|
+
/**
|
|
753
|
+
* Response schema version.
|
|
754
|
+
*/
|
|
755
|
+
schemaVersion: number;
|
|
756
|
+
/**
|
|
757
|
+
* Queried address.
|
|
758
|
+
*/
|
|
759
|
+
address: string;
|
|
760
|
+
/**
|
|
761
|
+
* `found`, `not_found`, `indexer_disabled`, `pruned`, `private`,
|
|
762
|
+
* or a forward-compatible node-supplied string.
|
|
763
|
+
*/
|
|
764
|
+
kind: string;
|
|
765
|
+
/**
|
|
766
|
+
* Retention metadata when the activity window was pruned.
|
|
767
|
+
*/
|
|
768
|
+
retention?: AddressActivityKindRetention;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Address-label row surfaced by `lyth_getAddressLabel`.
|
|
773
|
+
*/
|
|
774
|
+
type AddressLabelRecord = {
|
|
775
|
+
/**
|
|
776
|
+
* Labeled address.
|
|
777
|
+
*/
|
|
778
|
+
address: string;
|
|
779
|
+
/**
|
|
780
|
+
* Lowercase category name, e.g. `foundation`, `exchange`,
|
|
781
|
+
* `bridge`, `treasury`, `contract`, or `operator`.
|
|
782
|
+
*/
|
|
783
|
+
category: string;
|
|
784
|
+
/**
|
|
785
|
+
* Optional human-readable display name.
|
|
786
|
+
*/
|
|
787
|
+
displayName: string | null;
|
|
788
|
+
/**
|
|
789
|
+
* Block height the label was last asserted at.
|
|
790
|
+
*/
|
|
791
|
+
updatedAtBlock: bigint;
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* `lyth_getAssetPolicy` response.
|
|
796
|
+
*/
|
|
797
|
+
type AssetPolicy = {
|
|
798
|
+
/**
|
|
799
|
+
* Policy mode label.
|
|
800
|
+
*/
|
|
801
|
+
mode: string;
|
|
802
|
+
/**
|
|
803
|
+
* Whether the asset allows shielded transfers.
|
|
804
|
+
*/
|
|
805
|
+
allowShielded: boolean;
|
|
806
|
+
/**
|
|
807
|
+
* Whether the asset allows confidential transfers.
|
|
808
|
+
*/
|
|
809
|
+
allowConfidential: boolean;
|
|
810
|
+
/**
|
|
811
|
+
* Whether the asset allows stealth transfers.
|
|
812
|
+
*/
|
|
813
|
+
allowStealth: boolean;
|
|
814
|
+
/**
|
|
815
|
+
* Whether the asset allows transparent transfers.
|
|
816
|
+
*/
|
|
817
|
+
allowTransparent: boolean;
|
|
818
|
+
/**
|
|
819
|
+
* KYC requirement bit.
|
|
820
|
+
*/
|
|
821
|
+
requireKyc: boolean;
|
|
822
|
+
/**
|
|
823
|
+
* Raw levels byte, `0x`-hex two-digit.
|
|
824
|
+
*/
|
|
825
|
+
levels: string;
|
|
826
|
+
/**
|
|
827
|
+
* `true` when the asset has explicitly set policy.
|
|
828
|
+
*/
|
|
829
|
+
explicit: boolean;
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Block header surfaced via `eth_getBlockByNumber` / `eth_getBlockByHash`.
|
|
834
|
+
*
|
|
835
|
+
* The v4.1 SDK shape exposes execution-unit terminology. Legacy node
|
|
836
|
+
* payloads that still return `gas_used` / `gas_limit` decode through
|
|
837
|
+
* serde aliases so callers can upgrade the SDK before every node RPC
|
|
838
|
+
* response has been regenerated.
|
|
839
|
+
*/
|
|
840
|
+
type BlockHeader = {
|
|
841
|
+
/**
|
|
842
|
+
* Block number (height).
|
|
843
|
+
*/
|
|
844
|
+
number: bigint;
|
|
845
|
+
/**
|
|
846
|
+
* Block hash (32 bytes hex).
|
|
847
|
+
*/
|
|
848
|
+
hash: string;
|
|
849
|
+
/**
|
|
850
|
+
* Parent block hash.
|
|
851
|
+
*/
|
|
852
|
+
parent_hash: string;
|
|
853
|
+
/**
|
|
854
|
+
* State-root commitment.
|
|
855
|
+
*/
|
|
856
|
+
state_root: string;
|
|
857
|
+
/**
|
|
858
|
+
* UNIX seconds.
|
|
859
|
+
*/
|
|
860
|
+
timestamp: bigint;
|
|
861
|
+
/**
|
|
862
|
+
* Total execution units consumed.
|
|
863
|
+
*/
|
|
864
|
+
executionUnitsUsed: bigint;
|
|
865
|
+
/**
|
|
866
|
+
* Block execution-unit limit.
|
|
867
|
+
*/
|
|
868
|
+
executionUnitLimit: bigint;
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* EVM block tag. Use [`BlockSelector`] when sending to the wire — this
|
|
873
|
+
* is the strongly-typed half of an `eth_*` block argument.
|
|
874
|
+
*/
|
|
875
|
+
type BlockTag = "latest" | "earliest" | "finalized" | "safe" | "pending";
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* BLS aggregate certificate response used by the AUD-0074 certificate RPCs.
|
|
879
|
+
*/
|
|
880
|
+
type BlsCertificateResponse = {
|
|
881
|
+
/**
|
|
882
|
+
* Round at which the certificate sealed.
|
|
883
|
+
*/
|
|
884
|
+
round: bigint;
|
|
885
|
+
/**
|
|
886
|
+
* `0x`-prefixed aggregate BLS signature.
|
|
887
|
+
*/
|
|
888
|
+
signature: string;
|
|
889
|
+
/**
|
|
890
|
+
* Signer-set bitmap as `0x`-hex bytes.
|
|
891
|
+
*/
|
|
892
|
+
signers_bitmap: string;
|
|
893
|
+
/**
|
|
894
|
+
* Operator indices decoded from the signer bitmap.
|
|
895
|
+
*/
|
|
896
|
+
signer_indices: Array<number>;
|
|
897
|
+
/**
|
|
898
|
+
* Number of signing operators.
|
|
899
|
+
*/
|
|
900
|
+
signer_count: number;
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Argument shape for `eth_call` / `eth_estimateGas`.
|
|
905
|
+
*
|
|
906
|
+
* Every field is optional — the chain rejects payloads that omit
|
|
907
|
+
* required fields with an `InvalidParams` error.
|
|
908
|
+
*/
|
|
909
|
+
type CallRequest = {
|
|
910
|
+
/**
|
|
911
|
+
* Source address.
|
|
912
|
+
*/
|
|
913
|
+
from?: string;
|
|
914
|
+
/**
|
|
915
|
+
* Destination address. `None` is interpreted as contract
|
|
916
|
+
* creation by the chain.
|
|
917
|
+
*/
|
|
918
|
+
to?: string;
|
|
919
|
+
/**
|
|
920
|
+
* Execution-unit limit.
|
|
921
|
+
*/
|
|
922
|
+
gas?: string;
|
|
923
|
+
/**
|
|
924
|
+
* Fee per execution unit on legacy / non-EIP-1559 paths.
|
|
925
|
+
*/
|
|
926
|
+
gasPrice?: string;
|
|
927
|
+
/**
|
|
928
|
+
* Native value to transfer, in lythoshi.
|
|
929
|
+
*/
|
|
930
|
+
value?: string;
|
|
931
|
+
/**
|
|
932
|
+
* Calldata (`data` is canonical; chains accept `input` as alias).
|
|
933
|
+
*/
|
|
934
|
+
data?: string;
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* One entry in the `lyth_capabilities` keyed capability map.
|
|
939
|
+
*/
|
|
940
|
+
type CapabilityDescriptor = {
|
|
941
|
+
/**
|
|
942
|
+
* 20-byte precompile address, `0x`-hex.
|
|
943
|
+
*/
|
|
944
|
+
address: string;
|
|
945
|
+
/**
|
|
946
|
+
* Stable capability id from the milestone registry.
|
|
947
|
+
*/
|
|
948
|
+
capabilityId: string;
|
|
949
|
+
/**
|
|
950
|
+
* Human-readable capability/precompile name.
|
|
951
|
+
*/
|
|
952
|
+
capabilityName: string;
|
|
953
|
+
/**
|
|
954
|
+
* Gate class: `gateable`, `non-gateable`, or `retired-rejecting`.
|
|
955
|
+
*/
|
|
956
|
+
kind: string;
|
|
957
|
+
/**
|
|
958
|
+
* Whether the capability is currently dispatchable.
|
|
959
|
+
*/
|
|
960
|
+
active: boolean;
|
|
961
|
+
/**
|
|
962
|
+
* Height of the milestone that activated this capability, when any.
|
|
963
|
+
*/
|
|
964
|
+
activationHeight: bigint | null;
|
|
965
|
+
};
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* MRV forwarder deployment row for a native module surfaced by `lyth_capabilities`.
|
|
969
|
+
*/
|
|
970
|
+
type NativeModuleForwarderDescriptor = {
|
|
971
|
+
/**
|
|
972
|
+
* Native module namespace this forwarder calls, for example `"market"`.
|
|
973
|
+
*/
|
|
974
|
+
module: string;
|
|
975
|
+
/**
|
|
976
|
+
* Byte length of the encoded forwarder request.
|
|
977
|
+
*/
|
|
978
|
+
requestBytes: number;
|
|
979
|
+
/**
|
|
980
|
+
* Typed MRV contract address hosting the forwarder.
|
|
981
|
+
*/
|
|
982
|
+
contractAddress: string;
|
|
983
|
+
/**
|
|
984
|
+
* MRV artifact profile used by the deployed forwarder.
|
|
985
|
+
*/
|
|
986
|
+
artifactProfile: string;
|
|
987
|
+
/**
|
|
988
|
+
* Deployment/readiness status reported by the node.
|
|
989
|
+
*/
|
|
990
|
+
status: string;
|
|
991
|
+
/**
|
|
992
|
+
* Whether the deployment has been verified against the expected artifact.
|
|
993
|
+
*/
|
|
994
|
+
deploymentVerified: boolean;
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* `lyth_capabilities` response.
|
|
999
|
+
*/
|
|
1000
|
+
type CapabilitiesResponse = {
|
|
1001
|
+
/**
|
|
1002
|
+
* Block height sampled by the node.
|
|
1003
|
+
*/
|
|
1004
|
+
blockNumber: bigint;
|
|
1005
|
+
/**
|
|
1006
|
+
* Address-keyed capability map.
|
|
1007
|
+
*/
|
|
1008
|
+
capabilities: {
|
|
1009
|
+
[key in string]?: CapabilityDescriptor;
|
|
1010
|
+
};
|
|
1011
|
+
/**
|
|
1012
|
+
* Native module forwarder deployments keyed by native module name.
|
|
1013
|
+
*/
|
|
1014
|
+
nativeModuleForwarders: {
|
|
1015
|
+
[key in string]?: Array<NativeModuleForwarderDescriptor>;
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* One signature row in `lyth_getLatestCheckpoint`.
|
|
1021
|
+
*/
|
|
1022
|
+
type CheckpointRecord = {
|
|
1023
|
+
/**
|
|
1024
|
+
* Block height the checkpoint commits to.
|
|
1025
|
+
*/
|
|
1026
|
+
blockHeight: bigint;
|
|
1027
|
+
/**
|
|
1028
|
+
* State-root commitment at the checkpointed block.
|
|
1029
|
+
*/
|
|
1030
|
+
stateRoot: string;
|
|
1031
|
+
/**
|
|
1032
|
+
* Hex-encoded ML-DSA-65 signer public key.
|
|
1033
|
+
*/
|
|
1034
|
+
signerPubkeyHex: string;
|
|
1035
|
+
/**
|
|
1036
|
+
* Hex-encoded ML-DSA-65 signature.
|
|
1037
|
+
*/
|
|
1038
|
+
signatureHex: string;
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* `lyth_getClusterDelegators` response.
|
|
1043
|
+
*/
|
|
1044
|
+
type ClusterDelegatorsResponse = {
|
|
1045
|
+
/**
|
|
1046
|
+
* Queried cluster id.
|
|
1047
|
+
*/
|
|
1048
|
+
cluster: number;
|
|
1049
|
+
/**
|
|
1050
|
+
* Delegator wallet addresses.
|
|
1051
|
+
*/
|
|
1052
|
+
delegators: Array<string>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Number of delegator slots scanned by the node.
|
|
1055
|
+
*/
|
|
1056
|
+
count: number;
|
|
1057
|
+
/**
|
|
1058
|
+
* Block selector echoed by the node.
|
|
1059
|
+
*/
|
|
1060
|
+
block: unknown;
|
|
1061
|
+
};
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* `lyth_getClusterEntity` response.
|
|
1065
|
+
*/
|
|
1066
|
+
type ClusterEntityResponse = {
|
|
1067
|
+
/**
|
|
1068
|
+
* Queried cluster id.
|
|
1069
|
+
*/
|
|
1070
|
+
cluster: number;
|
|
1071
|
+
/**
|
|
1072
|
+
* Entity label, e.g. `"independent"` or `"mono-labs"`.
|
|
1073
|
+
*/
|
|
1074
|
+
entity: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* Raw entity enum discriminant.
|
|
1077
|
+
*/
|
|
1078
|
+
entityCode: number;
|
|
1079
|
+
/**
|
|
1080
|
+
* Block selector echoed by the node.
|
|
1081
|
+
*/
|
|
1082
|
+
block: unknown;
|
|
1083
|
+
};
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* One row from `lyth_getClusterResignations`.
|
|
1087
|
+
*/
|
|
1088
|
+
type ClusterResignationRow = {
|
|
1089
|
+
/**
|
|
1090
|
+
* `0x`-prefixed 48-byte BLS-G1 operator public key.
|
|
1091
|
+
*/
|
|
1092
|
+
operator: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* `wire_pending`, `pending`, or `applied`.
|
|
1095
|
+
*/
|
|
1096
|
+
status: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Submitted-at block height, absent for wire-pending rows.
|
|
1099
|
+
*/
|
|
1100
|
+
submitted_at_height?: bigint;
|
|
1101
|
+
/**
|
|
1102
|
+
* Effective-at block height, absent for wire-pending rows.
|
|
1103
|
+
*/
|
|
1104
|
+
effective_at_height?: bigint;
|
|
1105
|
+
/**
|
|
1106
|
+
* Operator-set resignation nonce.
|
|
1107
|
+
*/
|
|
1108
|
+
nonce: bigint;
|
|
1109
|
+
/**
|
|
1110
|
+
* Whether the expedited path was honored.
|
|
1111
|
+
*/
|
|
1112
|
+
expedited: boolean;
|
|
1113
|
+
};
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* `lyth_getClusterResignations` response.
|
|
1117
|
+
*/
|
|
1118
|
+
type ClusterResignationsResponse = {
|
|
1119
|
+
/**
|
|
1120
|
+
* Rows matching the requested filter.
|
|
1121
|
+
*/
|
|
1122
|
+
rows: Array<ClusterResignationRow>;
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Parent vertex row returned by `lyth_dagParents`.
|
|
1127
|
+
*/
|
|
1128
|
+
type DagParent = {
|
|
1129
|
+
/**
|
|
1130
|
+
* Parent vertex hash.
|
|
1131
|
+
*/
|
|
1132
|
+
vertexHash: string;
|
|
1133
|
+
/**
|
|
1134
|
+
* Parent round.
|
|
1135
|
+
*/
|
|
1136
|
+
round: bigint;
|
|
1137
|
+
};
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* `lyth_dagParents` response.
|
|
1141
|
+
*/
|
|
1142
|
+
type DagParentsResponse = {
|
|
1143
|
+
/**
|
|
1144
|
+
* Response schema version.
|
|
1145
|
+
*/
|
|
1146
|
+
schemaVersion: number;
|
|
1147
|
+
/**
|
|
1148
|
+
* Queried round.
|
|
1149
|
+
*/
|
|
1150
|
+
round: bigint;
|
|
1151
|
+
/**
|
|
1152
|
+
* Parent rows, or `null` when the round has no retained DAG data.
|
|
1153
|
+
*/
|
|
1154
|
+
parents: Array<DagParent> | null;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* `lyth_syncStatus` DAG-sync driver snapshot.
|
|
1159
|
+
*/
|
|
1160
|
+
type DagSyncStatus = {
|
|
1161
|
+
/**
|
|
1162
|
+
* Driver state: `idle`, `probing`, `catching`, or `synced`.
|
|
1163
|
+
*/
|
|
1164
|
+
state: string;
|
|
1165
|
+
/**
|
|
1166
|
+
* Local anchor frontier round.
|
|
1167
|
+
*/
|
|
1168
|
+
localRound: bigint;
|
|
1169
|
+
/**
|
|
1170
|
+
* Highest peer committed round observed.
|
|
1171
|
+
*/
|
|
1172
|
+
peerMaxRound: bigint;
|
|
1173
|
+
/**
|
|
1174
|
+
* `peerMaxRound - localRound`, saturating at zero.
|
|
1175
|
+
*/
|
|
1176
|
+
lag: bigint;
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Transaction extension descriptor included in `lyth_decodeTx`.
|
|
1181
|
+
*/
|
|
1182
|
+
type DecodeTxExtension = {
|
|
1183
|
+
/**
|
|
1184
|
+
* Extension kind byte as a number.
|
|
1185
|
+
*/
|
|
1186
|
+
kind: number;
|
|
1187
|
+
/**
|
|
1188
|
+
* Extension kind byte as `0x`-hex.
|
|
1189
|
+
*/
|
|
1190
|
+
kindHex: string;
|
|
1191
|
+
/**
|
|
1192
|
+
* Extension body bytes as `0x`-hex.
|
|
1193
|
+
*/
|
|
1194
|
+
bodyHex: string;
|
|
1195
|
+
/**
|
|
1196
|
+
* Alias of `bodyHex` emitted by `mono-core` for explorer consumers.
|
|
1197
|
+
*/
|
|
1198
|
+
body: string;
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* Log row included in `lyth_decodeTx`.
|
|
1203
|
+
*/
|
|
1204
|
+
type DecodeTxLog = {
|
|
1205
|
+
/**
|
|
1206
|
+
* Contract address that emitted the log.
|
|
1207
|
+
*/
|
|
1208
|
+
address: string;
|
|
1209
|
+
/**
|
|
1210
|
+
* Indexed topics.
|
|
1211
|
+
*/
|
|
1212
|
+
topics: Array<string>;
|
|
1213
|
+
/**
|
|
1214
|
+
* ABI-encoded log data.
|
|
1215
|
+
*/
|
|
1216
|
+
data: string;
|
|
1217
|
+
};
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* PQ-finality attestation included in `lyth_decodeTx` when available.
|
|
1221
|
+
*/
|
|
1222
|
+
type DecodeTxPqAttestation = {
|
|
1223
|
+
/**
|
|
1224
|
+
* Checkpoint height that attests the transaction.
|
|
1225
|
+
*/
|
|
1226
|
+
checkpointHeight: bigint;
|
|
1227
|
+
/**
|
|
1228
|
+
* Checkpointed state root.
|
|
1229
|
+
*/
|
|
1230
|
+
stateRoot: string;
|
|
1231
|
+
/**
|
|
1232
|
+
* Signer id that produced the attestation.
|
|
1233
|
+
*/
|
|
1234
|
+
signerId: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* Scheme-prefixed signer signature.
|
|
1237
|
+
*/
|
|
1238
|
+
signature: string;
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Structured native fee object attached to a RISC-V/native receipt.
|
|
1243
|
+
*/
|
|
1244
|
+
type NativeReceiptFee$1 = {
|
|
1245
|
+
/**
|
|
1246
|
+
* Total fee in lythoshi.
|
|
1247
|
+
*/
|
|
1248
|
+
total_lythoshi: string;
|
|
1249
|
+
/**
|
|
1250
|
+
* Optional total fee formatted as LYTH numeric text without the unit suffix.
|
|
1251
|
+
*/
|
|
1252
|
+
total_lyth?: string;
|
|
1253
|
+
/**
|
|
1254
|
+
* Execution cycles charged by the receipt.
|
|
1255
|
+
*/
|
|
1256
|
+
cycles_used: bigint;
|
|
1257
|
+
/**
|
|
1258
|
+
* Base price per execution cycle in lythoshi.
|
|
1259
|
+
*/
|
|
1260
|
+
base_price_per_cycle_lythoshi: string;
|
|
1261
|
+
/**
|
|
1262
|
+
* Authenticated state I/O units charged by the receipt.
|
|
1263
|
+
*/
|
|
1264
|
+
state_io_units: bigint;
|
|
1265
|
+
/**
|
|
1266
|
+
* State I/O unit price in lythoshi.
|
|
1267
|
+
*/
|
|
1268
|
+
state_io_price_per_unit_lythoshi: string;
|
|
1269
|
+
/**
|
|
1270
|
+
* Priority tip in lythoshi.
|
|
1271
|
+
*/
|
|
1272
|
+
priority_tip_lythoshi: string;
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* `lyth_decodeTx` response.
|
|
1277
|
+
*/
|
|
1278
|
+
type DecodeTxResponse = {
|
|
1279
|
+
/**
|
|
1280
|
+
* Transaction hash.
|
|
1281
|
+
*/
|
|
1282
|
+
txHash: string;
|
|
1283
|
+
/**
|
|
1284
|
+
* Containing block hash.
|
|
1285
|
+
*/
|
|
1286
|
+
blockHash: string;
|
|
1287
|
+
/**
|
|
1288
|
+
* Containing block number.
|
|
1289
|
+
*/
|
|
1290
|
+
blockNumber: bigint;
|
|
1291
|
+
/**
|
|
1292
|
+
* Transaction index within the block.
|
|
1293
|
+
*/
|
|
1294
|
+
txIndex: number;
|
|
1295
|
+
/**
|
|
1296
|
+
* Sender address.
|
|
1297
|
+
*/
|
|
1298
|
+
from: string;
|
|
1299
|
+
/**
|
|
1300
|
+
* Recipient address, or `null` for contract creation.
|
|
1301
|
+
*/
|
|
1302
|
+
to: string | null;
|
|
1303
|
+
/**
|
|
1304
|
+
* Transferred native value as a hex lythoshi quantity.
|
|
1305
|
+
*/
|
|
1306
|
+
value: string;
|
|
1307
|
+
/**
|
|
1308
|
+
* Sender nonce.
|
|
1309
|
+
*/
|
|
1310
|
+
nonce: bigint;
|
|
1311
|
+
/**
|
|
1312
|
+
* Execution-unit limit.
|
|
1313
|
+
*/
|
|
1314
|
+
executionUnitLimit: bigint;
|
|
1315
|
+
/**
|
|
1316
|
+
* Max execution fee in lythoshi.
|
|
1317
|
+
*/
|
|
1318
|
+
maxExecutionFeeLythoshi: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* Priority tip in lythoshi.
|
|
1321
|
+
*/
|
|
1322
|
+
priorityTipLythoshi: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* Execution units used when the transaction is confirmed.
|
|
1325
|
+
*/
|
|
1326
|
+
executionUnitsUsed: bigint | null;
|
|
1327
|
+
/**
|
|
1328
|
+
* Structured native fee summary.
|
|
1329
|
+
*/
|
|
1330
|
+
fee: NativeReceiptFee$1;
|
|
1331
|
+
/**
|
|
1332
|
+
* Opaque decoded calldata descriptor.
|
|
1333
|
+
*/
|
|
1334
|
+
decodedCalldata: unknown | null;
|
|
1335
|
+
/**
|
|
1336
|
+
* Optional memo extracted from the transaction.
|
|
1337
|
+
*/
|
|
1338
|
+
memo: string | null;
|
|
1339
|
+
/**
|
|
1340
|
+
* Signed transaction extensions carried by the decoded transaction.
|
|
1341
|
+
*/
|
|
1342
|
+
extensions: Array<DecodeTxExtension>;
|
|
1343
|
+
/**
|
|
1344
|
+
* DAG round associated with finality, when available.
|
|
1345
|
+
*/
|
|
1346
|
+
round: bigint | null;
|
|
1347
|
+
/**
|
|
1348
|
+
* Cluster id associated with finality, when available.
|
|
1349
|
+
*/
|
|
1350
|
+
clusterId: number | null;
|
|
1351
|
+
/**
|
|
1352
|
+
* Opaque BLS attestation payload.
|
|
1353
|
+
*/
|
|
1354
|
+
blsAttestation: unknown | null;
|
|
1355
|
+
/**
|
|
1356
|
+
* PQ-finality attestation payload.
|
|
1357
|
+
*/
|
|
1358
|
+
pqAttestation: DecodeTxPqAttestation | null;
|
|
1359
|
+
/**
|
|
1360
|
+
* Opaque finality proof payload.
|
|
1361
|
+
*/
|
|
1362
|
+
finalityProof: unknown | null;
|
|
1363
|
+
/**
|
|
1364
|
+
* Logs emitted by the transaction.
|
|
1365
|
+
*/
|
|
1366
|
+
logs: Array<DecodeTxLog>;
|
|
1367
|
+
/**
|
|
1368
|
+
* `success`, `reverted`, `unknown`, or a forward-compatible string.
|
|
1369
|
+
*/
|
|
1370
|
+
status: string;
|
|
1371
|
+
/**
|
|
1372
|
+
* Node-supplied execution error code when available.
|
|
1373
|
+
*/
|
|
1374
|
+
errorCode: string | null;
|
|
1375
|
+
};
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* `lyth_getDelegationCap` response.
|
|
1379
|
+
*/
|
|
1380
|
+
type DelegationCapResponse = {
|
|
1381
|
+
/**
|
|
1382
|
+
* Per-cluster cap in basis points. `u32::MAX` means disabled.
|
|
1383
|
+
*/
|
|
1384
|
+
capBps: number;
|
|
1385
|
+
/**
|
|
1386
|
+
* Height of the most recent milestone that changed the cap.
|
|
1387
|
+
*/
|
|
1388
|
+
lastChangedAtHeight: bigint;
|
|
1389
|
+
/**
|
|
1390
|
+
* Block height sampled by the node.
|
|
1391
|
+
*/
|
|
1392
|
+
blockNumber: bigint;
|
|
1393
|
+
};
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Per-wallet delegation event row surfaced by `lyth_getDelegationHistory`.
|
|
1397
|
+
*/
|
|
1398
|
+
type DelegationHistoryRecord = {
|
|
1399
|
+
/**
|
|
1400
|
+
* Block height the event landed in.
|
|
1401
|
+
*/
|
|
1402
|
+
blockHeight: bigint;
|
|
1403
|
+
/**
|
|
1404
|
+
* Tx index within the block.
|
|
1405
|
+
*/
|
|
1406
|
+
txIndex: number;
|
|
1407
|
+
/**
|
|
1408
|
+
* Log index within the tx.
|
|
1409
|
+
*/
|
|
1410
|
+
logIndex: number;
|
|
1411
|
+
/**
|
|
1412
|
+
* Wallet that performed the delegation move.
|
|
1413
|
+
*/
|
|
1414
|
+
wallet: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* Source or only cluster id.
|
|
1417
|
+
*/
|
|
1418
|
+
cluster: number;
|
|
1419
|
+
/**
|
|
1420
|
+
* Destination cluster id for redelegations.
|
|
1421
|
+
*/
|
|
1422
|
+
toCluster: number | null;
|
|
1423
|
+
/**
|
|
1424
|
+
* Event kind: `delegated`, `undelegated`, or `redelegated`.
|
|
1425
|
+
*/
|
|
1426
|
+
kind: string;
|
|
1427
|
+
/**
|
|
1428
|
+
* Weight moved in basis points.
|
|
1429
|
+
*/
|
|
1430
|
+
weightBps: number;
|
|
1431
|
+
/**
|
|
1432
|
+
* Wallet total committed weight after the event when known.
|
|
1433
|
+
*/
|
|
1434
|
+
walletTotalBps: number | null;
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* One delegation row in `lyth_getDelegations`.
|
|
1439
|
+
*/
|
|
1440
|
+
type DelegationRow = {
|
|
1441
|
+
/**
|
|
1442
|
+
* Cluster id receiving the delegated weight.
|
|
1443
|
+
*/
|
|
1444
|
+
cluster: number;
|
|
1445
|
+
/**
|
|
1446
|
+
* Delegated weight in basis points.
|
|
1447
|
+
*/
|
|
1448
|
+
weightBps: number;
|
|
1449
|
+
};
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* `lyth_getDelegations` response.
|
|
1453
|
+
*/
|
|
1454
|
+
type DelegationsResponse = {
|
|
1455
|
+
/**
|
|
1456
|
+
* Queried wallet address.
|
|
1457
|
+
*/
|
|
1458
|
+
wallet: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* Per-cluster delegation rows.
|
|
1461
|
+
*/
|
|
1462
|
+
rows: Array<DelegationRow>;
|
|
1463
|
+
/**
|
|
1464
|
+
* Sum of row weights.
|
|
1465
|
+
*/
|
|
1466
|
+
totalBps: number;
|
|
1467
|
+
/**
|
|
1468
|
+
* Block selector echoed by the node.
|
|
1469
|
+
*/
|
|
1470
|
+
block: unknown;
|
|
1471
|
+
};
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* `lyth_getEncryptionKey` response.
|
|
1475
|
+
*/
|
|
1476
|
+
type EncryptionKeyResponse = {
|
|
1477
|
+
/**
|
|
1478
|
+
* KEM algorithm tag.
|
|
1479
|
+
*/
|
|
1480
|
+
algo: string;
|
|
1481
|
+
/**
|
|
1482
|
+
* Cluster encryption epoch.
|
|
1483
|
+
*/
|
|
1484
|
+
epoch: bigint;
|
|
1485
|
+
/**
|
|
1486
|
+
* ML-KEM-768 encapsulation key.
|
|
1487
|
+
*/
|
|
1488
|
+
encapsulationKey: string;
|
|
1489
|
+
};
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* `lyth_getEntityRatchet` response.
|
|
1493
|
+
*/
|
|
1494
|
+
type EntityRatchetResponse = {
|
|
1495
|
+
/**
|
|
1496
|
+
* Active foundation-entity cluster count.
|
|
1497
|
+
*/
|
|
1498
|
+
active: number;
|
|
1499
|
+
/**
|
|
1500
|
+
* Published ratchet threshold. `u32::MAX` means unset.
|
|
1501
|
+
*/
|
|
1502
|
+
threshold: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* Block selector echoed by the node.
|
|
1505
|
+
*/
|
|
1506
|
+
block: unknown;
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* `eth_feeHistory` response.
|
|
1511
|
+
*/
|
|
1512
|
+
type FeeHistoryResponse = {
|
|
1513
|
+
/**
|
|
1514
|
+
* Hex height of the first block in the window.
|
|
1515
|
+
*/
|
|
1516
|
+
oldestBlock: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* `N+1` base-fee values (one per block, plus the next-block prediction).
|
|
1519
|
+
*/
|
|
1520
|
+
baseFeePerGas: Array<string>;
|
|
1521
|
+
/**
|
|
1522
|
+
* `N` `gas_used / gas_limit` ratios.
|
|
1523
|
+
*/
|
|
1524
|
+
gasUsedRatio: Array<number>;
|
|
1525
|
+
/**
|
|
1526
|
+
* `N × len(percentiles)` 2D priority-fee approximations. Empty when
|
|
1527
|
+
* caller did not request percentiles.
|
|
1528
|
+
*/
|
|
1529
|
+
reward: Array<Array<string>>;
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
/**
|
|
1533
|
+
* Requested block range in `lyth_gapRecords`.
|
|
1534
|
+
*/
|
|
1535
|
+
type GapRange = {
|
|
1536
|
+
/**
|
|
1537
|
+
* First block in the requested range.
|
|
1538
|
+
*/
|
|
1539
|
+
fromBlock: bigint;
|
|
1540
|
+
/**
|
|
1541
|
+
* Last block in the requested range.
|
|
1542
|
+
*/
|
|
1543
|
+
toBlock: bigint;
|
|
1544
|
+
};
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* One retained ingestion/indexing gap.
|
|
1548
|
+
*/
|
|
1549
|
+
type GapRecord = {
|
|
1550
|
+
/**
|
|
1551
|
+
* First block in the gap.
|
|
1552
|
+
*/
|
|
1553
|
+
startBlock: bigint;
|
|
1554
|
+
/**
|
|
1555
|
+
* Last block in the gap.
|
|
1556
|
+
*/
|
|
1557
|
+
endBlock: bigint;
|
|
1558
|
+
/**
|
|
1559
|
+
* Number of blocks in the gap.
|
|
1560
|
+
*/
|
|
1561
|
+
blockCount: bigint;
|
|
1562
|
+
/**
|
|
1563
|
+
* Start timestamp in UNIX seconds.
|
|
1564
|
+
*/
|
|
1565
|
+
startTimestamp: bigint;
|
|
1566
|
+
/**
|
|
1567
|
+
* End timestamp in UNIX seconds.
|
|
1568
|
+
*/
|
|
1569
|
+
endTimestamp: bigint;
|
|
1570
|
+
/**
|
|
1571
|
+
* Duration in seconds.
|
|
1572
|
+
*/
|
|
1573
|
+
durationSeconds: bigint;
|
|
1574
|
+
/**
|
|
1575
|
+
* Node-supplied reason label.
|
|
1576
|
+
*/
|
|
1577
|
+
reason: string;
|
|
1578
|
+
};
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* `lyth_gapRecords` response.
|
|
1582
|
+
*/
|
|
1583
|
+
type GapRecordsResponse = {
|
|
1584
|
+
/**
|
|
1585
|
+
* Response schema version.
|
|
1586
|
+
*/
|
|
1587
|
+
schemaVersion: number;
|
|
1588
|
+
/**
|
|
1589
|
+
* Requested range.
|
|
1590
|
+
*/
|
|
1591
|
+
range: GapRange;
|
|
1592
|
+
/**
|
|
1593
|
+
* Gap rows in the requested range.
|
|
1594
|
+
*/
|
|
1595
|
+
gapRecords: Array<GapRecord>;
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* `lyth_indexerStatus` envelope. `null` on the wire surfaces as
|
|
1600
|
+
* `Option::None` here.
|
|
1601
|
+
*/
|
|
1602
|
+
type IndexerStatus = {
|
|
1603
|
+
/**
|
|
1604
|
+
* Highest block fully ingested.
|
|
1605
|
+
*/
|
|
1606
|
+
currentHeight: bigint;
|
|
1607
|
+
/**
|
|
1608
|
+
* Highest block observed.
|
|
1609
|
+
*/
|
|
1610
|
+
latestHeight?: bigint;
|
|
1611
|
+
/**
|
|
1612
|
+
* Active schema version.
|
|
1613
|
+
*/
|
|
1614
|
+
schemaVersion: number;
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* `lyth_mempoolStatus` aggregate.
|
|
1619
|
+
*/
|
|
1620
|
+
type MempoolSnapshot = {
|
|
1621
|
+
/**
|
|
1622
|
+
* Tx count in the Ready bucket.
|
|
1623
|
+
*/
|
|
1624
|
+
count_ready: bigint;
|
|
1625
|
+
/**
|
|
1626
|
+
* Tx count in the Pending bucket.
|
|
1627
|
+
*/
|
|
1628
|
+
count_pending: bigint;
|
|
1629
|
+
/**
|
|
1630
|
+
* Mailbox depth gauge.
|
|
1631
|
+
*/
|
|
1632
|
+
mailbox_depth: bigint;
|
|
1633
|
+
/**
|
|
1634
|
+
* Bytes held per tx class.
|
|
1635
|
+
*/
|
|
1636
|
+
bytes_by_class: [bigint, bigint, bigint, bigint, bigint, bigint, bigint];
|
|
1637
|
+
};
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* `mesh_decodeTx` response.
|
|
1641
|
+
*/
|
|
1642
|
+
type MeshDecodedTx = {
|
|
1643
|
+
/**
|
|
1644
|
+
* Chain id as a hex quantity.
|
|
1645
|
+
*/
|
|
1646
|
+
chain_id: string;
|
|
1647
|
+
/**
|
|
1648
|
+
* Nonce as a hex quantity.
|
|
1649
|
+
*/
|
|
1650
|
+
nonce: string;
|
|
1651
|
+
/**
|
|
1652
|
+
* Max priority fee per gas as a decimal string.
|
|
1653
|
+
*/
|
|
1654
|
+
max_priority_fee_per_gas: string;
|
|
1655
|
+
/**
|
|
1656
|
+
* Max fee per gas as a decimal string.
|
|
1657
|
+
*/
|
|
1658
|
+
max_fee_per_gas: string;
|
|
1659
|
+
/**
|
|
1660
|
+
* Gas limit as a JSON number.
|
|
1661
|
+
*/
|
|
1662
|
+
gas_limit: bigint;
|
|
1663
|
+
/**
|
|
1664
|
+
* Recipient address, or null for contract creation.
|
|
1665
|
+
*/
|
|
1666
|
+
to: string | null;
|
|
1667
|
+
/**
|
|
1668
|
+
* Value as a decimal string.
|
|
1669
|
+
*/
|
|
1670
|
+
value: string;
|
|
1671
|
+
/**
|
|
1672
|
+
* Input/calldata hex.
|
|
1673
|
+
*/
|
|
1674
|
+
input: string;
|
|
1675
|
+
/**
|
|
1676
|
+
* Present when decoding an unsigned transaction.
|
|
1677
|
+
*/
|
|
1678
|
+
sighash?: string;
|
|
1679
|
+
/**
|
|
1680
|
+
* Present when decoding a signed transaction.
|
|
1681
|
+
*/
|
|
1682
|
+
from?: string;
|
|
1683
|
+
/**
|
|
1684
|
+
* Present when decoding a signed transaction.
|
|
1685
|
+
*/
|
|
1686
|
+
tx_hash?: string;
|
|
1687
|
+
};
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* `mesh_combineTx` response.
|
|
1691
|
+
*/
|
|
1692
|
+
type MeshSignedTxResponse = {
|
|
1693
|
+
/**
|
|
1694
|
+
* `0x`-hex bincode signed transaction envelope.
|
|
1695
|
+
*/
|
|
1696
|
+
signed_tx: string;
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Intent accepted by `mesh_buildUnsignedTx`.
|
|
1701
|
+
*/
|
|
1702
|
+
type MeshTxIntent = {
|
|
1703
|
+
/**
|
|
1704
|
+
* Sender nonce, hex or decimal string.
|
|
1705
|
+
*/
|
|
1706
|
+
nonce: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* EIP-1559 max fee per gas, hex or decimal string.
|
|
1709
|
+
*/
|
|
1710
|
+
max_fee_per_gas: string;
|
|
1711
|
+
/**
|
|
1712
|
+
* EIP-1559 max priority fee per gas, hex or decimal string.
|
|
1713
|
+
*/
|
|
1714
|
+
max_priority_fee_per_gas: string;
|
|
1715
|
+
/**
|
|
1716
|
+
* Gas limit, hex or decimal string.
|
|
1717
|
+
*/
|
|
1718
|
+
gas_limit: string;
|
|
1719
|
+
/**
|
|
1720
|
+
* Recipient address. `None` means contract creation.
|
|
1721
|
+
*/
|
|
1722
|
+
to?: string;
|
|
1723
|
+
/**
|
|
1724
|
+
* Value, hex or decimal string.
|
|
1725
|
+
*/
|
|
1726
|
+
value?: string;
|
|
1727
|
+
/**
|
|
1728
|
+
* Input/calldata hex.
|
|
1729
|
+
*/
|
|
1730
|
+
input?: string;
|
|
1731
|
+
/**
|
|
1732
|
+
* Optional chain id override, hex or decimal string.
|
|
1733
|
+
*/
|
|
1734
|
+
chain_id?: string;
|
|
1735
|
+
};
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* `mesh_buildUnsignedTx` response.
|
|
1739
|
+
*/
|
|
1740
|
+
type MeshUnsignedTxResponse = {
|
|
1741
|
+
/**
|
|
1742
|
+
* `0x`-hex bincode unsigned transaction envelope.
|
|
1743
|
+
*/
|
|
1744
|
+
unsigned_tx: string;
|
|
1745
|
+
/**
|
|
1746
|
+
* `0x`-hex signing hash for the wallet.
|
|
1747
|
+
*/
|
|
1748
|
+
sighash: string;
|
|
1749
|
+
};
|
|
1750
|
+
|
|
1751
|
+
/**
|
|
1752
|
+
* `debug_p2pPeers` entry.
|
|
1753
|
+
*/
|
|
1754
|
+
type PeerSummary = {
|
|
1755
|
+
/**
|
|
1756
|
+
* libp2p peer id (base58).
|
|
1757
|
+
*/
|
|
1758
|
+
peerId: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* Declared role.
|
|
1761
|
+
*/
|
|
1762
|
+
role: string;
|
|
1763
|
+
/**
|
|
1764
|
+
* Listen addresses.
|
|
1765
|
+
*/
|
|
1766
|
+
listenAddrs: Array<string>;
|
|
1767
|
+
/**
|
|
1768
|
+
* `agent_version` from libp2p identify.
|
|
1769
|
+
*/
|
|
1770
|
+
agentVersion: string;
|
|
1771
|
+
/**
|
|
1772
|
+
* Reputation score.
|
|
1773
|
+
*/
|
|
1774
|
+
score: number;
|
|
1775
|
+
/**
|
|
1776
|
+
* Whether the peer is in any gossip mesh.
|
|
1777
|
+
*/
|
|
1778
|
+
inMesh: boolean;
|
|
1779
|
+
};
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* `lyth_mempoolPending` per-tx entry.
|
|
1783
|
+
*/
|
|
1784
|
+
type PendingTxSummary = {
|
|
1785
|
+
/**
|
|
1786
|
+
* Tx hash.
|
|
1787
|
+
*/
|
|
1788
|
+
txHash: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* Sender nonce of this transaction.
|
|
1791
|
+
*/
|
|
1792
|
+
nonce: bigint;
|
|
1793
|
+
/**
|
|
1794
|
+
* Class index (0..=6).
|
|
1795
|
+
*/
|
|
1796
|
+
class: number;
|
|
1797
|
+
/**
|
|
1798
|
+
* Wire size in bytes.
|
|
1799
|
+
*/
|
|
1800
|
+
wireBytesLen: number;
|
|
1801
|
+
/**
|
|
1802
|
+
* `true` if parked in the ready bucket.
|
|
1803
|
+
*/
|
|
1804
|
+
ready: boolean;
|
|
1805
|
+
};
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* `lyth_listActivePrecompiles` entry — OI-0170 / ADR-0015 §5.
|
|
1809
|
+
*/
|
|
1810
|
+
type PrecompileDescriptor = {
|
|
1811
|
+
/**
|
|
1812
|
+
* 20-byte precompile address, `0x`-hex.
|
|
1813
|
+
*/
|
|
1814
|
+
address: string;
|
|
1815
|
+
/**
|
|
1816
|
+
* Stable identifier (e.g. `"agent"`, `"oracle"`, `"delegation"`).
|
|
1817
|
+
*/
|
|
1818
|
+
name: string;
|
|
1819
|
+
/**
|
|
1820
|
+
* Whether milestone gates can toggle this precompile.
|
|
1821
|
+
*/
|
|
1822
|
+
gateable: boolean;
|
|
1823
|
+
/**
|
|
1824
|
+
* Whether the precompile is currently dispatchable.
|
|
1825
|
+
*/
|
|
1826
|
+
enabled: boolean;
|
|
1827
|
+
/**
|
|
1828
|
+
* Stable capability id from the milestone registry.
|
|
1829
|
+
*/
|
|
1830
|
+
capabilityId: string;
|
|
1831
|
+
/**
|
|
1832
|
+
* Height of the milestone that activated this capability, when any.
|
|
1833
|
+
*/
|
|
1834
|
+
activationHeight: bigint | null;
|
|
1835
|
+
};
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* `lyth_listProviders` / `lyth_getRegistration` record.
|
|
1839
|
+
*/
|
|
1840
|
+
type RegistryRecord = {
|
|
1841
|
+
/**
|
|
1842
|
+
* libp2p peer id, `0x`-hex 32-byte.
|
|
1843
|
+
*/
|
|
1844
|
+
peerId: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* Capability bitmask.
|
|
1847
|
+
*/
|
|
1848
|
+
capabilities: number;
|
|
1849
|
+
/**
|
|
1850
|
+
* Primary external endpoint URL.
|
|
1851
|
+
*/
|
|
1852
|
+
endpoint: string;
|
|
1853
|
+
/**
|
|
1854
|
+
* Current bond, hex quantity.
|
|
1855
|
+
*/
|
|
1856
|
+
bond: string;
|
|
1857
|
+
/**
|
|
1858
|
+
* Uptime in basis points (0..=10_000).
|
|
1859
|
+
*/
|
|
1860
|
+
uptimeBps: number;
|
|
1861
|
+
};
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* `lyth_richList` response.
|
|
1865
|
+
*/
|
|
1866
|
+
type RichListResponse = {
|
|
1867
|
+
/**
|
|
1868
|
+
* Response schema version.
|
|
1869
|
+
*/
|
|
1870
|
+
schemaVersion: number;
|
|
1871
|
+
/**
|
|
1872
|
+
* Queried token id.
|
|
1873
|
+
*/
|
|
1874
|
+
tokenId: string;
|
|
1875
|
+
/**
|
|
1876
|
+
* Result limit applied by the node.
|
|
1877
|
+
*/
|
|
1878
|
+
limit: number;
|
|
1879
|
+
/**
|
|
1880
|
+
* Holder rows.
|
|
1881
|
+
*/
|
|
1882
|
+
holders: Array<RichListHolder>;
|
|
1883
|
+
};
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* `lyth_currentRound` round shape.
|
|
1887
|
+
*/
|
|
1888
|
+
type RoundInfo = {
|
|
1889
|
+
/**
|
|
1890
|
+
* Latest committed height.
|
|
1891
|
+
*/
|
|
1892
|
+
height: bigint;
|
|
1893
|
+
};
|
|
1894
|
+
|
|
1895
|
+
/**
|
|
1896
|
+
* `lyth_getStorageProof` batch response.
|
|
1897
|
+
*/
|
|
1898
|
+
type StorageProofBatch = {
|
|
1899
|
+
/**
|
|
1900
|
+
* State-root the proofs verify against.
|
|
1901
|
+
*/
|
|
1902
|
+
stateRoot: string;
|
|
1903
|
+
/**
|
|
1904
|
+
* Block height the proofs were generated against.
|
|
1905
|
+
*/
|
|
1906
|
+
blockNumber: bigint;
|
|
1907
|
+
/**
|
|
1908
|
+
* One opaque proof envelope per requested slot.
|
|
1909
|
+
*/
|
|
1910
|
+
proofs: unknown[];
|
|
1911
|
+
};
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* `eth_syncing` response when the node is mid-sync. Returns `false`
|
|
1915
|
+
* when the node is caught up — the SDK surfaces that as
|
|
1916
|
+
* `Option::None`.
|
|
1917
|
+
*/
|
|
1918
|
+
type SyncStatus = {
|
|
1919
|
+
/**
|
|
1920
|
+
* First block of the current sync batch.
|
|
1921
|
+
*/
|
|
1922
|
+
startingBlock: string;
|
|
1923
|
+
/**
|
|
1924
|
+
* Last block applied locally.
|
|
1925
|
+
*/
|
|
1926
|
+
currentBlock: string;
|
|
1927
|
+
/**
|
|
1928
|
+
* Highest block advertised by peers.
|
|
1929
|
+
*/
|
|
1930
|
+
highestBlock: string;
|
|
1931
|
+
};
|
|
1932
|
+
|
|
1933
|
+
/**
|
|
1934
|
+
* Native MRC identity attached to a token-balance row.
|
|
1935
|
+
*/
|
|
1936
|
+
type TokenBalanceMrcIdentity = {
|
|
1937
|
+
/**
|
|
1938
|
+
* MRC standard, currently `mrc20`, `mrc721`, `mrc1155`, or `mrc4626`.
|
|
1939
|
+
*/
|
|
1940
|
+
standard: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* MRC asset id, collection id, or MRC-4626 vault id.
|
|
1943
|
+
*/
|
|
1944
|
+
assetId: string;
|
|
1945
|
+
/**
|
|
1946
|
+
* Token id inside the collection for MRC-721/MRC-1155 rows; `null` for MRC-20/MRC-4626.
|
|
1947
|
+
*/
|
|
1948
|
+
tokenId?: string | null;
|
|
1949
|
+
};
|
|
1950
|
+
|
|
1951
|
+
/**
|
|
1952
|
+
* Per-asset balance row surfaced by `lyth_getTokenBalances`.
|
|
1953
|
+
*/
|
|
1954
|
+
type TokenBalanceRecord = {
|
|
1955
|
+
/**
|
|
1956
|
+
* 32-byte token id, `0x`-hex.
|
|
1957
|
+
*/
|
|
1958
|
+
tokenId: string;
|
|
1959
|
+
/**
|
|
1960
|
+
* Balance as a decimal string.
|
|
1961
|
+
*/
|
|
1962
|
+
balance: string;
|
|
1963
|
+
/**
|
|
1964
|
+
* Block height the balance was last observed at.
|
|
1965
|
+
*/
|
|
1966
|
+
updatedAtBlock: bigint;
|
|
1967
|
+
/**
|
|
1968
|
+
* Native MRC identity, when the balance came from a native MRC row.
|
|
1969
|
+
*/
|
|
1970
|
+
mrc?: TokenBalanceMrcIdentity | null;
|
|
1971
|
+
/**
|
|
1972
|
+
* Optional single bridge route disclosure associated with this asset row.
|
|
1973
|
+
*/
|
|
1974
|
+
bridgeRouteDisclosure?: BridgeRouteDisclosure | null;
|
|
1975
|
+
/**
|
|
1976
|
+
* Optional bridge route disclosures associated with this asset row.
|
|
1977
|
+
*/
|
|
1978
|
+
bridgeRouteDisclosures?: BridgeRouteDisclosure[] | null;
|
|
1979
|
+
};
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* `lyth_getTpmAttestation` response.
|
|
1983
|
+
*/
|
|
1984
|
+
type TpmAttestationResponse = {
|
|
1985
|
+
/**
|
|
1986
|
+
* 32-byte peer id.
|
|
1987
|
+
*/
|
|
1988
|
+
peerId: string;
|
|
1989
|
+
/**
|
|
1990
|
+
* 32-byte digest over the canonical TPM quote bytes.
|
|
1991
|
+
*/
|
|
1992
|
+
quoteDigest: string;
|
|
1993
|
+
/**
|
|
1994
|
+
* 32-byte EK identifier.
|
|
1995
|
+
*/
|
|
1996
|
+
ekId: string;
|
|
1997
|
+
/**
|
|
1998
|
+
* Block selector echoed by the node.
|
|
1999
|
+
*/
|
|
2000
|
+
block: unknown;
|
|
2001
|
+
};
|
|
2002
|
+
|
|
2003
|
+
/**
|
|
2004
|
+
* Receipt for a confirmed transaction.
|
|
2005
|
+
*/
|
|
2006
|
+
type TransactionReceipt = {
|
|
2007
|
+
/**
|
|
2008
|
+
* Transaction hash.
|
|
2009
|
+
*/
|
|
2010
|
+
tx_hash: string;
|
|
2011
|
+
/**
|
|
2012
|
+
* Block hash that contains the transaction.
|
|
2013
|
+
*/
|
|
2014
|
+
block_hash: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* Block height that contains the transaction.
|
|
2017
|
+
*/
|
|
2018
|
+
block_number: bigint;
|
|
2019
|
+
/**
|
|
2020
|
+
* Transaction index within the block.
|
|
2021
|
+
*/
|
|
2022
|
+
tx_index: number;
|
|
2023
|
+
/**
|
|
2024
|
+
* `1` on success, `0` on revert.
|
|
2025
|
+
*/
|
|
2026
|
+
status: number;
|
|
2027
|
+
/**
|
|
2028
|
+
* Execution units consumed by this transaction.
|
|
2029
|
+
*/
|
|
2030
|
+
executionUnitsUsed: bigint;
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
/**
|
|
2034
|
+
* Ethereum-shaped transaction view returned by `eth_getTransactionByHash`.
|
|
2035
|
+
*/
|
|
2036
|
+
type TransactionView = {
|
|
2037
|
+
/**
|
|
2038
|
+
* Transaction hash.
|
|
2039
|
+
*/
|
|
2040
|
+
hash: string;
|
|
2041
|
+
/**
|
|
2042
|
+
* Block hash that contains the transaction.
|
|
2043
|
+
*/
|
|
2044
|
+
blockHash: string;
|
|
2045
|
+
/**
|
|
2046
|
+
* Block height as a hex quantity.
|
|
2047
|
+
*/
|
|
2048
|
+
blockNumber: string;
|
|
2049
|
+
/**
|
|
2050
|
+
* Transaction index as a hex quantity.
|
|
2051
|
+
*/
|
|
2052
|
+
transactionIndex: string;
|
|
2053
|
+
/**
|
|
2054
|
+
* Sender address.
|
|
2055
|
+
*/
|
|
2056
|
+
from: string;
|
|
2057
|
+
/**
|
|
2058
|
+
* Recipient address, or `null` for contract creation.
|
|
2059
|
+
*/
|
|
2060
|
+
to: string | null;
|
|
2061
|
+
/**
|
|
2062
|
+
* Sender nonce as a hex quantity.
|
|
2063
|
+
*/
|
|
2064
|
+
nonce: string;
|
|
2065
|
+
/**
|
|
2066
|
+
* Transferred value as a hex quantity.
|
|
2067
|
+
*/
|
|
2068
|
+
value: string;
|
|
2069
|
+
/**
|
|
2070
|
+
* Gas limit as a hex quantity.
|
|
2071
|
+
*/
|
|
2072
|
+
gas: string;
|
|
2073
|
+
/**
|
|
2074
|
+
* EIP-1559 max fee per gas as a hex quantity.
|
|
2075
|
+
*/
|
|
2076
|
+
maxFeePerGas: string;
|
|
2077
|
+
/**
|
|
2078
|
+
* EIP-1559 max priority fee per gas as a hex quantity.
|
|
2079
|
+
*/
|
|
2080
|
+
maxPriorityFeePerGas: string;
|
|
2081
|
+
/**
|
|
2082
|
+
* Calldata or deployment bytecode.
|
|
2083
|
+
*/
|
|
2084
|
+
input: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* EIP-2718 transaction type. `mono-core` currently renders `"0x2"`.
|
|
2087
|
+
*/
|
|
2088
|
+
type: string;
|
|
2089
|
+
/**
|
|
2090
|
+
* Chain id as a hex quantity.
|
|
2091
|
+
*/
|
|
2092
|
+
chainId: string;
|
|
2093
|
+
};
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* Wire-shape types served by a `mono-core` node.
|
|
2097
|
+
*
|
|
2098
|
+
* Re-exports the `ts-rs`-generated definitions in `./bindings/`. Those
|
|
2099
|
+
* files are the authoritative source — they are written from Rust by
|
|
2100
|
+
* `cargo test --features ts-bindings` and copied into this package via
|
|
2101
|
+
* `pnpm run build:bindings` / `bash scripts/sync-bindings.sh`.
|
|
2102
|
+
*
|
|
2103
|
+
* Quantities (`u64` etc.) surface as `bigint` to preserve full
|
|
2104
|
+
* precision against the chain's 256-bit world. Hashes / addresses /
|
|
2105
|
+
* `0x`-hex byte vectors surface as `string`.
|
|
2106
|
+
*/
|
|
2107
|
+
|
|
2108
|
+
/** `0x`-prefixed hex byte vector. */
|
|
2109
|
+
type Hex = string;
|
|
2110
|
+
/** `0x`-prefixed hex 20-byte address. */
|
|
2111
|
+
type Address = string;
|
|
2112
|
+
/** `0x`-prefixed hex 32-byte hash. */
|
|
2113
|
+
type Hash = string;
|
|
2114
|
+
/** `0x`-prefixed hex unsigned quantity. */
|
|
2115
|
+
type Quantity = string;
|
|
2116
|
+
|
|
2117
|
+
/**
|
|
2118
|
+
* Block selector for `eth_getBlock*`, `eth_call`, etc. — accepts a tag,
|
|
2119
|
+
* a numeric height (encoded by the client as `0x`-hex), a `bigint`, or
|
|
2120
|
+
* a 32-byte hash where the spec allows it.
|
|
2121
|
+
*/
|
|
2122
|
+
type BlockSelector = BlockTag | number | bigint | Hash;
|
|
2123
|
+
/** Encode a `BlockSelector` for a JSON-RPC params array. */
|
|
2124
|
+
declare function encodeBlockSelector(b: BlockSelector): string;
|
|
2125
|
+
|
|
2126
|
+
declare const NATIVE_MARKET_ORDER_BOOK_STREAM_TOPIC: "nativeMarketOrderBook";
|
|
2127
|
+
declare const API_STREAM_TOPICS: readonly ["newHeads", "newPendingTx", "logs", "newCommit", "dagVertices", "registry", "marketTrades", "nativeMarketOrderBook", "gapRecords", "nativeEvents"];
|
|
2128
|
+
type ApiStreamTopic = (typeof API_STREAM_TOPICS)[number];
|
|
2129
|
+
type NativeMarketOrderBookStreamAction = "upsert" | "remove";
|
|
2130
|
+
type NativeMarketOrderBookDelta = NativeMarketOrderBookStreamPayload;
|
|
2131
|
+
interface NativeMarketOrderBookStreamPayload {
|
|
2132
|
+
marketId: string;
|
|
2133
|
+
orderId: string;
|
|
2134
|
+
relatedOrderId?: string;
|
|
2135
|
+
eventName: string;
|
|
2136
|
+
action: NativeMarketOrderBookStreamAction;
|
|
2137
|
+
side?: string;
|
|
2138
|
+
price?: string;
|
|
2139
|
+
quantity?: string;
|
|
2140
|
+
remaining?: string;
|
|
2141
|
+
status?: string;
|
|
2142
|
+
blockHeight: number;
|
|
2143
|
+
txIndex: number;
|
|
2144
|
+
logIndex: number;
|
|
2145
|
+
}
|
|
2146
|
+
interface NativeMarketOrderBookDeltasRequest {
|
|
2147
|
+
fromBlock: number | bigint | string;
|
|
2148
|
+
toBlock: number | bigint | string;
|
|
2149
|
+
limit?: number | bigint | string | null;
|
|
2150
|
+
cursor?: string | null;
|
|
2151
|
+
txIndex?: number | bigint | string | null;
|
|
2152
|
+
logIndex?: number | bigint | string | null;
|
|
2153
|
+
address?: string | null;
|
|
2154
|
+
eventTopic?: string | null;
|
|
2155
|
+
eventName?: string | null;
|
|
2156
|
+
marketId?: string | null;
|
|
2157
|
+
listingId?: string | null;
|
|
2158
|
+
primaryId?: string | null;
|
|
2159
|
+
relatedId?: string | null;
|
|
2160
|
+
tokenId?: string | null;
|
|
2161
|
+
account?: string | null;
|
|
2162
|
+
counterparty?: string | null;
|
|
2163
|
+
}
|
|
2164
|
+
interface NativeMarketOrderBookDeltasResponseFilters {
|
|
2165
|
+
family?: "market" | string | null;
|
|
2166
|
+
txIndex?: number | null;
|
|
2167
|
+
logIndex?: number | null;
|
|
2168
|
+
address?: string | null;
|
|
2169
|
+
eventTopic?: string | null;
|
|
2170
|
+
eventName?: string | null;
|
|
2171
|
+
marketId?: string | null;
|
|
2172
|
+
listingId?: string | null;
|
|
2173
|
+
primaryId?: string | null;
|
|
2174
|
+
relatedId?: string | null;
|
|
2175
|
+
tokenId?: string | null;
|
|
2176
|
+
account?: string | null;
|
|
2177
|
+
counterparty?: string | null;
|
|
2178
|
+
}
|
|
2179
|
+
interface NativeMarketOrderBookDeltasSource {
|
|
2180
|
+
indexerProvider: string;
|
|
2181
|
+
projection: "native_market_orderbook_deltas" | string;
|
|
2182
|
+
historyApi: "lyth_nativeMarketEvents" | string;
|
|
2183
|
+
[key: string]: unknown;
|
|
2184
|
+
}
|
|
2185
|
+
interface NativeMarketOrderBookDeltasResponse {
|
|
2186
|
+
schemaVersion: number;
|
|
2187
|
+
fromBlock: number;
|
|
2188
|
+
toBlock: number;
|
|
2189
|
+
limit: number | null;
|
|
2190
|
+
cursor: string | null;
|
|
2191
|
+
nextCursor: string | null;
|
|
2192
|
+
filters: NativeMarketOrderBookDeltasResponseFilters;
|
|
2193
|
+
replay: true;
|
|
2194
|
+
streamTopic: typeof NATIVE_MARKET_ORDER_BOOK_STREAM_TOPIC;
|
|
2195
|
+
deltas: NativeMarketOrderBookDelta[];
|
|
2196
|
+
source: NativeMarketOrderBookDeltasSource;
|
|
2197
|
+
}
|
|
2198
|
+
interface ApiStreamTopicRetention {
|
|
2199
|
+
kind: "live_broadcast" | string;
|
|
2200
|
+
replay?: boolean;
|
|
2201
|
+
historyApis?: string[];
|
|
2202
|
+
[key: string]: unknown;
|
|
2203
|
+
}
|
|
2204
|
+
interface ApiStreamTopicMetadata<TTopic extends string = ApiStreamTopic | string> {
|
|
2205
|
+
topic: TTopic;
|
|
2206
|
+
endpoint: string;
|
|
2207
|
+
description?: string;
|
|
2208
|
+
shape?: string;
|
|
2209
|
+
source?: string;
|
|
2210
|
+
queryFilters?: string[];
|
|
2211
|
+
retention?: ApiStreamTopicRetention;
|
|
2212
|
+
}
|
|
2213
|
+
interface ApiStreamsIndexResponse {
|
|
2214
|
+
schemaVersion: number;
|
|
2215
|
+
chainId: number;
|
|
2216
|
+
transport: "sse" | string;
|
|
2217
|
+
keepAliveSeconds: number;
|
|
2218
|
+
perConnectionMailbox?: number;
|
|
2219
|
+
topics: ApiStreamTopicMetadata[];
|
|
2220
|
+
}
|
|
2221
|
+
declare function isNativeMarketOrderBookStreamPayload(value: unknown): value is NativeMarketOrderBookStreamPayload;
|
|
2222
|
+
declare function assertNativeMarketOrderBookStreamPayload(value: unknown): asserts value is NativeMarketOrderBookStreamPayload;
|
|
2223
|
+
declare function decodeNativeMarketOrderBookDeltasResponse(value: unknown): NativeMarketOrderBookDeltasResponse;
|
|
2224
|
+
|
|
2225
|
+
declare const NO_EVM_RECEIPT_PROOF_SCHEMA = "mono.no_evm_receipt_proof.v1";
|
|
2226
|
+
declare const NO_EVM_RECEIPT_PROOF_TYPE = "canonicalReceiptsTranscript";
|
|
2227
|
+
declare const NO_EVM_RECEIPT_ROOT_ALGORITHM = "keccak256(monolythium/v4.1/receipts_root_empty/1|receipt_leaf/1|receipt_node/1 binary Merkle)";
|
|
2228
|
+
declare const NO_EVM_RECEIPT_CODEC = "bincode(protocore_evm::Receipt)";
|
|
2229
|
+
declare const NO_EVM_RECEIPTS_ROOT_DOMAIN = "monolythium/v4.1/receipts_root_empty/1";
|
|
2230
|
+
declare const NO_EVM_ARCHIVE_PROOF_SCHEMA = "mono.no_evm_receipt_archive_binding.v1";
|
|
2231
|
+
declare const NO_EVM_ARCHIVE_SIGNATURE_SCHEME = "mono.snapshot.sig.v1";
|
|
2232
|
+
declare const NO_EVM_FINALITY_EVIDENCE_SCHEMA = "mono.no_evm_receipt_finality.v1";
|
|
2233
|
+
declare const NO_EVM_FINALITY_EVIDENCE_SOURCE = "blsRoundCertificate";
|
|
2234
|
+
type NoEvmReceiptProofErrorCode = "unsupported_schema" | "unsupported_proof_kind" | "unsupported_proof_type" | "unsupported_history_source" | "unsupported_root_algorithm" | "unsupported_receipt_codec" | "unsupported_compact_schema" | "unsupported_tree_algorithm" | "invalid_uint32" | "invalid_hex" | "invalid_hash_length" | "invalid_archive_signature" | "invalid_proof_shape" | "missing_target_receipt_bytes" | "too_many_receipts" | "receipt_too_large" | "receipt_count_mismatch" | "tx_index_out_of_bounds" | "receipts_root_mismatch" | "target_receipt_hash_mismatch" | "compact_root_mismatch" | "compact_leaf_hash_mismatch" | "compact_path_mismatch";
|
|
2235
|
+
declare class NoEvmReceiptProofError extends Error {
|
|
2236
|
+
readonly code: NoEvmReceiptProofErrorCode;
|
|
2237
|
+
constructor(code: NoEvmReceiptProofErrorCode, message: string);
|
|
2238
|
+
}
|
|
2239
|
+
interface NoEvmReceiptProofVerification {
|
|
2240
|
+
/** Full decoded transcript for bounded proofs; compact proofs carry only the target. */
|
|
2241
|
+
receipts: Uint8Array[];
|
|
2242
|
+
receiptsRoot: string;
|
|
2243
|
+
targetReceiptHash: string;
|
|
2244
|
+
receiptCount: number;
|
|
2245
|
+
txIndex: number;
|
|
2246
|
+
targetReceipt: Uint8Array;
|
|
2247
|
+
proofKind: "boundedCacheTranscript" | "compactInclusion";
|
|
2248
|
+
}
|
|
2249
|
+
interface NoEvmArchiveTrustedSigner {
|
|
2250
|
+
publicKey: Uint8Array | readonly number[];
|
|
2251
|
+
signerId?: string;
|
|
2252
|
+
validFromHeight?: number | bigint;
|
|
2253
|
+
validToHeight?: number | bigint;
|
|
2254
|
+
}
|
|
2255
|
+
type NoEvmArchiveSignatureVerificationIssueCode = "missing_signature_digest" | "threshold_not_met" | "duplicate_signer" | "untrusted_signer" | "invalid_signature" | "invalid_trusted_public_key";
|
|
2256
|
+
interface NoEvmArchiveSignatureVerificationIssue {
|
|
2257
|
+
code: NoEvmArchiveSignatureVerificationIssueCode;
|
|
2258
|
+
message: string;
|
|
2259
|
+
signatureIndex?: number;
|
|
2260
|
+
signerId?: string;
|
|
2261
|
+
}
|
|
2262
|
+
interface NoEvmArchiveSignatureVerification {
|
|
2263
|
+
verified: boolean;
|
|
2264
|
+
threshold: number;
|
|
2265
|
+
validSigners: string[];
|
|
2266
|
+
checkedSignatures: number;
|
|
2267
|
+
issues: NoEvmArchiveSignatureVerificationIssue[];
|
|
2268
|
+
}
|
|
2269
|
+
interface NoEvmReceiptTrustedBlsSigner {
|
|
2270
|
+
authorityIndex: number;
|
|
2271
|
+
publicKey: Uint8Array | readonly number[];
|
|
2272
|
+
validFromRound?: number | bigint;
|
|
2273
|
+
validToRound?: number | bigint;
|
|
2274
|
+
}
|
|
2275
|
+
interface NoEvmBlsFinalityVerification {
|
|
2276
|
+
finalityEvidencePresent: boolean;
|
|
2277
|
+
signerCountMatches: boolean;
|
|
2278
|
+
signerBitmapMatchesIndices: boolean;
|
|
2279
|
+
signerIndicesInRange: boolean;
|
|
2280
|
+
allSignersTrusted: boolean;
|
|
2281
|
+
thresholdMet: boolean;
|
|
2282
|
+
signatureValid: boolean;
|
|
2283
|
+
acceptedSignatureCount: number;
|
|
2284
|
+
requiredSignatureCount: number;
|
|
2285
|
+
verified: boolean;
|
|
2286
|
+
}
|
|
2287
|
+
interface NoEvmBlockBlsFinalityVerification {
|
|
2288
|
+
blockReference: NoEvmFinalityBlockReference;
|
|
2289
|
+
leaderCertificate: NoEvmBlsFinalityVerification;
|
|
2290
|
+
dacCertificate: NoEvmBlsFinalityVerification;
|
|
2291
|
+
verified: boolean;
|
|
2292
|
+
}
|
|
2293
|
+
type NoEvmReceiptFinalityTrustPolicy = {
|
|
2294
|
+
mode: "cluster";
|
|
2295
|
+
chainId?: number | bigint;
|
|
2296
|
+
clusterPublicKey: Uint8Array | readonly number[];
|
|
2297
|
+
committeeSize: number;
|
|
2298
|
+
threshold: number;
|
|
2299
|
+
validFromRound?: number | bigint;
|
|
2300
|
+
validToRound?: number | bigint;
|
|
2301
|
+
} | {
|
|
2302
|
+
mode: "multisig";
|
|
2303
|
+
chainId?: number | bigint;
|
|
2304
|
+
trustedSigners: readonly NoEvmReceiptTrustedBlsSigner[];
|
|
2305
|
+
threshold: number;
|
|
2306
|
+
validFromRound?: number | bigint;
|
|
2307
|
+
validToRound?: number | bigint;
|
|
2308
|
+
};
|
|
2309
|
+
interface NoEvmReceiptTrustPolicy {
|
|
2310
|
+
chainId?: number | bigint;
|
|
2311
|
+
archive?: {
|
|
2312
|
+
trustedSigners: readonly NoEvmArchiveTrustedSigner[];
|
|
2313
|
+
threshold: number;
|
|
2314
|
+
validFromHeight?: number | bigint;
|
|
2315
|
+
validToHeight?: number | bigint;
|
|
2316
|
+
};
|
|
2317
|
+
finality?: NoEvmReceiptFinalityTrustPolicy;
|
|
2318
|
+
}
|
|
2319
|
+
type NoEvmReceiptTrustIssueCode = "missing_receipt_proof" | "missing_archive_proof" | "archive_policy_not_valid_at_height" | "archive_verification_failed" | "missing_finality_evidence" | "missing_finality_chain_id" | "finality_policy_not_valid_at_round" | "finality_verification_failed";
|
|
2320
|
+
interface NoEvmReceiptTrustIssue {
|
|
2321
|
+
code: NoEvmReceiptTrustIssueCode;
|
|
2322
|
+
message: string;
|
|
2323
|
+
}
|
|
2324
|
+
interface NoEvmReceiptTrustVerification {
|
|
2325
|
+
verified: boolean;
|
|
2326
|
+
receiptProof: NoEvmReceiptProofVerification | null;
|
|
2327
|
+
archiveSignatures: NoEvmArchiveSignatureVerification | null;
|
|
2328
|
+
finalityEvidence: NoEvmBlsFinalityVerification | null;
|
|
2329
|
+
issues: NoEvmReceiptTrustIssue[];
|
|
2330
|
+
}
|
|
2331
|
+
declare function decodeNoEvmReceiptTranscript(proof: NoEvmReceiptProof): Uint8Array[];
|
|
2332
|
+
declare function computeNoEvmReceiptsRoot(receipts: readonly Uint8Array[]): string;
|
|
2333
|
+
declare function computeNoEvmTargetReceiptHash(receiptBytes: Uint8Array): string;
|
|
2334
|
+
declare function verifyNoEvmReceiptProof(proof: NoEvmReceiptProof | null | undefined): NoEvmReceiptProofVerification | null;
|
|
2335
|
+
declare function verifyNoEvmArchiveProofSignatures(archiveProof: NoEvmArchiveProof, trustedSigners: readonly NoEvmArchiveTrustedSigner[], threshold: number): NoEvmArchiveSignatureVerification;
|
|
2336
|
+
declare function computeNoEvmRoundFinalityMessage(chainId: number | bigint, round: number | bigint): Uint8Array;
|
|
2337
|
+
declare function computeNoEvmLeaderFinalityMessage(chainId: number | bigint, blockReference: NoEvmFinalityBlockReference): Uint8Array;
|
|
2338
|
+
declare function computeNoEvmDacFinalityMessage(chainId: number | bigint, blockReference: NoEvmFinalityBlockReference): Uint8Array;
|
|
2339
|
+
declare function verifyNoEvmFinalityEvidenceThreshold(finalityEvidence: NoEvmFinalityEvidence, options: {
|
|
2340
|
+
chainId: number | bigint;
|
|
2341
|
+
clusterPublicKey: Uint8Array | readonly number[];
|
|
2342
|
+
committeeSize: number;
|
|
2343
|
+
threshold: number;
|
|
2344
|
+
}): NoEvmBlsFinalityVerification;
|
|
2345
|
+
declare function verifyNoEvmFinalityEvidenceMultisig(finalityEvidence: NoEvmFinalityEvidence, options: {
|
|
2346
|
+
chainId: number | bigint;
|
|
2347
|
+
trustedSigners: readonly NoEvmReceiptTrustedBlsSigner[];
|
|
2348
|
+
threshold: number;
|
|
2349
|
+
}): NoEvmBlsFinalityVerification;
|
|
2350
|
+
declare function verifyNoEvmBlockFinalityEvidenceThreshold(finalityEvidence: NoEvmFinalityEvidence, options: {
|
|
2351
|
+
chainId: number | bigint;
|
|
2352
|
+
clusterPublicKey: Uint8Array | readonly number[];
|
|
2353
|
+
committeeSize: number;
|
|
2354
|
+
threshold: number;
|
|
2355
|
+
}): NoEvmBlockBlsFinalityVerification;
|
|
2356
|
+
declare function verifyNoEvmBlockFinalityEvidenceMultisig(finalityEvidence: NoEvmFinalityEvidence, options: {
|
|
2357
|
+
chainId: number | bigint;
|
|
2358
|
+
trustedSigners: readonly NoEvmReceiptTrustedBlsSigner[];
|
|
2359
|
+
threshold: number;
|
|
2360
|
+
}): NoEvmBlockBlsFinalityVerification;
|
|
2361
|
+
declare function verifyNoEvmReceiptProofTrust(proof: NoEvmReceiptProof | null | undefined, policy: NoEvmReceiptTrustPolicy): NoEvmReceiptTrustVerification;
|
|
2362
|
+
|
|
2363
|
+
/**
|
|
2364
|
+
* Chain-registry snapshot and helpers.
|
|
2365
|
+
*
|
|
2366
|
+
* Source of truth:
|
|
2367
|
+
* https://github.com/monolythium/chain-registry
|
|
2368
|
+
*
|
|
2369
|
+
* The SDK vendors a release-time snapshot so callers can bootstrap without
|
|
2370
|
+
* network access to GitHub. Callers that want the newest registry state can
|
|
2371
|
+
* opt into `fetchChainRegistryLatest()`.
|
|
2372
|
+
*/
|
|
2373
|
+
|
|
2374
|
+
type NetworkSlug = "testnet-69420";
|
|
2375
|
+
interface RpcEndpoint {
|
|
2376
|
+
url: string;
|
|
2377
|
+
provider: string;
|
|
2378
|
+
region?: string;
|
|
2379
|
+
tier: "official" | "community";
|
|
2380
|
+
archive?: boolean;
|
|
2381
|
+
ws_url?: string;
|
|
2382
|
+
notes?: string;
|
|
2383
|
+
}
|
|
2384
|
+
interface P2pSeed {
|
|
2385
|
+
multiaddr: string;
|
|
2386
|
+
region?: string;
|
|
2387
|
+
}
|
|
2388
|
+
interface ExplorerEndpoint {
|
|
2389
|
+
url: string;
|
|
2390
|
+
name: string;
|
|
2391
|
+
kind?: "monoscan" | "etherscan-fork" | "custom";
|
|
2392
|
+
}
|
|
2393
|
+
interface ReceiptProofTrustArchiveSigner {
|
|
2394
|
+
public_key: string;
|
|
2395
|
+
signer_id?: string;
|
|
2396
|
+
valid_from_height?: number;
|
|
2397
|
+
valid_to_height?: number;
|
|
2398
|
+
notes?: string;
|
|
2399
|
+
}
|
|
2400
|
+
interface ReceiptProofTrustArchivePolicy {
|
|
2401
|
+
signature_threshold: number;
|
|
2402
|
+
valid_from_height?: number;
|
|
2403
|
+
valid_to_height?: number;
|
|
2404
|
+
signers: ReceiptProofTrustArchiveSigner[];
|
|
2405
|
+
}
|
|
2406
|
+
interface ReceiptProofTrustFinalitySigner {
|
|
2407
|
+
authority_index: number;
|
|
2408
|
+
public_key: string;
|
|
2409
|
+
valid_from_round?: number;
|
|
2410
|
+
valid_to_round?: number;
|
|
2411
|
+
notes?: string;
|
|
2412
|
+
}
|
|
2413
|
+
interface ReceiptProofTrustFinalityPolicy {
|
|
2414
|
+
mode: "cluster" | "multisig";
|
|
2415
|
+
chain_id?: number;
|
|
2416
|
+
threshold: number;
|
|
2417
|
+
committee_size?: number;
|
|
2418
|
+
cluster_public_key?: string;
|
|
2419
|
+
valid_from_round?: number;
|
|
2420
|
+
valid_to_round?: number;
|
|
2421
|
+
signers?: ReceiptProofTrustFinalitySigner[];
|
|
2422
|
+
}
|
|
2423
|
+
interface ReceiptProofTrustPolicy {
|
|
2424
|
+
archive?: ReceiptProofTrustArchivePolicy;
|
|
2425
|
+
finality?: ReceiptProofTrustFinalityPolicy;
|
|
2426
|
+
}
|
|
2427
|
+
interface ChainInfo {
|
|
2428
|
+
chain_id: number;
|
|
2429
|
+
network: NetworkSlug | string;
|
|
2430
|
+
display_name?: string;
|
|
2431
|
+
description?: string;
|
|
2432
|
+
genesis_hash: string;
|
|
2433
|
+
binary_sha: string;
|
|
2434
|
+
rpc: RpcEndpoint[];
|
|
2435
|
+
p2p: P2pSeed[];
|
|
2436
|
+
explorer?: ExplorerEndpoint[];
|
|
2437
|
+
receipt_proof_trust?: ReceiptProofTrustPolicy;
|
|
2438
|
+
}
|
|
2439
|
+
type ChainRegistry = Record<NetworkSlug | string, ChainInfo>;
|
|
2440
|
+
declare const TESTNET_69420: ChainInfo;
|
|
2441
|
+
declare const CHAIN_REGISTRY: ChainRegistry;
|
|
2442
|
+
declare const CHAIN_REGISTRY_RAW_BASE: "https://raw.githubusercontent.com/monolythium/chain-registry/master/chains";
|
|
2443
|
+
declare function getChainInfo(network: NetworkSlug | string): ChainInfo;
|
|
2444
|
+
declare function getRpcEndpoints(network: NetworkSlug | string): readonly RpcEndpoint[];
|
|
2445
|
+
declare function getP2pSeeds(network: NetworkSlug | string): readonly P2pSeed[];
|
|
2446
|
+
declare function getNoEvmReceiptTrustPolicy(network: NetworkSlug | string, registry?: ChainRegistry): NoEvmReceiptTrustPolicy | null;
|
|
2447
|
+
declare function noEvmReceiptTrustPolicyFromChainInfo(info: ChainInfo): NoEvmReceiptTrustPolicy | null;
|
|
2448
|
+
interface FetchChainRegistryOptions {
|
|
2449
|
+
fetch?: typeof fetch;
|
|
2450
|
+
rawBaseUrl?: string;
|
|
2451
|
+
}
|
|
2452
|
+
declare function fetchChainInfoLatest(network: NetworkSlug | string, options?: FetchChainRegistryOptions): Promise<ChainInfo>;
|
|
2453
|
+
declare function fetchChainRegistryLatest(networks?: readonly (NetworkSlug | string)[], options?: FetchChainRegistryOptions): Promise<ChainRegistry>;
|
|
2454
|
+
declare function parseChainRegistryToml(input: string): ChainInfo;
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
* Typed JSON-RPC client for a `mono-core` node.
|
|
2458
|
+
*
|
|
2459
|
+
* Mirrors the Rust SDK's `RpcClient` — every public method maps 1:1 to
|
|
2460
|
+
* a method on the Rust client, returns the same wire-shape value, and
|
|
2461
|
+
* sends the same `lyth_*` / `eth_*` / `debug_*` JSON-RPC method strings
|
|
2462
|
+
* (Law §13.2).
|
|
2463
|
+
*/
|
|
2464
|
+
|
|
2465
|
+
/** Optional per-client configuration. */
|
|
2466
|
+
interface RpcClientOptions {
|
|
2467
|
+
/** Override `fetch`. Useful for tests or non-Node environments. */
|
|
2468
|
+
fetch?: typeof fetch;
|
|
2469
|
+
/** Extra headers to attach to every request. */
|
|
2470
|
+
headers?: Record<string, string>;
|
|
2471
|
+
}
|
|
2472
|
+
interface NetworkClientOptions extends RpcClientOptions {
|
|
2473
|
+
/** Registry snapshot to use instead of the SDK-bundled snapshot. */
|
|
2474
|
+
registry?: ChainRegistry;
|
|
2475
|
+
/** Probe all known endpoints and choose the first one that answers. */
|
|
2476
|
+
probe?: boolean;
|
|
2477
|
+
}
|
|
2478
|
+
/** Typed ADR-0038 user address (`mono1...`) accepted at public SDK boundaries. */
|
|
2479
|
+
type UserAddressInput = string;
|
|
2480
|
+
interface TxFeedReceipt {
|
|
2481
|
+
status: number;
|
|
2482
|
+
executionUnitsUsed: number;
|
|
2483
|
+
logsCount: number;
|
|
2484
|
+
}
|
|
2485
|
+
interface TxFeedTransaction {
|
|
2486
|
+
txHash: string;
|
|
2487
|
+
blockHash: string;
|
|
2488
|
+
blockNumber: number;
|
|
2489
|
+
blockTimestamp: number | null;
|
|
2490
|
+
txIndex: number;
|
|
2491
|
+
from: string;
|
|
2492
|
+
to: string | null;
|
|
2493
|
+
nonce: number;
|
|
2494
|
+
/** Native value in lythoshi. The tx-feed wire key is still `value`. */
|
|
2495
|
+
value: string;
|
|
2496
|
+
executionUnitLimit: number;
|
|
2497
|
+
maxExecutionFeeLythoshi: string;
|
|
2498
|
+
priorityTipLythoshi: string;
|
|
2499
|
+
fee: NativeReceiptFee;
|
|
2500
|
+
input: string;
|
|
2501
|
+
receipt: TxFeedReceipt | null;
|
|
2502
|
+
}
|
|
2503
|
+
interface TxFeedResponse {
|
|
2504
|
+
schemaVersion: number;
|
|
2505
|
+
latestHeight: number;
|
|
2506
|
+
limit: number;
|
|
2507
|
+
nextCursor: string | null;
|
|
2508
|
+
transactions: TxFeedTransaction[];
|
|
2509
|
+
}
|
|
2510
|
+
declare const MAX_NATIVE_RECEIPT_EVENTS = 1000;
|
|
2511
|
+
interface NativeReceiptCounters {
|
|
2512
|
+
cycles: number;
|
|
2513
|
+
syscallUnits: number;
|
|
2514
|
+
stateIoUnits: number;
|
|
2515
|
+
}
|
|
2516
|
+
interface NativeReceiptFee {
|
|
2517
|
+
total_lythoshi: string;
|
|
2518
|
+
total_lyth?: string;
|
|
2519
|
+
cycles_used: number;
|
|
2520
|
+
base_price_per_cycle_lythoshi: string;
|
|
2521
|
+
state_io_units: number;
|
|
2522
|
+
state_io_price_per_unit_lythoshi: string;
|
|
2523
|
+
priority_tip_lythoshi: string;
|
|
2524
|
+
}
|
|
2525
|
+
interface NativeReceiptEvent<TDecoded = unknown> {
|
|
2526
|
+
blockHeight: number;
|
|
2527
|
+
txIndex: number;
|
|
2528
|
+
logIndex: number;
|
|
2529
|
+
address: string;
|
|
2530
|
+
eventTopic: string;
|
|
2531
|
+
decoded: TDecoded;
|
|
2532
|
+
decodedJson: string;
|
|
2533
|
+
}
|
|
2534
|
+
interface NativeReceiptSource {
|
|
2535
|
+
chainProvider: string;
|
|
2536
|
+
indexerProvider: string;
|
|
2537
|
+
metadataLogIndex: number;
|
|
2538
|
+
}
|
|
2539
|
+
interface NoEvmCompactInclusionProof {
|
|
2540
|
+
schema: "mono.no_evm_receipt_compact_inclusion.v1";
|
|
2541
|
+
treeAlgorithm: "binary-keccak-receipt-tree";
|
|
2542
|
+
root: string;
|
|
2543
|
+
leafHash: string;
|
|
2544
|
+
siblingHashes: string[];
|
|
2545
|
+
pathSides: boolean[];
|
|
2546
|
+
}
|
|
2547
|
+
interface NoEvmArchiveProof {
|
|
2548
|
+
schema: "mono.no_evm_receipt_archive_binding.v1";
|
|
2549
|
+
source: "indexerReceiptArchiveContentDigest" | string;
|
|
2550
|
+
manifestHash: string;
|
|
2551
|
+
contentHash: string;
|
|
2552
|
+
signatureDigest?: string | null;
|
|
2553
|
+
signatures: string[];
|
|
2554
|
+
coveringSnapshot?: NoEvmArchiveCoveringSnapshot | null;
|
|
2555
|
+
}
|
|
2556
|
+
interface NoEvmArchiveCoveringSnapshot {
|
|
2557
|
+
snapshotHeight: number;
|
|
2558
|
+
manifestHash: string;
|
|
2559
|
+
signatureDigest: string;
|
|
2560
|
+
contentHash: string;
|
|
2561
|
+
checkpointContentHash: string;
|
|
2562
|
+
checkpointFrom: number;
|
|
2563
|
+
checkpointTo: number;
|
|
2564
|
+
signatures: string[];
|
|
2565
|
+
}
|
|
2566
|
+
interface NoEvmFinalityCertificate {
|
|
2567
|
+
round: number;
|
|
2568
|
+
signature: string;
|
|
2569
|
+
signersBitmap: string;
|
|
2570
|
+
signerIndices: number[];
|
|
2571
|
+
signerCount: number;
|
|
2572
|
+
}
|
|
2573
|
+
interface NoEvmFinalityBlockReference {
|
|
2574
|
+
round: number;
|
|
2575
|
+
authority: number;
|
|
2576
|
+
digest: string;
|
|
2577
|
+
}
|
|
2578
|
+
interface NoEvmFinalityEvidence {
|
|
2579
|
+
schema: "mono.no_evm_receipt_finality.v1";
|
|
2580
|
+
source: "blsRoundCertificate" | string;
|
|
2581
|
+
round: number;
|
|
2582
|
+
certificate: NoEvmFinalityCertificate;
|
|
2583
|
+
blockReference?: NoEvmFinalityBlockReference | null;
|
|
2584
|
+
leaderCertificate?: NoEvmFinalityCertificate | null;
|
|
2585
|
+
dacCertificate?: NoEvmFinalityCertificate | null;
|
|
2586
|
+
}
|
|
2587
|
+
interface NoEvmReceiptProofBase {
|
|
2588
|
+
schema: "mono.no_evm_receipt_proof.v1";
|
|
2589
|
+
rootAlgorithm: string;
|
|
2590
|
+
receiptCodec: "bincode(protocore_evm::Receipt)";
|
|
2591
|
+
blockHash: string;
|
|
2592
|
+
txHash: string;
|
|
2593
|
+
receiptsRoot: string;
|
|
2594
|
+
targetReceiptHash: string;
|
|
2595
|
+
blockHeight: number;
|
|
2596
|
+
txIndex: number;
|
|
2597
|
+
receiptCount: number;
|
|
2598
|
+
finalityEvidence?: NoEvmFinalityEvidence | null;
|
|
2599
|
+
}
|
|
2600
|
+
interface NoEvmBoundedReceiptProof extends NoEvmReceiptProofBase {
|
|
2601
|
+
proofKind?: "boundedCacheTranscript";
|
|
2602
|
+
proofType: "canonicalReceiptsTranscript";
|
|
2603
|
+
historySource?: "legacyUnspecified" | "liveBlockCache";
|
|
2604
|
+
compactInclusionProof?: null;
|
|
2605
|
+
archiveProof?: null;
|
|
2606
|
+
missingProofMaterial?: string[];
|
|
2607
|
+
receiptTranscript: string[];
|
|
2608
|
+
}
|
|
2609
|
+
interface NoEvmCompactReceiptProof extends NoEvmReceiptProofBase {
|
|
2610
|
+
proofKind: "compactInclusion";
|
|
2611
|
+
proofType: "canonicalReceiptInclusion";
|
|
2612
|
+
historySource: "liveBlockCache" | "indexerReceiptArchive";
|
|
2613
|
+
compactInclusionProof: NoEvmCompactInclusionProof;
|
|
2614
|
+
archiveProof?: NoEvmArchiveProof | null;
|
|
2615
|
+
missingProofMaterial?: string[];
|
|
2616
|
+
targetReceiptBytes: string;
|
|
2617
|
+
receiptTranscript?: string[];
|
|
2618
|
+
}
|
|
2619
|
+
type NoEvmReceiptProof = NoEvmBoundedReceiptProof | NoEvmCompactReceiptProof;
|
|
2620
|
+
interface NativeReceiptResponse<TDecoded = unknown> {
|
|
2621
|
+
txHash: string;
|
|
2622
|
+
blockHash: string;
|
|
2623
|
+
blockHeight: number;
|
|
2624
|
+
txIndex: number;
|
|
2625
|
+
schema: string;
|
|
2626
|
+
artifactHash: string;
|
|
2627
|
+
receiptCommitment: string;
|
|
2628
|
+
/** Current nodes may return `null`; older nodes may omit the field. */
|
|
2629
|
+
noEvmProof?: NoEvmReceiptProof | null;
|
|
2630
|
+
counters: NativeReceiptCounters;
|
|
2631
|
+
fee: NativeReceiptFee;
|
|
2632
|
+
reverted: boolean;
|
|
2633
|
+
nativeDeltaCount: number;
|
|
2634
|
+
eventCount: number;
|
|
2635
|
+
events: Array<NativeReceiptEvent<TDecoded>>;
|
|
2636
|
+
source: NativeReceiptSource;
|
|
2637
|
+
}
|
|
2638
|
+
/** Filter object passed to `lyth_nativeEvents` and `/api/v1/native-events`. */
|
|
2639
|
+
interface NativeEventsFilter {
|
|
2640
|
+
fromBlock: number | bigint | string;
|
|
2641
|
+
toBlock: number | bigint | string;
|
|
2642
|
+
limit?: number | bigint | string | null;
|
|
2643
|
+
txIndex?: number | bigint | string | null;
|
|
2644
|
+
logIndex?: number | bigint | string | null;
|
|
2645
|
+
address?: string | null;
|
|
2646
|
+
eventTopic?: string | null;
|
|
2647
|
+
family?: string | null;
|
|
2648
|
+
eventName?: string | null;
|
|
2649
|
+
primaryId?: string | null;
|
|
2650
|
+
relatedId?: string | null;
|
|
2651
|
+
tokenId?: string | null;
|
|
2652
|
+
account?: string | null;
|
|
2653
|
+
counterparty?: string | null;
|
|
2654
|
+
}
|
|
2655
|
+
interface NativeEventsResponseFilters {
|
|
2656
|
+
txIndex?: number | null;
|
|
2657
|
+
logIndex?: number | null;
|
|
2658
|
+
address?: string | null;
|
|
2659
|
+
eventTopic?: string | null;
|
|
2660
|
+
family?: string | null;
|
|
2661
|
+
eventName?: string | null;
|
|
2662
|
+
primaryId?: string | null;
|
|
2663
|
+
relatedId?: string | null;
|
|
2664
|
+
tokenId?: string | null;
|
|
2665
|
+
account?: string | null;
|
|
2666
|
+
counterparty?: string | null;
|
|
2667
|
+
}
|
|
2668
|
+
interface NativeEventsSource {
|
|
2669
|
+
indexerProvider: string;
|
|
2670
|
+
}
|
|
2671
|
+
interface NativeEventsResponse<TDecoded = unknown> {
|
|
2672
|
+
schemaVersion: number;
|
|
2673
|
+
fromBlock: number;
|
|
2674
|
+
toBlock: number;
|
|
2675
|
+
limit: number;
|
|
2676
|
+
filters: NativeEventsResponseFilters;
|
|
2677
|
+
events: Array<NativeReceiptEvent<TDecoded>>;
|
|
2678
|
+
source: NativeEventsSource;
|
|
2679
|
+
}
|
|
2680
|
+
/** Filter object passed to `lyth_nativeAgentState` and `/api/v1/native-agent-state`. */
|
|
2681
|
+
interface NativeAgentStateFilter {
|
|
2682
|
+
policyId?: string | null;
|
|
2683
|
+
escrowId?: string | null;
|
|
2684
|
+
account?: string | null;
|
|
2685
|
+
includePolicySpends?: boolean | null;
|
|
2686
|
+
limit?: number | bigint | string | null;
|
|
2687
|
+
}
|
|
2688
|
+
interface NativeAgentStateResponseFilters {
|
|
2689
|
+
policyId?: string | null;
|
|
2690
|
+
escrowId?: string | null;
|
|
2691
|
+
account?: string | null;
|
|
2692
|
+
includePolicySpends: boolean;
|
|
2693
|
+
}
|
|
2694
|
+
interface NativeAgentStateSource {
|
|
2695
|
+
indexerProvider: string;
|
|
2696
|
+
projection: string;
|
|
2697
|
+
}
|
|
2698
|
+
interface NativeAgentPolicyStateRecord {
|
|
2699
|
+
policyId: string;
|
|
2700
|
+
owner: string;
|
|
2701
|
+
controller: string;
|
|
2702
|
+
assetId: string;
|
|
2703
|
+
/** Owner/controller-local policy nonce; omitted by older nodes. */
|
|
2704
|
+
nonce?: number | null;
|
|
2705
|
+
enabled: boolean;
|
|
2706
|
+
perActionLimit: string;
|
|
2707
|
+
windowLimit: string;
|
|
2708
|
+
windowSecs: number;
|
|
2709
|
+
updatedAtBlock: number;
|
|
2710
|
+
}
|
|
2711
|
+
interface NativeAgentPolicySpendStateRecord {
|
|
2712
|
+
policyId: string;
|
|
2713
|
+
controller: string;
|
|
2714
|
+
assetId: string;
|
|
2715
|
+
window: number;
|
|
2716
|
+
amount: string;
|
|
2717
|
+
spent: string;
|
|
2718
|
+
updatedAtBlock: number;
|
|
2719
|
+
}
|
|
2720
|
+
interface NativeAgentEscrowStateRecord {
|
|
2721
|
+
escrowId: string;
|
|
2722
|
+
buyer: string;
|
|
2723
|
+
provider: string;
|
|
2724
|
+
arbiter: string;
|
|
2725
|
+
assetId: string;
|
|
2726
|
+
/** Buyer-local escrow nonce; omitted by older nodes. */
|
|
2727
|
+
nonce?: number | null;
|
|
2728
|
+
amount: string;
|
|
2729
|
+
termsHash: string;
|
|
2730
|
+
round: number;
|
|
2731
|
+
buyerAccepted: boolean;
|
|
2732
|
+
providerAccepted: boolean;
|
|
2733
|
+
submittedPayloadHash?: string | null;
|
|
2734
|
+
status: string;
|
|
2735
|
+
resolution?: string | null;
|
|
2736
|
+
lastActor?: string | null;
|
|
2737
|
+
createdAtBlock: number;
|
|
2738
|
+
updatedAtBlock: number;
|
|
2739
|
+
}
|
|
2740
|
+
interface NativeAgentIssuerStateRecord {
|
|
2741
|
+
issuerId: string;
|
|
2742
|
+
issuer: string;
|
|
2743
|
+
/** Issuer-local nonce; omitted by older nodes. */
|
|
2744
|
+
nonce?: number | null;
|
|
2745
|
+
metadataHash?: string | null;
|
|
2746
|
+
updatedAtBlock: number;
|
|
2747
|
+
}
|
|
2748
|
+
interface NativeAgentAttestationStateRecord {
|
|
2749
|
+
attestationId: string;
|
|
2750
|
+
/** Issuer-local attestation nonce; omitted by older nodes. */
|
|
2751
|
+
nonce?: number | null;
|
|
2752
|
+
issuerId?: string | null;
|
|
2753
|
+
issuer?: string | null;
|
|
2754
|
+
subject: string;
|
|
2755
|
+
schemaHash?: string | null;
|
|
2756
|
+
payloadHash?: string | null;
|
|
2757
|
+
active: boolean;
|
|
2758
|
+
updatedAtBlock: number;
|
|
2759
|
+
}
|
|
2760
|
+
interface NativeAgentConsentStateRecord {
|
|
2761
|
+
consentId: string;
|
|
2762
|
+
subject: string;
|
|
2763
|
+
grantee: string;
|
|
2764
|
+
/** Subject-local consent nonce; omitted by older nodes. */
|
|
2765
|
+
nonce?: number | null;
|
|
2766
|
+
scopeHash?: string | null;
|
|
2767
|
+
expiresAt?: number | null;
|
|
2768
|
+
active: boolean;
|
|
2769
|
+
updatedAtBlock: number;
|
|
2770
|
+
}
|
|
2771
|
+
interface NativeAgentServiceStateRecord {
|
|
2772
|
+
serviceId: string;
|
|
2773
|
+
provider: string;
|
|
2774
|
+
/** Provider-local service nonce; omitted by older nodes. */
|
|
2775
|
+
nonce?: number | null;
|
|
2776
|
+
categoryHash?: string | null;
|
|
2777
|
+
metadataHash?: string | null;
|
|
2778
|
+
active: boolean;
|
|
2779
|
+
updatedAtBlock: number;
|
|
2780
|
+
}
|
|
2781
|
+
interface NativeAgentAvailabilityStateRecord {
|
|
2782
|
+
provider: string;
|
|
2783
|
+
maxConcurrent: number;
|
|
2784
|
+
openRequests: number;
|
|
2785
|
+
paused: boolean;
|
|
2786
|
+
updatedAtBlock: number;
|
|
2787
|
+
}
|
|
2788
|
+
interface NativeAgentArbiterStateRecord {
|
|
2789
|
+
arbiterId: string;
|
|
2790
|
+
arbiter: string;
|
|
2791
|
+
/** Arbiter-local registration nonce; omitted by older nodes. */
|
|
2792
|
+
nonce?: number | null;
|
|
2793
|
+
tier?: number | null;
|
|
2794
|
+
metadataHash?: string | null;
|
|
2795
|
+
updatedAtBlock: number;
|
|
2796
|
+
}
|
|
2797
|
+
interface NativeAgentReputationReviewStateRecord {
|
|
2798
|
+
reviewId: string;
|
|
2799
|
+
reviewer: string;
|
|
2800
|
+
subject: string;
|
|
2801
|
+
categoryId: number;
|
|
2802
|
+
speedScore: number;
|
|
2803
|
+
qualityScore: number;
|
|
2804
|
+
communicationScore: number;
|
|
2805
|
+
accuracyScore: number;
|
|
2806
|
+
payloadHash?: string | null;
|
|
2807
|
+
updatedAtBlock: number;
|
|
2808
|
+
}
|
|
2809
|
+
interface NativeAgentStateResponse {
|
|
2810
|
+
schemaVersion: number;
|
|
2811
|
+
limit: number;
|
|
2812
|
+
filters: NativeAgentStateResponseFilters;
|
|
2813
|
+
issuers: NativeAgentIssuerStateRecord[];
|
|
2814
|
+
attestations: NativeAgentAttestationStateRecord[];
|
|
2815
|
+
consents: NativeAgentConsentStateRecord[];
|
|
2816
|
+
services: NativeAgentServiceStateRecord[];
|
|
2817
|
+
availability: NativeAgentAvailabilityStateRecord[];
|
|
2818
|
+
arbiters: NativeAgentArbiterStateRecord[];
|
|
2819
|
+
reputationReviews: NativeAgentReputationReviewStateRecord[];
|
|
2820
|
+
spendingPolicies: NativeAgentPolicyStateRecord[];
|
|
2821
|
+
policySpends: NativeAgentPolicySpendStateRecord[];
|
|
2822
|
+
escrows: NativeAgentEscrowStateRecord[];
|
|
2823
|
+
source: NativeAgentStateSource;
|
|
2824
|
+
}
|
|
2825
|
+
type NativeAgentStateFilterParamValue = string | number | boolean;
|
|
2826
|
+
/** Filter object passed to `lyth_nativeMarketState` and `/api/v1/native-market-state`. */
|
|
2827
|
+
interface NativeMarketStateFilter {
|
|
2828
|
+
marketId?: string | null;
|
|
2829
|
+
orderId?: string | null;
|
|
2830
|
+
listingId?: string | null;
|
|
2831
|
+
collectionId?: string | null;
|
|
2832
|
+
account?: string | null;
|
|
2833
|
+
includeSpotOrders?: boolean | null;
|
|
2834
|
+
limit?: number | bigint | string | null;
|
|
2835
|
+
}
|
|
2836
|
+
interface NativeMarketStateResponseFilters {
|
|
2837
|
+
marketId?: string | null;
|
|
2838
|
+
orderId?: string | null;
|
|
2839
|
+
listingId?: string | null;
|
|
2840
|
+
collectionId?: string | null;
|
|
2841
|
+
account?: string | null;
|
|
2842
|
+
includeSpotOrders: boolean;
|
|
2843
|
+
}
|
|
2844
|
+
interface NativeMarketStateSource {
|
|
2845
|
+
indexerProvider: string;
|
|
2846
|
+
projection: string;
|
|
2847
|
+
}
|
|
2848
|
+
interface NativeSpotMarketStateRecord {
|
|
2849
|
+
marketId: string;
|
|
2850
|
+
owner: string;
|
|
2851
|
+
baseAssetId: string;
|
|
2852
|
+
quoteAssetId: string;
|
|
2853
|
+
tickSize: string;
|
|
2854
|
+
lotSize: string;
|
|
2855
|
+
minQuantity: string;
|
|
2856
|
+
minNotional: string;
|
|
2857
|
+
tradeCount: string;
|
|
2858
|
+
totalVolumeBase: string;
|
|
2859
|
+
lastPrice: string | null;
|
|
2860
|
+
lastBlockHeight: number | null;
|
|
2861
|
+
createdAtBlock: number;
|
|
2862
|
+
updatedAtBlock: number;
|
|
2863
|
+
}
|
|
2864
|
+
interface NativeSpotOrderStateRecord {
|
|
2865
|
+
orderId: string;
|
|
2866
|
+
marketId: string;
|
|
2867
|
+
owner: string;
|
|
2868
|
+
/** Owner-local spot order nonce; omitted by older nodes. */
|
|
2869
|
+
nonce?: number | null;
|
|
2870
|
+
side: string;
|
|
2871
|
+
price: string;
|
|
2872
|
+
quantity: string;
|
|
2873
|
+
remaining: string;
|
|
2874
|
+
status: string;
|
|
2875
|
+
expiresAtBlock: number;
|
|
2876
|
+
updatedAtBlock: number;
|
|
2877
|
+
}
|
|
2878
|
+
interface NativeNftListingStateRecord {
|
|
2879
|
+
listingId: string;
|
|
2880
|
+
seller: string;
|
|
2881
|
+
/** Seller-local NFT listing nonce; omitted by older nodes. */
|
|
2882
|
+
nonce?: number | null;
|
|
2883
|
+
standard: string;
|
|
2884
|
+
collectionId: string;
|
|
2885
|
+
tokenId: string;
|
|
2886
|
+
quantity: string;
|
|
2887
|
+
paymentAssetId: string;
|
|
2888
|
+
price: string;
|
|
2889
|
+
listingKind: unknown;
|
|
2890
|
+
status: string;
|
|
2891
|
+
expiresAtBlock: number;
|
|
2892
|
+
highestBidder: string | null;
|
|
2893
|
+
highestBid: string | null;
|
|
2894
|
+
updatedAtBlock: number;
|
|
2895
|
+
}
|
|
2896
|
+
interface NativeCollectionRoyaltyStateRecord {
|
|
2897
|
+
collectionId: string;
|
|
2898
|
+
creator: string | null;
|
|
2899
|
+
recipient: string;
|
|
2900
|
+
bps: number;
|
|
2901
|
+
updatedAtBlock: number;
|
|
2902
|
+
}
|
|
2903
|
+
interface NativeMarketStateResponse {
|
|
2904
|
+
schemaVersion: number;
|
|
2905
|
+
limit: number;
|
|
2906
|
+
filters: NativeMarketStateResponseFilters;
|
|
2907
|
+
spotMarkets: NativeSpotMarketStateRecord[];
|
|
2908
|
+
spotOrders: NativeSpotOrderStateRecord[];
|
|
2909
|
+
nftListings: NativeNftListingStateRecord[];
|
|
2910
|
+
collectionRoyalties: NativeCollectionRoyaltyStateRecord[];
|
|
2911
|
+
source: NativeMarketStateSource;
|
|
2912
|
+
}
|
|
2913
|
+
type NativeMarketStateFilterParamValue = string | number | boolean;
|
|
2914
|
+
type AgentReputationCategoryScope = "global" | "category";
|
|
2915
|
+
interface AgentReputationRecord {
|
|
2916
|
+
provider: string;
|
|
2917
|
+
categoryId: number;
|
|
2918
|
+
blockHeight: number;
|
|
2919
|
+
speedSumX10: number;
|
|
2920
|
+
qualitySumX10: number;
|
|
2921
|
+
communicationSumX10: number;
|
|
2922
|
+
accuracySumX10: number;
|
|
2923
|
+
sampleCount: number;
|
|
2924
|
+
avgSpeedX10: number;
|
|
2925
|
+
avgQualityX10: number;
|
|
2926
|
+
avgCommunicationX10: number;
|
|
2927
|
+
avgAccuracyX10: number;
|
|
2928
|
+
}
|
|
2929
|
+
interface AgentReputationResponse {
|
|
2930
|
+
schemaVersion: 1;
|
|
2931
|
+
provider: string;
|
|
2932
|
+
categoryId: number;
|
|
2933
|
+
categoryScope: AgentReputationCategoryScope;
|
|
2934
|
+
record: AgentReputationRecord | null;
|
|
2935
|
+
}
|
|
2936
|
+
interface AddressProfileResponse {
|
|
2937
|
+
schemaVersion: number;
|
|
2938
|
+
address: string;
|
|
2939
|
+
account: {
|
|
2940
|
+
nativeBalance: string;
|
|
2941
|
+
nonce: number;
|
|
2942
|
+
codeHash: string;
|
|
2943
|
+
isContract: boolean;
|
|
2944
|
+
};
|
|
2945
|
+
label: {
|
|
2946
|
+
category: string;
|
|
2947
|
+
displayName: string | null;
|
|
2948
|
+
updatedAtBlock: number;
|
|
2949
|
+
} | null;
|
|
2950
|
+
activity: {
|
|
2951
|
+
kind: string;
|
|
2952
|
+
retention: unknown | null;
|
|
2953
|
+
latest: unknown | null;
|
|
2954
|
+
};
|
|
2955
|
+
tokenBalances: Array<{
|
|
2956
|
+
tokenId: string;
|
|
2957
|
+
balance: string;
|
|
2958
|
+
updatedAtBlock: number;
|
|
2959
|
+
mrc?: TokenBalanceMrcIdentity | null;
|
|
2960
|
+
}>;
|
|
2961
|
+
bridgeRouteDisclosures?: BridgeRouteDisclosure[] | null;
|
|
2962
|
+
}
|
|
2963
|
+
interface AddressFlowResponse {
|
|
2964
|
+
schemaVersion: number;
|
|
2965
|
+
address: string;
|
|
2966
|
+
sampleSize: number;
|
|
2967
|
+
limit: number;
|
|
2968
|
+
totals: {
|
|
2969
|
+
inbound: string;
|
|
2970
|
+
outbound: string;
|
|
2971
|
+
swapVolume: string;
|
|
2972
|
+
stake: string;
|
|
2973
|
+
unstake: string;
|
|
2974
|
+
};
|
|
2975
|
+
topCounterparties: Array<{
|
|
2976
|
+
address: string;
|
|
2977
|
+
eventCount: number;
|
|
2978
|
+
inbound: string;
|
|
2979
|
+
outbound: string;
|
|
2980
|
+
}>;
|
|
2981
|
+
}
|
|
2982
|
+
interface SearchHit {
|
|
2983
|
+
type: string;
|
|
2984
|
+
id: string;
|
|
2985
|
+
route: string;
|
|
2986
|
+
label: string;
|
|
2987
|
+
score: number;
|
|
2988
|
+
meta?: unknown;
|
|
2989
|
+
}
|
|
2990
|
+
interface SearchResponse {
|
|
2991
|
+
schemaVersion: number;
|
|
2992
|
+
query: string;
|
|
2993
|
+
hits: SearchHit[];
|
|
2994
|
+
nextCursor: string | null;
|
|
2995
|
+
}
|
|
2996
|
+
interface ChainStatsResponse {
|
|
2997
|
+
schemaVersion: number;
|
|
2998
|
+
chainId: number;
|
|
2999
|
+
genesisHash: string | null;
|
|
3000
|
+
latestHeight: number;
|
|
3001
|
+
latestBlockHash: string | null;
|
|
3002
|
+
latestTimestamp: number | null;
|
|
3003
|
+
peerCount: number;
|
|
3004
|
+
mempool: {
|
|
3005
|
+
ready: number;
|
|
3006
|
+
pending: number;
|
|
3007
|
+
mailboxDepth: number;
|
|
3008
|
+
};
|
|
3009
|
+
indexer: unknown | null;
|
|
3010
|
+
clusters: {
|
|
3011
|
+
total: number;
|
|
3012
|
+
pageSize: number;
|
|
3013
|
+
};
|
|
3014
|
+
}
|
|
3015
|
+
interface ClobMarketSummary {
|
|
3016
|
+
marketId: string;
|
|
3017
|
+
tradeCount: number;
|
|
3018
|
+
totalVolumeBase: string;
|
|
3019
|
+
lastPrice: string;
|
|
3020
|
+
lastBlockHeight: number;
|
|
3021
|
+
}
|
|
3022
|
+
interface ClobMarketsResponse {
|
|
3023
|
+
schemaVersion: number;
|
|
3024
|
+
limit: number;
|
|
3025
|
+
markets: ClobMarketSummary[];
|
|
3026
|
+
source: string;
|
|
3027
|
+
}
|
|
3028
|
+
interface ClobTrade {
|
|
3029
|
+
blockHeight: number;
|
|
3030
|
+
txIndex: number;
|
|
3031
|
+
logIndex: number;
|
|
3032
|
+
marketId: string;
|
|
3033
|
+
takerOrder: string;
|
|
3034
|
+
makerOrder: string;
|
|
3035
|
+
price: string;
|
|
3036
|
+
amount: string;
|
|
3037
|
+
taker: string;
|
|
3038
|
+
maker: string;
|
|
3039
|
+
}
|
|
3040
|
+
interface ClobTradesResponse {
|
|
3041
|
+
schemaVersion: number;
|
|
3042
|
+
marketId: string;
|
|
3043
|
+
limit: number;
|
|
3044
|
+
nextCursor: string | null;
|
|
3045
|
+
trades: ClobTrade[];
|
|
3046
|
+
}
|
|
3047
|
+
interface ClobOhlcResponse {
|
|
3048
|
+
schemaVersion: number;
|
|
3049
|
+
marketId: string;
|
|
3050
|
+
fromBlock: number;
|
|
3051
|
+
toBlock: number;
|
|
3052
|
+
bucketBlocks: number;
|
|
3053
|
+
candles: Array<{
|
|
3054
|
+
startBlock: number;
|
|
3055
|
+
endBlock: number;
|
|
3056
|
+
open: string;
|
|
3057
|
+
high: string;
|
|
3058
|
+
low: string;
|
|
3059
|
+
close: string;
|
|
3060
|
+
volumeBase: string;
|
|
3061
|
+
tradeCount: number;
|
|
3062
|
+
}>;
|
|
3063
|
+
}
|
|
3064
|
+
interface ClobOrderBookResponse {
|
|
3065
|
+
schemaVersion: number;
|
|
3066
|
+
marketId: string;
|
|
3067
|
+
levels?: number;
|
|
3068
|
+
bids: Array<{
|
|
3069
|
+
price: string;
|
|
3070
|
+
size: string;
|
|
3071
|
+
}>;
|
|
3072
|
+
asks: Array<{
|
|
3073
|
+
price: string;
|
|
3074
|
+
size: string;
|
|
3075
|
+
}>;
|
|
3076
|
+
}
|
|
3077
|
+
/** Public-safe aggregate returned by `lyth_peerSummary`. */
|
|
3078
|
+
interface PeerSummaryAggregate {
|
|
3079
|
+
peerCount: number;
|
|
3080
|
+
inboundCount: number | null;
|
|
3081
|
+
outboundCount: number | null;
|
|
3082
|
+
latencyBands: {
|
|
3083
|
+
lt_50ms: number;
|
|
3084
|
+
lt_200ms: number;
|
|
3085
|
+
lt_1s: number;
|
|
3086
|
+
ge_1s: number;
|
|
3087
|
+
} | null;
|
|
3088
|
+
versionDistribution: Record<string, number>;
|
|
3089
|
+
healthSummary: {
|
|
3090
|
+
synced: number;
|
|
3091
|
+
lagging: number;
|
|
3092
|
+
stale: number;
|
|
3093
|
+
};
|
|
3094
|
+
asOfBlock: number;
|
|
3095
|
+
}
|
|
3096
|
+
/** Live `lyth_listActivePrecompiles` response envelope. */
|
|
3097
|
+
interface PrecompileCatalogueResponse {
|
|
3098
|
+
/** Block height sampled by the node. */
|
|
3099
|
+
blockNumber: bigint;
|
|
3100
|
+
/** Precompile descriptors active or known at the sampled block. */
|
|
3101
|
+
precompiles: PrecompileDescriptor[];
|
|
3102
|
+
}
|
|
3103
|
+
interface OperatorInfoResponse {
|
|
3104
|
+
operatorId: string;
|
|
3105
|
+
moniker: string | null;
|
|
3106
|
+
alias: string | null;
|
|
3107
|
+
chainAddress: string;
|
|
3108
|
+
bonded: boolean;
|
|
3109
|
+
commissionBps: number | null;
|
|
3110
|
+
delegationCount: number | null;
|
|
3111
|
+
bondedAmount: string;
|
|
3112
|
+
activeClusterIds: number[];
|
|
3113
|
+
operatorKeyFingerprint: string | null;
|
|
3114
|
+
blsKeyFingerprint: string | null;
|
|
3115
|
+
lifecycleState: string;
|
|
3116
|
+
capability: Record<string, unknown>;
|
|
3117
|
+
}
|
|
3118
|
+
interface ClusterMemberResponse {
|
|
3119
|
+
operatorId: string;
|
|
3120
|
+
blsPubkey: string;
|
|
3121
|
+
state: string;
|
|
3122
|
+
}
|
|
3123
|
+
interface ClusterStatusResponse {
|
|
3124
|
+
clusterId: number;
|
|
3125
|
+
threshold: number;
|
|
3126
|
+
size: number;
|
|
3127
|
+
live: number;
|
|
3128
|
+
lagging: number;
|
|
3129
|
+
offline: number;
|
|
3130
|
+
maintenance: number;
|
|
3131
|
+
members: ClusterMemberResponse[];
|
|
3132
|
+
epoch: bigint | null;
|
|
3133
|
+
round: bigint | null;
|
|
3134
|
+
quorum: string;
|
|
3135
|
+
reputationScore: number | null;
|
|
3136
|
+
livenessScore: number | null;
|
|
3137
|
+
lastUpdateHeight: bigint;
|
|
3138
|
+
}
|
|
3139
|
+
interface ClusterDirectoryEntryResponse {
|
|
3140
|
+
clusterId: number;
|
|
3141
|
+
size: number;
|
|
3142
|
+
threshold: number;
|
|
3143
|
+
aggregateHealth: string;
|
|
3144
|
+
regionDiversity: string[] | null;
|
|
3145
|
+
active: boolean;
|
|
3146
|
+
}
|
|
3147
|
+
interface ClusterDirectoryPageResponse {
|
|
3148
|
+
page: number;
|
|
3149
|
+
limit: number;
|
|
3150
|
+
totalClusters: number;
|
|
3151
|
+
clusters: ClusterDirectoryEntryResponse[];
|
|
3152
|
+
}
|
|
3153
|
+
type OperatorSurfaceStatus = "available" | "disabled" | "not_implemented" | "not_retained" | "ws_only" | string;
|
|
3154
|
+
interface OperatorSurfaceCapability {
|
|
3155
|
+
status: OperatorSurfaceStatus;
|
|
3156
|
+
tracking?: string;
|
|
3157
|
+
}
|
|
3158
|
+
interface OperatorCapabilitiesResponse {
|
|
3159
|
+
schemaVersion: number;
|
|
3160
|
+
surfaces: Record<string, OperatorSurfaceCapability>;
|
|
3161
|
+
}
|
|
3162
|
+
interface OperatorAuthorityResponse {
|
|
3163
|
+
schemaVersion: number;
|
|
3164
|
+
operatorId: string;
|
|
3165
|
+
authorityIndex: number;
|
|
3166
|
+
blsPubkey: string;
|
|
3167
|
+
active: boolean;
|
|
3168
|
+
}
|
|
3169
|
+
type SigningEntryStatus = "signed" | "missed" | "no_cert" | string;
|
|
3170
|
+
interface OperatorSigningEntry {
|
|
3171
|
+
round: bigint;
|
|
3172
|
+
status: SigningEntryStatus;
|
|
3173
|
+
}
|
|
3174
|
+
interface OperatorSigningActivityResponse {
|
|
3175
|
+
schemaVersion: number;
|
|
3176
|
+
authorityIndex: number;
|
|
3177
|
+
currentRound: bigint;
|
|
3178
|
+
limit: number;
|
|
3179
|
+
entries: OperatorSigningEntry[];
|
|
3180
|
+
}
|
|
3181
|
+
interface AttestationWindow {
|
|
3182
|
+
startRound: bigint;
|
|
3183
|
+
endRound: bigint;
|
|
3184
|
+
kind: string;
|
|
3185
|
+
}
|
|
3186
|
+
interface DutyAbsence {
|
|
3187
|
+
reason: string;
|
|
3188
|
+
}
|
|
3189
|
+
type KeyRotationWindow = {
|
|
3190
|
+
nextRound: bigint;
|
|
3191
|
+
epochLengthRounds: bigint;
|
|
3192
|
+
} | DutyAbsence;
|
|
3193
|
+
interface UpcomingDutyMap {
|
|
3194
|
+
attestation: AttestationWindow;
|
|
3195
|
+
blockProduction: DutyAbsence;
|
|
3196
|
+
sync: DutyAbsence;
|
|
3197
|
+
keyRotation: KeyRotationWindow;
|
|
3198
|
+
}
|
|
3199
|
+
interface UpcomingDutiesResponse {
|
|
3200
|
+
schemaVersion: number;
|
|
3201
|
+
authorityIndex: number;
|
|
3202
|
+
currentRound: bigint;
|
|
3203
|
+
horizonRounds: number;
|
|
3204
|
+
duties: UpcomingDutyMap;
|
|
3205
|
+
}
|
|
3206
|
+
type JailStatusWindow = {
|
|
3207
|
+
jailed: boolean;
|
|
3208
|
+
tombstoned: boolean;
|
|
3209
|
+
jailedUntilHeight: bigint;
|
|
3210
|
+
unjailCount: bigint;
|
|
3211
|
+
} | DutyAbsence;
|
|
3212
|
+
interface OperatorRiskResponse {
|
|
3213
|
+
schemaVersion: number;
|
|
3214
|
+
authorityIndex: number;
|
|
3215
|
+
dataHeight: bigint;
|
|
3216
|
+
windowRounds: number;
|
|
3217
|
+
missedRounds: number;
|
|
3218
|
+
observedRounds: number;
|
|
3219
|
+
missRateBps: number;
|
|
3220
|
+
thresholdBps: number;
|
|
3221
|
+
remainingHeadroomBps: number;
|
|
3222
|
+
jailStatus: JailStatusWindow;
|
|
3223
|
+
reasons: string[];
|
|
3224
|
+
}
|
|
3225
|
+
interface LythUpgradePlanStatus {
|
|
3226
|
+
upgradeId: string;
|
|
3227
|
+
activationHeight: number;
|
|
3228
|
+
activationRound: number | null;
|
|
3229
|
+
requiredBinaryVersion: string;
|
|
3230
|
+
expectedBinaryDigest: string;
|
|
3231
|
+
p2pProtocolVersion: number;
|
|
3232
|
+
requiredFeatures: string[];
|
|
3233
|
+
milestoneFileDigest: string | null;
|
|
3234
|
+
stateMigrationId: string | null;
|
|
3235
|
+
stateMigrationHash: string | null;
|
|
3236
|
+
expectedPreStateRoot: string | null;
|
|
3237
|
+
expectedPostStateRoot: string | null;
|
|
3238
|
+
}
|
|
3239
|
+
interface LythUpgradeStatusResponse {
|
|
3240
|
+
chainId: number;
|
|
3241
|
+
blockNumber: number;
|
|
3242
|
+
configured: boolean;
|
|
3243
|
+
planCount: number;
|
|
3244
|
+
state: "active" | "none" | "pending" | string;
|
|
3245
|
+
active: LythUpgradePlanStatus | null;
|
|
3246
|
+
pendingCount: number;
|
|
3247
|
+
pending: LythUpgradePlanStatus[];
|
|
3248
|
+
}
|
|
3249
|
+
interface RuntimeBuildProvenance {
|
|
3250
|
+
clientName: string;
|
|
3251
|
+
version: string;
|
|
3252
|
+
gitCommit: string;
|
|
3253
|
+
gitDirty: boolean;
|
|
3254
|
+
buildTimestampUtc: number;
|
|
3255
|
+
rustc: string;
|
|
3256
|
+
target: string;
|
|
3257
|
+
profile: string;
|
|
3258
|
+
features: string;
|
|
3259
|
+
p2pProtocolVersion: number;
|
|
3260
|
+
binarySha256: string | null;
|
|
3261
|
+
stateMigrations: string[];
|
|
3262
|
+
}
|
|
3263
|
+
interface RuntimeUpgradeStatus {
|
|
3264
|
+
blockNumber: number;
|
|
3265
|
+
configured: boolean;
|
|
3266
|
+
planCount: number;
|
|
3267
|
+
state: "active" | "none" | "pending" | string;
|
|
3268
|
+
active: LythUpgradePlanStatus | null;
|
|
3269
|
+
pending: LythUpgradePlanStatus[];
|
|
3270
|
+
}
|
|
3271
|
+
interface RuntimeProvenanceResponse {
|
|
3272
|
+
schemaVersion: number;
|
|
3273
|
+
chainId: number;
|
|
3274
|
+
genesisHash: string | null;
|
|
3275
|
+
latestHeight: number;
|
|
3276
|
+
runtime: RuntimeBuildProvenance;
|
|
3277
|
+
upgrade: RuntimeUpgradeStatus | null;
|
|
3278
|
+
}
|
|
3279
|
+
type ServiceProbeStatusLabel = "unknown" | "reachable" | "degraded" | "unreachable" | string;
|
|
3280
|
+
interface ServiceProbeResponse {
|
|
3281
|
+
serviceMask: number;
|
|
3282
|
+
status: ServiceProbeStatusLabel;
|
|
3283
|
+
statusCode: number;
|
|
3284
|
+
lastProbeBlock: number;
|
|
3285
|
+
latencyMs: number;
|
|
3286
|
+
probeDigest: string;
|
|
3287
|
+
reporter: string;
|
|
3288
|
+
}
|
|
3289
|
+
interface ReportServiceProbeRequest {
|
|
3290
|
+
peerId: string;
|
|
3291
|
+
serviceMask: number;
|
|
3292
|
+
status: number;
|
|
3293
|
+
latencyMs: number;
|
|
3294
|
+
probeDigest: string;
|
|
3295
|
+
signedRawTx: string;
|
|
3296
|
+
}
|
|
3297
|
+
interface ReportServiceProbeResponse {
|
|
3298
|
+
txHash: string;
|
|
3299
|
+
peerId: string;
|
|
3300
|
+
serviceMask: number;
|
|
3301
|
+
statusCode: number;
|
|
3302
|
+
}
|
|
3303
|
+
type TxStatusResponse = TxStatusFoundResponse | TxStatusNotFoundResponse;
|
|
3304
|
+
interface TxStatusFoundResponse {
|
|
3305
|
+
status: "found";
|
|
3306
|
+
txHash: string;
|
|
3307
|
+
blockHash: string;
|
|
3308
|
+
blockNumber: number;
|
|
3309
|
+
txIndex: number;
|
|
3310
|
+
}
|
|
3311
|
+
interface TxStatusNotFoundResponse {
|
|
3312
|
+
status: "not_found";
|
|
3313
|
+
txHash: string;
|
|
3314
|
+
latestHeight: number;
|
|
3315
|
+
indexerEnabled: boolean;
|
|
3316
|
+
providerKind: string;
|
|
3317
|
+
}
|
|
3318
|
+
interface VertexAtRound {
|
|
3319
|
+
vertexHash: string;
|
|
3320
|
+
author: number;
|
|
3321
|
+
}
|
|
3322
|
+
interface VerticesAtRoundResponse {
|
|
3323
|
+
schemaVersion: number;
|
|
3324
|
+
round: number;
|
|
3325
|
+
vertices: VertexAtRound[] | null;
|
|
3326
|
+
}
|
|
3327
|
+
type MetricsRangeStatus = "available" | "not_retained" | "unknown" | string;
|
|
3328
|
+
interface MetricsRangeSample {
|
|
3329
|
+
blockNumber: number;
|
|
3330
|
+
value: number;
|
|
3331
|
+
}
|
|
3332
|
+
interface MetricsRangeSeries {
|
|
3333
|
+
selector: string;
|
|
3334
|
+
status: MetricsRangeStatus;
|
|
3335
|
+
unit: string | null;
|
|
3336
|
+
samples: MetricsRangeSample[] | null;
|
|
3337
|
+
}
|
|
3338
|
+
interface MetricsRangeResponse {
|
|
3339
|
+
schemaVersion: number;
|
|
3340
|
+
range: [number, number] | null;
|
|
3341
|
+
tracking: string;
|
|
3342
|
+
series: MetricsRangeSeries[];
|
|
3343
|
+
}
|
|
3344
|
+
type AddressActivityKind = "found" | "not_found" | "indexer_disabled" | "pruned" | "private" | string;
|
|
3345
|
+
declare class RpcClient {
|
|
3346
|
+
#private;
|
|
3347
|
+
readonly endpoint: string;
|
|
3348
|
+
constructor(endpoint: string, options?: RpcClientOptions);
|
|
3349
|
+
/**
|
|
3350
|
+
* Construct a client from the chain-registry network slug.
|
|
3351
|
+
*
|
|
3352
|
+
* Defaults to the SDK-bundled registry snapshot from
|
|
3353
|
+
* `monolythium/chain-registry`. Set `probe: true` to walk the
|
|
3354
|
+
* registry endpoints in order and return the first endpoint whose
|
|
3355
|
+
* `eth_chainId` matches the registry chain id.
|
|
3356
|
+
*/
|
|
3357
|
+
static forNetwork(network?: NetworkSlug | string, options?: NetworkClientOptions): Promise<RpcClient>;
|
|
3358
|
+
/**
|
|
3359
|
+
* Walk a chain-registry entry in order and return the first endpoint
|
|
3360
|
+
* whose `eth_chainId` matches the registry `chain_id`.
|
|
3361
|
+
*/
|
|
3362
|
+
static fromFirstReachable(chain: ChainInfo, options?: RpcClientOptions): Promise<RpcClient>;
|
|
3363
|
+
/**
|
|
3364
|
+
* Send an arbitrary JSON-RPC method. Most callers should prefer the
|
|
3365
|
+
* typed wrappers below; this is the escape hatch for methods the
|
|
3366
|
+
* SDK does not yet wrap.
|
|
3367
|
+
*/
|
|
3368
|
+
call<T>(method: string, params?: unknown): Promise<T>;
|
|
3369
|
+
/** `eth_chainId` — configured chain id. */
|
|
3370
|
+
ethChainId(): Promise<bigint>;
|
|
3371
|
+
/** Compatibility block-height read. */
|
|
3372
|
+
ethBlockNumber(): Promise<bigint>;
|
|
3373
|
+
/** `eth_getBalance` — balance + Merkle proof envelope. */
|
|
3374
|
+
ethGetBalance(address: string, block?: BlockSelector): Promise<AccountProofResponse>;
|
|
3375
|
+
/** `eth_getStorageAt` — storage word + Merkle proof. */
|
|
3376
|
+
ethGetStorageAt(address: string, slot: string, block?: BlockSelector): Promise<AccountProofResponse>;
|
|
3377
|
+
/** `eth_getTransactionCount` — sender nonce. */
|
|
3378
|
+
ethGetTransactionCount(address: string, block?: BlockSelector): Promise<bigint>;
|
|
3379
|
+
/** `eth_getCode` — deployed bytecode (`0x` for an EOA, `0xfe` for a precompile). */
|
|
3380
|
+
ethGetCode(address: string, block?: BlockSelector): Promise<string>;
|
|
3381
|
+
/** Compatibility block-header read by height/tag. */
|
|
3382
|
+
ethGetBlockByNumber(block?: BlockSelector): Promise<BlockHeader | null>;
|
|
3383
|
+
/** Compatibility block-header read by hash. */
|
|
3384
|
+
ethGetBlockByHash(hash: string): Promise<BlockHeader | null>;
|
|
3385
|
+
/** `eth_getTransactionByHash` — fetch an included transaction by hash. */
|
|
3386
|
+
ethGetTransactionByHash(txHash: string): Promise<TransactionView | null>;
|
|
3387
|
+
/** `eth_getTransactionReceipt` — receipt for a confirmed tx. */
|
|
3388
|
+
ethGetTransactionReceipt(txHash: string): Promise<TransactionReceipt | null>;
|
|
3389
|
+
/** `eth_sendRawTransaction` — submit a signed raw tx. */
|
|
3390
|
+
ethSendRawTransaction(rawTx: string): Promise<string>;
|
|
3391
|
+
/** `eth_call` — dry-run a transaction. */
|
|
3392
|
+
ethCall(request: CallRequest, block?: BlockSelector): Promise<string>;
|
|
3393
|
+
/** `eth_estimateGas` — gas estimate for a dry-run. */
|
|
3394
|
+
ethEstimateGas(request: CallRequest, block?: BlockSelector): Promise<bigint>;
|
|
3395
|
+
/**
|
|
3396
|
+
* `eth_gasPrice` — legacy compatibility fee quote for ethers/viem shims.
|
|
3397
|
+
* Native v4.1 surfaces should use execution-unit and lythoshi fee fields.
|
|
3398
|
+
*/
|
|
3399
|
+
ethGasPrice(): Promise<bigint>;
|
|
3400
|
+
/** `eth_feeHistory` — base-fee + gas-used history. */
|
|
3401
|
+
ethFeeHistory(blockCount: number, newestBlock?: BlockSelector, rewardPercentiles?: number[]): Promise<FeeHistoryResponse>;
|
|
3402
|
+
/** `eth_syncing` — `null` when caught up. */
|
|
3403
|
+
ethSyncing(): Promise<SyncStatus | null>;
|
|
3404
|
+
/** `net_version` — chain id as a decimal string. */
|
|
3405
|
+
netVersion(): Promise<string>;
|
|
3406
|
+
/** `net_peerCount` — number of connected peers. */
|
|
3407
|
+
netPeerCount(): Promise<bigint>;
|
|
3408
|
+
/** `net_listening` — whether the node accepts inbound peers. */
|
|
3409
|
+
netListening(): Promise<boolean>;
|
|
3410
|
+
/** `web3_clientVersion` — server's client-version string. */
|
|
3411
|
+
web3ClientVersion(): Promise<string>;
|
|
3412
|
+
/** `web3_sha3` — Keccak-256 of `data`. */
|
|
3413
|
+
web3Sha3(data: string): Promise<string>;
|
|
3414
|
+
/** `lyth_listProviders` — paged registry enumeration. */
|
|
3415
|
+
lythListProviders(capabilityMask: number, cursor?: string | null, limit?: number): Promise<RegistryRecord[]>;
|
|
3416
|
+
/** `lyth_getRegistration` — single registry lookup. */
|
|
3417
|
+
lythGetRegistration(peerId: string): Promise<RegistryRecord | null>;
|
|
3418
|
+
/** `lyth_registryStateProof` — Merkle proof for a registry entry. */
|
|
3419
|
+
lythRegistryStateProof(peerId: string): Promise<AccountProofResponse>;
|
|
3420
|
+
/** `lyth_getAccountPolicy` — privacy posture for an account. */
|
|
3421
|
+
lythGetAccountPolicy(address: string): Promise<AccountPolicy>;
|
|
3422
|
+
/** `lyth_getAssetPolicy` — privacy posture for an asset. */
|
|
3423
|
+
lythGetAssetPolicy(tokenId: string): Promise<AssetPolicy>;
|
|
3424
|
+
/** `lyth_getTokenBalances` — indexed per-asset balances for one address. */
|
|
3425
|
+
lythGetTokenBalances(address: string): Promise<TokenBalanceRecord[]>;
|
|
3426
|
+
/** `lyth_bridgeRoutes` — read-only bridge route-selection/readiness. */
|
|
3427
|
+
lythBridgeRoutes(request: BridgeRoutesRequest): Promise<BridgeRoutesResponse>;
|
|
3428
|
+
/** `lyth_mrcMetadata` — exact current-state native MRC metadata lookup. */
|
|
3429
|
+
lythMrcMetadata(assetId: string, tokenId?: string | null): Promise<MrcMetadataResponse>;
|
|
3430
|
+
/** `lyth_mrcAccount` — exact current-state native MRC account lookup. */
|
|
3431
|
+
lythMrcAccount(account: string, spendLimit?: number | null): Promise<MrcAccountResponse>;
|
|
3432
|
+
/** `lyth_mrcHolders` — top holders for a native MRC asset/token key. */
|
|
3433
|
+
lythMrcHolders(standard: string, assetId: string, tokenId: string, limit?: number | null): Promise<MrcHoldersResponse>;
|
|
3434
|
+
/**
|
|
3435
|
+
* `lyth_mrcHolders` — top holders for a native MRC asset/vault key.
|
|
3436
|
+
*
|
|
3437
|
+
* This is the asset-scoped form used by MRC-4626 vault share balances.
|
|
3438
|
+
*/
|
|
3439
|
+
lythMrcAssetHolders(standard: string, assetId: string, limit?: number | null): Promise<MrcHoldersResponse>;
|
|
3440
|
+
/** `lyth_mrcHolders` — top holders for MRC-4626 vault shares. */
|
|
3441
|
+
lythMrc4626Holders(vaultId: string, limit?: number | null): Promise<MrcHoldersResponse>;
|
|
3442
|
+
private lythMrcHoldersScoped;
|
|
3443
|
+
/** `lyth_getAddressLabel` — indexed display/category label for one address. */
|
|
3444
|
+
lythGetAddressLabel(address: string): Promise<AddressLabelRecord | null>;
|
|
3445
|
+
/** `lyth_getAddressActivity` — indexed per-address activity timeline. */
|
|
3446
|
+
lythGetAddressActivity(address: string, limit?: number, cursor?: string | null): Promise<AddressActivityEntry[]>;
|
|
3447
|
+
/** `lyth_addressActivityKind` — activity index coverage for one address. */
|
|
3448
|
+
lythAddressActivityKind(address: string): Promise<AddressActivityKindResponse>;
|
|
3449
|
+
/** `lyth_agentReputation` — reputation accumulators for an agent provider. */
|
|
3450
|
+
lythAgentReputation(provider: UserAddressInput, categoryId?: number): Promise<AgentReputationResponse>;
|
|
3451
|
+
/** `lyth_decodeTx` — explorer-grade decoded transaction envelope. */
|
|
3452
|
+
lythDecodeTx(txHash: string): Promise<DecodeTxResponse>;
|
|
3453
|
+
/** `lyth_nativeReceipt` — native RISC-V receipt metadata and typed native event rows. */
|
|
3454
|
+
lythNativeReceipt<TDecoded = unknown>(txHash: string): Promise<NativeReceiptResponse<TDecoded>>;
|
|
3455
|
+
/**
|
|
3456
|
+
* Typed native event rows from `lyth_nativeReceipt`.
|
|
3457
|
+
*
|
|
3458
|
+
* This helper intentionally consumes the existing receipt RPC surface;
|
|
3459
|
+
* it does not require a separate `lyth_nativeEvents` node method.
|
|
3460
|
+
*/
|
|
3461
|
+
lythNativeReceiptEvents<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(txHash: string, filter?: NativeEventFilter): Promise<Array<TypedNativeReceiptEvent<TDecoded>>>;
|
|
3462
|
+
/** Typed native market event rows from `lyth_nativeReceipt`. */
|
|
3463
|
+
lythNativeReceiptMarketEvents<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(txHash: string, filter?: NativeEventFilter): Promise<Array<TypedNativeReceiptEvent<TDecoded>>>;
|
|
3464
|
+
/** `lyth_nativeEvents` — historical indexed native event rows. */
|
|
3465
|
+
lythNativeEvents<TDecoded = unknown>(filter: NativeEventsFilter): Promise<NativeEventsResponse<TDecoded>>;
|
|
3466
|
+
/** `lyth_nativeEvents` with decoded rows converted into a caller-selected type. */
|
|
3467
|
+
lythNativeEventsTyped<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(filter: NativeEventsFilter): Promise<NativeEventsResponse<TDecoded>>;
|
|
3468
|
+
/** `lyth_nativeEvents` restricted to native marketplace event rows. */
|
|
3469
|
+
lythNativeMarketEvents<TDecoded = unknown>(filter: NativeEventsFilter): Promise<NativeEventsResponse<TDecoded>>;
|
|
3470
|
+
/** `lyth_nativeEvents` market rows with decoded rows converted into a caller-selected type. */
|
|
3471
|
+
lythNativeMarketEventsTyped<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(filter: NativeEventsFilter): Promise<NativeEventsResponse<TDecoded>>;
|
|
3472
|
+
/** `lyth_nativeAgentState` — current-state native agent policy and escrow rows. */
|
|
3473
|
+
lythNativeAgentState(filter?: NativeAgentStateFilter): Promise<NativeAgentStateResponse>;
|
|
3474
|
+
/** `lyth_nativeMarketState` — current-state native spot and NFT market rows. */
|
|
3475
|
+
lythNativeMarketState(filter?: NativeMarketStateFilter): Promise<NativeMarketStateResponse>;
|
|
3476
|
+
/** `lyth_gapRecords` — retained ingestion/indexing gaps for a block range. */
|
|
3477
|
+
lythGapRecords(fromBlock: number | bigint | string, toBlock: number | bigint | string): Promise<GapRecordsResponse>;
|
|
3478
|
+
/** `lyth_dagParents` — parent vertices for a DAG round. */
|
|
3479
|
+
lythDagParents(round: number | bigint | string): Promise<DagParentsResponse>;
|
|
3480
|
+
/** `lyth_richList` — top holders for a token id. */
|
|
3481
|
+
lythRichList(tokenId: string, limit?: number | null): Promise<RichListResponse>;
|
|
3482
|
+
/** `lyth_clobMarket` — live CLOB market metadata for a market id. */
|
|
3483
|
+
lythClobMarket(marketId: string): Promise<ClobMarketResponse>;
|
|
3484
|
+
/** `lyth_clobMarkets` — CLOB markets observed through indexed trades. */
|
|
3485
|
+
lythClobMarkets(limit?: number | null): Promise<ClobMarketsResponse>;
|
|
3486
|
+
/** `lyth_clobTrades` — CLOB fills for one market. */
|
|
3487
|
+
lythClobTrades(marketId: string, limit?: number, cursor?: string | null): Promise<ClobTradesResponse>;
|
|
3488
|
+
/** `lyth_clobOhlc` — CLOB OHLC candles for a market over a block range. */
|
|
3489
|
+
lythClobOhlc(marketId: string, fromBlock?: number | bigint | string | null, toBlock?: number | bigint | string | null, bucketBlocks?: number | bigint | string | null): Promise<ClobOhlcResponse>;
|
|
3490
|
+
/** `lyth_clobOrderBook` — live CLOB depth from canonical state. */
|
|
3491
|
+
lythClobOrderBook(marketId: string, levels?: number | null): Promise<ClobOrderBookResponse>;
|
|
3492
|
+
/** `lyth_txFeed` — paged global transaction feed. */
|
|
3493
|
+
lythTxFeed(limit?: number, cursor?: string | null): Promise<TxFeedResponse>;
|
|
3494
|
+
/** `lyth_addressProfile` — live account + label + activity aggregate. */
|
|
3495
|
+
lythAddressProfile(address: string): Promise<AddressProfileResponse>;
|
|
3496
|
+
/** `lyth_addressFlow` — recent indexed address-flow aggregate. */
|
|
3497
|
+
lythAddressFlow(address: string, limit?: number): Promise<AddressFlowResponse>;
|
|
3498
|
+
/** `lyth_search` — exact live resolver for hashes, addresses, blocks, and clusters. */
|
|
3499
|
+
lythSearch(query: string, limit?: number): Promise<SearchResponse>;
|
|
3500
|
+
/** `lyth_chainStats` — compact live chain/indexer/mempool summary. */
|
|
3501
|
+
lythChainStats(): Promise<ChainStatsResponse>;
|
|
3502
|
+
/** `lyth_mempoolStatus` — aggregate mempool snapshot. */
|
|
3503
|
+
lythMempoolStatus(): Promise<MempoolSnapshot>;
|
|
3504
|
+
/** `lyth_mempoolPending` — pending txs for a sender. */
|
|
3505
|
+
lythMempoolPending(sender: string): Promise<PendingTxSummary[]>;
|
|
3506
|
+
/** `lyth_currentRound` — latest committed height. */
|
|
3507
|
+
lythCurrentRound(): Promise<RoundInfo>;
|
|
3508
|
+
/** `lyth_peerSummary` — public-safe aggregate peer-network diagnostics. */
|
|
3509
|
+
lythPeerSummary(): Promise<PeerSummaryAggregate>;
|
|
3510
|
+
/**
|
|
3511
|
+
* `lyth_listActivePrecompiles` — milestone-gated precompile catalogue
|
|
3512
|
+
* (OI-0170 / ADR-0015 §5).
|
|
3513
|
+
*/
|
|
3514
|
+
lythListActivePrecompiles(block?: BlockSelector): Promise<PrecompileCatalogueResponse>;
|
|
3515
|
+
/** `lyth_capabilities` — address-keyed precompile capability map. */
|
|
3516
|
+
lythCapabilities(block?: BlockSelector): Promise<CapabilitiesResponse>;
|
|
3517
|
+
/**
|
|
3518
|
+
* `lyth_operatorCapabilities` — node-level availability for operator UI
|
|
3519
|
+
* and explorer surfaces.
|
|
3520
|
+
*/
|
|
3521
|
+
lythOperatorCapabilities(): Promise<OperatorCapabilitiesResponse>;
|
|
3522
|
+
/** `lyth_indexerStatus` — indexer status; `null` when disabled. */
|
|
3523
|
+
lythIndexerStatus(): Promise<IndexerStatus | null>;
|
|
3524
|
+
/** `lyth_getStorageProof` — batched Merkle proofs. */
|
|
3525
|
+
lythGetStorageProof(address: string, slots: string[]): Promise<StorageProofBatch>;
|
|
3526
|
+
/** `lyth_getDelegations` — wallet delegation rows at a block. */
|
|
3527
|
+
lythGetDelegations(wallet: string, block?: BlockSelector): Promise<DelegationsResponse>;
|
|
3528
|
+
/** `lyth_pendingRewards` — wallet pending rewards at a block. */
|
|
3529
|
+
lythPendingRewards(wallet: string, block?: BlockSelector): Promise<PendingRewardsResponse>;
|
|
3530
|
+
/** `lyth_redemptionQueue` — wallet redemption tickets at a block. */
|
|
3531
|
+
lythRedemptionQueue(wallet: string, block?: BlockSelector): Promise<RedemptionQueueResponse>;
|
|
3532
|
+
/** `lyth_getDelegationHistory` — indexed per-wallet delegation event timeline. */
|
|
3533
|
+
lythGetDelegationHistory(wallet: string, limit?: number, cursor?: string | null): Promise<DelegationHistoryRecord[]>;
|
|
3534
|
+
/** `lyth_getClusterDelegators` — delegator addresses for a cluster. */
|
|
3535
|
+
lythGetClusterDelegators(cluster: number, block?: BlockSelector): Promise<ClusterDelegatorsResponse>;
|
|
3536
|
+
/** `lyth_getDelegationCap` — active per-cluster cap at a block. */
|
|
3537
|
+
lythGetDelegationCap(block?: BlockSelector): Promise<DelegationCapResponse>;
|
|
3538
|
+
/** `lyth_getTpmAttestation` — TPM quote digest + EK id for a peer. */
|
|
3539
|
+
lythGetTpmAttestation(peerId: string, block?: BlockSelector): Promise<TpmAttestationResponse>;
|
|
3540
|
+
/** `lyth_getClusterEntity` — entity flag for a cluster. */
|
|
3541
|
+
lythGetClusterEntity(cluster: number, block?: BlockSelector): Promise<ClusterEntityResponse>;
|
|
3542
|
+
/** `lyth_getEntityRatchet` — entity-ratchet snapshot at a block. */
|
|
3543
|
+
lythGetEntityRatchet(block?: BlockSelector): Promise<EntityRatchetResponse>;
|
|
3544
|
+
/** `lyth_operatorInfo` — canonical operator identity envelope. */
|
|
3545
|
+
lythOperatorInfo(operatorId: string): Promise<OperatorInfoResponse>;
|
|
3546
|
+
/** `lyth_getServiceProbe` — latest external reachability report for one public service. */
|
|
3547
|
+
lythGetServiceProbe(peerId: string, serviceMask: number): Promise<ServiceProbeResponse | null>;
|
|
3548
|
+
/** `lyth_reportServiceProbe` — submit a pre-signed public-service probe report. */
|
|
3549
|
+
lythReportServiceProbe(req: ReportServiceProbeRequest): Promise<ReportServiceProbeResponse>;
|
|
3550
|
+
/** `lyth_clusterStatus` — canonical cluster status envelope. */
|
|
3551
|
+
lythClusterStatus(clusterId: number): Promise<ClusterStatusResponse>;
|
|
3552
|
+
/** `lyth_clusterDirectory` — paged public cluster directory. */
|
|
3553
|
+
lythClusterDirectory(page?: number, limit?: number): Promise<ClusterDirectoryPageResponse>;
|
|
3554
|
+
/** `lyth_clusters` — alias for `lyth_clusterDirectory`. */
|
|
3555
|
+
lythClusters(page?: number, limit?: number): Promise<ClusterDirectoryPageResponse>;
|
|
3556
|
+
/**
|
|
3557
|
+
* `lyth_submitPendingChange` — operator-onboarding transport for the
|
|
3558
|
+
* pending-change ledger. Server validates the envelope shape.
|
|
3559
|
+
*/
|
|
3560
|
+
lythSubmitPendingChange(envelope: unknown): Promise<unknown>;
|
|
3561
|
+
/** `lyth_submitEncrypted` — submit a bincode-encoded encrypted envelope hex. */
|
|
3562
|
+
lythSubmitEncrypted(envelopeHex: string): Promise<string>;
|
|
3563
|
+
/** `lyth_getEncryptionKey` — cluster ML-KEM encapsulation key. */
|
|
3564
|
+
lythGetEncryptionKey(): Promise<EncryptionKeyResponse>;
|
|
3565
|
+
/** `lyth_syncStatus` — DAG-sync driver snapshot. */
|
|
3566
|
+
lythSyncStatus(): Promise<DagSyncStatus | null>;
|
|
3567
|
+
/** `lyth_resolveOperatorAuthority` — operator id to authority index. */
|
|
3568
|
+
lythResolveOperatorAuthority(operatorId: string): Promise<OperatorAuthorityResponse>;
|
|
3569
|
+
/** `lyth_signingActivity` — recent per-round signing participation. */
|
|
3570
|
+
lythSigningActivity(authorityIndex: number, limit?: number | null): Promise<OperatorSigningActivityResponse>;
|
|
3571
|
+
/** `lyth_upcomingDuties` — deterministic upcoming duty windows. */
|
|
3572
|
+
lythUpcomingDuties(authorityIndex: number, horizonRounds?: number | null): Promise<UpcomingDutiesResponse>;
|
|
3573
|
+
/** `lyth_operatorRisk` — miss-rate and jail-status window. */
|
|
3574
|
+
lythOperatorRisk(authorityIndex: number, windowRounds?: number | null): Promise<OperatorRiskResponse>;
|
|
3575
|
+
/** `lyth_upgradeStatus` — signed network-upgrade readiness at a height. */
|
|
3576
|
+
lythUpgradeStatus(block?: BlockSelector): Promise<LythUpgradeStatusResponse>;
|
|
3577
|
+
/** `lyth_runtimeProvenance` — public-safe build/runtime provenance. */
|
|
3578
|
+
lythRuntimeProvenance(): Promise<RuntimeProvenanceResponse>;
|
|
3579
|
+
/** `lyth_txStatus` — discriminated transaction lookup outcome. */
|
|
3580
|
+
lythTxStatus(txHash: string): Promise<TxStatusResponse>;
|
|
3581
|
+
/** `lyth_verticesAtRound` — per-vertex authorship observed at a DAG round. */
|
|
3582
|
+
lythVerticesAtRound(round: number | bigint | string): Promise<VerticesAtRoundResponse>;
|
|
3583
|
+
/** `lyth_metricsRange` — retained telemetry series when the node has them. */
|
|
3584
|
+
lythMetricsRange(selectors: string[], range?: readonly [number | bigint | string, number | bigint | string] | null): Promise<MetricsRangeResponse>;
|
|
3585
|
+
/** `lyth_getLatestCheckpoint` — latest PQ-finality checkpoint rows. */
|
|
3586
|
+
lythGetLatestCheckpoint(belowHeight?: number | bigint | string | null): Promise<CheckpointRecord[]>;
|
|
3587
|
+
/** `lyth_getClusterResignations` — in-flight + applied operator resignations. */
|
|
3588
|
+
lythGetClusterResignations(operator?: string | null, status?: "pending" | "applied" | "all" | string | null): Promise<ClusterResignationsResponse>;
|
|
3589
|
+
/** `lyth_getBlsRoundCertificate` — round-advancement BLS aggregate. */
|
|
3590
|
+
lythGetBlsRoundCertificate(round: number | bigint | string): Promise<BlsCertificateResponse | null>;
|
|
3591
|
+
/** `lyth_getLeaderCertificate` — leader-vote BLS aggregate for a block ref. */
|
|
3592
|
+
lythGetLeaderCertificate(round: number | bigint | string, authority: number, digest: string): Promise<BlsCertificateResponse | null>;
|
|
3593
|
+
/** `lyth_getDacCertificate` — data-availability certificate for a block ref. */
|
|
3594
|
+
lythGetDacCertificate(round: number | bigint | string, authority: number, digest: string): Promise<BlsCertificateResponse | null>;
|
|
3595
|
+
/** `lyth_subscribe` — WebSocket-only; returns an RPC error over HTTP. */
|
|
3596
|
+
lythSubscribe(channel: ApiStreamTopic | (string & {})): Promise<unknown>;
|
|
3597
|
+
/** `lyth_unsubscribe` — counterpart to `lythSubscribe`. */
|
|
3598
|
+
lythUnsubscribe(subId: string): Promise<unknown>;
|
|
3599
|
+
/** `debug_traceTransaction` — legacy compatibility trace for a confirmed tx. */
|
|
3600
|
+
debugTraceTransaction(txHash: string): Promise<unknown>;
|
|
3601
|
+
/** `debug_traceCall` — legacy compatibility trace for a dry-run. */
|
|
3602
|
+
debugTraceCall(request: CallRequest, block?: BlockSelector): Promise<unknown>;
|
|
3603
|
+
/** `debug_traceBlockByNumber` — legacy compatibility traces for an entire block. */
|
|
3604
|
+
debugTraceBlockByNumber(block: BlockSelector): Promise<unknown>;
|
|
3605
|
+
/** `debug_mempoolDump` — full mempool snapshot. */
|
|
3606
|
+
debugMempoolDump(): Promise<MempoolSnapshot>;
|
|
3607
|
+
/** `debug_p2pPeers` — connected libp2p peer list. */
|
|
3608
|
+
debugP2pPeers(): Promise<PeerSummary[]>;
|
|
3609
|
+
/** `debug_stateDiff` — state-diff for a block range. */
|
|
3610
|
+
debugStateDiff(params: unknown): Promise<unknown>;
|
|
3611
|
+
/** `debug_chainReorg` — testnet-only reorg trigger. */
|
|
3612
|
+
debugChainReorg(params: unknown): Promise<unknown>;
|
|
3613
|
+
/** `mesh_buildUnsignedTx` — build an unsigned transaction envelope. */
|
|
3614
|
+
meshBuildUnsignedTx(intent: MeshTxIntent): Promise<MeshUnsignedTxResponse>;
|
|
3615
|
+
/** `mesh_combineTx` — combine an unsigned envelope with a wallet signature. */
|
|
3616
|
+
meshCombineTx(unsignedTx: string, signatureHex: string, algo?: "secp256k1" | "ml_dsa_65" | string, pubkeyHex?: string): Promise<MeshSignedTxResponse>;
|
|
3617
|
+
/** `mesh_decodeTx` — decode a signed or unsigned mesh envelope. */
|
|
3618
|
+
meshDecodeTx(envelopeHex: string, signed?: boolean): Promise<MeshDecodedTx>;
|
|
3619
|
+
/** `mesh_submitTx` — submit a signed mesh envelope. */
|
|
3620
|
+
meshSubmitTx(signedTx: string): Promise<string>;
|
|
3621
|
+
}
|
|
3622
|
+
/** Decode a `0x`-prefixed hex quantity to a `bigint`. */
|
|
3623
|
+
declare function parseQuantityBig(hex: string): bigint;
|
|
3624
|
+
/**
|
|
3625
|
+
* Decode a `0x`-prefixed hex quantity to a JS `number`. Convenience for
|
|
3626
|
+
* small quantities (chain id, block height, gas estimate). Throws if the
|
|
3627
|
+
* value exceeds `Number.MAX_SAFE_INTEGER`.
|
|
3628
|
+
*/
|
|
3629
|
+
declare function parseQuantity(hex: string): number;
|
|
3630
|
+
declare function nativeEventsFilterParams(filter: NativeEventsFilter): Record<string, unknown>;
|
|
3631
|
+
declare function decodeNativeReceiptResponse<TDecoded = unknown>(value: unknown): NativeReceiptResponse<TDecoded>;
|
|
3632
|
+
declare function decodeTxFeedResponse(value: unknown): TxFeedResponse;
|
|
3633
|
+
declare function nativeAgentStateFilterParams(filter: NativeAgentStateFilter): Record<string, NativeAgentStateFilterParamValue>;
|
|
3634
|
+
declare function decodeNativeAgentStateResponse(value: unknown): NativeAgentStateResponse;
|
|
3635
|
+
declare function nativeMarketStateFilterParams(filter: NativeMarketStateFilter): Record<string, NativeMarketStateFilterParamValue>;
|
|
3636
|
+
|
|
3637
|
+
/** Common typed payload envelope emitted by the native event projector. */
|
|
3638
|
+
interface NativeDecodedEvent {
|
|
3639
|
+
block_height: number;
|
|
3640
|
+
tx_index: number;
|
|
3641
|
+
sequence: number;
|
|
3642
|
+
family: string;
|
|
3643
|
+
event_name: string;
|
|
3644
|
+
nonce?: number | null;
|
|
3645
|
+
market_surface?: string | null;
|
|
3646
|
+
marketSurface?: string | null;
|
|
3647
|
+
market_asset_id?: string | null;
|
|
3648
|
+
marketAssetId?: string | null;
|
|
3649
|
+
market_related_asset_id?: string | null;
|
|
3650
|
+
marketRelatedAssetId?: string | null;
|
|
3651
|
+
market_order_id?: string | null;
|
|
3652
|
+
marketOrderId?: string | null;
|
|
3653
|
+
market_related_order_id?: string | null;
|
|
3654
|
+
marketRelatedOrderId?: string | null;
|
|
3655
|
+
price?: string | null;
|
|
3656
|
+
quantity?: string | null;
|
|
3657
|
+
remaining?: string | null;
|
|
3658
|
+
side?: string | null;
|
|
3659
|
+
status?: string | null;
|
|
3660
|
+
nft_standard?: string | null;
|
|
3661
|
+
nftStandard?: string | null;
|
|
3662
|
+
policy?: NativeMrcPolicyProjection | null;
|
|
3663
|
+
royalty_bps?: number | null;
|
|
3664
|
+
royaltyBps?: number | null;
|
|
3665
|
+
listing_kind?: unknown;
|
|
3666
|
+
listingKind?: unknown;
|
|
3667
|
+
expires_at_block?: number | null;
|
|
3668
|
+
expiresAtBlock?: number | null;
|
|
3669
|
+
tick_size?: string | null;
|
|
3670
|
+
tickSize?: string | null;
|
|
3671
|
+
lot_size?: string | null;
|
|
3672
|
+
lotSize?: string | null;
|
|
3673
|
+
min_quantity?: string | null;
|
|
3674
|
+
minQuantity?: string | null;
|
|
3675
|
+
min_notional?: string | null;
|
|
3676
|
+
minNotional?: string | null;
|
|
3677
|
+
payload_hash: string;
|
|
3678
|
+
[field: string]: unknown;
|
|
3679
|
+
}
|
|
3680
|
+
/** Canonical policy body projected from native MRC policy-account events. */
|
|
3681
|
+
interface NativeMrcPolicyProjection {
|
|
3682
|
+
enabled: boolean;
|
|
3683
|
+
per_action_limit: string | number;
|
|
3684
|
+
window_limit: string | number;
|
|
3685
|
+
allowed_assets: Array<string | Array<number>>;
|
|
3686
|
+
}
|
|
3687
|
+
type NativeEventProjection = NativeDecodedEvent;
|
|
3688
|
+
declare const NATIVE_MARKET_EVENT_FAMILY: "market";
|
|
3689
|
+
/** Optional filters applied to native receipt event rows. */
|
|
3690
|
+
interface NativeEventFilter {
|
|
3691
|
+
address?: string;
|
|
3692
|
+
eventTopic?: string;
|
|
3693
|
+
family?: string;
|
|
3694
|
+
eventName?: string;
|
|
3695
|
+
}
|
|
3696
|
+
declare function nativeMarketEventFilter(filter?: NativeEventFilter): NativeEventFilter;
|
|
3697
|
+
type TypedNativeReceiptEvent<TDecoded extends NativeDecodedEvent = NativeDecodedEvent> = NativeReceiptEvent<TDecoded>;
|
|
3698
|
+
type NativeEventConsumer<TDecoded extends NativeDecodedEvent = NativeDecodedEvent> = (event: TypedNativeReceiptEvent<TDecoded>) => void | Promise<void>;
|
|
3699
|
+
declare function isNativeDecodedEvent(value: unknown): value is NativeDecodedEvent;
|
|
3700
|
+
declare function parseNativeDecodedEvent<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(event: Pick<NativeReceiptEvent<unknown>, "decoded" | "decodedJson" | "eventTopic" | "logIndex">): TDecoded;
|
|
3701
|
+
declare function nativeEventMatches(event: NativeReceiptEvent<unknown>, filter?: NativeEventFilter): boolean;
|
|
3702
|
+
declare function nativeEventsFromReceipt<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(receipt: NativeReceiptResponse<unknown>, filter?: NativeEventFilter): Array<TypedNativeReceiptEvent<TDecoded>>;
|
|
3703
|
+
declare function nativeMarketEventsFromReceipt<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(receipt: NativeReceiptResponse<unknown>, filter?: NativeEventFilter): Array<TypedNativeReceiptEvent<TDecoded>>;
|
|
3704
|
+
declare function nativeEventsFromHistory<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(response: NativeEventsResponse<unknown>): NativeEventsResponse<TDecoded>;
|
|
3705
|
+
declare function nativeMarketEventsFromHistory<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(response: NativeEventsResponse<unknown>): NativeEventsResponse<TDecoded>;
|
|
3706
|
+
declare function consumeNativeEvents<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(receipt: NativeReceiptResponse<unknown>, consumer: NativeEventConsumer<TDecoded>, filter?: NativeEventFilter): Promise<number>;
|
|
3707
|
+
|
|
3708
|
+
export { type AssetPolicy as $, type ApiStreamsIndexResponse as A, type BlockSelector as B, type ChainStatsResponse as C, RpcClient as D, API_STREAM_TOPICS as E, type AccountPolicy as F, type AccountProofResponse as G, type Address as H, type AddressActivityArchiveRedirect as I, type AddressActivityEntry as J, type AddressActivityKind as K, type AddressActivityKindResponse as L, type MrcMetadataResponse as M, type NativeReceiptFee as N, type OperatorCapabilitiesResponse as O, type PendingRewardsResponse as P, type AddressActivityKindRetention as Q, type RuntimeBuildProvenance as R, type SearchResponse as S, type TxFeedResponse as T, type AddressLabelRecord as U, type AgentReputationCategoryScope as V, type AgentReputationRecord as W, type AgentReputationResponse as X, type ApiStreamTopic as Y, type ApiStreamTopicMetadata as Z, type ApiStreamTopicRetention as _, type RuntimeUpgradeStatus as a, type GapRange as a$, type AttestationWindow as a0, BRIDGE_QUOTE_API_BLOCKED_REASON as a1, BRIDGE_REVERT_TAGS as a2, BRIDGE_SELECTORS as a3, BRIDGE_SUBMIT_API_BLOCKED_REASON as a4, type BlockHeader as a5, type BlockTag as a6, type BlsCertificateResponse as a7, type BridgeAdminControl as a8, type BridgeBytesInput as a9, type ClobMarketRecord as aA, type ClobMarketSummary as aB, type ClobTrade as aC, type ClusterDelegatorsResponse as aD, type ClusterDirectoryEntryResponse as aE, type ClusterDirectoryPageResponse as aF, type ClusterEntityResponse as aG, type ClusterMemberResponse as aH, type ClusterResignationRow as aI, type ClusterResignationsResponse as aJ, type ClusterStatusResponse as aK, type DagParent as aL, type DagParentsResponse as aM, type DagSyncStatus as aN, type DecodeTxExtension as aO, type DecodeTxLog as aP, type DecodeTxPqAttestation as aQ, type DecodeTxResponse as aR, type DelegationCapResponse as aS, type DelegationHistoryRecord as aT, type DelegationRow as aU, type DelegationsResponse as aV, type DutyAbsence as aW, type EncryptionKeyResponse as aX, type EntityRatchetResponse as aY, type ExplorerEndpoint as aZ, type FeeHistoryResponse as a_, type BridgeCircuitBreakerState as aa, BridgePrecompileError as ab, type BridgeQuoteSubmitReadiness as ac, type BridgeRiskTier as ad, type BridgeRouteAssessment as ae, type BridgeRouteCandidate as af, type BridgeRouteCatalogue as ag, BridgeRouteCatalogueError as ah, type BridgeRouteCatalogueJsonOptions as ai, type BridgeRouteCataloguePayload as aj, type BridgeRouteCatalogueRoute as ak, type BridgeRouteCatalogueValidation as al, type BridgeRouteDisclosure as am, type BridgeRouteSelection as an, type BridgeRoutesSource as ao, type BridgeTransferIntent as ap, type BridgeTransferRequest as aq, type BridgeVerifierDisclosure as ar, CHAIN_REGISTRY as as, CHAIN_REGISTRY_RAW_BASE as at, type CallRequest as au, type CapabilitiesResponse as av, type CapabilityDescriptor as aw, type ChainInfo as ax, type ChainRegistry as ay, type CheckpointRecord as az, type NativeReceiptResponse as b, type NativeReceiptCounters as b$, type GapRecord as b0, type GapRecordsResponse as b1, type Hash as b2, type Hex as b3, type IndexerStatus as b4, type JailStatusWindow as b5, type KeyRotationWindow as b6, type LythUpgradePlanStatus as b7, type LythUpgradeStatusResponse as b8, MAX_NATIVE_RECEIPT_EVENTS as b9, type NativeAgentAvailabilityStateRecord as bA, type NativeAgentConsentStateRecord as bB, type NativeAgentEscrowStateRecord as bC, type NativeAgentIssuerStateRecord as bD, type NativeAgentPolicySpendStateRecord as bE, type NativeAgentPolicyStateRecord as bF, type NativeAgentReputationReviewStateRecord as bG, type NativeAgentServiceStateRecord as bH, type NativeAgentStateFilterParamValue as bI, type NativeAgentStateResponseFilters as bJ, type NativeAgentStateSource as bK, type NativeCollectionRoyaltyStateRecord as bL, type NativeEventConsumer as bM, type NativeEventProjection as bN, type NativeEventsResponseFilters as bO, type NativeEventsSource as bP, type NativeMarketOrderBookDelta as bQ, type NativeMarketOrderBookDeltasResponseFilters as bR, type NativeMarketOrderBookDeltasSource as bS, type NativeMarketOrderBookStreamAction as bT, type NativeMarketOrderBookStreamPayload as bU, type NativeMarketStateFilterParamValue as bV, type NativeMarketStateResponseFilters as bW, type NativeMarketStateSource as bX, type NativeModuleForwarderDescriptor as bY, type NativeMrcPolicyProjection as bZ, type NativeNftListingStateRecord as b_, type MempoolSnapshot as ba, type MeshDecodedTx as bb, type MeshSignedTxResponse as bc, type MeshTxIntent as bd, type MeshUnsignedTxResponse as be, type MetricsRangeResponse as bf, type MetricsRangeSample as bg, type MetricsRangeSeries as bh, type MetricsRangeStatus as bi, type MrcAccountRecord as bj, type MrcMetadataRecord as bk, type MrcPolicyRecord as bl, type MrcPolicySpendRecord as bm, NATIVE_MARKET_EVENT_FAMILY as bn, NATIVE_MARKET_ORDER_BOOK_STREAM_TOPIC as bo, NO_EVM_ARCHIVE_PROOF_SCHEMA as bp, NO_EVM_ARCHIVE_SIGNATURE_SCHEME as bq, NO_EVM_FINALITY_EVIDENCE_SCHEMA as br, NO_EVM_FINALITY_EVIDENCE_SOURCE as bs, NO_EVM_RECEIPTS_ROOT_DOMAIN as bt, NO_EVM_RECEIPT_CODEC as bu, NO_EVM_RECEIPT_PROOF_SCHEMA as bv, NO_EVM_RECEIPT_PROOF_TYPE as bw, NO_EVM_RECEIPT_ROOT_ALGORITHM as bx, type NativeAgentArbiterStateRecord as by, type NativeAgentAttestationStateRecord as bz, type NativeDecodedEvent as c, TESTNET_69420 as c$, type NativeReceiptEvent as c0, type NativeReceiptSource as c1, type NativeSpotMarketStateRecord as c2, type NativeSpotOrderStateRecord as c3, type NetworkClientOptions as c4, type NetworkSlug as c5, type NoEvmArchiveCoveringSnapshot as c6, type NoEvmArchiveProof as c7, type NoEvmArchiveSignatureVerification as c8, type NoEvmArchiveSignatureVerificationIssue as c9, type PeerSummaryAggregate as cA, type PendingRewardsRow as cB, type PendingTxSummary as cC, type PrecompileCatalogueResponse as cD, type PrecompileDescriptor as cE, type Quantity as cF, type RankedBridgeRoute as cG, type ReceiptProofTrustArchivePolicy as cH, type ReceiptProofTrustArchiveSigner as cI, type ReceiptProofTrustFinalityPolicy as cJ, type ReceiptProofTrustFinalitySigner as cK, type ReceiptProofTrustPolicy as cL, type RedemptionQueueTicket as cM, type RegistryRecord as cN, type ReportServiceProbeRequest as cO, type ReportServiceProbeResponse as cP, type RichListHolder as cQ, type RichListResponse as cR, type RoundInfo as cS, type RpcClientOptions as cT, type RpcEndpoint as cU, type RuntimeProvenanceResponse as cV, type SearchHit as cW, type ServiceProbeStatusLabel as cX, type SigningEntryStatus as cY, type StorageProofBatch as cZ, type SyncStatus as c_, type NoEvmArchiveSignatureVerificationIssueCode as ca, type NoEvmArchiveTrustedSigner as cb, type NoEvmBlockBlsFinalityVerification as cc, type NoEvmBlsFinalityVerification as cd, type NoEvmFinalityBlockReference as ce, type NoEvmFinalityCertificate as cf, type NoEvmFinalityEvidence as cg, type NoEvmReceiptFinalityTrustPolicy as ch, type NoEvmReceiptProof as ci, NoEvmReceiptProofError as cj, type NoEvmReceiptProofErrorCode as ck, type NoEvmReceiptProofVerification as cl, type NoEvmReceiptTrustIssue as cm, type NoEvmReceiptTrustIssueCode as cn, type NoEvmReceiptTrustPolicy as co, type NoEvmReceiptTrustVerification as cp, type NoEvmReceiptTrustedBlsSigner as cq, type OperatorAuthorityResponse as cr, type OperatorInfoResponse as cs, type OperatorRiskResponse as ct, type OperatorSigningActivityResponse as cu, type OperatorSigningEntry as cv, type OperatorSurfaceCapability as cw, type OperatorSurfaceStatus as cx, type P2pSeed as cy, type PeerSummary as cz, type NativeEventFilter as d, parseChainRegistryToml as d$, type TokenBalanceMrcIdentity as d0, type TokenBalanceRecord as d1, type TpmAttestationResponse as d2, type TransactionReceipt as d3, type TransactionView as d4, type TxFeedReceipt as d5, type TxFeedTransaction as d6, type TxStatusFoundResponse as d7, type TxStatusNotFoundResponse as d8, type TxStatusResponse as d9, encodeSetBridgeResumeCooldownCalldata as dA, encodeSetBridgeRouteFinalityCalldata as dB, exportBridgeRouteCatalogueJson as dC, fetchChainInfoLatest as dD, fetchChainRegistryLatest as dE, getChainInfo as dF, getNoEvmReceiptTrustPolicy as dG, getP2pSeeds as dH, getRpcEndpoints as dI, isBridgeAdminLockedRevert as dJ, isBridgeCooldownZeroRevert as dK, isBridgeFinalityZeroRevert as dL, isBridgeResumeCooldownActiveRevert as dM, isNativeDecodedEvent as dN, isNativeMarketOrderBookStreamPayload as dO, nativeAgentStateFilterParams as dP, nativeEventMatches as dQ, nativeEventsFilterParams as dR, nativeEventsFromHistory as dS, nativeEventsFromReceipt as dT, nativeMarketEventFilter as dU, nativeMarketEventsFromHistory as dV, nativeMarketEventsFromReceipt as dW, nativeMarketStateFilterParams as dX, noEvmReceiptTrustPolicyFromChainInfo as dY, normalizeBridgeRouteCatalogue as dZ, parseBridgeRouteCatalogueJson as d_, type UpcomingDutiesResponse as da, type UpcomingDutyMap as db, type UserAddressInput as dc, type VertexAtRound as dd, type VerticesAtRoundResponse as de, assertNativeMarketOrderBookStreamPayload as df, assessBridgeRoute as dg, bridgeAddressHex as dh, bridgeQuoteSubmitReadiness as di, bridgeRoutesReadiness as dj, bridgeTransferCandidates as dk, buildBridgeRouteCatalogue as dl, computeNoEvmDacFinalityMessage as dm, computeNoEvmLeaderFinalityMessage as dn, computeNoEvmReceiptsRoot as dp, computeNoEvmRoundFinalityMessage as dq, computeNoEvmTargetReceiptHash as dr, consumeNativeEvents as ds, decodeNativeAgentStateResponse as dt, decodeNativeMarketOrderBookDeltasResponse as du, decodeNativeReceiptResponse as dv, decodeNoEvmReceiptTranscript as dw, decodeTxFeedResponse as dx, encodeBlockSelector as dy, encodeLockBridgeConfigCalldata as dz, type TypedNativeReceiptEvent as e, parseNativeDecodedEvent as e0, parseQuantity as e1, parseQuantityBig as e2, rankBridgeRoutes as e3, selectBridgeTransferRoute as e4, validateBridgeRouteCatalogue as e5, verifyNoEvmArchiveProofSignatures as e6, verifyNoEvmBlockFinalityEvidenceMultisig as e7, verifyNoEvmBlockFinalityEvidenceThreshold as e8, verifyNoEvmFinalityEvidenceMultisig as e9, verifyNoEvmFinalityEvidenceThreshold as ea, verifyNoEvmReceiptProof as eb, verifyNoEvmReceiptProofTrust as ec, type NativeEventsFilter as f, type NativeEventsResponse as g, type NativeAgentStateFilter as h, type NativeAgentStateResponse as i, type NativeMarketStateFilter as j, type NativeMarketStateResponse as k, type NativeMarketOrderBookDeltasRequest as l, type NativeMarketOrderBookDeltasResponse as m, type AddressProfileResponse as n, type AddressFlowResponse as o, type RedemptionQueueResponse as p, type MrcAccountResponse as q, type MrcHoldersResponse as r, type BridgeRoutesRequest as s, type BridgeRoutesResponse as t, type ServiceProbeResponse as u, type ClobMarketsResponse as v, type ClobMarketResponse as w, type ClobTradesResponse as x, type ClobOhlcResponse as y, type ClobOrderBookResponse as z };
|