@lifi/composer-sdk 0.8.1 → 0.10.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.
Files changed (161) hide show
  1. package/README.md +4 -3
  2. package/dist/_virtual/_rolldown/runtime.cjs +33 -0
  3. package/dist/_virtual/_rolldown/runtime.js +13 -0
  4. package/dist/authoring/FlowBuilderCore.cjs +102 -120
  5. package/dist/authoring/FlowBuilderCore.cjs.map +1 -1
  6. package/dist/authoring/FlowBuilderCore.d.cts +58 -61
  7. package/dist/authoring/FlowBuilderCore.d.ts +58 -61
  8. package/dist/authoring/FlowBuilderCore.js +99 -97
  9. package/dist/authoring/FlowBuilderCore.js.map +1 -1
  10. package/dist/authoring/handles.cjs +25 -40
  11. package/dist/authoring/handles.cjs.map +1 -1
  12. package/dist/authoring/handles.d.cts +33 -34
  13. package/dist/authoring/handles.d.ts +33 -34
  14. package/dist/authoring/handles.js +21 -13
  15. package/dist/authoring/handles.js.map +1 -1
  16. package/dist/authoring/raw.cjs +85 -44
  17. package/dist/authoring/raw.cjs.map +1 -1
  18. package/dist/authoring/raw.d.cts +8 -8
  19. package/dist/authoring/raw.d.ts +8 -8
  20. package/dist/authoring/raw.js +83 -19
  21. package/dist/authoring/raw.js.map +1 -1
  22. package/dist/authoring/signatureArgs.cjs +81 -103
  23. package/dist/authoring/signatureArgs.cjs.map +1 -1
  24. package/dist/authoring/signatureArgs.d.cts +63 -64
  25. package/dist/authoring/signatureArgs.d.ts +63 -64
  26. package/dist/authoring/signatureArgs.js +76 -75
  27. package/dist/authoring/signatureArgs.js.map +1 -1
  28. package/dist/client.cjs +172 -220
  29. package/dist/client.cjs.map +1 -1
  30. package/dist/client.d.cts +131 -131
  31. package/dist/client.d.ts +131 -131
  32. package/dist/client.js +165 -198
  33. package/dist/client.js.map +1 -1
  34. package/dist/discovery.cjs +0 -17
  35. package/dist/discovery.d.cts +57 -56
  36. package/dist/discovery.d.ts +57 -56
  37. package/dist/discovery.js +1 -1
  38. package/dist/errors.cjs +211 -159
  39. package/dist/errors.cjs.map +1 -1
  40. package/dist/errors.d.cts +84 -84
  41. package/dist/errors.d.ts +84 -84
  42. package/dist/errors.js +201 -120
  43. package/dist/errors.js.map +1 -1
  44. package/dist/generated/config.generated.cjs +0 -17
  45. package/dist/generated/config.generated.d.cts +804 -936
  46. package/dist/generated/config.generated.d.ts +804 -936
  47. package/dist/generated/config.generated.js +1 -1
  48. package/dist/generated/guards.generated.cjs +25 -35
  49. package/dist/generated/guards.generated.cjs.map +1 -1
  50. package/dist/generated/guards.generated.d.cts +20 -4
  51. package/dist/generated/guards.generated.d.ts +20 -4
  52. package/dist/generated/guards.generated.js +19 -11
  53. package/dist/generated/guards.generated.js.map +1 -1
  54. package/dist/generated/materialisers.generated.cjs +25 -35
  55. package/dist/generated/materialisers.generated.cjs.map +1 -1
  56. package/dist/generated/materialisers.generated.d.cts +17 -4
  57. package/dist/generated/materialisers.generated.d.ts +17 -4
  58. package/dist/generated/materialisers.generated.js +19 -11
  59. package/dist/generated/materialisers.generated.js.map +1 -1
  60. package/dist/generated/operations.generated.cjs +236 -277
  61. package/dist/generated/operations.generated.cjs.map +1 -1
  62. package/dist/generated/operations.generated.d.cts +719 -708
  63. package/dist/generated/operations.generated.d.ts +719 -708
  64. package/dist/generated/operations.generated.js +235 -256
  65. package/dist/generated/operations.generated.js.map +1 -1
  66. package/dist/generated/preconditions.generated.cjs +25 -35
  67. package/dist/generated/preconditions.generated.cjs.map +1 -1
  68. package/dist/generated/preconditions.generated.d.cts +17 -4
  69. package/dist/generated/preconditions.generated.d.ts +17 -4
  70. package/dist/generated/preconditions.generated.js +19 -11
  71. package/dist/generated/preconditions.generated.js.map +1 -1
  72. package/dist/index.cjs +131 -97
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.d.cts +29 -43
  75. package/dist/index.d.ts +29 -43
  76. package/dist/index.js +96 -45
  77. package/dist/index.js.map +1 -1
  78. package/dist/outputs.cjs +11 -32
  79. package/dist/outputs.cjs.map +1 -1
  80. package/dist/outputs.d.cts +5 -5
  81. package/dist/outputs.d.ts +5 -5
  82. package/dist/outputs.js +10 -8
  83. package/dist/outputs.js.map +1 -1
  84. package/dist/raw.cjs +21 -33
  85. package/dist/raw.cjs.map +1 -1
  86. package/dist/raw.d.cts +8 -4
  87. package/dist/raw.d.ts +8 -4
  88. package/dist/raw.js +12 -7
  89. package/dist/raw.js.map +1 -1
  90. package/dist/reachability.cjs +82 -112
  91. package/dist/reachability.cjs.map +1 -1
  92. package/dist/reachability.d.cts +33 -59
  93. package/dist/reachability.d.ts +33 -59
  94. package/dist/reachability.js +81 -88
  95. package/dist/reachability.js.map +1 -1
  96. package/dist/resources.cjs +47 -32
  97. package/dist/resources.cjs.map +1 -1
  98. package/dist/resources.d.cts +50 -3
  99. package/dist/resources.d.ts +50 -3
  100. package/dist/resources.js +42 -9
  101. package/dist/resources.js.map +1 -1
  102. package/dist/responseSchemas.cjs +99 -111
  103. package/dist/responseSchemas.cjs.map +1 -1
  104. package/dist/responseSchemas.d.cts +34 -34
  105. package/dist/responseSchemas.d.ts +34 -34
  106. package/dist/responseSchemas.js +85 -66
  107. package/dist/responseSchemas.js.map +1 -1
  108. package/dist/routeAmount.cjs +61 -31
  109. package/dist/routeAmount.cjs.map +1 -1
  110. package/dist/routeAmount.d.cts +52 -2
  111. package/dist/routeAmount.d.ts +52 -2
  112. package/dist/routeAmount.js +56 -8
  113. package/dist/routeAmount.js.map +1 -1
  114. package/dist/run/inputs.cjs +56 -48
  115. package/dist/run/inputs.cjs.map +1 -1
  116. package/dist/run/inputs.d.cts +70 -74
  117. package/dist/run/inputs.d.ts +70 -74
  118. package/dist/run/inputs.js +54 -23
  119. package/dist/run/inputs.js.map +1 -1
  120. package/dist/run/simulate.cjs +38 -43
  121. package/dist/run/simulate.cjs.map +1 -1
  122. package/dist/run/simulate.d.cts +36 -36
  123. package/dist/run/simulate.d.ts +36 -36
  124. package/dist/run/simulate.js +37 -19
  125. package/dist/run/simulate.js.map +1 -1
  126. package/dist/sdk.cjs +55 -66
  127. package/dist/sdk.cjs.map +1 -1
  128. package/dist/sdk.d.cts +108 -111
  129. package/dist/sdk.d.ts +108 -111
  130. package/dist/sdk.js +52 -44
  131. package/dist/sdk.js.map +1 -1
  132. package/dist/types.cjs +0 -17
  133. package/dist/types.d.cts +22 -22
  134. package/dist/types.d.ts +22 -22
  135. package/dist/types.js +1 -1
  136. package/package.json +5 -5
  137. package/src/client.ts +2 -2
  138. package/src/examples/aaveClaimRewards.ts +2 -1
  139. package/src/examples/emitCustomEvent.ts +1 -2
  140. package/src/examples/run.ts +1 -1
  141. package/src/examples/transferTokens.ts +21 -17
  142. package/src/generated/config.generated.ts +20 -9
  143. package/src/generated/operations.generated.ts +28 -5
  144. package/dist/discovery.cjs.map +0 -1
  145. package/dist/discovery.js.map +0 -1
  146. package/dist/generated/config.generated.cjs.map +0 -1
  147. package/dist/generated/config.generated.js.map +0 -1
  148. package/dist/guards.generated-CDCgYGZo.d.cts +0 -24
  149. package/dist/guards.generated-CdYcs4h0.d.ts +0 -24
  150. package/dist/materialisers.generated-BMkBQgWZ.d.ts +0 -24
  151. package/dist/materialisers.generated-BWq5oePO.d.cts +0 -24
  152. package/dist/preconditions.generated-DblS13Wq.d.cts +0 -24
  153. package/dist/preconditions.generated-U7YpVh30.d.ts +0 -24
  154. package/dist/raw-BvRghN3r.d.ts +0 -20
  155. package/dist/raw-s1rer8X3.d.cts +0 -20
  156. package/dist/resources-BKlFxjo8.d.cts +0 -56
  157. package/dist/resources-CYis1_DS.d.ts +0 -56
  158. package/dist/routeAmount-DdbJYJyM.d.cts +0 -55
  159. package/dist/routeAmount-DdbJYJyM.d.ts +0 -55
  160. package/dist/types.cjs.map +0 -1
  161. package/dist/types.js.map +0 -1
