import { Schema } from 'effect';
import z from 'zod';

declare const SolTypeSchema: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
/**
 * THE chain-capabilities chokepoint.
 *
 * `ResourceSchema` is a decode transform: it parses the plain `native | erc20`
 * wire union (`RawResourceSchema`) and then runs `normalizeResource`, so on
 * `as-erc20` chains (e.g. Tempo) a `{ kind: "native", chainId }` resource is
 * rewritten to its ERC-20 form (PathUSD) before any application code sees it.
 * Because every Resource-bearing schema embeds this one — `FlowSchema` for flow
 * inputs, op `configSchema`s for op configs — making the schema itself
 * chain-aware covers every parsed entry point in one place.
 *
 * The `encode` direction is the identity: the ERC-20 form is itself valid wire
 * format, and the rewrite is deliberately not reversible (we never want to
 * re-introduce a `native` resource when serialising). `JSONSchema.make` derives
 * the published wire format from the encoded (`from`) side, so the manifest
 * keeps advertising the plain union with both arms.
 */
declare const ResourceSchema: Schema.transform<Schema.Union<[Schema.Struct<{
    kind: Schema.Literal<["native"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
}>, Schema.Struct<{
    kind: Schema.Literal<["erc20"]>;
    token: typeof Schema.String;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
}>]>, Schema.SchemaClass<{
    readonly kind: "native";
    readonly chainId: number;
} | {
    readonly token: string;
    readonly kind: "erc20";
    readonly chainId: number;
}, {
    readonly kind: "native";
    readonly chainId: number;
} | {
    readonly token: string;
    readonly kind: "erc20";
    readonly chainId: number;
}, never>>;
declare const ResourceInputSchema: Schema.Struct<{
    name: typeof Schema.String;
    resource: Schema.transform<Schema.Union<[Schema.Struct<{
        kind: Schema.Literal<["native"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    }>, Schema.Struct<{
        kind: Schema.Literal<["erc20"]>;
        token: typeof Schema.String;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    }>]>, Schema.SchemaClass<{
        readonly kind: "native";
        readonly chainId: number;
    } | {
        readonly token: string;
        readonly kind: "erc20";
        readonly chainId: number;
    }, {
        readonly kind: "native";
        readonly chainId: number;
    } | {
        readonly token: string;
        readonly kind: "erc20";
        readonly chainId: number;
    }, never>>;
}>;
declare const HandleInputSchema: Schema.Struct<{
    name: typeof Schema.String;
    type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
}>;
declare const FlowInputSchema: Schema.Union<[Schema.Struct<{
    name: typeof Schema.String;
    resource: Schema.transform<Schema.Union<[Schema.Struct<{
        kind: Schema.Literal<["native"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    }>, Schema.Struct<{
        kind: Schema.Literal<["erc20"]>;
        token: typeof Schema.String;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    }>]>, Schema.SchemaClass<{
        readonly kind: "native";
        readonly chainId: number;
    } | {
        readonly token: string;
        readonly kind: "erc20";
        readonly chainId: number;
    }, {
        readonly kind: "native";
        readonly chainId: number;
    } | {
        readonly token: string;
        readonly kind: "erc20";
        readonly chainId: number;
    }, never>>;
}>, Schema.Struct<{
    name: typeof Schema.String;
    type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
}>]>;
declare const RefSchema: Schema.Struct<{
    $ref: Schema.filter<typeof Schema.String>;
}>;
declare const LiteralBindingSchema: Schema.Struct<{
    kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
    value: typeof Schema.String;
}>;
declare const BindValueSchema: Schema.Union<[Schema.Struct<{
    $ref: Schema.filter<typeof Schema.String>;
}>, Schema.Struct<{
    kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
    value: typeof Schema.String;
}>]>;
declare const AppliedGuardSchema: Schema.TypeLiteral<{
    kind: typeof Schema.String;
}, readonly [{
    readonly key: typeof Schema.String;
    readonly value: typeof Schema.Unknown;
}]>;
declare const CallSchema: Schema.Struct<{
    id: typeof Schema.String;
    op: typeof Schema.String;
    bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
        $ref: Schema.filter<typeof Schema.String>;
    }>, Schema.Struct<{
        kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
        value: typeof Schema.String;
    }>]>>, {
        default: () => {};
    }>;
    config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
        default: () => {};
    }>;
    guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
        kind: typeof Schema.String;
    }, readonly [{
        readonly key: typeof Schema.String;
        readonly value: typeof Schema.Unknown;
    }]>>>;
}>;
declare const FlowSchema: Schema.Struct<{
    version: Schema.Literal<[1]>;
    id: typeof Schema.String;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    inputs: Schema.Array$<Schema.Union<[Schema.Struct<{
        name: typeof Schema.String;
        resource: Schema.transform<Schema.Union<[Schema.Struct<{
            kind: Schema.Literal<["native"]>;
            chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        }>, Schema.Struct<{
            kind: Schema.Literal<["erc20"]>;
            token: typeof Schema.String;
            chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        }>]>, Schema.SchemaClass<{
            readonly kind: "native";
            readonly chainId: number;
        } | {
            readonly token: string;
            readonly kind: "erc20";
            readonly chainId: number;
        }, {
            readonly kind: "native";
            readonly chainId: number;
        } | {
            readonly token: string;
            readonly kind: "erc20";
            readonly chainId: number;
        }, never>>;
    }>, Schema.Struct<{
        name: typeof Schema.String;
        type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
    }>]>>;
    nodes: Schema.Array$<Schema.Struct<{
        id: typeof Schema.String;
        op: typeof Schema.String;
        bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
            $ref: Schema.filter<typeof Schema.String>;
        }>, Schema.Struct<{
            kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
            value: typeof Schema.String;
        }>]>>, {
            default: () => {};
        }>;
        config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
            default: () => {};
        }>;
        guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
            kind: typeof Schema.String;
        }, readonly [{
            readonly key: typeof Schema.String;
            readonly value: typeof Schema.Unknown;
        }]>>>;
    }>>;
}>;
type SolType = typeof SolTypeSchema.Type;
type ResourceInput = typeof ResourceInputSchema.Type;
type HandleInput = typeof HandleInputSchema.Type;
type FlowInput = typeof FlowInputSchema.Type;
type Ref = typeof RefSchema.Type;
type LiteralBinding = typeof LiteralBindingSchema.Type;
type BindValue = typeof BindValueSchema.Type;
type AppliedGuard = typeof AppliedGuardSchema.Type;
type Call = typeof CallSchema.Type;
type Flow = typeof FlowSchema.Type;

