> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# routes: Encoding, Sauce calls and nesting

> Encoding, Sauce calls and nesting: 50 exports of the routes module of @eco-incorp/sauce, including denormalizeToEvm, encodeIntent, encodeReward, encodeRewardEvm, encodeRewardSvm, encodeRoute.

The `routes` namespace packages a Sauce program as an Eco intent. `Base(body, options)` and the other chain globals (installed by importing the root package) forward to `routes.openRoute(destination, body, options)`, which returns a `PendingSauceRoute`; `.nest(...)` adds child intents and `.reward(...)` returns a `BuiltIntent`.

```typescript theme={null}
import { routes } from "@eco-incorp/sauce";
```

This page covers `sdk/dist/routes/encode.d.ts`, `sdk/dist/routes/sauce-calls.d.ts`, `sdk/dist/routes/nest.d.ts`.

<Note>
  Generated from the type declarations shipped in `@eco-incorp/sauce` 0.99.4. Each entry shows the package authors' JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see [architecture and deployments](/programmable-transactions/sauce/architecture-and-deployments).
</Note>

### `routes.denormalizeToEvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Narrows a 32-byte `UniversalAddress` to a 20-byte EVM address. Throws
(rather than silently truncating) if the leading 12 bytes aren't zero - that shape means the address is not EVM-representable (e.g. a real SVM
pubkey), and truncating it would produce a plausible-looking but wrong hash.

```typescript theme={null}
export declare function denormalizeToEvm(u: UniversalAddress): Hex;
```

### `routes.encodeIntent`

*Function* · `sdk/dist/routes/encode.d.ts`

Encodes an `Intent`'s route (for `intent.destination`) and reward (for `intent.sourceChainId`).

```typescript theme={null}
export declare function encodeIntent(intent: Intent): {
    route: Hex;
    reward: Hex;
};
```

### `routes.encodeReward`

*Function* · `sdk/dist/routes/encode.d.ts`

Encodes a `Reward` for the given chain, forking by `ChainKind`.

```typescript theme={null}
export declare function encodeReward(reward: Reward, chain: ChainKindRef): Hex;
```

### `routes.encodeRewardEvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Encodes a `Reward` for an EVM (or TVM) source via the deployed Portal ABI shape.

```typescript theme={null}
export declare function encodeRewardEvm(reward: Reward): Hex;
```

### `routes.encodeRewardSvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Encodes a `Reward` for an SVM source via the Portal IDL's Borsh layout.

```typescript theme={null}
export declare function encodeRewardSvm(reward: Reward): Hex;
```

### `routes.encodeRoute`

*Function* · `sdk/dist/routes/encode.d.ts`

Encodes a `Route` for the given chain, forking by `ChainKind`.

```typescript theme={null}
export declare function encodeRoute(route: Route, chain: ChainKindRef): Hex;
```

### `routes.encodeRouteEvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Encodes a `Route` for an EVM (or TVM) destination via the deployed Portal ABI shape.

```typescript theme={null}
export declare function encodeRouteEvm(route: Route): Hex;
```

### `routes.encodeRouteSvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Encodes a `Route` for an SVM destination via the Portal IDL's Borsh layout.

```typescript theme={null}
export declare function encodeRouteSvm(route: Route): Hex;
```

### `routes.decodeReward`

*Function* · `sdk/dist/routes/encode.d.ts`

Decodes a `Reward` for the given chain, forking by `ChainKind`.

```typescript theme={null}
export declare function decodeReward(encoded: Hex, chain: ChainKindRef): Reward;
```

### `routes.decodeRewardEvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Decodes a `Reward` previously produced by `encodeRewardEvm`, re-normalizing addresses back to 32-byte form.

```typescript theme={null}
export declare function decodeRewardEvm(encoded: Hex): Reward;
```

### `routes.decodeRewardSvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Decodes a `Reward` previously produced by `encodeRewardSvm`.

```typescript theme={null}
export declare function decodeRewardSvm(encoded: Hex): Reward;
```

### `routes.decodeRoute`

*Function* · `sdk/dist/routes/encode.d.ts`

Decodes a `Route` for the given chain, forking by `ChainKind`.

```typescript theme={null}
export declare function decodeRoute(encoded: Hex, chain: ChainKindRef): Route;
```

### `routes.decodeRouteEvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Decodes a `Route` previously produced by `encodeRouteEvm`, re-normalizing addresses back to 32-byte form.