@@ -1,855 +1,866 @@
1
- import { FlowBuilderInternal } from '../authoring/FlowBuilderCore.cjs';
2
- import { Bindable, OutputHandle, FamilySource, FamilyCount, OutputFamilyHandles } from '../authoring/handles.cjs';
3
- import { SignatureBind, CoreCallResult, StaticCallResult } from '../authoring/signatureArgs.cjs';
4
- import { TypedGuard } from '../types.cjs';
5
- import { CoreSplitConfig, CorePartitionConfig, CoreBpsDownConfig, CoreBpsUpConfig, CoreApproveConfig, CoreBalanceOfConfig, CoreTransferConfig, CoreEmitEvent1Config, CoreEmitEvent2Config, CoreEmitEvent3Config, CoreEmitEvent4Config, CoreCallConfig, CoreStaticCallConfig, CoreRawCallConfig, CoreAsResourceConfig, CorePeekConfig, LifiSwapConfig, LifiBridgeConfig, LifiZapConfig, LifiZapAsyncConfig, InvariantNumericConfig, InvariantNumericInRangeConfig, InvariantGteConfig, InvariantGtConfig, InvariantLteConfig, InvariantLtConfig, InvariantEqConfig, InvariantNeqConfig, AaveBorrowConfig, AaveRepayConfig, AaveRepayWithATokensConfig, AaveClaimRewardsConfig, AaveSetEModeConfig, AaveGetHealthFactorConfig, MorphoBlueSupplyCollateralConfig, MorphoBlueWithdrawCollateralConfig, MorphoBlueBorrowConfig, MorphoBlueRepayConfig, MorphoBlueSupplyConfig, MorphoBlueWithdrawConfig, MorphoBlueGetPositionConfig, ParaswapBuyConfig, FlySwapConfig, UniswapV2AddLiquidityConfig, UniswapV2RemoveLiquidityConfig, UniswapV3MintConfig, UniswapV3IncreaseLiquidityConfig } from './config.generated.cjs';
6
- import '@lifi/compose-spec';
7
- import 'abitype';
8
-
1
+ import { TypedGuard } from "../types.cjs";
2
+ import { Bindable, FamilyCount, FamilySource, OutputFamilyHandles, OutputHandle } from "../authoring/handles.cjs";
3
+ import { FlowBuilderInternal } from "../authoring/FlowBuilderCore.cjs";
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";
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
- readonly bind: {
12
- readonly source: Bindable<'resource'>;
13
- };
14
- readonly config: CoreSplitConfig;
15
- readonly guards?: readonly TypedGuard<'a' | 'b'>[];
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['bps']> = FamilySource<CorePartitionConfig['bps']>> {
19
- readonly bind: {
20
- readonly source: Bindable<'resource'>;
21
- };
22
- readonly config: Omit<CorePartitionConfig, 'bps'> & {
23
- readonly bps: TBps & FamilyCount<NoInfer<TBps>, Readonly<CorePartitionConfig['bps']>>;
24
- };
25
- readonly guards?: readonly TypedGuard<`parts.${number}`>[];
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
- readonly bind: {
30
- readonly a: Bindable<'resource'>;
31
- readonly b: Bindable<'resource'>;
32
- };
33
- readonly guards?: readonly TypedGuard<'merged'>[];
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
- readonly bind: {
38
- readonly amountIn: Bindable<'resource'>;
39
- };
40
- readonly config: LifiSwapConfig;
41
- readonly guards?: readonly TypedGuard<'unspentIn'>[];
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
- readonly bind: {
46
- readonly amountIn: Bindable<'resource'>;
47
- };
48
- readonly config: LifiBridgeConfig;
49
- readonly guards?: readonly TypedGuard<'unspentIn'>[];
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
- readonly bind: {
54
- readonly minimumAmount: Bindable<'resource'>;
55
- readonly account: Bindable<'address'>;
56
- };
57
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
62
- readonly expectedAmount: Bindable<'resource'>;
63
- readonly account: Bindable<'address'>;
64
- };
65
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
70
- readonly maximumAmount: Bindable<'resource'>;
71
- readonly account: Bindable<'address'>;
72
- };
73
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
78
- readonly minimumAmount: Bindable<'resource'>;
79
- readonly maximumAmount: Bindable<'uint256'>;
80
- readonly account: Bindable<'address'>;
81
- };
82
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
87
- readonly minimumAmount: Bindable<'resource'>;
88
- readonly owner: Bindable<'address'>;
89
- readonly spender: Bindable<'address'>;
90
- };
91
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
96
- readonly expectedAmount: Bindable<'resource'>;
97
- readonly owner: Bindable<'address'>;
98
- readonly spender: Bindable<'address'>;
99
- };
100
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
105
- readonly maximumAmount: Bindable<'resource'>;
106
- readonly owner: Bindable<'address'>;
107
- readonly spender: Bindable<'address'>;
108
- };
109
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
114
- readonly minimumAmount: Bindable<'resource'>;
115
- readonly maximumAmount: Bindable<'uint256'>;
116
- readonly owner: Bindable<'address'>;
117
- readonly spender: Bindable<'address'>;
118
- };
119
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
124
- readonly value: Bindable<'uint256'>;
125
- };
126
- readonly config: InvariantNumericConfig;
127
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
132
- readonly value: Bindable<'uint256'>;
133
- };
134
- readonly config: InvariantNumericInRangeConfig;
135
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
140
- readonly value: Bindable<'uint256'>;
141
- };
142
- readonly config: InvariantGteConfig;
143
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
148
- readonly value: Bindable<'uint256'>;
149
- };
150
- readonly config: InvariantGtConfig;
151
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
156
- readonly value: Bindable<'uint256'>;
157
- };
158
- readonly config: InvariantLteConfig;
159
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
164
- readonly value: Bindable<'uint256'>;
165
- };
166
- readonly config: InvariantLtConfig;
167
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
172
- readonly value: Bindable<'uint256'>;
173
- };
174
- readonly config: InvariantEqConfig;
175
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
180
- readonly value: Bindable<'uint256'>;
181
- };
182
- readonly config: InvariantNeqConfig;
183
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
188
- readonly a: Bindable<'uint256'>;
189
- readonly b: Bindable<'uint256'>;
190
- };
191
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
196
- readonly a: Bindable<'uint256'>;
197
- readonly b: Bindable<'uint256'>;
198
- };
199
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
204
- readonly a: Bindable<'uint256'>;
205
- readonly b: Bindable<'uint256'>;
206
- };
207
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
212
- readonly a: Bindable<'uint256'>;
213
- readonly b: Bindable<'uint256'>;
214
- };
215
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
220
- readonly a: Bindable<'uint256'>;
221
- readonly b: Bindable<'uint256'>;
222
- };
223
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
228
- readonly value: Bindable<'uint256'>;
229
- };
230
- readonly config: CoreBpsDownConfig;
231
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
236
- readonly value: Bindable<'uint256'>;
237
- };
238
- readonly config: CoreBpsUpConfig;
239
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
244
- readonly a: Bindable<'uint256'>;
245
- readonly b: Bindable<'uint256'>;
246
- };
247
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
252
- readonly a: Bindable<'uint256'>;
253
- readonly b: Bindable<'uint256'>;
254
- };
255
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
260
- readonly a: Bindable<'uint256'>;
261
- readonly b: Bindable<'uint256'>;
262
- };
263
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
268
- readonly a: Bindable<'uint256'>;
269
- readonly b: Bindable<'uint256'>;
270
- };
271
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
276
- readonly a: Bindable<'uint256'>;
277
- readonly b: Bindable<'uint256'>;
278
- };
279
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
284
- readonly a: Bindable<'uint256'>;
285
- readonly b: Bindable<'uint256'>;
286
- };
287
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
292
- readonly value: Bindable<'uint256'>;
293
- readonly min: Bindable<'uint256'>;
294
- readonly max: Bindable<'uint256'>;
295
- };
296
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
301
- readonly amount: Bindable<'resource'>;
302
- };
303
- readonly config: CoreApproveConfig;
304
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: Record<string, never>;
309
- readonly config: CoreBalanceOfConfig;
310
- readonly guards?: readonly TypedGuard<'balance'>[];
311
- }
312
- /** Transfer tokens to a recipient address, optionally specifying a partial amount */
313
- interface CoreTransferArgs {
314
- readonly bind: {
315
- readonly amount: Bindable<'resource'>;
316
- readonly recipient: Bindable<'address'>;
317
- };
318
- readonly config: CoreTransferConfig;
319
- readonly guards?: readonly TypedGuard<'transferred' | 'remainder'>[];
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
- readonly bind: {
324
- readonly value0: Bindable<'bytes32'>;
325
- };
326
- readonly config: CoreEmitEvent1Config;
327
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
332
- readonly value0: Bindable<'bytes32'>;
333
- readonly value1: Bindable<'bytes32'>;
334
- };
335
- readonly config: CoreEmitEvent2Config;
336
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
341
- readonly value0: Bindable<'bytes32'>;
342
- readonly value1: Bindable<'bytes32'>;
343
- readonly value2: Bindable<'bytes32'>;
344
- };
345
- readonly config: CoreEmitEvent3Config;
346
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
351
- readonly value0: Bindable<'bytes32'>;
352
- readonly value1: Bindable<'bytes32'>;
353
- readonly value2: Bindable<'bytes32'>;
354
- readonly value3: Bindable<'bytes32'>;
355
- };
356
- readonly config: CoreEmitEvent4Config;
357
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly resource?: Bindable<'resource'>;
362
- readonly bind: SignatureBind<TSig>;
363
- readonly config: Omit<CoreCallConfig, 'args' | 'functionSignature'> & {
364
- readonly functionSignature: TSig;
365
- };
366
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: SignatureBind<TSig>;
371
- readonly config: Omit<CoreStaticCallConfig, 'args' | 'functionSignature'> & {
372
- readonly functionSignature: TSig;
373
- };
374
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: Record<string, never>;
379
- readonly config: CoreRawCallConfig;
380
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
385
- readonly handle: Bindable<'uint256'>;
386
- };
387
- readonly config: CoreAsResourceConfig;
388
- readonly guards?: readonly TypedGuard<'resource'>[];
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
- readonly bind: Record<string, never>;
393
- readonly config: AaveBorrowConfig;
394
- readonly guards?: readonly TypedGuard<'debtBalance'>[];
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
- readonly bind: {
399
- readonly assetIn: Bindable<'resource'>;
400
- readonly onBehalfOf: Bindable<'address'>;
401
- };
402
- readonly config: AaveRepayConfig;
403
- readonly guards?: readonly TypedGuard<'actualRepaid' | 'residual'>[];
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
- readonly bind: {
408
- readonly aTokenIn: Bindable<'resource'>;
409
- };
410
- readonly config: AaveRepayWithATokensConfig;
411
- readonly guards?: readonly TypedGuard<'actualRepaid' | 'residual'>[];
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
- readonly bind: Record<string, never>;
416
- readonly config: AaveClaimRewardsConfig;
417
- readonly guards?: readonly TypedGuard<'claimedAmount'>[];
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
- readonly bind: Record<string, never>;
422
- readonly config: AaveSetEModeConfig;
423
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: Record<string, never>;
428
- readonly config: AaveGetHealthFactorConfig;
429
- readonly guards?: readonly TypedGuard<'healthFactor'>[];
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
- readonly bind: {
434
- readonly assetIn: Bindable<'resource'>;
435
- };
436
- readonly config: MorphoBlueSupplyCollateralConfig;
437
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: Record<string, never>;
442
- readonly config: MorphoBlueWithdrawCollateralConfig;
443
- readonly guards?: readonly TypedGuard<'collateralWithdrawn'>[];
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
- readonly bind: Record<string, never>;
448
- readonly config: MorphoBlueBorrowConfig;
449
- readonly guards?: readonly TypedGuard<'assetsBorrowed' | 'sharesBorrowed'>[];
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
- readonly bind: {
454
- readonly assetIn: Bindable<'resource'>;
455
- readonly onBehalfOf: Bindable<'address'>;
456
- };
457
- readonly config: MorphoBlueRepayConfig;
458
- readonly guards?: readonly TypedGuard<'actualRepaid' | 'sharesRepaid' | 'residual'>[];
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
- readonly bind: {
463
- readonly assetIn: Bindable<'resource'>;
464
- };
465
- readonly config: MorphoBlueSupplyConfig;
466
- readonly guards?: readonly TypedGuard<'assetsSupplied' | 'sharesSupplied' | 'residual'>[];
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
- readonly bind: Record<string, never>;
471
- readonly config: MorphoBlueWithdrawConfig;
472
- readonly guards?: readonly TypedGuard<'assetsWithdrawn' | 'sharesWithdrawn'>[];
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
- readonly bind: Record<string, never>;
477
- readonly config: MorphoBlueGetPositionConfig;
478
- readonly guards?: readonly TypedGuard<'supplyShares' | 'borrowShares' | 'collateral'>[];
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
- readonly bind: {
483
- readonly amountIn: Bindable<'resource'>;
484
- readonly recipient?: Bindable<'address'>;
485
- };
486
- readonly config: LifiZapConfig;
487
- readonly guards?: readonly TypedGuard<'amountOut'>[];
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
- readonly bind: {
492
- readonly amountIn: Bindable<'resource'>;
493
- readonly recipient: Bindable<'address'>;
494
- };
495
- readonly config: LifiZapAsyncConfig;
496
- readonly guards?: readonly TypedGuard<never>[];
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
- readonly bind: {
501
- readonly amountIn: Bindable<'resource'>;
502
- };
503
- readonly config: ParaswapBuyConfig;
504
- readonly guards?: readonly TypedGuard<'unspentIn'>[];
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
- readonly bind: Record<string, never>;
509
- readonly config: CorePeekConfig;
510
- readonly guards?: readonly TypedGuard<'result'>[];
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
- readonly bind: {
515
- readonly amountIn: Bindable<'resource'>;
516
- };
517
- readonly config: FlySwapConfig;
518
- readonly guards?: readonly TypedGuard<'unspentIn'>[];
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
- readonly bind: {
523
- readonly tokenA: Bindable<'resource'>;
524
- readonly tokenB: Bindable<'resource'>;
525
- };
526
- readonly config: UniswapV2AddLiquidityConfig;
527
- readonly guards?: readonly TypedGuard<'liquidity' | 'residualA' | 'residualB' | 'poolPrice'>[];
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
- readonly bind: {
532
- readonly liquidity: Bindable<'resource'>;
533
- };
534
- readonly config: UniswapV2RemoveLiquidityConfig;
535
- readonly guards?: readonly TypedGuard<'tokenA' | 'tokenB'>[];
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
- readonly bind: {
540
- readonly tokenA: Bindable<'resource'>;
541
- readonly tokenB: Bindable<'resource'>;
542
- readonly recipient: Bindable<'address'>;
543
- };
544
- readonly config: UniswapV3MintConfig;
545
- readonly guards?: readonly TypedGuard<'tokenId' | 'liquidity' | 'sqrtPriceX96' | 'residualA' | 'residualB'>[];
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
- readonly bind: {
550
- readonly tokenA: Bindable<'resource'>;
551
- readonly tokenB: Bindable<'resource'>;
552
- readonly owner: Bindable<'address'>;
553
- };
554
- readonly config: UniswapV3IncreaseLiquidityConfig;
555
- readonly guards?: readonly TypedGuard<'liquidity' | 'sqrtPriceX96' | 'residualA' | 'residualB'>[];
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
- readonly a: OutputHandle<'resource'>;
559
- readonly b: OutputHandle<'resource'>;
563
+ export interface CoreSplitOutputs {
564
+ readonly a: OutputHandle<"resource">;
565
+ readonly b: OutputHandle<"resource">;
560
566
  }