declare const CONTINUATION_COMMITMENT_OP_ID = "continuation.commitment";
declare const ContinuationOutcomeSchema: Schema.transform<Schema.Struct<{
    token: typeof Schema.String;
    minAmount: typeof Schema.String;
    destination: typeof Schema.String;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
}>, Schema.SchemaClass<{
    readonly token: string;
    readonly chainId: number;
    readonly minAmount: string;
    readonly destination: string;
}, {
    readonly token: string;
    readonly chainId: number;
    readonly minAmount: string;
    readonly destination: string;
}, never>>;
declare const ContinuationIntentSchema: Schema.Struct<{
    outcomes: Schema.NonEmptyArray<Schema.transform<Schema.Struct<{
        token: typeof Schema.String;
        minAmount: typeof Schema.String;
        destination: typeof Schema.String;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    }>, Schema.SchemaClass<{
        readonly token: string;
        readonly chainId: number;
        readonly minAmount: string;
        readonly destination: string;
    }, {
        readonly token: string;
        readonly chainId: number;
        readonly minAmount: string;
        readonly destination: string;
    }, never>>>;
    continuationFlow: Schema.optional<Schema.Struct<{
        version: Schema.Literal<[1]>;
        id: typeof Schema.String;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        inputs: Schema.Array$<Schema.Union<[Schema.Struct<{
            name: typeof Schema.String;
            resource: Schema.transform<Schema.Union<[Schema.Struct<{
                kind: Schema.Literal<["native"]>;
                chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
            }>, Schema.Struct<{
                kind: Schema.Literal<["erc20"]>;
                token: typeof Schema.String;
                chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
            }>]>, Schema.SchemaClass<{
                readonly kind: "native";
                readonly chainId: number;
            } | {
                readonly token: string;
                readonly kind: "erc20";
                readonly chainId: number;
            }, {
                readonly kind: "native";
                readonly chainId: number;
            } | {
                readonly token: string;
                readonly kind: "erc20";
                readonly chainId: number;
            }, never>>;
        }>, Schema.Struct<{
            name: typeof Schema.String;
            type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
        }>]>>;
        nodes: Schema.Array$<Schema.Struct<{
            id: typeof Schema.String;
            op: typeof Schema.String;
            bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
                $ref: Schema.filter<typeof Schema.String>;
            }>, Schema.Struct<{
                kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
                value: typeof Schema.String;
            }>]>>, {
                default: () => {};
            }>;
            config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
                default: () => {};
            }>;
            guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
                kind: typeof Schema.String;
            }, readonly [{
                readonly key: typeof Schema.String;
                readonly value: typeof Schema.Unknown;
            }]>>>;
        }>>;
    }>>;
    validity: Schema.Struct<{
        expiresAtMs: typeof Schema.Number;
    }>;
    perpetual: Schema.optional<typeof Schema.Boolean>;
    provider: Schema.optional<typeof Schema.String>;
    funding: Schema.optional<Schema.Literal<["inline", "external"]>>;
}>;
declare const Phase1ArtifactSchema: Schema.Union<[Schema.Struct<{
    kind: Schema.Literal<["transaction"]>;
    funding: Schema.Literal<["inline", "external"]>;
    transactionRequest: Schema.optional<Schema.Struct<{
        to: typeof Schema.String;
        data: typeof Schema.String;
        value: typeof Schema.String;
        chainId: typeof Schema.Number;
    }>>;
}>, Schema.Struct<{
    kind: Schema.Literal<["signables"]>;
    typedData: Schema.Array$<typeof Schema.Unknown>;
}>, Schema.Struct<{
    kind: Schema.Literal<["none"]>;
}>]>;
declare const HexStringSchema: Schema.filter<typeof Schema.String>;
declare const AssertionOwnerSchema: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
type AssertionOwner = typeof AssertionOwnerSchema.Type;
declare const Erc20BalanceGteSpecSchema: Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.filter<typeof Schema.String>;
    minAmount: typeof Schema.String;
}>;
declare const NativeBalanceGteSpecSchema: Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.filter<typeof Schema.String>;
    minAmount: typeof Schema.String;
}>;
declare const CallCheckSpecSchema: Schema.Struct<{
    kind: Schema.Literal<["call"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    to: Schema.filter<typeof Schema.String>;
    calldata: Schema.filter<typeof Schema.String>;
    comparator: Schema.Literal<["gte", "eq", "lte"]>;
    value: typeof Schema.String;
}>;
declare const CheckSchema: Schema.transform<Schema.Union<[Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.filter<typeof Schema.String>;
    minAmount: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.filter<typeof Schema.String>;
    minAmount: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["call"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    to: Schema.filter<typeof Schema.String>;
    calldata: Schema.filter<typeof Schema.String>;
    comparator: Schema.Literal<["gte", "eq", "lte"]>;
    value: typeof Schema.String;
}>]>, Schema.SchemaClass<{
    readonly token: string;
    readonly kind: "erc20BalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
} | {
    readonly kind: "nativeBalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
} | {
    readonly kind: "call";
    readonly chainId: number;
    readonly value: string;
    readonly to: string;
    readonly calldata: string;
    readonly comparator: "gte" | "eq" | "lte";
}, {
    readonly token: string;
    readonly kind: "erc20BalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
} | {
    readonly kind: "nativeBalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
} | {
    readonly kind: "call";
    readonly chainId: number;
    readonly value: string;
    readonly to: string;
    readonly calldata: string;
    readonly comparator: "gte" | "eq" | "lte";
}, never>>;
declare const Erc20BalanceDeltaGteSpecSchema: Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minDelta: typeof Schema.String;
}>;
declare const NativeBalanceDeltaGteSpecSchema: Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minDelta: typeof Schema.String;
}>;
declare const AssertionSpecSchema: Schema.Union<[Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.filter<typeof Schema.String>;
    minAmount: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.filter<typeof Schema.String>;
    minAmount: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["call"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    to: Schema.filter<typeof Schema.String>;
    calldata: Schema.filter<typeof Schema.String>;
    comparator: Schema.Literal<["gte", "eq", "lte"]>;
    value: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minDelta: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minDelta: typeof Schema.String;
}>]>;
declare const ContinuationPlanSchema: Schema.Struct<{
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    nextFlow: Schema.Struct<{
        version: Schema.Literal<[1]>;
        id: typeof Schema.String;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        inputs: Schema.Array$<Schema.Union<[Schema.Struct<{
            name: typeof Schema.String;
            resource: Schema.transform<Schema.Union<[Schema.Struct<{
                kind: Schema.Literal<["native"]>;
                chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
            }>, Schema.Struct<{
                kind: Schema.Literal<["erc20"]>;
                token: typeof Schema.String;
                chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
            }>]>, Schema.SchemaClass<{
                readonly kind: "native";
                readonly chainId: number;
            } | {
                readonly token: string;
                readonly kind: "erc20";
                readonly chainId: number;
            }, {
                readonly kind: "native";
                readonly chainId: number;
            } | {
                readonly token: string;
                readonly kind: "erc20";
                readonly chainId: number;
            }, never>>;
        }>, Schema.Struct<{
            name: typeof Schema.String;
            type: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
        }>]>>;
        nodes: Schema.Array$<Schema.Struct<{
            id: typeof Schema.String;
            op: typeof Schema.String;
            bind: Schema.optionalWith<Schema.Record$<typeof Schema.String, Schema.Union<[Schema.Struct<{
                $ref: Schema.filter<typeof Schema.String>;
            }>, Schema.Struct<{
                kind: Schema.Literal<["uint8", "uint16", "uint32", "uint64", "uint128", "uint256", "int128", "int256", "address", "bool", "bytes", "bytes4", "bytes32", "string"]>;
                value: typeof Schema.String;
            }>]>>, {
                default: () => {};
            }>;
            config: Schema.optionalWith<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>, {
                default: () => {};
            }>;
            guards: Schema.optional<Schema.Array$<Schema.TypeLiteral<{
                kind: typeof Schema.String;
            }, readonly [{
                readonly key: typeof Schema.String;
                readonly value: typeof Schema.Unknown;
            }]>>>;
        }>>;
    }>;
    check: Schema.transform<Schema.Union<[Schema.Struct<{
        kind: Schema.Literal<["erc20BalanceGte"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        token: Schema.filter<typeof Schema.String>;
        owner: Schema.filter<typeof Schema.String>;
        minAmount: typeof Schema.String;
    }>, Schema.Struct<{
        kind: Schema.Literal<["nativeBalanceGte"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        owner: Schema.filter<typeof Schema.String>;
        minAmount: typeof Schema.String;
    }>, Schema.Struct<{
        kind: Schema.Literal<["call"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        to: Schema.filter<typeof Schema.String>;
        calldata: Schema.filter<typeof Schema.String>;
        comparator: Schema.Literal<["gte", "eq", "lte"]>;
        value: typeof Schema.String;
    }>]>, Schema.SchemaClass<{
        readonly token: string;
        readonly kind: "erc20BalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    } | {
        readonly kind: "nativeBalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    } | {
        readonly kind: "call";
        readonly chainId: number;
        readonly value: string;
        readonly to: string;
        readonly calldata: string;
        readonly comparator: "gte" | "eq" | "lte";
    }, {
        readonly token: string;
        readonly kind: "erc20BalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    } | {
        readonly kind: "nativeBalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    } | {
        readonly kind: "call";
        readonly chainId: number;
        readonly value: string;
        readonly to: string;
        readonly calldata: string;
        readonly comparator: "gte" | "eq" | "lte";
    }, never>>;
    validity: Schema.Struct<{
        expiresAtMs: typeof Schema.Number;
    }>;
    correlationId: Schema.optional<typeof Schema.String>;
}>;
type ContinuationOutcome = typeof ContinuationOutcomeSchema.Type;
type ContinuationIntent = typeof ContinuationIntentSchema.Type;
type Phase1Artifact = typeof Phase1ArtifactSchema.Type;
type Check = typeof CheckSchema.Type;
type AssertionSpec = typeof AssertionSpecSchema.Type;
type ContinuationPlan = typeof ContinuationPlanSchema.Type;
declare const settledOutcome: (intent: ContinuationIntent) => ContinuationOutcome;
type CheckComparator = 'gte' | 'eq' | 'lte';
declare const isGTECheck: (check: Check) => boolean;
declare const isLTECheck: (check: Check) => boolean;
declare const isEQCheck: (check: Check) => boolean;

declare const Bytes32HexSchema: Schema.filter<typeof Schema.String>;
declare const AssertedErc20BalanceGteSpecSchema: Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minAmount: typeof Schema.String;
}>;
declare const AssertedNativeBalanceGteSpecSchema: Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minAmount: typeof Schema.String;
}>;
declare const AssertedPredicateSchema: Schema.transform<Schema.Union<[Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minAmount: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minAmount: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["call"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    to: Schema.filter<typeof Schema.String>;
    calldata: Schema.filter<typeof Schema.String>;
    comparator: Schema.Literal<["gte", "eq", "lte"]>;
    value: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    token: Schema.filter<typeof Schema.String>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minDelta: typeof Schema.String;
}>, Schema.Struct<{
    kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
    chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
    owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
    minDelta: typeof Schema.String;
}>]>, Schema.SchemaClass<{
    readonly kind: "call";
    readonly chainId: number;
    readonly value: string;
    readonly to: string;
    readonly calldata: string;
    readonly comparator: "gte" | "eq" | "lte";
} | {
    readonly token: string;
    readonly kind: "erc20BalanceDeltaGte";
    readonly chainId: number;
    readonly owner: string;
    readonly minDelta: string;
} | {
    readonly kind: "nativeBalanceDeltaGte";
    readonly chainId: number;
    readonly owner: string;
    readonly minDelta: string;
} | {
    readonly token: string;
    readonly kind: "erc20BalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
} | {
    readonly kind: "nativeBalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
}, {
    readonly kind: "call";
    readonly chainId: number;
    readonly value: string;
    readonly to: string;
    readonly calldata: string;
    readonly comparator: "gte" | "eq" | "lte";
} | {
    readonly token: string;
    readonly kind: "erc20BalanceDeltaGte";
    readonly chainId: number;
    readonly owner: string;
    readonly minDelta: string;
} | {
    readonly kind: "nativeBalanceDeltaGte";
    readonly chainId: number;
    readonly owner: string;
    readonly minDelta: string;
} | {
    readonly token: string;
    readonly kind: "erc20BalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
} | {
    readonly kind: "nativeBalanceGte";
    readonly chainId: number;
    readonly minAmount: string;
    readonly owner: string;
}, never>>;
declare const VerificationDescriptorSchema: Schema.Struct<{
    validationProgramHash: Schema.filter<typeof Schema.String>;
    paramsHash: Schema.filter<typeof Schema.String>;
    assertedPredicate: Schema.Array$<Schema.transform<Schema.Union<[Schema.Struct<{
        kind: Schema.Literal<["erc20BalanceGte"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        token: Schema.filter<typeof Schema.String>;
        owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
        minAmount: typeof Schema.String;
    }>, Schema.Struct<{
        kind: Schema.Literal<["nativeBalanceGte"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
        minAmount: typeof Schema.String;
    }>, Schema.Struct<{
        kind: Schema.Literal<["call"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        to: Schema.filter<typeof Schema.String>;
        calldata: Schema.filter<typeof Schema.String>;
        comparator: Schema.Literal<["gte", "eq", "lte"]>;
        value: typeof Schema.String;
    }>, Schema.Struct<{
        kind: Schema.Literal<["erc20BalanceDeltaGte"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        token: Schema.filter<typeof Schema.String>;
        owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
        minDelta: typeof Schema.String;
    }>, Schema.Struct<{
        kind: Schema.Literal<["nativeBalanceDeltaGte"]>;
        chainId: Schema.filter<Schema.filter<typeof Schema.Number>>;
        owner: Schema.Union<[Schema.filter<typeof Schema.String>, Schema.Literal<["escrow", "delivery"]>]>;
        minDelta: typeof Schema.String;
    }>]>, Schema.SchemaClass<{
        readonly kind: "call";
        readonly chainId: number;
        readonly value: string;
        readonly to: string;
        readonly calldata: string;
        readonly comparator: "gte" | "eq" | "lte";
    } | {
        readonly token: string;
        readonly kind: "erc20BalanceDeltaGte";
        readonly chainId: number;
        readonly owner: string;
        readonly minDelta: string;
    } | {
        readonly kind: "nativeBalanceDeltaGte";
        readonly chainId: number;
        readonly owner: string;
        readonly minDelta: string;
    } | {
        readonly token: string;
        readonly kind: "erc20BalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    } | {
        readonly kind: "nativeBalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    }, {
        readonly kind: "call";
        readonly chainId: number;
        readonly value: string;
        readonly to: string;
        readonly calldata: string;
        readonly comparator: "gte" | "eq" | "lte";
    } | {
        readonly token: string;
        readonly kind: "erc20BalanceDeltaGte";
        readonly chainId: number;
        readonly owner: string;
        readonly minDelta: string;
    } | {
        readonly kind: "nativeBalanceDeltaGte";
        readonly chainId: number;
        readonly owner: string;
        readonly minDelta: string;
    } | {
        readonly token: string;
        readonly kind: "erc20BalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    } | {
        readonly kind: "nativeBalanceGte";
        readonly chainId: number;
        readonly minAmount: string;
        readonly owner: string;
    }, never>>>;
}>;
declare const canonicalAssertedPredicate: (specs: readonly AssertionSpec[]) => string;
type VerificationDescriptor = typeof VerificationDescriptorSchema.Type;
type AssertedPredicate = AssertionSpec;

type Availability = 'now' | 'future';
interface OutputAmount {
    readonly expected: bigint;
    readonly min?: bigint;
}
type Resource = {
    readonly kind: 'native';
    readonly chainId: number;
} | {
    readonly kind: 'erc20';
    readonly token: string;
    readonly chainId: number;
};
declare const erc20Resource: (token: string, chainId: number) => Resource;
declare const nativeResource: (chainId: number) => Resource;
declare const isERC20Resource: (r: Resource) => r is Extract<Resource, {
    kind: "erc20";
}>;
declare const isNativeResource: (r: Resource) => r is Extract<Resource, {
    kind: "native";
}>;
declare const resourcesEqual: (a: Resource, b: Resource) => boolean;
declare const foldResource: <R>(r: Resource, cases: {
    readonly native: (chainId: number) => R;
    readonly erc20: (token: string, chainId: number) => R;
}) => R;
declare const resourceToken: (r: Resource) => string;
declare const resourceKey: (r: Resource) => string;
declare const erc20Token: (r: Resource) => string;

type EstimateBasis = 'simulated' | 'quoted';
type MinimumBasis = 'guard' | 'op' | 'declared';
interface Estimate {
    readonly basis: EstimateBasis;
    readonly value: bigint;
}
interface Minimum {
    readonly basis: MinimumBasis;
    readonly value: bigint;
}
interface Amount {
    readonly estimate?: Estimate;
    readonly minimum?: Minimum;
}
type Delivery = {
    readonly when: 'now';
} | {
    readonly when: 'future';
    readonly etaSeconds?: number;
    readonly provider?: string;
};
interface OutputBase {
    readonly resource: Resource;
    readonly amount: Amount;
}
interface ConsumedOutput extends OutputBase {
    readonly role: 'consumed';
    readonly consumedBy: string;
}
interface TerminalOutput extends OutputBase {
    readonly role: 'terminal';
    readonly owner: string;
    readonly delivery: Delivery;
}
type Output = ConsumedOutput | TerminalOutput;
type Outputs = Record<string, Output>;

declare const ResourcePortZod: z.ZodObject<{
    kind: z.ZodLiteral<"resource">;
    name: z.ZodString;
    accepts: z.ZodEnum<{
        native: "native";
        erc20: "erc20";
        any: "any";
    }>;
    mode: z.ZodEnum<{
        linear: "linear";
        copy: "copy";
    }>;
    optional: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
declare const HANDLE_UNITS: readonly ["raw", "wad", "ray", "bps", "token-decimals"];
declare const STATIC_SOL_TYPES: readonly ["uint256", "uint128", "uint64", "uint32", "uint16", "uint8", "address", "bool", "bytes32"];
declare const HandleUnitsZod: z.ZodEnum<{
    raw: "raw";
    wad: "wad";
    ray: "ray";
    bps: "bps";
    "token-decimals": "token-decimals";
}>;
declare const StaticSolTypeZod: z.ZodEnum<{
    uint8: "uint8";
    uint16: "uint16";
    uint32: "uint32";
    uint64: "uint64";
    uint128: "uint128";
    uint256: "uint256";
    address: "address";
    bool: "bool";
    bytes32: "bytes32";
}>;
declare const isStaticSolType: (value: string) => value is StaticSolType;
declare const HandlePortZod: z.ZodObject<{
    kind: z.ZodLiteral<"handle">;
    name: z.ZodString;
    type: z.ZodEnum<{
        string: "string";
        uint8: "uint8";
        uint16: "uint16";
        uint32: "uint32";
        uint64: "uint64";
        uint128: "uint128";
        uint256: "uint256";
        int128: "int128";
        int256: "int256";
        address: "address";
        bool: "bool";
        bytes: "bytes";
        bytes4: "bytes4";
        bytes32: "bytes32";
    }>;
    mode: z.ZodEnum<{
        linear: "linear";
        copy: "copy";
    }>;
    expose: z.ZodOptional<z.ZodBoolean>;
    units: z.ZodOptional<z.ZodEnum<{
        raw: "raw";
        wad: "wad";
        ray: "ray";
        bps: "bps";
        "token-decimals": "token-decimals";
    }>>;
    optional: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
declare const InputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"resource">;
    name: z.ZodString;
    accepts: z.ZodEnum<{
        native: "native";
        erc20: "erc20";
        any: "any";
    }>;
    mode: z.ZodEnum<{
        linear: "linear";
        copy: "copy";
    }>;
    optional: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"handle">;
    name: z.ZodString;
    type: z.ZodEnum<{
        string: "string";
        uint8: "uint8";
        uint16: "uint16";
        uint32: "uint32";
        uint64: "uint64";
        uint128: "uint128";
        uint256: "uint256";
        int128: "int128";
        int256: "int256";
        address: "address";
        bool: "bool";
        bytes: "bytes";
        bytes4: "bytes4";
        bytes32: "bytes32";
    }>;
    mode: z.ZodEnum<{
        linear: "linear";
        copy: "copy";
    }>;
    expose: z.ZodOptional<z.ZodBoolean>;
    units: z.ZodOptional<z.ZodEnum<{
        raw: "raw";
        wad: "wad";
        ray: "ray";
        bps: "bps";
        "token-decimals": "token-decimals";
    }>>;
    optional: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>], "kind">;
declare const ResourceOutputPortZod: z.ZodObject<{
    kind: z.ZodLiteral<"resource_output">;
    name: z.ZodString;
    mode: z.ZodEnum<{
        linear: "linear";
        copy: "copy";
    }>;
    availability: z.ZodOptional<z.ZodEnum<{
        now: "now";
        future: "future";
    }>>;
    providesMinimum: z.ZodOptional<z.ZodBoolean>;
    omitIfZero: z.ZodOptional<z.ZodBoolean>;
    deliveryAddressInput: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const OutputPortZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"resource_output">;
    name: z.ZodString;
    mode: z.ZodEnum<{
        linear: "linear";
        copy: "copy";
    }>;
    availability: z.ZodOptional<z.ZodEnum<{
        now: "now";
        future: "future";
    }>>;
    providesMinimum: z.ZodOptional<z.ZodBoolean>;
    omitIfZero: z.ZodOptional<z.ZodBoolean>;
    deliveryAddressInput: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"handle">;
    name: z.ZodString;
    type: z.ZodEnum<{
        string: "string";
        uint8: "uint8";
        uint16: "uint16";
        uint32: "uint32";
        uint64: "uint64";
        uint128: "uint128";
        uint256: "uint256";
        int128: "int128";
        int256: "int256";
        address: "address";
        bool: "bool";
        bytes: "bytes";
        bytes4: "bytes4";
        bytes32: "bytes32";
    }>;
    mode: z.ZodEnum<{
        linear: "linear";
        copy: "copy";
    }>;
    expose: z.ZodOptional<z.ZodBoolean>;
    units: z.ZodOptional<z.ZodEnum<{
        raw: "raw";
        wad: "wad";
        ray: "ray";
        bps: "bps";
        "token-decimals": "token-decimals";
    }>>;
    optional: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>], "kind">;
declare const ManifestOperationZod: z.ZodObject<{
    id: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"resource">;
        name: z.ZodString;
        accepts: z.ZodEnum<{
            native: "native";
            erc20: "erc20";
            any: "any";
        }>;
        mode: z.ZodEnum<{
            linear: "linear";
            copy: "copy";
        }>;
        optional: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"handle">;
        name: z.ZodString;
        type: z.ZodEnum<{
            string: "string";
            uint8: "uint8";
            uint16: "uint16";
            uint32: "uint32";
            uint64: "uint64";
            uint128: "uint128";
            uint256: "uint256";
            int128: "int128";
            int256: "int256";
            address: "address";
            bool: "bool";
            bytes: "bytes";
            bytes4: "bytes4";
            bytes32: "bytes32";
        }>;
        mode: z.ZodEnum<{
            linear: "linear";
            copy: "copy";
        }>;
        expose: z.ZodOptional<z.ZodBoolean>;
        units: z.ZodOptional<z.ZodEnum<{
            raw: "raw";
            wad: "wad";
            ray: "ray";
            bps: "bps";
            "token-decimals": "token-decimals";
        }>>;
        optional: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>], "kind">>;
    outputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"resource_output">;
        name: z.ZodString;
        mode: z.ZodEnum<{
            linear: "linear";
            copy: "copy";
        }>;
        availability: z.ZodOptional<z.ZodEnum<{
            now: "now";
            future: "future";
        }>>;
        providesMinimum: z.ZodOptional<z.ZodBoolean>;
        omitIfZero: z.ZodOptional<z.ZodBoolean>;
        deliveryAddressInput: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"handle">;
        name: z.ZodString;
        type: z.ZodEnum<{
            string: "string";
            uint8: "uint8";
            uint16: "uint16";
            uint32: "uint32";
            uint64: "uint64";
            uint128: "uint128";
            uint256: "uint256";
            int128: "int128";
            int256: "int256";
            address: "address";
            bool: "bool";
            bytes: "bytes";
            bytes4: "bytes4";
            bytes32: "bytes32";
        }>;
        mode: z.ZodEnum<{
            linear: "linear";
            copy: "copy";
        }>;
        expose: z.ZodOptional<z.ZodBoolean>;
        units: z.ZodOptional<z.ZodEnum<{
            raw: "raw";
            wad: "wad";
            ray: "ray";
            bps: "bps";
            "token-decimals": "token-decimals";
        }>>;
        optional: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>], "kind">>;
    configSchema: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>;
declare const GuardSelectorZod: z.ZodObject<{
    binding: z.ZodString;
    source: z.ZodEnum<{
        inputs: "inputs";
        outputs: "outputs";
    }>;
    match: z.ZodObject<{
        kind: z.ZodUnion<readonly [z.ZodEnum<{
            resource: "resource";
            handle: "handle";
            resource_output: "resource_output";
        }>, z.ZodArray<z.ZodEnum<{
            resource: "resource";
            handle: "handle";
            resource_output: "resource_output";
        }>>]>;
        mode: z.ZodOptional<z.ZodEnum<{
            linear: "linear";
            copy: "copy";
        }>>;
        type: z.ZodOptional<z.ZodEnum<{
            native: "native";
            erc20: "erc20";
            any: "any";
        }>>;
    }, z.core.$strip>;
    selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"config">;
        configKey: z.ZodString;
        cardinality: z.ZodEnum<{
            one: "one";
            many: "many";
        }>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"all_matching">;
    }, z.core.$strip>], "kind">;
}, z.core.$strip>;
declare const GuardCompatibilityZod: z.ZodObject<{
    selectors: z.ZodArray<z.ZodObject<{
        binding: z.ZodString;
        source: z.ZodEnum<{
            inputs: "inputs";
            outputs: "outputs";
        }>;
        match: z.ZodObject<{
            kind: z.ZodUnion<readonly [z.ZodEnum<{
                resource: "resource";
                handle: "handle";
                resource_output: "resource_output";
            }>, z.ZodArray<z.ZodEnum<{
                resource: "resource";
                handle: "handle";
                resource_output: "resource_output";
            }>>]>;
            mode: z.ZodOptional<z.ZodEnum<{
                linear: "linear";
                copy: "copy";
            }>>;
            type: z.ZodOptional<z.ZodEnum<{
                native: "native";
                erc20: "erc20";
                any: "any";
            }>>;
        }, z.core.$strip>;
        selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"config">;
            configKey: z.ZodString;
            cardinality: z.ZodEnum<{
                one: "one";
                many: "many";
            }>;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"all_matching">;
        }, z.core.$strip>], "kind">;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const ManifestGuardZod: z.ZodObject<{
    kind: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    configSchema: z.ZodOptional<z.ZodUnknown>;
    compatibility: z.ZodOptional<z.ZodObject<{
        selectors: z.ZodArray<z.ZodObject<{
            binding: z.ZodString;
            source: z.ZodEnum<{
                inputs: "inputs";
                outputs: "outputs";
            }>;
            match: z.ZodObject<{
                kind: z.ZodUnion<readonly [z.ZodEnum<{
                    resource: "resource";
                    handle: "handle";
                    resource_output: "resource_output";
                }>, z.ZodArray<z.ZodEnum<{
                    resource: "resource";
                    handle: "handle";
                    resource_output: "resource_output";
                }>>]>;
                mode: z.ZodOptional<z.ZodEnum<{
                    linear: "linear";
                    copy: "copy";
                }>>;
                type: z.ZodOptional<z.ZodEnum<{
                    native: "native";
                    erc20: "erc20";
                    any: "any";
                }>>;
            }, z.core.$strip>;
            selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"config">;
                configKey: z.ZodString;
                cardinality: z.ZodEnum<{
                    one: "one";
                    many: "many";
                }>;
            }, z.core.$strip>, z.ZodObject<{
                kind: z.ZodLiteral<"all_matching">;
            }, z.core.$strip>], "kind">;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
}, z.core.$strip>;
declare const ManifestMaterialiserZod: z.ZodObject<{
    kind: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    accepts: z.ZodEnum<{
        resource: "resource";
        any: "any";
        handle: "handle";
    }>;
    configSchema: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>;
declare const ManifestPreconditionZod: z.ZodObject<{
    type: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    configSchema: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>;
declare const ComposeManifestZod: z.ZodObject<{
    manifestVersion: z.ZodNumber;
    manifestHash: z.ZodString;
    flowSchema: z.ZodObject<{}, z.core.$loose>;
    operations: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        inputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"resource">;
            name: z.ZodString;
            accepts: z.ZodEnum<{
                native: "native";
                erc20: "erc20";
                any: "any";
            }>;
            mode: z.ZodEnum<{
                linear: "linear";
                copy: "copy";
            }>;
            optional: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"handle">;
            name: z.ZodString;
            type: z.ZodEnum<{
                string: "string";
                uint8: "uint8";
                uint16: "uint16";
                uint32: "uint32";
                uint64: "uint64";
                uint128: "uint128";
                uint256: "uint256";
                int128: "int128";
                int256: "int256";
                address: "address";
                bool: "bool";
                bytes: "bytes";
                bytes4: "bytes4";
                bytes32: "bytes32";
            }>;
            mode: z.ZodEnum<{
                linear: "linear";
                copy: "copy";
            }>;
            expose: z.ZodOptional<z.ZodBoolean>;
            units: z.ZodOptional<z.ZodEnum<{
                raw: "raw";
                wad: "wad";
                ray: "ray";
                bps: "bps";
                "token-decimals": "token-decimals";
            }>>;
            optional: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>], "kind">>;
        outputs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"resource_output">;
            name: z.ZodString;
            mode: z.ZodEnum<{
                linear: "linear";
                copy: "copy";
            }>;
            availability: z.ZodOptional<z.ZodEnum<{
                now: "now";
                future: "future";
            }>>;
            providesMinimum: z.ZodOptional<z.ZodBoolean>;
            omitIfZero: z.ZodOptional<z.ZodBoolean>;
            deliveryAddressInput: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"handle">;
            name: z.ZodString;
            type: z.ZodEnum<{
                string: "string";
                uint8: "uint8";
                uint16: "uint16";
                uint32: "uint32";
                uint64: "uint64";
                uint128: "uint128";
                uint256: "uint256";
                int128: "int128";
                int256: "int256";
                address: "address";
                bool: "bool";
                bytes: "bytes";
                bytes4: "bytes4";
                bytes32: "bytes32";
            }>;
            mode: z.ZodEnum<{
                linear: "linear";
                copy: "copy";
            }>;
            expose: z.ZodOptional<z.ZodBoolean>;
            units: z.ZodOptional<z.ZodEnum<{
                raw: "raw";
                wad: "wad";
                ray: "ray";
                bps: "bps";
                "token-decimals": "token-decimals";
            }>>;
            optional: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>], "kind">>;
        configSchema: z.ZodOptional<z.ZodUnknown>;
    }, z.core.$strip>>;
    guards: z.ZodArray<z.ZodObject<{
        kind: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        configSchema: z.ZodOptional<z.ZodUnknown>;
        compatibility: z.ZodOptional<z.ZodObject<{
            selectors: z.ZodArray<z.ZodObject<{
                binding: z.ZodString;
                source: z.ZodEnum<{
                    inputs: "inputs";
                    outputs: "outputs";
                }>;
                match: z.ZodObject<{
                    kind: z.ZodUnion<readonly [z.ZodEnum<{
                        resource: "resource";
                        handle: "handle";
                        resource_output: "resource_output";
                    }>, z.ZodArray<z.ZodEnum<{
                        resource: "resource";
                        handle: "handle";
                        resource_output: "resource_output";
                    }>>]>;
                    mode: z.ZodOptional<z.ZodEnum<{
                        linear: "linear";
                        copy: "copy";
                    }>>;
                    type: z.ZodOptional<z.ZodEnum<{
                        native: "native";
                        erc20: "erc20";
                        any: "any";
                    }>>;
                }, z.core.$strip>;
                selection: z.ZodDiscriminatedUnion<[z.ZodObject<{
                    kind: z.ZodLiteral<"config">;
                    configKey: z.ZodString;
                    cardinality: z.ZodEnum<{
                        one: "one";
                        many: "many";
                    }>;
                }, z.core.$strip>, z.ZodObject<{
                    kind: z.ZodLiteral<"all_matching">;
                }, z.core.$strip>], "kind">;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    materialisers: z.ZodArray<z.ZodObject<{
        kind: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        accepts: z.ZodEnum<{
            resource: "resource";
            any: "any";
            handle: "handle";
        }>;
        configSchema: z.ZodOptional<z.ZodUnknown>;
    }, z.core.$strip>>;
    preconditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
        type: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        configSchema: z.ZodOptional<z.ZodUnknown>;
    }, z.core.$strip>>>;
}, z.core.$strip>;
declare const Phase1ArtifactZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"transaction">;
    funding: z.ZodEnum<{
        inline: "inline";
        external: "external";
    }>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"signables">;
    typedData: z.ZodArray<z.ZodUnknown>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"none">;
}, z.core.$strip>], "kind">;
declare const CheckZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceGte">;
    chainId: z.ZodNumber;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"call">;
    chainId: z.ZodNumber;
    to: z.ZodString;
    calldata: z.ZodString;
    comparator: z.ZodEnum<{
        gte: "gte";
        eq: "eq";
        lte: "lte";
    }>;
    value: z.ZodString;
}, z.core.$strip>], "kind">;
declare const AssertionSpecZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceGte">;
    chainId: z.ZodNumber;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"call">;
    chainId: z.ZodNumber;
    to: z.ZodString;
    calldata: z.ZodString;
    comparator: z.ZodEnum<{
        gte: "gte";
        eq: "eq";
        lte: "lte";
    }>;
    value: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
    chainId: z.ZodNumber;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip>], "kind">;