```typescript theme={null}
export declare function decodeRouteEvm(encoded: Hex): Route;
```

### `routes.decodeRouteSvm`

*Function* · `sdk/dist/routes/encode.d.ts`

Decodes a `Route` previously produced by `encodeRouteSvm`. `calls[].value` is reconstituted as `0n`.

```typescript theme={null}
export declare function decodeRouteSvm(encoded: Hex): Route;
```

### `routes.hashIntent`

*Function* · `sdk/dist/routes/encode.d.ts`

Computes the eco-routes intent hash: `keccak256(abi.encodePacked(uint64
destination, bytes32 routeHash, bytes32 rewardHash))`, with the route
encoded for `intent.destination`'s kind and the reward encoded for
`intent.sourceChainId`'s kind - the asymmetry that makes a cross-VM
(e.g. EVM source -> SVM destination) leg hash correctly.

```typescript theme={null}
export declare function hashIntent(intent: Intent): IntentHashes;
```

### `routes.kindOf`

*Function* · `sdk/dist/routes/encode.d.ts`

Resolves a `ChainKindRef` to a `ChainKind`. An explicit `"evm"`/`"svm"`
literal is returned as-is (the escape hatch for a chain id not yet in the
canonical registry). Anything else is looked up via `requireChain`, which
THROWS for an unregistered id - this never silently defaults to `"evm"`.

```typescript theme={null}
export declare function kindOf(ref: ChainKindRef): ChainKind;
```

### `routes.rewardHash`

*Function* · `sdk/dist/routes/encode.d.ts`

`keccak256(encodeReward(reward, source))`.

```typescript theme={null}
export declare function rewardHash(reward: Reward, source: ChainKindRef): Hex;
```

### `routes.routeHash`

*Function* · `sdk/dist/routes/encode.d.ts`

`keccak256(encodeRoute(route, destination))`.

```typescript theme={null}
export declare function routeHash(route: Route, destination: ChainKindRef): Hex;
```

### `routes.EVM_ROUTE_PARAM`

*Variable* · `sdk/dist/routes/encode.d.ts`

The deployed Portal `Route` tuple shape (`fulfillAndProve.inputs[1]`).

```typescript theme={null}
EVM_ROUTE_PARAM: {
    readonly name: "route";
    readonly type: "tuple";
    readonly components: readonly [
        {
            readonly name: "salt";
            readonly type: "bytes32";
        },
        {
            readonly name: "deadline";
            readonly type: "uint64";
        },
        {
            readonly name: "portal";
            readonly type: "address";
        },
        {
            readonly name: "nativeAmount";
            readonly type: "uint256";
        },
        {
            readonly name: "tokens";
            readonly type: "tuple[]";
            readonly components: readonly [
                {
                    readonly name: "token";
                    readonly type: "address";
                },
                {
                    readonly name: "amount";
                    readonly type: "uint256";
                }
            ];
        },
        {
            readonly name: "calls";
            readonly type: "tuple[]";
            readonly components: readonly [
                {
                    readonly name: "target";
                    readonly type: "address";
                },
                {
                    readonly name: "data";
                    readonly type: "bytes";
                },
                {
                    readonly name: "value";
                    readonly type: "uint256";
                }
            ];
        }
    ];
}
```

### `routes.EVM_REWARD_PARAM`

*Variable* · `sdk/dist/routes/encode.d.ts`

The deployed Portal `Reward` tuple shape (`publish.inputs[2]`).

```typescript theme={null}
EVM_REWARD_PARAM: {
    readonly name: "reward";
    readonly type: "tuple";
    readonly components: readonly [
        {
            readonly name: "deadline";
            readonly type: "uint64";
        },
        {
            readonly name: "creator";
            readonly type: "address";
        },
        {
            readonly name: "prover";
            readonly type: "address";
        },
        {
            readonly name: "nativeAmount";
            readonly type: "uint256";
        },
        {
            readonly name: "tokens";
            readonly type: "tuple[]";
            readonly components: readonly [
                {
                    readonly name: "token";
                    readonly type: "address";
                },
                {
                    readonly name: "amount";
                    readonly type: "uint256";
                }
            ];
        }
    ];
}
```

### `routes.svmCallCodec`

*Variable* · `sdk/dist/routes/encode.d.ts`

Portal IDL `Call { target: Bytes32, data: bytes }` - NO `value` field.

