@lifi/composer-sdk 0.9.0 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -3
- package/dist/authoring/raw.cjs +12 -7
- package/dist/authoring/raw.cjs.map +1 -1
- package/dist/authoring/raw.d.cts +12 -7
- package/dist/authoring/raw.d.ts +12 -7
- package/dist/authoring/raw.js +12 -7
- package/dist/authoring/raw.js.map +1 -1
- package/dist/client.cjs +11 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +11 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.cjs +35 -13
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +19 -1
- package/dist/errors.d.ts +19 -1
- package/dist/errors.js +35 -14
- package/dist/errors.js.map +1 -1
- package/dist/generated/config.generated.d.cts +96 -1
- package/dist/generated/config.generated.d.ts +96 -1
- package/dist/generated/operations.generated.cjs +10 -0
- package/dist/generated/operations.generated.cjs.map +1 -1
- package/dist/generated/operations.generated.d.cts +56 -1
- package/dist/generated/operations.generated.d.ts +56 -1
- package/dist/generated/operations.generated.js +10 -0
- package/dist/generated/operations.generated.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/outputs.cjs +3 -2
- package/dist/outputs.cjs.map +1 -1
- package/dist/outputs.d.cts +3 -2
- package/dist/outputs.d.ts +3 -2
- package/dist/outputs.js +3 -2
- package/dist/outputs.js.map +1 -1
- package/dist/responseSchemas.cjs.map +1 -1
- package/dist/responseSchemas.d.cts +2 -2
- package/dist/responseSchemas.d.ts +2 -2
- package/dist/responseSchemas.js.map +1 -1
- package/dist/run/inputs.cjs.map +1 -1
- package/dist/run/inputs.d.cts +3 -3
- package/dist/run/inputs.d.ts +3 -3
- package/dist/run/inputs.js.map +1 -1
- package/package.json +3 -3
- package/src/authoring/raw.ts +12 -7
- package/src/client.ts +24 -1
- package/src/errors.ts +48 -17
- package/src/examples/continuationBridgeSettle.ts +100 -0
- package/src/examples/continuationSettle.ts +113 -0
- package/src/examples/run.ts +8 -0
- package/src/generated/config.generated.ts +109 -1
- package/src/generated/operations.generated.ts +98 -0
- package/src/index.ts +5 -1
- package/src/outputs.ts +3 -2
- package/src/responseSchemas.ts +9 -5
- package/src/run/inputs.ts +3 -3
|
@@ -2,7 +2,7 @@ import { TypedGuard } from "../types.cjs";
|
|
|
2
2
|
import { Bindable, FamilyCount, FamilySource, OutputFamilyHandles, OutputHandle } from "../authoring/handles.cjs";
|
|
3
3
|
import { FlowBuilderInternal } from "../authoring/FlowBuilderCore.cjs";
|
|
4
4
|
import { CoreCallResult, SignatureBind, StaticCallResult } from "../authoring/signatureArgs.cjs";
|
|
5
|
-
import { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CorePartitionConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitAtConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, ParaswapBuyConfig, UniswapV2AddLiquidityConfig, UniswapV2RemoveLiquidityConfig, UniswapV3IncreaseLiquidityConfig, UniswapV3MintConfig } from "./config.generated.cjs";
|
|
5
|
+
import { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, ContinuationSettleConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CorePartitionConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitAtConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiIntentsAttestNonFillConfig, LifiIntentsOrderConfig, LifiIntentsRefundConfig, LifiIntentsRefundOnNonFillConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, ParaswapBuyConfig, UniswapV2AddLiquidityConfig, UniswapV2RemoveLiquidityConfig, UniswapV3IncreaseLiquidityConfig, UniswapV3MintConfig } from "./config.generated.cjs";
|
|
6
6
|
//#region src/generated/operations.generated.d.ts
|
|
7
7
|
/** Split a resource into two outputs by basis-point ratio. Output `a` receives `bps` of the source, rounded up, and `b` takes the remainder. */
|
|
8
8
|
export interface CoreSplitArgs {
|
|
@@ -523,6 +523,14 @@ export interface FlySwapArgs {
|
|
|
523
523
|
readonly config: FlySwapConfig;
|
|
524
524
|
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
525
525
|
}
|
|
526
|
+
/** Fund a deferred settlement and commit to a future outcome */
|
|
527
|
+
export interface ContinuationSettleArgs {
|
|
528
|
+
readonly bind: {
|
|
529
|
+
readonly input: Bindable<"resource">;
|
|
530
|
+
};
|
|
531
|
+
readonly config: ContinuationSettleConfig;
|
|
532
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
533
|
+
}
|
|
526
534
|
/** Deposit two ERC-20 tokens into an existing Uniswap V2 pair (or an ABI-identical fork such as SushiSwap V2) through its Router02 and receive the pair's LP token; unused input returns as residuals. Asserts on chain that the router's factory is `factory`, that the factory's pair for the two tokens is `pair`, and that the pair holds non-zero reserves. Exposes the pool price read before the deposit as `poolPrice`. The deposit is protected only with a `band` guard on `poolPrice` and a `slippage` guard on `liquidity`. Fee-on-transfer tokens are unsupported. */
|
|
527
535
|
export interface UniswapV2AddLiquidityArgs {
|
|
528
536
|
readonly bind: {
|
|
@@ -560,6 +568,32 @@ export interface UniswapV3IncreaseLiquidityArgs {
|
|
|
560
568
|
readonly config: UniswapV3IncreaseLiquidityConfig;
|
|
561
569
|
readonly guards?: readonly TypedGuard<"liquidity" | "sqrtPriceX96" | "residualA" | "residualB">[];
|
|
562
570
|
}
|
|
571
|
+
/** Swap or bridge tokens through a LI.FI Intents order a solver fills */
|
|
572
|
+
export interface LifiIntentsOrderArgs {
|
|
573
|
+
readonly bind: {
|
|
574
|
+
readonly amountIn: Bindable<"resource">;
|
|
575
|
+
};
|
|
576
|
+
readonly config: LifiIntentsOrderConfig;
|
|
577
|
+
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
578
|
+
}
|
|
579
|
+
/** Refund a LI.FI Intents escrow order after its expiry. Anyone may call; the escrow pays the order's user. Only an order the order server reports before delivery (status Open or Signed) is refunded. */
|
|
580
|
+
export interface LifiIntentsRefundArgs {
|
|
581
|
+
readonly bind: Record<string, never>;
|
|
582
|
+
readonly config: LifiIntentsRefundConfig;
|
|
583
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
584
|
+
}
|
|
585
|
+
/** Step 1 of the early refund of a cross-chain LI.FI Intents order: on the order's output chain, after its fill deadline, record that the output was not filled. Keep the transaction hash for lifiIntents.refundOnNonFill. */
|
|
586
|
+
export interface LifiIntentsAttestNonFillArgs {
|
|
587
|
+
readonly bind: Record<string, never>;
|
|
588
|
+
readonly config: LifiIntentsAttestNonFillConfig;
|
|
589
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
590
|
+
}
|
|
591
|
+
/** Step 2 of the early refund of a cross-chain LI.FI Intents order: on the order's input chain, prove the non-fill attestation through Polymer and refund the order's user. A resolution_error means the proof is not ready yet; retry. */
|
|
592
|
+
export interface LifiIntentsRefundOnNonFillArgs {
|
|
593
|
+
readonly bind: Record<string, never>;
|
|
594
|
+
readonly config: LifiIntentsRefundOnNonFillConfig;
|
|
595
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
596
|
+
}
|
|
563
597
|
export interface CoreSplitOutputs {
|
|
564
598
|
readonly a: OutputHandle<"resource">;
|
|
565
599
|
readonly b: OutputHandle<"resource">;
|
|
@@ -680,6 +714,9 @@ export interface FlySwapOutputs {
|
|
|
680
714
|
readonly amountOut: OutputHandle<"resource">;
|
|
681
715
|
readonly unspentIn: OutputHandle<"resource">;
|
|
682
716
|
}
|
|
717
|
+
export interface ContinuationSettleOutputs {
|
|
718
|
+
readonly output: OutputHandle<"resource">;
|
|
719
|
+
}
|
|
683
720
|
export interface UniswapV2AddLiquidityOutputs {
|
|
684
721
|
readonly liquidity: OutputHandle<"resource">;
|
|
685
722
|
readonly residualA: OutputHandle<"resource">;
|
|
@@ -703,6 +740,10 @@ export interface UniswapV3IncreaseLiquidityOutputs {
|
|
|
703
740
|
readonly residualA: OutputHandle<"resource">;
|
|
704
741
|
readonly residualB: OutputHandle<"resource">;
|
|
705
742
|
}
|
|
743
|
+
export interface LifiIntentsOrderOutputs {
|
|
744
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
745
|
+
readonly unspentIn: OutputHandle<"resource">;
|
|
746
|
+
}
|
|
706
747
|
export type GeneratedOps = {
|
|
707
748
|
readonly core: {
|
|
708
749
|
/** 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" */
|
|
@@ -840,6 +881,10 @@ export type GeneratedOps = {
|
|
|
840
881
|
/** Read a Morpho Blue Position struct via a static call on the singleton. Exposes (supplyShares, borrowShares, collateral) as handles whose kinds match the on-chain field types (uint256, uint128, uint128). — original id: "morphoBlue.getPosition" */
|
|
841
882
|
readonly getPosition: (nodeId: string, args: MorphoBlueGetPositionArgs) => MorphoBlueGetPositionOutputs;
|
|
842
883
|
};
|
|
884
|
+
readonly continuation: {
|
|
885
|
+
/** Fund a deferred settlement and commit to a future outcome — original id: "continuation.settle" */
|
|
886
|
+
readonly settle: (nodeId: string, args: ContinuationSettleArgs) => ContinuationSettleOutputs;
|
|
887
|
+
};
|
|
843
888
|
readonly paraswap: {
|
|
844
889
|
/** 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" */
|
|
845
890
|
readonly buy: (nodeId: string, args: ParaswapBuyArgs) => ParaswapBuyOutputs;
|
|
@@ -860,6 +905,16 @@ export type GeneratedOps = {
|
|
|
860
905
|
/** Add two tokens to an existing Uniswap V3 position (or one on an ABI-identical fork). `owner` must own `tokenId`, and the position must hold the two input tokens; both are asserted on chain, since the position manager checks neither. Unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. — original id: "uniswapV3.increaseLiquidity" */
|
|
861
906
|
readonly increaseLiquidity: (nodeId: string, args: UniswapV3IncreaseLiquidityArgs) => UniswapV3IncreaseLiquidityOutputs;
|
|
862
907
|
};
|
|
908
|
+
readonly lifiIntents: {
|
|
909
|
+
/** Swap or bridge tokens through a LI.FI Intents order a solver fills — original id: "lifiIntents.order" */
|
|
910
|
+
readonly order: (nodeId: string, args: LifiIntentsOrderArgs) => LifiIntentsOrderOutputs;
|
|
911
|
+
/** Refund a LI.FI Intents escrow order after its expiry. Anyone may call; the escrow pays the order's user. Only an order the order server reports before delivery (status Open or Signed) is refunded. — original id: "lifiIntents.refund" */
|
|
912
|
+
readonly refund: (nodeId: string, args: LifiIntentsRefundArgs) => void;
|
|
913
|
+
/** Step 1 of the early refund of a cross-chain LI.FI Intents order: on the order's output chain, after its fill deadline, record that the output was not filled. Keep the transaction hash for lifiIntents.refundOnNonFill. — original id: "lifiIntents.attestNonFill" */
|
|
914
|
+
readonly attestNonFill: (nodeId: string, args: LifiIntentsAttestNonFillArgs) => void;
|
|
915
|
+
/** Step 2 of the early refund of a cross-chain LI.FI Intents order: on the order's input chain, prove the non-fill attestation through Polymer and refund the order's user. A resolution_error means the proof is not ready yet; retry. — original id: "lifiIntents.refundOnNonFill" */
|
|
916
|
+
readonly refundOnNonFill: (nodeId: string, args: LifiIntentsRefundOnNonFillArgs) => void;
|
|
917
|
+
};
|
|
863
918
|
};
|
|
864
919
|
export declare const bindGeneratedOps: (builder: FlowBuilderInternal) => GeneratedOps;
|
|
865
920
|
//#endregion
|
|
@@ -2,7 +2,7 @@ import { TypedGuard } from "../types.js";
|
|
|
2
2
|
import { Bindable, FamilyCount, FamilySource, OutputFamilyHandles, OutputHandle } from "../authoring/handles.js";
|
|
3
3
|
import { FlowBuilderInternal } from "../authoring/FlowBuilderCore.js";
|
|
4
4
|
import { CoreCallResult, SignatureBind, StaticCallResult } from "../authoring/signatureArgs.js";
|
|
5
|
-
import { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CorePartitionConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitAtConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, ParaswapBuyConfig, UniswapV2AddLiquidityConfig, UniswapV2RemoveLiquidityConfig, UniswapV3IncreaseLiquidityConfig, UniswapV3MintConfig } from "./config.generated.js";
|
|
5
|
+
import { AaveBorrowConfig, AaveClaimRewardsConfig, AaveGetHealthFactorConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveSetEModeConfig, ContinuationSettleConfig, CoreApproveConfig, CoreAsResourceConfig, CoreBalanceOfConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreCallConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CorePartitionConfig, CorePeekConfig, CoreRawCallConfig, CoreSplitAtConfig, CoreSplitConfig, CoreStaticCallConfig, CoreTransferConfig, FlySwapConfig, InvariantEqConfig, InvariantGtConfig, InvariantGteConfig, InvariantLtConfig, InvariantLteConfig, InvariantNeqConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, LifiBridgeConfig, LifiIntentsAttestNonFillConfig, LifiIntentsOrderConfig, LifiIntentsRefundConfig, LifiIntentsRefundOnNonFillConfig, LifiSwapConfig, LifiZapAsyncConfig, LifiZapConfig, MorphoBlueBorrowConfig, MorphoBlueGetPositionConfig, MorphoBlueRepayConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueWithdrawConfig, ParaswapBuyConfig, UniswapV2AddLiquidityConfig, UniswapV2RemoveLiquidityConfig, UniswapV3IncreaseLiquidityConfig, UniswapV3MintConfig } from "./config.generated.js";
|
|
6
6
|
//#region src/generated/operations.generated.d.ts
|
|
7
7
|
/** Split a resource into two outputs by basis-point ratio. Output `a` receives `bps` of the source, rounded up, and `b` takes the remainder. */
|
|
8
8
|
export interface CoreSplitArgs {
|
|
@@ -523,6 +523,14 @@ export interface FlySwapArgs {
|
|
|
523
523
|
readonly config: FlySwapConfig;
|
|
524
524
|
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
525
525
|
}
|
|
526
|
+
/** Fund a deferred settlement and commit to a future outcome */
|
|
527
|
+
export interface ContinuationSettleArgs {
|
|
528
|
+
readonly bind: {
|
|
529
|
+
readonly input: Bindable<"resource">;
|
|
530
|
+
};
|
|
531
|
+
readonly config: ContinuationSettleConfig;
|
|
532
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
533
|
+
}
|
|
526
534
|
/** Deposit two ERC-20 tokens into an existing Uniswap V2 pair (or an ABI-identical fork such as SushiSwap V2) through its Router02 and receive the pair's LP token; unused input returns as residuals. Asserts on chain that the router's factory is `factory`, that the factory's pair for the two tokens is `pair`, and that the pair holds non-zero reserves. Exposes the pool price read before the deposit as `poolPrice`. The deposit is protected only with a `band` guard on `poolPrice` and a `slippage` guard on `liquidity`. Fee-on-transfer tokens are unsupported. */
|
|
527
535
|
export interface UniswapV2AddLiquidityArgs {
|
|
528
536
|
readonly bind: {
|
|
@@ -560,6 +568,32 @@ export interface UniswapV3IncreaseLiquidityArgs {
|
|
|
560
568
|
readonly config: UniswapV3IncreaseLiquidityConfig;
|
|
561
569
|
readonly guards?: readonly TypedGuard<"liquidity" | "sqrtPriceX96" | "residualA" | "residualB">[];
|
|
562
570
|
}
|
|
571
|
+
/** Swap or bridge tokens through a LI.FI Intents order a solver fills */
|
|
572
|
+
export interface LifiIntentsOrderArgs {
|
|
573
|
+
readonly bind: {
|
|
574
|
+
readonly amountIn: Bindable<"resource">;
|
|
575
|
+
};
|
|
576
|
+
readonly config: LifiIntentsOrderConfig;
|
|
577
|
+
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
578
|
+
}
|
|
579
|
+
/** Refund a LI.FI Intents escrow order after its expiry. Anyone may call; the escrow pays the order's user. Only an order the order server reports before delivery (status Open or Signed) is refunded. */
|
|
580
|
+
export interface LifiIntentsRefundArgs {
|
|
581
|
+
readonly bind: Record<string, never>;
|
|
582
|
+
readonly config: LifiIntentsRefundConfig;
|
|
583
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
584
|
+
}
|
|
585
|
+
/** Step 1 of the early refund of a cross-chain LI.FI Intents order: on the order's output chain, after its fill deadline, record that the output was not filled. Keep the transaction hash for lifiIntents.refundOnNonFill. */
|
|
586
|
+
export interface LifiIntentsAttestNonFillArgs {
|
|
587
|
+
readonly bind: Record<string, never>;
|
|
588
|
+
readonly config: LifiIntentsAttestNonFillConfig;
|
|
589
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
590
|
+
}
|
|
591
|
+
/** Step 2 of the early refund of a cross-chain LI.FI Intents order: on the order's input chain, prove the non-fill attestation through Polymer and refund the order's user. A resolution_error means the proof is not ready yet; retry. */
|
|
592
|
+
export interface LifiIntentsRefundOnNonFillArgs {
|
|
593
|
+
readonly bind: Record<string, never>;
|
|
594
|
+
readonly config: LifiIntentsRefundOnNonFillConfig;
|
|
595
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
596
|
+
}
|
|
563
597
|
export interface CoreSplitOutputs {
|
|
564
598
|
readonly a: OutputHandle<"resource">;
|
|
565
599
|
readonly b: OutputHandle<"resource">;
|
|
@@ -680,6 +714,9 @@ export interface FlySwapOutputs {
|
|
|
680
714
|
readonly amountOut: OutputHandle<"resource">;
|
|
681
715
|
readonly unspentIn: OutputHandle<"resource">;
|
|
682
716
|
}
|
|
717
|
+
export interface ContinuationSettleOutputs {
|
|
718
|
+
readonly output: OutputHandle<"resource">;
|
|
719
|
+
}
|
|
683
720
|
export interface UniswapV2AddLiquidityOutputs {
|
|
684
721
|
readonly liquidity: OutputHandle<"resource">;
|
|
685
722
|
readonly residualA: OutputHandle<"resource">;
|
|
@@ -703,6 +740,10 @@ export interface UniswapV3IncreaseLiquidityOutputs {
|
|
|
703
740
|
readonly residualA: OutputHandle<"resource">;
|
|
704
741
|
readonly residualB: OutputHandle<"resource">;
|
|
705
742
|
}
|
|
743
|
+
export interface LifiIntentsOrderOutputs {
|
|
744
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
745
|
+
readonly unspentIn: OutputHandle<"resource">;
|
|
746
|
+
}
|
|
706
747
|
export type GeneratedOps = {
|
|
707
748
|
readonly core: {
|
|
708
749
|
/** 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" */
|
|
@@ -840,6 +881,10 @@ export type GeneratedOps = {
|
|
|
840
881
|
/** Read a Morpho Blue Position struct via a static call on the singleton. Exposes (supplyShares, borrowShares, collateral) as handles whose kinds match the on-chain field types (uint256, uint128, uint128). — original id: "morphoBlue.getPosition" */
|
|
841
882
|
readonly getPosition: (nodeId: string, args: MorphoBlueGetPositionArgs) => MorphoBlueGetPositionOutputs;
|
|
842
883
|
};
|
|
884
|
+
readonly continuation: {
|
|
885
|
+
/** Fund a deferred settlement and commit to a future outcome — original id: "continuation.settle" */
|
|
886
|
+
readonly settle: (nodeId: string, args: ContinuationSettleArgs) => ContinuationSettleOutputs;
|
|
887
|
+
};
|
|
843
888
|
readonly paraswap: {
|
|
844
889
|
/** 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" */
|
|
845
890
|
readonly buy: (nodeId: string, args: ParaswapBuyArgs) => ParaswapBuyOutputs;
|
|
@@ -860,6 +905,16 @@ export type GeneratedOps = {
|
|
|
860
905
|
/** Add two tokens to an existing Uniswap V3 position (or one on an ABI-identical fork). `owner` must own `tokenId`, and the position must hold the two input tokens; both are asserted on chain, since the position manager checks neither. Unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. — original id: "uniswapV3.increaseLiquidity" */
|
|
861
906
|
readonly increaseLiquidity: (nodeId: string, args: UniswapV3IncreaseLiquidityArgs) => UniswapV3IncreaseLiquidityOutputs;
|
|
862
907
|
};
|
|
908
|
+
readonly lifiIntents: {
|
|
909
|
+
/** Swap or bridge tokens through a LI.FI Intents order a solver fills — original id: "lifiIntents.order" */
|
|
910
|
+
readonly order: (nodeId: string, args: LifiIntentsOrderArgs) => LifiIntentsOrderOutputs;
|
|
911
|
+
/** Refund a LI.FI Intents escrow order after its expiry. Anyone may call; the escrow pays the order's user. Only an order the order server reports before delivery (status Open or Signed) is refunded. — original id: "lifiIntents.refund" */
|
|
912
|
+
readonly refund: (nodeId: string, args: LifiIntentsRefundArgs) => void;
|
|
913
|
+
/** Step 1 of the early refund of a cross-chain LI.FI Intents order: on the order's output chain, after its fill deadline, record that the output was not filled. Keep the transaction hash for lifiIntents.refundOnNonFill. — original id: "lifiIntents.attestNonFill" */
|
|
914
|
+
readonly attestNonFill: (nodeId: string, args: LifiIntentsAttestNonFillArgs) => void;
|
|
915
|
+
/** Step 2 of the early refund of a cross-chain LI.FI Intents order: on the order's input chain, prove the non-fill attestation through Polymer and refund the order's user. A resolution_error means the proof is not ready yet; retry. — original id: "lifiIntents.refundOnNonFill" */
|
|
916
|
+
readonly refundOnNonFill: (nodeId: string, args: LifiIntentsRefundOnNonFillArgs) => void;
|
|
917
|
+
};
|
|
863
918
|
};
|
|
864
919
|
export declare const bindGeneratedOps: (builder: FlowBuilderInternal) => GeneratedOps;
|
|
865
920
|
//#endregion
|
|
@@ -196,6 +196,7 @@ const bindGeneratedOps = (builder) => ({
|
|
|
196
196
|
collateral: "uint128"
|
|
197
197
|
})
|
|
198
198
|
},
|
|
199
|
+
continuation: { settle: (nodeId, args) => builder.call(nodeId, "continuation.settle", args, { output: "resource" }) },
|
|
199
200
|
paraswap: { buy: (nodeId, args) => builder.call(nodeId, "paraswap.buy", args, {
|
|
200
201
|
amountOut: "resource",
|
|
201
202
|
unspentIn: "resource"
|
|
@@ -230,6 +231,15 @@ const bindGeneratedOps = (builder) => ({
|
|
|
230
231
|
residualA: "resource",
|
|
231
232
|
residualB: "resource"
|
|
232
233
|
})
|
|
234
|
+
},
|
|
235
|
+
lifiIntents: {
|
|
236
|
+
order: (nodeId, args) => builder.call(nodeId, "lifiIntents.order", args, {
|
|
237
|
+
amountOut: "resource",
|
|
238
|
+
unspentIn: "resource"
|
|
239
|
+
}),
|
|
240
|
+
refund: (nodeId, args) => builder.call(nodeId, "lifiIntents.refund", args, {}),
|
|
241
|
+
attestNonFill: (nodeId, args) => builder.call(nodeId, "lifiIntents.attestNonFill", args, {}),
|
|
242
|
+
refundOnNonFill: (nodeId, args) => builder.call(nodeId, "lifiIntents.refundOnNonFill", args, {})
|
|
233
243
|
}
|
|
234
244
|
});
|
|
235
245
|
//#endregion
|