type AssertionSpecWire = z.infer<typeof AssertionSpecZod>;
declare const AssertedPredicateZod: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minAmount: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceGte">;
    chainId: z.ZodNumber;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minAmount: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceGte">;
    chainId: z.ZodNumber;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"call">;
    chainId: z.ZodNumber;
    to: z.ZodString;
    calldata: z.ZodString;
    comparator: z.ZodEnum<{
        gte: "gte";
        eq: "eq";
        lte: "lte";
    }>;
    value: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
    chainId: z.ZodNumber;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceGte">;
    chainId: z.ZodNumber;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"call">;
    chainId: z.ZodNumber;
    to: z.ZodString;
    calldata: z.ZodString;
    comparator: z.ZodEnum<{
        gte: "gte";
        eq: "eq";
        lte: "lte";
    }>;
    value: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
    chainId: z.ZodNumber;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceGte">;
    chainId: z.ZodNumber;
    owner: z.ZodString;
    minAmount: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"call">;
    chainId: z.ZodNumber;
    to: z.ZodString;
    calldata: z.ZodString;
    comparator: z.ZodEnum<{
        gte: "gte";
        eq: "eq";
        lte: "lte";
    }>;
    value: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
    chainId: z.ZodNumber;
    token: z.ZodString;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip> | z.ZodObject<{
    kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
    chainId: z.ZodNumber;
    owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
        escrow: "escrow";
        delivery: "delivery";
    }>]>;
    minDelta: z.ZodString;
}, z.core.$strip>], "kind">;
declare const VerificationDescriptorZod: z.ZodObject<{
    validationProgramHash: z.ZodString;
    paramsHash: z.ZodString;
    assertedPredicate: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minAmount: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceGte">;
        chainId: z.ZodNumber;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minAmount: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceGte">;
        chainId: z.ZodNumber;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"call">;
        chainId: z.ZodNumber;
        to: z.ZodString;
        calldata: z.ZodString;
        comparator: z.ZodEnum<{
            gte: "gte";
            eq: "eq";
            lte: "lte";
        }>;
        value: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minDelta: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
        chainId: z.ZodNumber;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minDelta: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceGte">;
        chainId: z.ZodNumber;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"call">;
        chainId: z.ZodNumber;
        to: z.ZodString;
        calldata: z.ZodString;
        comparator: z.ZodEnum<{
            gte: "gte";
            eq: "eq";
            lte: "lte";
        }>;
        value: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minDelta: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
        chainId: z.ZodNumber;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minDelta: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceGte">;
        chainId: z.ZodNumber;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"call">;
        chainId: z.ZodNumber;
        to: z.ZodString;
        calldata: z.ZodString;
        comparator: z.ZodEnum<{
            gte: "gte";
            eq: "eq";
            lte: "lte";
        }>;
        value: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceDeltaGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minDelta: z.ZodString;
    }, z.core.$strip> | z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceDeltaGte">;
        chainId: z.ZodNumber;
        owner: z.ZodUnion<readonly [z.ZodString, z.ZodEnum<{
            escrow: "escrow";
            delivery: "delivery";
        }>]>;
        minDelta: z.ZodString;
    }, z.core.$strip>], "kind">>;
}, z.core.$strip>;
type AssertedPredicateWire = z.infer<typeof AssertedPredicateZod>;
type VerificationDescriptorWire = z.infer<typeof VerificationDescriptorZod>;
declare const ContinuationPlanZod: z.ZodObject<{
    chainId: z.ZodNumber;
    nextFlow: z.ZodUnknown;
    check: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"erc20BalanceGte">;
        chainId: z.ZodNumber;
        token: z.ZodString;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"nativeBalanceGte">;
        chainId: z.ZodNumber;
        owner: z.ZodString;
        minAmount: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"call">;
        chainId: z.ZodNumber;
        to: z.ZodString;
        calldata: z.ZodString;
        comparator: z.ZodEnum<{
            gte: "gte";
            eq: "eq";
            lte: "lte";
        }>;
        value: z.ZodString;
    }, z.core.$strip>], "kind">;
    validity: z.ZodObject<{
        expiresAtMs: z.ZodNumber;
    }, z.core.$strip>;
    correlationId: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ResourcePort = z.infer<typeof ResourcePortZod>;
