@monolythium/core-sdk 0.3.9 → 0.3.11

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.
@@ -180,6 +180,155 @@ interface BridgeRoutesResponse {
180
180
  bridgeRouteDisclosures?: BridgeRouteDisclosure[] | null;
181
181
  source?: BridgeRoutesSource | null;
182
182
  }
183
+ /**
184
+ * Per-asset drain rate-limit + circuit-breaker state (MB-2).
185
+ *
186
+ * Mirrors the `TAG_DRAIN_CAP` (`0x26`) family in the chain bridge
187
+ * storage. `capPerWindow === "0"` disables the breaker for the
188
+ * `(bridge, asset)` pair. `drained` is the running total for the active
189
+ * window; `remaining` is the SDK-computed `cap - drained` floored at
190
+ * zero (decimal string), or `null` when the cap is disabled.
191
+ */
192
+ interface BridgeDrainCap {
193
+ /** Maximum aggregate drain per rolling window (`uint256` decimal). */
194
+ capPerWindow: string;
195
+ /** Window length in Protocore blocks. */
196
+ windowBlocks: string;
197
+ /** `block_number / window_blocks` at the last drain. */
198
+ currentBucket: string;
199
+ /** Running drained total for the active window (`uint256` decimal). */
200
+ drained: string;
201
+ /** SDK-computed `capPerWindow - drained` floored at `0`; `null` if disabled. */
202
+ remaining?: string | null;
203
+ }
204
+ /**
205
+ * Bridge route circuit-breaker + resume-cooldown health (MB-2).
206
+ *
207
+ * Mirrors the bridge-record fields `PAUSED_AT_BLOCK` (`0x13`),
208
+ * `RESUME_COOLDOWN_BLOCKS` (`0x12`), `ROUTE_FINALITY_BLOCKS` (`0x14`),
209
+ * and `ADMIN_LOCKED_AT_BLOCK` (`0x11`) plus the per-asset drain cap.
210
+ * `paused` is derived from `pausedAt !== "0"`.
211
+ */
212
+ interface BridgeBreakerState {
213
+ /** Bridge id the breaker state belongs to (`0x` 32 bytes). */
214
+ bridgeId: string;
215
+ /** `true` when the route is in a recorded pause window. */
216
+ paused: boolean;
217
+ /** Block at which the current pause was committed; `"0"` when not paused. */
218
+ pausedAt: string;
219
+ /** Cooldown blocks that must elapse after a pause before resume. */
220
+ resumeCooldownBlocks: string;
221
+ /** Route-specific foreign-chain finality depth. */
222
+ routeFinalityBlocks: string;
223
+ /** Block at which mutable route config was frozen; `"0"` = unlocked. */
224
+ adminLockedAtBlock: string;
225
+ /** Per-asset drain rate-limit + breaker counters, when a cap is set. */
226
+ drainCap?: BridgeDrainCap | null;
227
+ }
228
+ /**
229
+ * Latest light-client anchor metadata on a {@link BridgeHealthRecord}.
230
+ */
231
+ interface BridgeAnchorState {
232
+ /** Latest verified foreign-chain header root (`0x` 32 bytes). */
233
+ headerRoot: string;
234
+ /** Latest verified foreign-chain block number. */
235
+ headerBlock: number;
236
+ /** Protocore block at which the latest anchor was recorded. */
237
+ updatedAtProtocoreBlock: number;
238
+ }
239
+ /**
240
+ * MB-2 — bridge-level circuit-breaker + pause posture on a
241
+ * {@link BridgeHealthRecord}. Amounts are `0x`-hex `uint256` strings;
242
+ * block counts are numbers.
243
+ */
244
+ interface BridgeCircuitBreakerFields {
245
+ /** Bridge-default drain cap per rolling window (`0x`-hex `uint256`); `0x0` disables it. */
246
+ defaultDrainCapPerWindow: string;
247
+ /** Bridge-default drain-window length in Protocore blocks. */
248
+ defaultDrainWindowBlocks: number;
249
+ /** `true` when the route is currently in a recorded pause window. */
250
+ paused: boolean;
251
+ /** Protocore block the current pause was committed at; `null` when not paused. */
252
+ pausedAtBlock: number | null;
253
+ /** Cooldown (blocks) that must elapse after a pause before resume. */
254
+ resumeCooldownBlocks: number;
255
+ }
256
+ /** One bridge-health row in a {@link BridgeHealthResponse}. */
257
+ interface BridgeHealthRecord {
258
+ /** 32-byte bridge id (`0x` hex). */
259
+ bridgeId: string;
260
+ /** Stable bridge lifecycle status label. */
261
+ status: string;
262
+ /** Raw bridge lifecycle status byte. */
263
+ statusCode: number;
264
+ /** Latest light-client anchor metadata. */
265
+ latestAnchor: BridgeAnchorState;
266
+ /** MB-2 bridge-level circuit-breaker / pause posture. */
267
+ circuitBreaker: BridgeCircuitBreakerFields;
268
+ }
269
+ /**
270
+ * `lyth_bridgeHealth` response — a page of bridge-record health envelopes
271
+ * (MB-2). The chain pages the **global** bridge set keyed by `cursor` +
272
+ * `limit`; there is no single-bridge form. Each record's `circuitBreaker`
273
+ * answers "is this route paused / rate-limited" in one round-trip; the
274
+ * per-route live drain bucket is `lyth_bridgeDrainStatus`.
275
+ */
276
+ interface BridgeHealthResponse {
277
+ /** Response schema version (`1`). */
278
+ schemaVersion: number;
279
+ /** Data source — `"native_state_storage"`. */
280
+ source: string;
281
+ /** Bridge precompile address (`0x1008`). */
282
+ precompile: string;
283
+ /** Bridge-health rows in this page. */
284
+ records: BridgeHealthRecord[];
285
+ /** Opaque cursor for the next page (`0x` hex), or `null` at the end. */
286
+ nextCursor: string | null;
287
+ }
288
+ /**
289
+ * `lyth_bridgeDrainStatus` response — the live per-route circuit-breaker
290
+ * drain bucket for one `(bridgeId, wrappedAsset)` route (MB-2).
291
+ *
292
+ * `remaining` is `capPerWindow - drainedThisBucket` (clamped at `0x0`)
293
+ * when a per-asset cap is set; `0x0` when no per-asset cap exists (no
294
+ * per-asset rate limit — the `bridgeDefault` applies). Amounts are
295
+ * `0x`-hex `uint256` strings; block counts are numbers.
296
+ */
297
+ interface BridgeDrainStatus {
298
+ /** Response schema version (`1`). */
299
+ schemaVersion: number;
300
+ /** Data source — `"native_state_storage"`. */
301
+ source: string;
302
+ /** Bridge precompile address (`0x1008`). */
303
+ precompile: string;
304
+ /** Bridge id the bucket belongs to (`0x` 32 bytes). */
305
+ bridgeId: string;
306
+ /** Wrapped (Protocore-side) asset (`mono` bech32m). */
307
+ wrappedAsset: string;
308
+ /** Per-asset drain cap per window (`0x`-hex `uint256`); `0x0` = no per-asset cap. */
309
+ capPerWindow: string;
310
+ /** Per-asset window length in Protocore blocks. */
311
+ windowBlocks: number;
312
+ /** `block_number / window_blocks` at the last drain. */
313
+ currentBucket: number;
314
+ /** Running drained total for the active window (`0x`-hex `uint256`). */
315
+ drainedThisBucket: string;
316
+ /** `capPerWindow - drainedThisBucket` clamped at `0x0` (`0x0` when no per-asset cap). */
317
+ remaining: string;
318
+ /** Bridge-default fallback fields, surfaced when no per-asset cap is configured. */
319
+ bridgeDefault: {
320
+ /** Bridge-default drain cap per window (`0x`-hex `uint256`). */
321
+ drainCapPerWindow: string;
322
+ /** Bridge-default drain-window length in Protocore blocks. */
323
+ drainWindowBlocks: number;
324
+ };
325
+ }
326
+ /**
327
+ * Compute the `remaining` field for a {@link BridgeDrainCap} from its
328
+ * `capPerWindow` and `drained` decimal strings, floored at `0`. Returns
329
+ * `null` when the cap is disabled (`capPerWindow === "0"`).
330
+ */
331
+ declare function bridgeDrainRemaining(capPerWindow: string, drained: string): string | null;
183
332
  declare function assessBridgeRoute(route: BridgeRouteDisclosure): BridgeRouteAssessment;
184
333
  declare function rankBridgeRoutes(routes: readonly BridgeRouteDisclosure[]): RankedBridgeRoute[];
185
334
  declare function bridgeTransferCandidates(intent: BridgeTransferIntent, routes: readonly BridgeRouteDisclosure[]): BridgeRouteCandidate[];
@@ -2194,6 +2343,1429 @@ declare function isNativeMarketOrderBookStreamPayload(value: unknown): value is
2194
2343
  declare function assertNativeMarketOrderBookStreamPayload(value: unknown): asserts value is NativeMarketOrderBookStreamPayload;
2195
2344
  declare function decodeNativeMarketOrderBookDeltasResponse(value: unknown): NativeMarketOrderBookDeltasResponse;
2196
2345
 
