@toon-protocol/core 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -127,6 +127,7 @@ declare const PREFIX_GRANT_KIND = 10037;
127
127
  * The genesis node uses this directly -- it does not derive its address from a pubkey.
128
128
  * All other nodes derive addresses as children of their upstream peer's prefix.
129
129
  */
130
+ declare const ILP_ROOT_PREFIX = "g.toon";
130
131
  /**
131
132
  * Blob Storage DVM kind (kind 5094).
132
133
  * Used for permanent blob storage requests (e.g., Arweave uploads).
@@ -163,7 +164,6 @@ declare const PET_INTERACTION_RESULT_KIND = 6900;
163
164
  * pipeline after ZK proof generation.
164
165
  */
165
166
  declare const PET_INTERACTION_EVENT_KIND = 14919;
166
- declare const ILP_ROOT_PREFIX = "g.toon";
167
167
 
168
168
  /**
169
169
  * Shared ILP address validation utilities.
@@ -430,8 +430,29 @@ interface IlpPeerInfo {
430
430
  ilpAddress: string;
431
431
  /** All ILP addresses of this peer (one per upstream peering). When absent (pre-Epic-7 events), consumers should default to [ilpAddress]. */
432
432
  ilpAddresses?: string[];
433
- /** BTP WebSocket endpoint URL for packet exchange */
433
+ /** BTP WebSocket endpoint URL for packet exchange (pay-per-event writes) */
434
434
  btpEndpoint: string;
435
+ /**
436
+ * ILP-over-HTTP endpoint URL (RFC-0035) for stateless, one-shot writes:
437
+ * `POST` an ILP PREPARE here and receive a FULFILL/REJECT body. Suited to
438
+ * pure consumers, browsers, and NAT'd agents that don't need a duplex BTP
439
+ * session. Absent when the node only exposes BTP. The same host typically
440
+ * also accepts an HTTP `Upgrade` to BTP — see {@link supportsUpgrade}.
441
+ */
442
+ httpEndpoint?: string;
443
+ /**
444
+ * Whether `httpEndpoint`'s host accepts an HTTP `Upgrade` to a BTP/WebSocket
445
+ * session (`Sec-WebSocket-Protocol: btp`). Lets a client start on
446
+ * ILP-over-HTTP and upgrade to duplex BTP when it becomes a peer or needs
447
+ * server-initiated packets, carrying its HTTP-proven identity across.
448
+ */
449
+ supportsUpgrade?: boolean;
450
+ /**
451
+ * Public Nostr relay WebSocket URL for FREE reads (e.g. `wss://<addr>.anyone/`
452
+ * or `ws://host:7100`). Lets a client discover where to subscribe/read without
453
+ * out-of-band config. Absent when the relay isn't publicly exposed.
454
+ */
455
+ relayUrl?: string;
435
456
  /** Optional BLS HTTP endpoint for direct packet delivery (bootstrap only) */
436
457
  blsHttpEndpoint?: string;
437
458
  /** @deprecated Use supportedChains instead. Kept for backward compatibility. */
@@ -454,6 +475,36 @@ interface IlpPeerInfo {
454
475
  prefixPricing?: {
455
476
  basePrice: string;
456
477
  };
478
+ /** Token pairs this peer can swap, with current rates. Absent = no swap support. */
479
+ swapPairs?: SwapPair[];
480
+ }
481
+ /**
482
+ * Declarative advertisement of a token swap pair supported by a swap-capable peer (Mill).
483
+ *
484
+ * Source and target assets use the same `{blockchain}:{network}[:{chainId}]` chain format
485
+ * as `IlpPeerInfo.supportedChains`. Rate is serialized as a decimal string (not a float) to
486
+ * preserve arbitrary precision — D12-006. Min/max amounts are source-asset micro-unit integer
487
+ * strings that may exceed `Number.MAX_SAFE_INTEGER`; compare via `BigInt`.
488
+ */
489
+ interface SwapPair {
490
+ /** Source asset */
491
+ from: {
492
+ assetCode: string;
493
+ assetScale: number;
494
+ chain: string;
495
+ };
496
+ /** Target asset */
497
+ to: {
498
+ assetCode: string;
499
+ assetScale: number;
500
+ chain: string;
501
+ };
502
+ /** Exchange rate as decimal string (target units per source unit) */
503
+ rate: string;
504
+ /** Minimum swap amount per packet in source asset micro-units (optional) */
505
+ minAmount?: string;
506
+ /** Maximum swap amount per packet in source asset micro-units (optional) */
507
+ maxAmount?: string;
457
508
  }
458
509
  /**
459
510
  * Subscription handle for real-time event updates.
@@ -490,6 +541,14 @@ interface OpenChannelResult {
490
541
  channelId: string;
491
542
  /** Channel status after open request */
492
543
  status: string;
544
+ /**
545
+ * On-chain channel `depositTotal` (base units), read at open time. Only
546
+ * surfaced by the Mina opener: the Mina balance-proof signer must bind
547
+ * `balanceB = depositTotal − balanceA` so the on-chain `claimFromChannel`
548
+ * signatureA check passes (toon-protocol/connector#133). Left undefined by the
549
+ * EVM and Solana openers, which do not need it.
550
+ */
551
+ depositTotal?: bigint;
493
552
  }
494
553
  /**
495
554
  * State of a payment channel from the connector.
@@ -532,9 +591,12 @@ interface ConnectorChannelClient {
532
591
  }
533
592
 
534
593
  /**
535
- * Parsers for ILP-related Nostr events.
594
+ * Chain identifier validation.
595
+ *
596
+ * Shared helper used by `parseIlpPeerInfo` and `swap-pair-validation` to avoid
597
+ * a circular import between `events/parsers.ts` and `events/swap-pair-validation.ts`
598
+ * (Story 12.1 Task 2.2 fallback).
536
599
  */
537
-
538
600
  /**
539
601
  * Validates a chain identifier string.
540
602
  * Valid format: {blockchain}:{network} or {blockchain}:{network}:{chainId}
@@ -544,12 +606,20 @@ interface ConnectorChannelClient {
544
606
  * @returns true if the chain identifier is valid
545
607
  */
546
608
  declare function validateChainId(chainId: string): boolean;