type HandlePort = z.infer<typeof HandlePortZod>;
type HandleUnits = z.infer<typeof HandleUnitsZod>;
type StaticSolType = z.infer<typeof StaticSolTypeZod>;
type OpInputPort = z.infer<typeof InputPortZod>;
type ResourceOutputPort = z.infer<typeof ResourceOutputPortZod>;
type OpOutputPort = z.infer<typeof OutputPortZod>;
type ManifestOperation = z.infer<typeof ManifestOperationZod>;
type GuardSelector = z.infer<typeof GuardSelectorZod>;
type GuardCompatibility = z.infer<typeof GuardCompatibilityZod>;
type ManifestGuard = z.infer<typeof ManifestGuardZod>;
type ManifestMaterialiser = z.infer<typeof ManifestMaterialiserZod>;
type ManifestPrecondition = z.infer<typeof ManifestPreconditionZod>;
type ComposeManifest = z.infer<typeof ComposeManifestZod>;
type Phase1ArtifactWire = z.infer<typeof Phase1ArtifactZod>;
type ContinuationPlanWire = z.infer<typeof ContinuationPlanZod>;

type SimulationPolicy = 'strict' | 'allow-revert';
/**
 * Destination for sweeping proxy-held terminal resources after execution.
 * Either a literal EVM address or a `{ $ref }` context reference
 * (e.g. `{ $ref: "context.sender" }`).
 */