561
- interface CorePartitionOutputs<TBps extends FamilySource<CorePartitionConfig['bps']> = FamilySource<CorePartitionConfig['bps']>> {
562
- readonly parts: OutputFamilyHandles<TBps>;
567
+ export interface CoreSplitAtOutputs {
568
+ readonly head: OutputHandle<"resource">;
569
+ readonly tail: OutputHandle<"resource">;
563
570
  }
564
- interface CoreMergeOutputs {
565
- readonly merged: OutputHandle<'resource'>;
571
+ export interface CorePartitionOutputs<TBps extends FamilySource<CorePartitionConfig["bps"]> = FamilySource<CorePartitionConfig["bps"]>> {
572
+ readonly parts: OutputFamilyHandles<TBps>;
566
573
  }
567
- interface LifiSwapOutputs {
568
- readonly amountOut: OutputHandle<'resource'>;
569
- readonly unspentIn: OutputHandle<'resource'>;
574
+ export interface CoreMergeOutputs {
575
+ readonly merged: OutputHandle<"resource">;
570
576
  }
571
- interface LifiBridgeOutputs {
572
- readonly amountOut: OutputHandle<'resource'>;
573
- readonly unspentIn: OutputHandle<'resource'>;
577
+ export interface LifiSwapOutputs {
578
+ readonly amountOut: OutputHandle<"resource">;
579
+ readonly unspentIn: OutputHandle<"resource">;
574
580
  }
575
- interface CoreAddOutputs {
576
- readonly result: OutputHandle<'uint256'>;
581
+ export interface LifiBridgeOutputs {
582
+ readonly amountOut: OutputHandle<"resource">;
583
+ readonly unspentIn: OutputHandle<"resource">;
577
584
  }
578
- interface CoreSubtractOutputs {
579
- readonly result: OutputHandle<'uint256'>;
585
+ export interface CoreAddOutputs {
586
+ readonly result: OutputHandle<"uint256">;
580
587
  }
581
- interface CoreMultiplyOutputs {
582
- readonly result: OutputHandle<'uint256'>;
588
+ export interface CoreSubtractOutputs {
589
+ readonly result: OutputHandle<"uint256">;
583
590
  }
584
- interface CoreDivideDownOutputs {
585
- readonly result: OutputHandle<'uint256'>;
591
+ export interface CoreMultiplyOutputs {
592
+ readonly result: OutputHandle<"uint256">;
586
593
  }
587
- interface CoreDivideUpOutputs {
588
- readonly result: OutputHandle<'uint256'>;
594
+ export interface CoreDivideDownOutputs {
595
+ readonly result: OutputHandle<"uint256">;
589
596
  }
590
- interface CoreBpsDownOutputs {
591
- readonly result: OutputHandle<'uint256'>;
597
+ export interface CoreDivideUpOutputs {
598
+ readonly result: OutputHandle<"uint256">;
592
599
  }
593
- interface CoreBpsUpOutputs {
594
- readonly result: OutputHandle<'uint256'>;
595
- }
596
- interface CoreBalanceOfOutputs {
597
- readonly balance: OutputHandle<'resource'>;
600
+ export interface CoreBpsDownOutputs {
601
+ readonly result: OutputHandle<"uint256">;
598
602
  }
599
- interface CoreTransferOutputs {
600
- readonly transferred: OutputHandle<'resource'>;
601
- readonly remainder: OutputHandle<'resource'>;
602
- }
603
- interface CoreRawCallOutputs {
604
- readonly result: OutputHandle<'uint256'>;
605
- }
606
- interface CoreAsResourceOutputs {
607
- readonly resource: OutputHandle<'resource'>;
608
- }
609
- interface AaveBorrowOutputs {
610
- readonly borrowed: OutputHandle<'resource'>;
611
- readonly debtBalance: OutputHandle<'uint256'>;
612
- }
613
- interface AaveRepayOutputs {
614
- readonly actualRepaid: OutputHandle<'uint256'>;
615
- readonly residual: OutputHandle<'resource'>;
616
- }
617
- interface AaveRepayWithATokensOutputs {
618
- readonly actualRepaid: OutputHandle<'uint256'>;
619
- readonly residual: OutputHandle<'resource'>;
620
- }
621
- interface AaveClaimRewardsOutputs {
622
- readonly claimed: OutputHandle<'resource'>;
623
- readonly claimedAmount: OutputHandle<'uint256'>;
624
- }
625
- interface AaveGetHealthFactorOutputs {
626
- readonly healthFactor: OutputHandle<'uint256'>;
627
- }
628
- interface MorphoBlueWithdrawCollateralOutputs {
629
- readonly withdrawn: OutputHandle<'resource'>;
630
- readonly collateralWithdrawn: OutputHandle<'uint256'>;
631
- }
632
- interface MorphoBlueBorrowOutputs {
633
- readonly borrowed: OutputHandle<'resource'>;
634
- readonly assetsBorrowed: OutputHandle<'uint256'>;
635
- readonly sharesBorrowed: OutputHandle<'uint256'>;
636
- }
637
- interface MorphoBlueRepayOutputs {
638
- readonly actualRepaid: OutputHandle<'uint256'>;
639
- readonly sharesRepaid: OutputHandle<'uint256'>;
640
- readonly residual: OutputHandle<'resource'>;
641
- }
642
- interface MorphoBlueSupplyOutputs {
643
- readonly assetsSupplied: OutputHandle<'uint256'>;
644
- readonly sharesSupplied: OutputHandle<'uint256'>;
645
- readonly residual: OutputHandle<'resource'>;
646
- }
647
- interface MorphoBlueWithdrawOutputs {
648
- readonly withdrawn: OutputHandle<'resource'>;
649
- readonly assetsWithdrawn: OutputHandle<'uint256'>;
650
- readonly sharesWithdrawn: OutputHandle<'uint256'>;
651
- }
652
- interface MorphoBlueGetPositionOutputs {
653
- readonly supplyShares: OutputHandle<'uint256'>;
654
- readonly borrowShares: OutputHandle<'uint128'>;
655
- readonly collateral: OutputHandle<'uint128'>;
656
- }
657
- interface LifiZapOutputs {
658
- readonly amountOut: OutputHandle<'resource'>;
659
- }
660
- interface LifiZapAsyncOutputs {
661
- readonly amountOut: OutputHandle<'resource'>;
662
- }
663
- interface ParaswapBuyOutputs {
664
- readonly amountOut: OutputHandle<'resource'>;
665
- readonly unspentIn: OutputHandle<'resource'>;
666
- }
667
- interface CorePeekOutputs {
668
- readonly result: OutputHandle<'uint256'>;
669
- }
670
- interface FlySwapOutputs {
671
- readonly amountOut: OutputHandle<'resource'>;
672
- readonly unspentIn: OutputHandle<'resource'>;
673
- }
674
- interface UniswapV2AddLiquidityOutputs {
675
- readonly liquidity: OutputHandle<'resource'>;
676
- readonly residualA: OutputHandle<'resource'>;
677
- readonly residualB: OutputHandle<'resource'>;
678
- readonly poolPrice: OutputHandle<'uint256'>;
679
- }
680
- interface UniswapV2RemoveLiquidityOutputs {
681
- readonly tokenA: OutputHandle<'resource'>;
682
- readonly tokenB: OutputHandle<'resource'>;
683
- }
684
- interface UniswapV3MintOutputs {
685
- readonly tokenId: OutputHandle<'uint256'>;
686
- readonly liquidity: OutputHandle<'uint256'>;
687
- readonly sqrtPriceX96: OutputHandle<'uint256'>;
688
- readonly residualA: OutputHandle<'resource'>;
689
- readonly residualB: OutputHandle<'resource'>;
690
- }
691
- interface UniswapV3IncreaseLiquidityOutputs {
692
- readonly liquidity: OutputHandle<'uint256'>;
693
- readonly sqrtPriceX96: OutputHandle<'uint256'>;
694
- readonly residualA: OutputHandle<'resource'>;
695
- readonly residualB: OutputHandle<'resource'>;
696
- }
697
- type GeneratedOps = {
698
- readonly core: {
699
- /** 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" */
700
- readonly split: (nodeId: string, args: CoreSplitArgs) => CoreSplitOutputs;
701
- /** 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" */
702
- readonly partition: <const TBps extends FamilySource<CorePartitionConfig['bps']>>(nodeId: string, args: CorePartitionArgs<TBps>) => CorePartitionOutputs<TBps>;
703
- /** Merge two same-token resources into one by addition — original id: "core.merge" */
704
- readonly merge: (nodeId: string, args: CoreMergeArgs) => CoreMergeOutputs;
705
- /** Add two unsigned integers (a + b) — original id: "core.add" */
706
- readonly add: (nodeId: string, args: CoreAddArgs) => CoreAddOutputs;
707
- /** Subtract b from a (a - b); reverts on underflow — original id: "core.subtract" */
708
- readonly subtract: (nodeId: string, args: CoreSubtractArgs) => CoreSubtractOutputs;
709
- /** Multiply two unsigned integers (a * b) — original id: "core.multiply" */
710
- readonly multiply: (nodeId: string, args: CoreMultiplyArgs) => CoreMultiplyOutputs;
711
- /** Divide a by b, rounding toward zero — original id: "core.divideDown" */
712
- readonly divideDown: (nodeId: string, args: CoreDivideDownArgs) => CoreDivideDownOutputs;
713
- /** Divide a by b, rounding away from zero — original id: "core.divideUp" */
714
- readonly divideUp: (nodeId: string, args: CoreDivideUpArgs) => CoreDivideUpOutputs;
715
- /** Multiply value by basis points and divide by 10000, rounding down — original id: "core.bpsDown" */
716
- readonly bpsDown: (nodeId: string, args: CoreBpsDownArgs) => CoreBpsDownOutputs;
717
- /** Multiply value by basis points and divide by 10000, rounding up — original id: "core.bpsUp" */
718
- readonly bpsUp: (nodeId: string, args: CoreBpsUpArgs) => CoreBpsUpOutputs;
719
- /** Assert a == b; reverts if not equal — original id: "core.assertEqual" */
720
- readonly assertEqual: (nodeId: string, args: CoreAssertEqualArgs) => void;
721
- /** Assert a != b; reverts if equal — original id: "core.assertNotEqual" */
722
- readonly assertNotEqual: (nodeId: string, args: CoreAssertNotEqualArgs) => void;
723
- /** Assert a > b; reverts if a <= b — original id: "core.assertGt" */
724
- readonly assertGt: (nodeId: string, args: CoreAssertGtArgs) => void;
725
- /** Assert a >= b; reverts if a < b — original id: "core.assertGte" */
726
- readonly assertGte: (nodeId: string, args: CoreAssertGteArgs) => void;
727
- /** Assert a < b; reverts if a >= b — original id: "core.assertLt" */
728
- readonly assertLt: (nodeId: string, args: CoreAssertLtArgs) => void;
729
- /** Assert a <= b; reverts if a > b — original id: "core.assertLte" */
730
- readonly assertLte: (nodeId: string, args: CoreAssertLteArgs) => void;
731
- /** Assert min <= value <= max; reverts if value is outside the range — original id: "core.assertInRange" */
732
- readonly assertInRange: (nodeId: string, args: CoreAssertInRangeArgs) => void;
733
- /** Approve an ERC20 spender for the given token and amount — original id: "core.approve" */
734
- readonly approve: (nodeId: string, args: CoreApproveArgs) => void;
735
- /** Read an ERC20 balance, producing a resource — original id: "core.balanceOf" */
736
- readonly balanceOf: (nodeId: string, args: CoreBalanceOfArgs) => CoreBalanceOfOutputs;
737
- /** Transfer tokens to a recipient address, optionally specifying a partial amount — original id: "core.transfer" */
738
- readonly transfer: (nodeId: string, args: CoreTransferArgs) => CoreTransferOutputs;
739
- /** 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" */
740
- readonly emitEvent1: (nodeId: string, args: CoreEmitEvent1Args) => void;
741
- /** 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" */
742
- readonly emitEvent2: (nodeId: string, args: CoreEmitEvent2Args) => void;
743
- /** 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" */
744
- readonly emitEvent3: (nodeId: string, args: CoreEmitEvent3Args) => void;
745
- /** 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" */
746
- readonly emitEvent4: (nodeId: string, args: CoreEmitEvent4Args) => void;
747
- /** Invoke a smart contract function, optionally spending a token resource — original id: "core.call" */
748
- readonly call: <TSig extends string>(nodeId: string, args: CoreCallArgs<TSig>) => CoreCallResult<TSig>;
749
- /** Read from a smart contract at runtime (StaticCall); result is fresh at execution time — original id: "core.staticCall" */
750
- readonly staticCall: <TSig extends string>(nodeId: string, args: CoreStaticCallArgs<TSig>) => StaticCallResult<TSig>;
751
- /** Invoke a contract with pre-encoded calldata — original id: "core.rawCall" */
752
- readonly rawCall: (nodeId: string, args: CoreRawCallArgs) => CoreRawCallOutputs;
753
- /** Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking — original id: "core.asResource" */
754
- readonly asResource: (nodeId: string, args: CoreAsResourceArgs) => CoreAsResourceOutputs;
755
- /** Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal — original id: "core.peek" */
756
- readonly peek: (nodeId: string, args: CorePeekArgs) => CorePeekOutputs;
757
- };
758
- readonly lifi: {
759
- /** Swap tokens via the LI.FI aggregator API — original id: "lifi.swap" */
760
- readonly swap: (nodeId: string, args: LifiSwapArgs) => LifiSwapOutputs;
761
- /** Bridge tokens to another chain via the LI.FI aggregator API — original id: "lifi.bridge" */
762
- readonly bridge: (nodeId: string, args: LifiBridgeArgs) => LifiBridgeOutputs;
763
- /** Route tokens into a DeFi protocol position via the edge catalog — original id: "lifi.zap" */
764
- readonly zap: (nodeId: string, args: LifiZapArgs) => LifiZapOutputs;
765
- /** Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles — original id: "lifi.zapAsync" */
766
- readonly zapAsync: (nodeId: string, args: LifiZapAsyncArgs) => LifiZapAsyncOutputs;
767
- };
768
- readonly invariant: {
769
- /** Assert that an account holds at least a minimum token balance — original id: "invariant.balanceAtLeast" */
770
- readonly balanceAtLeast: (nodeId: string, args: InvariantBalanceAtLeastArgs) => void;
771
- /** Assert that an account holds exactly an expected token balance — original id: "invariant.balanceEquals" */
772
- readonly balanceEquals: (nodeId: string, args: InvariantBalanceEqualsArgs) => void;
773
- /** Assert that an account holds at most a maximum token balance — original id: "invariant.balanceAtMost" */
774
- readonly balanceAtMost: (nodeId: string, args: InvariantBalanceAtMostArgs) => void;
775
- /** Assert that an account's token balance is between a minimum and a maximum (inclusive) — original id: "invariant.balanceInRange" */
776
- readonly balanceInRange: (nodeId: string, args: InvariantBalanceInRangeArgs) => void;
777
- /** Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner — original id: "invariant.allowanceAtLeast" */
778
- readonly allowanceAtLeast: (nodeId: string, args: InvariantAllowanceAtLeastArgs) => void;
779
- /** Assert that a spender's allowance on behalf of an owner exactly equals an expected amount — original id: "invariant.allowanceEquals" */
780
- readonly allowanceEquals: (nodeId: string, args: InvariantAllowanceEqualsArgs) => void;
781
- /** Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner — original id: "invariant.allowanceAtMost" */
782
- readonly allowanceAtMost: (nodeId: string, args: InvariantAllowanceAtMostArgs) => void;
783
- /** Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive) — original id: "invariant.allowanceInRange" */
784
- readonly allowanceInRange: (nodeId: string, args: InvariantAllowanceInRangeArgs) => void;
785
- /** Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation — original id: "invariant.numeric" */
786
- readonly numeric: (nodeId: string, args: InvariantNumericArgs) => void;
787
- /** Assert min <= value <= max against constant bounds; reverts if outside the range — original id: "invariant.numericInRange" */
788
- readonly numericInRange: (nodeId: string, args: InvariantNumericInRangeArgs) => void;
789
- /** Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation — original id: "invariant.gte" */
790
- readonly gte: (nodeId: string, args: InvariantGteArgs) => void;
791
- /** Assert a uint256 value is strictly greater than a constant threshold; reverts on violation — original id: "invariant.gt" */
792
- readonly gt: (nodeId: string, args: InvariantGtArgs) => void;
793
- /** Assert a uint256 value is less than or equal to a constant threshold; reverts on violation — original id: "invariant.lte" */
794
- readonly lte: (nodeId: string, args: InvariantLteArgs) => void;
795
- /** Assert a uint256 value is strictly less than a constant threshold; reverts on violation — original id: "invariant.lt" */
796
- readonly lt: (nodeId: string, args: InvariantLtArgs) => void;
797
- /** Assert a uint256 value equals a constant threshold; reverts on violation — original id: "invariant.eq" */
798
- readonly eq: (nodeId: string, args: InvariantEqArgs) => void;
799
- /** Assert a uint256 value does not equal a constant threshold; reverts on violation — original id: "invariant.neq" */
800
- readonly neq: (nodeId: string, args: InvariantNeqArgs) => void;
801
- };
802
- readonly aave: {
803
- /** Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource — original id: "aave.borrow" */
804
- readonly borrow: (nodeId: string, args: AaveBorrowArgs) => AaveBorrowOutputs;
805
- /** 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" */
806
- readonly repay: (nodeId: string, args: AaveRepayArgs) => AaveRepayOutputs;
807
- /** Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual — original id: "aave.repayWithATokens" */
808
- readonly repayWithATokens: (nodeId: string, args: AaveRepayWithATokensArgs) => AaveRepayWithATokensOutputs;
809
- /** 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" */
810
- readonly claimRewards: (nodeId: string, args: AaveClaimRewardsArgs) => AaveClaimRewardsOutputs;
811
- /** 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" */
812
- readonly setEMode: (nodeId: string, args: AaveSetEModeArgs) => void;
813
- /** 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" */
814
- readonly getHealthFactor: (nodeId: string, args: AaveGetHealthFactorArgs) => AaveGetHealthFactorOutputs;
815
- };
816
- readonly morphoBlue: {
817
- /** 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" */
818
- readonly supplyCollateral: (nodeId: string, args: MorphoBlueSupplyCollateralArgs) => void;
819
- /** 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" */
820
- readonly withdrawCollateral: (nodeId: string, args: MorphoBlueWithdrawCollateralArgs) => MorphoBlueWithdrawCollateralOutputs;
821
- /** 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" */
822
- readonly borrow: (nodeId: string, args: MorphoBlueBorrowArgs) => MorphoBlueBorrowOutputs;
823
- /** 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" */
824
- readonly repay: (nodeId: string, args: MorphoBlueRepayArgs) => MorphoBlueRepayOutputs;
825
- /** 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" */
826
- readonly supply: (nodeId: string, args: MorphoBlueSupplyArgs) => MorphoBlueSupplyOutputs;
827
- /** 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" */
828
- readonly withdraw: (nodeId: string, args: MorphoBlueWithdrawArgs) => MorphoBlueWithdrawOutputs;
829
- /** 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" */
830
- readonly getPosition: (nodeId: string, args: MorphoBlueGetPositionArgs) => MorphoBlueGetPositionOutputs;
831
- };
832
- readonly paraswap: {
833
- /** 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" */
834
- readonly buy: (nodeId: string, args: ParaswapBuyArgs) => ParaswapBuyOutputs;
835
- };
836
- readonly fly: {
837
- /** 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" */
838
- readonly swap: (nodeId: string, args: FlySwapArgs) => FlySwapOutputs;
839
- };
840
- readonly uniswapV2: {
841
- /** 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" */
842
- readonly addLiquidity: (nodeId: string, args: UniswapV2AddLiquidityArgs) => UniswapV2AddLiquidityOutputs;
843
- /** 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" */
844
- readonly removeLiquidity: (nodeId: string, args: UniswapV2RemoveLiquidityArgs) => UniswapV2RemoveLiquidityOutputs;
845
- };
846
- readonly uniswapV3: {
847
- /** 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" */
848
- readonly mint: (nodeId: string, args: UniswapV3MintArgs) => UniswapV3MintOutputs;
849
- /** 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" */
850
- readonly increaseLiquidity: (nodeId: string, args: UniswapV3IncreaseLiquidityArgs) => UniswapV3IncreaseLiquidityOutputs;
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
- export { type AaveBorrowArgs, type AaveBorrowOutputs, type AaveClaimRewardsArgs, type AaveClaimRewardsOutputs, type AaveGetHealthFactorArgs, type AaveGetHealthFactorOutputs, type AaveRepayArgs, type AaveRepayOutputs, type AaveRepayWithATokensArgs, type AaveRepayWithATokensOutputs, type AaveSetEModeArgs, type CoreAddArgs, type CoreAddOutputs, type CoreApproveArgs, type CoreAsResourceArgs, type CoreAsResourceOutputs, type CoreAssertEqualArgs, type CoreAssertGtArgs, type CoreAssertGteArgs, type CoreAssertInRangeArgs, type CoreAssertLtArgs, type CoreAssertLteArgs, type CoreAssertNotEqualArgs, type CoreBalanceOfArgs, type CoreBalanceOfOutputs, type CoreBpsDownArgs, type CoreBpsDownOutputs, type CoreBpsUpArgs, type CoreBpsUpOutputs, type CoreCallArgs, type CoreDivideDownArgs, type CoreDivideDownOutputs, type CoreDivideUpArgs, type CoreDivideUpOutputs, type CoreEmitEvent1Args, type CoreEmitEvent2Args, type CoreEmitEvent3Args, type CoreEmitEvent4Args, type CoreMergeArgs, type CoreMergeOutputs, type CoreMultiplyArgs, type CoreMultiplyOutputs, type CorePartitionArgs, type CorePartitionOutputs, type CorePeekArgs, type CorePeekOutputs, type CoreRawCallArgs, type CoreRawCallOutputs, type CoreSplitArgs, type CoreSplitOutputs, type CoreStaticCallArgs, type CoreSubtractArgs, type CoreSubtractOutputs, type CoreTransferArgs, type CoreTransferOutputs, type FlySwapArgs, type FlySwapOutputs, type GeneratedOps, type InvariantAllowanceAtLeastArgs, type InvariantAllowanceAtMostArgs, type InvariantAllowanceEqualsArgs, type InvariantAllowanceInRangeArgs, type InvariantBalanceAtLeastArgs, type InvariantBalanceAtMostArgs, type InvariantBalanceEqualsArgs, type InvariantBalanceInRangeArgs, type InvariantEqArgs, type InvariantGtArgs, type InvariantGteArgs, type InvariantLtArgs, type InvariantLteArgs, type InvariantNeqArgs, type InvariantNumericArgs, type InvariantNumericInRangeArgs, type LifiBridgeArgs, type LifiBridgeOutputs, type LifiSwapArgs, type LifiSwapOutputs, type LifiZapArgs, type LifiZapAsyncArgs, type LifiZapAsyncOutputs, type LifiZapOutputs, type MorphoBlueBorrowArgs, type MorphoBlueBorrowOutputs, type MorphoBlueGetPositionArgs, type MorphoBlueGetPositionOutputs, type MorphoBlueRepayArgs, type MorphoBlueRepayOutputs, type MorphoBlueSupplyArgs, type MorphoBlueSupplyCollateralArgs, type MorphoBlueSupplyOutputs, type MorphoBlueWithdrawArgs, type MorphoBlueWithdrawCollateralArgs, type MorphoBlueWithdrawCollateralOutputs, type MorphoBlueWithdrawOutputs, type ParaswapBuyArgs, type ParaswapBuyOutputs, type UniswapV2AddLiquidityArgs, type UniswapV2AddLiquidityOutputs, type UniswapV2RemoveLiquidityArgs, type UniswapV2RemoveLiquidityOutputs, type UniswapV3IncreaseLiquidityArgs, type UniswapV3IncreaseLiquidityOutputs, type UniswapV3MintArgs, type UniswapV3MintOutputs, bindGeneratedOps };
864
+ export declare const bindGeneratedOps: (builder: FlowBuilderInternal) => GeneratedOps;
865
+ //#endregion
866
+ //# sourceMappingURL=operations.generated.d.cts.map