609
+
610
+ /**
611
+ * Parsers for ILP-related Nostr events.
612
+ */
613
+
547
614
  /**
548
615
  * Parses a kind:10032 Nostr event into an IlpPeerInfo object.
549
616
  *
550
617
  * @param event - The Nostr event to parse
551
618
  * @returns The parsed IlpPeerInfo object
552
- * @throws InvalidEventError if the event is malformed or missing required fields
619
+ * @throws {InvalidEventError} if the event is malformed or missing required fields.
620
+ * This includes: malformed JSON, invalid required fields, invalid `feePerByte`,
621
+ * invalid `prefixPricing`, invalid `ilpAddresses`, `swapPairs` not being an array,
622
+ * or any `SwapPair` element failing structural validation (Story 12.1 AC-5).
553
623
  */
554
624
  declare function parseIlpPeerInfo(event: NostrEvent): IlpPeerInfo;
555
625
 
@@ -557,6 +627,16 @@ declare function parseIlpPeerInfo(event: NostrEvent): IlpPeerInfo;
557
627
  * Builders for ILP-related Nostr events.
558
628
  */
559
629
 
630
+ /** Options controlling how a kind:10032 announcement event is built. */
631
+ interface BuildIlpPeerInfoOptions {
632
+ /**
633
+ * NIP-40 time-to-live, in seconds. When set to a positive value, the event
634
+ * carries an `["expiration", created_at + ttlSeconds]` tag so a stale
635
+ * announcement from an offline apex expires instead of lingering forever
636
+ * (issue #261). Omit (or pass a non-positive value) for a non-expiring event.
637
+ */
638
+ ttlSeconds?: number;
639
+ }
560
640
  /**
561
641
  * Builds and signs a kind:10032 Nostr event from IlpPeerInfo data.
562
642
  *
@@ -566,13 +646,49 @@ declare function parseIlpPeerInfo(event: NostrEvent): IlpPeerInfo;
566
646
  *
567
647
  * @param info - The ILP peer info to serialize into the event
568
648
  * @param secretKey - The secret key to sign the event with
649
+ * @param options - Optional build options (e.g. a NIP-40 `ttlSeconds`)
569
650
  * @returns A signed Nostr event
570
651
  *
571
652
  * @throws {ToonError} With code `INVALID_FEE` if `feePerByte` is not a non-negative integer string
572
653
  * @throws {ToonError} With code `ADDRESS_EMPTY_ADDRESSES` if `ilpAddresses` is an empty array
573
654
  * @throws {ToonError} With code `ADDRESS_INVALID_PREFIX` if any element of `ilpAddresses` is invalid
655
+ * @throws {ToonError} With code `INVALID_SWAP_PAIR` if any element of `swapPairs` is structurally invalid
656
+ */
657
+ declare function buildIlpPeerInfoEvent(info: IlpPeerInfo, secretKey: Uint8Array, options?: BuildIlpPeerInfoOptions): NostrEvent;
658
+
659
+ /**
660
+ * NIP-40 expiration-timestamp helpers.
661
+ *
662
+ * A kind:10032 announcement (`ILP_PEER_INFO_KIND`) is a replaceable event: a
663
+ * relay keeps only the latest per author, so a stale announcement from an apex
664
+ * that has since gone offline lingers forever and clients faithfully dial its
665
+ * dead BTP endpoint (issue #261). Stamping the announcement with a NIP-40
666
+ * `["expiration", <unix-seconds>]` tag turns it into a liveness signal: a live
667
+ * apex re-publishes before the tag elapses, and once it stops, NIP-40-aware
668
+ * relays drop the event and discovery skips it.
669
+ */
670
+
671
+ /** Tag name carrying the NIP-40 expiration timestamp (unix seconds). */
672
+ declare const EXPIRATION_TAG = "expiration";
673
+ /**
674
+ * Read the NIP-40 expiration timestamp (unix seconds) from an event's tags.
675
+ *
676
+ * @returns The timestamp, or `undefined` when the event carries no valid
677
+ * `expiration` tag (no tag, non-numeric, or negative value).
678
+ */
679
+ declare function getEventExpiration(event: NostrEvent): number | undefined;
680
+ /**
681
+ * Whether an event has expired per its NIP-40 `expiration` tag.
682
+ *
683
+ * Events with no (or malformed) expiration tag never expire — they return
684
+ * `false`, preserving backward compatibility with announcements published
685
+ * before TTLs existed.
686
+ *
687
+ * @param event - The event to test.
688
+ * @param nowSeconds - Reference time in unix seconds (defaults to now).
689
+ * Injectable for deterministic tests.
574
690
  */
575
- declare function buildIlpPeerInfoEvent(info: IlpPeerInfo, secretKey: Uint8Array): NostrEvent;
691
+ declare function isEventExpired(event: NostrEvent, nowSeconds?: number): boolean;
576
692
 
577
693
  /**
578
694
  * Event builder and parser for kind:10036 Seed Relay List events.
@@ -2353,6 +2469,162 @@ declare function negotiateSettlementChain(requesterChains: string[], responderCh
2353
2469
  */
2354
2470
  declare function resolveTokenForChain(chain: string, requesterPreferredTokens?: Record<string, string>, responderPreferredTokens?: Record<string, string>): string | undefined;
2355
2471
 