type SweepTo = string | {
    readonly $ref: string;
};
interface ComposeRun {
    readonly inputs: Record<string, InputSpec>;
    readonly preconditions?: readonly Precondition[];
    readonly signer: string;
    readonly assumptions?: Record<string, bigint>;
    readonly referrer?: string;
    readonly integratorFeeBps?: number;
    readonly maxPriceImpactBps?: number;
    readonly sweepTo?: SweepTo;
    readonly simulationPolicy?: SimulationPolicy;
    /**
     * Also simulate the final user-facing transaction. Defaults to `false`;
     * reverts honour `simulationPolicy` and a success is echoed back as
     * `userProgramSimulation`.
     */
    readonly simulateUserProgram?: boolean;
    readonly checkOnChainAllowances?: boolean;
}
interface ComposeCompileRequest {
    readonly flow: Flow;
    readonly run: ComposeRun;
}
interface PriceImpact {
    readonly inputValueUsd: number;
    readonly outputValueUsd: number;
    readonly impactBps: number;
    readonly unpricedInputs: readonly string[];
    readonly unpricedOutputs: readonly string[];
}
interface ApprovalEntry {
    readonly token: string;
    readonly spender: string;
    readonly amount: string;
    readonly transactionRequest: {
        readonly to: string;
        readonly data: string;
        readonly value: '0';
    };
}
interface SimulationRevert {
    readonly code: number;
    readonly rawErrorBytes: string;
    readonly decodeResult?: {
        readonly errorCandidates?: readonly {
            readonly decodedErrorSignature: string;
            readonly decodedParams: readonly string[];
        }[];
        readonly error?: string;
    };
}
interface ComposeTransactionRequest {
    readonly to: string;
    readonly chainId: number;
    readonly data: string;
    readonly value: string;
    readonly gasLimit?: string;
}
interface ComposeAction {
    readonly kind: 'transaction';
    readonly purpose: 'approval' | 'execute' | 'fundEscrow';
    readonly submitter: 'signer' | 'anyone';
    readonly transactionRequest: ComposeTransactionRequest;
    readonly nodeId?: string;
}
interface ComposeContinuationData {
    readonly phase1ByNode?: Record<string, Phase1ArtifactWire>;
    readonly continuationPlans?: Record<string, ContinuationPlanWire>;
}
interface SpendEntry {
    readonly input: string;
    readonly token: string;
    readonly chainId: number;
    readonly amount: string;
    readonly nodeId?: string;
}
interface ComposeFee {
    readonly input: string;
    readonly token: string;
    readonly recipient: 'lifi' | 'integrator';
    readonly recipientAddress: string;
    readonly bps: number;
    readonly amount?: string;
}
interface ComposeUserProgramSimulation {
    readonly status: 'ok';
    readonly returnData: string;
}
interface ComposeFill {
    readonly spends: readonly SpendEntry[];
    readonly validUntilMs?: number;
}
interface ComposeCompileSuccessData extends ComposeContinuationData {
    readonly outputs: Outputs;
    readonly transactionRequest?: ComposeTransactionRequest;
    readonly actions?: readonly ComposeAction[];
    readonly userProxy: string;
    readonly priceImpact?: PriceImpact;
    readonly approvals?: readonly ApprovalEntry[];
    readonly fees?: readonly ComposeFee[];
    readonly userProgramSimulation?: ComposeUserProgramSimulation;
    readonly fill?: ComposeFill;
    readonly verificationByNode?: Record<string, VerificationDescriptor>;
}
interface ComposeCompilePartialData extends ComposeContinuationData {
    readonly outputs: Outputs;
    readonly transactionRequest: ComposeTransactionRequest;
    readonly userProxy: string;
    readonly simulationRevert: SimulationRevert;
    readonly approvals?: readonly ApprovalEntry[];
    readonly actions?: readonly ComposeAction[];
    readonly fees?: readonly ComposeFee[];
    readonly userProgramSimulation?: ComposeUserProgramSimulation;
}
type ComposeCompileResult = (ComposeCompileSuccessData & {
    readonly status: 'success';
}) | (ComposeCompilePartialData & {
    readonly status: 'partial';
    readonly error: {
        readonly kind: string;
        readonly message: string;
    };
});

interface Port {
    readonly name: string;
    readonly type: SolType;
    readonly mode: 'linear' | 'copy';
    readonly availability?: Availability;
    readonly resource?: Resource;
}
declare const isResourceInput: (input: FlowInput) => input is ResourceInput;
declare const flowInputType: (input: FlowInput) => SolType;
declare const flowInputMode: (input: FlowInput) => "linear" | "copy";
declare const flowInputResource: (input: FlowInput) => Resource | undefined;
declare const isResourcePort: (port: OpInputPort) => port is ResourcePort;
declare const isHandlePort: (port: OpInputPort | OpOutputPort) => port is HandlePort;
declare const isResourceOutputPort: (port: OpInputPort | OpOutputPort) => port is ResourceOutputPort;
declare const isFutureResourceOutput: (port: OpInputPort | OpOutputPort) => boolean;
type ComposeErrorKind = 'decode_error' | 'validation_error' | 'linearity_error' | 'resolve_error' | 'preparation_error' | 'provider_error' | 'no_route_error' | 'resolution_error' | 'resolution_rejected' | 'lowering_error' | 'empty_program' | 'simulation_error' | 'simulation_setup_error' | 'simulation_insufficient_funds' | 'simulation_gas_limit' | 'simulation_rpc_error' | 'simulation_revert' | 'subgraph_simulation_revert' | 'guard_error' | 'continuation_error' | 'compilation_error' | 'verification_error' | 'price_impact_exceeded' | 'fee_resolution_error' | 'fee_resolution_unavailable' | 'flashloan_unauthorized' | 'deadline_exceeded';
/**
 * Errors raised by compose routes outside the compile pipeline.
 */
type ComposeRouteErrorKind = 'chain_validation_error' | 'unsupported_token' | 'zero_output' | 'service_unavailable' | 'verification_unavailable' | 'deployment_check_unavailable' | 'manifest_error' | 'sdk_outdated' | 'server_outdated';
type GenericComposeErrorKind = Exclude<ComposeErrorKind, 'preparation_error' | 'simulation_revert'>;
interface FailedPreparedOp {
    readonly callId: string;
    readonly op: string;
    readonly kind: GenericComposeErrorKind;
    readonly message: string;
    readonly path?: string;
}
interface ComposeErrorBase {
    readonly message: string;
    readonly path?: string;
}
interface PreparationComposeError extends ComposeErrorBase {
    readonly kind: 'preparation_error';
    readonly failedOps: readonly FailedPreparedOp[];
    readonly succeededOps: readonly string[];
}
interface SimulationRevertComposeError extends ComposeErrorBase {
    readonly kind: 'simulation_revert';
    readonly details?: SimulationRevert;
}
interface GenericComposeError extends ComposeErrorBase {
    readonly kind: GenericComposeErrorKind;
    readonly [key: string]: unknown;
}
type ComposeError = PreparationComposeError | SimulationRevertComposeError | GenericComposeError;
interface MaterialiserInputBase {
    readonly kind: string;
}
type MaterialiserInput = MaterialiserInputBase & Record<string, unknown>;
type MaterialiserInputOf<C extends object> = MaterialiserInputBase & C;
type MaterialiserConfigOf<C extends object> = C;
declare const isMaterialiserInput: (s: InputSpec) => s is MaterialiserInput;
type InputSpec = bigint | string | MaterialiserInput;
interface PreconditionBase {
    readonly type: string;
}
type Precondition = PreconditionBase & Record<string, unknown>;
type PreconditionOf<C extends object> = PreconditionBase & C;
type PreconditionConfigOf<C extends object> = Omit<PreconditionBase, 'type'> & C;

