@lifi/composer-sdk 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/generated/operations.generated.ts"],"sourcesContent":["// AUTO-GENERATED from manifest.json — do not edit by hand.\n// Regenerate with: yarn workspace @lifi/composer-sdk generate\n\nimport type { FlowBuilderInternal } from '../authoring/FlowBuilderCore.js';\nimport type { Bindable, OutputHandle } from '../authoring/handles.js';\nimport type {\n CoreCallResult,\n SignatureBind,\n StaticCallResult,\n} from '../authoring/signatureArgs.js';\nimport {\n buildCallWireFormat,\n buildStaticCallWireFormat,\n} from '../authoring/signatureArgs.js';\nimport type { TypedGuard } from '../types.js';\n\nimport type {\n AaveBorrowConfig,\n AaveClaimRewardsConfig,\n AaveRepayConfig,\n AaveRepayWithATokensConfig,\n AaveSetEModeConfig,\n CoreApproveConfig,\n CoreAsResourceConfig,\n CoreBalanceOfConfig,\n CoreBpsDownConfig,\n CoreBpsUpConfig,\n CoreCallConfig,\n CoreEmitEvent1Config,\n CoreEmitEvent2Config,\n CoreEmitEvent3Config,\n CoreEmitEvent4Config,\n CorePeekConfig,\n CoreRawCallConfig,\n CoreSplitConfig,\n CoreStaticCallConfig,\n CoreTransferConfig,\n FlySwapConfig,\n InvariantEqConfig,\n InvariantGtConfig,\n InvariantGteConfig,\n InvariantLtConfig,\n InvariantLteConfig,\n InvariantNeqConfig,\n InvariantNumericConfig,\n InvariantNumericInRangeConfig,\n LifiBridgeConfig,\n LifiSwapConfig,\n LifiZapAsyncConfig,\n LifiZapConfig,\n MorphoBlueSupplyCollateralConfig,\n MorphoBlueWithdrawCollateralConfig,\n ParaswapBuyConfig,\n} from './config.generated.js';\n\n/** Split a resource into two outputs by basis-point ratio */\nexport interface CoreSplitArgs {\n readonly bind: {\n readonly source: Bindable<'resource'>;\n };\n readonly config: CoreSplitConfig;\n readonly guards?: readonly TypedGuard<'a' | 'b'>[];\n}\n\n/** Merge two same-token resources into one by addition */\nexport interface CoreMergeArgs {\n readonly bind: {\n readonly a: Bindable<'resource'>;\n readonly b: Bindable<'resource'>;\n };\n readonly guards?: readonly TypedGuard<'merged'>[];\n}\n\n/** Swap tokens via the LI.FI aggregator API */\nexport interface LifiSwapArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: LifiSwapConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\n/** Bridge tokens to another chain via the LI.FI aggregator API */\nexport interface LifiBridgeArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: LifiBridgeConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\n/** Assert that an account holds at least a minimum token balance */\nexport interface InvariantBalanceAtLeastArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that an account holds exactly an expected token balance */\nexport interface InvariantBalanceEqualsArgs {\n readonly bind: {\n readonly expectedAmount: Bindable<'resource'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that an account holds at most a maximum token balance */\nexport interface InvariantBalanceAtMostArgs {\n readonly bind: {\n readonly maximumAmount: Bindable<'resource'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that an account's token balance is between a minimum and a maximum (inclusive) */\nexport interface InvariantBalanceInRangeArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly maximumAmount: Bindable<'uint256'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner */\nexport interface InvariantAllowanceAtLeastArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount */\nexport interface InvariantAllowanceEqualsArgs {\n readonly bind: {\n readonly expectedAmount: Bindable<'resource'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner */\nexport interface InvariantAllowanceAtMostArgs {\n readonly bind: {\n readonly maximumAmount: Bindable<'resource'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) */\nexport interface InvariantAllowanceInRangeArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly maximumAmount: Bindable<'uint256'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation */\nexport interface InvariantNumericArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantNumericConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert min <= value <= max against constant bounds; reverts if outside the range */\nexport interface InvariantNumericInRangeArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantNumericInRangeConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation */\nexport interface InvariantGteArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantGteConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation */\nexport interface InvariantGtArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantGtConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation */\nexport interface InvariantLteArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantLteConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is strictly less than a constant threshold; reverts on violation */\nexport interface InvariantLtArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantLtConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value equals a constant threshold; reverts on violation */\nexport interface InvariantEqArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantEqConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value does not equal a constant threshold; reverts on violation */\nexport interface InvariantNeqArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantNeqConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Add two unsigned integers (a + b) */\nexport interface CoreAddArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Subtract b from a (a - b); reverts on underflow */\nexport interface CoreSubtractArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Multiply two unsigned integers (a * b) */\nexport interface CoreMultiplyArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Divide a by b, rounding toward zero */\nexport interface CoreDivideDownArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Divide a by b, rounding away from zero */\nexport interface CoreDivideUpArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Multiply value by basis points and divide by 10000, rounding down */\nexport interface CoreBpsDownArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: CoreBpsDownConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Multiply value by basis points and divide by 10000, rounding up */\nexport interface CoreBpsUpArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: CoreBpsUpConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Assert a == b; reverts if not equal */\nexport interface CoreAssertEqualArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a != b; reverts if equal */\nexport interface CoreAssertNotEqualArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a > b; reverts if a <= b */\nexport interface CoreAssertGtArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a >= b; reverts if a < b */\nexport interface CoreAssertGteArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a < b; reverts if a >= b */\nexport interface CoreAssertLtArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a <= b; reverts if a > b */\nexport interface CoreAssertLteArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert min <= value <= max; reverts if value is outside the range */\nexport interface CoreAssertInRangeArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n readonly min: Bindable<'uint256'>;\n readonly max: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Approve an ERC20 spender for the given token and amount */\nexport interface CoreApproveArgs {\n readonly bind: {\n readonly amount: Bindable<'resource'>;\n };\n readonly config: CoreApproveConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Read an ERC20 balance, producing a resource */\nexport interface CoreBalanceOfArgs {\n readonly bind: Record<string, never>;\n readonly config: CoreBalanceOfConfig;\n readonly guards?: readonly TypedGuard<'balance'>[];\n}\n\n/** Transfer tokens to a recipient address, optionally specifying a partial amount */\nexport interface CoreTransferArgs {\n readonly bind: {\n readonly amount: Bindable<'resource'>;\n readonly recipient: Bindable<'address'>;\n };\n readonly config: CoreTransferConfig;\n readonly guards?: readonly TypedGuard<'transferred' | 'remainder'>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent1Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent1Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent2Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n readonly value1: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent2Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent3Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n readonly value1: Bindable<'bytes32'>;\n readonly value2: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent3Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent4Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n readonly value1: Bindable<'bytes32'>;\n readonly value2: Bindable<'bytes32'>;\n readonly value3: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent4Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Invoke a smart contract function, optionally spending a token resource */\nexport interface CoreCallArgs<TSig extends string = string> {\n readonly resource?: Bindable<'resource'>;\n readonly bind: SignatureBind<TSig>;\n readonly config: Omit<CoreCallConfig, 'args' | 'functionSignature'> & {\n readonly functionSignature: TSig;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Read from a smart contract at runtime (StaticCall); result is fresh at execution time */\nexport interface CoreStaticCallArgs<TSig extends string = string> {\n readonly bind: SignatureBind<TSig>;\n readonly config: Omit<CoreStaticCallConfig, 'args' | 'functionSignature'> & {\n readonly functionSignature: TSig;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Invoke a contract with pre-encoded calldata */\nexport interface CoreRawCallArgs {\n readonly bind: Record<string, never>;\n readonly config: CoreRawCallConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking */\nexport interface CoreAsResourceArgs {\n readonly bind: {\n readonly handle: Bindable<'uint256'>;\n };\n readonly config: CoreAsResourceConfig;\n readonly guards?: readonly TypedGuard<'resource'>[];\n}\n\n/** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource */\nexport interface AaveBorrowArgs {\n readonly bind: Record<string, never>;\n readonly config: AaveBorrowConfig;\n readonly guards?: readonly TypedGuard<'debtBalance'>[];\n}\n\n/** 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. */\nexport interface AaveRepayArgs {\n readonly bind: {\n readonly assetIn: Bindable<'resource'>;\n readonly onBehalfOf: Bindable<'address'>;\n };\n readonly config: AaveRepayConfig;\n readonly guards?: readonly TypedGuard<'actualRepaid' | 'residual'>[];\n}\n\n/** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual */\nexport interface AaveRepayWithATokensArgs {\n readonly bind: {\n readonly aTokenIn: Bindable<'resource'>;\n };\n readonly config: AaveRepayWithATokensConfig;\n readonly guards?: readonly TypedGuard<'actualRepaid' | 'residual'>[];\n}\n\n/** Claim a specific Aave v3 incentives reward token against a set of receipt-token positions, exposing the claimed amount as a Resource */\nexport interface AaveClaimRewardsArgs {\n readonly bind: Record<string, never>;\n readonly config: AaveClaimRewardsConfig;\n readonly guards?: readonly TypedGuard<'claimedAmount'>[];\n}\n\n/** 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. */\nexport interface AaveSetEModeArgs {\n readonly bind: Record<string, never>;\n readonly config: AaveSetEModeConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface MorphoBlueSupplyCollateralArgs {\n readonly bind: {\n readonly assetIn: Bindable<'resource'>;\n };\n readonly config: MorphoBlueSupplyCollateralConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Withdraw collateral from a Morpho Blue market position to the receiver address. Exposes the withdrawn ERC20 amount as a Resource output. */\nexport interface MorphoBlueWithdrawCollateralArgs {\n readonly bind: Record<string, never>;\n readonly config: MorphoBlueWithdrawCollateralConfig;\n readonly guards?: readonly TypedGuard<'collateralWithdrawn'>[];\n}\n\n/** Route tokens into a DeFi protocol position via the edge catalog */\nexport interface LifiZapArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n readonly recipient?: Bindable<'address'>;\n };\n readonly config: LifiZapConfig;\n readonly guards?: readonly TypedGuard<'amountOut'>[];\n}\n\n/** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles */\nexport interface LifiZapAsyncArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n readonly recipient: Bindable<'address'>;\n };\n readonly config: LifiZapAsyncConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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`. */\nexport interface ParaswapBuyArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: ParaswapBuyConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\n/** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal */\nexport interface CorePeekArgs {\n readonly bind: Record<string, never>;\n readonly config: CorePeekConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** 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. */\nexport interface FlySwapArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: FlySwapConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\nexport interface CoreSplitOutputs {\n readonly a: OutputHandle<'resource'>;\n readonly b: OutputHandle<'resource'>;\n}\n\nexport interface CoreMergeOutputs {\n readonly merged: OutputHandle<'resource'>;\n}\n\nexport interface LifiSwapOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport interface LifiBridgeOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport interface CoreAddOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreSubtractOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreMultiplyOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreDivideDownOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreDivideUpOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreBpsDownOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreBpsUpOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreBalanceOfOutputs {\n readonly balance: OutputHandle<'resource'>;\n}\n\nexport interface CoreTransferOutputs {\n readonly transferred: OutputHandle<'resource'>;\n readonly remainder: OutputHandle<'resource'>;\n}\n\nexport interface CoreRawCallOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreAsResourceOutputs {\n readonly resource: OutputHandle<'resource'>;\n}\n\nexport interface AaveBorrowOutputs {\n readonly borrowed: OutputHandle<'resource'>;\n readonly debtBalance: OutputHandle<'uint256'>;\n}\n\nexport interface AaveRepayOutputs {\n readonly actualRepaid: OutputHandle<'uint256'>;\n readonly residual: OutputHandle<'resource'>;\n}\n\nexport interface AaveRepayWithATokensOutputs {\n readonly actualRepaid: OutputHandle<'uint256'>;\n readonly residual: OutputHandle<'resource'>;\n}\n\nexport interface AaveClaimRewardsOutputs {\n readonly claimed: OutputHandle<'resource'>;\n readonly claimedAmount: OutputHandle<'uint256'>;\n}\n\nexport interface MorphoBlueWithdrawCollateralOutputs {\n readonly withdrawn: OutputHandle<'resource'>;\n readonly collateralWithdrawn: OutputHandle<'uint256'>;\n}\n\nexport interface LifiZapOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n}\n\nexport interface LifiZapAsyncOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n}\n\nexport interface ParaswapBuyOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport interface CorePeekOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface FlySwapOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport type GeneratedOps = {\n readonly core: {\n /** Split a resource into two outputs by basis-point ratio — original id: \"core.split\" */\n readonly split: (nodeId: string, args: CoreSplitArgs) => CoreSplitOutputs;\n /** Merge two same-token resources into one by addition — original id: \"core.merge\" */\n readonly merge: (nodeId: string, args: CoreMergeArgs) => CoreMergeOutputs;\n /** Add two unsigned integers (a + b) — original id: \"core.add\" */\n readonly add: (nodeId: string, args: CoreAddArgs) => CoreAddOutputs;\n /** Subtract b from a (a - b); reverts on underflow — original id: \"core.subtract\" */\n readonly subtract: (\n nodeId: string,\n args: CoreSubtractArgs,\n ) => CoreSubtractOutputs;\n /** Multiply two unsigned integers (a * b) — original id: \"core.multiply\" */\n readonly multiply: (\n nodeId: string,\n args: CoreMultiplyArgs,\n ) => CoreMultiplyOutputs;\n /** Divide a by b, rounding toward zero — original id: \"core.divideDown\" */\n readonly divideDown: (\n nodeId: string,\n args: CoreDivideDownArgs,\n ) => CoreDivideDownOutputs;\n /** Divide a by b, rounding away from zero — original id: \"core.divideUp\" */\n readonly divideUp: (\n nodeId: string,\n args: CoreDivideUpArgs,\n ) => CoreDivideUpOutputs;\n /** Multiply value by basis points and divide by 10000, rounding down — original id: \"core.bpsDown\" */\n readonly bpsDown: (\n nodeId: string,\n args: CoreBpsDownArgs,\n ) => CoreBpsDownOutputs;\n /** Multiply value by basis points and divide by 10000, rounding up — original id: \"core.bpsUp\" */\n readonly bpsUp: (nodeId: string, args: CoreBpsUpArgs) => CoreBpsUpOutputs;\n /** Assert a == b; reverts if not equal — original id: \"core.assertEqual\" */\n readonly assertEqual: (nodeId: string, args: CoreAssertEqualArgs) => void;\n /** Assert a != b; reverts if equal — original id: \"core.assertNotEqual\" */\n readonly assertNotEqual: (\n nodeId: string,\n args: CoreAssertNotEqualArgs,\n ) => void;\n /** Assert a > b; reverts if a <= b — original id: \"core.assertGt\" */\n readonly assertGt: (nodeId: string, args: CoreAssertGtArgs) => void;\n /** Assert a >= b; reverts if a < b — original id: \"core.assertGte\" */\n readonly assertGte: (nodeId: string, args: CoreAssertGteArgs) => void;\n /** Assert a < b; reverts if a >= b — original id: \"core.assertLt\" */\n readonly assertLt: (nodeId: string, args: CoreAssertLtArgs) => void;\n /** Assert a <= b; reverts if a > b — original id: \"core.assertLte\" */\n readonly assertLte: (nodeId: string, args: CoreAssertLteArgs) => void;\n /** Assert min <= value <= max; reverts if value is outside the range — original id: \"core.assertInRange\" */\n readonly assertInRange: (\n nodeId: string,\n args: CoreAssertInRangeArgs,\n ) => void;\n /** Approve an ERC20 spender for the given token and amount — original id: \"core.approve\" */\n readonly approve: (nodeId: string, args: CoreApproveArgs) => void;\n /** Read an ERC20 balance, producing a resource — original id: \"core.balanceOf\" */\n readonly balanceOf: (\n nodeId: string,\n args: CoreBalanceOfArgs,\n ) => CoreBalanceOfOutputs;\n /** Transfer tokens to a recipient address, optionally specifying a partial amount — original id: \"core.transfer\" */\n readonly transfer: (\n nodeId: string,\n args: CoreTransferArgs,\n ) => CoreTransferOutputs;\n /** 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\" */\n readonly emitEvent1: (nodeId: string, args: CoreEmitEvent1Args) => void;\n /** 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\" */\n readonly emitEvent2: (nodeId: string, args: CoreEmitEvent2Args) => void;\n /** 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\" */\n readonly emitEvent3: (nodeId: string, args: CoreEmitEvent3Args) => void;\n /** 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\" */\n readonly emitEvent4: (nodeId: string, args: CoreEmitEvent4Args) => void;\n /** Invoke a smart contract function, optionally spending a token resource — original id: \"core.call\" */\n readonly call: <TSig extends string>(\n nodeId: string,\n args: CoreCallArgs<TSig>,\n ) => CoreCallResult<TSig>;\n /** Read from a smart contract at runtime (StaticCall); result is fresh at execution time — original id: \"core.staticCall\" */\n readonly staticCall: <TSig extends string>(\n nodeId: string,\n args: CoreStaticCallArgs<TSig>,\n ) => StaticCallResult<TSig>;\n /** Invoke a contract with pre-encoded calldata — original id: \"core.rawCall\" */\n readonly rawCall: (\n nodeId: string,\n args: CoreRawCallArgs,\n ) => CoreRawCallOutputs;\n /** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking — original id: \"core.asResource\" */\n readonly asResource: (\n nodeId: string,\n args: CoreAsResourceArgs,\n ) => CoreAsResourceOutputs;\n /** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal — original id: \"core.peek\" */\n readonly peek: (nodeId: string, args: CorePeekArgs) => CorePeekOutputs;\n };\n readonly lifi: {\n /** Swap tokens via the LI.FI aggregator API — original id: \"lifi.swap\" */\n readonly swap: (nodeId: string, args: LifiSwapArgs) => LifiSwapOutputs;\n /** Bridge tokens to another chain via the LI.FI aggregator API — original id: \"lifi.bridge\" */\n readonly bridge: (\n nodeId: string,\n args: LifiBridgeArgs,\n ) => LifiBridgeOutputs;\n /** Route tokens into a DeFi protocol position via the edge catalog — original id: \"lifi.zap\" */\n readonly zap: (nodeId: string, args: LifiZapArgs) => LifiZapOutputs;\n /** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles — original id: \"lifi.zapAsync\" */\n readonly zapAsync: (\n nodeId: string,\n args: LifiZapAsyncArgs,\n ) => LifiZapAsyncOutputs;\n };\n readonly invariant: {\n /** Assert that an account holds at least a minimum token balance — original id: \"invariant.balanceAtLeast\" */\n readonly balanceAtLeast: (\n nodeId: string,\n args: InvariantBalanceAtLeastArgs,\n ) => void;\n /** Assert that an account holds exactly an expected token balance — original id: \"invariant.balanceEquals\" */\n readonly balanceEquals: (\n nodeId: string,\n args: InvariantBalanceEqualsArgs,\n ) => void;\n /** Assert that an account holds at most a maximum token balance — original id: \"invariant.balanceAtMost\" */\n readonly balanceAtMost: (\n nodeId: string,\n args: InvariantBalanceAtMostArgs,\n ) => void;\n /** Assert that an account's token balance is between a minimum and a maximum (inclusive) — original id: \"invariant.balanceInRange\" */\n readonly balanceInRange: (\n nodeId: string,\n args: InvariantBalanceInRangeArgs,\n ) => void;\n /** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner — original id: \"invariant.allowanceAtLeast\" */\n readonly allowanceAtLeast: (\n nodeId: string,\n args: InvariantAllowanceAtLeastArgs,\n ) => void;\n /** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount — original id: \"invariant.allowanceEquals\" */\n readonly allowanceEquals: (\n nodeId: string,\n args: InvariantAllowanceEqualsArgs,\n ) => void;\n /** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner — original id: \"invariant.allowanceAtMost\" */\n readonly allowanceAtMost: (\n nodeId: string,\n args: InvariantAllowanceAtMostArgs,\n ) => void;\n /** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) — original id: \"invariant.allowanceInRange\" */\n readonly allowanceInRange: (\n nodeId: string,\n args: InvariantAllowanceInRangeArgs,\n ) => void;\n /** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation — original id: \"invariant.numeric\" */\n readonly numeric: (nodeId: string, args: InvariantNumericArgs) => void;\n /** Assert min <= value <= max against constant bounds; reverts if outside the range — original id: \"invariant.numericInRange\" */\n readonly numericInRange: (\n nodeId: string,\n args: InvariantNumericInRangeArgs,\n ) => void;\n /** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation — original id: \"invariant.gte\" */\n readonly gte: (nodeId: string, args: InvariantGteArgs) => void;\n /** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation — original id: \"invariant.gt\" */\n readonly gt: (nodeId: string, args: InvariantGtArgs) => void;\n /** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation — original id: \"invariant.lte\" */\n readonly lte: (nodeId: string, args: InvariantLteArgs) => void;\n /** Assert a uint256 value is strictly less than a constant threshold; reverts on violation — original id: \"invariant.lt\" */\n readonly lt: (nodeId: string, args: InvariantLtArgs) => void;\n /** Assert a uint256 value equals a constant threshold; reverts on violation — original id: \"invariant.eq\" */\n readonly eq: (nodeId: string, args: InvariantEqArgs) => void;\n /** Assert a uint256 value does not equal a constant threshold; reverts on violation — original id: \"invariant.neq\" */\n readonly neq: (nodeId: string, args: InvariantNeqArgs) => void;\n };\n readonly aave: {\n /** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource — original id: \"aave.borrow\" */\n readonly borrow: (\n nodeId: string,\n args: AaveBorrowArgs,\n ) => AaveBorrowOutputs;\n /** 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\" */\n readonly repay: (nodeId: string, args: AaveRepayArgs) => AaveRepayOutputs;\n /** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual — original id: \"aave.repayWithATokens\" */\n readonly repayWithATokens: (\n nodeId: string,\n args: AaveRepayWithATokensArgs,\n ) => AaveRepayWithATokensOutputs;\n /** 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\" */\n readonly claimRewards: (\n nodeId: string,\n args: AaveClaimRewardsArgs,\n ) => AaveClaimRewardsOutputs;\n /** 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\" */\n readonly setEMode: (nodeId: string, args: AaveSetEModeArgs) => void;\n };\n readonly morphoBlue: {\n /** 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\" */\n readonly supplyCollateral: (\n nodeId: string,\n args: MorphoBlueSupplyCollateralArgs,\n ) => void;\n /** 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\" */\n readonly withdrawCollateral: (\n nodeId: string,\n args: MorphoBlueWithdrawCollateralArgs,\n ) => MorphoBlueWithdrawCollateralOutputs;\n };\n readonly paraswap: {\n /** 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\" */\n readonly buy: (nodeId: string, args: ParaswapBuyArgs) => ParaswapBuyOutputs;\n };\n readonly fly: {\n /** 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\" */\n readonly swap: (nodeId: string, args: FlySwapArgs) => FlySwapOutputs;\n };\n};\n\nexport const bindGeneratedOps = (\n builder: FlowBuilderInternal,\n): GeneratedOps => ({\n core: {\n split: (nodeId: string, args: CoreSplitArgs) =>\n builder.call(nodeId, 'core.split', args, {\n a: 'resource',\n b: 'resource',\n } as const),\n merge: (nodeId: string, args: CoreMergeArgs) =>\n builder.call(nodeId, 'core.merge', { ...args, config: {} }, {\n merged: 'resource',\n } as const),\n add: (nodeId: string, args: CoreAddArgs) =>\n builder.call(nodeId, 'core.add', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n subtract: (nodeId: string, args: CoreSubtractArgs) =>\n builder.call(nodeId, 'core.subtract', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n multiply: (nodeId: string, args: CoreMultiplyArgs) =>\n builder.call(nodeId, 'core.multiply', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n divideDown: (nodeId: string, args: CoreDivideDownArgs) =>\n builder.call(nodeId, 'core.divideDown', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n divideUp: (nodeId: string, args: CoreDivideUpArgs) =>\n builder.call(nodeId, 'core.divideUp', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n bpsDown: (nodeId: string, args: CoreBpsDownArgs) =>\n builder.call(nodeId, 'core.bpsDown', args, {\n result: 'uint256',\n } as const),\n bpsUp: (nodeId: string, args: CoreBpsUpArgs) =>\n builder.call(nodeId, 'core.bpsUp', args, { result: 'uint256' } as const),\n assertEqual: (nodeId: string, args: CoreAssertEqualArgs) =>\n builder.call(nodeId, 'core.assertEqual', { ...args, config: {} }, {}),\n assertNotEqual: (nodeId: string, args: CoreAssertNotEqualArgs) =>\n builder.call(nodeId, 'core.assertNotEqual', { ...args, config: {} }, {}),\n assertGt: (nodeId: string, args: CoreAssertGtArgs) =>\n builder.call(nodeId, 'core.assertGt', { ...args, config: {} }, {}),\n assertGte: (nodeId: string, args: CoreAssertGteArgs) =>\n builder.call(nodeId, 'core.assertGte', { ...args, config: {} }, {}),\n assertLt: (nodeId: string, args: CoreAssertLtArgs) =>\n builder.call(nodeId, 'core.assertLt', { ...args, config: {} }, {}),\n assertLte: (nodeId: string, args: CoreAssertLteArgs) =>\n builder.call(nodeId, 'core.assertLte', { ...args, config: {} }, {}),\n assertInRange: (nodeId: string, args: CoreAssertInRangeArgs) =>\n builder.call(nodeId, 'core.assertInRange', { ...args, config: {} }, {}),\n approve: (nodeId: string, args: CoreApproveArgs) =>\n builder.call(nodeId, 'core.approve', args, {}),\n balanceOf: (nodeId: string, args: CoreBalanceOfArgs) =>\n builder.call(nodeId, 'core.balanceOf', args, {\n balance: 'resource',\n } as const),\n transfer: (nodeId: string, args: CoreTransferArgs) =>\n builder.call(nodeId, 'core.transfer', args, {\n transferred: 'resource',\n remainder: 'resource',\n } as const),\n emitEvent1: (nodeId: string, args: CoreEmitEvent1Args) =>\n builder.call(nodeId, 'core.emitEvent1', args, {}),\n emitEvent2: (nodeId: string, args: CoreEmitEvent2Args) =>\n builder.call(nodeId, 'core.emitEvent2', args, {}),\n emitEvent3: (nodeId: string, args: CoreEmitEvent3Args) =>\n builder.call(nodeId, 'core.emitEvent3', args, {}),\n emitEvent4: (nodeId: string, args: CoreEmitEvent4Args) =>\n builder.call(nodeId, 'core.emitEvent4', args, {}),\n call: <TSig extends string>(nodeId: string, args: CoreCallArgs<TSig>) => {\n const wire = buildCallWireFormat({\n resource: args.resource,\n bind: args.bind,\n config: args.config,\n guards: args.guards,\n });\n return builder.call(nodeId, wire.op, wire, {\n result: 'uint256',\n } as const) as unknown as CoreCallResult<TSig>;\n },\n staticCall: <TSig extends string>(\n nodeId: string,\n args: CoreStaticCallArgs<TSig>,\n ) =>\n builder.call(\n nodeId,\n 'core.staticCall',\n buildStaticCallWireFormat({\n bind: args.bind,\n config: args.config,\n guards: args.guards,\n }),\n { result: 'uint256' } as const,\n ) as unknown as StaticCallResult<TSig>,\n rawCall: (nodeId: string, args: CoreRawCallArgs) =>\n builder.call(nodeId, 'core.rawCall', args, {\n result: 'uint256',\n } as const),\n asResource: (nodeId: string, args: CoreAsResourceArgs) =>\n builder.call(nodeId, 'core.asResource', args, {\n resource: 'resource',\n } as const),\n peek: (nodeId: string, args: CorePeekArgs) =>\n builder.call(nodeId, 'core.peek', args, { result: 'uint256' } as const),\n },\n lifi: {\n swap: (nodeId: string, args: LifiSwapArgs) =>\n builder.call(nodeId, 'lifi.swap', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n bridge: (nodeId: string, args: LifiBridgeArgs) =>\n builder.call(nodeId, 'lifi.bridge', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n zap: (nodeId: string, args: LifiZapArgs) =>\n builder.call(nodeId, 'lifi.zap', args, {\n amountOut: 'resource',\n } as const),\n zapAsync: (nodeId: string, args: LifiZapAsyncArgs) =>\n builder.call(nodeId, 'lifi.zapAsync', args, {\n amountOut: 'resource',\n } as const),\n },\n invariant: {\n balanceAtLeast: (nodeId: string, args: InvariantBalanceAtLeastArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceAtLeast',\n { ...args, config: {} },\n {},\n ),\n balanceEquals: (nodeId: string, args: InvariantBalanceEqualsArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceEquals',\n { ...args, config: {} },\n {},\n ),\n balanceAtMost: (nodeId: string, args: InvariantBalanceAtMostArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceAtMost',\n { ...args, config: {} },\n {},\n ),\n balanceInRange: (nodeId: string, args: InvariantBalanceInRangeArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceInRange',\n { ...args, config: {} },\n {},\n ),\n allowanceAtLeast: (nodeId: string, args: InvariantAllowanceAtLeastArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceAtLeast',\n { ...args, config: {} },\n {},\n ),\n allowanceEquals: (nodeId: string, args: InvariantAllowanceEqualsArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceEquals',\n { ...args, config: {} },\n {},\n ),\n allowanceAtMost: (nodeId: string, args: InvariantAllowanceAtMostArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceAtMost',\n { ...args, config: {} },\n {},\n ),\n allowanceInRange: (nodeId: string, args: InvariantAllowanceInRangeArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceInRange',\n { ...args, config: {} },\n {},\n ),\n numeric: (nodeId: string, args: InvariantNumericArgs) =>\n builder.call(nodeId, 'invariant.numeric', args, {}),\n numericInRange: (nodeId: string, args: InvariantNumericInRangeArgs) =>\n builder.call(nodeId, 'invariant.numericInRange', args, {}),\n gte: (nodeId: string, args: InvariantGteArgs) =>\n builder.call(nodeId, 'invariant.gte', args, {}),\n gt: (nodeId: string, args: InvariantGtArgs) =>\n builder.call(nodeId, 'invariant.gt', args, {}),\n lte: (nodeId: string, args: InvariantLteArgs) =>\n builder.call(nodeId, 'invariant.lte', args, {}),\n lt: (nodeId: string, args: InvariantLtArgs) =>\n builder.call(nodeId, 'invariant.lt', args, {}),\n eq: (nodeId: string, args: InvariantEqArgs) =>\n builder.call(nodeId, 'invariant.eq', args, {}),\n neq: (nodeId: string, args: InvariantNeqArgs) =>\n builder.call(nodeId, 'invariant.neq', args, {}),\n },\n aave: {\n borrow: (nodeId: string, args: AaveBorrowArgs) =>\n builder.call(nodeId, 'aave.borrow', args, {\n borrowed: 'resource',\n debtBalance: 'uint256',\n } as const),\n repay: (nodeId: string, args: AaveRepayArgs) =>\n builder.call(nodeId, 'aave.repay', args, {\n actualRepaid: 'uint256',\n residual: 'resource',\n } as const),\n repayWithATokens: (nodeId: string, args: AaveRepayWithATokensArgs) =>\n builder.call(nodeId, 'aave.repayWithATokens', args, {\n actualRepaid: 'uint256',\n residual: 'resource',\n } as const),\n claimRewards: (nodeId: string, args: AaveClaimRewardsArgs) =>\n builder.call(nodeId, 'aave.claimRewards', args, {\n claimed: 'resource',\n claimedAmount: 'uint256',\n } as const),\n setEMode: (nodeId: string, args: AaveSetEModeArgs) =>\n builder.call(nodeId, 'aave.setEMode', args, {}),\n },\n morphoBlue: {\n supplyCollateral: (nodeId: string, args: MorphoBlueSupplyCollateralArgs) =>\n builder.call(nodeId, 'morphoBlue.supplyCollateral', args, {}),\n withdrawCollateral: (\n nodeId: string,\n args: MorphoBlueWithdrawCollateralArgs,\n ) =>\n builder.call(nodeId, 'morphoBlue.withdrawCollateral', args, {\n withdrawn: 'resource',\n collateralWithdrawn: 'uint256',\n } as const),\n },\n paraswap: {\n buy: (nodeId: string, args: ParaswapBuyArgs) =>\n builder.call(nodeId, 'paraswap.buy', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n },\n fly: {\n swap: (nodeId: string, args: FlySwapArgs) =>\n builder.call(nodeId, 'fly.swap', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n },\n});\n"],"mappings":"AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAw3BA,MAAM,mBAAmB,CAC9B,aACkB;AAAA,EAClB,MAAM;AAAA,IACJ,OAAO,CAAC,QAAgB,SACtB,QAAQ,KAAK,QAAQ,cAAc,MAAM;AAAA,MACvC,GAAG;AAAA,MACH,GAAG;AAAA,IACL,CAAU;AAAA,IACZ,OAAO,CAAC,QAAgB,SACtB,QAAQ,KAAK,QAAQ,cAAc,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MAC1D,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,KAAK,CAAC,QAAgB,SACpB,QAAQ,KAAK,QAAQ,YAAY,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MACxD,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,UAAU,CAAC,QAAgB,SACzB,QAAQ,KAAK,QAAQ,iBAAiB,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MAC7D,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,UAAU,CAAC,QAAgB,SACzB,QAAQ,KAAK,QAAQ,iBAAiB,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MAC7D,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,YAAY,CAAC,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,EACd;AAAA,EACA,KAAK;AAAA,IACH,MAAM,CAAC,QAAgB,SACrB,QAAQ,KAAK,QAAQ,YAAY,MAAM;AAAA,MACrC,WAAW;AAAA,MACX,WAAW;AAAA,IACb,CAAU;AAAA,EACd;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/generated/operations.generated.ts"],"sourcesContent":["// AUTO-GENERATED from manifest.json — do not edit by hand.\n// Regenerate with: yarn workspace @lifi/composer-sdk generate\n\nimport type { FlowBuilderInternal } from '../authoring/FlowBuilderCore.js';\nimport type {\n Bindable,\n FamilyCount,\n FamilySource,\n OutputFamilyHandles,\n OutputHandle,\n} from '../authoring/handles.js';\nimport type {\n CoreCallResult,\n SignatureBind,\n StaticCallResult,\n} from '../authoring/signatureArgs.js';\nimport {\n buildCallWireFormat,\n buildStaticCallWireFormat,\n} from '../authoring/signatureArgs.js';\nimport type { TypedGuard } from '../types.js';\n\nimport type {\n AaveBorrowConfig,\n AaveClaimRewardsConfig,\n AaveRepayConfig,\n AaveRepayWithATokensConfig,\n AaveSetEModeConfig,\n CoreApproveConfig,\n CoreAsResourceConfig,\n CoreBalanceOfConfig,\n CoreBpsDownConfig,\n CoreBpsUpConfig,\n CoreCallConfig,\n CoreEmitEvent1Config,\n CoreEmitEvent2Config,\n CoreEmitEvent3Config,\n CoreEmitEvent4Config,\n CorePartitionConfig,\n CorePeekConfig,\n CoreRawCallConfig,\n CoreSplitConfig,\n CoreStaticCallConfig,\n CoreTransferConfig,\n FlySwapConfig,\n InvariantEqConfig,\n InvariantGtConfig,\n InvariantGteConfig,\n InvariantLtConfig,\n InvariantLteConfig,\n InvariantNeqConfig,\n InvariantNumericConfig,\n InvariantNumericInRangeConfig,\n LifiBridgeConfig,\n LifiSwapConfig,\n LifiZapAsyncConfig,\n LifiZapConfig,\n MorphoBlueSupplyCollateralConfig,\n MorphoBlueWithdrawCollateralConfig,\n ParaswapBuyConfig,\n} from './config.generated.js';\n\n/** Split a resource into two outputs by basis-point ratio. Output `a` receives `bps` of the source, rounded up, and `b` takes the remainder. */\nexport interface CoreSplitArgs {\n readonly bind: {\n readonly source: Bindable<'resource'>;\n };\n readonly config: CoreSplitConfig;\n readonly guards?: readonly TypedGuard<'a' | 'b'>[];\n}\n\n/** 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. */\nexport interface CorePartitionArgs<\n TBps extends FamilySource<CorePartitionConfig['bps']> = FamilySource<\n CorePartitionConfig['bps']\n >,\n> {\n readonly bind: {\n readonly source: Bindable<'resource'>;\n };\n readonly config: Omit<CorePartitionConfig, 'bps'> & {\n readonly bps: TBps &\n FamilyCount<NoInfer<TBps>, Readonly<CorePartitionConfig['bps']>>;\n };\n readonly guards?: readonly TypedGuard<`parts.${number}`>[];\n}\n\n/** Merge two same-token resources into one by addition */\nexport interface CoreMergeArgs {\n readonly bind: {\n readonly a: Bindable<'resource'>;\n readonly b: Bindable<'resource'>;\n };\n readonly guards?: readonly TypedGuard<'merged'>[];\n}\n\n/** Swap tokens via the LI.FI aggregator API */\nexport interface LifiSwapArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: LifiSwapConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\n/** Bridge tokens to another chain via the LI.FI aggregator API */\nexport interface LifiBridgeArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: LifiBridgeConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\n/** Assert that an account holds at least a minimum token balance */\nexport interface InvariantBalanceAtLeastArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that an account holds exactly an expected token balance */\nexport interface InvariantBalanceEqualsArgs {\n readonly bind: {\n readonly expectedAmount: Bindable<'resource'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that an account holds at most a maximum token balance */\nexport interface InvariantBalanceAtMostArgs {\n readonly bind: {\n readonly maximumAmount: Bindable<'resource'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that an account's token balance is between a minimum and a maximum (inclusive) */\nexport interface InvariantBalanceInRangeArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly maximumAmount: Bindable<'uint256'>;\n readonly account: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner */\nexport interface InvariantAllowanceAtLeastArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount */\nexport interface InvariantAllowanceEqualsArgs {\n readonly bind: {\n readonly expectedAmount: Bindable<'resource'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner */\nexport interface InvariantAllowanceAtMostArgs {\n readonly bind: {\n readonly maximumAmount: Bindable<'resource'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) */\nexport interface InvariantAllowanceInRangeArgs {\n readonly bind: {\n readonly minimumAmount: Bindable<'resource'>;\n readonly maximumAmount: Bindable<'uint256'>;\n readonly owner: Bindable<'address'>;\n readonly spender: Bindable<'address'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation */\nexport interface InvariantNumericArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantNumericConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert min <= value <= max against constant bounds; reverts if outside the range */\nexport interface InvariantNumericInRangeArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantNumericInRangeConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation */\nexport interface InvariantGteArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantGteConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation */\nexport interface InvariantGtArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantGtConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation */\nexport interface InvariantLteArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantLteConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value is strictly less than a constant threshold; reverts on violation */\nexport interface InvariantLtArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantLtConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value equals a constant threshold; reverts on violation */\nexport interface InvariantEqArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantEqConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a uint256 value does not equal a constant threshold; reverts on violation */\nexport interface InvariantNeqArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: InvariantNeqConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Add two unsigned integers (a + b) */\nexport interface CoreAddArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Subtract b from a (a - b); reverts on underflow */\nexport interface CoreSubtractArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Multiply two unsigned integers (a * b) */\nexport interface CoreMultiplyArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Divide a by b, rounding toward zero */\nexport interface CoreDivideDownArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Divide a by b, rounding away from zero */\nexport interface CoreDivideUpArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Multiply value by basis points and divide by 10000, rounding down */\nexport interface CoreBpsDownArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: CoreBpsDownConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Multiply value by basis points and divide by 10000, rounding up */\nexport interface CoreBpsUpArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n };\n readonly config: CoreBpsUpConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Assert a == b; reverts if not equal */\nexport interface CoreAssertEqualArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a != b; reverts if equal */\nexport interface CoreAssertNotEqualArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a > b; reverts if a <= b */\nexport interface CoreAssertGtArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a >= b; reverts if a < b */\nexport interface CoreAssertGteArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a < b; reverts if a >= b */\nexport interface CoreAssertLtArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert a <= b; reverts if a > b */\nexport interface CoreAssertLteArgs {\n readonly bind: {\n readonly a: Bindable<'uint256'>;\n readonly b: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Assert min <= value <= max; reverts if value is outside the range */\nexport interface CoreAssertInRangeArgs {\n readonly bind: {\n readonly value: Bindable<'uint256'>;\n readonly min: Bindable<'uint256'>;\n readonly max: Bindable<'uint256'>;\n };\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Approve an ERC20 spender for the given token and amount */\nexport interface CoreApproveArgs {\n readonly bind: {\n readonly amount: Bindable<'resource'>;\n };\n readonly config: CoreApproveConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Read an ERC20 balance, producing a resource */\nexport interface CoreBalanceOfArgs {\n readonly bind: Record<string, never>;\n readonly config: CoreBalanceOfConfig;\n readonly guards?: readonly TypedGuard<'balance'>[];\n}\n\n/** Transfer tokens to a recipient address, optionally specifying a partial amount */\nexport interface CoreTransferArgs {\n readonly bind: {\n readonly amount: Bindable<'resource'>;\n readonly recipient: Bindable<'address'>;\n };\n readonly config: CoreTransferConfig;\n readonly guards?: readonly TypedGuard<'transferred' | 'remainder'>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent1Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent1Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent2Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n readonly value1: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent2Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent3Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n readonly value1: Bindable<'bytes32'>;\n readonly value2: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent3Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface CoreEmitEvent4Args {\n readonly bind: {\n readonly value0: Bindable<'bytes32'>;\n readonly value1: Bindable<'bytes32'>;\n readonly value2: Bindable<'bytes32'>;\n readonly value3: Bindable<'bytes32'>;\n };\n readonly config: CoreEmitEvent4Config;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Invoke a smart contract function, optionally spending a token resource */\nexport interface CoreCallArgs<TSig extends string = string> {\n readonly resource?: Bindable<'resource'>;\n readonly bind: SignatureBind<TSig>;\n readonly config: Omit<CoreCallConfig, 'args' | 'functionSignature'> & {\n readonly functionSignature: TSig;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Read from a smart contract at runtime (StaticCall); result is fresh at execution time */\nexport interface CoreStaticCallArgs<TSig extends string = string> {\n readonly bind: SignatureBind<TSig>;\n readonly config: Omit<CoreStaticCallConfig, 'args' | 'functionSignature'> & {\n readonly functionSignature: TSig;\n };\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Invoke a contract with pre-encoded calldata */\nexport interface CoreRawCallArgs {\n readonly bind: Record<string, never>;\n readonly config: CoreRawCallConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking */\nexport interface CoreAsResourceArgs {\n readonly bind: {\n readonly handle: Bindable<'uint256'>;\n };\n readonly config: CoreAsResourceConfig;\n readonly guards?: readonly TypedGuard<'resource'>[];\n}\n\n/** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource */\nexport interface AaveBorrowArgs {\n readonly bind: Record<string, never>;\n readonly config: AaveBorrowConfig;\n readonly guards?: readonly TypedGuard<'debtBalance'>[];\n}\n\n/** 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. */\nexport interface AaveRepayArgs {\n readonly bind: {\n readonly assetIn: Bindable<'resource'>;\n readonly onBehalfOf: Bindable<'address'>;\n };\n readonly config: AaveRepayConfig;\n readonly guards?: readonly TypedGuard<'actualRepaid' | 'residual'>[];\n}\n\n/** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual */\nexport interface AaveRepayWithATokensArgs {\n readonly bind: {\n readonly aTokenIn: Bindable<'resource'>;\n };\n readonly config: AaveRepayWithATokensConfig;\n readonly guards?: readonly TypedGuard<'actualRepaid' | 'residual'>[];\n}\n\n/** Claim a specific Aave v3 incentives reward token against a set of receipt-token positions, exposing the claimed amount as a Resource */\nexport interface AaveClaimRewardsArgs {\n readonly bind: Record<string, never>;\n readonly config: AaveClaimRewardsConfig;\n readonly guards?: readonly TypedGuard<'claimedAmount'>[];\n}\n\n/** 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. */\nexport interface AaveSetEModeArgs {\n readonly bind: Record<string, never>;\n readonly config: AaveSetEModeConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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). */\nexport interface MorphoBlueSupplyCollateralArgs {\n readonly bind: {\n readonly assetIn: Bindable<'resource'>;\n };\n readonly config: MorphoBlueSupplyCollateralConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** Withdraw collateral from a Morpho Blue market position to the receiver address. Exposes the withdrawn ERC20 amount as a Resource output. */\nexport interface MorphoBlueWithdrawCollateralArgs {\n readonly bind: Record<string, never>;\n readonly config: MorphoBlueWithdrawCollateralConfig;\n readonly guards?: readonly TypedGuard<'collateralWithdrawn'>[];\n}\n\n/** Route tokens into a DeFi protocol position via the edge catalog */\nexport interface LifiZapArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n readonly recipient?: Bindable<'address'>;\n };\n readonly config: LifiZapConfig;\n readonly guards?: readonly TypedGuard<'amountOut'>[];\n}\n\n/** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles */\nexport interface LifiZapAsyncArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n readonly recipient: Bindable<'address'>;\n };\n readonly config: LifiZapAsyncConfig;\n readonly guards?: readonly TypedGuard<never>[];\n}\n\n/** 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`. */\nexport interface ParaswapBuyArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: ParaswapBuyConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\n/** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal */\nexport interface CorePeekArgs {\n readonly bind: Record<string, never>;\n readonly config: CorePeekConfig;\n readonly guards?: readonly TypedGuard<'result'>[];\n}\n\n/** 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. */\nexport interface FlySwapArgs {\n readonly bind: {\n readonly amountIn: Bindable<'resource'>;\n };\n readonly config: FlySwapConfig;\n readonly guards?: readonly TypedGuard<'unspentIn'>[];\n}\n\nexport interface CoreSplitOutputs {\n readonly a: OutputHandle<'resource'>;\n readonly b: OutputHandle<'resource'>;\n}\n\nexport interface CorePartitionOutputs<\n TBps extends FamilySource<CorePartitionConfig['bps']> = FamilySource<\n CorePartitionConfig['bps']\n >,\n> {\n readonly parts: OutputFamilyHandles<TBps>;\n}\n\nexport interface CoreMergeOutputs {\n readonly merged: OutputHandle<'resource'>;\n}\n\nexport interface LifiSwapOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport interface LifiBridgeOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport interface CoreAddOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreSubtractOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreMultiplyOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreDivideDownOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreDivideUpOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreBpsDownOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreBpsUpOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreBalanceOfOutputs {\n readonly balance: OutputHandle<'resource'>;\n}\n\nexport interface CoreTransferOutputs {\n readonly transferred: OutputHandle<'resource'>;\n readonly remainder: OutputHandle<'resource'>;\n}\n\nexport interface CoreRawCallOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface CoreAsResourceOutputs {\n readonly resource: OutputHandle<'resource'>;\n}\n\nexport interface AaveBorrowOutputs {\n readonly borrowed: OutputHandle<'resource'>;\n readonly debtBalance: OutputHandle<'uint256'>;\n}\n\nexport interface AaveRepayOutputs {\n readonly actualRepaid: OutputHandle<'uint256'>;\n readonly residual: OutputHandle<'resource'>;\n}\n\nexport interface AaveRepayWithATokensOutputs {\n readonly actualRepaid: OutputHandle<'uint256'>;\n readonly residual: OutputHandle<'resource'>;\n}\n\nexport interface AaveClaimRewardsOutputs {\n readonly claimed: OutputHandle<'resource'>;\n readonly claimedAmount: OutputHandle<'uint256'>;\n}\n\nexport interface MorphoBlueWithdrawCollateralOutputs {\n readonly withdrawn: OutputHandle<'resource'>;\n readonly collateralWithdrawn: OutputHandle<'uint256'>;\n}\n\nexport interface LifiZapOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n}\n\nexport interface LifiZapAsyncOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n}\n\nexport interface ParaswapBuyOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport interface CorePeekOutputs {\n readonly result: OutputHandle<'uint256'>;\n}\n\nexport interface FlySwapOutputs {\n readonly amountOut: OutputHandle<'resource'>;\n readonly unspentIn: OutputHandle<'resource'>;\n}\n\nexport type GeneratedOps = {\n readonly core: {\n /** 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\" */\n readonly split: (nodeId: string, args: CoreSplitArgs) => CoreSplitOutputs;\n /** 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\" */\n readonly partition: <\n const TBps extends FamilySource<CorePartitionConfig['bps']>,\n >(\n nodeId: string,\n args: CorePartitionArgs<TBps>,\n ) => CorePartitionOutputs<TBps>;\n /** Merge two same-token resources into one by addition — original id: \"core.merge\" */\n readonly merge: (nodeId: string, args: CoreMergeArgs) => CoreMergeOutputs;\n /** Add two unsigned integers (a + b) — original id: \"core.add\" */\n readonly add: (nodeId: string, args: CoreAddArgs) => CoreAddOutputs;\n /** Subtract b from a (a - b); reverts on underflow — original id: \"core.subtract\" */\n readonly subtract: (\n nodeId: string,\n args: CoreSubtractArgs,\n ) => CoreSubtractOutputs;\n /** Multiply two unsigned integers (a * b) — original id: \"core.multiply\" */\n readonly multiply: (\n nodeId: string,\n args: CoreMultiplyArgs,\n ) => CoreMultiplyOutputs;\n /** Divide a by b, rounding toward zero — original id: \"core.divideDown\" */\n readonly divideDown: (\n nodeId: string,\n args: CoreDivideDownArgs,\n ) => CoreDivideDownOutputs;\n /** Divide a by b, rounding away from zero — original id: \"core.divideUp\" */\n readonly divideUp: (\n nodeId: string,\n args: CoreDivideUpArgs,\n ) => CoreDivideUpOutputs;\n /** Multiply value by basis points and divide by 10000, rounding down — original id: \"core.bpsDown\" */\n readonly bpsDown: (\n nodeId: string,\n args: CoreBpsDownArgs,\n ) => CoreBpsDownOutputs;\n /** Multiply value by basis points and divide by 10000, rounding up — original id: \"core.bpsUp\" */\n readonly bpsUp: (nodeId: string, args: CoreBpsUpArgs) => CoreBpsUpOutputs;\n /** Assert a == b; reverts if not equal — original id: \"core.assertEqual\" */\n readonly assertEqual: (nodeId: string, args: CoreAssertEqualArgs) => void;\n /** Assert a != b; reverts if equal — original id: \"core.assertNotEqual\" */\n readonly assertNotEqual: (\n nodeId: string,\n args: CoreAssertNotEqualArgs,\n ) => void;\n /** Assert a > b; reverts if a <= b — original id: \"core.assertGt\" */\n readonly assertGt: (nodeId: string, args: CoreAssertGtArgs) => void;\n /** Assert a >= b; reverts if a < b — original id: \"core.assertGte\" */\n readonly assertGte: (nodeId: string, args: CoreAssertGteArgs) => void;\n /** Assert a < b; reverts if a >= b — original id: \"core.assertLt\" */\n readonly assertLt: (nodeId: string, args: CoreAssertLtArgs) => void;\n /** Assert a <= b; reverts if a > b — original id: \"core.assertLte\" */\n readonly assertLte: (nodeId: string, args: CoreAssertLteArgs) => void;\n /** Assert min <= value <= max; reverts if value is outside the range — original id: \"core.assertInRange\" */\n readonly assertInRange: (\n nodeId: string,\n args: CoreAssertInRangeArgs,\n ) => void;\n /** Approve an ERC20 spender for the given token and amount — original id: \"core.approve\" */\n readonly approve: (nodeId: string, args: CoreApproveArgs) => void;\n /** Read an ERC20 balance, producing a resource — original id: \"core.balanceOf\" */\n readonly balanceOf: (\n nodeId: string,\n args: CoreBalanceOfArgs,\n ) => CoreBalanceOfOutputs;\n /** Transfer tokens to a recipient address, optionally specifying a partial amount — original id: \"core.transfer\" */\n readonly transfer: (\n nodeId: string,\n args: CoreTransferArgs,\n ) => CoreTransferOutputs;\n /** 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\" */\n readonly emitEvent1: (nodeId: string, args: CoreEmitEvent1Args) => void;\n /** 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\" */\n readonly emitEvent2: (nodeId: string, args: CoreEmitEvent2Args) => void;\n /** 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\" */\n readonly emitEvent3: (nodeId: string, args: CoreEmitEvent3Args) => void;\n /** 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\" */\n readonly emitEvent4: (nodeId: string, args: CoreEmitEvent4Args) => void;\n /** Invoke a smart contract function, optionally spending a token resource — original id: \"core.call\" */\n readonly call: <TSig extends string>(\n nodeId: string,\n args: CoreCallArgs<TSig>,\n ) => CoreCallResult<TSig>;\n /** Read from a smart contract at runtime (StaticCall); result is fresh at execution time — original id: \"core.staticCall\" */\n readonly staticCall: <TSig extends string>(\n nodeId: string,\n args: CoreStaticCallArgs<TSig>,\n ) => StaticCallResult<TSig>;\n /** Invoke a contract with pre-encoded calldata — original id: \"core.rawCall\" */\n readonly rawCall: (\n nodeId: string,\n args: CoreRawCallArgs,\n ) => CoreRawCallOutputs;\n /** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking — original id: \"core.asResource\" */\n readonly asResource: (\n nodeId: string,\n args: CoreAsResourceArgs,\n ) => CoreAsResourceOutputs;\n /** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal — original id: \"core.peek\" */\n readonly peek: (nodeId: string, args: CorePeekArgs) => CorePeekOutputs;\n };\n readonly lifi: {\n /** Swap tokens via the LI.FI aggregator API — original id: \"lifi.swap\" */\n readonly swap: (nodeId: string, args: LifiSwapArgs) => LifiSwapOutputs;\n /** Bridge tokens to another chain via the LI.FI aggregator API — original id: \"lifi.bridge\" */\n readonly bridge: (\n nodeId: string,\n args: LifiBridgeArgs,\n ) => LifiBridgeOutputs;\n /** Route tokens into a DeFi protocol position via the edge catalog — original id: \"lifi.zap\" */\n readonly zap: (nodeId: string, args: LifiZapArgs) => LifiZapOutputs;\n /** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles — original id: \"lifi.zapAsync\" */\n readonly zapAsync: (\n nodeId: string,\n args: LifiZapAsyncArgs,\n ) => LifiZapAsyncOutputs;\n };\n readonly invariant: {\n /** Assert that an account holds at least a minimum token balance — original id: \"invariant.balanceAtLeast\" */\n readonly balanceAtLeast: (\n nodeId: string,\n args: InvariantBalanceAtLeastArgs,\n ) => void;\n /** Assert that an account holds exactly an expected token balance — original id: \"invariant.balanceEquals\" */\n readonly balanceEquals: (\n nodeId: string,\n args: InvariantBalanceEqualsArgs,\n ) => void;\n /** Assert that an account holds at most a maximum token balance — original id: \"invariant.balanceAtMost\" */\n readonly balanceAtMost: (\n nodeId: string,\n args: InvariantBalanceAtMostArgs,\n ) => void;\n /** Assert that an account's token balance is between a minimum and a maximum (inclusive) — original id: \"invariant.balanceInRange\" */\n readonly balanceInRange: (\n nodeId: string,\n args: InvariantBalanceInRangeArgs,\n ) => void;\n /** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner — original id: \"invariant.allowanceAtLeast\" */\n readonly allowanceAtLeast: (\n nodeId: string,\n args: InvariantAllowanceAtLeastArgs,\n ) => void;\n /** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount — original id: \"invariant.allowanceEquals\" */\n readonly allowanceEquals: (\n nodeId: string,\n args: InvariantAllowanceEqualsArgs,\n ) => void;\n /** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner — original id: \"invariant.allowanceAtMost\" */\n readonly allowanceAtMost: (\n nodeId: string,\n args: InvariantAllowanceAtMostArgs,\n ) => void;\n /** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) — original id: \"invariant.allowanceInRange\" */\n readonly allowanceInRange: (\n nodeId: string,\n args: InvariantAllowanceInRangeArgs,\n ) => void;\n /** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation — original id: \"invariant.numeric\" */\n readonly numeric: (nodeId: string, args: InvariantNumericArgs) => void;\n /** Assert min <= value <= max against constant bounds; reverts if outside the range — original id: \"invariant.numericInRange\" */\n readonly numericInRange: (\n nodeId: string,\n args: InvariantNumericInRangeArgs,\n ) => void;\n /** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation — original id: \"invariant.gte\" */\n readonly gte: (nodeId: string, args: InvariantGteArgs) => void;\n /** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation — original id: \"invariant.gt\" */\n readonly gt: (nodeId: string, args: InvariantGtArgs) => void;\n /** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation — original id: \"invariant.lte\" */\n readonly lte: (nodeId: string, args: InvariantLteArgs) => void;\n /** Assert a uint256 value is strictly less than a constant threshold; reverts on violation — original id: \"invariant.lt\" */\n readonly lt: (nodeId: string, args: InvariantLtArgs) => void;\n /** Assert a uint256 value equals a constant threshold; reverts on violation — original id: \"invariant.eq\" */\n readonly eq: (nodeId: string, args: InvariantEqArgs) => void;\n /** Assert a uint256 value does not equal a constant threshold; reverts on violation — original id: \"invariant.neq\" */\n readonly neq: (nodeId: string, args: InvariantNeqArgs) => void;\n };\n readonly aave: {\n /** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource — original id: \"aave.borrow\" */\n readonly borrow: (\n nodeId: string,\n args: AaveBorrowArgs,\n ) => AaveBorrowOutputs;\n /** 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\" */\n readonly repay: (nodeId: string, args: AaveRepayArgs) => AaveRepayOutputs;\n /** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual — original id: \"aave.repayWithATokens\" */\n readonly repayWithATokens: (\n nodeId: string,\n args: AaveRepayWithATokensArgs,\n ) => AaveRepayWithATokensOutputs;\n /** 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\" */\n readonly claimRewards: (\n nodeId: string,\n args: AaveClaimRewardsArgs,\n ) => AaveClaimRewardsOutputs;\n /** 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\" */\n readonly setEMode: (nodeId: string, args: AaveSetEModeArgs) => void;\n };\n readonly morphoBlue: {\n /** 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\" */\n readonly supplyCollateral: (\n nodeId: string,\n args: MorphoBlueSupplyCollateralArgs,\n ) => void;\n /** 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\" */\n readonly withdrawCollateral: (\n nodeId: string,\n args: MorphoBlueWithdrawCollateralArgs,\n ) => MorphoBlueWithdrawCollateralOutputs;\n };\n readonly paraswap: {\n /** 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\" */\n readonly buy: (nodeId: string, args: ParaswapBuyArgs) => ParaswapBuyOutputs;\n };\n readonly fly: {\n /** 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\" */\n readonly swap: (nodeId: string, args: FlySwapArgs) => FlySwapOutputs;\n };\n};\n\nexport const bindGeneratedOps = (\n builder: FlowBuilderInternal,\n): GeneratedOps => ({\n core: {\n split: (nodeId: string, args: CoreSplitArgs) =>\n builder.call(nodeId, 'core.split', args, {\n a: 'resource',\n b: 'resource',\n } as const),\n partition: <const TBps extends FamilySource<CorePartitionConfig['bps']>>(\n nodeId: string,\n args: CorePartitionArgs<TBps>,\n ) =>\n builder.call(\n nodeId,\n 'core.partition',\n args,\n { parts: 'resource' } as const,\n { parts: 'bps' } as const,\n ) as unknown as CorePartitionOutputs<TBps>,\n merge: (nodeId: string, args: CoreMergeArgs) =>\n builder.call(nodeId, 'core.merge', { ...args, config: {} }, {\n merged: 'resource',\n } as const),\n add: (nodeId: string, args: CoreAddArgs) =>\n builder.call(nodeId, 'core.add', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n subtract: (nodeId: string, args: CoreSubtractArgs) =>\n builder.call(nodeId, 'core.subtract', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n multiply: (nodeId: string, args: CoreMultiplyArgs) =>\n builder.call(nodeId, 'core.multiply', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n divideDown: (nodeId: string, args: CoreDivideDownArgs) =>\n builder.call(nodeId, 'core.divideDown', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n divideUp: (nodeId: string, args: CoreDivideUpArgs) =>\n builder.call(nodeId, 'core.divideUp', { ...args, config: {} }, {\n result: 'uint256',\n } as const),\n bpsDown: (nodeId: string, args: CoreBpsDownArgs) =>\n builder.call(nodeId, 'core.bpsDown', args, {\n result: 'uint256',\n } as const),\n bpsUp: (nodeId: string, args: CoreBpsUpArgs) =>\n builder.call(nodeId, 'core.bpsUp', args, { result: 'uint256' } as const),\n assertEqual: (nodeId: string, args: CoreAssertEqualArgs) =>\n builder.call(nodeId, 'core.assertEqual', { ...args, config: {} }, {}),\n assertNotEqual: (nodeId: string, args: CoreAssertNotEqualArgs) =>\n builder.call(nodeId, 'core.assertNotEqual', { ...args, config: {} }, {}),\n assertGt: (nodeId: string, args: CoreAssertGtArgs) =>\n builder.call(nodeId, 'core.assertGt', { ...args, config: {} }, {}),\n assertGte: (nodeId: string, args: CoreAssertGteArgs) =>\n builder.call(nodeId, 'core.assertGte', { ...args, config: {} }, {}),\n assertLt: (nodeId: string, args: CoreAssertLtArgs) =>\n builder.call(nodeId, 'core.assertLt', { ...args, config: {} }, {}),\n assertLte: (nodeId: string, args: CoreAssertLteArgs) =>\n builder.call(nodeId, 'core.assertLte', { ...args, config: {} }, {}),\n assertInRange: (nodeId: string, args: CoreAssertInRangeArgs) =>\n builder.call(nodeId, 'core.assertInRange', { ...args, config: {} }, {}),\n approve: (nodeId: string, args: CoreApproveArgs) =>\n builder.call(nodeId, 'core.approve', args, {}),\n balanceOf: (nodeId: string, args: CoreBalanceOfArgs) =>\n builder.call(nodeId, 'core.balanceOf', args, {\n balance: 'resource',\n } as const),\n transfer: (nodeId: string, args: CoreTransferArgs) =>\n builder.call(nodeId, 'core.transfer', args, {\n transferred: 'resource',\n remainder: 'resource',\n } as const),\n emitEvent1: (nodeId: string, args: CoreEmitEvent1Args) =>\n builder.call(nodeId, 'core.emitEvent1', args, {}),\n emitEvent2: (nodeId: string, args: CoreEmitEvent2Args) =>\n builder.call(nodeId, 'core.emitEvent2', args, {}),\n emitEvent3: (nodeId: string, args: CoreEmitEvent3Args) =>\n builder.call(nodeId, 'core.emitEvent3', args, {}),\n emitEvent4: (nodeId: string, args: CoreEmitEvent4Args) =>\n builder.call(nodeId, 'core.emitEvent4', args, {}),\n call: <TSig extends string>(nodeId: string, args: CoreCallArgs<TSig>) => {\n const wire = buildCallWireFormat({\n resource: args.resource,\n bind: args.bind,\n config: args.config,\n guards: args.guards,\n });\n return builder.call(nodeId, wire.op, wire, {\n result: 'uint256',\n } as const) as unknown as CoreCallResult<TSig>;\n },\n staticCall: <TSig extends string>(\n nodeId: string,\n args: CoreStaticCallArgs<TSig>,\n ) =>\n builder.call(\n nodeId,\n 'core.staticCall',\n buildStaticCallWireFormat({\n bind: args.bind,\n config: args.config,\n guards: args.guards,\n }),\n { result: 'uint256' } as const,\n ) as unknown as StaticCallResult<TSig>,\n rawCall: (nodeId: string, args: CoreRawCallArgs) =>\n builder.call(nodeId, 'core.rawCall', args, {\n result: 'uint256',\n } as const),\n asResource: (nodeId: string, args: CoreAsResourceArgs) =>\n builder.call(nodeId, 'core.asResource', args, {\n resource: 'resource',\n } as const),\n peek: (nodeId: string, args: CorePeekArgs) =>\n builder.call(nodeId, 'core.peek', args, { result: 'uint256' } as const),\n },\n lifi: {\n swap: (nodeId: string, args: LifiSwapArgs) =>\n builder.call(nodeId, 'lifi.swap', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n bridge: (nodeId: string, args: LifiBridgeArgs) =>\n builder.call(nodeId, 'lifi.bridge', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n zap: (nodeId: string, args: LifiZapArgs) =>\n builder.call(nodeId, 'lifi.zap', args, {\n amountOut: 'resource',\n } as const),\n zapAsync: (nodeId: string, args: LifiZapAsyncArgs) =>\n builder.call(nodeId, 'lifi.zapAsync', args, {\n amountOut: 'resource',\n } as const),\n },\n invariant: {\n balanceAtLeast: (nodeId: string, args: InvariantBalanceAtLeastArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceAtLeast',\n { ...args, config: {} },\n {},\n ),\n balanceEquals: (nodeId: string, args: InvariantBalanceEqualsArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceEquals',\n { ...args, config: {} },\n {},\n ),\n balanceAtMost: (nodeId: string, args: InvariantBalanceAtMostArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceAtMost',\n { ...args, config: {} },\n {},\n ),\n balanceInRange: (nodeId: string, args: InvariantBalanceInRangeArgs) =>\n builder.call(\n nodeId,\n 'invariant.balanceInRange',\n { ...args, config: {} },\n {},\n ),\n allowanceAtLeast: (nodeId: string, args: InvariantAllowanceAtLeastArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceAtLeast',\n { ...args, config: {} },\n {},\n ),\n allowanceEquals: (nodeId: string, args: InvariantAllowanceEqualsArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceEquals',\n { ...args, config: {} },\n {},\n ),\n allowanceAtMost: (nodeId: string, args: InvariantAllowanceAtMostArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceAtMost',\n { ...args, config: {} },\n {},\n ),\n allowanceInRange: (nodeId: string, args: InvariantAllowanceInRangeArgs) =>\n builder.call(\n nodeId,\n 'invariant.allowanceInRange',\n { ...args, config: {} },\n {},\n ),\n numeric: (nodeId: string, args: InvariantNumericArgs) =>\n builder.call(nodeId, 'invariant.numeric', args, {}),\n numericInRange: (nodeId: string, args: InvariantNumericInRangeArgs) =>\n builder.call(nodeId, 'invariant.numericInRange', args, {}),\n gte: (nodeId: string, args: InvariantGteArgs) =>\n builder.call(nodeId, 'invariant.gte', args, {}),\n gt: (nodeId: string, args: InvariantGtArgs) =>\n builder.call(nodeId, 'invariant.gt', args, {}),\n lte: (nodeId: string, args: InvariantLteArgs) =>\n builder.call(nodeId, 'invariant.lte', args, {}),\n lt: (nodeId: string, args: InvariantLtArgs) =>\n builder.call(nodeId, 'invariant.lt', args, {}),\n eq: (nodeId: string, args: InvariantEqArgs) =>\n builder.call(nodeId, 'invariant.eq', args, {}),\n neq: (nodeId: string, args: InvariantNeqArgs) =>\n builder.call(nodeId, 'invariant.neq', args, {}),\n },\n aave: {\n borrow: (nodeId: string, args: AaveBorrowArgs) =>\n builder.call(nodeId, 'aave.borrow', args, {\n borrowed: 'resource',\n debtBalance: 'uint256',\n } as const),\n repay: (nodeId: string, args: AaveRepayArgs) =>\n builder.call(nodeId, 'aave.repay', args, {\n actualRepaid: 'uint256',\n residual: 'resource',\n } as const),\n repayWithATokens: (nodeId: string, args: AaveRepayWithATokensArgs) =>\n builder.call(nodeId, 'aave.repayWithATokens', args, {\n actualRepaid: 'uint256',\n residual: 'resource',\n } as const),\n claimRewards: (nodeId: string, args: AaveClaimRewardsArgs) =>\n builder.call(nodeId, 'aave.claimRewards', args, {\n claimed: 'resource',\n claimedAmount: 'uint256',\n } as const),\n setEMode: (nodeId: string, args: AaveSetEModeArgs) =>\n builder.call(nodeId, 'aave.setEMode', args, {}),\n },\n morphoBlue: {\n supplyCollateral: (nodeId: string, args: MorphoBlueSupplyCollateralArgs) =>\n builder.call(nodeId, 'morphoBlue.supplyCollateral', args, {}),\n withdrawCollateral: (\n nodeId: string,\n args: MorphoBlueWithdrawCollateralArgs,\n ) =>\n builder.call(nodeId, 'morphoBlue.withdrawCollateral', args, {\n withdrawn: 'resource',\n collateralWithdrawn: 'uint256',\n } as const),\n },\n paraswap: {\n buy: (nodeId: string, args: ParaswapBuyArgs) =>\n builder.call(nodeId, 'paraswap.buy', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n },\n fly: {\n swap: (nodeId: string, args: FlySwapArgs) =>\n builder.call(nodeId, 'fly.swap', args, {\n amountOut: 'resource',\n unspentIn: 'resource',\n } as const),\n },\n});\n"],"mappings":"AAgBA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAw5BA,MAAM,mBAAmB,CAC9B,aACkB;AAAA,EAClB,MAAM;AAAA,IACJ,OAAO,CAAC,QAAgB,SACtB,QAAQ,KAAK,QAAQ,cAAc,MAAM;AAAA,MACvC,GAAG;AAAA,MACH,GAAG;AAAA,IACL,CAAU;AAAA,IACZ,WAAW,CACT,QACA,SAEA,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,EAAE,OAAO,WAAW;AAAA,MACpB,EAAE,OAAO,MAAM;AAAA,IACjB;AAAA,IACF,OAAO,CAAC,QAAgB,SACtB,QAAQ,KAAK,QAAQ,cAAc,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MAC1D,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,KAAK,CAAC,QAAgB,SACpB,QAAQ,KAAK,QAAQ,YAAY,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MACxD,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,UAAU,CAAC,QAAgB,SACzB,QAAQ,KAAK,QAAQ,iBAAiB,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MAC7D,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,UAAU,CAAC,QAAgB,SACzB,QAAQ,KAAK,QAAQ,iBAAiB,EAAE,GAAG,MAAM,QAAQ,CAAC,EAAE,GAAG;AAAA,MAC7D,QAAQ;AAAA,IACV,CAAU;AAAA,IACZ,YAAY,CAAC,QAAgB,SAC3B,QAAQ,KAAK,QAAQ,mBAAmB,E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,QAAgB,SACrB,QAAQ,KAAK,QAAQ,YAAY,MAAM;AAAA,MACrC,WAAW;AAAA,MACX,WAAW;AAAA,IACb,CAAU;AAAA,EACd;AACF;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@lifi/composer-sdk` — TypeScript SDK for building and compiling\n * Compose flows into executable EVM calldata.\n *\n * Start by creating an SDK instance with {@link createComposeSdk}, then use\n * {@link ComposeSdk.flow} to build flows and compile them.\n *\n * @packageDocumentation\n */\n\nexport type {\n AbiTypeToOutputKind,\n Address,\n InputDecl,\n InputSchema,\n InputSpecOf,\n IntegerString,\n IntegerStringInput,\n OutputKind,\n TypedGuard,\n TypedRef,\n TypedLiteral,\n} from './types.js';\n\nexport type {\n ChainSummary,\n GetZapPacksOptions,\n ZapPackEdge,\n ZapPackOverview,\n} from './discovery.js';\nexport type {\n Reachability,\n ReachabilityOptions,\n RoutablePair,\n TokenRef,\n} from './reachability.js';\nexport { buildReachability } from './reachability.js';\nexport type {\n ComposeError,\n ComposeErrorCode,\n ComposeSdkOutdated,\n ComposeServerOutdated,\n ComposePreparationOps,\n} from './errors.js';\nexport type {\n AppliedGuard,\n ApprovalEntry,\n Call,\n ComposeCompilePartialData,\n ComposeAction,\n ComposeFill,\n ComposeFee,\n ComposeUserProgramSimulation,\n ComposeCompileRequest,\n ComposeCompileResult,\n ComposeCompileSuccessData,\n ComposeErrorKind,\n ComposeRouteRequest,\n ComposeTransactionRequest,\n FailedPreparedOp,\n Flow,\n InputSpec,\n MaterialiserConfigOf,\n MaterialiserInput,\n OutputAmount,\n Amount,\n ConsumedOutput,\n Delivery,\n Estimate,\n EstimateBasis,\n Minimum,\n MinimumBasis,\n Output,\n Outputs,\n TerminalOutput,\n Precondition,\n PreconditionConfigOf,\n PriceImpact,\n Ref,\n Resource,\n RouteAmount,\n RouteAmountAll,\n RouteAmountExact,\n SimulationPolicy,\n SimulationRevert,\n SolType,\n SweepTo,\n SimulateRequest,\n SimulateResult,\n SimulateOkResult,\n SimulateRevertResult,\n SimulateRevertDecodeResult,\n SimulateSetupErrorResult,\n SimulateBalanceEntry,\n TrackedBalance,\n SlotFinderRequirement,\n Erc20BalanceRequirement,\n NativeBalanceRequirement,\n Erc20AllowanceRequirement,\n ContinuationIntent,\n ContinuationOutcome,\n Check,\n CheckComparator,\n Phase1ArtifactWire,\n ContinuationPlanWire,\n} from '@lifi/compose-spec';\nexport {\n SIMULATE_MAX_TRACKED_BALANCES,\n SIMULATE_MAX_REQUIREMENTS,\n} from '@lifi/compose-spec';\nexport {\n isComposeError,\n isComposePreparationError,\n isComposeSdkOutdatedError,\n isComposeServerOutdatedError,\n} from './errors.js';\n\nexport type {\n Bindable,\n RefBindable,\n AnyRefBindable,\n InputHandle,\n ResourceInputHandle,\n OutputHandle,\n AnyHandle,\n} from './authoring/handles.js';\nexport { isInputHandle, isOutputHandle } from './authoring/handles.js';\nexport { ref } from './authoring/raw.js';\n\nexport type { AnyBindable } from './authoring/FlowBuilderCore.js';\nexport type { TypedFlow, FlowOptions } from './authoring/FlowBuilderCore.js';\n\nexport type { ComposeRunInput } from './run/inputs.js';\nexport { materialiser } from './run/inputs.js';\n\nexport { buildSimulateRequest } from './run/simulate.js';\nexport type { BuildSimulateRequestInput } from './run/simulate.js';\n\nexport { terminalOutputs } from './outputs.js';\n\nexport { createComposeSdk } from './sdk.js';\nexport type { ComposeSdk, ComposeSdkOptions, FlowBuilder } from './sdk.js';\n\nimport * as guardsMod from './generated/guards.generated.js';\nimport * as materialisersMod from './generated/materialisers.generated.js';\nimport * as preconditionsMod from './generated/preconditions.generated.js';\nimport * as rawMod from './raw.js';\nimport * as resourcesMod from './resources.js';\nimport * as routeAmountMod from './routeAmount.js';\n\n/**\n * Guard factories for protecting operation outputs (e.g. slippage tolerance).\n * Pass guards to an operation's `guards` array.\n *\n * @example\n * ```ts\n * builder.lifi.swap('swap1', {\n * bind: { amountIn: builder.inputs.token },\n * config: { resourceOut: resources.native(1) },\n * guards: [guards.slippage({ port: 'amountOut', bps: 300 })],\n * });\n * ```\n */\nexport const guards: typeof guardsMod = guardsMod;\n/**\n * Materialiser factories that tell the runtime how to resolve token input\n * amounts on-chain (e.g. read a wallet balance, accept a direct deposit).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * signer: '0x...',\n * });\n * ```\n */\nexport const materialisers: typeof materialisersMod = materialisersMod;\n/**\n * Precondition factories for asserting on-chain state before a flow executes\n * (e.g. minimum token balances, ERC-20 allowances).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * preconditions: [\n * preconditions.erc20Balance({ wallet: '0x...', token: '0x...', balance: 1000n }),\n * ],\n * signer: '0x...',\n * });\n * ```\n */\nexport const preconditions: typeof preconditionsMod = preconditionsMod;\n/**\n * Resource declaration helpers for defining token inputs in a flow schema.\n * Use {@link resources.erc20} for ERC-20 tokens and {@link resources.native}\n * for the chain's native coin (ETH, MATIC, etc.).\n *\n * @example\n * ```ts\n * const builder = sdk.flow(1, {\n * inputs: {\n * usdc: resources.erc20('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', 1),\n * eth: resources.native(1),\n * },\n * });\n * ```\n */\nexport const resources: typeof resourcesMod = resourcesMod;\n/**\n * Amount constructors for {@link ComposeSdk.route}. Use\n * {@link routeAmount.exact} to spend a fixed amount of the `fromToken`, and\n * {@link routeAmount.all} to spend the signer's whole balance.\n *\n * @example\n * ```ts\n * // USDC into the Aave v3 aEthUSDC position — one routing-catalog edge.\n * const result = await sdk.route({\n * chainId: 1,\n * fromToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',\n * toToken: '0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c',\n * amount: routeAmount.exact(1_000_000n),\n * signer: '0xYourAddress...',\n * });\n * ```\n */\nexport const routeAmount: typeof routeAmountMod = routeAmountMod;\nexport * from './generated/config.generated.js';\n\n/**\n * Low-level escape hatch for constructing flow nodes, guards, and materialiser\n * inputs without the typed builder API. Prefer the generated operation methods\n * on {@link FlowBuilder} and the typed `guards`/`materialisers` namespaces\n * for most use cases.\n */\nexport const raw: typeof rawMod = rawMod;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoCA,0BAAkC;AAsElC,0BAGO;AACP,oBAKO;AAWP,qBAA8C;AAC9C,iBAAoB;AAMpB,oBAA6B;AAE7B,sBAAqC;AAGrC,qBAAgC;AAEhC,iBAAiC;AAGjC,gBAA2B;AAC3B,uBAAkC;AAClC,uBAAkC;AAClC,aAAwB;AACxB,mBAA8B;AAC9B,qBAAgC;AA+EhC,0BAAc,4CAnOd;AAmKO,MAAM,SAA2B;AAajC,MAAM,gBAAyC;AAgB/C,MAAM,gBAAyC;AAgB/C,MAAM,YAAiC;AAkBvC,MAAM,cAAqC;AAS3C,MAAM,MAAqB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@lifi/composer-sdk` — TypeScript SDK for building and compiling\n * Compose flows into executable EVM calldata.\n *\n * Start by creating an SDK instance with {@link createComposeSdk}, then use\n * {@link ComposeSdk.flow} to build flows and compile them.\n *\n * @packageDocumentation\n */\n\nexport type {\n AbiTypeToOutputKind,\n Address,\n InputDecl,\n InputSchema,\n InputSpecOf,\n IntegerString,\n IntegerStringInput,\n OutputKind,\n TypedGuard,\n TypedRef,\n TypedLiteral,\n} from './types.js';\n\nexport type {\n ChainSummary,\n GetZapPacksOptions,\n ZapPackEdge,\n ZapPackOverview,\n} from './discovery.js';\nexport type {\n Reachability,\n ReachabilityOptions,\n RoutablePair,\n TokenRef,\n} from './reachability.js';\nexport { buildReachability } from './reachability.js';\nexport type {\n ComposeError,\n ComposeErrorCode,\n ComposeSdkOutdated,\n ComposeServerOutdated,\n ComposePreparationOps,\n} from './errors.js';\nexport type {\n AppliedGuard,\n ApprovalEntry,\n Call,\n ComposeCompilePartialData,\n ComposeAction,\n ComposeFill,\n ComposeFee,\n ComposeUserProgramSimulation,\n ComposeCompileRequest,\n ComposeCompileResult,\n ComposeCompileSuccessData,\n ComposeErrorKind,\n ComposeRouteRequest,\n ComposeTransactionRequest,\n FailedPreparedOp,\n Flow,\n InputSpec,\n MaterialiserConfigOf,\n MaterialiserInput,\n OutputAmount,\n Amount,\n ConsumedOutput,\n Delivery,\n Estimate,\n EstimateBasis,\n Minimum,\n MinimumBasis,\n Output,\n Outputs,\n TerminalOutput,\n Precondition,\n PreconditionConfigOf,\n PriceImpact,\n Ref,\n Resource,\n RouteAmount,\n RouteAmountAll,\n RouteAmountExact,\n SimulationPolicy,\n SimulationRevert,\n SolType,\n SweepTo,\n SimulateRequest,\n SimulateResult,\n SimulateOkResult,\n SimulateRevertResult,\n SimulateRevertDecodeResult,\n SimulateSetupErrorResult,\n SimulateBalanceEntry,\n TrackedBalance,\n SlotFinderRequirement,\n Erc20BalanceRequirement,\n NativeBalanceRequirement,\n Erc20AllowanceRequirement,\n ContinuationIntent,\n ContinuationOutcome,\n Check,\n CheckComparator,\n SettlementWire,\n SettlementEscrowWire,\n ContinuationPlanWire,\n} from '@lifi/compose-spec';\nexport {\n SIMULATE_MAX_TRACKED_BALANCES,\n SIMULATE_MAX_REQUIREMENTS,\n} from '@lifi/compose-spec';\nexport {\n isComposeError,\n isComposePreparationError,\n isComposeSdkOutdatedError,\n isComposeServerOutdatedError,\n} from './errors.js';\n\nexport type {\n Bindable,\n RefBindable,\n AnyRefBindable,\n InputHandle,\n ResourceInputHandle,\n OutputHandle,\n OutputFamilyHandles,\n FamilyCount,\n FamilySource,\n AnyHandle,\n} from './authoring/handles.js';\nexport { isInputHandle, isOutputHandle } from './authoring/handles.js';\nexport { ref } from './authoring/raw.js';\n\nexport type { AnyBindable } from './authoring/FlowBuilderCore.js';\nexport type { TypedFlow, FlowOptions } from './authoring/FlowBuilderCore.js';\n\nexport type { ComposeRunInput } from './run/inputs.js';\nexport { materialiser } from './run/inputs.js';\n\nexport { buildSimulateRequest } from './run/simulate.js';\nexport type { BuildSimulateRequestInput } from './run/simulate.js';\n\nexport { terminalOutputs } from './outputs.js';\n\nexport { createComposeSdk } from './sdk.js';\nexport type { ComposeSdk, ComposeSdkOptions, FlowBuilder } from './sdk.js';\n\nimport * as guardsMod from './generated/guards.generated.js';\nimport * as materialisersMod from './generated/materialisers.generated.js';\nimport * as preconditionsMod from './generated/preconditions.generated.js';\nimport * as rawMod from './raw.js';\nimport * as resourcesMod from './resources.js';\nimport * as routeAmountMod from './routeAmount.js';\n\n/**\n * Guard factories for protecting operation outputs (e.g. slippage tolerance).\n * Pass guards to an operation's `guards` array.\n *\n * @example\n * ```ts\n * builder.lifi.swap('swap1', {\n * bind: { amountIn: builder.inputs.token },\n * config: { resourceOut: resources.native(1) },\n * guards: [guards.slippage({ port: 'amountOut', bps: 300 })],\n * });\n * ```\n */\nexport const guards: typeof guardsMod = guardsMod;\n/**\n * Materialiser factories that tell the runtime how to resolve token input\n * amounts on-chain (e.g. read a wallet balance, accept a direct deposit).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * signer: '0x...',\n * });\n * ```\n */\nexport const materialisers: typeof materialisersMod = materialisersMod;\n/**\n * Precondition factories for asserting on-chain state before a flow executes\n * (e.g. minimum token balances, ERC-20 allowances).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * preconditions: [\n * preconditions.erc20Balance({ wallet: '0x...', token: '0x...', balance: 1000n }),\n * ],\n * signer: '0x...',\n * });\n * ```\n */\nexport const preconditions: typeof preconditionsMod = preconditionsMod;\n/**\n * Resource declaration helpers for defining token inputs in a flow schema.\n * Use {@link resources.erc20} for ERC-20 tokens and {@link resources.native}\n * for the chain's native coin (ETH, MATIC, etc.).\n *\n * @example\n * ```ts\n * const builder = sdk.flow(1, {\n * inputs: {\n * usdc: resources.erc20('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', 1),\n * eth: resources.native(1),\n * },\n * });\n * ```\n */\nexport const resources: typeof resourcesMod = resourcesMod;\n/**\n * Amount constructors for {@link ComposeSdk.route}. Use\n * {@link routeAmount.exact} to spend a fixed amount of the `fromToken`, and\n * {@link routeAmount.all} to spend the signer's whole balance.\n *\n * @example\n * ```ts\n * // USDC into the Aave v3 aEthUSDC position — one routing-catalog edge.\n * const result = await sdk.route({\n * chainId: 1,\n * fromToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',\n * toToken: '0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c',\n * amount: routeAmount.exact(1_000_000n),\n * signer: '0xYourAddress...',\n * });\n * ```\n */\nexport const routeAmount: typeof routeAmountMod = routeAmountMod;\nexport * from './generated/config.generated.js';\n\n/**\n * Low-level escape hatch for constructing flow nodes, guards, and materialiser\n * inputs without the typed builder API. Prefer the generated operation methods\n * on {@link FlowBuilder} and the typed `guards`/`materialisers` namespaces\n * for most use cases.\n */\nexport const raw: typeof rawMod = rawMod;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoCA,0BAAkC;AAuElC,0BAGO;AACP,oBAKO;AAcP,qBAA8C;AAC9C,iBAAoB;AAMpB,oBAA6B;AAE7B,sBAAqC;AAGrC,qBAAgC;AAEhC,iBAAiC;AAGjC,gBAA2B;AAC3B,uBAAkC;AAClC,uBAAkC;AAClC,aAAwB;AACxB,mBAA8B;AAC9B,qBAAgC;AA+EhC,0BAAc,4CAvOd;AAuKO,MAAM,SAA2B;AAajC,MAAM,gBAAyC;AAgB/C,MAAM,gBAAyC;AAgB/C,MAAM,YAAiC;AAkBvC,MAAM,cAAqC;AAS3C,MAAM,MAAqB;","names":[]}
package/dist/index.d.cts CHANGED
@@ -2,8 +2,8 @@ export { AbiTypeToOutputKind, Address, InputDecl, InputSchema, InputSpecOf, Inte
2
2
  export { ChainSummary, GetZapPacksOptions, ZapPackEdge, ZapPackOverview } from './discovery.cjs';
3
3
  export { Reachability, ReachabilityOptions, RoutablePair, TokenRef, buildReachability } from './reachability.cjs';
4
4
  export { ComposeError, ComposeErrorCode, ComposePreparationOps, ComposeSdkOutdated, ComposeServerOutdated, isComposeError, isComposePreparationError, isComposeSdkOutdatedError, isComposeServerOutdatedError } from './errors.cjs';
5
- export { Amount, AppliedGuard, ApprovalEntry, Call, Check, CheckComparator, ComposeAction, ComposeCompilePartialData, ComposeCompileRequest, ComposeCompileResult, ComposeCompileSuccessData, ComposeErrorKind, ComposeFee, ComposeFill, ComposeRouteRequest, ComposeTransactionRequest, ComposeUserProgramSimulation, ConsumedOutput, ContinuationIntent, ContinuationOutcome, ContinuationPlanWire, Delivery, Erc20AllowanceRequirement, Erc20BalanceRequirement, Estimate, EstimateBasis, FailedPreparedOp, Flow, InputSpec, MaterialiserConfigOf, MaterialiserInput, Minimum, MinimumBasis, NativeBalanceRequirement, Output, OutputAmount, Outputs, Phase1ArtifactWire, Precondition, PreconditionConfigOf, PriceImpact, Ref, Resource, RouteAmount, RouteAmountAll, RouteAmountExact, SIMULATE_MAX_REQUIREMENTS, SIMULATE_MAX_TRACKED_BALANCES, SimulateBalanceEntry, SimulateOkResult, SimulateRequest, SimulateResult, SimulateRevertDecodeResult, SimulateRevertResult, SimulateSetupErrorResult, SimulationPolicy, SimulationRevert, SlotFinderRequirement, SolType, SweepTo, TerminalOutput, TrackedBalance } from '@lifi/compose-spec';
6
- export { AnyHandle, AnyRefBindable, Bindable, InputHandle, OutputHandle, RefBindable, ResourceInputHandle, isInputHandle, isOutputHandle } from './authoring/handles.cjs';
5
+ export { Amount, AppliedGuard, ApprovalEntry, Call, Check, CheckComparator, ComposeAction, ComposeCompilePartialData, ComposeCompileRequest, ComposeCompileResult, ComposeCompileSuccessData, ComposeErrorKind, ComposeFee, ComposeFill, ComposeRouteRequest, ComposeTransactionRequest, ComposeUserProgramSimulation, ConsumedOutput, ContinuationIntent, ContinuationOutcome, ContinuationPlanWire, Delivery, Erc20AllowanceRequirement, Erc20BalanceRequirement, Estimate, EstimateBasis, FailedPreparedOp, Flow, InputSpec, MaterialiserConfigOf, MaterialiserInput, Minimum, MinimumBasis, NativeBalanceRequirement, Output, OutputAmount, Outputs, Precondition, PreconditionConfigOf, PriceImpact, Ref, Resource, RouteAmount, RouteAmountAll, RouteAmountExact, SIMULATE_MAX_REQUIREMENTS, SIMULATE_MAX_TRACKED_BALANCES, SettlementEscrowWire, SettlementWire, SimulateBalanceEntry, SimulateOkResult, SimulateRequest, SimulateResult, SimulateRevertDecodeResult, SimulateRevertResult, SimulateSetupErrorResult, SimulationPolicy, SimulationRevert, SlotFinderRequirement, SolType, SweepTo, TerminalOutput, TrackedBalance } from '@lifi/compose-spec';
6
+ export { AnyHandle, AnyRefBindable, Bindable, FamilyCount, FamilySource, InputHandle, OutputFamilyHandles, OutputHandle, RefBindable, ResourceInputHandle, isInputHandle, isOutputHandle } from './authoring/handles.cjs';
7
7
  export { ref } from './authoring/raw.cjs';
8
8
  export { AnyBindable, FlowOptions, TypedFlow } from './authoring/FlowBuilderCore.cjs';
9
9
  export { ComposeRunInput, materialiser } from './run/inputs.cjs';
@@ -16,7 +16,7 @@ import { p as preconditionsMod } from './preconditions.generated-DblS13Wq.cjs';
16
16
  import { r as rawMod } from './raw-s1rer8X3.cjs';
17
17
  import { r as resourcesMod } from './resources-BKlFxjo8.cjs';
18
18
  import { r as routeAmountMod } from './routeAmount-DdbJYJyM.cjs';
19
- export { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, BalanceOfMaterialiserConfig, Between01, Between010000, Between0255, Between03318, Between05000, CallMaterialiserConfig, ContinuationAssertReadyConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CoreInvokeConfig, CoreNumericInvariantGuardConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, DirectDepositMaterialiserConfig, Erc20AllowancePreconditionConfig, Erc20BalancePreconditionConfig, FlashloanMaterialiserConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiFlashloanRepayConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MaxItems50, MaxLength64, MaxLength65536, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, NativeBalancePreconditionConfig, NonNegative, ParaswapBuyConfig, Positive, SlippageGuardConfig, StartsWith0X } from './generated/config.generated.cjs';
19
+ export { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, BalanceOfMaterialiserConfig, Between01, Between010000, Between0255, Between03318, Between05000, Between19999, CallMaterialiserConfig, ContinuationAssertReadyConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CoreInvokeConfig, CoreNumericInvariantGuardConfig, CorePartitionConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, DirectDepositMaterialiserConfig, Erc20AllowancePreconditionConfig, Erc20BalancePreconditionConfig, FlashloanMaterialiserConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiFlashloanRepayConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MaxItems16, MaxItems50, MaxLength64, MaxLength65536, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, NativeBalancePreconditionConfig, NonNegative, ParaswapBuyConfig, Positive, SlippageGuardConfig, StartsWith0X } from './generated/config.generated.cjs';
20
20
  import './client.cjs';
21
21
  import './generated/operations.generated.cjs';
22
22
  import './authoring/signatureArgs.cjs';
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ export { AbiTypeToOutputKind, Address, InputDecl, InputSchema, InputSpecOf, Inte
2
2
  export { ChainSummary, GetZapPacksOptions, ZapPackEdge, ZapPackOverview } from './discovery.js';
3
3
  export { Reachability, ReachabilityOptions, RoutablePair, TokenRef, buildReachability } from './reachability.js';
4
4
  export { ComposeError, ComposeErrorCode, ComposePreparationOps, ComposeSdkOutdated, ComposeServerOutdated, isComposeError, isComposePreparationError, isComposeSdkOutdatedError, isComposeServerOutdatedError } from './errors.js';
5
- export { Amount, AppliedGuard, ApprovalEntry, Call, Check, CheckComparator, ComposeAction, ComposeCompilePartialData, ComposeCompileRequest, ComposeCompileResult, ComposeCompileSuccessData, ComposeErrorKind, ComposeFee, ComposeFill, ComposeRouteRequest, ComposeTransactionRequest, ComposeUserProgramSimulation, ConsumedOutput, ContinuationIntent, ContinuationOutcome, ContinuationPlanWire, Delivery, Erc20AllowanceRequirement, Erc20BalanceRequirement, Estimate, EstimateBasis, FailedPreparedOp, Flow, InputSpec, MaterialiserConfigOf, MaterialiserInput, Minimum, MinimumBasis, NativeBalanceRequirement, Output, OutputAmount, Outputs, Phase1ArtifactWire, Precondition, PreconditionConfigOf, PriceImpact, Ref, Resource, RouteAmount, RouteAmountAll, RouteAmountExact, SIMULATE_MAX_REQUIREMENTS, SIMULATE_MAX_TRACKED_BALANCES, SimulateBalanceEntry, SimulateOkResult, SimulateRequest, SimulateResult, SimulateRevertDecodeResult, SimulateRevertResult, SimulateSetupErrorResult, SimulationPolicy, SimulationRevert, SlotFinderRequirement, SolType, SweepTo, TerminalOutput, TrackedBalance } from '@lifi/compose-spec';
6
- export { AnyHandle, AnyRefBindable, Bindable, InputHandle, OutputHandle, RefBindable, ResourceInputHandle, isInputHandle, isOutputHandle } from './authoring/handles.js';
5
+ export { Amount, AppliedGuard, ApprovalEntry, Call, Check, CheckComparator, ComposeAction, ComposeCompilePartialData, ComposeCompileRequest, ComposeCompileResult, ComposeCompileSuccessData, ComposeErrorKind, ComposeFee, ComposeFill, ComposeRouteRequest, ComposeTransactionRequest, ComposeUserProgramSimulation, ConsumedOutput, ContinuationIntent, ContinuationOutcome, ContinuationPlanWire, Delivery, Erc20AllowanceRequirement, Erc20BalanceRequirement, Estimate, EstimateBasis, FailedPreparedOp, Flow, InputSpec, MaterialiserConfigOf, MaterialiserInput, Minimum, MinimumBasis, NativeBalanceRequirement, Output, OutputAmount, Outputs, Precondition, PreconditionConfigOf, PriceImpact, Ref, Resource, RouteAmount, RouteAmountAll, RouteAmountExact, SIMULATE_MAX_REQUIREMENTS, SIMULATE_MAX_TRACKED_BALANCES, SettlementEscrowWire, SettlementWire, SimulateBalanceEntry, SimulateOkResult, SimulateRequest, SimulateResult, SimulateRevertDecodeResult, SimulateRevertResult, SimulateSetupErrorResult, SimulationPolicy, SimulationRevert, SlotFinderRequirement, SolType, SweepTo, TerminalOutput, TrackedBalance } from '@lifi/compose-spec';
6
+ export { AnyHandle, AnyRefBindable, Bindable, FamilyCount, FamilySource, InputHandle, OutputFamilyHandles, OutputHandle, RefBindable, ResourceInputHandle, isInputHandle, isOutputHandle } from './authoring/handles.js';
7
7
  export { ref } from './authoring/raw.js';
8
8
  export { AnyBindable, FlowOptions, TypedFlow } from './authoring/FlowBuilderCore.js';
9
9
  export { ComposeRunInput, materialiser } from './run/inputs.js';
@@ -16,7 +16,7 @@ import { p as preconditionsMod } from './preconditions.generated-U7YpVh30.js';
16
16
  import { r as rawMod } from './raw-BvRghN3r.js';
17
17
  import { r as resourcesMod } from './resources-CYis1_DS.js';
18
18
  import { r as routeAmountMod } from './routeAmount-DdbJYJyM.js';
19
- export { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, BalanceOfMaterialiserConfig, Between01, Between010000, Between0255, Between03318, Between05000, CallMaterialiserConfig, ContinuationAssertReadyConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CoreInvokeConfig, CoreNumericInvariantGuardConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, DirectDepositMaterialiserConfig, Erc20AllowancePreconditionConfig, Erc20BalancePreconditionConfig, FlashloanMaterialiserConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiFlashloanRepayConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MaxItems50, MaxLength64, MaxLength65536, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, NativeBalancePreconditionConfig, NonNegative, ParaswapBuyConfig, Positive, SlippageGuardConfig, StartsWith0X } from './generated/config.generated.js';
19
+ export { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, BalanceOfMaterialiserConfig, Between01, Between010000, Between0255, Between03318, Between05000, Between19999, CallMaterialiserConfig, ContinuationAssertReadyConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CoreInvokeConfig, CoreNumericInvariantGuardConfig, CorePartitionConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, DirectDepositMaterialiserConfig, Erc20AllowancePreconditionConfig, Erc20BalancePreconditionConfig, FlashloanMaterialiserConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiFlashloanRepayConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MaxItems16, MaxItems50, MaxLength64, MaxLength65536, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, NativeBalancePreconditionConfig, NonNegative, ParaswapBuyConfig, Positive, SlippageGuardConfig, StartsWith0X } from './generated/config.generated.js';
20
20
  import './client.js';
21
21
  import './generated/operations.generated.js';
22
22
  import './authoring/signatureArgs.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@lifi/composer-sdk` — TypeScript SDK for building and compiling\n * Compose flows into executable EVM calldata.\n *\n * Start by creating an SDK instance with {@link createComposeSdk}, then use\n * {@link ComposeSdk.flow} to build flows and compile them.\n *\n * @packageDocumentation\n */\n\nexport type {\n AbiTypeToOutputKind,\n Address,\n InputDecl,\n InputSchema,\n InputSpecOf,\n IntegerString,\n IntegerStringInput,\n OutputKind,\n TypedGuard,\n TypedRef,\n TypedLiteral,\n} from './types.js';\n\nexport type {\n ChainSummary,\n GetZapPacksOptions,\n ZapPackEdge,\n ZapPackOverview,\n} from './discovery.js';\nexport type {\n Reachability,\n ReachabilityOptions,\n RoutablePair,\n TokenRef,\n} from './reachability.js';\nexport { buildReachability } from './reachability.js';\nexport type {\n ComposeError,\n ComposeErrorCode,\n ComposeSdkOutdated,\n ComposeServerOutdated,\n ComposePreparationOps,\n} from './errors.js';\nexport type {\n AppliedGuard,\n ApprovalEntry,\n Call,\n ComposeCompilePartialData,\n ComposeAction,\n ComposeFill,\n ComposeFee,\n ComposeUserProgramSimulation,\n ComposeCompileRequest,\n ComposeCompileResult,\n ComposeCompileSuccessData,\n ComposeErrorKind,\n ComposeRouteRequest,\n ComposeTransactionRequest,\n FailedPreparedOp,\n Flow,\n InputSpec,\n MaterialiserConfigOf,\n MaterialiserInput,\n OutputAmount,\n Amount,\n ConsumedOutput,\n Delivery,\n Estimate,\n EstimateBasis,\n Minimum,\n MinimumBasis,\n Output,\n Outputs,\n TerminalOutput,\n Precondition,\n PreconditionConfigOf,\n PriceImpact,\n Ref,\n Resource,\n RouteAmount,\n RouteAmountAll,\n RouteAmountExact,\n SimulationPolicy,\n SimulationRevert,\n SolType,\n SweepTo,\n SimulateRequest,\n SimulateResult,\n SimulateOkResult,\n SimulateRevertResult,\n SimulateRevertDecodeResult,\n SimulateSetupErrorResult,\n SimulateBalanceEntry,\n TrackedBalance,\n SlotFinderRequirement,\n Erc20BalanceRequirement,\n NativeBalanceRequirement,\n Erc20AllowanceRequirement,\n ContinuationIntent,\n ContinuationOutcome,\n Check,\n CheckComparator,\n Phase1ArtifactWire,\n ContinuationPlanWire,\n} from '@lifi/compose-spec';\nexport {\n SIMULATE_MAX_TRACKED_BALANCES,\n SIMULATE_MAX_REQUIREMENTS,\n} from '@lifi/compose-spec';\nexport {\n isComposeError,\n isComposePreparationError,\n isComposeSdkOutdatedError,\n isComposeServerOutdatedError,\n} from './errors.js';\n\nexport type {\n Bindable,\n RefBindable,\n AnyRefBindable,\n InputHandle,\n ResourceInputHandle,\n OutputHandle,\n AnyHandle,\n} from './authoring/handles.js';\nexport { isInputHandle, isOutputHandle } from './authoring/handles.js';\nexport { ref } from './authoring/raw.js';\n\nexport type { AnyBindable } from './authoring/FlowBuilderCore.js';\nexport type { TypedFlow, FlowOptions } from './authoring/FlowBuilderCore.js';\n\nexport type { ComposeRunInput } from './run/inputs.js';\nexport { materialiser } from './run/inputs.js';\n\nexport { buildSimulateRequest } from './run/simulate.js';\nexport type { BuildSimulateRequestInput } from './run/simulate.js';\n\nexport { terminalOutputs } from './outputs.js';\n\nexport { createComposeSdk } from './sdk.js';\nexport type { ComposeSdk, ComposeSdkOptions, FlowBuilder } from './sdk.js';\n\nimport * as guardsMod from './generated/guards.generated.js';\nimport * as materialisersMod from './generated/materialisers.generated.js';\nimport * as preconditionsMod from './generated/preconditions.generated.js';\nimport * as rawMod from './raw.js';\nimport * as resourcesMod from './resources.js';\nimport * as routeAmountMod from './routeAmount.js';\n\n/**\n * Guard factories for protecting operation outputs (e.g. slippage tolerance).\n * Pass guards to an operation's `guards` array.\n *\n * @example\n * ```ts\n * builder.lifi.swap('swap1', {\n * bind: { amountIn: builder.inputs.token },\n * config: { resourceOut: resources.native(1) },\n * guards: [guards.slippage({ port: 'amountOut', bps: 300 })],\n * });\n * ```\n */\nexport const guards: typeof guardsMod = guardsMod;\n/**\n * Materialiser factories that tell the runtime how to resolve token input\n * amounts on-chain (e.g. read a wallet balance, accept a direct deposit).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * signer: '0x...',\n * });\n * ```\n */\nexport const materialisers: typeof materialisersMod = materialisersMod;\n/**\n * Precondition factories for asserting on-chain state before a flow executes\n * (e.g. minimum token balances, ERC-20 allowances).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * preconditions: [\n * preconditions.erc20Balance({ wallet: '0x...', token: '0x...', balance: 1000n }),\n * ],\n * signer: '0x...',\n * });\n * ```\n */\nexport const preconditions: typeof preconditionsMod = preconditionsMod;\n/**\n * Resource declaration helpers for defining token inputs in a flow schema.\n * Use {@link resources.erc20} for ERC-20 tokens and {@link resources.native}\n * for the chain's native coin (ETH, MATIC, etc.).\n *\n * @example\n * ```ts\n * const builder = sdk.flow(1, {\n * inputs: {\n * usdc: resources.erc20('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', 1),\n * eth: resources.native(1),\n * },\n * });\n * ```\n */\nexport const resources: typeof resourcesMod = resourcesMod;\n/**\n * Amount constructors for {@link ComposeSdk.route}. Use\n * {@link routeAmount.exact} to spend a fixed amount of the `fromToken`, and\n * {@link routeAmount.all} to spend the signer's whole balance.\n *\n * @example\n * ```ts\n * // USDC into the Aave v3 aEthUSDC position — one routing-catalog edge.\n * const result = await sdk.route({\n * chainId: 1,\n * fromToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',\n * toToken: '0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c',\n * amount: routeAmount.exact(1_000_000n),\n * signer: '0xYourAddress...',\n * });\n * ```\n */\nexport const routeAmount: typeof routeAmountMod = routeAmountMod;\nexport * from './generated/config.generated.js';\n\n/**\n * Low-level escape hatch for constructing flow nodes, guards, and materialiser\n * inputs without the typed builder API. Prefer the generated operation methods\n * on {@link FlowBuilder} and the typed `guards`/`materialisers` namespaces\n * for most use cases.\n */\nexport const raw: typeof rawMod = rawMod;\n"],"mappings":"AAoCA,SAAS,yBAAyB;AAsElC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAWP,SAAS,eAAe,sBAAsB;AAC9C,SAAS,WAAW;AAMpB,SAAS,oBAAoB;AAE7B,SAAS,4BAA4B;AAGrC,SAAS,uBAAuB;AAEhC,SAAS,wBAAwB;AAGjC,YAAY,eAAe;AAC3B,YAAY,sBAAsB;AAClC,YAAY,sBAAsB;AAClC,YAAY,YAAY;AACxB,YAAY,kBAAkB;AAC9B,YAAY,oBAAoB;AAezB,MAAM,SAA2B;AAajC,MAAM,gBAAyC;AAgB/C,MAAM,gBAAyC;AAgB/C,MAAM,YAAiC;AAkBvC,MAAM,cAAqC;AAClD,cAAc;AAQP,MAAM,MAAqB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * `@lifi/composer-sdk` — TypeScript SDK for building and compiling\n * Compose flows into executable EVM calldata.\n *\n * Start by creating an SDK instance with {@link createComposeSdk}, then use\n * {@link ComposeSdk.flow} to build flows and compile them.\n *\n * @packageDocumentation\n */\n\nexport type {\n AbiTypeToOutputKind,\n Address,\n InputDecl,\n InputSchema,\n InputSpecOf,\n IntegerString,\n IntegerStringInput,\n OutputKind,\n TypedGuard,\n TypedRef,\n TypedLiteral,\n} from './types.js';\n\nexport type {\n ChainSummary,\n GetZapPacksOptions,\n ZapPackEdge,\n ZapPackOverview,\n} from './discovery.js';\nexport type {\n Reachability,\n ReachabilityOptions,\n RoutablePair,\n TokenRef,\n} from './reachability.js';\nexport { buildReachability } from './reachability.js';\nexport type {\n ComposeError,\n ComposeErrorCode,\n ComposeSdkOutdated,\n ComposeServerOutdated,\n ComposePreparationOps,\n} from './errors.js';\nexport type {\n AppliedGuard,\n ApprovalEntry,\n Call,\n ComposeCompilePartialData,\n ComposeAction,\n ComposeFill,\n ComposeFee,\n ComposeUserProgramSimulation,\n ComposeCompileRequest,\n ComposeCompileResult,\n ComposeCompileSuccessData,\n ComposeErrorKind,\n ComposeRouteRequest,\n ComposeTransactionRequest,\n FailedPreparedOp,\n Flow,\n InputSpec,\n MaterialiserConfigOf,\n MaterialiserInput,\n OutputAmount,\n Amount,\n ConsumedOutput,\n Delivery,\n Estimate,\n EstimateBasis,\n Minimum,\n MinimumBasis,\n Output,\n Outputs,\n TerminalOutput,\n Precondition,\n PreconditionConfigOf,\n PriceImpact,\n Ref,\n Resource,\n RouteAmount,\n RouteAmountAll,\n RouteAmountExact,\n SimulationPolicy,\n SimulationRevert,\n SolType,\n SweepTo,\n SimulateRequest,\n SimulateResult,\n SimulateOkResult,\n SimulateRevertResult,\n SimulateRevertDecodeResult,\n SimulateSetupErrorResult,\n SimulateBalanceEntry,\n TrackedBalance,\n SlotFinderRequirement,\n Erc20BalanceRequirement,\n NativeBalanceRequirement,\n Erc20AllowanceRequirement,\n ContinuationIntent,\n ContinuationOutcome,\n Check,\n CheckComparator,\n SettlementWire,\n SettlementEscrowWire,\n ContinuationPlanWire,\n} from '@lifi/compose-spec';\nexport {\n SIMULATE_MAX_TRACKED_BALANCES,\n SIMULATE_MAX_REQUIREMENTS,\n} from '@lifi/compose-spec';\nexport {\n isComposeError,\n isComposePreparationError,\n isComposeSdkOutdatedError,\n isComposeServerOutdatedError,\n} from './errors.js';\n\nexport type {\n Bindable,\n RefBindable,\n AnyRefBindable,\n InputHandle,\n ResourceInputHandle,\n OutputHandle,\n OutputFamilyHandles,\n FamilyCount,\n FamilySource,\n AnyHandle,\n} from './authoring/handles.js';\nexport { isInputHandle, isOutputHandle } from './authoring/handles.js';\nexport { ref } from './authoring/raw.js';\n\nexport type { AnyBindable } from './authoring/FlowBuilderCore.js';\nexport type { TypedFlow, FlowOptions } from './authoring/FlowBuilderCore.js';\n\nexport type { ComposeRunInput } from './run/inputs.js';\nexport { materialiser } from './run/inputs.js';\n\nexport { buildSimulateRequest } from './run/simulate.js';\nexport type { BuildSimulateRequestInput } from './run/simulate.js';\n\nexport { terminalOutputs } from './outputs.js';\n\nexport { createComposeSdk } from './sdk.js';\nexport type { ComposeSdk, ComposeSdkOptions, FlowBuilder } from './sdk.js';\n\nimport * as guardsMod from './generated/guards.generated.js';\nimport * as materialisersMod from './generated/materialisers.generated.js';\nimport * as preconditionsMod from './generated/preconditions.generated.js';\nimport * as rawMod from './raw.js';\nimport * as resourcesMod from './resources.js';\nimport * as routeAmountMod from './routeAmount.js';\n\n/**\n * Guard factories for protecting operation outputs (e.g. slippage tolerance).\n * Pass guards to an operation's `guards` array.\n *\n * @example\n * ```ts\n * builder.lifi.swap('swap1', {\n * bind: { amountIn: builder.inputs.token },\n * config: { resourceOut: resources.native(1) },\n * guards: [guards.slippage({ port: 'amountOut', bps: 300 })],\n * });\n * ```\n */\nexport const guards: typeof guardsMod = guardsMod;\n/**\n * Materialiser factories that tell the runtime how to resolve token input\n * amounts on-chain (e.g. read a wallet balance, accept a direct deposit).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * signer: '0x...',\n * });\n * ```\n */\nexport const materialisers: typeof materialisersMod = materialisersMod;\n/**\n * Precondition factories for asserting on-chain state before a flow executes\n * (e.g. minimum token balances, ERC-20 allowances).\n *\n * @example\n * ```ts\n * await builder.compile({\n * inputs: { token: materialisers.balanceOf({}) },\n * preconditions: [\n * preconditions.erc20Balance({ wallet: '0x...', token: '0x...', balance: 1000n }),\n * ],\n * signer: '0x...',\n * });\n * ```\n */\nexport const preconditions: typeof preconditionsMod = preconditionsMod;\n/**\n * Resource declaration helpers for defining token inputs in a flow schema.\n * Use {@link resources.erc20} for ERC-20 tokens and {@link resources.native}\n * for the chain's native coin (ETH, MATIC, etc.).\n *\n * @example\n * ```ts\n * const builder = sdk.flow(1, {\n * inputs: {\n * usdc: resources.erc20('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', 1),\n * eth: resources.native(1),\n * },\n * });\n * ```\n */\nexport const resources: typeof resourcesMod = resourcesMod;\n/**\n * Amount constructors for {@link ComposeSdk.route}. Use\n * {@link routeAmount.exact} to spend a fixed amount of the `fromToken`, and\n * {@link routeAmount.all} to spend the signer's whole balance.\n *\n * @example\n * ```ts\n * // USDC into the Aave v3 aEthUSDC position — one routing-catalog edge.\n * const result = await sdk.route({\n * chainId: 1,\n * fromToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',\n * toToken: '0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c',\n * amount: routeAmount.exact(1_000_000n),\n * signer: '0xYourAddress...',\n * });\n * ```\n */\nexport const routeAmount: typeof routeAmountMod = routeAmountMod;\nexport * from './generated/config.generated.js';\n\n/**\n * Low-level escape hatch for constructing flow nodes, guards, and materialiser\n * inputs without the typed builder API. Prefer the generated operation methods\n * on {@link FlowBuilder} and the typed `guards`/`materialisers` namespaces\n * for most use cases.\n */\nexport const raw: typeof rawMod = rawMod;\n"],"mappings":"AAoCA,SAAS,yBAAyB;AAuElC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAcP,SAAS,eAAe,sBAAsB;AAC9C,SAAS,WAAW;AAMpB,SAAS,oBAAoB;AAE7B,SAAS,4BAA4B;AAGrC,SAAS,uBAAuB;AAEhC,SAAS,wBAAwB;AAGjC,YAAY,eAAe;AAC3B,YAAY,sBAAsB;AAClC,YAAY,sBAAsB;AAClC,YAAY,YAAY;AACxB,YAAY,kBAAkB;AAC9B,YAAY,oBAAoB;AAezB,MAAM,SAA2B;AAajC,MAAM,gBAAyC;AAgB/C,MAAM,gBAAyC;AAgB/C,MAAM,YAAiC;AAkBvC,MAAM,cAAqC;AAClD,cAAc;AAQP,MAAM,MAAqB;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/composer-sdk",
3
- "version": "0.6.3",
3
+ "version": "0.7.0",
4
4
  "description": "Public Composer SDK for building and submitting flows",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -47,12 +47,12 @@
47
47
  "example:staged": "tsx src/examples/run.ts --staged"
48
48
  },
49
49
  "peerDependencies": {
50
- "@lifi/compose-spec": "0.6.3"
50
+ "@lifi/compose-spec": "0.7.0"
51
51
  },
52
52
  "dependencies": {
53
53
  "abitype": "^1.2.3",
54
54
  "effect": "^3.21.0",
55
- "zod": "^4.1.11"
55
+ "zod": "^4.6.5"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@eslint/compat": "^1.4.0",
@@ -1,12 +1,14 @@
1
- import type {
2
- AppliedGuard,
3
- BindValue,
4
- Call,
5
- Flow,
6
- FlowInput,
7
- Ref,
8
- Resource,
9
- SolType,
1
+ import {
2
+ type AppliedGuard,
3
+ type BindValue,
4
+ type Call,
5
+ familySize,
6
+ type Flow,
7
+ type FlowInput,
8
+ instancePortName,
9
+ type Ref,
10
+ type Resource,
11
+ type SolType,
10
12
  } from '@lifi/compose-spec';
11
13
 
12
14
  import type {
@@ -146,16 +148,34 @@ export interface FlowBuilderCore<T extends InputSchema = InputSchema> {
146
148
  /** Maps output port names to their output kind for compile-time and runtime validation. */
147
149
  export type OutputSpec = Record<string, OutputKind>;
148
150
 
151
+ /**
152
+ * Maps each output family's port name to the config key that sizes it: an
153
+ * array (one instance per element) or a non-negative integer count.
154
+ * A family port is also listed in the {@link OutputSpec}, as `'resource'`.
155
+ */
156
+ export type FamilySpec = Readonly<Record<string, string>>;
157
+
158
+ /** The handles `call` returns for an {@link OutputSpec} and its families. */
159
+ export type OutputHandles<O extends OutputSpec, F extends FamilySpec> = {
160
+ readonly [K in keyof O & string]: K extends keyof F
161
+ ? readonly OutputHandle<'resource'>[]
162
+ : OutputHandle<O[K]>;
163
+ };
164
+
149
165
  /** Internal interface exposed to bindGeneratedOps — not part of the public API. */
150
166
  export interface FlowBuilderInternal<
151
167
  T extends InputSchema = InputSchema,
152
168
  > extends FlowBuilderCore<T> {
153
- readonly call: <O extends OutputSpec>(
169
+ readonly call: <
170
+ O extends OutputSpec,
171
+ F extends FamilySpec = Record<never, string>,
172
+ >(
154
173
  nodeId: string,
155
174
  op: string,
156
175
  args: CallArgs,
157
176
  outputs: O,
158
- ) => { readonly [K in keyof O & string]: OutputHandle<O[K]> };
177
+ families?: F,
178
+ ) => OutputHandles<O, F>;
159
179
  }
160
180
 
161
181
  const isResource = (decl: InputDecl): decl is Resource =>
@@ -194,12 +214,16 @@ export const createFlowBuilderCore = <T extends InputSchema>(
194
214
  }
195
215
  }
196
216
 
197
- const call = <O extends OutputSpec>(
217
+ const call = <
218
+ O extends OutputSpec,
219
+ F extends FamilySpec = Record<never, string>,
220
+ >(
198
221
  nodeId: string,
199
222
  op: string,
200
223
  args: CallArgs,
201
224
  outputs: O,
202
- ): { readonly [K in keyof O & string]: OutputHandle<O[K]> } => {
225
+ families?: F,
226
+ ): OutputHandles<O, F> => {
203
227
  if (nodeIds.has(nodeId)) throw new Error(`Duplicate node id: "${nodeId}"`);
204
228
  nodeIds.add(nodeId);
205
229
 
@@ -208,18 +232,26 @@ export const createFlowBuilderCore = <T extends InputSchema>(
208
232
  bind[key] = toBindValue(val);
209
233
  }
210
234
 
235
+ const config = (args.config ?? {}) as Record<string, unknown>;
211
236
  const node: Call = {
212
237
  id: nodeId,
213
238
  op,
214
239
  bind,
215
- config: (args.config ?? {}) as Record<string, unknown>,
240
+ config,
216
241
  ...(args.guards && args.guards.length > 0 && { guards: args.guards }),
217
242
  };
218
243
  nodes.push(node);
219
244
 
220
- type Result = { readonly [K in keyof O & string]: OutputHandle<O[K]> };
221
- return new Proxy({} as Result, {
222
- get: (_target, prop): OutputHandle | undefined => {
245
+ const outputHandle = (portName: string): OutputHandle => ({
246
+ _tag: 'output',
247
+ nodeId,
248
+ portName,
249
+ });
250
+ return new Proxy({} as OutputHandles<O, F>, {
251
+ get: (
252
+ _target,
253
+ prop,
254
+ ): OutputHandle | readonly OutputHandle[] | undefined => {
223
255
  if (typeof prop !== 'string' || prop === 'then') return undefined;
224
256
  if (!(prop in outputs)) {
225
257
  throw new Error(
@@ -228,7 +260,12 @@ export const createFlowBuilderCore = <T extends InputSchema>(
228
260
  ).join(', ')}`,
229
261
  );
230
262
  }
231
- return { _tag: 'output', nodeId, portName: prop };
263
+ const countFrom = families?.[prop];
264
+ if (countFrom === undefined) return outputHandle(prop);
265
+ const size = familySize({ name: prop, countFrom }, config);
266
+ return Array.from({ length: size }, (_, index) =>
267
+ outputHandle(instancePortName(prop, index)),
268
+ );
232
269
  },
233
270
  });
234
271
  };