```typescript theme={null}
svmCallCodec: import("@solana/kit").VariableSizeCodec<{
    target: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    data: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
}, {
    target: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    data: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
} & {
    target: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    data: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
}>
```

### `routes.svmRewardCodec`

*Variable* · `sdk/dist/routes/encode.d.ts`

Portal IDL `Reward { deadline, creator, prover, native_amount, tokens }`, field order per the IDL.

```typescript theme={null}
svmRewardCodec: import("@solana/kit").VariableSizeCodec<{
    deadline: number | bigint;
    creator: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    prover: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    nativeAmount: number | bigint;
    tokens: {
        token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: number | bigint;
    }[];
}, {
    deadline: bigint;
    creator: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    prover: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    nativeAmount: bigint;
    tokens: ({
        token: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: bigint;
    } & {
        token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: number | bigint;
    })[];
} & {
    deadline: number | bigint;
    creator: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    prover: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    nativeAmount: number | bigint;
    tokens: {
        token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: number | bigint;
    }[];
}>
```

### `routes.svmRouteCodec`

*Variable* · `sdk/dist/routes/encode.d.ts`

Portal IDL `Route { salt, deadline, portal, native_amount, tokens, calls }`, field order per the IDL.

```typescript theme={null}
svmRouteCodec: import("@solana/kit").VariableSizeCodec<{
    salt: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    deadline: number | bigint;
    portal: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    nativeAmount: number | bigint;
    tokens: {
        token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: number | bigint;
    }[];
    calls: {
        target: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        data: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    }[];
}, {
    salt: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    deadline: bigint;
    portal: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    nativeAmount: bigint;
    tokens: ({
        token: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: bigint;
    } & {
        token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: number | bigint;
    })[];
    calls: ({
        target: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        data: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    } & {
        target: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        data: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    })[];
} & {
    salt: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    deadline: number | bigint;
    portal: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    nativeAmount: number | bigint;
    tokens: {
        token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        amount: number | bigint;
    }[];
    calls: {
        target: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
        data: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    }[];
}>
```

### `routes.svmTokenAmountCodec`

*Variable* · `sdk/dist/routes/encode.d.ts`

Portal IDL `TokenAmount { token: Bytes32, amount: u64 }`.

```typescript theme={null}
svmTokenAmountCodec: import("@solana/kit").FixedSizeCodec<{
    token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    amount: number | bigint;
}, {
    token: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    amount: bigint;
} & {
    token: Uint8Array<ArrayBufferLike> | import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
    amount: number | bigint;
}>
```

### `routes.ChainKindRef`

*Type* · `sdk/dist/routes/encode.d.ts`

Anything that can select which encoding fork to use: an explicit kind, or anything `resolveChain` accepts - including a native `bigint` chain id (eco-routes `Intent.destination`/`sourceChainId` are bigint), so a
caller can pass those straight through without a silent evm mis-classification.

```typescript theme={null}
export type ChainKindRef = ChainKind | number | bigint | string | CanonicalChain;
```

### `routes.IntentHashes`

*Interface* · `sdk/dist/routes/encode.d.ts`

```typescript theme={null}
export interface IntentHashes {
    readonly intentHash: Hex;
    readonly routeHash: Hex;
    readonly rewardHash: Hex;
}
```

### `routes.assertSauceEvmLive`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

* @deprecated This checks the historical roster only. Verify pinned release code on chain.

```typescript theme={null}
export declare function assertSauceEvmLive(chainId: number): V12Deployment;
```

### `routes.buildSauceCall`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

Forks on `kindOf(chain)` (bigint-aware; throws for an unregistered chain id rather than
defaulting to evm) to build one Sauce-executing `Call` for either engine.

```typescript theme={null}
export declare function buildSauceCall(chain: ChainKindRef, params: SauceEvmCallParams | SauceSvmCallParams): CallInput;
```

### `routes.buildSauceCalls`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

Plural fork of `buildSauceCall`.

```typescript theme={null}
export declare function buildSauceCalls(chain: ChainKindRef, params: SauceEvmCallsParams | SauceSvmCallsParams): CallInput[];
```

### `routes.buildSauceEvmCall`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

One `cook(engine, program)` call on `pot`. `data` is produced by `v12Pot.encodeCook` - the exact
EVM engine encoder, not re-implemented here.

```typescript theme={null}
export declare function buildSauceEvmCall(params: SauceEvmCallParams): CallInput;
```