declare const PROVIDER_KIND: {
    readonly AAVE_V3: 0;
    readonly ERC3156: 1;
    readonly BALANCER_V2: 2;
    readonly MORPHO_BLUE: 3;
};
declare const providerKindNames: readonly ["aave-v3", "erc3156", "balancer-v2", "morpho-blue"];
type ProviderKindName = (typeof providerKindNames)[number];
declare const providerKindByName: Record<ProviderKindName, number>;
interface FlashloanMaterialiserInput {
    readonly kind: 'flashloan';
    readonly providerKind: ProviderKindName;
    readonly amount: string;
}

interface OpHandleOptions<Opt extends boolean = boolean> {
    readonly expose?: boolean;
    readonly units?: HandleUnits;
    readonly optional?: Opt;
}
declare const linear: <N extends string, T extends SolType>(name: N, type: T) => Port & {
    readonly name: N;
    readonly type: T;
    readonly mode: "linear";
};
declare const copy: <N extends string, T extends SolType>(name: N, type: T) => Port & {
    readonly name: N;
    readonly type: T;
    readonly mode: "copy";
};
declare const handle: <N extends string, T extends SolType>(name: N, type: T) => HandleInput & {
    readonly name: N;
    readonly type: T;
};
declare const native: <N extends string>(name: N, chainId: number) => ResourceInput & {
    readonly name: N;
};
declare const erc20: <N extends string>(name: N, token: string, chainId: number) => ResourceInput & {
    readonly name: N;
};
declare const resource: <N extends string, Opt extends boolean = false>(name: N, accepts: "erc20" | "native" | "any", options?: {
    readonly optional?: Opt;
}) => ResourcePort & {
    readonly name: N;
    readonly optional: NoInfer<Opt>;
};
declare const readResource: <N extends string>(name: N, accepts: "erc20" | "native" | "any") => ResourcePort & {
    readonly name: N;
    readonly mode: "copy";
};
declare const opHandle: <N extends string, T extends SolType, Opt extends boolean = false>(name: N, type: T, options?: OpHandleOptions<Opt>) => HandlePort & {
    readonly name: N;
    readonly type: T;
    readonly optional: NoInfer<Opt>;
};
type ResourceOutputOptions = Availability | {
    readonly availability?: Availability;
    readonly providesMinimum?: boolean;
    readonly omitIfZero?: boolean;
    readonly deliveryAddressInput?: string;
};
type OutputAvailability<O> = [O] extends ['future'] ? 'future' : [O] extends ['now'] ? 'now' : [O] extends [string] ? Availability : O extends {
    readonly availability: infer A;
} ? [A] extends ['future'] ? 'future' : [A] extends ['now'] ? 'now' : Availability : 'now';
declare const resourceOutput: <N extends string, const O extends ResourceOutputOptions = "now">(name: N, options?: O) => ResourceOutputPort & {
    readonly name: N;
    readonly availability: OutputAvailability<O>;
};

type ParsedRef = {
    readonly scope: 'input';
    readonly port: string;
} | {
    readonly scope: 'output';
    readonly node: string;
    readonly port: string;
} | {
    readonly scope: 'context';
    readonly key: ContextKey;
};
type RefScope = ParsedRef['scope'];
type ContextKey = 'sender' | 'executionAddress';
declare const isContextKey: (key: string) => key is ContextKey;
/**
 * Ref prefixes that parseRef intercepts before the fallback `output` scope.
 * A node whose id matches one of these would produce ambiguous refs
 * (e.g. `context.sender` could be a context ref or node-output ref).
 * Validation must reject these as node ids.
 */
declare const RESERVED_REF_SCOPES: ReadonlySet<string>;
declare const isRef: (v: unknown) => v is Ref;
declare const parseRef: (ref: Ref) => ParsedRef;
/** A ref path: a dotpath such as `input.amount` or `nodeId.port`. */
type RefPath = `${string}.${string}`;
/**
 * Builds a bind ref. `ref.input(port)` for a flow input, `ref.context.*` for a
 * context ref, and a dotpath for a node output (`ref('deposit.shares')`).
 * Prefer the named forms: `parseRef` reads an unrecognised prefix as a node id,
 * so a misspelled `input.`/`context.` silently becomes an output ref.
 */
interface RefBuilder {
    (path: RefPath): Ref;
    input(port: string): Ref;
    readonly context: {
        readonly [K in ContextKey]: Ref;
    };
}
declare const ref: RefBuilder;
declare const foldRef: <R>(ref: ParsedRef, cases: {
    readonly input: (port: string) => R;
    readonly context: (key: ContextKey) => R;
    readonly output: (node: string, port: string) => R;
}) => R;
declare const refKey: (ref: Ref) => string;

/**
 * Per-chain native-asset semantics.
 *
 * Most EVM chains have an ETH-style native gas coin sent via `msg.value` (the
 * `evm-native` policy). A small number — currently only Tempo — express their
 * "native" coin as an ERC-20 token (the `as-erc20` policy). Code that needs to
 * lower or simulate a `Resource` of kind `"native"` should consult
 * `getChainCapabilities(chainId)` rather than hardcoding chain IDs.
 *
 * The compose compiler uses this registry to transparently normalise native
 * resources into ERC-20 resources on `as-erc20` chains at schema-decode time
 * (see `normalizeResource` below and the `ResourceSchema` transform in
 * `flowSchema.ts`).
 *
 * This union is the extension point for future native-asset policies. A chain
 * with no canonical native asset would get a `reject-native` arm, under which a
 * `{ kind: "native" }` resource becomes a validation error rather than being
 * rewritten. No such chain exists yet, so the arm is not defined here.
 */
type ChainCapabilities = {
    readonly kind: 'evm-native';
    readonly chainId: number;
} | {
    readonly kind: 'as-erc20';
    readonly chainId: number;
    readonly nativeErc20: NativeErc20;
};
interface NativeErc20 {
    readonly token: `0x${string}`;
    readonly symbol: string;
    readonly decimals: number;
}
/**
 * The zero-address sentinel that represents the native gas coin on
 * EVM-native chains. Exported so tests and call-sites can reference it
 * by name rather than inlining 40 zeros.
 *
 * Inlined as a literal rather than imported from `@lifi/utils`: `compose-spec`
 * is the wire-format leaf package and carries no `@lifi/*` dependencies
 * (enforced by `scripts/check-compose-boundaries.mjs`).
 */
declare const EVM_NATIVE_SENTINEL: `0x${string}`;
declare const TEMPO_CHAIN_ID = 4217;
declare const TEMPO_NATIVE_ERC20: NativeErc20;
declare const getChainCapabilities: (chainId: number) => ChainCapabilities;
declare const isAsErc20Chain: (chainId: number) => boolean;
/**
 * The address that represents the chain's native asset.
 *
 * On EVM-native chains this is the zero-address sentinel `0x0…0`. On
 * `as-erc20` chains it is the chain's stand-in ERC-20 (e.g. PathUSD on Tempo).
 */
declare const canonicalNativeAddress: (chainId: number) => `0x${string}`;
/**
 * Whether `address` represents the native asset of `chainId`.
 *
 * On EVM-native chains, this is the case-insensitive zero-address check. On
 * `as-erc20` chains, the literal zero address returns `false` — only the
 * chain's stand-in ERC-20 address matches.
 */
declare const isNativeAddressForChain: (chainId: number, address: string) => boolean;
/**
 * Whether `address` on `chainId` is the genuine `msg.value`-style native coin:
 * an `evm-native` chain's zero-address sentinel.
 *
 * This is the single predicate that gates `msg.value` semantics — choosing a
 * `NativeBalance` over an `Erc20Balance` simulation requirement, and skipping
 * the ERC-20 approval a native input would otherwise need. It returns `false`
 * for every address on an `as-erc20` chain (including the zero sentinel),
 * because there the "native" coin is a real ERC-20 moved via `transferFrom`,
 * never `msg.value`. Use this rather than re-deriving
 * `!isAsErc20Chain(chainId) && address === EVM_NATIVE_SENTINEL` at call sites,
 * and rather than `isNativeAddressForChain`, which returns `true` for the
 * stand-in ERC-20 (PathUSD) on `as-erc20` chains and would wrongly route it to
 * `msg.value`.
 */
declare const isMsgValueNative: (chainId: number, address: string) => boolean;
/**
 * Rewrite a single `Resource` according to its chain's capabilities.
 *
 * On chains with the default `evm-native` policy, every resource is returned
 * unchanged. On `as-erc20` chains (currently only Tempo, chainId 4217), a
 * resource of kind `"native"` is rewritten into the equivalent ERC-20
 * resource pointing at the chain's stand-in token (PathUSD for Tempo).
 *
 * This is the rewrite primitive behind the `ResourceSchema` decode transform
 * (see `flowSchema.ts`), which is THE chokepoint: it runs every time a
 * `Resource` is parsed — flow inputs via `FlowSchema`, op configs via
 * `decodeConfig` — so every downstream pass (`normalizeFlow`, `resolve`,
 * `lower`, `simulate`) sees only ERC-20 resources on `as-erc20` chains.
 *
 * The function preserves referential identity when nothing changes (returns the
 * input `r` unchanged on evm-native chains and for ERC-20 resources) and is
 * idempotent: running it on an already-rewritten resource is a no-op.
 */
declare const normalizeResource: (r: Resource) => Resource;
/**
 * Address-level counterpart of `normalizeResource` for wire fields that carry a
 * native asset as a bare token string (a continuation outcome's `token`). On
 * `as-erc20` chains the native sentinel is rewritten to the chain's stand-in
 * ERC-20; every other address passes through.
 */
declare const normalizeNativeTokenAddress: (token: string, chainId: number) => string;

/**
 * Canonical request types for the `POST /compose/route` convenience endpoint.
 * Amounts accept `bigint | string` for authoring convenience; the JSON wire
 * format is always a decimal string, which the SDK serialises for you.
 *
 * `/compose/route` trades authoring power for brevity. Instead of a full flow
 * document it takes a single from/to token pair; the server builds a one-node
 * zap flow with a `directDeposit` input on the caller's behalf and runs it
 * through the same compile pipeline as `POST /compose`. It routes through
 * `lifi.zap` unless the pair is reachable only asynchronously and the request
 * set `allowAsyncRoutes`, in which case it uses `lifi.zapAsync`. As of today
 * the flow it builds is a single zap step — one edge of the server's routing
 * catalog — and it is meant to author richer flows later, which this request
 * shape is deliberately agnostic about. Its response body is byte-identical to
 * that of `POST /compose` — the enveloped `ComposeCompileSuccessData` on HTTP
 * 200 and `ComposeCompilePartialData` on HTTP 206 — so this file declares only
 * the request shape and reuses `ComposeCompileResult` from `./compile.js` for
 * the result.
 *
 * These are the single source of truth for the request shape, hand-authored
 * here for the same reason as `./compile.ts` and `./simulate.ts` rather than
 * derived from the validating schema: that schema is the Zod one in
 * `@lifi/api-schemas` (`src/routes/composeRoute.ts`), a package that depends on
 * this one, so importing its inferred types here would invert the dependency —
 * and the public SDK ships this package as its only peer dependency, never the
 * server's schema package. The two definitions are held in lockstep by a
 * compile-time conformance assertion
 * (`api-schemas/src/routes/composeRoute.typecheck.ts`), which fails the build
 * if either side drifts.
 */