2346
+ /**
2347
+ * Node-registry precompile ABI helpers and service capability constants.
2348
+ *
2349
+ * These constants mirror `protocore-node-registry::capabilities` and
2350
+ * `protocore-node-registry::abi`. They are exported for wallets,
2351
+ * service probers, faucets, and operator dashboards that need to build
2352
+ * canonical registry transactions without retyping low-level values.
2353
+ */
2354
+ declare const NODE_REGISTRY_CAPABILITIES: {
2355
+ readonly SERVES_RPC: 1;
2356
+ readonly SERVES_INDEXER: 2;
2357
+ readonly SERVES_BROADCASTER: 4;
2358
+ readonly SERVES_ARCHIVE: 8;
2359
+ readonly SERVES_WEBSOCKET: 16;
2360
+ readonly SERVES_LIGHT_CLIENT: 32;
2361
+ readonly SERVES_ORACLE_WRITER: 64;
2362
+ readonly SERVES_BRIDGE_RELAY: 128;
2363
+ readonly SERVES_PUBLIC_API: 256;
2364
+ /** GPU prover — may bid on + serve the GPU prover market (MB-4, bit 9). */
2365
+ readonly SERVES_GPU_PROVE: 512;
2366
+ };
2367
+ /** Maximum basis-point value for any PF-6 diversity term / the headline score. */
2368
+ declare const DIVERSITY_SCORE_MAX = 10000;
2369
+ /** BLAKE3 multisig address-derivation domain (cluster-anchor preimage, MB-5). */
2370
+ declare const MULTISIG_ADDRESS_DERIVATION_DOMAIN: "MONO_MULTISIG_BLAKE3_20_V1";
2371
+ declare const NODE_REGISTRY_CAPABILITY_MASK = 65535;
2372
+ declare const NODE_REGISTRY_PUBLIC_SERVICE_MASK: number;
2373
+ declare const SERVICE_PROBE_STATUS: {
2374
+ readonly UNKNOWN: 0;
2375
+ readonly REACHABLE: 1;
2376
+ readonly DEGRADED: 2;
2377
+ readonly UNREACHABLE: 3;
2378
+ };
2379
+ declare const NODE_REGISTRY_SELECTORS: {
2380
+ readonly reportServiceProbe: "0xeee31bba";
2381
+ readonly getServiceProbe: "0x1fcbfbce";
2382
+ /** `setNetworkMetadata(bytes32,uint16,bytes3,bytes)` — owner-callable (PF-6). */
2383
+ readonly setNetworkMetadata: string;
2384
+ /** `getOperatorNetworkMetadata(bytes32)` view (PF-6). */
2385
+ readonly getOperatorNetworkMetadata: string;
2386
+ /** `getClusterDiversity(uint32)` view (PF-6). */
2387
+ readonly getClusterDiversity: string;
2388
+ };
2389
+ /** Canonical `ClusterFormed(uint32,uint64,address,bytes)` event topic0 (MB-5). */
2390
+ declare const CLUSTER_FORMED_EVENT_SIG: "ClusterFormed(uint32,uint64,address,bytes)";
2391
+ interface ReportServiceProbeCalldataArgs {
2392
+ peerId: string | Uint8Array | readonly number[];
2393
+ serviceMask: number;
2394
+ status: number;
2395
+ latencyMs: number;
2396
+ probeDigest: string | Uint8Array | readonly number[];
2397
+ }
2398
+ declare class NodeRegistryError extends Error {
2399
+ constructor(message: string);
2400
+ }
2401
+ declare function nodeRegistryAddressHex(): string;
2402
+ declare function isValidNodeRegistryCapabilities(flags: number): boolean;
2403
+ declare function isValidPublicServiceProbeMask(mask: number): boolean;
2404
+ declare function isSinglePublicServiceProbeMask(mask: number): boolean;
2405
+ declare function isConcreteServiceProbeStatus(status: number): boolean;
2406
+ declare function serviceProbeStatusLabel(status: number): string;
2407
+ declare function encodeReportServiceProbeCalldata(args: ReportServiceProbeCalldataArgs): string;
2408
+ /**
2409
+ * Hosting class an operator runs under (PF-6). Mirrors
2410
+ * `node-registry::registration::HostingClass`. Any byte outside `0..=2`
2411
+ * decodes to `cloud` (the least-diverse class).
2412
+ */
2413
+ type NodeHostingClass = "bareMetal" | "coLocation" | "cloud";
2414
+ /** Decode a hosting-class byte. Values outside `0..=2` → `cloud`. */
2415
+ declare function nodeHostingClassFromByte(b: number): NodeHostingClass;
2416
+ /** Encode a hosting class to its right-aligned `u8` enum byte. */
2417
+ declare function nodeHostingClassToByte(c: NodeHostingClass): number;
2418
+ /**
2419
+ * `lyth_getOperatorNetworkMetadata` view (PF-6). Mirrors the
2420
+ * `(uint16 asn, bytes3 geoRegion, uint8 hostingClass, bytes32
2421
+ * ipAddressHash, bytes32 pcrDigest)` return tuple. The raw IP never
2422
+ * lives on-chain — `ipAddressHash` is `keccak256(ipHint)`.
2423
+ */
2424
+ interface OperatorNetworkMetadata {
2425
+ /** Autonomous-system number; `0` = not declared. */
2426
+ asn: number;
2427
+ /** ISO-3166-1 alpha-3 region as `0x` 3-byte hex; all-zero = not declared. */
2428
+ geoRegion: string;
2429
+ /** Declared hosting class. */
2430
+ hostingClass: NodeHostingClass;
2431
+ /** `keccak256` of the operator's public IP (`0x` 32 bytes). */
2432
+ ipAddressHash: string;
2433
+ /** `keccak256` of the TPM PCR digest (`0x` 32 bytes). */
2434
+ pcrDigest: string;
2435
+ }
2436
+ /**
2437
+ * `lyth_getClusterDiversity` view (PF-6). Mirrors the
2438
+ * `(uint16 score, uint16 asnVariance, uint16 geoVariance, uint16
2439
+ * hostingSpread)` return tuple. Every field is in `0..=10000` bps.
2440
+ */
2441
+ interface ClusterDiversity {
2442
+ /** Headline diversity score (`0..=10000`). */
2443
+ score: number;
2444
+ /** Normalised ASN-distribution entropy (`0..=10000`). */
2445
+ asnVariance: number;
2446
+ /** Normalised country-distribution entropy (`0..=10000`). */
2447
+ geoVariance: number;
2448
+ /** Normalised hosting-class-distribution entropy (`0..=10000`). */
2449
+ hostingSpread: number;
2450
+ }
2451
+ /**
2452
+ * `lyth_getClusterDiversity` RPC response (PF-6).
2453
+ *
2454
+ * Distinct from {@link ClusterDiversity} (which decodes the
2455
+ * `getClusterDiversity(uint32)` ABI return tuple from an `eth_call`):
2456
+ * this is the JSON the `lyth_getClusterDiversity` method returns,
2457
+ * serialized from the chain's `ClusterDiversity` struct with camelCase
2458
+ * keys. It carries the `clusterId` echo that the ABI tuple omits. Every
2459
+ * value is in `0..=10000` basis points.
2460
+ */
2461
+ interface ClusterDiversityView {
2462
+ /** Cluster id whose roster was scored. */
2463
+ clusterId: number;
2464
+ /** Headline diversity score (`0..=10000`). */
2465
+ score: number;
2466
+ /** Normalised ASN-distribution entropy (`0..=10000`). */
2467
+ asnVariance: number;
2468
+ /** Normalised country-distribution entropy (`0..=10000`). */
2469
+ geoVariance: number;
2470
+ /** Normalised hosting-class-distribution entropy (`0..=10000`). */
2471
+ hostingSpread: number;
2472
+ }
2473
+ /**
2474
+ * `lyth_getOperatorNetworkMetadata` RPC response (PF-6).
2475
+ *
2476
+ * Distinct from {@link OperatorNetworkMetadata} (the ABI-decode tuple):
2477
+ * this is the JSON the `lyth_getOperatorNetworkMetadata` method returns,
2478
+ * read from the node-registry registration record (`0x1005`). `geoRegion`
2479
+ * here is the decoded ISO-3166-1 alpha-3 region **string** (or `null`);
2480
+ * `hostingClass` is the snake_case wire string (`bare_metal` /
2481
+ * `co_location` / `cloud`); `asn` is `null` when not declared.
2482
+ */
2483
+ interface OperatorNetworkMetadataView {
2484
+ /** Response schema version (`1`). */
2485
+ schemaVersion: number;
2486
+ /** Data source — `"native_state_storage"`. */
2487
+ source: string;
2488
+ /** Node-registry precompile address (`0x1005`). */
2489
+ precompile: string;
2490
+ /** Operator/peer id (`0x` 32-byte hex). */
2491
+ operatorId: string;
2492
+ /** Autonomous-system number; `null` when not declared. */
2493
+ asn: number | null;
2494
+ /** Decoded ISO-3166-1 alpha-3 region string; `null` when not declared. */
2495
+ geoRegion: string | null;
2496
+ /** Declared hosting class as the wire string. */
2497
+ hostingClass: "bare_metal" | "co_location" | "cloud";
2498
+ /** `keccak256` of the operator's public IP (`0x` 32 bytes). */
2499
+ ipAddressHash: string;
2500
+ /** `keccak256` of the TPM PCR digest (`0x` 32 bytes). */
2501
+ pcrDigest: string;
2502
+ }
2503
+ /**
2504
+ * Decoded `ClusterFormed(uint32,uint64,address,bytes)` event (MB-5).
2505
+ * Mirrors `node-registry::events::CLUSTER_FORMED`.
2506
+ */
2507
+ interface ClusterFormedEvent {
2508
+ /** Cluster identifier (indexed topic 1). */
2509
+ clusterId: number;
2510
+ /** Activation epoch (indexed topic 2). */
2511
+ effectiveEpoch: bigint;
2512
+ /** Primary anchor address (`0x` 20 bytes). */
2513
+ anchorAddress: string;
2514
+ /** Concatenated 48-byte compressed BLS pubkeys (`0x` hex). */
2515
+ operatorRoster: string;
2516
+ }
2517
+ /**
2518
+ * Decode a `getOperatorNetworkMetadata` return tuple — a flat 5-word
2519
+ * head: `(uint16 asn, bytes3 geoRegion, uint8 hostingClass, bytes32
2520
+ * ipAddressHash, bytes32 pcrDigest)`.
2521
+ */
2522
+ declare function decodeOperatorNetworkMetadata(returnData: string | Uint8Array | readonly number[]): OperatorNetworkMetadata;
2523
+ /**
2524
+ * Decode a `getClusterDiversity` return tuple — a flat 4-word head:
2525
+ * `(uint16 score, uint16 asnVariance, uint16 geoVariance, uint16
2526
+ * hostingSpread)`.
2527
+ */
2528
+ declare function decodeClusterDiversity(returnData: string | Uint8Array | readonly number[]): ClusterDiversity;
2529
+ /**
2530
+ * Decode a `ClusterFormed` log (MB-5) into a typed {@link ClusterFormedEvent}.
2531
+ *
2532
+ * `topics` is the log topic vector (`topic0`, indexed `clusterId`,
2533
+ * indexed `effectiveEpoch`); `data` is the non-indexed ABI payload
2534
+ * `(address anchorAddress, bytes operatorRoster)`.
2535
+ */
2536
+ declare function decodeClusterFormedEvent(topics: readonly (string | Uint8Array | readonly number[])[], data: string | Uint8Array | readonly number[]): ClusterFormedEvent;
2537
+ /**
2538
+ * Derive a runtime-formed cluster's primary-anchor address from its
2539
+ * operator roster (MB-5 / Law §7.13).
2540
+ *
2541
+ * Mirrors `node-registry::cluster_anchor::derive_cluster_anchor_address`:
2542
+ * the order-insensitive multisig rule `address = BLAKE3(
2543
+ * MONO_MULTISIG_BLAKE3_20_V1 || threshold_be16 ||
2544
+ * (member_len_be8 || member)*sorted)[..20]`. Returns the `0x`-prefixed
2545
+ * 20-byte address payload.
2546
+ */
2547
+ declare function deriveClusterAnchorAddress(roster: readonly (string | Uint8Array | readonly number[])[], threshold: number): string;
2548
+
2549
+ /**
2550
+ * Address display helpers.
2551
+ *
2552
+ * Monolythium keeps 20-byte account identifiers on the wire, but
2553
+ * user-facing surfaces display them as `mono1...` bech32m strings.
2554
+ */
2555
+ declare const ADDRESS_HRP: "mono";
2556
+ declare const ADDRESS_KIND_HRPS: {
2557
+ readonly user: "mono";
2558
+ readonly smartAccount: "monos";
2559
+ readonly contract: "monoc";
2560
+ readonly cluster: "monok";
2561
+ readonly multisig: "monom";
2562
+ readonly systemModule: "monox";
2563
+ };
2564
+ declare const RESERVED_ADDRESS_HRPS: readonly ["monor", "monop", "monoi", "monoa"];
2565
+ type AddressKind = keyof typeof ADDRESS_KIND_HRPS;
2566
+ interface TypedAddress {
2567
+ kind: AddressKind;
2568
+ address: string;
2569
+ bytes: Uint8Array;
2570
+ hex: string;
2571
+ }
2572
+ declare class AddressError extends Error {
2573
+ constructor(message: string);
2574
+ }
2575
+ declare function hexToAddressBytes(address: string): Uint8Array;
2576
+ declare function addressBytesToHex(address: Uint8Array | readonly number[]): string;
2577
+ declare function addressToBech32(address: string | Uint8Array | readonly number[]): string;
2578
+ declare function addressToTypedBech32(kind: AddressKind, address: string | Uint8Array | readonly number[]): string;
2579
+ declare function bech32ToAddressBytes(address: string): Uint8Array;
2580
+ declare function bech32ToAddress(address: string): string;
2581
+ declare function typedBech32ToAddress(address: string, expectedKind?: AddressKind): TypedAddress;
2582
+ declare function requireTypedAddress(address: string, expectedKind: AddressKind, label?: string): string;
2583
+ declare function parseAddress(address: string): Uint8Array;
2584
+ /** Address-validation result for non-throwing callers (UI forms, search). */
2585
+ type AddressValidation = {
2586
+ valid: true;
2587
+ /** Lower-case bech32m representation; matches what the wire format expects. */
2588
+ normalized: string;
2589
+ /** Bech32m kind when the input is a typed bech32m address, otherwise null. */
2590
+ kind: AddressKind | null;
2591
+ /** Which surface the input came from. */
2592
+ format: "hex" | "bech32m";
2593
+ /** Raw 20-byte payload, useful for client-side bytes-derived lookups. */
2594
+ bytes: Uint8Array;
2595
+ } | {
2596
+ valid: false;
2597
+ reason: string;
2598
+ };
2599
+ /**
2600
+ * Validate an address string without throwing. Accepts both raw hex and
2601
+ * typed bech32m. On success returns the canonical bech32m form along with
2602
+ * the kind/format/bytes; on failure returns a short reason string.
2603
+ */
2604
+ declare function validateAddress(address: string): AddressValidation;
2605
+ declare function normalizeAddressHex(address: string): string;
2606
+
2607
+ declare const ML_KEM_768_CIPHERTEXT_LEN = 1088;
2608
+ declare const ML_KEM_768_ENCAPSULATION_KEY_LEN = 1184;
2609
+ declare const ML_KEM_768_SHARED_SECRET_LEN = 32;
2610
+ declare const DKG_NONCE_LEN = 12;
2611
+ declare const DKG_AEAD_TAG_LEN = 16;
2612
+ declare const MempoolClass: {
2613
+ readonly Transfer: 0;
2614
+ readonly ContractCall: 1;
2615
+ readonly PrivacyOp: 2;
2616
+ readonly CLOBOp: 3;
2617
+ readonly AgentOp: 4;
2618
+ readonly FoundationOp: 5;
2619
+ /** @deprecated Use FoundationOp. */
2620
+ readonly GovernanceOp: 5;
2621
+ readonly RWAOp: 6;
2622
+ };
2623
+ type MempoolClass = (typeof MempoolClass)[keyof typeof MempoolClass];
2624
+ interface NonceAad {
2625
+ sender: Uint8Array;
2626
+ nonce: bigint;
2627
+ chainId: bigint;
2628
+ class: MempoolClass;
2629
+ maxFeePerGas: bigint;
2630
+ maxPriorityFeePerGas: bigint;
2631
+ gasLimit: bigint;
2632
+ }
2633
+ interface DecryptHint {
2634
+ epoch: bigint;
2635
+ scheme: number;
2636
+ }
2637
+ interface EncryptedEnvelope {
2638
+ nonceAad: NonceAad;
2639
+ ciphertext: Uint8Array;
2640
+ decryptionHint: DecryptHint;
2641
+ senderPubkey: Uint8Array;
2642
+ outerSignature: Uint8Array;
2643
+ sender: Uint8Array;
2644
+ }
2645
+ declare function bincodeNonceAad(aad: NonceAad): Uint8Array;
2646
+ declare function bincodeDecryptHint(hint: DecryptHint): Uint8Array;
2647
+ declare function bincodeEncryptedEnvelope(env: EncryptedEnvelope): Uint8Array;
2648
+ declare function encryptInnerTx(signedInnerTxBincode: Uint8Array, nonceAad: NonceAad, kemEncapsulationKey: Uint8Array): Uint8Array;
2649
+ declare function outerSigDigest(nonceAad: NonceAad, ciphertext: Uint8Array, decryptionHint: DecryptHint, senderPubkey: Uint8Array): Uint8Array;
2650
+ declare function buildEncryptedEnvelope(args: {
2651
+ signedInnerTxBincode: Uint8Array;
2652
+ nonceAad: NonceAad;
2653
+ decryptionHint: DecryptHint;
2654
+ kemEncapsulationKey: Uint8Array;
2655
+ senderAddress: Uint8Array;
2656
+ senderPubkey: Uint8Array;
2657
+ signOuterDigest: (digest: Uint8Array) => Promise<Uint8Array> | Uint8Array;
2658
+ }): Promise<{
2659
+ envelope: EncryptedEnvelope;
2660
+ wireBytes: Uint8Array;
2661
+ wireHex: string;
2662
+ }>;
2663
+
2664
+ /**
2665
+ * Native market transaction-plan builders.
2666
+ *
2667
+ * These helpers only build signer-ready transaction requests or native module
2668
+ * call material. They do not predict fills, trades, or execution success.
2669
+ */
2670
+
2671
+ declare const CLOB_MARKET_ID_DOMAIN_TAG: 193;
2672
+ declare const NATIVE_MARKET_MODULE_ADDRESS_BYTES: "0x4d41524b45545f4e41544956455f4d4f445f5631";
2673
+ declare const NATIVE_MARKET_MODULE_ADDRESS: string;
2674
+ declare const NATIVE_CALL_FORWARDER_ARTIFACT_PROFILE: "native-call-forwarder-v1";
2675
+ declare const NATIVE_CALL_FORWARDER_RESPONSE_OFFSET: 768;
2676
+ declare const NATIVE_CALL_FORWARDER_RESPONSE_CAPACITY: 256;
2677
+ declare const MAX_NATIVE_CALL_FORWARDER_REQUEST_BYTES: 2047;
2678
+ declare const CLOB_SELECTORS: {
2679
+ /**
2680
+ * `placeLimitOrder(bytes32,bytes32,uint8,uint256,uint256,uint64)`
2681
+ *
2682
+ * Args: `baseTokenId, quoteTokenId, side, price, amount, expiresAtBlock`.
2683
+ */
2684
+ readonly placeLimitOrder: "0x2468786f";
2685
+ /**
2686
+ * `placeMarketOrder(bytes32,bytes32,uint8,uint256,uint16)`
2687
+ *
2688
+ * Args: `baseTokenId, quoteTokenId, side, quantity, maxSlippageBps`.
2689
+ */
2690
+ readonly placeMarketOrder: "0xb9b1fa86";
2691
+ /**
2692
+ * `placeMarketOrderEx(bytes32,bytes32,uint8,uint256,uint16,uint8)`
2693
+ *
2694
+ * Args: `baseTokenId, quoteTokenId, side, quantity, maxSlippageBps, mode`.
2695
+ */
2696
+ readonly placeMarketOrderEx: "0xa6f092f0";
2697
+ /** `cancelOrder(bytes32)` */
2698
+ readonly cancelOrder: "0x7489ec23";
2699
+ /** `setMinNotional(bytes32,bytes32,uint256)` — foundation-authorized. */
2700
+ readonly setMinNotional: "0x395dc48f";
2701
+ /** `setTickSize(bytes32,bytes32,uint256)` — foundation-authorized per-market grid tune. */
2702
+ readonly setTickSize: "0x10666f0b";
2703
+ /** `setLotSize(bytes32,bytes32,uint256)` — foundation-authorized per-market grid tune. */
2704
+ readonly setLotSize: "0x9909be80";
2705
+ };
2706
+ /**
2707
+ * Canonical operator-fee router selector signatures (`0x100B`).
2708
+ *
2709
+ * Mirrors `mono-core/crates/precompiles/platform/operator-router/src/abi.rs`
2710
+ * (`sig::*`). Selectors are `keccak256(signature)[0..4]`.
2711
+ */
2712
+ declare const OPERATOR_ROUTER_SIGS: {
2713
+ /** `registerOperator(address recipient, uint16 feeBps)`. */
2714
+ readonly registerOperator: "registerOperator(address,uint16)";
2715
+ /** `updateOperator(address recipient, uint16 feeBps)`. */
2716
+ readonly updateOperator: "updateOperator(address,uint16)";
2717
+ /** `disableOperator(address operator)` — foundation-authorized. */
2718
+ readonly disableOperator: "disableOperator(address)";
2719
+ /**
2720
+ * `placeLimitOrderVia(address operator, bytes32 base, bytes32 quote,
2721
+ * uint8 side, uint256 price, uint256 amount, uint64 expiresAtBlock)`
2722
+ * → `bytes32 orderId`.
2723
+ *
2724
+ * Skims the operator fee (quote token, `user -> recipient`) then
2725
+ * re-enters the CLOB `placeLimitOrder` op with `caller = user`, so the
2726
+ * resting order is owned + escrowed + cancellable by the user,
2727
+ * identical to a direct CLOB placement.
2728
+ */
2729
+ readonly placeLimitOrderVia: "placeLimitOrderVia(address,bytes32,bytes32,uint8,uint256,uint256,uint64)";
2730
+ };
2731
+ /** Operator-router selectors as `0x`-prefixed 4-byte hex. */
2732
+ declare const OPERATOR_ROUTER_SELECTORS: {
2733
+ readonly registerOperator: string;
2734
+ readonly updateOperator: string;
2735
+ readonly disableOperator: string;
2736
+ readonly placeLimitOrderVia: string;
2737
+ };
2738
+ /**
2739
+ * Canonical operator-router event declaration strings (`0x100B`).
2740
+ *
2741
+ * Mirrors `operator-router/src/events.rs::sig`. Indexed args are
2742
+ * `operator`, `user`, `marketId` (for `OperatorFeeCharged`).
2743
+ */
2744
+ declare const OPERATOR_ROUTER_EVENT_SIGS: {
2745
+ readonly operatorFeeCharged: "OperatorFeeCharged(address,address,bytes32,address,bytes32,uint256,bytes32)";
2746
+ readonly operatorRegistered: "OperatorRegistered(address,address,uint16)";
2747
+ readonly operatorUpdated: "OperatorUpdated(address,address,uint16,bool)";
2748
+ };
2749
+ type SpotLimitOrderSide = "buy" | "sell";
2750
+ type SpotMarketOrderMode = "fill-or-refund" | "fill-or-rest-at-cap";
2751
+ type NativeMarketAddressKind = AddressKind;
2752
+ type NativeMarketAddressInput = string | {
2753
+ kind?: NativeMarketAddressKind;
2754
+ address: string;
2755
+ };
2756
+ interface PlaceSpotLimitOrderArgs {
2757
+ /**
2758
+ * Canonical 32-byte CLOB market id, derived as
2759
+ * `keccak256(0xC1 || baseTokenId || quoteTokenId)`.
2760
+ */
2761
+ marketId: string;
2762
+ /** 32-byte base token id accepted by the CLOB precompile. */
2763
+ baseTokenId: string;
2764
+ /** 32-byte quote token id accepted by the CLOB precompile. */
2765
+ quoteTokenId: string;
2766
+ /** `buy` maps to side byte `0`; `sell` maps to side byte `1`. */
2767
+ side: SpotLimitOrderSide;
2768
+ /** Positive integer decimal string encoded as uint256. */
2769
+ price: string;
2770
+ /** Positive integer decimal string encoded as uint256 amount. */
2771
+ quantity: string;
2772
+ /** Optional uint64 block height; omitted means `0` / no explicit expiry. */
2773
+ expiryBlock?: string | number | bigint;
2774
+ }
2775
+ interface PlaceLimitOrderViaArgs {
2776
+ /**
2777
+ * Operator the order routes through (`mono` bech32m user address). Its
2778
+ * fee registration (`lyth_operatorFeeConfig`) sets the surcharge skimmed
2779
+ * from the quote escrow.
2780
+ */
2781
+ operator: string;
2782
+ /** 32-byte base token id accepted by the CLOB precompile. */
2783
+ base: string;
2784
+ /** 32-byte quote token id accepted by the CLOB precompile. */
2785
+ quote: string;
2786
+ /** `buy` maps to side byte `0`; `sell` maps to side byte `1`. */
2787
+ side: SpotLimitOrderSide;
2788
+ /** Positive integer decimal string encoded as uint256 price. */
2789
+ price: string;
2790
+ /** Positive integer decimal string encoded as uint256 amount. */
2791
+ amount: string;
2792
+ /** Optional uint64 block height; omitted means `0` / no explicit expiry. */
2793
+ expiresAtBlock?: string | number | bigint;
2794
+ }
2795
+ /**
2796
+ * Wallet-display projection of the declared operator fee for a
2797
+ * {@link PlaceLimitOrderViaArgs} order, computed off-chain as
2798
+ * `quoteBasis * feeBps / 10_000` where `quoteBasis = price * amount`.
2799
+ *
2800
+ * Advisory only — the binding fee is skimmed on-chain at execution time
2801
+ * from the same `quoteBasis`. The fee is denominated in the quote token.
2802
+ */
2803
+ interface OperatorFeeQuote {
2804
+ /** Operator the order routes through (`mono` bech32m). */
2805
+ operator: string;
2806
+ /** Declared operator fee in basis points (from `lyth_operatorFeeConfig`). */
2807
+ feeBps: number;
2808
+ /** `price * amount` (the quote-token basis the fee is skimmed from), decimal string. */
2809
+ quoteBasis: string;
2810
+ /** `quoteBasis * feeBps / 10_000`, floored, decimal string of quote-token atoms. */
2811
+ feeAmount: string;
2812
+ }
2813
+ /** A {@link MarketTransactionPlan} that also carries the declared operator fee. */
2814
+ interface PlaceLimitOrderViaPlan extends MarketTransactionPlan {
2815
+ /** Off-chain operator-fee projection for wallet display. */
2816
+ operatorFee: OperatorFeeQuote;
2817
+ }
2818
+ /**
2819
+ * Decoded `OperatorFeeCharged` log (`0x100B`). Mirrors
2820
+ * `operator-router/src/events.rs::emit_operator_fee_charged_to_host`:
2821
+ * indexed `operator` / `user` / `marketId`; body `recipient`,
2822
+ * `quoteToken`, `feeAmount`, `clobOrderId`. `clobOrderId` joins the
2823
+ * router fee to the CLOB `OrderPlaced` / `OrderMatched` rows.
2824
+ */
2825
+ interface OperatorFeeChargedEvent {
2826
+ /** Operator that charged the fee (`0x` 20-byte hex, indexed). */
2827
+ operator: string;
2828
+ /** User that paid the fee (`0x` 20-byte hex, indexed). */
2829
+ user: string;
2830
+ /** CLOB market id the order targets (`0x` 32 bytes, indexed). */
2831
+ marketId: string;
2832
+ /** Fee recipient configured by the operator (`0x` 20-byte hex). */
2833
+ recipient: string;
2834
+ /** Quote token the fee was skimmed in (`0x` 32 bytes). */
2835
+ quoteToken: string;
2836
+ /** Fee amount skimmed (quote-token atoms, decimal string). */
2837
+ feeAmount: string;
2838
+ /** CLOB order id the routed placement produced (`0x` 32 bytes). */
2839
+ clobOrderId: string;
2840
+ }
2841
+ /**
2842
+ * `lyth_operatorRouterConfig` response — the router's static posture.
2843
+ *
2844
+ * Mirrors the chain JSON exactly (camelCase). `enabled` reflects whether
2845
+ * the gateable router precompile is currently milestone-activated; the
2846
+ * read surfaces work regardless.
2847
+ */
2848
+ interface OperatorRouterConfig {
2849
+ /** Response schema version (`1`). */
2850
+ schemaVersion: number;
2851
+ /** Data source — `"native_state_storage"`. */
2852
+ source: string;
2853
+ /** Router precompile address (`0x100B`). */
2854
+ routerAddress: string;
2855
+ /** On-chain protocol fee ceiling in bps (`100` = 1.00%). */
2856
+ protocolMaxOperatorFeeBps: number;
2857
+ /** `true` when the router precompile is milestone-activated. */
2858
+ enabled: boolean;
2859
+ }
2860
+ /**
2861
+ * `lyth_operatorFeeConfig` response — one operator's fee registration.
2862
+ *
2863
+ * Mirrors the chain JSON exactly (camelCase). A zero recipient is the
2864
+ * "operator not registered" sentinel on-chain, so the chain returns a
2865
+ * not-found error rather than this shape in that case.
2866
+ */
2867
+ interface OperatorFeeConfig {
2868
+ /** Response schema version (`1`). */
2869
+ schemaVersion: number;
2870
+ /** Data source — `"native_state_storage"`. */
2871
+ source: string;
2872
+ /** Router precompile address (`0x100B`). */
2873
+ precompile: string;
2874
+ /** Operator the registration belongs to (`mono` bech32m). */
2875
+ operator: string;
2876
+ /** Configured fee recipient (`mono` bech32m). */
2877
+ recipient: string;
2878
+ /** Operator surcharge in basis points. */
2879
+ feeBps: number;
2880
+ /** `true` when the operator's surcharge is active. */
2881
+ enabled: boolean;
2882
+ /** Block height the operator was first registered at. */
2883
+ registeredAtBlock: number;
2884
+ }
2885
+ interface PlaceSpotMarketOrderArgs {
2886
+ /**
2887
+ * Canonical 32-byte CLOB market id, derived as
2888
+ * `keccak256(0xC1 || baseTokenId || quoteTokenId)`.
2889
+ */
2890
+ marketId: string;
2891
+ /** 32-byte base token id accepted by the CLOB precompile. */
2892
+ baseTokenId: string;
2893
+ /** 32-byte quote token id accepted by the CLOB precompile. */
2894
+ quoteTokenId: string;
2895
+ /** `buy` maps to side byte `0`; `sell` maps to side byte `1`. */
2896
+ side: SpotLimitOrderSide;
2897
+ /** Positive integer decimal string encoded as uint256 amount. */
2898
+ quantity: string;
2899
+ /** Slippage bound in basis points; must be less than 10,000. */
2900
+ maxSlippageBps: string | number | bigint;
2901
+ }
2902
+ interface PlaceSpotMarketOrderExArgs extends PlaceSpotMarketOrderArgs {
2903
+ /**
2904
+ * `fill-or-refund` keeps legacy market-order semantics; `fill-or-rest-at-cap`
2905
+ * rests the unfilled remainder at the slippage cap.
2906
+ */
2907
+ mode: SpotMarketOrderMode;
2908
+ }
2909
+ interface CancelSpotOrderArgs {
2910
+ /** 32-byte order id returned by the CLOB precompile. */
2911
+ orderId: string;
2912
+ }
2913
+ interface EncodeNativeSpotLimitOrderArgs {
2914
+ /** 32-byte native spot market id. */
2915
+ marketId: string;
2916
+ /** Owner typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
2917
+ owner: NativeMarketAddressInput;
2918
+ /** Per-owner order nonce encoded as uint64. */
2919
+ nonce: string | number | bigint;
2920
+ /** `buy` maps to native `OrderSide::Bid`; `sell` maps to native `OrderSide::Ask`. */
2921
+ side: SpotLimitOrderSide;
2922
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
2923
+ price: string;
2924
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
2925
+ quantity: string;
2926
+ /** uint64 expiry block encoded as `expires_at_block`. */
2927
+ expiresAtBlock: string | number | bigint;
2928
+ }
2929
+ interface EncodeNativeSpotCreateMarketArgs {
2930
+ /** Market owner typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
2931
+ owner: NativeMarketAddressInput;
2932
+ /** Owner-local market nonce encoded as uint64. */
2933
+ nonce: string | number | bigint;
2934
+ /** 32-byte base asset id. */
2935
+ baseAsset: string;
2936
+ /** 32-byte quote asset id. */
2937
+ quoteAsset: string;
2938
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
2939
+ tickSize: string;
2940
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
2941
+ lotSize: string;
2942
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
2943
+ minQuantity: string;
2944
+ /** Nonnegative integer decimal string encoded as native MrcAmount/u128; 0 disables the floor. */
2945
+ minNotional: string;
2946
+ }
2947
+ interface EncodeNativeSpotCancelOrderArgs {
2948
+ /** 32-byte native order id. */
2949
+ orderId: string;
2950
+ /** Caller typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
2951
+ caller: NativeMarketAddressInput;
2952
+ }
2953
+ interface EncodeNativeSpotSettleLimitOrderArgs {
2954
+ /** Resting maker order id to match. */
2955
+ makerOrderId: string;
2956
+ /** Taker limit order parameters. */
2957
+ takerOrder: EncodeNativeSpotLimitOrderArgs;
2958
+ }
2959
+ interface EncodeNativeSpotSettleRoutedLimitOrderArgs {
2960
+ /** Resting maker order ids in deterministic settlement order; mono-core accepts 1..64 ids. */
2961
+ makerOrderIds: readonly string[];
2962
+ /** Taker limit order parameters. */
2963
+ takerOrder: EncodeNativeSpotLimitOrderArgs;
2964
+ }
2965
+ type NativeNftAssetStandard = "mrc721" | "mrc1155";
2966
+ type NativeNftListingKind = "fixed-price" | {
2967
+ english: {
2968
+ /** Minimum starting bid encoded as native MrcAmount/u128. */
2969
+ reserve: string;
2970
+ /** Auction end block encoded as uint64. */
2971
+ endBlock: string | number | bigint;
2972
+ /** Minimum bid bump in basis points; must be less than 10,000. */
2973
+ minBidIncrementBps: string | number | bigint;
2974
+ };
2975
+ };
2976
+ interface EncodeNativeNftCreateListingArgs {
2977
+ /** Seller typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
2978
+ seller: NativeMarketAddressInput;
2979
+ /** Seller-local listing nonce encoded as uint64. */
2980
+ nonce: string | number | bigint;
2981
+ /** Native NFT asset standard. */
2982
+ standard: NativeNftAssetStandard;
2983
+ /** 32-byte collection id. */
2984
+ collectionId: string;
2985
+ /** 32-byte token id. */
2986
+ tokenId: string;
2987
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
2988
+ quantity: string;
2989
+ /** 32-byte payment asset id. */
2990
+ paymentAsset: string;
2991
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
2992
+ price: string;
2993
+ /** Fixed-price or English-auction sale model. */
2994
+ kind: NativeNftListingKind;
2995
+ /** uint64 expiry block encoded as `expires_at_block`; 0 means never. */
2996
+ expiresAtBlock: string | number | bigint;
2997
+ }
2998
+ interface EncodeNativeNftBuyListingArgs {
2999
+ /** 32-byte native NFT listing id. */
3000
+ listingId: string;
3001
+ /** Buyer typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
3002
+ buyer: NativeMarketAddressInput;
3003
+ /** Current block attached to the native buy call. */
3004
+ currentBlock: string | number | bigint;
3005
+ }
3006
+ interface EncodeNativeNftCancelListingArgs {
3007
+ /** 32-byte native NFT listing id. */
3008
+ listingId: string;
3009
+ /** Caller typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
3010
+ caller: NativeMarketAddressInput;
3011
+ }
3012
+ interface EncodeNativeNftPlaceAuctionBidArgs {
3013
+ /** 32-byte native NFT auction listing id. */
3014
+ listingId: string;
3015
+ /** Bidder typed bech32m MonoAddress; optional object `kind` asserts the expected HRP. */
3016
+ bidder: NativeMarketAddressInput;
3017
+ /** Positive integer decimal string encoded as native MrcAmount/u128. */
3018
+ amount: string;
3019
+ /** Current block attached to the native auction bid call. */
3020
+ currentBlock: string | number | bigint;
3021
+ }
3022
+ interface EncodeNativeNftSettleAuctionArgs {
3023
+ /** 32-byte native NFT auction listing id. */
3024
+ listingId: string;
3025
+ /** Current block attached to the native auction settlement call. */
3026
+ currentBlock: string | number | bigint;
3027
+ }
3028
+ interface EncodeNativeNftSweepExpiredListingsArgs {
3029
+ /** Candidate 32-byte native NFT listing ids; mono-core accepts 1..64 ids. */
3030
+ listingIds: readonly string[];
3031
+ /** Current block attached to the native listing sweep call. */
3032
+ currentBlock: string | number | bigint;
3033
+ }
3034
+ interface NativeMarketModuleContractCall {
3035
+ /** Stable typed system-module address (`MARKET_NATIVE_MOD_V1`). */
3036
+ to: string;
3037
+ /** Native market router bincode payload. */
3038
+ input: string;
3039
+ /** Native market module calls must not carry native value. */
3040
+ valueLythoshi: "0";
3041
+ /** Maximum cycles delegated to the RISC-V host call. */
3042
+ maxCycles: string;
3043
+ }
3044
+ interface NativeMarketModuleCallEnvelope {
3045
+ module: "market";
3046
+ call: NativeMarketModuleContractCall;
3047
+ }
3048
+ interface NativeMarketForwarderInput {
3049
+ /** Canonical `SyscallRequest::CallContract` bytes for MRV call input. */
3050
+ input: string;
3051
+ /** Byte length of `input`, useful because the minimal forwarder artifact pins this as an immediate. */
3052
+ requestBytes: number;
3053
+ }
3054
+ interface NativeCallForwarderArtifact {
3055
+ /** Raw bincode MRV artifact bytes for a fixed-size native-call forwarder. */
3056
+ artifactBytes: string;
3057
+ /** Byte length accepted by the generated forwarder. */
3058
+ requestBytes: number;
3059
+ /** Stable runtime profile string used for capability matching. */
3060
+ artifactProfile: typeof NATIVE_CALL_FORWARDER_ARTIFACT_PROFILE;
3061
+ /** Forwarder code-section hash as `0x` hex. */
3062
+ codeHash: string;
3063
+ }
3064
+ interface EthSendTransactionRequest {
3065
+ to: string;
3066
+ value: "0x0";
3067
+ data: string;
3068
+ }
3069
+ interface MarketTransactionPlan {
3070
+ method: "eth_sendTransaction";
3071
+ params: [EthSendTransactionRequest];
3072
+ mempoolClass: MempoolClass;
3073
+ }
3074
+ declare class MarketActionError extends Error {
3075
+ constructor(message: string);
3076
+ }
3077
+ declare function clobAddressHex(): string;
3078
+ declare function deriveClobMarketId(baseTokenId: string, quoteTokenId: string): string;
3079
+ declare function deriveNativeSpotMarketId(args: Pick<EncodeNativeSpotCreateMarketArgs, "owner" | "baseAsset" | "quoteAsset" | "nonce">): string;
3080
+ declare function deriveNativeSpotOrderId(args: Pick<EncodeNativeSpotLimitOrderArgs, "marketId" | "owner" | "side" | "nonce">): string;
3081
+ declare function encodePlaceLimitOrderCalldata(args: PlaceSpotLimitOrderArgs): string;
3082
+ declare function encodePlaceMarketOrderCalldata(args: PlaceSpotMarketOrderArgs): string;
3083
+ declare function encodePlaceMarketOrderExCalldata(args: PlaceSpotMarketOrderExArgs): string;
3084
+ declare function encodeCancelOrderCalldata(args: CancelSpotOrderArgs): string;
3085
+ /** Three foundation-authorized per-market grid tuners share the
3086
+ * same `(bytes32,bytes32,uint256)` shape: minNotional, tickSize,
3087
+ * lotSize. They auto-create the market record if absent. */
3088
+ interface MarketGridTuneArgs {
3089
+ baseTokenId: string;
3090
+ quoteTokenId: string;
3091
+ /** Decimal string of quote atoms (minNotional) or atoms-per-unit (tick/lot). */
3092
+ newValue: string;
3093
+ }
3094
+ declare function encodeSetMinNotionalCalldata(args: MarketGridTuneArgs): string;
3095
+ declare function encodeSetTickSizeCalldata(args: MarketGridTuneArgs): string;
3096
+ declare function encodeSetLotSizeCalldata(args: MarketGridTuneArgs): string;
3097
+ declare function encodeNativeSpotLimitOrderCall(args: EncodeNativeSpotLimitOrderArgs): string;
3098
+ declare function encodeNativeSpotCreateMarketCall(args: EncodeNativeSpotCreateMarketArgs): string;
3099
+ declare function encodeNativeSpotCancelOrderCall(args: EncodeNativeSpotCancelOrderArgs): string;
3100
+ declare function encodeNativeSpotSettleLimitOrderCall(args: EncodeNativeSpotSettleLimitOrderArgs): string;
3101
+ declare function encodeNativeSpotSettleRoutedLimitOrderCall(args: EncodeNativeSpotSettleRoutedLimitOrderArgs): string;
3102
+ declare function encodeNativeNftCreateListingCall(args: EncodeNativeNftCreateListingArgs): string;
3103
+ declare function encodeNativeNftBuyListingCall(args: EncodeNativeNftBuyListingArgs): string;
3104
+ declare function encodeNativeNftCancelListingCall(args: EncodeNativeNftCancelListingArgs): string;
3105
+ declare function encodeNativeNftPlaceAuctionBidCall(args: EncodeNativeNftPlaceAuctionBidArgs): string;
3106
+ declare function encodeNativeNftSettleAuctionCall(args: EncodeNativeNftSettleAuctionArgs): string;
3107
+ declare function encodeNativeNftSweepExpiredListingsCall(args: EncodeNativeNftSweepExpiredListingsArgs): string;
3108
+ declare function buildNativeMarketModuleCallEnvelope(input: string, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3109
+ declare function encodeNativeMarketModuleForwarderInput(envelope: NativeMarketModuleCallEnvelope): NativeMarketForwarderInput;
3110
+ declare function buildNativeSpotLimitOrderForwarderInput(args: EncodeNativeSpotLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3111
+ declare function buildNativeSpotCreateMarketForwarderInput(args: EncodeNativeSpotCreateMarketArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3112
+ declare function buildNativeSpotCancelOrderForwarderInput(args: EncodeNativeSpotCancelOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3113
+ declare function buildNativeSpotSettleLimitOrderForwarderInput(args: EncodeNativeSpotSettleLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3114
+ declare function buildNativeSpotSettleRoutedLimitOrderForwarderInput(args: EncodeNativeSpotSettleRoutedLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3115
+ declare function buildNativeNftCreateListingForwarderInput(args: EncodeNativeNftCreateListingArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3116
+ declare function buildNativeNftBuyListingForwarderInput(args: EncodeNativeNftBuyListingArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3117
+ declare function buildNativeNftCancelListingForwarderInput(args: EncodeNativeNftCancelListingArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3118
+ declare function buildNativeNftPlaceAuctionBidForwarderInput(args: EncodeNativeNftPlaceAuctionBidArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3119
+ declare function buildNativeNftSettleAuctionForwarderInput(args: EncodeNativeNftSettleAuctionArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3120
+ declare function buildNativeNftSweepExpiredListingsForwarderInput(args: EncodeNativeNftSweepExpiredListingsArgs, maxCycles: string | number | bigint): NativeMarketForwarderInput;
3121
+ declare function buildNativeSpotLimitOrderModuleCall(args: EncodeNativeSpotLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3122
+ declare function buildNativeSpotCreateMarketModuleCall(args: EncodeNativeSpotCreateMarketArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3123
+ declare function buildNativeSpotCancelOrderModuleCall(args: EncodeNativeSpotCancelOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3124
+ declare function buildNativeSpotSettleLimitOrderModuleCall(args: EncodeNativeSpotSettleLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3125
+ declare function buildNativeSpotSettleRoutedLimitOrderModuleCall(args: EncodeNativeSpotSettleRoutedLimitOrderArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3126
+ declare function buildNativeNftCreateListingModuleCall(args: EncodeNativeNftCreateListingArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3127
+ declare function buildNativeNftBuyListingModuleCall(args: EncodeNativeNftBuyListingArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3128
+ declare function buildNativeNftCancelListingModuleCall(args: EncodeNativeNftCancelListingArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3129
+ declare function buildNativeNftPlaceAuctionBidModuleCall(args: EncodeNativeNftPlaceAuctionBidArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3130
+ declare function buildNativeNftSettleAuctionModuleCall(args: EncodeNativeNftSettleAuctionArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3131
+ declare function buildNativeNftSweepExpiredListingsModuleCall(args: EncodeNativeNftSweepExpiredListingsArgs, maxCycles: string | number | bigint): NativeMarketModuleCallEnvelope;
3132
+ declare function buildPlaceSpotLimitOrderPlan(args: PlaceSpotLimitOrderArgs): MarketTransactionPlan;
3133
+ declare function buildPlaceSpotMarketOrderPlan(args: PlaceSpotMarketOrderArgs): MarketTransactionPlan;
3134
+ declare function buildPlaceSpotMarketOrderExPlan(args: PlaceSpotMarketOrderExArgs): MarketTransactionPlan;
3135
+ declare function buildCancelSpotOrderPlan(args: CancelSpotOrderArgs): MarketTransactionPlan;
3136
+ /**
3137
+ * Encode `placeLimitOrderVia(address,bytes32,bytes32,uint8,uint256,
3138
+ * uint256,uint64)` calldata for the operator-fee router (`0x100B`).
3139
+ *
3140
+ * The argument layout mirrors the direct CLOB `placeLimitOrder` encoder
3141
+ * exactly, prefixed with the left-padded `operator` address word. The
3142
+ * router strips that leading word and forwards the remaining six fields
3143
+ * to the CLOB unchanged.
3144
+ */
3145
+ declare function encodePlaceLimitOrderViaCalldata(args: PlaceLimitOrderViaArgs): string;
3146
+ /**
3147
+ * Compute the off-chain declared operator fee for wallet display:
3148
+ * `quoteBasis * feeBps / 10_000` (floored) where `quoteBasis =
3149
+ * price * amount`. `feeBps` is the operator's registered fee
3150
+ * (`lyth_operatorFeeConfig`). Rejects a `feeBps` above the protocol
3151
+ * ceiling so a stale / hostile registration can't be displayed as valid.
3152
+ */
3153
+ declare function quoteOperatorFee(args: Pick<PlaceLimitOrderViaArgs, "operator" | "price" | "amount">, feeBps: number): OperatorFeeQuote;
3154
+ /**
3155
+ * Build a routed limit-order plan (`placeLimitOrderVia` against the
3156
+ * operator router at `0x100B`) plus the declared operator-fee projection
3157
+ * for wallet display.
3158
+ *
3159
+ * Two-spender approval model: the user must approve **two** spenders for
3160
+ * this order to succeed — the CLOB (`0x1001`) for the order's quote/base
3161
+ * escrow, AND the operator router (`0x100B`) for the fee skim. A wallet
3162
+ * surfacing this plan should prompt both approvals (or one combined
3163
+ * approval covering `quoteBasis + feeAmount`).
3164
+ */
3165
+ declare function buildPlaceLimitOrderViaPlan(args: PlaceLimitOrderViaArgs, feeBps: number): PlaceLimitOrderViaPlan;
3166
+ /**
3167
+ * Decode an `OperatorFeeCharged` log (`0x100B`) into a typed
3168
+ * {@link OperatorFeeChargedEvent}. `topics` is the log topic vector
3169
+ * (`topic0`, indexed `operator`, indexed `user`, indexed `marketId`);
3170
+ * `data` is the non-indexed ABI body
3171
+ * `(address recipient, bytes32 quoteToken, uint256 feeAmount, bytes32 clobOrderId)`.
3172
+ */
3173
+ declare function decodeOperatorFeeChargedEvent(topics: readonly (string | Uint8Array | readonly number[])[], data: string | Uint8Array | readonly number[]): OperatorFeeChargedEvent;
3174
+ declare function buildNativeCallForwarderArtifact(requestBytes: string | number | bigint): NativeCallForwarderArtifact;
3175
+
3176
+ /**
3177
+ * Oracle-precompile (`0x1009`) event decode types + read-method
3178
+ * signatures (MB-6).
3179
+ *
3180
+ * Mirrors `mono-core/crates/precompiles/platform/oracle/src/events.rs`:
3181
+ * the canonical event signatures and a pure decoder that turns one EVM
3182
+ * log (topics + data) into a typed {@link OracleEvent}. The decoder is
3183
+ * the exact inverse of the chain-side `emit_*` helpers.
3184
+ */
3185
+ declare const ORACLE_EVENT_SIGS: {
3186
+ readonly oracleRoundFinalized: "OracleRoundFinalized(bytes32,uint64,uint256,uint64,uint32)";
3187
+ readonly observationSubmitted: "ObservationSubmitted(bytes32,uint64,address,uint256,uint64)";
3188
+ readonly feedAdded: "FeedAdded(bytes32,uint8,uint16,uint32,uint32)";
3189
+ readonly feedUpdated: "FeedUpdated(bytes32,uint8,uint16,uint32,uint32)";
3190
+ readonly oracleFraudSlashed: "OracleFraudSlashed(bytes32,uint64,address,bytes32)";
3191
+ readonly oracleAdminUpdated: "OracleAdminUpdated(address)";
3192
+ readonly oracleWriterAdded: "OracleWriterAdded(address,address)";
3193
+ readonly oracleWriterRemoved: "OracleWriterRemoved(address,address)";
3194
+ };
3195
+ declare class OracleEventError extends Error {
3196
+ constructor(message: string);
3197
+ }
3198
+ /** One active oracle writer in a {@link OracleSignersResponse}. */
3199
+ interface OracleSignerRow {
3200
+ /** Writer address in the active global oracle signer roster (`mono` bech32m). */
3201
+ writer: string;
3202
+ /** Admin that last authorized this writer's membership (`mono` bech32m). */
3203
+ admin: string;
3204
+ /** Block height of the latest membership fold. */
3205
+ updatedAtBlock: number;
3206
+ }
3207
+ /**
3208
+ * `lyth_oracleSigners` response — the global oracle writer roster, folded
3209
+ * from `OracleWriterAdded` / `OracleWriterRemoved` by the oracle indexer
3210
+ * projection (MB-6).
3211
+ *
3212
+ * When the node runs without that projection it returns the graceful
3213
+ * fallback `{ status: "indexer_unavailable", writers: [] }` — `writers`
3214
+ * is always present so callers can iterate unconditionally; use
3215
+ * `lyth_oracleWriters(feedId)` for the per-feed writer set in that case.
3216
+ */
3217
+ interface OracleSignersResponse {
3218
+ /** Response schema version (`1`). */
3219
+ schemaVersion: number;
3220
+ /** `"indexer_unavailable"` on the graceful-fallback path; absent when served. */
3221
+ status?: "indexer_unavailable";
3222
+ /** Data source — `"oracle_indexer_projection"`. */
3223
+ source: string;
3224
+ /** Oracle precompile address (`0x1009`). */
3225
+ precompile: string;
3226
+ /** Active writers; empty on the fallback path. */
3227
+ writers: OracleSignerRow[];
3228
+ /** Human-readable reason on the fallback path. */
3229
+ reason?: string;
3230
+ }
3231
+ /**
3232
+ * `lyth_oracleWriters` response — the allowed-writer roster for one feed
3233
+ * (MB-6), read from the feed-config writer list (`0x1009`).
3234
+ */
3235
+ interface OracleWriters {
3236
+ /** Response schema version (`1`). */
3237
+ schemaVersion: number;
3238
+ /** Data source — `"native_state_storage"`. */
3239
+ source: string;
3240
+ /** Oracle precompile address (`0x1009`). */
3241
+ precompile: string;
3242
+ /** Feed the writers are scoped to (`0x` 32 bytes). */
3243
+ feedId: string;
3244
+ /** Allowed writer addresses (`mono` bech32m). */
3245
+ writers: string[];
3246
+ }
3247
+ /**
3248
+ * `lyth_oracleLatestPrice` response — the latest finalized round's median
3249
+ * for one feed (MB-6). A registered feed with no closed round yet returns
3250
+ * `round: 0`, `median: null`, `finalized: false`.
3251
+ */
3252
+ interface OracleLatestPrice {
3253
+ /** Response schema version (`1`). */
3254
+ schemaVersion: number;
3255
+ /** Data source — `"native_state_storage"`. */
3256
+ source: string;
3257
+ /** Oracle precompile address (`0x1009`). */
3258
+ precompile: string;
3259
+ /** Feed id (`0x` 32 bytes). */
3260
+ feedId: string;
3261
+ /** Feed decimals. */
3262
+ decimals: number;
3263
+ /** Latest round id; `0` before the first round closes. */
3264
+ round: number;
3265
+ /** `true` once the latest round is finalized. */
3266
+ finalized: boolean;
3267
+ /** Finalized median (`0x`-hex `uint256`); `null` while unfinalized. */
3268
+ median: string | null;
3269
+ /** Block the latest round finalized at; `null` while unfinalized. */
3270
+ finalizedAtBlock: number | null;
3271
+ }
3272
+ /**
3273
+ * `lyth_oracleFeedConfig` response — one feed's decimals / heartbeat /
3274
+ * deviation-bps (circuit breaker) / min-signers config (MB-6).
3275
+ */
3276
+ interface OracleFeedConfig {
3277
+ /** Response schema version (`1`). */
3278
+ schemaVersion: number;
3279
+ /** Data source — `"native_state_storage"`. */
3280
+ source: string;
3281
+ /** Oracle precompile address (`0x1009`). */
3282
+ precompile: string;
3283
+ /** Feed id (`0x` 32 bytes). */
3284
+ feedId: string;
3285
+ /** Feed decimals. */
3286
+ decimals: number;
3287
+ /** Minimum signers required to finalize a round. */
3288
+ minSigners: number;
3289
+ /** Max observation age (heartbeat) in seconds. */
3290
+ heartbeatSeconds: number;
3291
+ /** Circuit-breaker deviation bound in basis points. */
3292
+ deviationBps: number;
3293
+ /** Number of allowed writers configured for the feed. */
3294
+ allowedWritersLen: number;
3295
+ }
3296
+ /** Return the oracle precompile address (`0x1009`) as lower-case hex. */
3297
+ declare function oracleAddressHex(): string;
3298
+ /**
3299
+ * Typed view of one oracle-precompile log (MB-6). One variant per
3300
+ * chain-side emit helper. `feedId` / `evidenceHash` / address fields are
3301
+ * `0x`-prefixed hex; `computedMedian` / `value` are decimal strings of
3302
+ * their on-chain `uint256` value.
3303
+ */
3304
+ type OracleEvent = {
3305
+ kind: "roundFinalized";
3306
+ feedId: string;
3307
+ roundId: bigint;
3308
+ computedMedian: string;
3309
+ finalizedAtBlock: bigint;
3310
+ observationsLen: number;
3311
+ } | {
3312
+ kind: "observationSubmitted";
3313
+ feedId: string;
3314
+ roundId: bigint;
3315
+ writer: string;
3316
+ value: string;
3317
+ observedAt: bigint;
3318
+ } | {
3319
+ kind: "fraudSlashed";
3320
+ feedId: string;
3321
+ roundId: bigint;
3322
+ writer: string;
3323
+ evidenceHash: string;
3324
+ } | {
3325
+ kind: "feedAdded";
3326
+ feedId: string;
3327
+ decimals: number;
3328
+ minSigners: number;
3329
+ circuitBreakerBps: number;
3330
+ allowedWritersLen: number;
3331
+ } | {
3332
+ kind: "feedUpdated";
3333
+ feedId: string;
3334
+ decimals: number;
3335
+ minSigners: number;
3336
+ circuitBreakerBps: number;
3337
+ allowedWritersLen: number;
3338
+ } | {
3339
+ kind: "adminUpdated";
3340
+ admin: string;
3341
+ } | {
3342
+ kind: "writerAdded";
3343
+ admin: string;
3344
+ writer: string;
3345
+ } | {
3346
+ kind: "writerRemoved";
3347
+ admin: string;
3348
+ writer: string;
3349
+ };
3350
+ /**
3351
+ * Decode one EVM log emitted by the oracle precompile into a typed
3352
+ * {@link OracleEvent}. Pure + deterministic; dispatches on `topic0`,
3353
+ * then reads fixed-width 32-byte words.
3354
+ *
3355
+ * @throws {OracleEventError} on a foreign `topic0`, a topic-arity
3356
+ * mismatch, or a data-length mismatch.
3357
+ */
3358
+ declare function decodeOracleEvent(topics: readonly (string | Uint8Array | readonly number[])[], data: string | Uint8Array | readonly number[]): OracleEvent;
3359
+
3360
+ /**
3361
+ * GPU prover-market precompile ABI helpers + read types (MB-4).
3362
+ *
3363
+ * Mirrors `mono-core/crates/precompiles/platform/prover-market`. The six
3364
+ * ops (`createRequest` / `submitBid` / `closeRequest` / `submitProof` /
3365
+ * `settle` / `slash`) all take a single `bytes` canonical payload; their
3366
+ * selectors are `keccak256(sig)[..4]`.
3367
+ *
3368
+ * Only the `createRequest` canonical payload is finalized on the chain
3369
+ * side today (`ProofRequest::encode_canonical`). The other five op
3370
+ * bodies land at the deferred runtime-wiring wave, so their canonical
3371
+ * payload encoders carry a `TODO(monolythium-vision)` below.
3372
+ */
3373
+ /**
3374
+ * GPU prover-market precompile address (`0x100C`).
3375
+ *
3376
+ * Final, registered slot. (The earlier first-pass guess of `0x1110`
3377
+ * assumed MB-5 took `0x1110` for a new precompile; MB-5 instead shipped
3378
+ * `attestDkgReshare` as a selector inside node-registry `0x1005`, so the
3379
+ * platform extension band's lowest free slot — `0x100C`, after the
3380
+ * operator router at `0x100B` — is where the prover market binds.) The
3381
+ * precompile is gateable + genesis-disabled per ADR-0015 §3; activation
3382
+ * is a foundation milestone flip, but the `lyth_*` read surfaces work
3383
+ * regardless.
3384
+ */
3385
+ declare const PROVER_MARKET_ADDRESS: "0x000000000000000000000000000000000000100C";
3386
+ /** `SERVES_GPU_PROVE` capability bit (MB-4) — bit 9 of the node-registry field. */
3387
+ declare const SERVES_GPU_PROVE: 512;
3388
+ declare const PROVER_MARKET_SELECTORS: {
3389
+ readonly createRequest: string;
3390
+ readonly submitBid: string;
3391
+ readonly closeRequest: string;
3392
+ readonly submitProof: string;
3393
+ readonly settle: string;
3394
+ readonly slash: string;
3395
+ };
3396
+ declare const PROVER_MARKET_EVENT_SIGS: {
3397
+ readonly proofRequested: "ProofRequested(bytes32,address,bytes32,uint128,uint64)";
3398
+ readonly bidSubmitted: "BidSubmitted(bytes32,address,uint128)";
3399
+ readonly requestAssigned: "RequestAssigned(bytes32,address,uint128)";
3400
+ readonly proofSettled: "ProofSettled(bytes32,address,uint128,uint128)";
3401
+ readonly proverSlashed: "ProverSlashed(bytes32,address,uint16,bytes32)";
3402
+ readonly requestExpired: "RequestExpired(bytes32,address,uint128)";
3403
+ };
3404
+ /** `ProverSlashed` reason code: non-delivery past deadline. */
3405
+ declare const PROVER_SLASH_REASON_NON_DELIVERY: 1024;
3406
+ /** `ProverSlashed` reason code: bad proof. */
3407
+ declare const PROVER_SLASH_REASON_BAD_PROOF: 1025;
3408
+ declare const PROVER_MARKET_REQUEST_DOMAIN: "prover_market.request.v1";
3409
+ declare const PROVER_MARKET_BID_DOMAIN: "prover_market.bid.v1";
3410
+ declare const PROVER_MARKET_SUBMIT_DOMAIN: "prover_market.submit.v1";
3411
+ /** State machine for a proof request (mirrors `ProverMarketState`). */
3412
+ type ProverMarketState = "open" | "assigned" | "settled" | "slashed" | "expired";
3413
+ /** Decode a `ProverMarketState` from its on-chain wire byte, or `null`. */
3414
+ declare function proverMarketStateFromByte(b: number): ProverMarketState | null;
3415
+ /**
3416
+ * `lyth_getProofRequest` response — one proof-request record read
3417
+ * directly from the prover-market state tree (`0x100C`).
3418
+ *
3419
+ * Mirrors the chain JSON exactly (camelCase keys). Fee amounts are
3420
+ * `0x`-hex `uint256` strings; addresses are `mono` bech32m (null while
3421
+ * unset); hashes are `0x`-hex words. This is the exact-lookup shape; the
3422
+ * indexer-backed list rows ({@link ProofRequestRow}) carry a different
3423
+ * field set.
3424
+ */
3425
+ interface ProofRequestView {
3426
+ /** Response schema version (`1`). */
3427
+ schemaVersion: number;
3428
+ /** Data source — `"native_state_storage"`. */
3429
+ source: string;
3430
+ /** Prover-market precompile address (`0x100C`). */
3431
+ precompile: string;
3432
+ /** Canonical request id (`0x` 32 bytes). */
3433
+ requestId: string;
3434
+ /** Lifecycle state name. */
3435
+ state: ProverMarketState | string;
3436
+ /** Lifecycle state wire byte (`0`..=`4`). */
3437
+ stateCode: number;
3438
+ /** Buyer (`mono` bech32m); `null` when unset. */
3439
+ buyer: string | null;
3440
+ /** Verification-key hash the proof must satisfy (`0x` 32 bytes). */
3441
+ vkeyHash: string;
3442
+ /** Public-inputs commitment (`0x` 32 bytes). */
3443
+ inputsHash: string;
3444
+ /** Maximum fee escrowed (`0x`-hex `uint256`). */
3445
+ maxFee: string;
3446
+ /** Deterministic Unix-seconds deadline. */
3447
+ deadlineUnixSeconds: number;
3448
+ /** Assigned prover (`mono` bech32m); `null` while Open/Expired. */
3449
+ assignedProver: string | null;
3450
+ /** Winning fee bid (`0x`-hex `uint256`); `0x0` while Open. */
3451
+ winningFee: string;
3452
+ /** Unix seconds of the last state transition. */
3453
+ stateAtUnixSeconds: number;
3454
+ /** Delivered proof hash (`0x` 32 bytes); zero until `submitProof`. */
3455
+ proofHash: string;
3456
+ /** Number of bids recorded against the request. */
3457
+ bidCount: number;
3458
+ }
3459
+ /**
3460
+ * `lyth_listProofRequests` row — one indexer-projection proof-request
3461
+ * record. Distinct from {@link ProofRequestView}: fee amounts here are
3462
+ * decimal atomic-unit strings (the indexer projection's wire form), and
3463
+ * the row carries `feePaid` + `createdAtBlock` instead of the
3464
+ * state-tree-only `inputsHash` / `stateCode` / `proofHash` fields.
3465
+ */
3466
+ interface ProofRequestRow {
3467
+ /** Content-addressed request id (`0x` 32 bytes). */
3468
+ requestId: string;
3469
+ /** Requesting buyer (`mono` bech32m). */
3470
+ buyer: string;
3471
+ /** Verification-key hash bound to the request (`0x` 32 bytes). */
3472
+ vkeyHash: string;
3473
+ /** Maximum fee escrowed (decimal atomic-unit string). */
3474
+ maxFee: string;
3475
+ /** Deadline (unix seconds). */
3476
+ deadlineUnixSeconds: number;
3477
+ /** Lifecycle state name. */
3478
+ state: ProverMarketState | string;
3479
+ /** Assigned prover (`mono` bech32m); `null` until a winner is selected. */
3480
+ assignedProver: string | null;
3481
+ /** Winning fee (decimal atomic-unit string); `null` until assigned. */
3482
+ winningFee: string | null;
3483
+ /** Number of bids recorded against the request. */
3484
+ bidCount: number;
3485
+ /** Fee paid out on settlement (decimal atomic-unit string); `null` otherwise. */
3486
+ feePaid: string | null;
3487
+ /** Block height the request was first observed at. */
3488
+ createdAtBlock: number;
3489
+ }
3490
+ /**
3491
+ * `lyth_listProofRequests` response envelope.
3492
+ *
3493
+ * When the node runs without the prover-market indexer projection it
3494
+ * returns the graceful fallback `{ status: "indexer_unavailable", … }`
3495
+ * with an empty `requests` array — `requests` is always present so
3496
+ * callers can iterate unconditionally.
3497
+ */
3498
+ interface ListProofRequestsResponse {
3499
+ /** Response schema version (`1`). */
3500
+ schemaVersion: number;
3501
+ /** `"indexer_unavailable"` on the graceful-fallback path; absent when served. */
3502
+ status?: "indexer_unavailable";
3503
+ /** Data source — `"prover_market_indexer_projection"`. */
3504
+ source: string;
3505
+ /** Prover-market precompile address (`0x100C`). */
3506
+ precompile: string;
3507
+ /** Echo of the lifecycle-state filter, when one was supplied. */
3508
+ stateFilter?: ProverMarketState | string | null;
3509
+ /** Echo of the page cap, when served. */
3510
+ limit?: number;
3511
+ /** Matching rows, newest-first. Empty on the fallback path. */
3512
+ requests: ProofRequestRow[];
3513
+ /** Human-readable reason on the fallback path. */
3514
+ reason?: string;
3515
+ }
3516
+ /**
3517
+ * `lyth_getProverBids` response — every recorded bid against one request,
3518
+ * read from the prover-market bid slots (`0x100C`).
3519
+ */
3520
+ interface ProverBidsResponse {
3521
+ /** Response schema version (`1`). */
3522
+ schemaVersion: number;
3523
+ /** Data source — `"native_state_storage"`. */
3524
+ source: string;
3525
+ /** Prover-market precompile address (`0x100C`). */
3526
+ precompile: string;
3527
+ /** Request the bids target (`0x` 32 bytes). */
3528
+ requestId: string;
3529
+ /** Number of bids recorded. */
3530
+ bidCount: number;
3531
+ /** Recorded fee bids. */
3532
+ bids: ProverBidView[];
3533
+ }
3534
+ /** One prover fee bid in a {@link ProverBidsResponse}. */
3535
+ interface ProverBidView {
3536
+ /** Slot index of this bid within the request's bid list. */
3537
+ index: number;
3538
+ /** Bidding prover (`mono` bech32m); must hold `SERVES_GPU_PROVE`. */
3539
+ prover: string;
3540
+ /** Fee bid (`0x`-hex `uint256`); must be `<= maxFee`. */
3541
+ fee: string;
3542
+ }
3543
+ /**
3544
+ * `lyth_proverMarketStatus` response — market-wide prover-market stats.
3545
+ *
3546
+ * `feeFloor` is the on-chain genesis singleton (always present, read
3547
+ * directly from `0x100C`). The aggregate counts come from the indexer
3548
+ * projection; when the node runs without it the response carries
3549
+ * `status: "indexer_unavailable"` and the count fields are `null`.
3550
+ */
3551
+ interface ProverMarketStatusResponse {
3552
+ /** Response schema version (`1`). */
3553
+ schemaVersion: number;
3554
+ /** `"indexer_unavailable"` on the graceful-fallback path; absent when served. */
3555
+ status?: "indexer_unavailable";
3556
+ /** Data source — `"prover_market_indexer_projection"`. */
3557
+ source: string;
3558
+ /** Prover-market precompile address (`0x100C`). */
3559
+ precompile: string;
3560
+ /** Genesis-configured minimum prover fee (`0x`-hex `uint256`). */
3561
+ feeFloor: string;
3562
+ /** Requests in the `open` state; `null` on the fallback path. */
3563
+ openRequests: number | null;
3564
+ /** Requests in the `assigned` state; `null` on the fallback path. */
3565
+ assignedRequests: number | null;
3566
+ /** Requests in the `settled` state; `null` on the fallback path. */
3567
+ settledRequests: number | null;
3568
+ /** Requests in the `slashed` state; absent on the fallback path. */
3569
+ slashedRequests?: number | null;
3570
+ /** Requests in the `expired` state; absent on the fallback path. */
3571
+ expiredRequests?: number | null;
3572
+ /** Total requests observed; absent on the fallback path. */
3573
+ totalRequests?: number | null;
3574
+ /** Human-readable reason on the fallback path. */
3575
+ reason?: string;
3576
+ }
3577
+ declare class ProverMarketError extends Error {
3578
+ constructor(message: string);
3579
+ }
3580
+ /** Compute the buyer's `request` sighash (`prover_market.request.v1`). */
3581
+ declare function requestSighash(vkeyHash: string | Uint8Array | readonly number[], inputsHash: string | Uint8Array | readonly number[], maxFee: bigint | number | string, deadline: bigint | number | string, nonce: bigint | number | string): string;
3582
+ /** Compute the prover's `bid` sighash (`prover_market.bid.v1`). */
3583
+ declare function bidSighash(requestId: string | Uint8Array | readonly number[], fee: bigint | number | string): string;
3584
+ /** Compute the assigned prover's `submit` sighash (`prover_market.submit.v1`). */
3585
+ declare function submitSighash(requestId: string | Uint8Array | readonly number[], proofHash: string | Uint8Array | readonly number[]): string;
3586
+ interface CreateRequestCanonicalArgs {
3587
+ /** Buyer address (`0x` 20 bytes). */
3588
+ buyer: string | Uint8Array | readonly number[];
3589
+ /** Buyer's ML-DSA-65 pubkey bytes. */
3590
+ buyerPubkey: string | Uint8Array | readonly number[];
3591
+ /** Verification-key hash (`0x` 32 bytes). */
3592
+ vkeyHash: string | Uint8Array | readonly number[];
3593
+ /** Public-inputs commitment (`0x` 32 bytes). */
3594
+ inputsHash: string | Uint8Array | readonly number[];
3595
+ /** Maximum fee escrowed (lythoshi). */
3596
+ maxFee: bigint | number | string;
3597
+ /** Deterministic Unix-seconds deadline. */
3598
+ deadline: bigint | number | string;
3599
+ /** Buyer-supplied uniqueness nonce. */
3600
+ nonce: bigint | number | string;
3601
+ /** Buyer's ML-DSA-65 signature over {@link requestSighash}. */
3602
+ sig: string | Uint8Array | readonly number[];
3603
+ }
3604
+ /**
3605
+ * Encode the canonical `createRequest` payload (the `bytes` body the
3606
+ * precompile accepts). Mirrors `ProofRequest::encode_canonical`:
3607
+ *
3608
+ * ```text
3609
+ * buyer (20) || buyerPubkeyLen (be16) || buyerPubkey
3610
+ * || vkeyHash (32) || inputsHash (32) || maxFee (be16)
3611
+ * || deadline (be8) || nonce (be8) || sigLen (be16) || sig
3612
+ * ```
3613
+ */
3614
+ declare function encodeCreateRequestCanonical(args: CreateRequestCanonicalArgs): string;
3615
+ /**
3616
+ * Encode full `createRequest(bytes)` calldata: the 4-byte selector
3617
+ * followed by the ABI-`bytes`-wrapped canonical payload.
3618
+ */
3619
+ declare function encodeCreateRequestCalldata(args: CreateRequestCanonicalArgs): string;
3620
+
3621
+ /**
3622
+ * Spending-policy precompile ABI helpers.
3623
+ *
3624
+ * These helpers build calldata and claim messages for the live
3625
+ * `mono-core` spending-policy precompile. Fresh sub-account claims
3626
+ * must use `setPolicyClaim` or `claimPolicyByAddress`; legacy
3627
+ * `setPolicy` is only for re-claims where the principal is already
3628
+ * recorded on-chain.
3629
+ */
3630
+
3631
+ declare const SET_POLICY_CLAIM_DOMAIN_TAG: "lyth.spending-policy.claim.v1";
3632
+ declare const ML_DSA_65_PUBLIC_KEY_LEN$1 = 1952;
3633
+ declare const ML_DSA_65_SIGNATURE_LEN$1 = 3309;
3634
+ declare const SPENDING_POLICY_SELECTORS: {
3635
+ readonly setPolicy: "0x8da1a765";
3636
+ readonly setPolicyClaim: "0x35531f6c";
3637
+ readonly claimPolicyByAddress: "0x0c21376c";
3638
+ readonly enable: "0x5bfa1b68";
3639
+ readonly disable: "0xe6c09edf";
3640
+ readonly recordSpend: "0xdca04292";
3641
+ };
3642
+ interface SpendingPolicyArgs {
3643
+ /** Typed `mono` bech32m sub-account address. */
3644
+ subAccount: string;
3645
+ /** Typed `mono` bech32m principal address. */
3646
+ principal: string;
3647
+ dailyCapLythoshi: bigint | number | string;
3648
+ perTxCapLythoshi: bigint | number | string;
3649
+ allowRoot: string | Uint8Array | readonly number[];
3650
+ denyRoot: string | Uint8Array | readonly number[];
3651
+ /**
3652
+ * WP §18.8 per-week rolling cap in lythoshi (wire code `0x07`).
3653
+ * Omit or `0` for "no weekly cap".
3654
+ */
3655
+ weeklyCapLythoshi?: bigint | number | string;
3656
+ /**
3657
+ * WP §18.8 per-month rolling cap in lythoshi (wire code `0x08`).
3658
+ * Omit or `0` for "no monthly cap".
3659
+ */
3660
+ monthlyCapLythoshi?: bigint | number | string;
3661
+ /**
3662
+ * WP §18.8 per-category allow-list Merkle root (wire code `0x09`).
3663
+ * Omit or the zero hash for "no category constraint".
3664
+ */
3665
+ categoryAllowRoot?: string | Uint8Array | readonly number[];
3666
+ /**
3667
+ * WP §18.8 packed time-of-day window (wire code `0x0A`), a 32-byte
3668
+ * `uint256` word. Build it with {@link packTimeWindow}; omit or the
3669
+ * zero word for "no time-of-day window".
3670
+ */
3671
+ timeWindow?: string | Uint8Array | readonly number[];
3672
+ /**
3673
+ * WP §18.8 explicit policy-expiry timestamp in unix seconds (wire
3674
+ * code `0x0B`), encoded as a `uint256`. Omit or `0` for "never
3675
+ * auto-expires".
3676
+ */
3677
+ policyExpiry?: bigint | number | string;
3678
+ }
3679
+ /**
3680
+ * Decoded `lyth_getSpendingPolicy` time-of-day window. `enabled` is
3681
+ * always `true` when present (the chain omits the object as `null` when
3682
+ * no window is configured). `[startHour, endHour]` are `0..=23`,
3683
+ * inclusive, and may wrap past midnight.
3684
+ */
3685
+ interface SpendingPolicyTimeWindow {
3686
+ /** Always `true` when the window object is present. */
3687
+ enabled: boolean;
3688
+ /** Window start hour (`0..=23`). */
3689
+ startHour: number;
3690
+ /** Window end hour (`0..=23`). */
3691
+ endHour: number;
3692
+ }
3693
+ /**
3694
+ * `lyth_getSpendingPolicy` response — the §18.8 spending-policy view for
3695
+ * a sub-account, read directly from the spending-policy precompile slots
3696
+ * (`0x110C`).
3697
+ *
3698
+ * Mirrors the chain JSON exactly (camelCase keys). Caps are `0x`-hex
3699
+ * `uint256` strings; roots are `0x`-hex 32-byte words. `timeOfDayWindow`
3700
+ * is `null` when no window is configured; `expiryUnixSeconds` is `null`
3701
+ * when the policy never auto-expires. Note: the chain surfaces the policy
3702
+ * keyed by the controlled sub-account (`address`); the managing principal
3703
+ * is NOT part of this read shape.
3704
+ */
3705
+ interface SpendingPolicyView {
3706
+ /** Response schema version (`1`). */
3707
+ schemaVersion: number;
3708
+ /** Data source — `"native_state_storage"`. */
3709
+ source: string;
3710
+ /** Spending-policy precompile address (`0x110C`). */
3711
+ precompile: string;
3712
+ /** Sub-account the policy controls (`mono` bech32m). */
3713
+ address: string;
3714
+ /** `true` when a policy is written for this sub-account. */
3715
+ exists: boolean;
3716
+ /** `true` when the policy exists and is not disabled. */
3717
+ enabled: boolean;
3718
+ /** Monotonic policy version; `0` means no policy is written. */
3719
+ version: number;
3720
+ /** Per-transaction cap (`0x`-hex `uint256`); `0x0` = no cap. */
3721
+ perTxCap: string;
3722
+ /** Daily spend cap (`0x`-hex `uint256`); `0x0` = no cap. */
3723
+ dailyCap: string;
3724
+ /** §18.8 per-week cap (`0x`-hex `uint256`); `0x0` = no weekly cap. */
3725
+ weeklyCap: string;
3726
+ /** §18.8 per-month cap (`0x`-hex `uint256`); `0x0` = no monthly cap. */
3727
+ monthlyCap: string;
3728
+ /** §18.8 category allow-list root (`0x` 32 bytes). */
3729
+ categoryAllowRoot: string;
3730
+ /** Destination allow-list Merkle root (`0x` 32 bytes). */
3731
+ destinationAllowRoot: string;
3732
+ /** Destination deny-list Merkle root (`0x` 32 bytes). */
3733
+ destinationDenyRoot: string;
3734
+ /** §18.8 decoded time-of-day window, or `null` if unset. */
3735
+ timeOfDayWindow: SpendingPolicyTimeWindow | null;
3736
+ /** §18.8 policy-expiry unix seconds; `null` = never expires. */
3737
+ expiryUnixSeconds: number | null;
3738
+ }
3739
+ declare class SpendingPolicyError extends Error {
3740
+ constructor(message: string);
3741
+ }
3742
+ declare function spendingPolicyAddressHex(): string;
3743
+ declare function composeClaimBoundMessage(chainId: bigint | number | string, args: SpendingPolicyArgs, opts?: {
3744
+ precompileAddress?: string | Uint8Array | readonly number[];
3745
+ expectedPolicyVersion?: bigint | number | string;
3746
+ }): Uint8Array;
3747
+ declare function encodeSetPolicyCalldata(args: SpendingPolicyArgs): string;
3748
+ declare function encodeSetPolicyClaimCalldata(args: SpendingPolicyArgs, subAccountPubkey: Uint8Array | readonly number[] | string, subAccountSig: Uint8Array | readonly number[] | string): string;
3749
+ declare function encodeClaimPolicyByAddressCalldata(args: SpendingPolicyArgs, subAccountSig: Uint8Array | readonly number[] | string): string;
3750
+ declare function encodeEnableCalldata(subAccount: string): string;
3751
+ declare function encodeDisableCalldata(subAccount: string): string;
3752
+ /**
3753
+ * Pack a time-of-day window into the 32-byte `timeWindow` word used by
3754
+ * the WP §18.8 spending-policy dimensions.
3755
+ *
3756
+ * Mirrors `spending-policy::storage::pack_time_window`: hours clamp to
3757
+ * `0..=23`; when `enabled` is `false` the word is all-zero (the "no
3758
+ * window configured" sentinel). Layout (low 3 bytes of the big-endian
3759
+ * word): byte 29 = enabled sentinel (`0x01`), byte 30 = `startHour`,
3760
+ * byte 31 = `endHour`.
3761
+ */
3762
+ declare function packTimeWindow(enabled: boolean, startHour: number, endHour: number): Uint8Array;
3763
+ /**
3764
+ * Decode a packed `timeWindow` word into `[startHour, endHour]`, or
3765
+ * `null` when no window is configured. Inverse of {@link packTimeWindow}.
3766
+ */
3767
+ declare function decodeTimeWindow(word: string | Uint8Array | readonly number[]): [number, number] | null;
3768
+
2197
3769
  declare const NO_EVM_RECEIPT_PROOF_SCHEMA = "mono.no_evm_receipt_proof.v1";
2198
3770
  declare const NO_EVM_RECEIPT_PROOF_TYPE = "canonicalReceiptsTranscript";
2199
3771
  declare const NO_EVM_RECEIPT_ROOT_ALGORITHM = "keccak256-binary-merkle(monolythium/v4.1/receipt_leaf/1, monolythium/v4.1/receipt_node/1, duplicate-last padding)";
@@ -3526,6 +5098,73 @@ declare class RpcClient {
3526
5098
  lythClusterDirectory(page?: number, limit?: number): Promise<ClusterDirectoryPageResponse>;
3527
5099
  /** `lyth_clusters` — alias for `lyth_clusterDirectory`. */
3528
5100
  lythClusters(page?: number, limit?: number): Promise<ClusterDirectoryPageResponse>;
5101
+ /** PF-4 — `lyth_getSpendingPolicy`: the §18.8 spending-policy view for a sub-account. */
5102
+ lythGetSpendingPolicy(subAccount: string): Promise<SpendingPolicyView>;
5103
+ /** PF-6 — `lyth_getClusterDiversity`: diversity score + asn/geo/hosting breakdown. */
5104
+ lythGetClusterDiversity(clusterId: number): Promise<ClusterDiversityView>;
5105
+ /**
5106
+ * PF-6 — `lyth_getOperatorNetworkMetadata`: ASN/geo/hosting-class/IP/PCR
5107
+ * for a peer. `operatorId` is the 32-byte operator/peer id as `0x…` hex
5108
+ * (the form `lyth_operatorInfo` returns).
5109
+ */
5110
+ lythGetOperatorNetworkMetadata(operatorId: string): Promise<OperatorNetworkMetadataView>;
5111
+ /**
5112
+ * MB-6 — `lyth_oracleSigners`: the global oracle writer roster (folded
5113
+ * from `OracleWriterAdded` / `OracleWriterRemoved`). Returns the
5114
+ * `{ status: "indexer_unavailable", writers: [] }` fallback when the
5115
+ * node runs without the oracle writer-roster indexer projection.
5116
+ */
5117
+ lythOracleSigners(): Promise<OracleSignersResponse>;
5118
+ /** MB-6 — `lyth_oracleWriters`: the allowed writer set for a feed. */
5119
+ lythOracleWriters(feedId: string): Promise<OracleWriters>;
5120
+ /** MB-6 — `lyth_oracleLatestPrice`: the latest finalized median for a feed. */
5121
+ lythOracleLatestPrice(feedId: string): Promise<OracleLatestPrice>;
5122
+ /** MB-6 — `lyth_oracleFeedConfig`: a feed's decimals / min-signers / circuit-breaker config. */
5123
+ lythOracleFeedConfig(feedId: string): Promise<OracleFeedConfig>;
5124
+ /** MB-4 — `lyth_getProofRequest`: a single GPU prover-market proof request. */
5125
+ lythGetProofRequest(requestId: string): Promise<ProofRequestView>;
5126
+ /**
5127
+ * MB-4 — `lyth_listProofRequests`: open/recent prover-market proof
5128
+ * requests. Params are `[stateFilter?, limit?]` (the chain's order),
5129
+ * where `stateFilter` is one of `open|assigned|settled|slashed|expired`.
5130
+ * Returns the `{ status: "indexer_unavailable", requests: [] }` fallback
5131
+ * when the node runs without the prover-market indexer projection.
5132
+ */
5133
+ lythListProofRequests(stateFilter?: string | null, limit?: number): Promise<ListProofRequestsResponse>;
5134
+ /** MB-4 — `lyth_getProverBids`: the fee bids placed on one proof request. */
5135
+ lythGetProverBids(requestId: string): Promise<ProverBidsResponse>;
5136
+ /**
5137
+ * MB-4 — `lyth_proverMarketStatus`: prover-market summary. `feeFloor` is
5138
+ * always present (on-chain genesis singleton); the aggregate counts are
5139
+ * `null` on the `{ status: "indexer_unavailable" }` fallback path.
5140
+ */
5141
+ lythProverMarketStatus(): Promise<ProverMarketStatusResponse>;
5142
+ /**
5143
+ * Operator-router — `lyth_operatorRouterConfig`: the router's static
5144
+ * posture (`0x100B` address, the protocol fee ceiling, and whether the
5145
+ * gateable router precompile is currently milestone-activated).
5146
+ */
5147
+ lythOperatorRouterConfig(): Promise<OperatorRouterConfig>;
5148
+ /**
5149
+ * Operator-router — `lyth_operatorFeeConfig`: one operator's fee
5150
+ * registration (recipient, fee bps, enabled flag, registered-at block).
5151
+ * `operator` is a `mono` bech32m user address.
5152
+ */
5153
+ lythOperatorFeeConfig(operator: string): Promise<OperatorFeeConfig>;
5154
+ /**
5155
+ * MB-2 — `lyth_bridgeHealth`: a paged set of bridge-record health
5156
+ * envelopes. Each record carries the circuit-breaker posture
5157
+ * (`defaultDrainCapPerWindow`, `defaultDrainWindowBlocks`, `paused`,
5158
+ * `pausedAtBlock`, `resumeCooldownBlocks`). Params are `[cursor?, limit?]`
5159
+ * (the chain pages the global bridge set; there is no single-bridge form).
5160
+ */
5161
+ lythBridgeHealth(cursor?: string | null, limit?: number): Promise<BridgeHealthResponse>;
5162
+ /**
5163
+ * MB-2 — `lyth_bridgeDrainStatus`: the live per-route circuit-breaker
5164
+ * drain bucket for one `(bridgeId, wrappedAsset)` route. `bridgeId` is a
5165
+ * 32-byte `0x…` hex id; `wrappedAsset` is a `mono` bech32m user address.
5166
+ */
5167
+ lythBridgeDrainStatus(bridgeId: string, wrappedAsset: string): Promise<BridgeDrainStatus>;
3529
5168
  /**
3530
5169
  * `lyth_submitPendingChange` — operator-onboarding transport for the
3531
5170
  * pending-change ledger. Server validates the envelope shape.
@@ -3674,63 +5313,6 @@ declare function nativeEventsFromHistory<TDecoded extends NativeDecodedEvent = N
3674
5313
  declare function nativeMarketEventsFromHistory<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(response: NativeEventsResponse<unknown>): NativeEventsResponse<TDecoded>;
3675
5314
  declare function consumeNativeEvents<TDecoded extends NativeDecodedEvent = NativeDecodedEvent>(receipt: NativeReceiptResponse<unknown>, consumer: NativeEventConsumer<TDecoded>, filter?: NativeEventFilter): Promise<number>;
3676
5315
 
3677
- declare const ML_KEM_768_CIPHERTEXT_LEN = 1088;
3678
- declare const ML_KEM_768_ENCAPSULATION_KEY_LEN = 1184;
3679
- declare const ML_KEM_768_SHARED_SECRET_LEN = 32;
3680
- declare const DKG_NONCE_LEN = 12;
3681
- declare const DKG_AEAD_TAG_LEN = 16;
3682
- declare const MempoolClass: {
3683
- readonly Transfer: 0;
3684
- readonly ContractCall: 1;
3685
- readonly PrivacyOp: 2;
3686
- readonly CLOBOp: 3;
3687
- readonly AgentOp: 4;
3688
- readonly FoundationOp: 5;
3689
- /** @deprecated Use FoundationOp. */
3690
- readonly GovernanceOp: 5;
3691
- readonly RWAOp: 6;
3692
- };
3693
- type MempoolClass = (typeof MempoolClass)[keyof typeof MempoolClass];
3694
- interface NonceAad {
3695
- sender: Uint8Array;
3696
- nonce: bigint;
3697
- chainId: bigint;
3698
- class: MempoolClass;
3699
- maxFeePerGas: bigint;
3700
- maxPriorityFeePerGas: bigint;
3701
- gasLimit: bigint;
3702
- }
3703
- interface DecryptHint {
3704
- epoch: bigint;
3705
- scheme: number;
3706
- }
3707
- interface EncryptedEnvelope {
3708
- nonceAad: NonceAad;
3709
- ciphertext: Uint8Array;
3710
- decryptionHint: DecryptHint;
3711
- senderPubkey: Uint8Array;
3712
- outerSignature: Uint8Array;
3713
- sender: Uint8Array;
3714
- }
3715
- declare function bincodeNonceAad(aad: NonceAad): Uint8Array;
3716
- declare function bincodeDecryptHint(hint: DecryptHint): Uint8Array;
3717
- declare function bincodeEncryptedEnvelope(env: EncryptedEnvelope): Uint8Array;
3718
- declare function encryptInnerTx(signedInnerTxBincode: Uint8Array, nonceAad: NonceAad, kemEncapsulationKey: Uint8Array): Uint8Array;
3719
- declare function outerSigDigest(nonceAad: NonceAad, ciphertext: Uint8Array, decryptionHint: DecryptHint, senderPubkey: Uint8Array): Uint8Array;
3720
- declare function buildEncryptedEnvelope(args: {
3721
- signedInnerTxBincode: Uint8Array;
3722
- nonceAad: NonceAad;
3723
- decryptionHint: DecryptHint;
3724
- kemEncapsulationKey: Uint8Array;
3725
- senderAddress: Uint8Array;
3726
- senderPubkey: Uint8Array;
3727
- signOuterDigest: (digest: Uint8Array) => Promise<Uint8Array> | Uint8Array;
3728
- }): Promise<{
3729
- envelope: EncryptedEnvelope;
3730
- wireBytes: Uint8Array;
3731
- wireHex: string;
3732
- }>;
3733
-
3734
5316
  interface NativeEvmTxFields {
3735
5317
  chainId: bigint | number | string;
3736
5318
  nonce: bigint | number | string;
@@ -3793,6 +5375,29 @@ interface EncryptedSubmission {
3793
5375
  innerTxHashHex: string;
3794
5376
  innerWireBytes: number;
3795
5377
  }
5378
+ /**
5379
+ * A built plaintext submission — the bincode-encoded chain-side
5380
+ * `SignedTransaction` (`0x`-prefixed hex) ready to hand to
5381
+ * `mesh_submitTx`, plus the canonical hashes the wallet validates the
5382
+ * node echo against.
5383
+ *
5384
+ * Mirrors the chain-side artefacts produced by the Rust SDK's
5385
+ * `build_chain_signed_tx` (`mono-core/crates/core/sdk/src/tx.rs`): the
5386
+ * ML-DSA-65 signature is taken over the canonical chain-side `sighash`
5387
+ * (keccak-256 of the 0x01-tagged preimage) and the canonical native tx
5388
+ * hash is the keccak-256 of the 0x02-tagged preimage with the signature
5389
+ * and public key appended.
5390
+ */
5391
+ interface PlaintextSubmission {
5392
+ /** Bincode `SignedTransaction` wire bytes, `0x`-prefixed. */
5393
+ signedTxWireHex: string;
5394
+ /** Canonical native tx hash the node echoes on admission. */
5395
+ innerTxHashHex: string;
5396
+ /** Canonical chain-side sighash that was signed. */
5397
+ innerSighashHex: string;
5398
+ /** Length in bytes of the bincode `SignedTransaction`. */
5399
+ innerWireBytes: number;
5400
+ }
3796
5401
  declare function fetchEncryptionKey(client: RpcClient): Promise<EncryptionKey>;
3797
5402
  declare function buildEncryptedSubmission(args: {
3798
5403
  backend: MlDsa65Backend;
@@ -3801,5 +5406,64 @@ declare function buildEncryptedSubmission(args: {
3801
5406
  class?: MempoolClass;
3802
5407
  }): Promise<EncryptedSubmission>;
3803
5408
  declare function submitEncryptedEnvelope(client: RpcClient, envelopeWireHex: string): Promise<string>;
5409
+ /**
5410
+ * Build a PLAINTEXT submission — the opt-OUT-of-privacy counterpart to
5411
+ * {@link buildEncryptedSubmission}.
5412
+ *
5413
+ * Unlike the encrypted path, this never engages the Ferveo
5414
+ * threshold-decrypt pipeline. It re-shapes the native tx into the
5415
+ * chain-side `SignedTransaction`, signs over the canonical `sighash`
5416
+ * with the ML-DSA-65 backend, bincode-serializes the result, and
5417
+ * `0x`-hex-encodes it. The bytes are forwarded verbatim through
5418
+ * `mesh_submitTx` (the node routes them to `MempoolTx::plaintext` via
5419
+ * `submit_raw`) — the functional inclusion path on a chain running with
5420
+ * `encrypted_mempool_required = false`.
5421
+ *
5422
+ * Mirrors `TxClient::submit_plaintext` in the Rust SDK.
5423
+ */
5424
+ declare function buildPlaintextSubmission(args: {
5425
+ backend: MlDsa65Backend;
5426
+ tx: NativeEvmTxFields;
5427
+ }): PlaintextSubmission;
5428
+ /**
5429
+ * Submit a bincode-encoded chain-side `SignedTransaction` (`0x`-hex)
5430
+ * through the plaintext `mesh_submitTx` path and validate the node's
5431
+ * echoed canonical tx hash against the locally computed one.
5432
+ *
5433
+ * Mirrors the validation in `TxClient::submit_plaintext`: the node
5434
+ * echoes the 32-byte canonical native tx hash on admission, and any
5435
+ * mismatch (or non-32-byte response) is rejected loud so a wallet never
5436
+ * trusts a hash it did not derive itself.
5437
+ *
5438
+ * @returns the validated canonical native tx hash (`0x`-prefixed).
5439
+ */
5440
+ declare function submitPlaintextTransaction(client: RpcClient, signedTxWireHex: string, expectedTxHashHex: string): Promise<string>;
5441
+ /**
5442
+ * Build, sign, and submit a native transaction with an explicit
5443
+ * encryption toggle. `private == false` (the default for the RC testnet
5444
+ * / operator posture) routes through the plaintext `mesh_submitTx`
5445
+ * path; `private == true` routes through the Ferveo encrypt-then-submit
5446
+ * pipeline. Wallets wire a UI privacy toggle straight onto `private`.
5447
+ *
5448
+ * Mirrors `TxClient::build_sign_submit_with_privacy` in the Rust SDK.
5449
+ * The default is PLAINTEXT; the encrypted path is engaged only when
5450
+ * `private === true`, and requires an {@link EncryptionKey} (fetch it
5451
+ * via {@link fetchEncryptionKey}).
5452
+ *
5453
+ * @returns the canonical native tx hash (`0x`-prefixed). For the
5454
+ * plaintext path this is the node-echoed-and-validated hash; for the
5455
+ * encrypted path it is the locally computed inner tx hash (the
5456
+ * `lyth_submitEncrypted` RPC returns the encrypted-envelope admission
5457
+ * hash, so wallets track the canonical inner hash for receipts /
5458
+ * `lyth_txStatus` / indexer history).
5459
+ */
5460
+ declare function submitTransactionWithPrivacy(args: {
5461
+ client: RpcClient;
5462
+ backend: MlDsa65Backend;
5463
+ tx: NativeEvmTxFields;
5464
+ private: boolean;
5465
+ encryptionKey?: EncryptionKey;
5466
+ class?: MempoolClass;
5467
+ }): Promise<string>;
3804
5468
 
3805
- export { type AgentReputationResponse as $, type ApiStreamsIndexResponse as A, type BlockSelector as B, type ChainStatsResponse as C, type NativeEvmTxFields as D, type EncryptionKey as E, MempoolClass as F, RpcClient as G, MlDsa65Backend as H, API_STREAM_TOPICS as I, type AccountPolicy as J, type AccountProofResponse as K, type Address as L, type MrcMetadataResponse as M, type NativeReceiptFee as N, type OperatorCapabilitiesResponse as O, type PendingRewardsResponse as P, type AddressActivityArchiveRedirect as Q, type RuntimeBuildProvenance as R, type SearchResponse as S, type TxFeedResponse as T, type AddressActivityEntry as U, type AddressActivityKind as V, type AddressActivityKindResponse as W, type AddressActivityKindRetention as X, type AddressLabelRecord as Y, type AgentReputationCategoryScope as Z, type AgentReputationRecord as _, type RuntimeUpgradeStatus as a, type EntityRatchetResponse as a$, type ApiStreamTopic as a0, type ApiStreamTopicMetadata as a1, type ApiStreamTopicRetention as a2, type AssetPolicy as a3, type AttestationWindow as a4, BRIDGE_QUOTE_API_BLOCKED_REASON as a5, BRIDGE_REVERT_TAGS as a6, BRIDGE_SELECTORS as a7, BRIDGE_SUBMIT_API_BLOCKED_REASON as a8, type BlockHeader as a9, type ChainInfo as aA, type ChainRegistry as aB, type CheckpointRecord as aC, type ClobMarketRecord as aD, type ClobMarketSummary as aE, type ClobTrade as aF, type ClusterDelegatorsResponse as aG, type ClusterDirectoryEntryResponse as aH, type ClusterDirectoryPageResponse as aI, type ClusterEntityResponse as aJ, type ClusterMemberResponse as aK, type ClusterResignationRow as aL, type ClusterResignationsResponse as aM, type ClusterStatusResponse as aN, type DagParent as aO, type DagParentsResponse as aP, type DagSyncStatus as aQ, type DecodeTxExtension as aR, type DecodeTxLog as aS, type DecodeTxPqAttestation as aT, type DecodeTxResponse as aU, type DelegationCapResponse as aV, type DelegationHistoryRecord as aW, type DelegationRow as aX, type DelegationsResponse as aY, type DutyAbsence as aZ, type EncryptionKeyResponse as a_, type BlockTag as aa, type BlsCertificateResponse as ab, type BridgeAdminControl as ac, type BridgeBytesInput as ad, type BridgeCircuitBreakerState as ae, BridgePrecompileError as af, type BridgeQuoteSubmitReadiness as ag, type BridgeRiskTier as ah, type BridgeRouteAssessment as ai, type BridgeRouteCandidate as aj, type BridgeRouteCatalogue as ak, BridgeRouteCatalogueError as al, type BridgeRouteCatalogueJsonOptions as am, type BridgeRouteCataloguePayload as an, type BridgeRouteCatalogueRoute as ao, type BridgeRouteCatalogueValidation as ap, type BridgeRouteDisclosure as aq, type BridgeRouteSelection as ar, type BridgeRoutesSource as as, type BridgeTransferIntent as at, type BridgeTransferRequest as au, type BridgeVerifierDisclosure as av, CHAIN_REGISTRY as aw, CHAIN_REGISTRY_RAW_BASE as ax, type CapabilitiesResponse as ay, type CapabilityDescriptor as az, type NativeReceiptResponse as b, type NativeMarketStateSource as b$, type ExecutionUnitPriceResponse as b0, type ExplorerEndpoint as b1, type FeeHistoryResponse as b2, type GapRange as b3, type GapRecord as b4, type GapRecordsResponse as b5, type Hash as b6, type Hex as b7, type IndexerStatus as b8, type JailStatusWindow as b9, NO_EVM_RECEIPT_PROOF_TYPE as bA, NO_EVM_RECEIPT_ROOT_ALGORITHM as bB, type NativeAgentArbiterStateRecord as bC, type NativeAgentAttestationStateRecord as bD, type NativeAgentAvailabilityStateRecord as bE, type NativeAgentConsentStateRecord as bF, type NativeAgentEscrowStateRecord as bG, type NativeAgentIssuerStateRecord as bH, type NativeAgentPolicySpendStateRecord as bI, type NativeAgentPolicyStateRecord as bJ, type NativeAgentReputationReviewStateRecord as bK, type NativeAgentServiceStateRecord as bL, type NativeAgentStateFilterParamValue as bM, type NativeAgentStateResponseFilters as bN, type NativeAgentStateSource as bO, type NativeCollectionRoyaltyStateRecord as bP, type NativeEventConsumer as bQ, type NativeEventProjection as bR, type NativeEventsResponseFilters as bS, type NativeEventsSource as bT, type NativeMarketOrderBookDelta as bU, type NativeMarketOrderBookDeltasResponseFilters as bV, type NativeMarketOrderBookDeltasSource as bW, type NativeMarketOrderBookStreamAction as bX, type NativeMarketOrderBookStreamPayload as bY, type NativeMarketStateFilterParamValue as bZ, type NativeMarketStateResponseFilters as b_, type KeyRotationWindow as ba, type LythUpgradePlanStatus as bb, type LythUpgradeStatusResponse as bc, MAX_NATIVE_RECEIPT_EVENTS as bd, type MempoolSnapshot as be, type MeshDecodedTx as bf, type MeshSignedTxResponse as bg, type MeshTxIntent as bh, type MeshUnsignedTxResponse as bi, type MetricsRangeResponse as bj, type MetricsRangeSample as bk, type MetricsRangeSeries as bl, type MetricsRangeStatus as bm, type MrcAccountRecord as bn, type MrcMetadataRecord as bo, type MrcPolicyRecord as bp, type MrcPolicySpendRecord as bq, NATIVE_MARKET_EVENT_FAMILY as br, NATIVE_MARKET_ORDER_BOOK_STREAM_TOPIC as bs, NO_EVM_ARCHIVE_PROOF_SCHEMA as bt, NO_EVM_ARCHIVE_SIGNATURE_SCHEME as bu, NO_EVM_FINALITY_EVIDENCE_SCHEMA as bv, NO_EVM_FINALITY_EVIDENCE_SOURCE as bw, NO_EVM_RECEIPTS_ROOT_DOMAIN as bx, NO_EVM_RECEIPT_CODEC as by, NO_EVM_RECEIPT_PROOF_SCHEMA as bz, type NativeDecodedEvent as c, type ServiceProbeStatusLabel as c$, type NativeModuleForwarderDescriptor as c0, type NativeMrcPolicyProjection as c1, type NativeNftListingStateRecord as c2, type NativeReceiptCounters as c3, type NativeReceiptEvent as c4, type NativeReceiptSource as c5, type NativeSpotMarketStateRecord as c6, type NativeSpotOrderStateRecord as c7, type NetworkClientOptions as c8, type NetworkSlug as c9, type OperatorSurfaceCapability as cA, type OperatorSurfaceStatus as cB, type P2pSeed as cC, type PeerSummary as cD, type PeerSummaryAggregate as cE, type PendingRewardsRow as cF, type PendingTxSummary as cG, type PrecompileCatalogueResponse as cH, type PrecompileDescriptor as cI, type Quantity as cJ, type RankedBridgeRoute as cK, type ReceiptProofTrustArchivePolicy as cL, type ReceiptProofTrustArchiveSigner as cM, type ReceiptProofTrustFinalityPolicy as cN, type ReceiptProofTrustFinalitySigner as cO, type ReceiptProofTrustPolicy as cP, type RedemptionQueueTicket as cQ, type RegistryRecord as cR, type ReportServiceProbeRequest as cS, type ReportServiceProbeResponse as cT, type RichListHolder as cU, type RichListResponse as cV, type RoundInfo as cW, type RpcClientOptions as cX, type RpcEndpoint as cY, type RuntimeProvenanceResponse as cZ, type SearchHit as c_, type NoEvmArchiveCoveringSnapshot as ca, type NoEvmArchiveProof as cb, type NoEvmArchiveSignatureVerification as cc, type NoEvmArchiveSignatureVerificationIssue as cd, type NoEvmArchiveSignatureVerificationIssueCode as ce, type NoEvmArchiveTrustedSigner as cf, type NoEvmBlockBlsFinalityVerification as cg, type NoEvmBlsFinalityVerification as ch, type NoEvmFinalityBlockReference as ci, type NoEvmFinalityCertificate as cj, type NoEvmFinalityEvidence as ck, type NoEvmReceiptFinalityTrustPolicy as cl, type NoEvmReceiptProof as cm, NoEvmReceiptProofError as cn, type NoEvmReceiptProofErrorCode as co, type NoEvmReceiptProofVerification as cp, type NoEvmReceiptTrustIssue as cq, type NoEvmReceiptTrustIssueCode as cr, type NoEvmReceiptTrustPolicy as cs, type NoEvmReceiptTrustVerification as ct, type NoEvmReceiptTrustedBlsSigner as cu, type OperatorAuthorityResponse as cv, type OperatorInfoResponse as cw, type OperatorRiskResponse as cx, type OperatorSigningActivityResponse as cy, type OperatorSigningEntry as cz, type NativeEventFilter as d, nativeMarketEventsFromHistory as d$, type SigningEntryStatus as d0, type StorageProofBatch as d1, type SyncStatus as d2, TESTNET_69420 as d3, type TokenBalanceMrcIdentity as d4, type TokenBalanceRecord as d5, type TpmAttestationResponse as d6, type TransactionReceipt as d7, type TransactionView as d8, type TxFeedReceipt as d9, decodeNativeMarketOrderBookDeltasResponse as dA, decodeNativeReceiptResponse as dB, decodeNoEvmReceiptTranscript as dC, decodeTxFeedResponse as dD, encodeBlockSelector as dE, encodeLockBridgeConfigCalldata as dF, encodeSetBridgeResumeCooldownCalldata as dG, encodeSetBridgeRouteFinalityCalldata as dH, exportBridgeRouteCatalogueJson as dI, fetchChainInfoLatest as dJ, fetchChainRegistryLatest as dK, getChainInfo as dL, getNoEvmReceiptTrustPolicy as dM, getP2pSeeds as dN, getRpcEndpoints as dO, isBridgeAdminLockedRevert as dP, isBridgeCooldownZeroRevert as dQ, isBridgeFinalityZeroRevert as dR, isBridgeResumeCooldownActiveRevert as dS, isNativeDecodedEvent as dT, isNativeMarketOrderBookStreamPayload as dU, nativeAgentStateFilterParams as dV, nativeEventMatches as dW, nativeEventsFilterParams as dX, nativeEventsFromHistory as dY, nativeEventsFromReceipt as dZ, nativeMarketEventFilter as d_, type TxFeedTransaction as da, type TxStatusFoundResponse as db, type TxStatusNotFoundResponse as dc, type TxStatusResponse as dd, type UpcomingDutiesResponse as de, type UpcomingDutyMap as df, type UserAddressInput as dg, V1_BRIDGE_ALLOWED_FEE_TOKEN as dh, V1_BRIDGE_ALLOWED_PROTOCOL as di, type VertexAtRound as dj, type VerticesAtRoundResponse as dk, assertNativeMarketOrderBookStreamPayload as dl, assessBridgeRoute as dm, bridgeAddressHex as dn, bridgeQuoteSubmitReadiness as dp, bridgeRoutesReadiness as dq, bridgeTransferCandidates as dr, buildBridgeRouteCatalogue as ds, computeNoEvmDacFinalityMessage as dt, computeNoEvmLeaderFinalityMessage as du, computeNoEvmReceiptsRoot as dv, computeNoEvmRoundFinalityMessage as dw, computeNoEvmTargetReceiptHash as dx, consumeNativeEvents as dy, decodeNativeAgentStateResponse as dz, type TypedNativeReceiptEvent as e, nativeMarketEventsFromReceipt as e0, nativeMarketStateFilterParams as e1, noEvmReceiptTrustPolicyFromChainInfo as e2, normalizeBridgeRouteCatalogue as e3, parseBridgeRouteCatalogueJson as e4, parseChainRegistryToml as e5, parseNativeDecodedEvent as e6, parseQuantity as e7, parseQuantityBig as e8, rankBridgeRoutes as e9, type NonceAad as eA, STANDARD_ALGO_NUMBER_ML_DSA_65 as eB, bincodeDecryptHint as eC, bincodeEncryptedEnvelope as eD, bincodeNonceAad as eE, bincodeSignedTransaction as eF, buildEncryptedEnvelope as eG, buildEncryptedSubmission as eH, encodeMlDsa65Opaque as eI, encodeTransactionForHash as eJ, encryptInnerTx as eK, fetchEncryptionKey as eL, mlDsa65AddressBytes as eM, mlDsa65AddressFromPublicKey as eN, outerSigDigest as eO, submitEncryptedEnvelope as eP, selectBridgeTransferRoute as ea, validateBridgeRouteCatalogue as eb, verifyNoEvmArchiveProofSignatures as ec, verifyNoEvmBlockFinalityEvidenceMultisig as ed, verifyNoEvmBlockFinalityEvidenceThreshold as ee, verifyNoEvmFinalityEvidenceMultisig as ef, verifyNoEvmFinalityEvidenceThreshold as eg, verifyNoEvmReceiptProof as eh, verifyNoEvmReceiptProofTrust as ei, ADDRESS_DERIVATION_DOMAIN as ej, DKG_AEAD_TAG_LEN as ek, DKG_NONCE_LEN as el, type DecryptHint as em, ENUM_VARIANT_INDEX_ML_DSA_65 as en, type EncryptedEnvelope as eo, type EncryptedSubmission as ep, ML_DSA_65_PUBLIC_KEY_LEN as eq, ML_DSA_65_SEED_LEN as er, ML_DSA_65_SIGNATURE_LEN as es, ML_DSA_65_SIGNING_KEY_LEN as et, ML_KEM_768_CIPHERTEXT_LEN as eu, ML_KEM_768_ENCAPSULATION_KEY_LEN as ev, ML_KEM_768_SHARED_SECRET_LEN as ew, type NativeTxExtension as ex, type NativeTxExtensionDescriptor as ey, type NativeTxExtensionLike as ez, 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 };
5469
+ export { type AddressActivityKindRetention as $, type ApiStreamsIndexResponse as A, type BlockSelector as B, type ChainStatsResponse as C, type NativeEvmTxFields as D, type EncryptionKey as E, MempoolClass as F, type TypedAddress as G, RpcClient as H, MlDsa65Backend as I, type AddressKind as J, ADDRESS_HRP as K, ADDRESS_KIND_HRPS as L, type MrcMetadataResponse as M, type NativeReceiptFee as N, type OperatorCapabilitiesResponse as O, type PendingRewardsResponse as P, API_STREAM_TOPICS as Q, type RuntimeBuildProvenance as R, type SearchResponse as S, type TxFeedResponse as T, type AccountPolicy as U, type AccountProofResponse as V, type Address as W, type AddressActivityArchiveRedirect as X, type AddressActivityEntry as Y, type AddressActivityKind as Z, type AddressActivityKindResponse as _, type RuntimeUpgradeStatus as a, type ClusterDiversityView as a$, AddressError as a0, type AddressLabelRecord as a1, type AddressValidation as a2, type AgentReputationCategoryScope as a3, type AgentReputationRecord as a4, type AgentReputationResponse as a5, type ApiStreamTopic as a6, type ApiStreamTopicMetadata as a7, type ApiStreamTopicRetention as a8, type AssetPolicy as a9, type BridgeRouteCataloguePayload as aA, type BridgeRouteCatalogueRoute as aB, type BridgeRouteCatalogueValidation as aC, type BridgeRouteDisclosure as aD, type BridgeRouteSelection as aE, type BridgeRoutesSource as aF, type BridgeTransferIntent as aG, type BridgeTransferRequest as aH, type BridgeVerifierDisclosure as aI, CHAIN_REGISTRY as aJ, CHAIN_REGISTRY_RAW_BASE as aK, CLOB_MARKET_ID_DOMAIN_TAG as aL, CLOB_SELECTORS as aM, CLUSTER_FORMED_EVENT_SIG as aN, type CancelSpotOrderArgs as aO, type CapabilitiesResponse as aP, type CapabilityDescriptor as aQ, type ChainInfo as aR, type ChainRegistry as aS, type CheckpointRecord as aT, type ClobMarketRecord as aU, type ClobMarketSummary as aV, type ClobTrade as aW, type ClusterDelegatorsResponse as aX, type ClusterDirectoryEntryResponse as aY, type ClusterDirectoryPageResponse as aZ, type ClusterDiversity as a_, type AttestationWindow as aa, BRIDGE_QUOTE_API_BLOCKED_REASON as ab, BRIDGE_REVERT_TAGS as ac, BRIDGE_SELECTORS as ad, BRIDGE_SUBMIT_API_BLOCKED_REASON as ae, type BlockHeader as af, type BlockTag as ag, type BlsCertificateResponse as ah, type BridgeAdminControl as ai, type BridgeAnchorState as aj, type BridgeBreakerState as ak, type BridgeBytesInput as al, type BridgeCircuitBreakerFields as am, type BridgeCircuitBreakerState as an, type BridgeDrainCap as ao, type BridgeDrainStatus as ap, type BridgeHealthRecord as aq, type BridgeHealthResponse as ar, BridgePrecompileError as as, type BridgeQuoteSubmitReadiness as at, type BridgeRiskTier as au, type BridgeRouteAssessment as av, type BridgeRouteCandidate as aw, type BridgeRouteCatalogue as ax, BridgeRouteCatalogueError as ay, type BridgeRouteCatalogueJsonOptions as az, type NativeReceiptResponse as b, type MetricsRangeStatus as b$, type ClusterEntityResponse as b0, type ClusterFormedEvent as b1, type ClusterMemberResponse as b2, type ClusterResignationRow as b3, type ClusterResignationsResponse as b4, type ClusterStatusResponse as b5, type CreateRequestCanonicalArgs as b6, DIVERSITY_SCORE_MAX as b7, type DagParent as b8, type DagParentsResponse as b9, type FeeHistoryResponse as bA, type GapRange as bB, type GapRecord as bC, type GapRecordsResponse as bD, type Hash as bE, type Hex as bF, type IndexerStatus as bG, type JailStatusWindow as bH, type KeyRotationWindow as bI, type ListProofRequestsResponse as bJ, type LythUpgradePlanStatus as bK, type LythUpgradeStatusResponse as bL, MAX_NATIVE_CALL_FORWARDER_REQUEST_BYTES as bM, MAX_NATIVE_RECEIPT_EVENTS as bN, ML_DSA_65_PUBLIC_KEY_LEN$1 as bO, ML_DSA_65_SIGNATURE_LEN$1 as bP, MULTISIG_ADDRESS_DERIVATION_DOMAIN as bQ, MarketActionError as bR, type MarketTransactionPlan as bS, type MempoolSnapshot as bT, type MeshDecodedTx as bU, type MeshSignedTxResponse as bV, type MeshTxIntent as bW, type MeshUnsignedTxResponse as bX, type MetricsRangeResponse as bY, type MetricsRangeSample as bZ, type MetricsRangeSeries as b_, type DagSyncStatus as ba, type DecodeTxExtension as bb, type DecodeTxLog as bc, type DecodeTxPqAttestation as bd, type DecodeTxResponse as be, type DelegationCapResponse as bf, type DelegationHistoryRecord as bg, type DelegationRow as bh, type DelegationsResponse as bi, type DutyAbsence as bj, type EncodeNativeNftBuyListingArgs as bk, type EncodeNativeNftCancelListingArgs as bl, type EncodeNativeNftCreateListingArgs as bm, type EncodeNativeNftPlaceAuctionBidArgs as bn, type EncodeNativeNftSettleAuctionArgs as bo, type EncodeNativeNftSweepExpiredListingsArgs as bp, type EncodeNativeSpotCancelOrderArgs as bq, type EncodeNativeSpotCreateMarketArgs as br, type EncodeNativeSpotLimitOrderArgs as bs, type EncodeNativeSpotSettleLimitOrderArgs as bt, type EncodeNativeSpotSettleRoutedLimitOrderArgs as bu, type EncryptionKeyResponse as bv, type EntityRatchetResponse as bw, type EthSendTransactionRequest as bx, type ExecutionUnitPriceResponse as by, type ExplorerEndpoint as bz, type NativeDecodedEvent as c, type NativeReceiptSource as c$, type MrcAccountRecord as c0, type MrcMetadataRecord as c1, type MrcPolicyRecord as c2, type MrcPolicySpendRecord as c3, NATIVE_CALL_FORWARDER_ARTIFACT_PROFILE as c4, NATIVE_CALL_FORWARDER_RESPONSE_CAPACITY as c5, NATIVE_CALL_FORWARDER_RESPONSE_OFFSET as c6, NATIVE_MARKET_EVENT_FAMILY as c7, NATIVE_MARKET_MODULE_ADDRESS as c8, NATIVE_MARKET_MODULE_ADDRESS_BYTES as c9, type NativeAgentStateSource as cA, type NativeCallForwarderArtifact as cB, type NativeCollectionRoyaltyStateRecord as cC, type NativeEventConsumer as cD, type NativeEventProjection as cE, type NativeEventsResponseFilters as cF, type NativeEventsSource as cG, type NativeMarketAddressInput as cH, type NativeMarketAddressKind as cI, type NativeMarketForwarderInput as cJ, type NativeMarketModuleCallEnvelope as cK, type NativeMarketModuleContractCall as cL, type NativeMarketOrderBookDelta as cM, type NativeMarketOrderBookDeltasResponseFilters as cN, type NativeMarketOrderBookDeltasSource as cO, type NativeMarketOrderBookStreamAction as cP, type NativeMarketOrderBookStreamPayload as cQ, type NativeMarketStateFilterParamValue as cR, type NativeMarketStateResponseFilters as cS, type NativeMarketStateSource as cT, type NativeModuleForwarderDescriptor as cU, type NativeMrcPolicyProjection as cV, type NativeNftAssetStandard as cW, type NativeNftListingKind as cX, type NativeNftListingStateRecord as cY, type NativeReceiptCounters as cZ, type NativeReceiptEvent as c_, NATIVE_MARKET_ORDER_BOOK_STREAM_TOPIC as ca, NODE_REGISTRY_CAPABILITIES as cb, NODE_REGISTRY_CAPABILITY_MASK as cc, NODE_REGISTRY_PUBLIC_SERVICE_MASK as cd, NODE_REGISTRY_SELECTORS as ce, NO_EVM_ARCHIVE_PROOF_SCHEMA as cf, NO_EVM_ARCHIVE_SIGNATURE_SCHEME as cg, NO_EVM_FINALITY_EVIDENCE_SCHEMA as ch, NO_EVM_FINALITY_EVIDENCE_SOURCE as ci, NO_EVM_RECEIPTS_ROOT_DOMAIN as cj, NO_EVM_RECEIPT_CODEC as ck, NO_EVM_RECEIPT_PROOF_SCHEMA as cl, NO_EVM_RECEIPT_PROOF_TYPE as cm, NO_EVM_RECEIPT_ROOT_ALGORITHM as cn, type NativeAgentArbiterStateRecord as co, type NativeAgentAttestationStateRecord as cp, type NativeAgentAvailabilityStateRecord as cq, type NativeAgentConsentStateRecord as cr, type NativeAgentEscrowStateRecord as cs, type NativeAgentIssuerStateRecord as ct, type NativeAgentPolicySpendStateRecord as cu, type NativeAgentPolicyStateRecord as cv, type NativeAgentReputationReviewStateRecord as cw, type NativeAgentServiceStateRecord as cx, type NativeAgentStateFilterParamValue as cy, type NativeAgentStateResponseFilters as cz, type NativeEventFilter as d, type PendingRewardsRow as d$, type NativeSpotMarketStateRecord as d0, type NativeSpotOrderStateRecord as d1, type NetworkClientOptions as d2, type NetworkSlug as d3, type NoEvmArchiveCoveringSnapshot as d4, type NoEvmArchiveProof as d5, type NoEvmArchiveSignatureVerification as d6, type NoEvmArchiveSignatureVerificationIssue as d7, type NoEvmArchiveSignatureVerificationIssueCode as d8, type NoEvmArchiveTrustedSigner as d9, type OperatorInfoResponse as dA, type OperatorNetworkMetadata as dB, type OperatorNetworkMetadataView as dC, type OperatorRiskResponse as dD, type OperatorRouterConfig as dE, type OperatorSigningActivityResponse as dF, type OperatorSigningEntry as dG, type OperatorSurfaceCapability as dH, type OperatorSurfaceStatus as dI, type OracleEvent as dJ, OracleEventError as dK, type OracleFeedConfig as dL, type OracleLatestPrice as dM, type OracleSignerRow as dN, type OracleSignersResponse as dO, type OracleWriters as dP, type P2pSeed as dQ, PROVER_MARKET_ADDRESS as dR, PROVER_MARKET_BID_DOMAIN as dS, PROVER_MARKET_EVENT_SIGS as dT, PROVER_MARKET_REQUEST_DOMAIN as dU, PROVER_MARKET_SELECTORS as dV, PROVER_MARKET_SUBMIT_DOMAIN as dW, PROVER_SLASH_REASON_BAD_PROOF as dX, PROVER_SLASH_REASON_NON_DELIVERY as dY, type PeerSummary as dZ, type PeerSummaryAggregate as d_, type NoEvmBlockBlsFinalityVerification as da, type NoEvmBlsFinalityVerification as db, type NoEvmFinalityBlockReference as dc, type NoEvmFinalityCertificate as dd, type NoEvmFinalityEvidence as de, type NoEvmReceiptFinalityTrustPolicy as df, type NoEvmReceiptProof as dg, NoEvmReceiptProofError as dh, type NoEvmReceiptProofErrorCode as di, type NoEvmReceiptProofVerification as dj, type NoEvmReceiptTrustIssue as dk, type NoEvmReceiptTrustIssueCode as dl, type NoEvmReceiptTrustPolicy as dm, type NoEvmReceiptTrustVerification as dn, type NoEvmReceiptTrustedBlsSigner as dp, type NodeHostingClass as dq, NodeRegistryError as dr, OPERATOR_ROUTER_EVENT_SIGS as ds, OPERATOR_ROUTER_SELECTORS as dt, OPERATOR_ROUTER_SIGS as du, ORACLE_EVENT_SIGS as dv, type OperatorAuthorityResponse as dw, type OperatorFeeChargedEvent as dx, type OperatorFeeConfig as dy, type OperatorFeeQuote as dz, type TypedNativeReceiptEvent as e, V1_BRIDGE_ALLOWED_FEE_TOKEN as e$, type PendingTxSummary as e0, type PlaceLimitOrderViaArgs as e1, type PlaceLimitOrderViaPlan as e2, type PlaceSpotLimitOrderArgs as e3, type PlaceSpotMarketOrderArgs as e4, type PlaceSpotMarketOrderExArgs as e5, type PrecompileCatalogueResponse as e6, type PrecompileDescriptor as e7, type ProofRequestRow as e8, type ProofRequestView as e9, SET_POLICY_CLAIM_DOMAIN_TAG as eA, SPENDING_POLICY_SELECTORS as eB, type SearchHit as eC, type ServiceProbeStatusLabel as eD, type SigningEntryStatus as eE, type SpendingPolicyArgs as eF, SpendingPolicyError as eG, type SpendingPolicyTimeWindow as eH, type SpendingPolicyView as eI, type SpotLimitOrderSide as eJ, type SpotMarketOrderMode as eK, type StorageProofBatch as eL, type SyncStatus as eM, TESTNET_69420 as eN, type TokenBalanceMrcIdentity as eO, type TokenBalanceRecord as eP, type TpmAttestationResponse as eQ, type TransactionReceipt as eR, type TransactionView as eS, type TxFeedReceipt as eT, type TxFeedTransaction as eU, type TxStatusFoundResponse as eV, type TxStatusNotFoundResponse as eW, type TxStatusResponse as eX, type UpcomingDutiesResponse as eY, type UpcomingDutyMap as eZ, type UserAddressInput as e_, type ProverBidView as ea, type ProverBidsResponse as eb, ProverMarketError as ec, type ProverMarketState as ed, type ProverMarketStatusResponse as ee, type Quantity as ef, RESERVED_ADDRESS_HRPS as eg, type RankedBridgeRoute as eh, type ReceiptProofTrustArchivePolicy as ei, type ReceiptProofTrustArchiveSigner as ej, type ReceiptProofTrustFinalityPolicy as ek, type ReceiptProofTrustFinalitySigner as el, type ReceiptProofTrustPolicy as em, type RedemptionQueueTicket as en, type RegistryRecord as eo, type ReportServiceProbeCalldataArgs as ep, type ReportServiceProbeRequest as eq, type ReportServiceProbeResponse as er, type RichListHolder as es, type RichListResponse as et, type RoundInfo as eu, type RpcClientOptions as ev, type RpcEndpoint as ew, type RuntimeProvenanceResponse as ex, SERVES_GPU_PROVE as ey, SERVICE_PROBE_STATUS as ez, type NativeEventsFilter as f, decodeTimeWindow as f$, V1_BRIDGE_ALLOWED_PROTOCOL as f0, type VertexAtRound as f1, type VerticesAtRoundResponse as f2, addressBytesToHex as f3, addressToBech32 as f4, addressToTypedBech32 as f5, assertNativeMarketOrderBookStreamPayload as f6, assessBridgeRoute as f7, bech32ToAddress as f8, bech32ToAddressBytes as f9, buildNativeSpotLimitOrderForwarderInput as fA, buildNativeSpotLimitOrderModuleCall as fB, buildNativeSpotSettleLimitOrderForwarderInput as fC, buildNativeSpotSettleLimitOrderModuleCall as fD, buildNativeSpotSettleRoutedLimitOrderForwarderInput as fE, buildNativeSpotSettleRoutedLimitOrderModuleCall as fF, buildPlaceLimitOrderViaPlan as fG, buildPlaceSpotLimitOrderPlan as fH, buildPlaceSpotMarketOrderExPlan as fI, buildPlaceSpotMarketOrderPlan as fJ, clobAddressHex as fK, composeClaimBoundMessage as fL, computeNoEvmDacFinalityMessage as fM, computeNoEvmLeaderFinalityMessage as fN, computeNoEvmReceiptsRoot as fO, computeNoEvmRoundFinalityMessage as fP, computeNoEvmTargetReceiptHash as fQ, consumeNativeEvents as fR, decodeClusterDiversity as fS, decodeClusterFormedEvent as fT, decodeNativeAgentStateResponse as fU, decodeNativeMarketOrderBookDeltasResponse as fV, decodeNativeReceiptResponse as fW, decodeNoEvmReceiptTranscript as fX, decodeOperatorFeeChargedEvent as fY, decodeOperatorNetworkMetadata as fZ, decodeOracleEvent as f_, bidSighash as fa, bridgeAddressHex as fb, bridgeDrainRemaining as fc, bridgeQuoteSubmitReadiness as fd, bridgeRoutesReadiness as fe, bridgeTransferCandidates as ff, buildBridgeRouteCatalogue as fg, buildCancelSpotOrderPlan as fh, buildNativeCallForwarderArtifact as fi, buildNativeMarketModuleCallEnvelope as fj, buildNativeNftBuyListingForwarderInput as fk, buildNativeNftBuyListingModuleCall as fl, buildNativeNftCancelListingForwarderInput as fm, buildNativeNftCancelListingModuleCall as fn, buildNativeNftCreateListingForwarderInput as fo, buildNativeNftCreateListingModuleCall as fp, buildNativeNftPlaceAuctionBidForwarderInput as fq, buildNativeNftPlaceAuctionBidModuleCall as fr, buildNativeNftSettleAuctionForwarderInput as fs, buildNativeNftSettleAuctionModuleCall as ft, buildNativeNftSweepExpiredListingsForwarderInput as fu, buildNativeNftSweepExpiredListingsModuleCall as fv, buildNativeSpotCancelOrderForwarderInput as fw, buildNativeSpotCancelOrderModuleCall as fx, buildNativeSpotCreateMarketForwarderInput as fy, buildNativeSpotCreateMarketModuleCall as fz, type NativeEventsResponse as g, nativeMarketStateFilterParams as g$, decodeTxFeedResponse as g0, deriveClobMarketId as g1, deriveClusterAnchorAddress as g2, deriveNativeSpotMarketId as g3, deriveNativeSpotOrderId as g4, encodeBlockSelector as g5, encodeCancelOrderCalldata as g6, encodeClaimPolicyByAddressCalldata as g7, encodeCreateRequestCalldata as g8, encodeCreateRequestCanonical as g9, encodeSetTickSizeCalldata as gA, exportBridgeRouteCatalogueJson as gB, fetchChainInfoLatest as gC, fetchChainRegistryLatest as gD, getChainInfo as gE, getNoEvmReceiptTrustPolicy as gF, getP2pSeeds as gG, getRpcEndpoints as gH, hexToAddressBytes as gI, isBridgeAdminLockedRevert as gJ, isBridgeCooldownZeroRevert as gK, isBridgeFinalityZeroRevert as gL, isBridgeResumeCooldownActiveRevert as gM, isConcreteServiceProbeStatus as gN, isNativeDecodedEvent as gO, isNativeMarketOrderBookStreamPayload as gP, isSinglePublicServiceProbeMask as gQ, isValidNodeRegistryCapabilities as gR, isValidPublicServiceProbeMask as gS, nativeAgentStateFilterParams as gT, nativeEventMatches as gU, nativeEventsFilterParams as gV, nativeEventsFromHistory as gW, nativeEventsFromReceipt as gX, nativeMarketEventFilter as gY, nativeMarketEventsFromHistory as gZ, nativeMarketEventsFromReceipt as g_, encodeDisableCalldata as ga, encodeEnableCalldata as gb, encodeLockBridgeConfigCalldata as gc, encodeNativeMarketModuleForwarderInput as gd, encodeNativeNftBuyListingCall as ge, encodeNativeNftCancelListingCall as gf, encodeNativeNftCreateListingCall as gg, encodeNativeNftPlaceAuctionBidCall as gh, encodeNativeNftSettleAuctionCall as gi, encodeNativeNftSweepExpiredListingsCall as gj, encodeNativeSpotCancelOrderCall as gk, encodeNativeSpotCreateMarketCall as gl, encodeNativeSpotLimitOrderCall as gm, encodeNativeSpotSettleLimitOrderCall as gn, encodeNativeSpotSettleRoutedLimitOrderCall as go, encodePlaceLimitOrderCalldata as gp, encodePlaceLimitOrderViaCalldata as gq, encodePlaceMarketOrderCalldata as gr, encodePlaceMarketOrderExCalldata as gs, encodeReportServiceProbeCalldata as gt, encodeSetBridgeResumeCooldownCalldata as gu, encodeSetBridgeRouteFinalityCalldata as gv, encodeSetLotSizeCalldata as gw, encodeSetMinNotionalCalldata as gx, encodeSetPolicyCalldata as gy, encodeSetPolicyClaimCalldata as gz, type NativeAgentStateFilter as h, fetchEncryptionKey as h$, noEvmReceiptTrustPolicyFromChainInfo as h0, nodeHostingClassFromByte as h1, nodeHostingClassToByte as h2, nodeRegistryAddressHex as h3, normalizeAddressHex as h4, normalizeBridgeRouteCatalogue as h5, oracleAddressHex as h6, packTimeWindow as h7, parseAddress as h8, parseBridgeRouteCatalogueJson as h9, type DecryptHint as hA, ENUM_VARIANT_INDEX_ML_DSA_65 as hB, type EncryptedEnvelope as hC, type EncryptedSubmission as hD, ML_DSA_65_PUBLIC_KEY_LEN as hE, ML_DSA_65_SEED_LEN as hF, ML_DSA_65_SIGNATURE_LEN as hG, ML_DSA_65_SIGNING_KEY_LEN as hH, ML_KEM_768_CIPHERTEXT_LEN as hI, ML_KEM_768_ENCAPSULATION_KEY_LEN as hJ, ML_KEM_768_SHARED_SECRET_LEN as hK, type NativeTxExtension as hL, type NativeTxExtensionDescriptor as hM, type NativeTxExtensionLike as hN, type NonceAad as hO, type PlaintextSubmission as hP, STANDARD_ALGO_NUMBER_ML_DSA_65 as hQ, bincodeDecryptHint as hR, bincodeEncryptedEnvelope as hS, bincodeNonceAad as hT, bincodeSignedTransaction as hU, buildEncryptedEnvelope as hV, buildEncryptedSubmission as hW, buildPlaintextSubmission as hX, encodeMlDsa65Opaque as hY, encodeTransactionForHash as hZ, encryptInnerTx as h_, parseChainRegistryToml as ha, parseNativeDecodedEvent as hb, parseQuantity as hc, parseQuantityBig as hd, proverMarketStateFromByte as he, quoteOperatorFee as hf, rankBridgeRoutes as hg, requestSighash as hh, requireTypedAddress as hi, selectBridgeTransferRoute as hj, serviceProbeStatusLabel as hk, spendingPolicyAddressHex as hl, submitSighash as hm, typedBech32ToAddress as hn, validateAddress as ho, validateBridgeRouteCatalogue as hp, verifyNoEvmArchiveProofSignatures as hq, verifyNoEvmBlockFinalityEvidenceMultisig as hr, verifyNoEvmBlockFinalityEvidenceThreshold as hs, verifyNoEvmFinalityEvidenceMultisig as ht, verifyNoEvmFinalityEvidenceThreshold as hu, verifyNoEvmReceiptProof as hv, verifyNoEvmReceiptProofTrust as hw, ADDRESS_DERIVATION_DOMAIN as hx, DKG_AEAD_TAG_LEN as hy, DKG_NONCE_LEN as hz, type NativeAgentStateResponse as i, mlDsa65AddressBytes as i0, mlDsa65AddressFromPublicKey as i1, outerSigDigest as i2, submitEncryptedEnvelope as i3, submitPlaintextTransaction as i4, submitTransactionWithPrivacy as i5, 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 };