UNPKG

@lifi/composer-sdk

Version:

Public Composer SDK for building and submitting flows

921 lines • 55.1 kB
import { TypedGuard } from "../types.cjs";
import { Bindable, FamilyCount, FamilySource, OutputFamilyHandles, OutputHandle } from "../authoring/handles.cjs";
import { FlowBuilderInternal } from "../authoring/FlowBuilderCore.cjs";
import { CoreCallResult, SignatureBind, StaticCallResult } from "../authoring/signatureArgs.cjs";
import { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, ContinuationSettleConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CorePartitionConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitAtConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiIntentsAttestNonFillConfig, LifiIntentsOrderConfig, LifiIntentsRefundConfig, LifiIntentsRefundOnNonFillConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, ParaswapBuyConfig, UniswapV2AddLiquidityConfig, UniswapV2RemoveLiquidityConfig, UniswapV3IncreaseLiquidityConfig, UniswapV3MintConfig } from "./config.generated.cjs";
//#region src/generated/operations.generated.d.ts
/** Split a resource into two outputs by basis-point ratio. Output `a` receives `bps` of the source, rounded up, and `b` takes the remainder. */
export interface CoreSplitArgs {
  readonly bind: {
    readonly source: Bindable<"resource">;
  };
  readonly config: CoreSplitConfig;
  readonly guards?: readonly TypedGuard<"a" | "b">[];
}
/** Split a resource at a fixed amount. Output `head` receives `min(source, amount)`; `tail` receives the rest, and is 0 (omitted when unspent) when the source is at or below `amount`. */
export interface CoreSplitAtArgs {
  readonly bind: {
    readonly source: Bindable<"resource">;
  };
  readonly config: CoreSplitAtConfig;
  readonly guards?: readonly TypedGuard<"head" | "tail">[];
}
/** Partition a resource into one output per basis-point share. `bps` lists 2 to 16 shares summing to 10000; output `parts.i` receives share i, rounded down, and the last part takes the remainder. */
export interface CorePartitionArgs<TBps extends FamilySource<CorePartitionConfig["bps"]> = FamilySource<CorePartitionConfig["bps"]>> {
  readonly bind: {
    readonly source: Bindable<"resource">;
  };
  readonly config: Omit<CorePartitionConfig, "bps"> & {
    readonly bps: TBps & FamilyCount<NoInfer<TBps>, Readonly<CorePartitionConfig["bps"]>>;
  };
  readonly guards?: readonly TypedGuard<`parts.${number}`>[];
}
/** Merge two same-token resources into one by addition */
export interface CoreMergeArgs {
  readonly bind: {
    readonly a: Bindable<"resource">;
    readonly b: Bindable<"resource">;
  };
  readonly guards?: readonly TypedGuard<"merged">[];
}
/** Swap tokens via the LI.FI aggregator API */
export interface LifiSwapArgs {
  readonly bind: {
    readonly amountIn: Bindable<"resource">;
  };
  readonly config: LifiSwapConfig;
  readonly guards?: readonly TypedGuard<"unspentIn">[];
}
/** Bridge tokens to another chain via the LI.FI aggregator API */
export interface LifiBridgeArgs {
  readonly bind: {
    readonly amountIn: Bindable<"resource">;
  };
  readonly config: LifiBridgeConfig;
  readonly guards?: readonly TypedGuard<"unspentIn">[];
}
/** Assert that an account holds at least a minimum token balance */
export interface InvariantBalanceAtLeastArgs {
  readonly bind: {
    readonly minimumAmount: Bindable<"resource">;
    readonly account: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert that an account holds exactly an expected token balance */
export interface InvariantBalanceEqualsArgs {
  readonly bind: {
    readonly expectedAmount: Bindable<"resource">;
    readonly account: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert that an account holds at most a maximum token balance */
export interface InvariantBalanceAtMostArgs {
  readonly bind: {
    readonly maximumAmount: Bindable<"resource">;
    readonly account: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert that an account's token balance is between a minimum and a maximum (inclusive) */
export interface InvariantBalanceInRangeArgs {
  readonly bind: {
    readonly minimumAmount: Bindable<"resource">;
    readonly maximumAmount: Bindable<"uint256">;
    readonly account: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner */
export interface InvariantAllowanceAtLeastArgs {
  readonly bind: {
    readonly minimumAmount: Bindable<"resource">;
    readonly owner: Bindable<"address">;
    readonly spender: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount */
export interface InvariantAllowanceEqualsArgs {
  readonly bind: {
    readonly expectedAmount: Bindable<"resource">;
    readonly owner: Bindable<"address">;
    readonly spender: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner */
export interface InvariantAllowanceAtMostArgs {
  readonly bind: {
    readonly maximumAmount: Bindable<"resource">;
    readonly owner: Bindable<"address">;
    readonly spender: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) */
export interface InvariantAllowanceInRangeArgs {
  readonly bind: {
    readonly minimumAmount: Bindable<"resource">;
    readonly maximumAmount: Bindable<"uint256">;
    readonly owner: Bindable<"address">;
    readonly spender: Bindable<"address">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation */
export interface InvariantNumericArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantNumericConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert min <= value <= max against constant bounds; reverts if outside the range */
export interface InvariantNumericInRangeArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantNumericInRangeConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation */
export interface InvariantGteArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantGteConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation */
export interface InvariantGtArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantGtConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation */
export interface InvariantLteArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantLteConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a uint256 value is strictly less than a constant threshold; reverts on violation */
export interface InvariantLtArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantLtConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a uint256 value equals a constant threshold; reverts on violation */
export interface InvariantEqArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantEqConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a uint256 value does not equal a constant threshold; reverts on violation */
export interface InvariantNeqArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: InvariantNeqConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Add two unsigned integers (a + b) */
export interface CoreAddArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Subtract b from a (a - b); reverts on underflow */
export interface CoreSubtractArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Multiply two unsigned integers (a * b) */
export interface CoreMultiplyArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Divide a by b, rounding toward zero */
export interface CoreDivideDownArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Divide a by b, rounding away from zero */
export interface CoreDivideUpArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Multiply value by basis points and divide by 10000, rounding down */
export interface CoreBpsDownArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: CoreBpsDownConfig;
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Multiply value by basis points and divide by 10000, rounding up */
export interface CoreBpsUpArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
  };
  readonly config: CoreBpsUpConfig;
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Assert a == b; reverts if not equal */
export interface CoreAssertEqualArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a != b; reverts if equal */
export interface CoreAssertNotEqualArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a > b; reverts if a <= b */
export interface CoreAssertGtArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a >= b; reverts if a < b */
export interface CoreAssertGteArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a < b; reverts if a >= b */
export interface CoreAssertLtArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert a <= b; reverts if a > b */
export interface CoreAssertLteArgs {
  readonly bind: {
    readonly a: Bindable<"uint256">;
    readonly b: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Assert min <= value <= max; reverts if value is outside the range */
export interface CoreAssertInRangeArgs {
  readonly bind: {
    readonly value: Bindable<"uint256">;
    readonly min: Bindable<"uint256">;
    readonly max: Bindable<"uint256">;
  };
  readonly guards?: readonly TypedGuard<never>[];
}
/** Approve an ERC20 spender for the given token and amount */
export interface CoreApproveArgs {
  readonly bind: {
    readonly amount: Bindable<"resource">;
  };
  readonly config: CoreApproveConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Read an ERC20 balance, producing a resource */
export interface CoreBalanceOfArgs {
  readonly bind: Record<string, never>;
  readonly config: CoreBalanceOfConfig;
  readonly guards?: readonly TypedGuard<"balance">[];
}
/** Transfer the whole input resource to a recipient address. To send part of a resource, split it first with `core.split` or `core.splitAt`. */
export interface CoreTransferArgs {
  readonly bind: {
    readonly amount: Bindable<"resource">;
    readonly recipient: Bindable<"address">;
  };
  readonly config?: CoreTransferConfig;
  readonly guards?: readonly TypedGuard<"transferred">[];
}
/** Emit a custom on-chain event carrying 1 32-byte payload value. The value becomes a non-indexed data word in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). */
export interface CoreEmitEvent1Args {
  readonly bind: {
    readonly value0: Bindable<"bytes32">;
  };
  readonly config: CoreEmitEvent1Config;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Emit a custom on-chain event carrying 2 32-byte payload values. The values become non-indexed data words in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). */
export interface CoreEmitEvent2Args {
  readonly bind: {
    readonly value0: Bindable<"bytes32">;
    readonly value1: Bindable<"bytes32">;
  };
  readonly config: CoreEmitEvent2Config;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Emit a custom on-chain event carrying 3 32-byte payload values. The values become non-indexed data words in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). */
export interface CoreEmitEvent3Args {
  readonly bind: {
    readonly value0: Bindable<"bytes32">;
    readonly value1: Bindable<"bytes32">;
    readonly value2: Bindable<"bytes32">;
  };
  readonly config: CoreEmitEvent3Config;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Emit a custom on-chain event carrying 4 32-byte payload values. The values become non-indexed data words in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). */
export interface CoreEmitEvent4Args {
  readonly bind: {
    readonly value0: Bindable<"bytes32">;
    readonly value1: Bindable<"bytes32">;
    readonly value2: Bindable<"bytes32">;
    readonly value3: Bindable<"bytes32">;
  };
  readonly config: CoreEmitEvent4Config;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Invoke a smart contract function, optionally spending a token resource */
export interface CoreCallArgs<TSig extends string = string> {
  readonly resource?: Bindable<"resource">;
  readonly bind: SignatureBind<TSig>;
  readonly config: Omit<CoreCallConfig, "args" | "functionSignature"> & {
    readonly functionSignature: TSig;
  };
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Read from a smart contract at runtime (StaticCall); result is fresh at execution time */
export interface CoreStaticCallArgs<TSig extends string = string> {
  readonly bind: SignatureBind<TSig>;
  readonly config: Omit<CoreStaticCallConfig, "args" | "functionSignature"> & {
    readonly functionSignature: TSig;
  };
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Invoke a contract with pre-encoded calldata */
export interface CoreRawCallArgs {
  readonly bind: Record<string, never>;
  readonly config: CoreRawCallConfig;
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking */
export interface CoreAsResourceArgs {
  readonly bind: {
    readonly handle: Bindable<"uint256">;
  };
  readonly config: CoreAsResourceConfig;
  readonly guards?: readonly TypedGuard<"resource">[];
}
/** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource */
export interface AaveBorrowArgs {
  readonly bind: Record<string, never>;
  readonly config: AaveBorrowConfig;
  readonly guards?: readonly TypedGuard<"debtBalance">[];
}
/** Repay an Aave v3 variable-rate debt position with the supplied asset. mode: 'exact' passes the input handle amount; mode: 'max' passes type(uint256).max so Aave's Pool clamps paybackAmount to userVariableDebt exactly. Any unspent input is returned through the residual port. */
export interface AaveRepayArgs {
  readonly bind: {
    readonly assetIn: Bindable<"resource">;
    readonly onBehalfOf: Bindable<"address">;
  };
  readonly config: AaveRepayConfig;
  readonly guards?: readonly TypedGuard<"actualRepaid" | "residual">[];
}
/** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual */
export interface AaveRepayWithATokensArgs {
  readonly bind: {
    readonly aTokenIn: Bindable<"resource">;
  };
  readonly config: AaveRepayWithATokensConfig;
  readonly guards?: readonly TypedGuard<"actualRepaid" | "residual">[];
}
/** Claim a specific Aave v3 incentives reward token against a set of receipt-token positions, exposing the claimed amount as a Resource */
export interface AaveClaimRewardsArgs {
  readonly bind: Record<string, never>;
  readonly config: AaveClaimRewardsConfig;
  readonly guards?: readonly TypedGuard<"claimedAmount">[];
}
/** Switch the executionAddress's Aave v3 eMode category. 0 disables eMode. The pool reverts if the switch would make the position unhealthy or if any open borrow is for an asset outside the target category. */
export interface AaveSetEModeArgs {
  readonly bind: Record<string, never>;
  readonly config: AaveSetEModeConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Read the current Aave v3 health factor (WAD-scaled, 1e18; type(uint256).max for users with no debt) by static-calling IPool.getUserAccountData and decomposing the returned tuple. Exposes the healthFactor element as a uint256 handle suitable for use with core.numericInvariant. */
export interface AaveGetHealthFactorArgs {
  readonly bind: Record<string, never>;
  readonly config: AaveGetHealthFactorConfig;
  readonly guards?: readonly TypedGuard<"healthFactor">[];
}
/** Deposit the collateral asset of a Morpho Blue market on behalf of the execution proxy. mode: 'exact' pulls the input handle's amount. mode: 'all' reads the proxy's current ERC20 balance of the market's collateral token and pulls that amount, ignoring the input handle's literal value — note this pulls the proxy's total balance (including unrelated upstream residuals), not just the input port's delivery. Credits Position.collateral on the Morpho singleton; emits no return value and exposes no resource output (the collateral is non-transferable accounting state). */
export interface MorphoBlueSupplyCollateralArgs {
  readonly bind: {
    readonly assetIn: Bindable<"resource">;
  };
  readonly config: MorphoBlueSupplyCollateralConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Withdraw collateral from a Morpho Blue market position to the receiver address. Exposes the withdrawn ERC20 amount as a Resource output. */
export interface MorphoBlueWithdrawCollateralArgs {
  readonly bind: Record<string, never>;
  readonly config: MorphoBlueWithdrawCollateralConfig;
  readonly guards?: readonly TypedGuard<"collateralWithdrawn">[];
}
/** Borrow the loan asset from a Morpho Blue market against existing collateral. Exposes the borrowed amount as a Resource and the (assetsBorrowed, sharesBorrowed) tuple as handles. */
export interface MorphoBlueBorrowArgs {
  readonly bind: Record<string, never>;
  readonly config: MorphoBlueBorrowConfig;
  readonly guards?: readonly TypedGuard<"assetsBorrowed" | "sharesBorrowed">[];
}
/** Repay a Morpho Blue debt position with the supplied asset. mode: 'exact' repays the input handle amount; mode: 'max' reads Position.borrowShares via a precursor static call and repays in shares mode to retire the debt to the wei. Returns any unspent residual as a Resource. */
export interface MorphoBlueRepayArgs {
  readonly bind: {
    readonly assetIn: Bindable<"resource">;
    readonly onBehalfOf: Bindable<"address">;
  };
  readonly config: MorphoBlueRepayConfig;
  readonly guards?: readonly TypedGuard<"actualRepaid" | "sharesRepaid" | "residual">[];
}
/** Supply the loan asset of a Morpho Blue market and receive supplyShares accounting credit. Returns the (assetsSupplied, sharesSupplied) tuple as handles and any unspent residual as a Resource. */
export interface MorphoBlueSupplyArgs {
  readonly bind: {
    readonly assetIn: Bindable<"resource">;
  };
  readonly config: MorphoBlueSupplyConfig;
  readonly guards?: readonly TypedGuard<"assetsSupplied" | "sharesSupplied" | "residual">[];
}
/** Withdraw the loan asset from a Morpho Blue supply position. mode: 'exact' withdraws the configured amount; mode: 'max' reads Position.supplyShares via a precursor static call and burns all shares to retire the supply to the wei. Exposes the withdrawn amount as a Resource. */
export interface MorphoBlueWithdrawArgs {
  readonly bind: Record<string, never>;
  readonly config: MorphoBlueWithdrawConfig;
  readonly guards?: readonly TypedGuard<"assetsWithdrawn" | "sharesWithdrawn">[];
}
/** Read a Morpho Blue Position struct via a static call on the singleton. Exposes (supplyShares, borrowShares, collateral) as handles whose kinds match the on-chain field types (uint256, uint128, uint128). */
export interface MorphoBlueGetPositionArgs {
  readonly bind: Record<string, never>;
  readonly config: MorphoBlueGetPositionConfig;
  readonly guards?: readonly TypedGuard<"supplyShares" | "borrowShares" | "collateral">[];
}
/** Route tokens into a DeFi protocol position via the edge catalog */
export interface LifiZapArgs {
  readonly bind: {
    readonly amountIn: Bindable<"resource">;
    readonly recipient?: Bindable<"address">;
  };
  readonly config: LifiZapConfig;
  readonly guards?: readonly TypedGuard<"amountOut">[];
}
/** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles */
export interface LifiZapAsyncArgs {
  readonly bind: {
    readonly amountIn: Bindable<"resource">;
    readonly recipient: Bindable<"address">;
  };
  readonly config: LifiZapAsyncConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Exact-output (BUY) swap via the Paraswap/Velora Market API: produce exactly `exactAmountOut` of the destination token, pulling only the source needed and exposing the genuinely-unspent source as `unspentIn`. */
export interface ParaswapBuyArgs {
  readonly bind: {
    readonly amountIn: Bindable<"resource">;
  };
  readonly config: ParaswapBuyConfig;
  readonly guards?: readonly TypedGuard<"unspentIn">[];
}
/** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal */
export interface CorePeekArgs {
  readonly bind: Record<string, never>;
  readonly config: CorePeekConfig;
  readonly guards?: readonly TypedGuard<"result">[];
}
/** Swap via Fly's DexAggregator, sized at runtime: the router calldata leaves `amountIn` unset, so an upstream op's output can feed the swap without being known at plan time. Either leg may be the chain-native coin. */
export interface FlySwapArgs {
  readonly bind: {
    readonly amountIn: Bindable<"resource">;
  };
  readonly config: FlySwapConfig;
  readonly guards?: readonly TypedGuard<"unspentIn">[];
}
/** Fund a deferred settlement and commit to a future outcome */
export interface ContinuationSettleArgs {
  readonly bind: {
    readonly input: Bindable<"resource">;
  };
  readonly config: ContinuationSettleConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Deposit two ERC-20 tokens into an existing Uniswap V2 pair (or an ABI-identical fork such as SushiSwap V2) through its Router02 and receive the pair's LP token; unused input returns as residuals. Asserts on chain that the router's factory is `factory`, that the factory's pair for the two tokens is `pair`, and that the pair holds non-zero reserves. Exposes the pool price read before the deposit as `poolPrice`. The deposit is protected only with a `band` guard on `poolPrice` and a `slippage` guard on `liquidity`. Fee-on-transfer tokens are unsupported. */
export interface UniswapV2AddLiquidityArgs {
  readonly bind: {
    readonly tokenA: Bindable<"resource">;
    readonly tokenB: Bindable<"resource">;
  };
  readonly config: UniswapV2AddLiquidityConfig;
  readonly guards?: readonly TypedGuard<"liquidity" | "residualA" | "residualB" | "poolPrice">[];
}
/** Burn a Uniswap V2 LP token (or one of an ABI-identical fork such as SushiSwap V2) through its Router02 and receive both underlying tokens. Asserts on chain that the router's factory is `factory` and that the factory's pair for `tokenA`/`tokenB` is the input LP token. The withdrawal is protected only with a `slippage` guard on each of `tokenA` and `tokenB`. Fee-on-transfer tokens are unsupported: the outputs are the amounts the router reports, which would overstate what such a token delivers. */
export interface UniswapV2RemoveLiquidityArgs {
  readonly bind: {
    readonly liquidity: Bindable<"resource">;
  };
  readonly config: UniswapV2RemoveLiquidityConfig;
  readonly guards?: readonly TypedGuard<"tokenA" | "tokenB">[];
}
/** Open a Uniswap V3 concentrated-liquidity position (or one on an ABI-identical fork) for a tick range, minting the position NFT straight to `recipient`, which must not be the execution address. Exposes the new `tokenId`; unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. */
export interface UniswapV3MintArgs {
  readonly bind: {
    readonly tokenA: Bindable<"resource">;
    readonly tokenB: Bindable<"resource">;
    readonly recipient: Bindable<"address">;
  };
  readonly config: UniswapV3MintConfig;
  readonly guards?: readonly TypedGuard<"tokenId" | "liquidity" | "sqrtPriceX96" | "residualA" | "residualB">[];
}
/** Add two tokens to an existing Uniswap V3 position (or one on an ABI-identical fork). `owner` must own `tokenId`, and the position must hold the two input tokens; both are asserted on chain, since the position manager checks neither. Unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. */
export interface UniswapV3IncreaseLiquidityArgs {
  readonly bind: {
    readonly tokenA: Bindable<"resource">;
    readonly tokenB: Bindable<"resource">;
    readonly owner: Bindable<"address">;
  };
  readonly config: UniswapV3IncreaseLiquidityConfig;
  readonly guards?: readonly TypedGuard<"liquidity" | "sqrtPriceX96" | "residualA" | "residualB">[];
}
/** Swap or bridge tokens through a LI.FI Intents order a solver fills */
export interface LifiIntentsOrderArgs {
  readonly bind: {
    readonly amountIn: Bindable<"resource">;
  };
  readonly config: LifiIntentsOrderConfig;
  readonly guards?: readonly TypedGuard<"unspentIn">[];
}
/** Refund a LI.FI Intents escrow order after its expiry. Anyone may call; the escrow pays the order's user. Only an order the order server reports before delivery (status Open or Signed) is refunded. */
export interface LifiIntentsRefundArgs {
  readonly bind: Record<string, never>;
  readonly config: LifiIntentsRefundConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Step 1 of the early refund of a cross-chain LI.FI Intents order: on the order's output chain, after its fill deadline, record that the output was not filled. Keep the transaction hash for lifiIntents.refundOnNonFill. */
export interface LifiIntentsAttestNonFillArgs {
  readonly bind: Record<string, never>;
  readonly config: LifiIntentsAttestNonFillConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
/** Step 2 of the early refund of a cross-chain LI.FI Intents order: on the order's input chain, prove the non-fill attestation through Polymer and refund the order's user. A resolution_error means the proof is not ready yet; retry. */
export interface LifiIntentsRefundOnNonFillArgs {
  readonly bind: Record<string, never>;
  readonly config: LifiIntentsRefundOnNonFillConfig;
  readonly guards?: readonly TypedGuard<never>[];
}
export interface CoreSplitOutputs {
  readonly a: OutputHandle<"resource">;
  readonly b: OutputHandle<"resource">;
}
export interface CoreSplitAtOutputs {
  readonly head: OutputHandle<"resource">;
  readonly tail: OutputHandle<"resource">;
}
export interface CorePartitionOutputs<TBps extends FamilySource<CorePartitionConfig["bps"]> = FamilySource<CorePartitionConfig["bps"]>> {
  readonly parts: OutputFamilyHandles<TBps>;
}
export interface CoreMergeOutputs {
  readonly merged: OutputHandle<"resource">;
}
export interface LifiSwapOutputs {
  readonly amountOut: OutputHandle<"resource">;
  readonly unspentIn: OutputHandle<"resource">;
}
export interface LifiBridgeOutputs {
  readonly amountOut: OutputHandle<"resource">;
  readonly unspentIn: OutputHandle<"resource">;
}
export interface CoreAddOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreSubtractOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreMultiplyOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreDivideDownOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreDivideUpOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreBpsDownOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreBpsUpOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreBalanceOfOutputs {
  readonly balance: OutputHandle<"resource">;
}
export interface CoreTransferOutputs {
  readonly transferred: OutputHandle<"resource">;
}
export interface CoreRawCallOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface CoreAsResourceOutputs {
  readonly resource: OutputHandle<"resource">;
}
export interface AaveBorrowOutputs {
  readonly borrowed: OutputHandle<"resource">;
  readonly debtBalance: OutputHandle<"uint256">;
}
export interface AaveRepayOutputs {
  readonly actualRepaid: OutputHandle<"uint256">;
  readonly residual: OutputHandle<"resource">;
}
export interface AaveRepayWithATokensOutputs {
  readonly actualRepaid: OutputHandle<"uint256">;
  readonly residual: OutputHandle<"resource">;
}
export interface AaveClaimRewardsOutputs {
  readonly claimed: OutputHandle<"resource">;
  readonly claimedAmount: OutputHandle<"uint256">;
}
export interface AaveGetHealthFactorOutputs {
  readonly healthFactor: OutputHandle<"uint256">;
}
export interface MorphoBlueWithdrawCollateralOutputs {
  readonly withdrawn: OutputHandle<"resource">;
  readonly collateralWithdrawn: OutputHandle<"uint256">;
}
export interface MorphoBlueBorrowOutputs {
  readonly borrowed: OutputHandle<"resource">;
  readonly assetsBorrowed: OutputHandle<"uint256">;
  readonly sharesBorrowed: OutputHandle<"uint256">;
}
export interface MorphoBlueRepayOutputs {
  readonly actualRepaid: OutputHandle<"uint256">;
  readonly sharesRepaid: OutputHandle<"uint256">;
  readonly residual: OutputHandle<"resource">;
}
export interface MorphoBlueSupplyOutputs {
  readonly assetsSupplied: OutputHandle<"uint256">;
  readonly sharesSupplied: OutputHandle<"uint256">;
  readonly residual: OutputHandle<"resource">;
}
export interface MorphoBlueWithdrawOutputs {
  readonly withdrawn: OutputHandle<"resource">;
  readonly assetsWithdrawn: OutputHandle<"uint256">;
  readonly sharesWithdrawn: OutputHandle<"uint256">;
}
export interface MorphoBlueGetPositionOutputs {
  readonly supplyShares: OutputHandle<"uint256">;
  readonly borrowShares: OutputHandle<"uint128">;
  readonly collateral: OutputHandle<"uint128">;
}
export interface LifiZapOutputs {
  readonly amountOut: OutputHandle<"resource">;
}
export interface LifiZapAsyncOutputs {
  readonly amountOut: OutputHandle<"resource">;
}
export interface ParaswapBuyOutputs {
  readonly amountOut: OutputHandle<"resource">;
  readonly unspentIn: OutputHandle<"resource">;
}
export interface CorePeekOutputs {
  readonly result: OutputHandle<"uint256">;
}
export interface FlySwapOutputs {
  readonly amountOut: OutputHandle<"resource">;
  readonly unspentIn: OutputHandle<"resource">;
}
export interface ContinuationSettleOutputs {
  readonly output: OutputHandle<"resource">;
}
export interface UniswapV2AddLiquidityOutputs {
  readonly liquidity: OutputHandle<"resource">;
  readonly residualA: OutputHandle<"resource">;
  readonly residualB: OutputHandle<"resource">;
  readonly poolPrice: OutputHandle<"uint256">;
}
export interface UniswapV2RemoveLiquidityOutputs {
  readonly tokenA: OutputHandle<"resource">;
  readonly tokenB: OutputHandle<"resource">;
}
export interface UniswapV3MintOutputs {
  readonly tokenId: OutputHandle<"uint256">;
  readonly liquidity: OutputHandle<"uint256">;
  readonly sqrtPriceX96: OutputHandle<"uint256">;
  readonly residualA: OutputHandle<"resource">;
  readonly residualB: OutputHandle<"resource">;
}
export interface UniswapV3IncreaseLiquidityOutputs {
  readonly liquidity: OutputHandle<"uint256">;
  readonly sqrtPriceX96: OutputHandle<"uint256">;
  readonly residualA: OutputHandle<"resource">;
  readonly residualB: OutputHandle<"resource">;
}
export interface LifiIntentsOrderOutputs {
  readonly amountOut: OutputHandle<"resource">;
  readonly unspentIn: OutputHandle<"resource">;
}
export type GeneratedOps = {
  readonly core: {
    /** Split a resource into two outputs by basis-point ratio. Output `a` receives `bps` of the source, rounded up, and `b` takes the remainder. — original id: "core.split" */
    readonly split: (nodeId: string, args: CoreSplitArgs) => CoreSplitOutputs;
    /** Split a resource at a fixed amount. Output `head` receives `min(source, amount)`; `tail` receives the rest, and is 0 (omitted when unspent) when the source is at or below `amount`. — original id: "core.splitAt" */
    readonly splitAt: (nodeId: string, args: CoreSplitAtArgs) => CoreSplitAtOutputs;
    /** Partition a resource into one output per basis-point share. `bps` lists 2 to 16 shares summing to 10000; output `parts.i` receives share i, rounded down, and the last part takes the remainder. — original id: "core.partition" */
    readonly partition: <const TBps extends FamilySource<CorePartitionConfig["bps"]>>(nodeId: string, args: CorePartitionArgs<TBps>) => CorePartitionOutputs<TBps>;
    /** Merge two same-token resources into one by addition — original id: "core.merge" */
    readonly merge: (nodeId: string, args: CoreMergeArgs) => CoreMergeOutputs;
    /** Add two unsigned integers (a + b) — original id: "core.add" */
    readonly add: (nodeId: string, args: CoreAddArgs) => CoreAddOutputs;
    /** Subtract b from a (a - b); reverts on underflow — original id: "core.subtract" */
    readonly subtract: (nodeId: string, args: CoreSubtractArgs) => CoreSubtractOutputs;
    /** Multiply two unsigned integers (a * b) — original id: "core.multiply" */
    readonly multiply: (nodeId: string, args: CoreMultiplyArgs) => CoreMultiplyOutputs;
    /** Divide a by b, rounding toward zero — original id: "core.divideDown" */
    readonly divideDown: (nodeId: string, args: CoreDivideDownArgs) => CoreDivideDownOutputs;
    /** Divide a by b, rounding away from zero — original id: "core.divideUp" */
    readonly divideUp: (nodeId: string, args: CoreDivideUpArgs) => CoreDivideUpOutputs;
    /** Multiply value by basis points and divide by 10000, rounding down — original id: "core.bpsDown" */
    readonly bpsDown: (nodeId: string, args: CoreBpsDownArgs) => CoreBpsDownOutputs;
    /** Multiply value by basis points and divide by 10000, rounding up — original id: "core.bpsUp" */
    readonly bpsUp: (nodeId: string, args: CoreBpsUpArgs) => CoreBpsUpOutputs;
    /** Assert a == b; reverts if not equal — original id: "core.assertEqual" */
    readonly assertEqual: (nodeId: string, args: CoreAssertEqualArgs) => void;
    /** Assert a != b; reverts if equal — original id: "core.assertNotEqual" */
    readonly assertNotEqual: (nodeId: string, args: CoreAssertNotEqualArgs) => void;
    /** Assert a > b; reverts if a <= b — original id: "core.assertGt" */
    readonly assertGt: (nodeId: string, args: CoreAssertGtArgs) => void;
    /** Assert a >= b; reverts if a < b — original id: "core.assertGte" */
    readonly assertGte: (nodeId: string, args: CoreAssertGteArgs) => void;
    /** Assert a < b; reverts if a >= b — original id: "core.assertLt" */
    readonly assertLt: (nodeId: string, args: CoreAssertLtArgs) => void;
    /** Assert a <= b; reverts if a > b — original id: "core.assertLte" */
    readonly assertLte: (nodeId: string, args: CoreAssertLteArgs) => void;
    /** Assert min <= value <= max; reverts if value is outside the range — original id: "core.assertInRange" */
    readonly assertInRange: (nodeId: string, args: CoreAssertInRangeArgs) => void;
    /** Approve an ERC20 spender for the given token and amount — original id: "core.approve" */
    readonly approve: (nodeId: string, args: CoreApproveArgs) => void;
    /** Read an ERC20 balance, producing a resource — original id: "core.balanceOf" */
    readonly balanceOf: (nodeId: string, args: CoreBalanceOfArgs) => CoreBalanceOfOutputs;
    /** Transfer the whole input resource to a recipient address. To send part of a resource, split it first with `core.split` or `core.splitAt`. — original id: "core.transfer" */
    readonly transfer: (nodeId: string, args: CoreTransferArgs) => CoreTransferOutputs;
    /** Emit a custom on-chain event carrying 1 32-byte payload value. The value becomes a non-indexed data word in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). — original id: "core.emitEvent1" */
    readonly emitEvent1: (nodeId: string, args: CoreEmitEvent1Args) => void;
    /** Emit a custom on-chain event carrying 2 32-byte payload values. The values become non-indexed data words in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). — original id: "core.emitEvent2" */
    readonly emitEvent2: (nodeId: string, args: CoreEmitEvent2Args) => void;
    /** Emit a custom on-chain event carrying 3 32-byte payload values. The values become non-indexed data words in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). — original id: "core.emitEvent3" */
    readonly emitEvent3: (nodeId: string, args: CoreEmitEvent3Args) => void;
    /** Emit a custom on-chain event carrying 4 32-byte payload values. The values become non-indexed data words in a fixed VM log event; the signature is hashed into a discriminator word (it is NOT an indexed EVM topic). — original id: "core.emitEvent4" */
    readonly emitEvent4: (nodeId: string, args: CoreEmitEvent4Args) => void;
    /** Invoke a smart contract function, optionally spending a token resource — original id: "core.call" */
    readonly call: <TSig extends string>(nodeId: string, args: CoreCallArgs<TSig>) => CoreCallResult<TSig>;
    /** Read from a smart contract at runtime (StaticCall); result is fresh at execution time — original id: "core.staticCall" */
    readonly staticCall: <TSig extends string>(nodeId: string, args: CoreStaticCallArgs<TSig>) => StaticCallResult<TSig>;
    /** Invoke a contract with pre-encoded calldata — original id: "core.rawCall" */
    readonly rawCall: (nodeId: string, args: CoreRawCallArgs) => CoreRawCallOutputs;
    /** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking — original id: "core.asResource" */
    readonly asResource: (nodeId: string, args: CoreAsResourceArgs) => CoreAsResourceOutputs;
    /** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal — original id: "core.peek" */
    readonly peek: (nodeId: string, args: CorePeekArgs) => CorePeekOutputs;
  };
  readonly lifi: {
    /** Swap tokens via the LI.FI aggregator API — original id: "lifi.swap" */
    readonly swap: (nodeId: string, args: LifiSwapArgs) => LifiSwapOutputs;
    /** Bridge tokens to another chain via the LI.FI aggregator API — original id: "lifi.bridge" */
    readonly bridge: (nodeId: string, args: LifiBridgeArgs) => LifiBridgeOutputs;
    /** Route tokens into a DeFi protocol position via the edge catalog — original id: "lifi.zap" */
    readonly zap: (nodeId: string, args: LifiZapArgs) => LifiZapOutputs;
    /** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles — original id: "lifi.zapAsync" */
    readonly zapAsync: (nodeId: string, args: LifiZapAsyncArgs) => LifiZapAsyncOutputs;
  };
  readonly invariant: {
    /** Assert that an account holds at least a minimum token balance — original id: "invariant.balanceAtLeast" */
    readonly balanceAtLeast: (nodeId: string, args: InvariantBalanceAtLeastArgs) => void;
    /** Assert that an account holds exactly an expected token balance — original id: "invariant.balanceEquals" */
    readonly balanceEquals: (nodeId: string, args: InvariantBalanceEqualsArgs) => void;
    /** Assert that an account holds at most a maximum token balance — original id: "invariant.balanceAtMost" */
    readonly balanceAtMost: (nodeId: string, args: InvariantBalanceAtMostArgs) => void;
    /** Assert that an account's token balance is between a minimum and a maximum (inclusive) — original id: "invariant.balanceInRange" */
    readonly balanceInRange: (nodeId: string, args: InvariantBalanceInRangeArgs) => void;
    /** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner — original id: "invariant.allowanceAtLeast" */
    readonly allowanceAtLeast: (nodeId: string, args: InvariantAllowanceAtLeastArgs) => void;
    /** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount — original id: "invariant.allowanceEquals" */
    readonly allowanceEquals: (nodeId: string, args: InvariantAllowanceEqualsArgs) => void;
    /** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner — original id: "invariant.allowanceAtMost" */
    readonly allowanceAtMost: (nodeId: string, args: InvariantAllowanceAtMostArgs) => void;
    /** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) — original id: "invariant.allowanceInRange" */
    readonly allowanceInRange: (nodeId: string, args: InvariantAllowanceInRangeArgs) => void;
    /** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation — original id: "invariant.numeric" */
    readonly numeric: (nodeId: string, args: InvariantNumericArgs) => void;
    /** Assert min <= value <= max against constant bounds; reverts if outside the range — original id: "invariant.numericInRange" */
    readonly numericInRange: (nodeId: string, args: InvariantNumericInRangeArgs) => void;
    /** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation — original id: "invariant.gte" */
    readonly gte: (nodeId: string, args: InvariantGteArgs) => void;
    /** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation — original id: "invariant.gt" */
    readonly gt: (nodeId: string, args: InvariantGtArgs) => void;
    /** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation — original id: "invariant.lte" */
    readonly lte: (nodeId: string, args: InvariantLteArgs) => void;
    /** Assert a uint256 value is strictly less than a constant threshold; reverts on violation — original id: "invariant.lt" */
    readonly lt: (nodeId: string, args: InvariantLtArgs) => void;
    /** Assert a uint256 value equals a constant threshold; reverts on violation — original id: "invariant.eq" */
    readonly eq: (nodeId: string, args: InvariantEqArgs) => void;
    /** Assert a uint256 value does not equal a constant threshold; reverts on violation — original id: "invariant.neq" */
    readonly neq: (nodeId: string, args: InvariantNeqArgs) => void;
  };
  readonly aave: {
    /** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource — original id: "aave.borrow" */
    readonly borrow: (nodeId: string, args: AaveBorrowArgs) => AaveBorrowOutputs;
    /** Repay an Aave v3 variable-rate debt position with the supplied asset. mode: 'exact' passes the input handle amount; mode: 'max' passes type(uint256).max so Aave's Pool clamps paybackAmount to userVariableDebt exactly. Any unspent input is returned through the residual port. — original id: "aave.repay" */
    readonly repay: (nodeId: string, args: AaveRepayArgs) => AaveRepayOutputs;
    /** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual — original id: "aave.repayWithATokens" */
    readonly repayWithATokens: (nodeId: string, args: AaveRepayWithATokensArgs) => AaveRepayWithATokensOutputs;
    /** Claim a specific Aave v3 incentives reward token against a set of receipt-token positions, exposing the claimed amount as a Resource — original id: "aave.claimRewards" */
    readonly claimRewards: (nodeId: string, args: AaveClaimRewardsArgs) => AaveClaimRewardsOutputs;
    /** Switch the executionAddress's Aave v3 eMode category. 0 disables eMode. The pool reverts if the switch would make the position unhealthy or if any open borrow is for an asset outside the target category. — original id: "aave.setEMode" */
    readonly setEMode: (nodeId: string, args: AaveSetEModeArgs) => void;
    /** Read the current Aave v3 health factor (WAD-scaled, 1e18; type(uint256).max for users with no debt) by static-calling IPool.getUserAccountData and decomposing the returned tuple. Exposes the healthFactor element as a uint256 handle suitable for use with core.numericInvariant. — original id: "aave.getHealthFactor" */
    readonly getHealthFactor: (nodeId: string, args: AaveGetHealthFactorArgs) => AaveGetHealthFactorOutputs;
  };
  readonly morphoBlue: {
    /** Deposit the collateral asset of a Morpho Blue market on behalf of the execution proxy. mode: 'exact' pulls the input handle's amount. mode: 'all' reads the proxy's current ERC20 balance of the market's collateral token and pulls that amount, ignoring the input handle's literal value — note this pulls the proxy's total balance (including unrelated upstream residuals), not just the input port's delivery. Credits Position.collateral on the Morpho singleton; emits no return value and exposes no resource output (the collateral is non-transferable accounting state). — original id: "morphoBlue.supplyCollateral" */
    readonly supplyCollateral: (nodeId: string, args: MorphoBlueSupplyCollateralArgs) => void;
    /** Withdraw collateral from a Morpho Blue market position to the receiver address. Exposes the withdrawn ERC20 amount as a Resource output. — original id: "morphoBlue.withdrawCollateral" */
    readonly withdrawCollateral: (nodeId: string, args: MorphoBlueWithdrawCollateralArgs) => MorphoBlueWithdrawCollateralOutputs;
    /** Borrow the loan asset from a Morpho Blue market against existing collateral. Exposes the borrowed amount as a Resource and the (assetsBorrowed, sharesBorrowed) tuple as handles. — original id: "morphoBlue.borrow" */
    readonly borrow: (nodeId: string, args: MorphoBlueBorrowArgs) => MorphoBlueBorrowOutputs;
    /** Repay a Morpho Blue debt position with the supplied asset. mode: 'exact' repays the input handle amount; mode: 'max' reads Position.borrowShares via a precursor static call and repays in shares mode to retire the debt to the wei. Returns any unspent residual as a Resource. — original id: "morphoBlue.repay" */
    readonly repay: (nodeId: string, args: MorphoBlueRepayArgs) => MorphoBlueRepayOutputs;
    /** Supply the loan asset of a Morpho Blue market and receive supplyShares accounting credit. Returns the (assetsSupplied, sharesSupplied) tuple as handles and any unspent residual as a Resource. — original id: "morphoBlue.supply" */
    readonly supply: (nodeId: string, args: MorphoBlueSupplyArgs) => MorphoBlueSupplyOutputs;
    /** Withdraw the loan asset from a Morpho Blue supply position. mode: 'exact' withdraws the configured amount; mode: 'max' reads Position.supplyShares via a precursor static call and burns all shares to retire the supply to the wei. Exposes the withdrawn amount as a Resource. — original id: "morphoBlue.withdraw" */
    readonly withdraw: (nodeId: string, args: MorphoBlueWithdrawArgs) => MorphoBlueWithdrawOutputs;
    /** Read a Morpho Blue Position struct via a static call on the singleton. Exposes (supplyShares, borrowShares, collateral) as handles whose kinds match the on-chain field types (uint256, uint128, uint128). — original id: "morphoBlue.getPosition" */
    readonly getPosition: (nodeId: string, args: MorphoBlueGetPositionArgs) => MorphoBlueGetPositionOutputs;
  };
  readonly continuation: {
    /** Fund a deferred settlement and commit to a future outcome — original id: "continuation.settle" */
    readonly settle: (nodeId: string, args: ContinuationSettleArgs) => ContinuationSettleOutputs;
  };
  readonly paraswap: {
    /** Exact-output (BUY) swap via the Paraswap/Velora Market API: produce exactly `exactAmountOut` of the destination token, pulling only the source needed and exposing the genuinely-unspent source as `unspentIn`. — original id: "paraswap.buy" */
    readonly buy: (nodeId: string, args: ParaswapBuyArgs) => ParaswapBuyOutputs;
  };
  readonly fly: {
    /** Swap via Fly's DexAggregator, sized at runtime: the router calldata leaves `amountIn` unset, so an upstream op's output can feed the swap without being known at plan time. Either leg may be the chain-native coin. — original id: "fly.swap" */
    readonly swap: (nodeId: string, args: FlySwapArgs) => FlySwapOutputs;
  };
  readonly uniswapV2: {
    /** Deposit two ERC-20 tokens into an existing Uniswap V2 pair (or an ABI-identical fork such as SushiSwap V2) through its Router02 and receive the pair's LP token; unused input returns as residuals. Asserts on chain that the router's factory is `factory`, that the factory's pair for the two tokens is `pair`, and that the pair holds non-zero reserves. Exposes the pool price read before the deposit as `poolPrice`. The deposit is protected only with a `band` guard on `poolPrice` and a `slippage` guard on `liquidity`. Fee-on-transfer tokens are unsupported. — original id: "uniswapV2.addLiquidity" */
    readonly addLiquidity: (nodeId: string, args: UniswapV2AddLiquidityArgs) => UniswapV2AddLiquidityOutputs;
    /** Burn a Uniswap V2 LP token (or one of an ABI-identical fork such as SushiSwap V2) through its Router02 and receive both underlying tokens. Asserts on chain that the router's factory is `factory` and that the factory's pair for `tokenA`/`tokenB` is the input LP token. The withdrawal is protected only with a `slippage` guard on each of `tokenA` and `tokenB`. Fee-on-transfer tokens are unsupported: the outputs are the amounts the router reports, which would overstate what such a token delivers. — original id: "uniswapV2.removeLiquidity" */
    readonly removeLiquidity: (nodeId: string, args: UniswapV2RemoveLiquidityArgs) => UniswapV2RemoveLiquidityOutputs;
  };
  readonly uniswapV3: {
    /** Open a Uniswap V3 concentrated-liquidity position (or one on an ABI-identical fork) for a tick range, minting the position NFT straight to `recipient`, which must not be the execution address. Exposes the new `tokenId`; unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. — original id: "uniswapV3.mint" */
    readonly mint: (nodeId: string, args: UniswapV3MintArgs) => UniswapV3MintOutputs;
    /** Add two tokens to an existing Uniswap V3 position (or one on an ABI-identical fork). `owner` must own `tokenId`, and the position must hold the two input tokens; both are asserted on chain, since the position manager checks neither. Unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. — original id: "uniswapV3.increaseLiquidity" */
    readonly increaseLiquidity: (nodeId: string, args: UniswapV3IncreaseLiquidityArgs) => UniswapV3IncreaseLiquidityOutputs;
  };
  readonly lifiIntents: {
    /** Swap or bridge tokens through a LI.FI Intents order a solver fills — original id: "lifiIntents.order" */
    readonly order: (nodeId: string, args: LifiIntentsOrderArgs) => LifiIntentsOrderOutputs;
    /** Refund a LI.FI Intents escrow order after its expiry. Anyone may call; the escrow pays the order's user. Only an order the order server reports before delivery (status Open or Signed) is refunded. — original id: "lifiIntents.refund" */
    readonly refund: (nodeId: string, args: LifiIntentsRefundArgs) => void;
    /** Step 1 of the early refund of a cross-chain LI.FI Intents order: on the order's output chain, after its fill deadline, record that the output was not filled. Keep the transaction hash for lifiIntents.refundOnNonFill. — original id: "lifiIntents.attestNonFill" */
    readonly attestNonFill: (nodeId: string, args: LifiIntentsAttestNonFillArgs) => void;
    /** Step 2 of the early refund of a cross-chain LI.FI Intents order: on the order's input chain, prove the non-fill attestation through Polymer and refund the order's user. A resolution_error means the proof is not ready yet; retry. — original id: "lifiIntents.refundOnNonFill" */
    readonly refundOnNonFill: (nodeId: string, args: LifiIntentsRefundOnNonFillArgs) => void;
  };
};
export declare const bindGeneratedOps: (builder: FlowBuilderInternal) => GeneratedOps;
//#endregion
//# sourceMappingURL=operations.generated.d.cts.map