/**
 * Spend an exact amount of `fromToken`.
 *
 * `amount` is in the token's smallest unit. Accepts `bigint | string`; the wire
 * format is a non-negative decimal string.
 */
interface RouteAmountExact {
    readonly type: 'EXACT';
    readonly amount: bigint | string;
}
/**
 * Spend the signer's entire `fromToken` balance, whatever it is at execution
 * time.
 *
 * The on-chain amount is resolved by a deposit-all materialiser, so it is not
 * known when the route is compiled. `simAmount` is the stand-in the server
 * quotes and simulates against — make it a realistic estimate of the balance,
 * because it determines the quote and the derived preconditions, not the amount
 * actually moved. Accepts `bigint | string`; the wire format is a non-negative
 * decimal string.
 *
 * Not supported when `fromToken` is the chain's native sentinel: a gas coin
 * arrives via `msg.value`, so there is no on-chain balance to sweep, and the
 * server rejects the combination with a `validation_error`. Use
 * {@link RouteAmountExact} for native inputs.
 */
interface RouteAmountAll {
    readonly type: 'ALL';
    readonly simAmount: bigint | string;
}
/**
 * How much of `fromToken` a route spends. Two variants, discriminated by
 * `type`.
 */
type RouteAmount = RouteAmountExact | RouteAmountAll;
/** Request body for `POST /compose/route`. */
interface ComposeRouteRequest {
    /** EVM chain id. Both tokens must live on this chain — routes are same-chain. */
    readonly chainId: number;
    /**
     * Token to spend. Use the chain's native sentinel address for the gas coin
     * (the zero address on EVM-native chains).
     */
    readonly fromToken: string;
    /** Token to receive. */
    readonly toToken: string;
    /** How much of `fromToken` to spend — an exact amount or the whole balance. */
    readonly amount: RouteAmount;
    /** Address that funds the route and, by default, owns its output. */
    readonly signer: string;
    /**
     * Slippage tolerance in basis points, applied as a guard on the route's
     * output. Range 0–10000. Defaults to `100` (1%) server-side when omitted.
     */
    readonly slippageBps?: number;
    /**
     * Reject the route when its quoted price impact exceeds this many basis
     * points. Range 0–10000. Omitted ⇒ no price-impact guard is installed.
     */
    readonly maxPriceImpactBps?: number;
    /**
     * Integrator fee in basis points, taken from the input amount. Range 0–9000.
     * Defaults to `0` server-side when omitted. A non-zero value requires an
     * integration-scoped API key; the server rejects it otherwise.
     */
    readonly integratorFeeBps?: number;
    /** Opaque referrer tag forwarded to the underlying quote provider. */
    readonly referrer?: string;
    /**
     * Owner of the route's output; defaults to `signer`. Routes whose protocol
     * mints to a named receiver (surfaced as `recipient: 'required'` by
     * `GET /compose/zap-packs`) bind this address at mint time rather than
     * transferring afterwards. Accepts an address or `{ $ref: 'context.sender' }`;
     * `{ $ref: 'context.executionAddress' }` is rejected.
     */
    readonly sweepTo?: SweepTo;
    /**
     * `'strict'` (the default) fails the request when simulation detects a
     * revert; `'allow-revert'` returns a partial result with revert diagnostics
     * instead.
     */
    readonly simulationPolicy?: SimulationPolicy;
    /**
     * Also simulate the final user-facing transaction after the structured
     * simulation succeeds. Reverts honour `simulationPolicy`. Defaults to `false`.
     */
    readonly simulateUserProgram?: boolean;
    /**
     * Filter the returned `approvals` against current on-chain allowances,
     * omitting approvals that are already sufficient. Defaults to `false`.
     */
    readonly checkOnChainAllowances?: boolean;
    /**
     * Accept a route whose output is delivered only after the initiating
     * transaction settles (`delivery.when: 'future'` on the terminal output).
     * Such a route obliges you to track settlement rather than treat the
     * transaction as completing the job, and carries no slippage floor, so it is
     * opt-in. Defaults to `false` server-side, which leaves a pair reachable
     * only asynchronously rejected with `no_route_error` and guarantees every
     * terminal output is `delivery.when: 'now'`.
     */
    readonly allowAsyncRoutes?: boolean;
}

/**
 * The three concrete precondition shapes the stack exchanges today. One
 * definition serves every producer and consumer: op/materialiser declarations,
 * `rewritePreconditions`, the simulator's funding requirements (`simulate.ts`
 * aliases these as `*Requirement`), and the zap-backend approval derivation.
 *
 * Amounts accept `bigint | string`: the SDK serialises `bigint` to a decimal
 * string; the string side covers values already stringified.
 */
type Erc20BalancePrecondition = {
    readonly type: 'Erc20Balance';
    readonly wallet: string;
    readonly token: string;
    readonly balance: bigint | string;
};
type NativeBalancePrecondition = {
    readonly type: 'NativeBalance';
    readonly wallet: string;
    readonly balance: bigint | string;
};
type Erc20AllowancePrecondition = {
    readonly type: 'Erc20Allowance';
    readonly owner: string;
    readonly spender: string;
    readonly token: string;
    readonly allowance: bigint | string;
};
declare const erc20Balance: (config: Omit<Erc20BalancePrecondition, "type">) => Erc20BalancePrecondition;
declare const nativeBalance: (config: Omit<NativeBalancePrecondition, "type">) => NativeBalancePrecondition;
declare const erc20Allowance: (config: Omit<Erc20AllowancePrecondition, "type">) => Erc20AllowancePrecondition;
declare const isErc20AllowancePrecondition: (p: Precondition) => p is Erc20AllowancePrecondition;
declare const isNativeBalancePrecondition: (p: Precondition) => p is NativeBalancePrecondition;

/**
 * Canonical wire-format types for the standalone `POST /simulate` endpoint.
 *
 * `/simulate` takes a raw, pre-encoded transaction (a `to` address, hex `data`,
 * optional native `value`), funds a sender, runs it in one `eth_call`, and
 * reports the watched balances before and after, their signed deltas, and the
 * inner-call gas. Unlike `POST /compose`, its response body is **un-enveloped**:
 * `{ status, block, timestamp, ... }` lives at the top level (no `{ data }`
 * wrapper).
 *
 * These are the single source of truth for the request/response shapes. The
 * server-side Zod schemas in `@lifi/api-schemas` (`src/routes/simulate.ts`)
 * validate the same contract and are kept in lockstep by a compile-time
 * conformance assertion (`src/routes/simulate.typecheck.ts`).
 *
 * Mirrors the hand-authored style of `src/compile.ts`.
 */

/**
 * Maximum number of watched `(token, owner)` pairs accepted by `POST /simulate`.
 *
 * The limit comes from the VM's hard register budget (~123 usable registers,
 * checked on the final ISA layout). Each pair costs two result registers — a
 * before-read and an after-read — that are both live at the closing abi-encode,
 * so the compiler cannot coalesce them; that `2 × N` is the cost that scales.
 * Token and owner address literals do not scale it, since constant-propagation
 * merges identical-valued literals into one register. The cap leaves headroom
 * for the inner-call / gas-measurement / abi-encode scaffolding.
 */
declare const SIMULATE_MAX_TRACKED_BALANCES = 40;
/**
 * Maximum number of funding `requirements` accepted by `POST /simulate`.
 *
 * Each requirement triggers a slot-discovery cycle (access-list probe + sentinel
 * verification + RPC round trips) in slot-finder, so an unbounded array lets a
 * single request amplify into arbitrary upstream RPC work. Bounded here at the
 * trust boundary and re-enforced server-side in `rawSimulation.ts`.
 */
declare const SIMULATE_MAX_REQUIREMENTS = 40;
/** A `(token, owner)` pair whose balance is watched across the simulation. */
interface TrackedBalance {
    /** Token to watch (use the zero address for native balance). */
    readonly token: string;
    /** Account whose balance of `token` is watched. */
    readonly owner: string;
}
/** Funding instruction: seed an ERC-20 balance on a wallet before simulation. */
type Erc20BalanceRequirement = Erc20BalancePrecondition;
/** Funding instruction: seed a native balance on a wallet before simulation. */
type NativeBalanceRequirement = NativeBalancePrecondition;
/** Funding instruction: seed an ERC-20 allowance before simulation. */
type Erc20AllowanceRequirement = Erc20AllowancePrecondition;
/**
 * The funding-instruction union applied before a simulation. Three variants,
 * discriminated by `type`.
 */
type SlotFinderRequirement = Erc20BalanceRequirement | NativeBalanceRequirement | Erc20AllowanceRequirement;
/** Request body for `POST /simulate`. */
interface SimulateRequest {
    /** EVM chain id. */
    readonly chainId: number;
    /**
     * Sender of the simulated transaction. The VM bytecode is injected here so
     * the inner call carries `msg.sender == from`.
     */
    readonly from: string;
    /** Target contract of the raw transaction. */
    readonly to: string;
    /** Pre-encoded transaction calldata (`0x`-prefixed hex). */
    readonly data: string;
    /**
     * Native value (wei) sent with the inner call. Accepts `bigint | string`;
     * defaults to `"0"` server-side when omitted.
     */
    readonly value?: bigint | string;
    /**
     * Block number to simulate against. Omitted ⇒ the chain head. Named tags
     * (e.g. "latest") are rejected with HTTP 400.
     */
    readonly block?: number;
    /** Funding instructions applied before simulation (max 40). */
    readonly requirements?: readonly SlotFinderRequirement[];
    /** Balances to read before and after the transaction (1–40 pairs). */
    readonly trackedBalances: readonly TrackedBalance[];
}
/**
 * One watched balance in a simulation response. `amount` is a decimal string;
 * for `deltas` it is signed (`after - before`).
 */