2472
+ /**
2473
+ * Shared balance-proof hash helpers — the single source of truth for the
2474
+ * byte/field layout that ALL signers and verifiers across the monorepo depend
2475
+ * on:
2476
+ * - the Mill-side signer (`packages/mill/src/payment-channel-signer.ts`)
2477
+ * - the sender-side settlement verifier (`packages/sdk/src/settlement/{evm,solana,mina}.ts`)
2478
+ * - the client-side balance-proof signers (`packages/client/src/signing/{solana,mina}-signer.ts`)
2479
+ *
2480
+ * Originally extracted from the Mill signer (Story 12.4) into `@toon-protocol/sdk`
2481
+ * (Story 12.6 AC-6). Relocated here to `@toon-protocol/core` so the client can
2482
+ * consume the canonical hashes WITHOUT taking a dependency on `@toon-protocol/sdk`
2483
+ * (the client only depends on core). `@toon-protocol/sdk` re-exports these names
2484
+ * unchanged, so Mill and existing SDK consumers are unaffected.
2485
+ *
2486
+ * Any change to a hash layout here automatically applies to every signer AND
2487
+ * verifier — they cannot drift.
2488
+ *
2489
+ * @module
2490
+ */
2491
+ /**
2492
+ * Convert a hex string (with or without `0x` prefix) to bytes. Rejects
2493
+ * odd-length and non-hex input.
2494
+ */
2495
+ declare function hexToBytes(hex: string): Uint8Array;
2496
+ /**
2497
+ * Encode a non-negative bigint as 32-byte big-endian. Throws if negative or
2498
+ * exceeds 256 bits.
2499
+ */
2500
+ declare function bigintToBytes32BE(x: bigint): Uint8Array;
2501
+ /**
2502
+ * Concat N Uint8Arrays into one new Uint8Array.
2503
+ */
2504
+ declare function concatBytes(...parts: Uint8Array[]): Uint8Array;
2505
+ /**
2506
+ * Compute the EVM balance-proof message hash:
2507
+ * keccak256(channelId || cumulativeAmount(32BE) || nonce(32BE) || recipient)
2508
+ *
2509
+ * `channelIdBytes` MUST be 32 bytes. `recipientBytes` MUST be 20 bytes.
2510
+ * This hash is what `EvmPaymentChannelSigner.signBalanceProof` signs and
2511
+ * what `recoverEvmSignerAddress` recovers against.
2512
+ *
2513
+ * @stable — signer and verifier depend on the exact byte layout.
2514
+ */
2515
+ declare function balanceProofHashEvm(channelIdBytes: Uint8Array, cumulativeAmount: bigint, nonce: bigint, recipientBytes: Uint8Array): Uint8Array;
2516
+ /**
2517
+ * Compute the Solana balance-proof message hash:
2518
+ * sha256(utf8(channelId) || cumulativeAmount(32BE) || nonce(32BE) || utf8(recipient))
2519
+ *
2520
+ * `channelId` and `recipient` are base58-encoded strings (ASCII-subset of
2521
+ * UTF-8). This hash is what `SolanaPaymentChannelSigner.signBalanceProof`
2522
+ * signs and what `verifyEd25519Signature` verifies against.
2523
+ *
2524
+ * @stable — signer and verifier depend on the exact byte layout.
2525
+ */
2526
+ declare function balanceProofHashSolana(channelId: string, cumulativeAmount: bigint, nonce: bigint, recipient: string): Uint8Array;
2527
+ /**
2528
+ * Hash an arbitrary string to a Pallas-field-safe bigint.
2529
+ *
2530
+ * The Pallas base field order is slightly below 2^254, so we take the first
2531
+ * 240 bits (60 hex chars / 30 bytes) of `sha256(utf8(s))` as a conservative,
2532
+ * guaranteed-in-field representation. Used to fold the variable-length
2533
+ * `channelId` / `recipient` strings into the fixed field-element array a Mina
2534
+ * Schnorr signature is computed over.
2535
+ *
2536
+ * @stable — Mill signer and SDK verifier depend on the exact derivation.
2537
+ */
2538
+ declare function minaHashToField(s: string): bigint;
2539
+ /**
2540
+ * Compute the Mina balance-proof field-element message:
2541
+ * [ minaHashToField(channelId),
2542
+ * cumulativeAmount,
2543
+ * nonce,
2544
+ * minaHashToField(recipient) ]
2545
+ *
2546
+ * This is the EXACT `fields` array that the Mill's `MinaPaymentChannelSigner`
2547
+ * passes to `mina-signer`'s `signFields(...)`, and that the sender-side
2548
+ * `verifyMinaSignature` re-derives and passes to `verifyFields(...)`. Keeping
2549
+ * the derivation here (shared across `@toon-protocol/mill`, `@toon-protocol/sdk`,
2550
+ * and `@toon-protocol/client`) prevents signer/verifier drift — mirroring the
2551
+ * EVM/Solana hash helpers above.
2552
+ *
2553
+ * NOTE: this is the Mill↔sender wire contract (a Schnorr signature over four
2554
+ * field elements), NOT the connector's on-chain `MinaPaymentChannelSDK`
2555
+ * Poseidon-commitment proof shape. The two are distinct; see
2556
+ * `packages/sdk/src/settlement/mina.ts` for the relationship + the
2557
+ * remaining on-chain-settlement gap.
2558
+ *
2559
+ * @stable — Mill signer and SDK verifier depend on the exact byte layout.
2560
+ */
2561
+ declare function balanceProofFieldsMina(channelId: string, cumulativeAmount: bigint, nonce: bigint, recipient: string): bigint[];
2562
+
2563
+ /**
2564
+ * Base58 (Bitcoin/Solana alphabet) encode/decode.
2565
+ *
2566
+ * Identical implementation to `@toon-protocol/sdk`'s `identity.ts` helpers —
2567
+ * relocated/duplicated here so `@toon-protocol/core` (and its `client`
2568
+ * consumer) can base58-encode Solana addresses and the Mina base58check
2569
+ * private-key format without depending on the SDK.
2570
+ *
2571
+ * @module
2572
+ */
2573
+ /**
2574
+ * Encodes a byte array to a Base58 string (Bitcoin/Solana alphabet).
2575
+ */
2576
+ declare function base58Encode(bytes: Uint8Array): string;
2577
+ /**
2578
+ * Decodes a Base58 string to a byte array (Bitcoin/Solana alphabet).
2579
+ */
2580
+ declare function base58Decode(str: string): Uint8Array;
2581
+
2582
+ /**
2583
+ * Mina private-key format conversion.
2584
+ *
2585
+ * `deriveFullIdentity()` / `deriveMillKeys()` emit a Mina Pallas scalar as a
2586
+ * big-endian hex string, but `mina-signer`'s `signFields`/`derivePublicKey`
2587
+ * require the Mina base58check (`EK…`) private-key format. This helper bridges
2588
+ * the two so a hex-derived Mina key produces signatures verifiable by the
2589
+ * sender-side `verifyMinaSignature`.
2590
+ *
2591
+ * Mirrors `hexToMinaBase58PrivateKey` in `packages/mill/src/payment-channel-signer.ts`
2592
+ * (same fixed Mina base58check wire standard — version byte `0x5a`, non-zero
2593
+ * tag `0x01`, little-endian scalar, double-sha256 checksum).
2594
+ *
2595
+ * @module
2596
+ */
2597
+ /**
2598
+ * Convert a big-endian 32-byte hex scalar (the form `deriveFullIdentity()`
2599
+ * emits for Mina) into the Mina base58check private-key string mina-signer's
2600
+ * `signFields`/`derivePublicKey` require. If the input already looks like a
2601
+ * base58 `EK…` key it is returned unchanged.
2602
+ *
2603
+ * Layout (pre-checksum): `[0x5a, 0x01, <scalar bytes little-endian>]`, then
2604
+ * append the first 4 bytes of `sha256(sha256(payload))` and base58-encode.
2605
+ */
2606
+ declare function hexToMinaBase58PrivateKey(privateKey: string): string;
2607
+ /**
2608
+ * Derive the Mina base58 (`B62…`) public key for a private-key scalar, using
2609
+ * the optional `mina-signer` peer dep.
2610
+ *
2611
+ * `deriveFullIdentity()` / `deriveMillKeys()` emit only a keccak **hex
2612
+ * placeholder** for the Mina public key — they deliberately avoid pulling
2613
+ * Pallas curve math into derivation. That placeholder is unfundable and is
2614
+ * rejected by Mina GraphQL balance queries, so wallet views that display it
2615
+ * (e.g. the townhouse `/wallet/balances` mill Mina leg) show an unusable hex
2616
+ * string. This resolves the real, fundable `B62…` address when `mina-signer`
2617
+ * is installed.
2618
+ *
2619
+ * Returns `null` (not a throw) when `mina-signer` is absent — a missing
2620
+ * optional peer dep is not an error; callers fall back to the hex placeholder.
2621
+ * The B62 encoding is network-agnostic, so the chosen `network` is irrelevant.
2622
+ *
2623
+ * @param privateKey big-endian hex scalar (as derivation emits) or an
2624
+ * already-base58 `EK…` Mina private key.
2625
+ */
2626
+ declare function deriveMinaPublicKeyBase58(privateKey: string): Promise<string | null>;
2627
+
2356
2628
  /**
2357
2629
  * Bootstrap service for peer discovery and network initialization.
2358
2630
  *
@@ -3270,6 +3542,47 @@ interface ToonNode {
3270
3542
  */
