@lifi/composer-sdk 0.8.1 → 0.9.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.
- package/README.md +3 -2
- package/dist/_virtual/_rolldown/runtime.cjs +33 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/authoring/FlowBuilderCore.cjs +102 -120
- package/dist/authoring/FlowBuilderCore.cjs.map +1 -1
- package/dist/authoring/FlowBuilderCore.d.cts +58 -61
- package/dist/authoring/FlowBuilderCore.d.ts +58 -61
- package/dist/authoring/FlowBuilderCore.js +99 -97
- package/dist/authoring/FlowBuilderCore.js.map +1 -1
- package/dist/authoring/handles.cjs +25 -40
- package/dist/authoring/handles.cjs.map +1 -1
- package/dist/authoring/handles.d.cts +33 -34
- package/dist/authoring/handles.d.ts +33 -34
- package/dist/authoring/handles.js +21 -13
- package/dist/authoring/handles.js.map +1 -1
- package/dist/authoring/raw.cjs +85 -44
- package/dist/authoring/raw.cjs.map +1 -1
- package/dist/authoring/raw.d.cts +8 -8
- package/dist/authoring/raw.d.ts +8 -8
- package/dist/authoring/raw.js +83 -19
- package/dist/authoring/raw.js.map +1 -1
- package/dist/authoring/signatureArgs.cjs +81 -103
- package/dist/authoring/signatureArgs.cjs.map +1 -1
- package/dist/authoring/signatureArgs.d.cts +63 -64
- package/dist/authoring/signatureArgs.d.ts +63 -64
- package/dist/authoring/signatureArgs.js +76 -75
- package/dist/authoring/signatureArgs.js.map +1 -1
- package/dist/client.cjs +172 -220
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +131 -131
- package/dist/client.d.ts +131 -131
- package/dist/client.js +165 -198
- package/dist/client.js.map +1 -1
- package/dist/discovery.cjs +0 -17
- package/dist/discovery.d.cts +57 -56
- package/dist/discovery.d.ts +57 -56
- package/dist/discovery.js +1 -1
- package/dist/errors.cjs +211 -159
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +84 -84
- package/dist/errors.d.ts +84 -84
- package/dist/errors.js +201 -120
- package/dist/errors.js.map +1 -1
- package/dist/generated/config.generated.cjs +0 -17
- package/dist/generated/config.generated.d.cts +804 -936
- package/dist/generated/config.generated.d.ts +804 -936
- package/dist/generated/config.generated.js +1 -1
- package/dist/generated/guards.generated.cjs +25 -35
- package/dist/generated/guards.generated.cjs.map +1 -1
- package/dist/generated/guards.generated.d.cts +20 -4
- package/dist/generated/guards.generated.d.ts +20 -4
- package/dist/generated/guards.generated.js +19 -11
- package/dist/generated/guards.generated.js.map +1 -1
- package/dist/generated/materialisers.generated.cjs +25 -35
- package/dist/generated/materialisers.generated.cjs.map +1 -1
- package/dist/generated/materialisers.generated.d.cts +17 -4
- package/dist/generated/materialisers.generated.d.ts +17 -4
- package/dist/generated/materialisers.generated.js +19 -11
- package/dist/generated/materialisers.generated.js.map +1 -1
- package/dist/generated/operations.generated.cjs +236 -277
- package/dist/generated/operations.generated.cjs.map +1 -1
- package/dist/generated/operations.generated.d.cts +719 -708
- package/dist/generated/operations.generated.d.ts +719 -708
- package/dist/generated/operations.generated.js +235 -256
- package/dist/generated/operations.generated.js.map +1 -1
- package/dist/generated/preconditions.generated.cjs +25 -35
- package/dist/generated/preconditions.generated.cjs.map +1 -1
- package/dist/generated/preconditions.generated.d.cts +17 -4
- package/dist/generated/preconditions.generated.d.ts +17 -4
- package/dist/generated/preconditions.generated.js +19 -11
- package/dist/generated/preconditions.generated.js.map +1 -1
- package/dist/index.cjs +131 -97
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -43
- package/dist/index.d.ts +29 -43
- package/dist/index.js +96 -45
- package/dist/index.js.map +1 -1
- package/dist/outputs.cjs +11 -32
- package/dist/outputs.cjs.map +1 -1
- package/dist/outputs.d.cts +5 -5
- package/dist/outputs.d.ts +5 -5
- package/dist/outputs.js +10 -8
- package/dist/outputs.js.map +1 -1
- package/dist/raw.cjs +21 -33
- package/dist/raw.cjs.map +1 -1
- package/dist/raw.d.cts +8 -4
- package/dist/raw.d.ts +8 -4
- package/dist/raw.js +12 -7
- package/dist/raw.js.map +1 -1
- package/dist/reachability.cjs +82 -112
- package/dist/reachability.cjs.map +1 -1
- package/dist/reachability.d.cts +33 -59
- package/dist/reachability.d.ts +33 -59
- package/dist/reachability.js +81 -88
- package/dist/reachability.js.map +1 -1
- package/dist/resources.cjs +47 -32
- package/dist/resources.cjs.map +1 -1
- package/dist/resources.d.cts +50 -3
- package/dist/resources.d.ts +50 -3
- package/dist/resources.js +42 -9
- package/dist/resources.js.map +1 -1
- package/dist/responseSchemas.cjs +99 -111
- package/dist/responseSchemas.cjs.map +1 -1
- package/dist/responseSchemas.d.cts +34 -34
- package/dist/responseSchemas.d.ts +34 -34
- package/dist/responseSchemas.js +85 -66
- package/dist/responseSchemas.js.map +1 -1
- package/dist/routeAmount.cjs +61 -31
- package/dist/routeAmount.cjs.map +1 -1
- package/dist/routeAmount.d.cts +52 -2
- package/dist/routeAmount.d.ts +52 -2
- package/dist/routeAmount.js +56 -8
- package/dist/routeAmount.js.map +1 -1
- package/dist/run/inputs.cjs +56 -48
- package/dist/run/inputs.cjs.map +1 -1
- package/dist/run/inputs.d.cts +70 -74
- package/dist/run/inputs.d.ts +70 -74
- package/dist/run/inputs.js +54 -23
- package/dist/run/inputs.js.map +1 -1
- package/dist/run/simulate.cjs +38 -43
- package/dist/run/simulate.cjs.map +1 -1
- package/dist/run/simulate.d.cts +36 -36
- package/dist/run/simulate.d.ts +36 -36
- package/dist/run/simulate.js +37 -19
- package/dist/run/simulate.js.map +1 -1
- package/dist/sdk.cjs +55 -66
- package/dist/sdk.cjs.map +1 -1
- package/dist/sdk.d.cts +108 -111
- package/dist/sdk.d.ts +108 -111
- package/dist/sdk.js +52 -44
- package/dist/sdk.js.map +1 -1
- package/dist/types.cjs +0 -17
- package/dist/types.d.cts +22 -22
- package/dist/types.d.ts +22 -22
- package/dist/types.js +1 -1
- package/package.json +4 -4
- package/src/client.ts +2 -2
- package/src/examples/aaveClaimRewards.ts +2 -1
- package/src/examples/emitCustomEvent.ts +1 -2
- package/src/examples/run.ts +1 -1
- package/src/examples/transferTokens.ts +21 -17
- package/src/generated/config.generated.ts +20 -9
- package/src/generated/operations.generated.ts +28 -5
- package/dist/discovery.cjs.map +0 -1
- package/dist/discovery.js.map +0 -1
- package/dist/generated/config.generated.cjs.map +0 -1
- package/dist/generated/config.generated.js.map +0 -1
- package/dist/guards.generated-CDCgYGZo.d.cts +0 -24
- package/dist/guards.generated-CdYcs4h0.d.ts +0 -24
- package/dist/materialisers.generated-BMkBQgWZ.d.ts +0 -24
- package/dist/materialisers.generated-BWq5oePO.d.cts +0 -24
- package/dist/preconditions.generated-DblS13Wq.d.cts +0 -24
- package/dist/preconditions.generated-U7YpVh30.d.ts +0 -24
- package/dist/raw-BvRghN3r.d.ts +0 -20
- package/dist/raw-s1rer8X3.d.cts +0 -20
- package/dist/resources-BKlFxjo8.d.cts +0 -56
- package/dist/resources-CYis1_DS.d.ts +0 -56
- package/dist/routeAmount-DdbJYJyM.d.cts +0 -55
- package/dist/routeAmount-DdbJYJyM.d.ts +0 -55
- package/dist/types.cjs.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -1,855 +1,866 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Bindable,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import 'abitype';
|
|
8
|
-
|
|
1
|
+
import { TypedGuard } from "../types.js";
|
|
2
|
+
import { Bindable, FamilyCount, FamilySource, OutputFamilyHandles, OutputHandle } from "../authoring/handles.js";
|
|
3
|
+
import { FlowBuilderInternal } from "../authoring/FlowBuilderCore.js";
|
|
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";
|
|
6
|
+
//#region src/generated/operations.generated.d.ts
|
|
9
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. */
|
|
10
|
-
interface CoreSplitArgs {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
export interface CoreSplitArgs {
|
|
9
|
+
readonly bind: {
|
|
10
|
+
readonly source: Bindable<"resource">;
|
|
11
|
+
};
|
|
12
|
+
readonly config: CoreSplitConfig;
|
|
13
|
+
readonly guards?: readonly TypedGuard<"a" | "b">[];
|
|
14
|
+
}
|
|
15
|
+
/** Split a resource at a fixed amount. Output `head` receives `min(source, amount)`; `tail` receives the rest, and is 0 (omitted when unspent) when the source is at or below `amount`. */
|
|
16
|
+
export interface CoreSplitAtArgs {
|
|
17
|
+
readonly bind: {
|
|
18
|
+
readonly source: Bindable<"resource">;
|
|
19
|
+
};
|
|
20
|
+
readonly config: CoreSplitAtConfig;
|
|
21
|
+
readonly guards?: readonly TypedGuard<"head" | "tail">[];
|
|
16
22
|
}
|
|
17
23
|
/** 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. */
|
|
18
|
-
interface CorePartitionArgs<TBps extends FamilySource<CorePartitionConfig[
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
export interface CorePartitionArgs<TBps extends FamilySource<CorePartitionConfig["bps"]> = FamilySource<CorePartitionConfig["bps"]>> {
|
|
25
|
+
readonly bind: {
|
|
26
|
+
readonly source: Bindable<"resource">;
|
|
27
|
+
};
|
|
28
|
+
readonly config: Omit<CorePartitionConfig, "bps"> & {
|
|
29
|
+
readonly bps: TBps & FamilyCount<NoInfer<TBps>, Readonly<CorePartitionConfig["bps"]>>;
|
|
30
|
+
};
|
|
31
|
+
readonly guards?: readonly TypedGuard<`parts.${number}`>[];
|
|
26
32
|
}
|
|
27
33
|
/** Merge two same-token resources into one by addition */
|
|
28
|
-
interface CoreMergeArgs {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
export interface CoreMergeArgs {
|
|
35
|
+
readonly bind: {
|
|
36
|
+
readonly a: Bindable<"resource">;
|
|
37
|
+
readonly b: Bindable<"resource">;
|
|
38
|
+
};
|
|
39
|
+
readonly guards?: readonly TypedGuard<"merged">[];
|
|
34
40
|
}
|
|
35
41
|
/** Swap tokens via the LI.FI aggregator API */
|
|
36
|
-
interface LifiSwapArgs {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
export interface LifiSwapArgs {
|
|
43
|
+
readonly bind: {
|
|
44
|
+
readonly amountIn: Bindable<"resource">;
|
|
45
|
+
};
|
|
46
|
+
readonly config: LifiSwapConfig;
|
|
47
|
+
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
42
48
|
}
|
|
43
49
|
/** Bridge tokens to another chain via the LI.FI aggregator API */
|
|
44
|
-
interface LifiBridgeArgs {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
export interface LifiBridgeArgs {
|
|
51
|
+
readonly bind: {
|
|
52
|
+
readonly amountIn: Bindable<"resource">;
|
|
53
|
+
};
|
|
54
|
+
readonly config: LifiBridgeConfig;
|
|
55
|
+
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
50
56
|
}
|
|
51
57
|
/** Assert that an account holds at least a minimum token balance */
|
|
52
|
-
interface InvariantBalanceAtLeastArgs {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
export interface InvariantBalanceAtLeastArgs {
|
|
59
|
+
readonly bind: {
|
|
60
|
+
readonly minimumAmount: Bindable<"resource">;
|
|
61
|
+
readonly account: Bindable<"address">;
|
|
62
|
+
};
|
|
63
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
58
64
|
}
|
|
59
65
|
/** Assert that an account holds exactly an expected token balance */
|
|
60
|
-
interface InvariantBalanceEqualsArgs {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
export interface InvariantBalanceEqualsArgs {
|
|
67
|
+
readonly bind: {
|
|
68
|
+
readonly expectedAmount: Bindable<"resource">;
|
|
69
|
+
readonly account: Bindable<"address">;
|
|
70
|
+
};
|
|
71
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
66
72
|
}
|
|
67
73
|
/** Assert that an account holds at most a maximum token balance */
|
|
68
|
-
interface InvariantBalanceAtMostArgs {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
export interface InvariantBalanceAtMostArgs {
|
|
75
|
+
readonly bind: {
|
|
76
|
+
readonly maximumAmount: Bindable<"resource">;
|
|
77
|
+
readonly account: Bindable<"address">;
|
|
78
|
+
};
|
|
79
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
74
80
|
}
|
|
75
81
|
/** Assert that an account's token balance is between a minimum and a maximum (inclusive) */
|
|
76
|
-
interface InvariantBalanceInRangeArgs {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
export interface InvariantBalanceInRangeArgs {
|
|
83
|
+
readonly bind: {
|
|
84
|
+
readonly minimumAmount: Bindable<"resource">;
|
|
85
|
+
readonly maximumAmount: Bindable<"uint256">;
|
|
86
|
+
readonly account: Bindable<"address">;
|
|
87
|
+
};
|
|
88
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
83
89
|
}
|
|
84
90
|
/** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner */
|
|
85
|
-
interface InvariantAllowanceAtLeastArgs {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
export interface InvariantAllowanceAtLeastArgs {
|
|
92
|
+
readonly bind: {
|
|
93
|
+
readonly minimumAmount: Bindable<"resource">;
|
|
94
|
+
readonly owner: Bindable<"address">;
|
|
95
|
+
readonly spender: Bindable<"address">;
|
|
96
|
+
};
|
|
97
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
92
98
|
}
|
|
93
99
|
/** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount */
|
|
94
|
-
interface InvariantAllowanceEqualsArgs {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
export interface InvariantAllowanceEqualsArgs {
|
|
101
|
+
readonly bind: {
|
|
102
|
+
readonly expectedAmount: Bindable<"resource">;
|
|
103
|
+
readonly owner: Bindable<"address">;
|
|
104
|
+
readonly spender: Bindable<"address">;
|
|
105
|
+
};
|
|
106
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
101
107
|
}
|
|
102
108
|
/** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner */
|
|
103
|
-
interface InvariantAllowanceAtMostArgs {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
export interface InvariantAllowanceAtMostArgs {
|
|
110
|
+
readonly bind: {
|
|
111
|
+
readonly maximumAmount: Bindable<"resource">;
|
|
112
|
+
readonly owner: Bindable<"address">;
|
|
113
|
+
readonly spender: Bindable<"address">;
|
|
114
|
+
};
|
|
115
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
110
116
|
}
|
|
111
117
|
/** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) */
|
|
112
|
-
interface InvariantAllowanceInRangeArgs {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
export interface InvariantAllowanceInRangeArgs {
|
|
119
|
+
readonly bind: {
|
|
120
|
+
readonly minimumAmount: Bindable<"resource">;
|
|
121
|
+
readonly maximumAmount: Bindable<"uint256">;
|
|
122
|
+
readonly owner: Bindable<"address">;
|
|
123
|
+
readonly spender: Bindable<"address">;
|
|
124
|
+
};
|
|
125
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
120
126
|
}
|
|
121
127
|
/** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation */
|
|
122
|
-
interface InvariantNumericArgs {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
export interface InvariantNumericArgs {
|
|
129
|
+
readonly bind: {
|
|
130
|
+
readonly value: Bindable<"uint256">;
|
|
131
|
+
};
|
|
132
|
+
readonly config: InvariantNumericConfig;
|
|
133
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
128
134
|
}
|
|
129
135
|
/** Assert min <= value <= max against constant bounds; reverts if outside the range */
|
|
130
|
-
interface InvariantNumericInRangeArgs {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
export interface InvariantNumericInRangeArgs {
|
|
137
|
+
readonly bind: {
|
|
138
|
+
readonly value: Bindable<"uint256">;
|
|
139
|
+
};
|
|
140
|
+
readonly config: InvariantNumericInRangeConfig;
|
|
141
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
136
142
|
}
|
|
137
143
|
/** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation */
|
|
138
|
-
interface InvariantGteArgs {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
export interface InvariantGteArgs {
|
|
145
|
+
readonly bind: {
|
|
146
|
+
readonly value: Bindable<"uint256">;
|
|
147
|
+
};
|
|
148
|
+
readonly config: InvariantGteConfig;
|
|
149
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
144
150
|
}
|
|
145
151
|
/** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation */
|
|
146
|
-
interface InvariantGtArgs {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
+
export interface InvariantGtArgs {
|
|
153
|
+
readonly bind: {
|
|
154
|
+
readonly value: Bindable<"uint256">;
|
|
155
|
+
};
|
|
156
|
+
readonly config: InvariantGtConfig;
|
|
157
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
152
158
|
}
|
|
153
159
|
/** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation */
|
|
154
|
-
interface InvariantLteArgs {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
export interface InvariantLteArgs {
|
|
161
|
+
readonly bind: {
|
|
162
|
+
readonly value: Bindable<"uint256">;
|
|
163
|
+
};
|
|
164
|
+
readonly config: InvariantLteConfig;
|
|
165
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
160
166
|
}
|
|
161
167
|
/** Assert a uint256 value is strictly less than a constant threshold; reverts on violation */
|
|
162
|
-
interface InvariantLtArgs {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
export interface InvariantLtArgs {
|
|
169
|
+
readonly bind: {
|
|
170
|
+
readonly value: Bindable<"uint256">;
|
|
171
|
+
};
|
|
172
|
+
readonly config: InvariantLtConfig;
|
|
173
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
168
174
|
}
|
|
169
175
|
/** Assert a uint256 value equals a constant threshold; reverts on violation */
|
|
170
|
-
interface InvariantEqArgs {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
export interface InvariantEqArgs {
|
|
177
|
+
readonly bind: {
|
|
178
|
+
readonly value: Bindable<"uint256">;
|
|
179
|
+
};
|
|
180
|
+
readonly config: InvariantEqConfig;
|
|
181
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
176
182
|
}
|
|
177
183
|
/** Assert a uint256 value does not equal a constant threshold; reverts on violation */
|
|
178
|
-
interface InvariantNeqArgs {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
export interface InvariantNeqArgs {
|
|
185
|
+
readonly bind: {
|
|
186
|
+
readonly value: Bindable<"uint256">;
|
|
187
|
+
};
|
|
188
|
+
readonly config: InvariantNeqConfig;
|
|
189
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
184
190
|
}
|
|
185
191
|
/** Add two unsigned integers (a + b) */
|
|
186
|
-
interface CoreAddArgs {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
+
export interface CoreAddArgs {
|
|
193
|
+
readonly bind: {
|
|
194
|
+
readonly a: Bindable<"uint256">;
|
|
195
|
+
readonly b: Bindable<"uint256">;
|
|
196
|
+
};
|
|
197
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
192
198
|
}
|
|
193
199
|
/** Subtract b from a (a - b); reverts on underflow */
|
|
194
|
-
interface CoreSubtractArgs {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
export interface CoreSubtractArgs {
|
|
201
|
+
readonly bind: {
|
|
202
|
+
readonly a: Bindable<"uint256">;
|
|
203
|
+
readonly b: Bindable<"uint256">;
|
|
204
|
+
};
|
|
205
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
200
206
|
}
|
|
201
207
|
/** Multiply two unsigned integers (a * b) */
|
|
202
|
-
interface CoreMultiplyArgs {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
+
export interface CoreMultiplyArgs {
|
|
209
|
+
readonly bind: {
|
|
210
|
+
readonly a: Bindable<"uint256">;
|
|
211
|
+
readonly b: Bindable<"uint256">;
|
|
212
|
+
};
|
|
213
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
208
214
|
}
|
|
209
215
|
/** Divide a by b, rounding toward zero */
|
|
210
|
-
interface CoreDivideDownArgs {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
+
export interface CoreDivideDownArgs {
|
|
217
|
+
readonly bind: {
|
|
218
|
+
readonly a: Bindable<"uint256">;
|
|
219
|
+
readonly b: Bindable<"uint256">;
|
|
220
|
+
};
|
|
221
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
216
222
|
}
|
|
217
223
|
/** Divide a by b, rounding away from zero */
|
|
218
|
-
interface CoreDivideUpArgs {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
export interface CoreDivideUpArgs {
|
|
225
|
+
readonly bind: {
|
|
226
|
+
readonly a: Bindable<"uint256">;
|
|
227
|
+
readonly b: Bindable<"uint256">;
|
|
228
|
+
};
|
|
229
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
224
230
|
}
|
|
225
231
|
/** Multiply value by basis points and divide by 10000, rounding down */
|
|
226
|
-
interface CoreBpsDownArgs {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
+
export interface CoreBpsDownArgs {
|
|
233
|
+
readonly bind: {
|
|
234
|
+
readonly value: Bindable<"uint256">;
|
|
235
|
+
};
|
|
236
|
+
readonly config: CoreBpsDownConfig;
|
|
237
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
232
238
|
}
|
|
233
239
|
/** Multiply value by basis points and divide by 10000, rounding up */
|
|
234
|
-
interface CoreBpsUpArgs {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
+
export interface CoreBpsUpArgs {
|
|
241
|
+
readonly bind: {
|
|
242
|
+
readonly value: Bindable<"uint256">;
|
|
243
|
+
};
|
|
244
|
+
readonly config: CoreBpsUpConfig;
|
|
245
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
240
246
|
}
|
|
241
247
|
/** Assert a == b; reverts if not equal */
|
|
242
|
-
interface CoreAssertEqualArgs {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
+
export interface CoreAssertEqualArgs {
|
|
249
|
+
readonly bind: {
|
|
250
|
+
readonly a: Bindable<"uint256">;
|
|
251
|
+
readonly b: Bindable<"uint256">;
|
|
252
|
+
};
|
|
253
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
248
254
|
}
|
|
249
255
|
/** Assert a != b; reverts if equal */
|
|
250
|
-
interface CoreAssertNotEqualArgs {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
+
export interface CoreAssertNotEqualArgs {
|
|
257
|
+
readonly bind: {
|
|
258
|
+
readonly a: Bindable<"uint256">;
|
|
259
|
+
readonly b: Bindable<"uint256">;
|
|
260
|
+
};
|
|
261
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
256
262
|
}
|
|
257
263
|
/** Assert a > b; reverts if a <= b */
|
|
258
|
-
interface CoreAssertGtArgs {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
+
export interface CoreAssertGtArgs {
|
|
265
|
+
readonly bind: {
|
|
266
|
+
readonly a: Bindable<"uint256">;
|
|
267
|
+
readonly b: Bindable<"uint256">;
|
|
268
|
+
};
|
|
269
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
264
270
|
}
|
|
265
271
|
/** Assert a >= b; reverts if a < b */
|
|
266
|
-
interface CoreAssertGteArgs {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
+
export interface CoreAssertGteArgs {
|
|
273
|
+
readonly bind: {
|
|
274
|
+
readonly a: Bindable<"uint256">;
|
|
275
|
+
readonly b: Bindable<"uint256">;
|
|
276
|
+
};
|
|
277
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
272
278
|
}
|
|
273
279
|
/** Assert a < b; reverts if a >= b */
|
|
274
|
-
interface CoreAssertLtArgs {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
+
export interface CoreAssertLtArgs {
|
|
281
|
+
readonly bind: {
|
|
282
|
+
readonly a: Bindable<"uint256">;
|
|
283
|
+
readonly b: Bindable<"uint256">;
|
|
284
|
+
};
|
|
285
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
280
286
|
}
|
|
281
287
|
/** Assert a <= b; reverts if a > b */
|
|
282
|
-
interface CoreAssertLteArgs {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
+
export interface CoreAssertLteArgs {
|
|
289
|
+
readonly bind: {
|
|
290
|
+
readonly a: Bindable<"uint256">;
|
|
291
|
+
readonly b: Bindable<"uint256">;
|
|
292
|
+
};
|
|
293
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
288
294
|
}
|
|
289
295
|
/** Assert min <= value <= max; reverts if value is outside the range */
|
|
290
|
-
interface CoreAssertInRangeArgs {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
296
|
+
export interface CoreAssertInRangeArgs {
|
|
297
|
+
readonly bind: {
|
|
298
|
+
readonly value: Bindable<"uint256">;
|
|
299
|
+
readonly min: Bindable<"uint256">;
|
|
300
|
+
readonly max: Bindable<"uint256">;
|
|
301
|
+
};
|
|
302
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
297
303
|
}
|
|
298
304
|
/** Approve an ERC20 spender for the given token and amount */
|
|
299
|
-
interface CoreApproveArgs {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
+
export interface CoreApproveArgs {
|
|
306
|
+
readonly bind: {
|
|
307
|
+
readonly amount: Bindable<"resource">;
|
|
308
|
+
};
|
|
309
|
+
readonly config: CoreApproveConfig;
|
|
310
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
305
311
|
}
|
|
306
312
|
/** Read an ERC20 balance, producing a resource */
|
|
307
|
-
interface CoreBalanceOfArgs {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
/** Transfer
|
|
313
|
-
interface CoreTransferArgs {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
313
|
+
export interface CoreBalanceOfArgs {
|
|
314
|
+
readonly bind: Record<string, never>;
|
|
315
|
+
readonly config: CoreBalanceOfConfig;
|
|
316
|
+
readonly guards?: readonly TypedGuard<"balance">[];
|
|
317
|
+
}
|
|
318
|
+
/** Transfer the whole input resource to a recipient address. To send part of a resource, split it first with `core.split` or `core.splitAt`. */
|
|
319
|
+
export interface CoreTransferArgs {
|
|
320
|
+
readonly bind: {
|
|
321
|
+
readonly amount: Bindable<"resource">;
|
|
322
|
+
readonly recipient: Bindable<"address">;
|
|
323
|
+
};
|
|
324
|
+
readonly config: CoreTransferConfig;
|
|
325
|
+
readonly guards?: readonly TypedGuard<"transferred">[];
|
|
320
326
|
}
|
|
321
327
|
/** 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). */
|
|
322
|
-
interface CoreEmitEvent1Args {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
+
export interface CoreEmitEvent1Args {
|
|
329
|
+
readonly bind: {
|
|
330
|
+
readonly value0: Bindable<"bytes32">;
|
|
331
|
+
};
|
|
332
|
+
readonly config: CoreEmitEvent1Config;
|
|
333
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
328
334
|
}
|
|
329
335
|
/** 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). */
|
|
330
|
-
interface CoreEmitEvent2Args {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
336
|
+
export interface CoreEmitEvent2Args {
|
|
337
|
+
readonly bind: {
|
|
338
|
+
readonly value0: Bindable<"bytes32">;
|
|
339
|
+
readonly value1: Bindable<"bytes32">;
|
|
340
|
+
};
|
|
341
|
+
readonly config: CoreEmitEvent2Config;
|
|
342
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
337
343
|
}
|
|
338
344
|
/** 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). */
|
|
339
|
-
interface CoreEmitEvent3Args {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
export interface CoreEmitEvent3Args {
|
|
346
|
+
readonly bind: {
|
|
347
|
+
readonly value0: Bindable<"bytes32">;
|
|
348
|
+
readonly value1: Bindable<"bytes32">;
|
|
349
|
+
readonly value2: Bindable<"bytes32">;
|
|
350
|
+
};
|
|
351
|
+
readonly config: CoreEmitEvent3Config;
|
|
352
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
347
353
|
}
|
|
348
354
|
/** 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). */
|
|
349
|
-
interface CoreEmitEvent4Args {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
355
|
+
export interface CoreEmitEvent4Args {
|
|
356
|
+
readonly bind: {
|
|
357
|
+
readonly value0: Bindable<"bytes32">;
|
|
358
|
+
readonly value1: Bindable<"bytes32">;
|
|
359
|
+
readonly value2: Bindable<"bytes32">;
|
|
360
|
+
readonly value3: Bindable<"bytes32">;
|
|
361
|
+
};
|
|
362
|
+
readonly config: CoreEmitEvent4Config;
|
|
363
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
358
364
|
}
|
|
359
365
|
/** Invoke a smart contract function, optionally spending a token resource */
|
|
360
|
-
interface CoreCallArgs<TSig extends string = string> {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
366
|
+
export interface CoreCallArgs<TSig extends string = string> {
|
|
367
|
+
readonly resource?: Bindable<"resource">;
|
|
368
|
+
readonly bind: SignatureBind<TSig>;
|
|
369
|
+
readonly config: Omit<CoreCallConfig, "args" | "functionSignature"> & {
|
|
370
|
+
readonly functionSignature: TSig;
|
|
371
|
+
};
|
|
372
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
367
373
|
}
|
|
368
374
|
/** Read from a smart contract at runtime (StaticCall); result is fresh at execution time */
|
|
369
|
-
interface CoreStaticCallArgs<TSig extends string = string> {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
+
export interface CoreStaticCallArgs<TSig extends string = string> {
|
|
376
|
+
readonly bind: SignatureBind<TSig>;
|
|
377
|
+
readonly config: Omit<CoreStaticCallConfig, "args" | "functionSignature"> & {
|
|
378
|
+
readonly functionSignature: TSig;
|
|
379
|
+
};
|
|
380
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
375
381
|
}
|
|
376
382
|
/** Invoke a contract with pre-encoded calldata */
|
|
377
|
-
interface CoreRawCallArgs {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
383
|
+
export interface CoreRawCallArgs {
|
|
384
|
+
readonly bind: Record<string, never>;
|
|
385
|
+
readonly config: CoreRawCallConfig;
|
|
386
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
381
387
|
}
|
|
382
388
|
/** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking */
|
|
383
|
-
interface CoreAsResourceArgs {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
+
export interface CoreAsResourceArgs {
|
|
390
|
+
readonly bind: {
|
|
391
|
+
readonly handle: Bindable<"uint256">;
|
|
392
|
+
};
|
|
393
|
+
readonly config: CoreAsResourceConfig;
|
|
394
|
+
readonly guards?: readonly TypedGuard<"resource">[];
|
|
389
395
|
}
|
|
390
396
|
/** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource */
|
|
391
|
-
interface AaveBorrowArgs {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
397
|
+
export interface AaveBorrowArgs {
|
|
398
|
+
readonly bind: Record<string, never>;
|
|
399
|
+
readonly config: AaveBorrowConfig;
|
|
400
|
+
readonly guards?: readonly TypedGuard<"debtBalance">[];
|
|
395
401
|
}
|
|
396
402
|
/** 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. */
|
|
397
|
-
interface AaveRepayArgs {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
403
|
+
export interface AaveRepayArgs {
|
|
404
|
+
readonly bind: {
|
|
405
|
+
readonly assetIn: Bindable<"resource">;
|
|
406
|
+
readonly onBehalfOf: Bindable<"address">;
|
|
407
|
+
};
|
|
408
|
+
readonly config: AaveRepayConfig;
|
|
409
|
+
readonly guards?: readonly TypedGuard<"actualRepaid" | "residual">[];
|
|
404
410
|
}
|
|
405
411
|
/** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual */
|
|
406
|
-
interface AaveRepayWithATokensArgs {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
+
export interface AaveRepayWithATokensArgs {
|
|
413
|
+
readonly bind: {
|
|
414
|
+
readonly aTokenIn: Bindable<"resource">;
|
|
415
|
+
};
|
|
416
|
+
readonly config: AaveRepayWithATokensConfig;
|
|
417
|
+
readonly guards?: readonly TypedGuard<"actualRepaid" | "residual">[];
|
|
412
418
|
}
|
|
413
419
|
/** Claim a specific Aave v3 incentives reward token against a set of receipt-token positions, exposing the claimed amount as a Resource */
|
|
414
|
-
interface AaveClaimRewardsArgs {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
420
|
+
export interface AaveClaimRewardsArgs {
|
|
421
|
+
readonly bind: Record<string, never>;
|
|
422
|
+
readonly config: AaveClaimRewardsConfig;
|
|
423
|
+
readonly guards?: readonly TypedGuard<"claimedAmount">[];
|
|
418
424
|
}
|
|
419
425
|
/** 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. */
|
|
420
|
-
interface AaveSetEModeArgs {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
426
|
+
export interface AaveSetEModeArgs {
|
|
427
|
+
readonly bind: Record<string, never>;
|
|
428
|
+
readonly config: AaveSetEModeConfig;
|
|
429
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
424
430
|
}
|
|
425
431
|
/** Read the current Aave v3 health factor (WAD-scaled, 1e18; type(uint256).max for users with no debt) by static-calling IPool.getUserAccountData and decomposing the returned tuple. Exposes the healthFactor element as a uint256 handle suitable for use with core.numericInvariant. */
|
|
426
|
-
interface AaveGetHealthFactorArgs {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
432
|
+
export interface AaveGetHealthFactorArgs {
|
|
433
|
+
readonly bind: Record<string, never>;
|
|
434
|
+
readonly config: AaveGetHealthFactorConfig;
|
|
435
|
+
readonly guards?: readonly TypedGuard<"healthFactor">[];
|
|
430
436
|
}
|
|
431
437
|
/** 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). */
|
|
432
|
-
interface MorphoBlueSupplyCollateralArgs {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
+
export interface MorphoBlueSupplyCollateralArgs {
|
|
439
|
+
readonly bind: {
|
|
440
|
+
readonly assetIn: Bindable<"resource">;
|
|
441
|
+
};
|
|
442
|
+
readonly config: MorphoBlueSupplyCollateralConfig;
|
|
443
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
438
444
|
}
|
|
439
445
|
/** Withdraw collateral from a Morpho Blue market position to the receiver address. Exposes the withdrawn ERC20 amount as a Resource output. */
|
|
440
|
-
interface MorphoBlueWithdrawCollateralArgs {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
446
|
+
export interface MorphoBlueWithdrawCollateralArgs {
|
|
447
|
+
readonly bind: Record<string, never>;
|
|
448
|
+
readonly config: MorphoBlueWithdrawCollateralConfig;
|
|
449
|
+
readonly guards?: readonly TypedGuard<"collateralWithdrawn">[];
|
|
444
450
|
}
|
|
445
451
|
/** Borrow the loan asset from a Morpho Blue market against existing collateral. Exposes the borrowed amount as a Resource and the (assetsBorrowed, sharesBorrowed) tuple as handles. */
|
|
446
|
-
interface MorphoBlueBorrowArgs {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
452
|
+
export interface MorphoBlueBorrowArgs {
|
|
453
|
+
readonly bind: Record<string, never>;
|
|
454
|
+
readonly config: MorphoBlueBorrowConfig;
|
|
455
|
+
readonly guards?: readonly TypedGuard<"assetsBorrowed" | "sharesBorrowed">[];
|
|
450
456
|
}
|
|
451
457
|
/** Repay a Morpho Blue debt position with the supplied asset. mode: 'exact' repays the input handle amount; mode: 'max' reads Position.borrowShares via a precursor static call and repays in shares mode to retire the debt to the wei. Returns any unspent residual as a Resource. */
|
|
452
|
-
interface MorphoBlueRepayArgs {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
458
|
+
export interface MorphoBlueRepayArgs {
|
|
459
|
+
readonly bind: {
|
|
460
|
+
readonly assetIn: Bindable<"resource">;
|
|
461
|
+
readonly onBehalfOf: Bindable<"address">;
|
|
462
|
+
};
|
|
463
|
+
readonly config: MorphoBlueRepayConfig;
|
|
464
|
+
readonly guards?: readonly TypedGuard<"actualRepaid" | "sharesRepaid" | "residual">[];
|
|
459
465
|
}
|
|
460
466
|
/** Supply the loan asset of a Morpho Blue market and receive supplyShares accounting credit. Returns the (assetsSupplied, sharesSupplied) tuple as handles and any unspent residual as a Resource. */
|
|
461
|
-
interface MorphoBlueSupplyArgs {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
+
export interface MorphoBlueSupplyArgs {
|
|
468
|
+
readonly bind: {
|
|
469
|
+
readonly assetIn: Bindable<"resource">;
|
|
470
|
+
};
|
|
471
|
+
readonly config: MorphoBlueSupplyConfig;
|
|
472
|
+
readonly guards?: readonly TypedGuard<"assetsSupplied" | "sharesSupplied" | "residual">[];
|
|
467
473
|
}
|
|
468
474
|
/** Withdraw the loan asset from a Morpho Blue supply position. mode: 'exact' withdraws the configured amount; mode: 'max' reads Position.supplyShares via a precursor static call and burns all shares to retire the supply to the wei. Exposes the withdrawn amount as a Resource. */
|
|
469
|
-
interface MorphoBlueWithdrawArgs {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
475
|
+
export interface MorphoBlueWithdrawArgs {
|
|
476
|
+
readonly bind: Record<string, never>;
|
|
477
|
+
readonly config: MorphoBlueWithdrawConfig;
|
|
478
|
+
readonly guards?: readonly TypedGuard<"assetsWithdrawn" | "sharesWithdrawn">[];
|
|
473
479
|
}
|
|
474
480
|
/** 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). */
|
|
475
|
-
interface MorphoBlueGetPositionArgs {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
481
|
+
export interface MorphoBlueGetPositionArgs {
|
|
482
|
+
readonly bind: Record<string, never>;
|
|
483
|
+
readonly config: MorphoBlueGetPositionConfig;
|
|
484
|
+
readonly guards?: readonly TypedGuard<"supplyShares" | "borrowShares" | "collateral">[];
|
|
479
485
|
}
|
|
480
486
|
/** Route tokens into a DeFi protocol position via the edge catalog */
|
|
481
|
-
interface LifiZapArgs {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
487
|
+
export interface LifiZapArgs {
|
|
488
|
+
readonly bind: {
|
|
489
|
+
readonly amountIn: Bindable<"resource">;
|
|
490
|
+
readonly recipient?: Bindable<"address">;
|
|
491
|
+
};
|
|
492
|
+
readonly config: LifiZapConfig;
|
|
493
|
+
readonly guards?: readonly TypedGuard<"amountOut">[];
|
|
488
494
|
}
|
|
489
495
|
/** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles */
|
|
490
|
-
interface LifiZapAsyncArgs {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
496
|
+
export interface LifiZapAsyncArgs {
|
|
497
|
+
readonly bind: {
|
|
498
|
+
readonly amountIn: Bindable<"resource">;
|
|
499
|
+
readonly recipient: Bindable<"address">;
|
|
500
|
+
};
|
|
501
|
+
readonly config: LifiZapAsyncConfig;
|
|
502
|
+
readonly guards?: readonly TypedGuard<never>[];
|
|
497
503
|
}
|
|
498
504
|
/** 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`. */
|
|
499
|
-
interface ParaswapBuyArgs {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
export interface ParaswapBuyArgs {
|
|
506
|
+
readonly bind: {
|
|
507
|
+
readonly amountIn: Bindable<"resource">;
|
|
508
|
+
};
|
|
509
|
+
readonly config: ParaswapBuyConfig;
|
|
510
|
+
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
505
511
|
}
|
|
506
512
|
/** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal */
|
|
507
|
-
interface CorePeekArgs {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
513
|
+
export interface CorePeekArgs {
|
|
514
|
+
readonly bind: Record<string, never>;
|
|
515
|
+
readonly config: CorePeekConfig;
|
|
516
|
+
readonly guards?: readonly TypedGuard<"result">[];
|
|
511
517
|
}
|
|
512
518
|
/** 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. */
|
|
513
|
-
interface FlySwapArgs {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
+
export interface FlySwapArgs {
|
|
520
|
+
readonly bind: {
|
|
521
|
+
readonly amountIn: Bindable<"resource">;
|
|
522
|
+
};
|
|
523
|
+
readonly config: FlySwapConfig;
|
|
524
|
+
readonly guards?: readonly TypedGuard<"unspentIn">[];
|
|
519
525
|
}
|
|
520
526
|
/** 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. */
|
|
521
|
-
interface UniswapV2AddLiquidityArgs {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
527
|
+
export interface UniswapV2AddLiquidityArgs {
|
|
528
|
+
readonly bind: {
|
|
529
|
+
readonly tokenA: Bindable<"resource">;
|
|
530
|
+
readonly tokenB: Bindable<"resource">;
|
|
531
|
+
};
|
|
532
|
+
readonly config: UniswapV2AddLiquidityConfig;
|
|
533
|
+
readonly guards?: readonly TypedGuard<"liquidity" | "residualA" | "residualB" | "poolPrice">[];
|
|
528
534
|
}
|
|
529
535
|
/** Burn a Uniswap V2 LP token (or one of an ABI-identical fork such as SushiSwap V2) through its Router02 and receive both underlying tokens. Asserts on chain that the router's factory is `factory` and that the factory's pair for `tokenA`/`tokenB` is the input LP token. The withdrawal is protected only with a `slippage` guard on each of `tokenA` and `tokenB`. Fee-on-transfer tokens are unsupported: the outputs are the amounts the router reports, which would overstate what such a token delivers. */
|
|
530
|
-
interface UniswapV2RemoveLiquidityArgs {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
+
export interface UniswapV2RemoveLiquidityArgs {
|
|
537
|
+
readonly bind: {
|
|
538
|
+
readonly liquidity: Bindable<"resource">;
|
|
539
|
+
};
|
|
540
|
+
readonly config: UniswapV2RemoveLiquidityConfig;
|
|
541
|
+
readonly guards?: readonly TypedGuard<"tokenA" | "tokenB">[];
|
|
536
542
|
}
|
|
537
543
|
/** Open a Uniswap V3 concentrated-liquidity position (or one on an ABI-identical fork) for a tick range, minting the position NFT straight to `recipient`, which must not be the execution address. Exposes the new `tokenId`; unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. */
|
|
538
|
-
interface UniswapV3MintArgs {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
544
|
+
export interface UniswapV3MintArgs {
|
|
545
|
+
readonly bind: {
|
|
546
|
+
readonly tokenA: Bindable<"resource">;
|
|
547
|
+
readonly tokenB: Bindable<"resource">;
|
|
548
|
+
readonly recipient: Bindable<"address">;
|
|
549
|
+
};
|
|
550
|
+
readonly config: UniswapV3MintConfig;
|
|
551
|
+
readonly guards?: readonly TypedGuard<"tokenId" | "liquidity" | "sqrtPriceX96" | "residualA" | "residualB">[];
|
|
546
552
|
}
|
|
547
553
|
/** 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. */
|
|
548
|
-
interface UniswapV3IncreaseLiquidityArgs {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
export interface UniswapV3IncreaseLiquidityArgs {
|
|
555
|
+
readonly bind: {
|
|
556
|
+
readonly tokenA: Bindable<"resource">;
|
|
557
|
+
readonly tokenB: Bindable<"resource">;
|
|
558
|
+
readonly owner: Bindable<"address">;
|
|
559
|
+
};
|
|
560
|
+
readonly config: UniswapV3IncreaseLiquidityConfig;
|
|
561
|
+
readonly guards?: readonly TypedGuard<"liquidity" | "sqrtPriceX96" | "residualA" | "residualB">[];
|
|
556
562
|
}
|
|
557
|
-
interface CoreSplitOutputs {
|
|
558
|
-
|
|
559
|
-
|
|
563
|
+
export interface CoreSplitOutputs {
|
|
564
|
+
readonly a: OutputHandle<"resource">;
|
|
565
|
+
readonly b: OutputHandle<"resource">;
|
|
560
566
|
}
|
|
561
|
-
interface
|
|
562
|
-
|
|
567
|
+
export interface CoreSplitAtOutputs {
|
|
568
|
+
readonly head: OutputHandle<"resource">;
|
|
569
|
+
readonly tail: OutputHandle<"resource">;
|
|
563
570
|
}
|
|
564
|
-
interface
|
|
565
|
-
|
|
571
|
+
export interface CorePartitionOutputs<TBps extends FamilySource<CorePartitionConfig["bps"]> = FamilySource<CorePartitionConfig["bps"]>> {
|
|
572
|
+
readonly parts: OutputFamilyHandles<TBps>;
|
|
566
573
|
}
|
|
567
|
-
interface
|
|
568
|
-
|
|
569
|
-
readonly unspentIn: OutputHandle<'resource'>;
|
|
574
|
+
export interface CoreMergeOutputs {
|
|
575
|
+
readonly merged: OutputHandle<"resource">;
|
|
570
576
|
}
|
|
571
|
-
interface
|
|
572
|
-
|
|
573
|
-
|
|
577
|
+
export interface LifiSwapOutputs {
|
|
578
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
579
|
+
readonly unspentIn: OutputHandle<"resource">;
|
|
574
580
|
}
|
|
575
|
-
interface
|
|
576
|
-
|
|
581
|
+
export interface LifiBridgeOutputs {
|
|
582
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
583
|
+
readonly unspentIn: OutputHandle<"resource">;
|
|
577
584
|
}
|
|
578
|
-
interface
|
|
579
|
-
|
|
585
|
+
export interface CoreAddOutputs {
|
|
586
|
+
readonly result: OutputHandle<"uint256">;
|
|
580
587
|
}
|
|
581
|
-
interface
|
|
582
|
-
|
|
588
|
+
export interface CoreSubtractOutputs {
|
|
589
|
+
readonly result: OutputHandle<"uint256">;
|
|
583
590
|
}
|
|
584
|
-
interface
|
|
585
|
-
|
|
591
|
+
export interface CoreMultiplyOutputs {
|
|
592
|
+
readonly result: OutputHandle<"uint256">;
|
|
586
593
|
}
|
|
587
|
-
interface
|
|
588
|
-
|
|
594
|
+
export interface CoreDivideDownOutputs {
|
|
595
|
+
readonly result: OutputHandle<"uint256">;
|
|
589
596
|
}
|
|
590
|
-
interface
|
|
591
|
-
|
|
597
|
+
export interface CoreDivideUpOutputs {
|
|
598
|
+
readonly result: OutputHandle<"uint256">;
|
|
592
599
|
}
|
|
593
|
-
interface
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
interface CoreBalanceOfOutputs {
|
|
597
|
-
readonly balance: OutputHandle<'resource'>;
|
|
600
|
+
export interface CoreBpsDownOutputs {
|
|
601
|
+
readonly result: OutputHandle<"uint256">;
|
|
598
602
|
}
|
|
599
|
-
interface
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
}
|
|
637
|
-
interface
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
}
|
|
642
|
-
interface
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
}
|
|
647
|
-
interface
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
}
|
|
652
|
-
interface
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}
|
|
657
|
-
interface
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
603
|
+
export interface CoreBpsUpOutputs {
|
|
604
|
+
readonly result: OutputHandle<"uint256">;
|
|
605
|
+
}
|
|
606
|
+
export interface CoreBalanceOfOutputs {
|
|
607
|
+
readonly balance: OutputHandle<"resource">;
|
|
608
|
+
}
|
|
609
|
+
export interface CoreTransferOutputs {
|
|
610
|
+
readonly transferred: OutputHandle<"resource">;
|
|
611
|
+
}
|
|
612
|
+
export interface CoreRawCallOutputs {
|
|
613
|
+
readonly result: OutputHandle<"uint256">;
|
|
614
|
+
}
|
|
615
|
+
export interface CoreAsResourceOutputs {
|
|
616
|
+
readonly resource: OutputHandle<"resource">;
|
|
617
|
+
}
|
|
618
|
+
export interface AaveBorrowOutputs {
|
|
619
|
+
readonly borrowed: OutputHandle<"resource">;
|
|
620
|
+
readonly debtBalance: OutputHandle<"uint256">;
|
|
621
|
+
}
|
|
622
|
+
export interface AaveRepayOutputs {
|
|
623
|
+
readonly actualRepaid: OutputHandle<"uint256">;
|
|
624
|
+
readonly residual: OutputHandle<"resource">;
|
|
625
|
+
}
|
|
626
|
+
export interface AaveRepayWithATokensOutputs {
|
|
627
|
+
readonly actualRepaid: OutputHandle<"uint256">;
|
|
628
|
+
readonly residual: OutputHandle<"resource">;
|
|
629
|
+
}
|
|
630
|
+
export interface AaveClaimRewardsOutputs {
|
|
631
|
+
readonly claimed: OutputHandle<"resource">;
|
|
632
|
+
readonly claimedAmount: OutputHandle<"uint256">;
|
|
633
|
+
}
|
|
634
|
+
export interface AaveGetHealthFactorOutputs {
|
|
635
|
+
readonly healthFactor: OutputHandle<"uint256">;
|
|
636
|
+
}
|
|
637
|
+
export interface MorphoBlueWithdrawCollateralOutputs {
|
|
638
|
+
readonly withdrawn: OutputHandle<"resource">;
|
|
639
|
+
readonly collateralWithdrawn: OutputHandle<"uint256">;
|
|
640
|
+
}
|
|
641
|
+
export interface MorphoBlueBorrowOutputs {
|
|
642
|
+
readonly borrowed: OutputHandle<"resource">;
|
|
643
|
+
readonly assetsBorrowed: OutputHandle<"uint256">;
|
|
644
|
+
readonly sharesBorrowed: OutputHandle<"uint256">;
|
|
645
|
+
}
|
|
646
|
+
export interface MorphoBlueRepayOutputs {
|
|
647
|
+
readonly actualRepaid: OutputHandle<"uint256">;
|
|
648
|
+
readonly sharesRepaid: OutputHandle<"uint256">;
|
|
649
|
+
readonly residual: OutputHandle<"resource">;
|
|
650
|
+
}
|
|
651
|
+
export interface MorphoBlueSupplyOutputs {
|
|
652
|
+
readonly assetsSupplied: OutputHandle<"uint256">;
|
|
653
|
+
readonly sharesSupplied: OutputHandle<"uint256">;
|
|
654
|
+
readonly residual: OutputHandle<"resource">;
|
|
655
|
+
}
|
|
656
|
+
export interface MorphoBlueWithdrawOutputs {
|
|
657
|
+
readonly withdrawn: OutputHandle<"resource">;
|
|
658
|
+
readonly assetsWithdrawn: OutputHandle<"uint256">;
|
|
659
|
+
readonly sharesWithdrawn: OutputHandle<"uint256">;
|
|
660
|
+
}
|
|
661
|
+
export interface MorphoBlueGetPositionOutputs {
|
|
662
|
+
readonly supplyShares: OutputHandle<"uint256">;
|
|
663
|
+
readonly borrowShares: OutputHandle<"uint128">;
|
|
664
|
+
readonly collateral: OutputHandle<"uint128">;
|
|
665
|
+
}
|
|
666
|
+
export interface LifiZapOutputs {
|
|
667
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
668
|
+
}
|
|
669
|
+
export interface LifiZapAsyncOutputs {
|
|
670
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
671
|
+
}
|
|
672
|
+
export interface ParaswapBuyOutputs {
|
|
673
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
674
|
+
readonly unspentIn: OutputHandle<"resource">;
|
|
675
|
+
}
|
|
676
|
+
export interface CorePeekOutputs {
|
|
677
|
+
readonly result: OutputHandle<"uint256">;
|
|
678
|
+
}
|
|
679
|
+
export interface FlySwapOutputs {
|
|
680
|
+
readonly amountOut: OutputHandle<"resource">;
|
|
681
|
+
readonly unspentIn: OutputHandle<"resource">;
|
|
682
|
+
}
|
|
683
|
+
export interface UniswapV2AddLiquidityOutputs {
|
|
684
|
+
readonly liquidity: OutputHandle<"resource">;
|
|
685
|
+
readonly residualA: OutputHandle<"resource">;
|
|
686
|
+
readonly residualB: OutputHandle<"resource">;
|
|
687
|
+
readonly poolPrice: OutputHandle<"uint256">;
|
|
688
|
+
}
|
|
689
|
+
export interface UniswapV2RemoveLiquidityOutputs {
|
|
690
|
+
readonly tokenA: OutputHandle<"resource">;
|
|
691
|
+
readonly tokenB: OutputHandle<"resource">;
|
|
692
|
+
}
|
|
693
|
+
export interface UniswapV3MintOutputs {
|
|
694
|
+
readonly tokenId: OutputHandle<"uint256">;
|
|
695
|
+
readonly liquidity: OutputHandle<"uint256">;
|
|
696
|
+
readonly sqrtPriceX96: OutputHandle<"uint256">;
|
|
697
|
+
readonly residualA: OutputHandle<"resource">;
|
|
698
|
+
readonly residualB: OutputHandle<"resource">;
|
|
699
|
+
}
|
|
700
|
+
export interface UniswapV3IncreaseLiquidityOutputs {
|
|
701
|
+
readonly liquidity: OutputHandle<"uint256">;
|
|
702
|
+
readonly sqrtPriceX96: OutputHandle<"uint256">;
|
|
703
|
+
readonly residualA: OutputHandle<"resource">;
|
|
704
|
+
readonly residualB: OutputHandle<"resource">;
|
|
705
|
+
}
|
|
706
|
+
export type GeneratedOps = {
|
|
707
|
+
readonly core: {
|
|
708
|
+
/** 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" */
|
|
709
|
+
readonly split: (nodeId: string, args: CoreSplitArgs) => CoreSplitOutputs;
|
|
710
|
+
/** Split a resource at a fixed amount. Output `head` receives `min(source, amount)`; `tail` receives the rest, and is 0 (omitted when unspent) when the source is at or below `amount`. — original id: "core.splitAt" */
|
|
711
|
+
readonly splitAt: (nodeId: string, args: CoreSplitAtArgs) => CoreSplitAtOutputs;
|
|
712
|
+
/** 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" */
|
|
713
|
+
readonly partition: <const TBps extends FamilySource<CorePartitionConfig["bps"]>>(nodeId: string, args: CorePartitionArgs<TBps>) => CorePartitionOutputs<TBps>;
|
|
714
|
+
/** Merge two same-token resources into one by addition — original id: "core.merge" */
|
|
715
|
+
readonly merge: (nodeId: string, args: CoreMergeArgs) => CoreMergeOutputs;
|
|
716
|
+
/** Add two unsigned integers (a + b) — original id: "core.add" */
|
|
717
|
+
readonly add: (nodeId: string, args: CoreAddArgs) => CoreAddOutputs;
|
|
718
|
+
/** Subtract b from a (a - b); reverts on underflow — original id: "core.subtract" */
|
|
719
|
+
readonly subtract: (nodeId: string, args: CoreSubtractArgs) => CoreSubtractOutputs;
|
|
720
|
+
/** Multiply two unsigned integers (a * b) — original id: "core.multiply" */
|
|
721
|
+
readonly multiply: (nodeId: string, args: CoreMultiplyArgs) => CoreMultiplyOutputs;
|
|
722
|
+
/** Divide a by b, rounding toward zero — original id: "core.divideDown" */
|
|
723
|
+
readonly divideDown: (nodeId: string, args: CoreDivideDownArgs) => CoreDivideDownOutputs;
|
|
724
|
+
/** Divide a by b, rounding away from zero — original id: "core.divideUp" */
|
|
725
|
+
readonly divideUp: (nodeId: string, args: CoreDivideUpArgs) => CoreDivideUpOutputs;
|
|
726
|
+
/** Multiply value by basis points and divide by 10000, rounding down — original id: "core.bpsDown" */
|
|
727
|
+
readonly bpsDown: (nodeId: string, args: CoreBpsDownArgs) => CoreBpsDownOutputs;
|
|
728
|
+
/** Multiply value by basis points and divide by 10000, rounding up — original id: "core.bpsUp" */
|
|
729
|
+
readonly bpsUp: (nodeId: string, args: CoreBpsUpArgs) => CoreBpsUpOutputs;
|
|
730
|
+
/** Assert a == b; reverts if not equal — original id: "core.assertEqual" */
|
|
731
|
+
readonly assertEqual: (nodeId: string, args: CoreAssertEqualArgs) => void;
|
|
732
|
+
/** Assert a != b; reverts if equal — original id: "core.assertNotEqual" */
|
|
733
|
+
readonly assertNotEqual: (nodeId: string, args: CoreAssertNotEqualArgs) => void;
|
|
734
|
+
/** Assert a > b; reverts if a <= b — original id: "core.assertGt" */
|
|
735
|
+
readonly assertGt: (nodeId: string, args: CoreAssertGtArgs) => void;
|
|
736
|
+
/** Assert a >= b; reverts if a < b — original id: "core.assertGte" */
|
|
737
|
+
readonly assertGte: (nodeId: string, args: CoreAssertGteArgs) => void;
|
|
738
|
+
/** Assert a < b; reverts if a >= b — original id: "core.assertLt" */
|
|
739
|
+
readonly assertLt: (nodeId: string, args: CoreAssertLtArgs) => void;
|
|
740
|
+
/** Assert a <= b; reverts if a > b — original id: "core.assertLte" */
|
|
741
|
+
readonly assertLte: (nodeId: string, args: CoreAssertLteArgs) => void;
|
|
742
|
+
/** Assert min <= value <= max; reverts if value is outside the range — original id: "core.assertInRange" */
|
|
743
|
+
readonly assertInRange: (nodeId: string, args: CoreAssertInRangeArgs) => void;
|
|
744
|
+
/** Approve an ERC20 spender for the given token and amount — original id: "core.approve" */
|
|
745
|
+
readonly approve: (nodeId: string, args: CoreApproveArgs) => void;
|
|
746
|
+
/** Read an ERC20 balance, producing a resource — original id: "core.balanceOf" */
|
|
747
|
+
readonly balanceOf: (nodeId: string, args: CoreBalanceOfArgs) => CoreBalanceOfOutputs;
|
|
748
|
+
/** Transfer the whole input resource to a recipient address. To send part of a resource, split it first with `core.split` or `core.splitAt`. — original id: "core.transfer" */
|
|
749
|
+
readonly transfer: (nodeId: string, args: CoreTransferArgs) => CoreTransferOutputs;
|
|
750
|
+
/** 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" */
|
|
751
|
+
readonly emitEvent1: (nodeId: string, args: CoreEmitEvent1Args) => void;
|
|
752
|
+
/** 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" */
|
|
753
|
+
readonly emitEvent2: (nodeId: string, args: CoreEmitEvent2Args) => void;
|
|
754
|
+
/** 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" */
|
|
755
|
+
readonly emitEvent3: (nodeId: string, args: CoreEmitEvent3Args) => void;
|
|
756
|
+
/** 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" */
|
|
757
|
+
readonly emitEvent4: (nodeId: string, args: CoreEmitEvent4Args) => void;
|
|
758
|
+
/** Invoke a smart contract function, optionally spending a token resource — original id: "core.call" */
|
|
759
|
+
readonly call: <TSig extends string>(nodeId: string, args: CoreCallArgs<TSig>) => CoreCallResult<TSig>;
|
|
760
|
+
/** Read from a smart contract at runtime (StaticCall); result is fresh at execution time — original id: "core.staticCall" */
|
|
761
|
+
readonly staticCall: <TSig extends string>(nodeId: string, args: CoreStaticCallArgs<TSig>) => StaticCallResult<TSig>;
|
|
762
|
+
/** Invoke a contract with pre-encoded calldata — original id: "core.rawCall" */
|
|
763
|
+
readonly rawCall: (nodeId: string, args: CoreRawCallArgs) => CoreRawCallOutputs;
|
|
764
|
+
/** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking — original id: "core.asResource" */
|
|
765
|
+
readonly asResource: (nodeId: string, args: CoreAsResourceArgs) => CoreAsResourceOutputs;
|
|
766
|
+
/** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal — original id: "core.peek" */
|
|
767
|
+
readonly peek: (nodeId: string, args: CorePeekArgs) => CorePeekOutputs;
|
|
768
|
+
};
|
|
769
|
+
readonly lifi: {
|
|
770
|
+
/** Swap tokens via the LI.FI aggregator API — original id: "lifi.swap" */
|
|
771
|
+
readonly swap: (nodeId: string, args: LifiSwapArgs) => LifiSwapOutputs;
|
|
772
|
+
/** Bridge tokens to another chain via the LI.FI aggregator API — original id: "lifi.bridge" */
|
|
773
|
+
readonly bridge: (nodeId: string, args: LifiBridgeArgs) => LifiBridgeOutputs;
|
|
774
|
+
/** Route tokens into a DeFi protocol position via the edge catalog — original id: "lifi.zap" */
|
|
775
|
+
readonly zap: (nodeId: string, args: LifiZapArgs) => LifiZapOutputs;
|
|
776
|
+
/** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles — original id: "lifi.zapAsync" */
|
|
777
|
+
readonly zapAsync: (nodeId: string, args: LifiZapAsyncArgs) => LifiZapAsyncOutputs;
|
|
778
|
+
};
|
|
779
|
+
readonly invariant: {
|
|
780
|
+
/** Assert that an account holds at least a minimum token balance — original id: "invariant.balanceAtLeast" */
|
|
781
|
+
readonly balanceAtLeast: (nodeId: string, args: InvariantBalanceAtLeastArgs) => void;
|
|
782
|
+
/** Assert that an account holds exactly an expected token balance — original id: "invariant.balanceEquals" */
|
|
783
|
+
readonly balanceEquals: (nodeId: string, args: InvariantBalanceEqualsArgs) => void;
|
|
784
|
+
/** Assert that an account holds at most a maximum token balance — original id: "invariant.balanceAtMost" */
|
|
785
|
+
readonly balanceAtMost: (nodeId: string, args: InvariantBalanceAtMostArgs) => void;
|
|
786
|
+
/** Assert that an account's token balance is between a minimum and a maximum (inclusive) — original id: "invariant.balanceInRange" */
|
|
787
|
+
readonly balanceInRange: (nodeId: string, args: InvariantBalanceInRangeArgs) => void;
|
|
788
|
+
/** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner — original id: "invariant.allowanceAtLeast" */
|
|
789
|
+
readonly allowanceAtLeast: (nodeId: string, args: InvariantAllowanceAtLeastArgs) => void;
|
|
790
|
+
/** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount — original id: "invariant.allowanceEquals" */
|
|
791
|
+
readonly allowanceEquals: (nodeId: string, args: InvariantAllowanceEqualsArgs) => void;
|
|
792
|
+
/** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner — original id: "invariant.allowanceAtMost" */
|
|
793
|
+
readonly allowanceAtMost: (nodeId: string, args: InvariantAllowanceAtMostArgs) => void;
|
|
794
|
+
/** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) — original id: "invariant.allowanceInRange" */
|
|
795
|
+
readonly allowanceInRange: (nodeId: string, args: InvariantAllowanceInRangeArgs) => void;
|
|
796
|
+
/** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation — original id: "invariant.numeric" */
|
|
797
|
+
readonly numeric: (nodeId: string, args: InvariantNumericArgs) => void;
|
|
798
|
+
/** Assert min <= value <= max against constant bounds; reverts if outside the range — original id: "invariant.numericInRange" */
|
|
799
|
+
readonly numericInRange: (nodeId: string, args: InvariantNumericInRangeArgs) => void;
|
|
800
|
+
/** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation — original id: "invariant.gte" */
|
|
801
|
+
readonly gte: (nodeId: string, args: InvariantGteArgs) => void;
|
|
802
|
+
/** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation — original id: "invariant.gt" */
|
|
803
|
+
readonly gt: (nodeId: string, args: InvariantGtArgs) => void;
|
|
804
|
+
/** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation — original id: "invariant.lte" */
|
|
805
|
+
readonly lte: (nodeId: string, args: InvariantLteArgs) => void;
|
|
806
|
+
/** Assert a uint256 value is strictly less than a constant threshold; reverts on violation — original id: "invariant.lt" */
|
|
807
|
+
readonly lt: (nodeId: string, args: InvariantLtArgs) => void;
|
|
808
|
+
/** Assert a uint256 value equals a constant threshold; reverts on violation — original id: "invariant.eq" */
|
|
809
|
+
readonly eq: (nodeId: string, args: InvariantEqArgs) => void;
|
|
810
|
+
/** Assert a uint256 value does not equal a constant threshold; reverts on violation — original id: "invariant.neq" */
|
|
811
|
+
readonly neq: (nodeId: string, args: InvariantNeqArgs) => void;
|
|
812
|
+
};
|
|
813
|
+
readonly aave: {
|
|
814
|
+
/** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource — original id: "aave.borrow" */
|
|
815
|
+
readonly borrow: (nodeId: string, args: AaveBorrowArgs) => AaveBorrowOutputs;
|
|
816
|
+
/** 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" */
|
|
817
|
+
readonly repay: (nodeId: string, args: AaveRepayArgs) => AaveRepayOutputs;
|
|
818
|
+
/** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual — original id: "aave.repayWithATokens" */
|
|
819
|
+
readonly repayWithATokens: (nodeId: string, args: AaveRepayWithATokensArgs) => AaveRepayWithATokensOutputs;
|
|
820
|
+
/** 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" */
|
|
821
|
+
readonly claimRewards: (nodeId: string, args: AaveClaimRewardsArgs) => AaveClaimRewardsOutputs;
|
|
822
|
+
/** 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" */
|
|
823
|
+
readonly setEMode: (nodeId: string, args: AaveSetEModeArgs) => void;
|
|
824
|
+
/** Read the current Aave v3 health factor (WAD-scaled, 1e18; type(uint256).max for users with no debt) by static-calling IPool.getUserAccountData and decomposing the returned tuple. Exposes the healthFactor element as a uint256 handle suitable for use with core.numericInvariant. — original id: "aave.getHealthFactor" */
|
|
825
|
+
readonly getHealthFactor: (nodeId: string, args: AaveGetHealthFactorArgs) => AaveGetHealthFactorOutputs;
|
|
826
|
+
};
|
|
827
|
+
readonly morphoBlue: {
|
|
828
|
+
/** 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" */
|
|
829
|
+
readonly supplyCollateral: (nodeId: string, args: MorphoBlueSupplyCollateralArgs) => void;
|
|
830
|
+
/** 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" */
|
|
831
|
+
readonly withdrawCollateral: (nodeId: string, args: MorphoBlueWithdrawCollateralArgs) => MorphoBlueWithdrawCollateralOutputs;
|
|
832
|
+
/** Borrow the loan asset from a Morpho Blue market against existing collateral. Exposes the borrowed amount as a Resource and the (assetsBorrowed, sharesBorrowed) tuple as handles. — original id: "morphoBlue.borrow" */
|
|
833
|
+
readonly borrow: (nodeId: string, args: MorphoBlueBorrowArgs) => MorphoBlueBorrowOutputs;
|
|
834
|
+
/** Repay a Morpho Blue debt position with the supplied asset. mode: 'exact' repays the input handle amount; mode: 'max' reads Position.borrowShares via a precursor static call and repays in shares mode to retire the debt to the wei. Returns any unspent residual as a Resource. — original id: "morphoBlue.repay" */
|
|
835
|
+
readonly repay: (nodeId: string, args: MorphoBlueRepayArgs) => MorphoBlueRepayOutputs;
|
|
836
|
+
/** Supply the loan asset of a Morpho Blue market and receive supplyShares accounting credit. Returns the (assetsSupplied, sharesSupplied) tuple as handles and any unspent residual as a Resource. — original id: "morphoBlue.supply" */
|
|
837
|
+
readonly supply: (nodeId: string, args: MorphoBlueSupplyArgs) => MorphoBlueSupplyOutputs;
|
|
838
|
+
/** Withdraw the loan asset from a Morpho Blue supply position. mode: 'exact' withdraws the configured amount; mode: 'max' reads Position.supplyShares via a precursor static call and burns all shares to retire the supply to the wei. Exposes the withdrawn amount as a Resource. — original id: "morphoBlue.withdraw" */
|
|
839
|
+
readonly withdraw: (nodeId: string, args: MorphoBlueWithdrawArgs) => MorphoBlueWithdrawOutputs;
|
|
840
|
+
/** 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
|
+
readonly getPosition: (nodeId: string, args: MorphoBlueGetPositionArgs) => MorphoBlueGetPositionOutputs;
|
|
842
|
+
};
|
|
843
|
+
readonly paraswap: {
|
|
844
|
+
/** 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
|
+
readonly buy: (nodeId: string, args: ParaswapBuyArgs) => ParaswapBuyOutputs;
|
|
846
|
+
};
|
|
847
|
+
readonly fly: {
|
|
848
|
+
/** 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" */
|
|
849
|
+
readonly swap: (nodeId: string, args: FlySwapArgs) => FlySwapOutputs;
|
|
850
|
+
};
|
|
851
|
+
readonly uniswapV2: {
|
|
852
|
+
/** Deposit two ERC-20 tokens into an existing Uniswap V2 pair (or an ABI-identical fork such as SushiSwap V2) through its Router02 and receive the pair's LP token; unused input returns as residuals. Asserts on chain that the router's factory is `factory`, that the factory's pair for the two tokens is `pair`, and that the pair holds non-zero reserves. Exposes the pool price read before the deposit as `poolPrice`. The deposit is protected only with a `band` guard on `poolPrice` and a `slippage` guard on `liquidity`. Fee-on-transfer tokens are unsupported. — original id: "uniswapV2.addLiquidity" */
|
|
853
|
+
readonly addLiquidity: (nodeId: string, args: UniswapV2AddLiquidityArgs) => UniswapV2AddLiquidityOutputs;
|
|
854
|
+
/** Burn a Uniswap V2 LP token (or one of an ABI-identical fork such as SushiSwap V2) through its Router02 and receive both underlying tokens. Asserts on chain that the router's factory is `factory` and that the factory's pair for `tokenA`/`tokenB` is the input LP token. The withdrawal is protected only with a `slippage` guard on each of `tokenA` and `tokenB`. Fee-on-transfer tokens are unsupported: the outputs are the amounts the router reports, which would overstate what such a token delivers. — original id: "uniswapV2.removeLiquidity" */
|
|
855
|
+
readonly removeLiquidity: (nodeId: string, args: UniswapV2RemoveLiquidityArgs) => UniswapV2RemoveLiquidityOutputs;
|
|
856
|
+
};
|
|
857
|
+
readonly uniswapV3: {
|
|
858
|
+
/** Open a Uniswap V3 concentrated-liquidity position (or one on an ABI-identical fork) for a tick range, minting the position NFT straight to `recipient`, which must not be the execution address. Exposes the new `tokenId`; unused input comes back as residuals. The deposit is protected only with a `band` guard on `sqrtPriceX96` (read before the deposit) and a `slippage` guard on `liquidity`; a band of N bps on `sqrtPriceX96` allows about 2N bps of price movement. Fee-on-transfer tokens are unsupported. — original id: "uniswapV3.mint" */
|
|
859
|
+
readonly mint: (nodeId: string, args: UniswapV3MintArgs) => UniswapV3MintOutputs;
|
|
860
|
+
/** 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
|
+
readonly increaseLiquidity: (nodeId: string, args: UniswapV3IncreaseLiquidityArgs) => UniswapV3IncreaseLiquidityOutputs;
|
|
862
|
+
};
|
|
852
863
|
};
|
|
853
|
-
declare const bindGeneratedOps: (builder: FlowBuilderInternal) => GeneratedOps;
|
|
854
|
-
|
|
855
|
-
|
|
864
|
+
export declare const bindGeneratedOps: (builder: FlowBuilderInternal) => GeneratedOps;
|
|
865
|
+
//#endregion
|
|
866
|
+
//# sourceMappingURL=operations.generated.d.ts.map
|