interface SimulateBalanceEntry {
    readonly token: string;
    readonly owner: string;
    readonly amount: string;
}
/**
 * HTTP 200, `status: "ok"`: the simulation ran successfully. Balance arrays are
 * ordered to match the request `trackedBalances`. `gasUsed` is inner-call
 * execution gas only.
 *
 * Note: the array element types are intentionally mutable (`SimulateBalanceEntry[]`,
 * not `readonly SimulateBalanceEntry[]`) so they stay structurally identical to
 * the Zod-inferred wire types, which `z.array(...)` infers as mutable `T[]`. The
 * bidirectional conformance assertion in `@lifi/api-schemas` relies on this.
 */
interface SimulateOkResult {
    readonly status: 'ok';
    readonly block: number;
    readonly timestamp: number;
    readonly balancesBefore: SimulateBalanceEntry[];
    readonly balancesAfter: SimulateBalanceEntry[];
    readonly deltas: SimulateBalanceEntry[];
    readonly gasUsed: string;
}
/** Decoded revert diagnostics, when slot-finder can parse the revert reason. */
interface SimulateRevertDecodeResult {
    readonly errorCandidates?: {
        readonly decodedErrorSignature: string;
        readonly decodedParams: string[];
    }[];
    readonly error?: string;
}
/**
 * HTTP 200, `status: "revert"`: the simulation ran but the transaction reverted
 * on-chain. A revert is a *successful simulation*, not a transport error.
 */
interface SimulateRevertResult {
    readonly status: 'revert';
    readonly block: number;
    readonly timestamp: number;
    readonly revertReason?: string;
    readonly code?: number;
    readonly rawErrorBytes?: string;
    readonly decodeResult?: SimulateRevertDecodeResult;
}
/**
 * HTTP 422, `status: "error"`: the request was well-formed but the simulation
 * could not be set up or run. `message` is intentionally generic.
 */
interface SimulateSetupErrorResult {
    readonly status: 'error';
    readonly message: string;
}
/**
 * Discriminated result of `POST /simulate`. `switch (result.status)` narrows to
 * one member: `ok` and `revert` come back with HTTP 200, `error` with HTTP 422.
 */
type SimulateResult = SimulateOkResult | SimulateRevertResult | SimulateSetupErrorResult;

/**
 * HTTP header names on the compose wire.
 *
 * Both the SDK (which sends the request header) and the backend (which reads it
 * and answers with the response header) are part of the same handshake, so the
 * names belong to the wire format rather than to either side of it.
 */
/** Compose contract version the client was built against. Sent on every request. */
declare const COMPOSER_SDK_VERSION_HEADER = "x-lifi-composer-sdk";
/** Compose contract version the backend serves. Returned on every compose response. */
declare const COMPOSE_VERSION_HEADER = "x-lifi-composer-version";

/**
 * Compose contract version compatibility.
 *
 * The version triple carries the compatibility class, and the rule is
 * permanent: 1.0 does not change it. A patch bump is additive: new ops, edge
 * families, materialisers, guards, preconditions, or new optional config
 * fields. A minor or major bump is breaking: anything removed, any existing
 * schema changed, or a semantics change under an unchanged wire shape. Both
 * sides of the handshake (see `headers.ts`) decide with `checkCompatibility`,
 * so the rule lives in exactly one place.
 */
interface ComposeVersion {
    readonly major: number;
    readonly minor: number;
    readonly patch: number;
}
type VersionCompatibility = 'compatible' | 'sdk_outdated' | 'server_outdated';
/**
 * Parses the numeric triple of a semantic version. Prerelease and build
 * suffixes are accepted and ignored: `0.5.1-staging.3` compares as `0.5.1`.
 * Returns `undefined` for anything that is not a complete semver string,
 * including the `dev` sentinel the SDK sends when it runs unbundled.
 */
declare const parseVersion: (version: string) => ComposeVersion | undefined;
/**
 * Decides whether a client built against `client` may talk to a server that
 * serves `server` and accepts clients down to `minimum`.
 *
 * - A client ahead of the server in any component is `server_outdated`. Even
 *   a patch-ahead client may send a field the server has never seen, and the
 *   guarantee must not depend on every server schema staying strict. This is
 *   the rollout window between an npm publish and the prod image bump.
 * - A client below `minimum` is `sdk_outdated`: the server no longer serves
 *   the contract that client speaks.
 * - Anything in between is compatible. Patch releases only add, so a client
 *   at or behind the server's patch never emits anything the server lacks;
 *   a client on an older minor is served because the server still emits the
 *   shapes that minor reads.
 *
 * `minimum` defaults to the server's own `major.minor.0`, which makes every
 * minor bump a hard cutover. The backend passes its explicit floor so a minor
 * bump can ship with the previous line still accepted; the SDK passes no floor
 * because the server, not the client, decides how far back it serves.
 */
declare const checkCompatibility: (client: ComposeVersion, server: ComposeVersion, minimum?: ComposeVersion) => VersionCompatibility;

type MaterialiserMetadata = {
    readonly kind: 'exact';
    readonly amount: bigint;
} | {
    readonly kind: 'exact-native';
    readonly amount: bigint;
} | {
    readonly kind: 'runtime';
};
interface MaterialiserResolution {
    readonly meta: MaterialiserMetadata;
    readonly preconditions: readonly Precondition[];
}
declare const foldMaterialiserMetadata: <R>(meta: MaterialiserMetadata, cases: {
    readonly exact: (amount: bigint) => R;
    readonly exactNative: (amount: bigint) => R;
    readonly runtime: () => R;
}) => R;

export { type Amount, type AppliedGuard, AppliedGuardSchema, type ApprovalEntry, AssertedErc20BalanceGteSpecSchema, AssertedNativeBalanceGteSpecSchema, type AssertedPredicate, AssertedPredicateSchema, type AssertedPredicateWire, AssertedPredicateZod, type AssertionOwner, AssertionOwnerSchema, type AssertionSpec, AssertionSpecSchema, type AssertionSpecWire, AssertionSpecZod, type Availability, type BindValue, BindValueSchema, Bytes32HexSchema, COMPOSER_SDK_VERSION_HEADER, COMPOSE_VERSION_HEADER, CONTINUATION_COMMITMENT_OP_ID, type Call, CallCheckSpecSchema, CallSchema, type ChainCapabilities, type Check, type CheckComparator, CheckSchema, CheckZod, type ComposeAction, type ComposeCompilePartialData, type ComposeCompileRequest, type ComposeCompileResult, type ComposeCompileSuccessData, type ComposeError, type ComposeErrorKind, type ComposeFee, type ComposeFill, type ComposeManifest, ComposeManifestZod, type ComposeRouteErrorKind, type ComposeRouteRequest, type ComposeRun, type ComposeTransactionRequest, type ComposeUserProgramSimulation, type ComposeVersion, type ConsumedOutput, type ContextKey, type ContinuationIntent, ContinuationIntentSchema, type ContinuationOutcome, ContinuationOutcomeSchema, type ContinuationPlan, ContinuationPlanSchema, type ContinuationPlanWire, ContinuationPlanZod, type Delivery, EVM_NATIVE_SENTINEL, type Erc20AllowancePrecondition, type Erc20AllowanceRequirement, Erc20BalanceDeltaGteSpecSchema, Erc20BalanceGteSpecSchema, type Erc20BalancePrecondition, type Erc20BalanceRequirement, type Estimate, type EstimateBasis, type FailedPreparedOp, type FlashloanMaterialiserInput, type Flow, type FlowInput, FlowInputSchema, FlowSchema, type GenericComposeError, type GenericComposeErrorKind, type GuardCompatibility, GuardCompatibilityZod, type GuardSelector, GuardSelectorZod, HANDLE_UNITS, type HandleInput, HandleInputSchema, type HandlePort, HandlePortZod, type HandleUnits, HandleUnitsZod, HexStringSchema, InputPortZod, type InputSpec, type LiteralBinding, LiteralBindingSchema, type ManifestGuard, ManifestGuardZod, type ManifestMaterialiser, ManifestMaterialiserZod, type ManifestOperation, ManifestOperationZod, type ManifestPrecondition, ManifestPreconditionZod, type MaterialiserConfigOf, type MaterialiserInput, type MaterialiserInputBase, type MaterialiserInputOf, type MaterialiserMetadata, type MaterialiserResolution, type Minimum, type MinimumBasis, NativeBalanceDeltaGteSpecSchema, NativeBalanceGteSpecSchema, type NativeBalancePrecondition, type NativeBalanceRequirement, type NativeErc20, type OpInputPort, type OpOutputPort, type Output, type OutputAmount, OutputPortZod, type Outputs, PROVIDER_KIND, type ParsedRef, type Phase1Artifact, Phase1ArtifactSchema, type Phase1ArtifactWire, Phase1ArtifactZod, type Port, type Precondition, type PreconditionBase, type PreconditionConfigOf, type PreconditionOf, type PreparationComposeError, type PriceImpact, type ProviderKindName, RESERVED_REF_SCOPES, type Ref, type RefBuilder, type RefPath, RefSchema, type RefScope, type Resource, type ResourceInput, ResourceInputSchema, type ResourceOutputPort, ResourceOutputPortZod, type ResourcePort, ResourcePortZod, ResourceSchema, type RouteAmount, type RouteAmountAll, type RouteAmountExact, SIMULATE_MAX_REQUIREMENTS, SIMULATE_MAX_TRACKED_BALANCES, STATIC_SOL_TYPES, type SimulateBalanceEntry, type SimulateOkResult, type SimulateRequest, type SimulateResult, type SimulateRevertDecodeResult, type SimulateRevertResult, type SimulateSetupErrorResult, type SimulationPolicy, type SimulationRevert, type SimulationRevertComposeError, type SlotFinderRequirement, type SolType, SolTypeSchema, type SpendEntry, type StaticSolType, StaticSolTypeZod, type SweepTo, TEMPO_CHAIN_ID, TEMPO_NATIVE_ERC20, type TerminalOutput, type TrackedBalance, type VerificationDescriptor, VerificationDescriptorSchema, type VerificationDescriptorWire, VerificationDescriptorZod, type VersionCompatibility, canonicalAssertedPredicate, canonicalNativeAddress, checkCompatibility, copy, erc20, erc20Allowance, erc20Balance, erc20Resource, erc20Token, flowInputMode, flowInputResource, flowInputType, foldMaterialiserMetadata, foldRef, foldResource, getChainCapabilities, handle, isAsErc20Chain, isContextKey, isEQCheck, isERC20Resource, isErc20AllowancePrecondition, isFutureResourceOutput, isGTECheck, isHandlePort, isLTECheck, isMaterialiserInput, isMsgValueNative, isNativeAddressForChain, isNativeBalancePrecondition, isNativeResource, isRef, isResourceInput, isResourceOutputPort, isResourcePort, isStaticSolType, linear, native, nativeBalance, nativeResource, normalizeNativeTokenAddress, normalizeResource, opHandle, parseRef, parseVersion, providerKindByName, providerKindNames, readResource, ref, refKey, resource, resourceKey, resourceOutput, resourceToken, resourcesEqual, settledOutcome };