3271
3543
  declare function createToonNode(config: ToonNodeConfig): ToonNode;
3272
3544
 
3545
+ /**
3546
+ * ILP wire-code → connector semantic-reason translation.
3547
+ *
3548
+ * Connector v3.3.2 introduced the contract: its payment-handler adapter
3549
+ * (`payment-handler.js`'s `mapRejectCode()`) takes a SEMANTIC reason key
3550
+ * (e.g. `'internal_error'`) and looks it up in `REJECT_CODE_MAP` to produce
3551
+ * the wire code (`'T00'`). If a caller passes a raw wire code (`'T00'`) it
3552
+ * is not a key in the map, so the connector falls back to the generic
3553
+ * `'F99'` code — collapsing every reject reason regardless of its true
3554
+ * cause.
3555
+ *
3556
+ * The TOON SDK / handlers express rejections via `ctx.reject(ilpCode, msg)`
3557
+ * using ILP wire codes (T00, F00, F02, F03, F04, F06, T04, R00, ...). This
3558
+ * helper inverts the connector's `REJECT_CODE_MAP` so callers can translate
3559
+ * back to the semantic key the connector now expects.
3560
+ *
3561
+ * Source of truth for the connector's accepted keys:
3562
+ * `@toon-protocol/connector` v3.3.3 — `core/payment-handler.ts`'s
3563
+ * `REJECT_CODE_MAP` and the `AcceptedSemanticCode` literal-union it
3564
+ * `satisfies`. v3.3.3 added `unreachable` (F02) and
3565
+ * `insufficient_destination_amount` (F04). The `satisfies` constraint
3566
+ * structurally prevents drift between the published vocabulary and the
3567
+ * wire-code mapping.
3568
+ */
3569
+ /**
3570
+ * Inverse of the connector's `REJECT_CODE_MAP`.
3571
+ *
3572
+ * Maps every ILP wire code the SDK currently emits to a semantic reason
3573
+ * the connector recognises. Codes outside this set fall back to
3574
+ * `'invalid_request'` (`'F00'`) so we still produce a meaningful,
3575
+ * non-`F99` wire code at the far side.
3576
+ */
3577
+ declare const ILP_TO_SEMANTIC: Readonly<Record<string, string>>;
3578
+ /**
3579
+ * Translate an ILP wire code (T00, F00, ...) to the semantic reason the
3580
+ * connector's `mapRejectCode()` expects. Falls back to `'invalid_request'`
3581
+ * for unknown codes — yields `'F00'` at the wire instead of the generic
3582
+ * `'F99'`.
3583
+ */
3584
+ declare function ilpCodeToSemantic(ilpCode: string): string;
3585
+
3273
3586
  /**
3274
3587
  * Mock USDC token configuration for local development (Anvil).
3275
3588
  *
@@ -3360,8 +3673,13 @@ declare const MOCK_USDC_CONFIG: MockUsdcConfig;
3360
3673
  type ChainType = 'evm' | 'solana' | 'mina';
3361
3674
  /**
3362
3675
  * Supported EVM chain preset names (backward-compatible).
3676
+ *
3677
+ * `anvil` is the local-dev chain. `arbitrum-*` and `base-*` are the public
3678
+ * Arbitrum and Base networks used by the network-mode resolver
3679
+ * (see network-profile.ts). Base is the primary EVM chain for single-EVM
3680
+ * nodes; the apex connector and Mill can hold providers for both families.
3363
3681
  */
3364
- type ChainName = 'anvil' | 'arbitrum-sepolia' | 'arbitrum-one';
3682
+ type ChainName = 'anvil' | 'arbitrum-sepolia' | 'arbitrum-one' | 'base-sepolia' | 'base-mainnet';
3365
3683
  /**
3366
3684
  * Supported Solana chain preset names.
3367
3685
  */
@@ -3434,6 +3752,21 @@ interface EVMProviderConfigEntry {
3434
3752
  rpcUrl: string;
3435
3753
  registryAddress: string;
3436
3754
  keyId: string;
3755
+ tokenAddress: string;
3756
+ privateKey?: string;
3757
+ /**
3758
+ * Settlement tuning knobs. The connector reads its GLOBAL settlement
3759
+ * threshold from the first EVM provider carrying `settlementOptions` and
3760
+ * applies that single `threshold` across all chains (EVM/Solana/Mina).
3761
+ * Mirrors the connector's `EVMProviderConfig.settlementOptions` so a custom
3762
+ * provider entry can pass it straight through.
3763
+ */
3764
+ settlementOptions?: {
3765
+ threshold?: string;
3766
+ settlementTimeoutSecs?: number;
3767
+ initialDepositMultiplier?: number;
3768
+ pollingIntervalMs?: number;
3769
+ };
3437
3770
  }