### `routes.buildSauceEvmCalls`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

One `Call` per element of `cooks`, in the given order, all targeting the same `pot`.

```typescript theme={null}
export declare function buildSauceEvmCalls(params: SauceEvmCallsParams): CallInput[];
```

### `routes.buildSauceSvmCall`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

Builds ONE staged SVM route call. Merges account flags within its own instruction only - use
`buildSauceSvmCalls` for the cross-call merge over a whole leg.

```typescript theme={null}
export declare function buildSauceSvmCall(params: SauceSvmCallParams): CallInput;
```

### `routes.buildSauceSvmCalls`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

RECOMMENDED entry point: builds one staged route call per `executions` element, with account
flags OR-merged across the whole leg by default.

```typescript theme={null}
export declare function buildSauceSvmCalls(params: SauceSvmCallsParams): CallInput[];
```

### `routes.mergeSvmAccountFlags`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

Cross-call OR-merge of `isSigner`/`isWritable` per pubkey across every given instruction's
accounts - the Solana runtime dedupes a repeated pubkey in one transaction to the union of its
flags, so a leg's own two staged calls (e.g. swap half + settle half) sharing an account must
agree on the more-permissive flags before either is built, not just within itself.

```typescript theme={null}
export declare function mergeSvmAccountFlags(instructions: readonly {
    accounts: readonly SauceSvmAccountMeta[];
}[]): Map<string, {
    isSigner: boolean;
    isWritable: boolean;
}>;
```

### `routes.sauceEvmDeployPotCall`

*Function* · `sdk/dist/routes/sauce-calls.d.ts`

The leading `deployPot(owner, salt)` call a solver issues before its first `cook()` on a Pot that
may not exist yet.

Supply `kitchen` explicitly or use `chainId` to select the pinned release Kitchen. The chain
roster is historical; this helper does no RPC or current deployment verification.

```typescript theme={null}
export declare function sauceEvmDeployPotCall(params: SauceEvmDeployPotCallParams): CallInput;
```

### `routes.SauceEvmCallParams`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

Verbatim re-export - sizing advice only, emits zero instructions. See the module doc above.

```typescript theme={null}
export interface SauceEvmCallParams {
    pot: AddressInput;
    engine: AddressInput;
    program: Hex;
    value?: bigint | number | string;
}
```

### `routes.SauceEvmCallsParams`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

```typescript theme={null}
export interface SauceEvmCallsParams {
    pot: AddressInput;
    engine: AddressInput;
    cooks: readonly Hex[];
    value?: bigint | number | string;
}
```

### `routes.SauceEvmDeployPotCallParams`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

```typescript theme={null}
export interface SauceEvmDeployPotCallParams {
    owner: AddressInput;
    salt: Hex;
    kitchen?: AddressInput;
    chainId?: number;
}
```

### `routes.SauceSvmAccountMeta`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

One account meta as the caller supplies it - pre-merge, pre-executor-flattening.

```typescript theme={null}
export interface SauceSvmAccountMeta {
    pubkey: SvmAddressInput;
    isSigner: boolean;
    isWritable: boolean;
}
```

### `routes.SauceSvmCallParams`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

```typescript theme={null}
export interface SauceSvmCallParams extends SauceSvmExecution {
    programId?: SvmAddressInput;
    executor?: SvmAddressInput;
}
```

### `routes.SauceSvmCallsParams`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

```typescript theme={null}
export interface SauceSvmCallsParams {
    programId?: SvmAddressInput;
    executions: readonly SauceSvmExecution[];
    executor?: SvmAddressInput;
    mergeAccountFlags?: boolean;
}
```

### `routes.SauceSvmExecution`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

```typescript theme={null}
export interface SauceSvmExecution extends StagedBufferRef {
    accounts: readonly SauceSvmAccountMeta[];
    value?: bigint | number | string;
}
```

### `routes.StagedBufferRef`

*Interface* · `sdk/dist/routes/sauce-calls.d.ts`

A buffer this module did NOT stage - only the RESOLVED facts about it. Deliberately carries no
`bytecode`/`seed`/`authority`/`payer`: see the module doc's "SVM STAGING IS A PREREQUISITE"
section for why, and where those pieces actually come from.

```typescript theme={null}
export interface StagedBufferRef {
    code: SvmAddressInput;
    expectedSha256?: Uint8Array;
}
```

### `routes.SvmAddressInput`