3438
3771
  /**
3439
3772
  * Solana-specific provider configuration entry.
@@ -3576,6 +3909,173 @@ declare function buildSolanaProviderEntry(config: SolanaChainPreset, keyId: stri
3576
3909
  */
3577
3910
  declare function buildMinaProviderEntry(config: MinaChainPreset, keyId?: string): MinaProviderConfigEntry;
3578
3911
 
3912
+ /**
3913
+ * Network-mode resolution for the Townhouse `network` flag.
3914
+ *
3915
+ * A single operator-facing selector — `mainnet | testnet | devnet | custom` —
3916
+ * resolves a coherent multi-chain configuration that is consumed by BOTH:
3917
+ * (`custom` additionally accepts operator RPC URLs via `--evm-url`/`--sol-url`
3918
+ * to point at the project's dev chains — e.g. the Akash-hosted anvil + solana.)
3919
+ *
3920
+ * - the **apex** standalone connector (its `chainProviders` settlement array), and
3921
+ * - the **children** node containers (town/mill), via a small set of env vars the
3922
+ * HS compose template interpolates (`EVM_CHAIN`, `EVM_RPC_URL`, `EVM_CHAIN_ID`,
3923
+ * `EVM_USDC_ADDRESS`, `SOLANA_RPC_URL`, `SOLANA_USDC_MINT`).
3924
+ *
3925
+ * Design notes:
3926
+ * - **All tiers are public.** No tier resolves to a local chain (anvil/lightnet),
3927
+ * so a node never points at an unreachable `localhost` RPC. This is what fixes
3928
+ * the "JsonRpcProvider failed to detect network" boot-loop that left town nodes
3929
+ * permanently disconnected (an empty RPC fell back to the `anvil` preset whose
3930
+ * `localhost:8545` does not exist in the HS network).
3931
+ * - **EVM = Base (primary) + Arbitrum.** The single-EVM town node uses Base; the
3932
+ * apex connector and Mill can hold providers for both families.
3933
+ * - **Settlement status.** TOON's settlement contracts are deployed for the
3934
+ * public **testnet/devnet** tiers (EVM Base Sepolia registry + TokenNetwork,
3935
+ * Solana devnet program, Mina devnet zkApp — source of truth: e2e/testnets.json),
3936
+ * so those families resolve `configured` and the apex builds real
3937
+ * `chainProviders` for them. **Mainnet remains unconfigured** (contracts not
3938
+ * deployed there yet) → relay-only. The resolver only builds a connector
3939
+ * `chainProviders` entry for a family once its on-chain addresses are present.
3940
+ * No addresses are invented; filling the remaining (mainnet) presets later
3941
+ * requires no change here. The deployed testnet/devnet addresses are
3942
+ * maintained in sync with e2e/testnets.json (the one-time public deploy).
3943
+ *
3944
+ * The low-level local `solana-devnet` / `mina-devnet` presets in chain-config.ts
3945
+ * (used by the dev/e2e stack) are intentionally NOT reused — this module defines
3946
+ * the public Solana/Mina endpoints itself.
3947
+ *
3948
+ * @module
3949
+ */
3950
+
3951
+ /** Operator-facing network selector. */
3952
+ type NetworkMode = 'mainnet' | 'testnet' | 'devnet' | 'custom';
3953
+ /** The three preset-derivable public tiers (everything except custom). */
3954
+ type DerivableTier = Exclude<NetworkMode, 'custom'>;
3955
+ /**
3956
+ * Operator-supplied RPC URLs for `network: 'custom'`
3957
+ * (`--evm-url` / `--sol-url`). Use this to point the apex + nodes at the
3958
+ * project's dev chains hosted anywhere — e.g. the anvil + solana that
3959
+ * scripts/akash-deploy.sh deploys to Akash (whose ingress hostnames rotate per
3960
+ * redeploy, so the operator passes the current URLs). The EVM chain is assumed
3961
+ * to be the chain-id 31338 `akash-anvil` deploy (deterministic TOON settlement
3962
+ * contracts → settlement-complete); Solana is RPC + Mock-USDC (relay-only, no
3963
+ * program). For arbitrary real chains with their own contracts, use the full
3964
+ * `customProviders` (chains editor) path instead.
3965
+ */
3966
+ interface CustomEndpoints {
3967
+ /** EVM JSON-RPC URL (the project's anvil deploy). */
3968
+ evmUrl?: string;
3969
+ /** Solana JSON-RPC URL. */
3970
+ solUrl?: string;
3971
+ }
3972
+ /** Per-family settlement readiness, for honest UX. */
3973
+ interface NetworkFamilyStatus {
3974
+ /** `configured` once the family has on-chain settlement addresses for this tier. */
3975
+ evm: 'configured' | 'unconfigured';
3976
+ solana: 'configured' | 'unconfigured';
3977
+ mina: 'configured' | 'unconfigured';
3978
+ }
3979
+ /**
3980
+ * Env vars the HS compose template interpolates into the node containers.
3981
+ * Only keys with real values are present (absent ⇒ compose `${VAR:-}` default).
3982
+ */
3983
+ interface NetworkNodeEnv {
3984
+ /** Primary EVM chain preset name → town `TOON_CHAIN` (`'none'` ⇒ relay-only). */
3985
+ EVM_CHAIN?: string;
3986
+ EVM_RPC_URL?: string;
3987
+ EVM_CHAIN_ID?: string;
3988
+ EVM_USDC_ADDRESS?: string;
3989
+ SOLANA_RPC_URL?: string;
3990
+ SOLANA_USDC_MINT?: string;
3991
+ /** Solana payment-channel program id (filled per-deploy; empty in presets). */
3992
+ SOLANA_PROGRAM_ID?: string;
3993
+ /** Mina payment-channel zkApp address (filled per-deploy; empty in presets). */
3994
+ MINA_ZKAPP_ADDRESS?: string;
3995
+ }
3996
+ /** Resolved network configuration for apex + children. */
3997
+ interface NetworkProfile {
3998
+ network: NetworkMode;
3999
+ /**
4000
+ * Connector `chainProviders` for the apex. Contains only settlement-complete
4001
+ * families (omitted when on-chain addresses are absent — the caller falls back
4002
+ * to its own default in that case).
4003
+ */
4004
+ chainProviders: ChainProviderConfigEntry[];
4005
+ /** Env overlay for the node containers. */
4006
+ nodeEnv: NetworkNodeEnv;
4007
+ /** Per-family settlement readiness. */
4008
+ status: NetworkFamilyStatus;
4009
+ }
4010
+ /** Sentinel for the town node meaning "no EVM settlement chain — run relay-only". */
4011
+ declare const RELAY_ONLY_CHAIN = "none";
4012
+ /**
4013
+ * Resolve a {@link NetworkProfile} from a network mode.
4014
+ *
4015
+ * @param network - The operator-selected network mode.
4016
+ * @param opts.keyId - Settlement signing key for connector `chainProviders`
4017
+ * entries. Required to emit settlement-complete providers; omit for the common
4018
+ * relay-only case (no providers are built without it).
4019
+ * @param opts.customProviders - For `network: 'custom'`, the operator-supplied
4020
+ * `chainProviders` to pass through verbatim (and to derive node env from).
4021
+ * @param opts.endpoints - For `network: 'custom'`, operator-supplied RPC URLs
4022
+ * (`--evm-url` / `--sol-url`) pointing at the project's dev chains. Used when
4023
+ * `customProviders` is empty (the lightweight URL-only path).
4024
+ */
4025
+ declare function resolveNetworkProfile(network: NetworkMode, opts?: {
4026
+ keyId?: string;
4027
+ customProviders?: ChainProviderConfigEntry[];
4028
+ endpoints?: CustomEndpoints;
4029
+ }): NetworkProfile;
4030
+ /**
4031
+ * Client-facing per-chain settlement presets resolved from a network mode.
4032
+ *
4033
+ * Where {@link NetworkProfile} targets the apex connector + node containers
4034
+ * (env overlay + `chainProviders`), this targets the @toon-protocol/client
4035
+ * `ToonClientConfig` shape: identifier-keyed maps (`evm:<name>:<chainId>`,
4036
+ * `solana:<cluster>`, `mina:<network>`) plus the Solana/Mina channel params.
4037
+ * It draws from the SAME presets (`CHAIN_PRESETS`, `SOLANA_TIER`, `MINA_TIER`),
4038
+ * so node and client default to the identical live contracts — no duplicated
4039
+ * address tables in the client package.
4040
+ *
4041
+ * Only `mainnet | testnet | devnet` are resolvable here; `custom` is the
4042
+ * client's fully-manual path and is intentionally not handled.
4043
+ */
4044
+ interface ClientNetworkPresets {
4045
+ /** Chain identifiers (`evm:base:84532`, `solana:devnet`, `mina:devnet`). */
4046
+ supportedChains: string[];
4047
+ /** identifier → JSON-RPC / GraphQL URL. */
4048
+ chainRpcUrls: Record<string, string>;
4049
+ /** identifier → preferred token (USDC / SPL mint) address. */
4050
+ preferredTokens: Record<string, string>;
4051
+ /** identifier → EVM TokenNetwork contract address (EVM only). */
4052
+ tokenNetworks: Record<string, string>;
4053
+ /** Solana channel params (rpcUrl + programId + tokenMint), if deployed. */
4054
+ solanaChannel?: {
4055
+ rpcUrl: string;
4056
+ programId: string;
4057
+ tokenMint?: string;
4058
+ };
4059
+ /** Mina channel params (graphqlUrl + zkAppAddress + networkId), if deployed. */
4060
+ minaChannel?: {
4061
+ graphqlUrl: string;
4062
+ zkAppAddress: string;
4063
+ networkId: 'devnet' | 'mainnet';
4064
+ };
4065
+ /** Per-family settlement readiness (mirrors the node). */
4066
+ status: NetworkFamilyStatus;
4067
+ }
4068
+ /**
4069
+ * Resolve {@link ClientNetworkPresets} for a derivable network tier.
4070
+ *
4071
+ * Mirrors {@link resolveNetworkProfile}'s address sourcing but emits the
4072
+ * client config shape. The EVM family is the tier's primary chain (Base);
4073
+ * Solana/Mina are the public tier endpoints. Only families with deployed TOON
4074
+ * contracts contribute settlement maps + channel params (others stay relay-only
4075
+ * and are reported `unconfigured`).
4076
+ */
4077
+ declare function resolveClientNetwork(network: DerivableTier): ClientNetworkPresets;
4078
+
3579
4079
  /**
3580
4080
  * Shared ILP PREPARE packet construction for the TOON protocol.
3581
4081
  *
@@ -4024,4 +4524,4 @@ declare function createLogger(config: LoggerConfig): Logger;
4024
4524
  */
4025
4525
  declare const VERSION = "0.1.0";
4026
4526
 
4027
- export { AddressRegistry, type AgentRuntimeClient, ArDrivePeerRegistry, AttestationBootstrap, type AttestationBootstrapConfig, type AttestationBootstrapEvent, type AttestationBootstrapEventListener, type AttestationBootstrapResult, type AttestationEventOptions, AttestationState, AttestationVerifier, type AttestationVerifierConfig, type AttestedResultVerificationOptions, type AttestedResultVerificationResult, AttestedResultVerifier, BLOB_STORAGE_REQUEST_KIND, BLOB_STORAGE_RESULT_KIND, type BlobStorageRequestParams, type BootstrapConfig, BootstrapError, type BootstrapEvent, type BootstrapEventListener, type BootstrapPhase, type BootstrapResult, BootstrapService, type BootstrapServiceConfig, type BtpHandshakeExtension, type BuildIlpPrepareParams, CHAIN_PRESETS, type CalculateRouteAmountParams, type ChainName, type ChainPreset, type ChainProviderConfigEntry, type ChainType, type ChannelState, type ConnectorAdminClient, type ConnectorAdminLike, type ConnectorChannelClient, type ConnectorChannelLike, type ConnectorNodeLike, type DeriveFromKmsSeedOptions, type DeterminismReport, type DirectRuntimeClientConfig, type DiscoveredPeer, type DiscoveryTracker, type DiscoveryTrackerConfig, type DvmJobStatus, type EVMProviderConfigEntry, type EmbeddableConnectorLike, type ForbiddenPattern, type GenesisPeer, GenesisPeerLoader, type HandlePacketAcceptResponse, type HandlePacketRejectResponse, type HandlePacketRequest, type HandlePacketResponse, ILP_PEER_INFO_KIND, ILP_ROOT_PREFIX, IMAGE_GENERATION_KIND, type IlpClient, type IlpPeerInfo, type IlpPreparePacket, type IlpSendResult, JOB_FEEDBACK_KIND, JOB_REQUEST_KIND_BASE, JOB_RESULT_KIND_BASE, JOB_REVIEW_KIND, type JobFeedbackParams, type JobRequestParams, type JobResultParams, type JobReviewParams, KmsIdentityError, type KmsKeypair, type KnownPeer, type LogEntry, type LogLevel, type Logger, type LoggerConfig, MINA_CHAIN_PRESETS, MOCK_USDC_ADDRESS, MOCK_USDC_CONFIG, type MinaChainName, type MinaChainPreset, type MinaProviderConfigEntry, type MockUsdcConfig, type MultiChainName, type NixBuildResult, NixBuilder, type NixBuilderConfig, NostrPeerDiscovery, type OpenChannelParams, type OpenChannelResult, PET_INTERACTION_EVENT_KIND, PET_INTERACTION_REQUEST_KIND, PET_INTERACTION_RESULT_KIND, PREFIX_CLAIM_KIND, PREFIX_GRANT_KIND, type PacketHandler, type ParsedAttestation, type ParsedBlobStorageRequest, type ParsedJobFeedback, type ParsedJobRequest, type ParsedJobResult, type ParsedJobReview, type ParsedSwarmRequest, type ParsedSwarmSelection, type ParsedWorkflowDefinition, type ParsedWotDeclaration, PcrReproducibilityError, type PcrReproducibilityResult, type PeerDescriptor, type PrefixClaimContent, type PrefixGrantContent, type PrefixValidationResult, type PublishSeedRelayConfig, type RegisterPeerParams, type ReputationScore, ReputationScoreCalculator, type ReputationSignals, type ResolveRouteFeesParams, type ResolveRouteFeesResult, SEED_RELAY_LIST_KIND, SERVICE_DISCOVERY_KIND, SOLANA_CHAIN_PRESETS, SeedRelayDiscovery, type SeedRelayDiscoveryConfig, type SeedRelayDiscoveryResult, type SeedRelayEntry, type SendPacketParams, type SendPacketResult, type ServiceDiscoveryContent, type SettlementConfig, type SkillDescriptor, type SocialDiscoveryEvent, type SocialDiscoveryEventListener, SocialPeerDiscovery, type SocialPeerDiscoveryConfig, type SolanaChainName, type SolanaChainPreset, type SolanaProviderConfigEntry, type Subscription, type SwarmRequestParams, type SwarmSelectionParams, TEE_ATTESTATION_KIND, TEXT_GENERATION_KIND, TEXT_TO_SPEECH_KIND, TRANSLATION_KIND, type TeeAttestation, ToonError, type ToonNode, type ToonNodeConfig, type ToonNodeStartResult, USDC_DECIMALS, USDC_NAME, USDC_SYMBOL, VERSION, type VerificationResult, type VerifyOptions, type Violation, WEB_OF_TRUST_KIND, WORKFLOW_CHAIN_KIND, type WorkflowDefinitionParams, type WorkflowStep, type WotDeclarationParams, analyzeDockerfileForNonDeterminism, assignAddressFromHandshake, buildAttestationEvent, buildBlobStorageRequest, buildEip712Domain, buildEvmProviderEntry, buildIlpPeerInfoEvent, buildIlpPrepare, buildJobFeedbackEvent, buildJobRequestEvent, buildJobResultEvent, buildJobReviewEvent, buildMinaProviderEntry, buildPrefixClaimEvent, buildPrefixGrantEvent, buildPrefixHandshakeData, buildSeedRelayListEvent, buildServiceDiscoveryEvent, buildSolanaProviderEntry, buildSwarmRequestEvent, buildSwarmSelectionEvent, buildWorkflowDefinitionEvent, buildWotDeclarationEvent, calculateRouteAmount, checkAddressCollision, createAgentRuntimeClient, createDirectChannelClient, createDirectConnectorAdmin, createDirectIlpClient, createDirectRuntimeClient, createDiscoveryTracker, createHttpChannelClient, createHttpConnectorAdmin, createHttpIlpClient$1 as createHttpIlpClient, createHttpRuntimeClient, createHttpIlpClient as createHttpRuntimeClientV2, createLogger, createToonNode, deriveChildAddress, deriveFromKmsSeed, extractPrefixFromHandshake, hasMinReputation, hasRequireAttestation, isGenesisNode, isValidIlpAddressStructure, negotiateSettlementChain, parseAttestation, parseBlobStorageRequest, parseIlpPeerInfo, parseJobFeedback, parseJobRequest, parseJobResult, parseJobReview, parsePrefixClaimEvent, parsePrefixGrantEvent, parseSeedRelayList, parseServiceDiscovery, parseSwarmRequest, parseSwarmSelection, parseWorkflowDefinition, parseWotDeclaration, publishSeedRelayEntry, readDockerfileNix, resolveChainConfig, resolveMinaChainConfig, resolveRouteFees, resolveSolanaChainConfig, resolveTokenForChain, validateChainId, validateIlpAddress, validatePrefix, validatePrefixConsistency, verifyPcrReproducibility };
4527
+ export { AddressRegistry, type AgentRuntimeClient, ArDrivePeerRegistry, AttestationBootstrap, type AttestationBootstrapConfig, type AttestationBootstrapEvent, type AttestationBootstrapEventListener, type AttestationBootstrapResult, type AttestationEventOptions, AttestationState, AttestationVerifier, type AttestationVerifierConfig, type AttestedResultVerificationOptions, type AttestedResultVerificationResult, AttestedResultVerifier, BLOB_STORAGE_REQUEST_KIND, BLOB_STORAGE_RESULT_KIND, type BlobStorageRequestParams, type BootstrapConfig, BootstrapError, type BootstrapEvent, type BootstrapEventListener, type BootstrapPhase, type BootstrapResult, BootstrapService, type BootstrapServiceConfig, type BtpHandshakeExtension, type BuildIlpPeerInfoOptions, type BuildIlpPrepareParams, CHAIN_PRESETS, type CalculateRouteAmountParams, type ChainName, type ChainPreset, type ChainProviderConfigEntry, type ChainType, type ChannelState, type ClientNetworkPresets, type ConnectorAdminClient, type ConnectorAdminLike, type ConnectorChannelClient, type ConnectorChannelLike, type ConnectorNodeLike, type CustomEndpoints, type DeriveFromKmsSeedOptions, type DeterminismReport, type DirectRuntimeClientConfig, type DiscoveredPeer, type DiscoveryTracker, type DiscoveryTrackerConfig, type DvmJobStatus, type EVMProviderConfigEntry, EXPIRATION_TAG, type EmbeddableConnectorLike, type ForbiddenPattern, type GenesisPeer, GenesisPeerLoader, type HandlePacketAcceptResponse, type HandlePacketRejectResponse, type HandlePacketRequest, type HandlePacketResponse, ILP_PEER_INFO_KIND, ILP_ROOT_PREFIX, ILP_TO_SEMANTIC, IMAGE_GENERATION_KIND, type IlpClient, type IlpPeerInfo, type IlpPreparePacket, type IlpSendResult, JOB_FEEDBACK_KIND, JOB_REQUEST_KIND_BASE, JOB_RESULT_KIND_BASE, JOB_REVIEW_KIND, type JobFeedbackParams, type JobRequestParams, type JobResultParams, type JobReviewParams, KmsIdentityError, type KmsKeypair, type KnownPeer, type LogEntry, type LogLevel, type Logger, type LoggerConfig, MINA_CHAIN_PRESETS, MOCK_USDC_ADDRESS, MOCK_USDC_CONFIG, type MinaChainName, type MinaChainPreset, type MinaProviderConfigEntry, type MockUsdcConfig, type MultiChainName, type NetworkFamilyStatus, type NetworkMode, type NetworkNodeEnv, type NetworkProfile, type NixBuildResult, NixBuilder, type NixBuilderConfig, NostrPeerDiscovery, type OpenChannelParams, type OpenChannelResult, PET_INTERACTION_EVENT_KIND, PET_INTERACTION_REQUEST_KIND, PET_INTERACTION_RESULT_KIND, PREFIX_CLAIM_KIND, PREFIX_GRANT_KIND, type PacketHandler, type ParsedAttestation, type ParsedBlobStorageRequest, type ParsedJobFeedback, type ParsedJobRequest, type ParsedJobResult, type ParsedJobReview, type ParsedSwarmRequest, type ParsedSwarmSelection, type ParsedWorkflowDefinition, type ParsedWotDeclaration, PcrReproducibilityError, type PcrReproducibilityResult, type PeerDescriptor, type PrefixClaimContent, type PrefixGrantContent, type PrefixValidationResult, type PublishSeedRelayConfig, RELAY_ONLY_CHAIN, type RegisterPeerParams, type ReputationScore, ReputationScoreCalculator, type ReputationSignals, type ResolveRouteFeesParams, type ResolveRouteFeesResult, SEED_RELAY_LIST_KIND, SERVICE_DISCOVERY_KIND, SOLANA_CHAIN_PRESETS, SeedRelayDiscovery, type SeedRelayDiscoveryConfig, type SeedRelayDiscoveryResult, type SeedRelayEntry, type SendPacketParams, type SendPacketResult, type ServiceDiscoveryContent, type SettlementConfig, type SkillDescriptor, type SocialDiscoveryEvent, type SocialDiscoveryEventListener, SocialPeerDiscovery, type SocialPeerDiscoveryConfig, type SolanaChainName, type SolanaChainPreset, type SolanaProviderConfigEntry, type Subscription, type SwapPair, type SwarmRequestParams, type SwarmSelectionParams, TEE_ATTESTATION_KIND, TEXT_GENERATION_KIND, TEXT_TO_SPEECH_KIND, TRANSLATION_KIND, type TeeAttestation, ToonError, type ToonNode, type ToonNodeConfig, type ToonNodeStartResult, USDC_DECIMALS, USDC_NAME, USDC_SYMBOL, VERSION, type VerificationResult, type VerifyOptions, type Violation, WEB_OF_TRUST_KIND, WORKFLOW_CHAIN_KIND, type WorkflowDefinitionParams, type WorkflowStep, type WotDeclarationParams, analyzeDockerfileForNonDeterminism, assignAddressFromHandshake, balanceProofFieldsMina, balanceProofHashEvm, balanceProofHashSolana, base58Decode, base58Encode, bigintToBytes32BE, buildAttestationEvent, buildBlobStorageRequest, buildEip712Domain, buildEvmProviderEntry, buildIlpPeerInfoEvent, buildIlpPrepare, buildJobFeedbackEvent, buildJobRequestEvent, buildJobResultEvent, buildJobReviewEvent, buildMinaProviderEntry, buildPrefixClaimEvent, buildPrefixGrantEvent, buildPrefixHandshakeData, buildSeedRelayListEvent, buildServiceDiscoveryEvent, buildSolanaProviderEntry, buildSwarmRequestEvent, buildSwarmSelectionEvent, buildWorkflowDefinitionEvent, buildWotDeclarationEvent, calculateRouteAmount, checkAddressCollision, concatBytes, createAgentRuntimeClient, createDirectChannelClient, createDirectConnectorAdmin, createDirectIlpClient, createDirectRuntimeClient, createDiscoveryTracker, createHttpChannelClient, createHttpConnectorAdmin, createHttpIlpClient$1 as createHttpIlpClient, createHttpRuntimeClient, createHttpIlpClient as createHttpRuntimeClientV2, createLogger, createToonNode, deriveChildAddress, deriveFromKmsSeed, deriveMinaPublicKeyBase58, extractPrefixFromHandshake, getEventExpiration, hasMinReputation, hasRequireAttestation, hexToBytes, hexToMinaBase58PrivateKey, ilpCodeToSemantic, isEventExpired, isGenesisNode, isValidIlpAddressStructure, minaHashToField, negotiateSettlementChain, parseAttestation, parseBlobStorageRequest, parseIlpPeerInfo, parseJobFeedback, parseJobRequest, parseJobResult, parseJobReview, parsePrefixClaimEvent, parsePrefixGrantEvent, parseSeedRelayList, parseServiceDiscovery, parseSwarmRequest, parseSwarmSelection, parseWorkflowDefinition, parseWotDeclaration, publishSeedRelayEntry, readDockerfileNix, resolveChainConfig, resolveClientNetwork, resolveMinaChainConfig, resolveNetworkProfile, resolveRouteFees, resolveSolanaChainConfig, resolveTokenForChain, validateChainId, validateIlpAddress, validatePrefix, validatePrefixConsistency, verifyPcrReproducibility };