*Type* · `sdk/dist/routes/sauce-calls.d.ts`

A base58 string, a kit `Address`, or anything duck-typed like a web3.js `PublicKey` - see the
module doc's "WHY THIS FILE ... NEVER `@solana/web3.js`" note.

```typescript theme={null}
export type SvmAddressInput = string | Address | {
    toBase58(): string;
};
```

### `routes.assertNestingInvariants`

*Function* · `sdk/dist/routes/nest.d.ts`

Asserts the six build-time invariants a static cascade must satisfy (design doc §15.4), all fail
closed:

1. EVM parent - `parentChain.kind === "evm"`. The Solana Portal PROGRAM is not in eco-routes on
   `main` (zero `.rs`); a child's OWN destination may still be `svm`.
2. Source match - every child's `sourceChainId` equals the parent's destination chain id.
3. Static child - `assertStaticChild` per child (the S6 seam).
4. Deadlines INCREASE with depth - `child.route.deadline >= parentRoute.deadline` AND
   `child.reward.deadline >= parentRoute.deadline`. The child publishes DURING the parent's
   fulfillment, which `Inbox._fulfill` allows right up to the parent's own `route.deadline`
   (`block.timestamp > route.deadline` is the only revert condition), so an earlier child deadline
   is publishable-but-already-dead.
5. Funding coverage - per reward token, `Σ children reward amounts &lt;= Σ parentRoute.tokens
   amounts` for that token, and `Σ children reward nativeAmount &lt;= parentRoute.nativeAmount` -     skipping any child with `fundedByBody: true`, and (2026-08-11 directive) UNCONDITIONALLY
   skipping every `via: "transfer"` child regardless of `fundedByBody` - the transfer itself IS
   the (balance-based) funding, so there is nothing static left to compare against
   `parentRoute.tokens`/`nativeAmount`. See `intent-dsl.ts`'s T5 for the one native-only coverage
   check that DOES still apply to a transfer child (only when it opts into `fundNativeFromRoute`).
6. No duplicate intent hash - `normalizeRoute` defaults `salt` to 32 zero bytes, so two
   structurally identical children silently collapse into the SAME intent. A repeat `intentHash`
   anywhere in `children` throws, pointing at `options.salt`.

```typescript theme={null}
export declare function assertNestingInvariants(args: AssertNestingInvariantsArgs): void;
```

### `routes.assertStaticChild`

*Function* · `sdk/dist/routes/nest.d.ts`

Asserts every field of `child`'s reward is concrete (known off-chain). Vacuous today - `Intent`'s
runtime shape has no lazy/runtime-computed field, so a fully-built `Intent` is always static by
construction. This is deliberately kept as its own named assertion because it is the SEAM where an
S6 runtime-computed child (design doc §7) will be rejected here, rather than silently mis-encoded
by treating a placeholder as a real amount.

```typescript theme={null}
export declare function assertStaticChild(_child: Intent): void;
```

### `routes.nestedChildCalls`

*Function* · `sdk/dist/routes/nest.d.ts`

The calls a static child contributes to the PARENT's own `route.calls`:
`[...approve(P, amount) per distinct reward token, publishAndFund(childDestination, childRouteBytes,
childReward, allowPartial)]`, all issued against `opts.portal` (the parent's own `route.portal`).
Reuses `portal.ts#approvalTxs`/`publishAndFundTx` entirely - no second encoder.

```typescript theme={null}
export declare function nestedChildCalls(child: Intent, opts: NestedChildOptions): readonly CallInput[];
```

### `routes.AssertNestingInvariantsArgs`

*Interface* · `sdk/dist/routes/nest.d.ts`

```typescript theme={null}
export interface AssertNestingInvariantsArgs {
    readonly parentChain: CanonicalChain;
    readonly parentRoute: Route;
    readonly children: readonly NestChild[];
}
```

### `routes.NestChild`

*Interface* · `sdk/dist/routes/nest.d.ts`

```typescript theme={null}
export interface NestChild {
    readonly intent: Intent;
    readonly fundedByBody?: boolean;
    readonly via?: NestVia;
}
```

### `routes.NestedChildOptions`

*Interface* · `sdk/dist/routes/nest.d.ts`

Per-child options for `nestedChildCalls` - `portal` is always the PARENT's own `route.portal`.

```typescript theme={null}
export interface NestedChildOptions {
    readonly portal: AddressInput;
    readonly allowPartial: boolean;
}
```
