@lifi/composer-sdk 0.6.3 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/authoring/FlowBuilderCore.cjs +17 -4
- package/dist/authoring/FlowBuilderCore.cjs.map +1 -1
- package/dist/authoring/FlowBuilderCore.d.cts +12 -4
- package/dist/authoring/FlowBuilderCore.d.ts +12 -4
- package/dist/authoring/FlowBuilderCore.js +20 -4
- package/dist/authoring/FlowBuilderCore.js.map +1 -1
- package/dist/authoring/handles.cjs.map +1 -1
- package/dist/authoring/handles.d.cts +35 -1
- package/dist/authoring/handles.d.ts +35 -1
- package/dist/authoring/handles.js.map +1 -1
- package/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/dist/generated/config.generated.cjs.map +1 -1
- package/dist/generated/config.generated.d.cts +500 -6
- package/dist/generated/config.generated.d.ts +500 -6
- package/dist/generated/operations.generated.cjs +36 -1
- package/dist/generated/operations.generated.cjs.map +1 -1
- package/dist/generated/operations.generated.d.cts +101 -5
- package/dist/generated/operations.generated.d.ts +101 -5
- package/dist/generated/operations.generated.js +36 -1
- package/dist/generated/operations.generated.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/authoring/FlowBuilderCore.ts +59 -19
- package/src/authoring/handles.ts +67 -0
- package/src/examples/aaveBorrow.ts +129 -0
- package/src/examples/aaveHealthFactorExplode.ts +63 -0
- package/src/examples/morphoBlueBorrow.ts +94 -0
- package/src/examples/morphoBlueRepay.ts +133 -0
- package/src/examples/run.ts +30 -0
- package/src/examples/splitAndZap.ts +9 -8
- package/src/generated/config.generated.ts +516 -5
- package/src/generated/operations.generated.ts +211 -3
- package/src/index.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/generated/config.generated.ts"],"sourcesContent":["// AUTO-GENERATED from manifest.json — do not edit by hand.\n// Regenerate with: yarn workspace @lifi/composer-sdk generate\n\nimport type { Address, IntegerStringInput } from '../types.js';\n\n/**\n * a number between 0 and 10000\n */\nexport type Between010000 = number;\n\nexport interface CoreSplitConfig {\n bps: Between010000;\n}\n\n/**\n * a positive number\n */\nexport type Positive = number;\n/**\n * a string at most 64 character(s) long\n */\nexport type MaxLength64 = string;\n/**\n * an array of at most 50 item(s)\n *\n * @maxItems 50\n */\nexport type MaxItems50 = MaxLength64[];\n\nexport interface LifiSwapConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n token: Address;\n chainId: Positive;\n };\n slippage?: number;\n timing?: {\n swapStepTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n routeTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n };\n exchanges?: {\n allow?: MaxItems50;\n deny?: MaxItems50;\n prefer?: MaxItems50;\n };\n}\n\n/**\n * a string starting with \"0x\"\n */\nexport type StartsWith0X = string;\n/**\n * a number between 0 and 1\n */\nexport type Between01 = number;\n\nexport interface LifiBridgeConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n token: Address;\n chainId: Positive;\n };\n destination: StartsWith0X;\n slippage?: Between01;\n timing?: {\n swapStepTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n routeTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n };\n bridges?: {\n allow?: MaxItems50;\n deny?: MaxItems50;\n prefer?: MaxItems50;\n };\n exchanges?: {\n allow?: MaxItems50;\n deny?: MaxItems50;\n prefer?: MaxItems50;\n };\n order?: 'FASTEST' | 'CHEAPEST';\n}\n\nexport interface InvariantNumericConfig {\n op: 'gte' | 'gt' | 'lte' | 'lt' | 'eq' | 'neq';\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantNumericInRangeConfig {\n min: IntegerStringInput;\n max: IntegerStringInput;\n}\n\nexport interface InvariantGteConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantGtConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantLteConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantLtConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantEqConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantNeqConfig {\n threshold: IntegerStringInput;\n}\n\n/**\n * a non-negative number\n */\nexport type NonNegative = number;\n\nexport interface CoreBpsDownConfig {\n bps: NonNegative;\n}\n\nexport interface CoreBpsUpConfig {\n bps: NonNegative;\n}\n\nexport interface CoreApproveConfig {\n spender: Address;\n}\n\nexport interface CoreBalanceOfConfig {\n token: Address;\n owner?: Address;\n}\n\nexport interface CoreTransferConfig {\n amount?: IntegerStringInput;\n}\n\nexport interface CoreEmitEvent1Config {\n signature: string;\n}\n\nexport interface CoreEmitEvent2Config {\n signature: string;\n}\n\nexport interface CoreEmitEvent3Config {\n signature: string;\n}\n\nexport interface CoreEmitEvent4Config {\n signature: string;\n}\n\n/**\n * a string at most 65536 character(s) long\n */\nexport type MaxLength65536 = string;\n\nexport interface CoreCallConfig {\n target: Address;\n functionSignature: string;\n callType?: 'Call' | 'ValueCall';\n args?: (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )[]\n )[]\n )[]\n )[]\n )[]\n )[];\n approvals?: (\n | {\n spender: Address;\n }\n | {\n from: 'sender';\n }\n )[];\n}\n\nexport interface CoreStaticCallConfig {\n target: Address;\n functionSignature: string;\n args?: (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )[]\n )[]\n )[]\n )[]\n )[]\n )[];\n}\n\nexport interface CoreRawCallConfig {\n target: Address;\n calldata: string;\n callType?: 'Call' | 'StaticCall' | 'ValueCall' | 'DelegateCall';\n resultType?: string;\n}\n\nexport interface CoreInvokeConfig {\n target: Address;\n functionSignature: string;\n callType?: 'Call' | 'ValueCall';\n args?: (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )[]\n )[]\n )[]\n )[]\n )[]\n )[];\n}\n\nexport interface CoreAsResourceConfig {\n resource:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n token: Address;\n chainId: Positive;\n };\n}\n\nexport interface AaveBorrowConfig {\n pool: string;\n asset: string;\n variableDebtToken: string;\n amount: IntegerStringInput;\n referralId?: number;\n}\n\nexport type AaveRepayConfig =\n | {\n pool: string;\n mode: 'exact';\n }\n | {\n pool: string;\n mode: 'max';\n };\n\nexport interface AaveRepayWithATokensConfig {\n pool: string;\n asset: string;\n}\n\nexport interface AaveClaimRewardsConfig {\n rewardsController: string;\n assets: string[];\n reward: string;\n amount?: IntegerStringInput;\n to?: string;\n}\n\n/**\n * a number between 0 and 255\n */\nexport type Between0255 = number;\n\nexport interface AaveSetEModeConfig {\n pool: string;\n category: Between0255;\n}\n\nexport interface AaveGetHealthFactorConfig {\n pool: string;\n user?: string;\n}\n\nexport type MorphoBlueSupplyCollateralConfig =\n | (\n | {\n morpho?: string;\n onBehalfOf?: string;\n mode: 'exact';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n onBehalfOf?: string;\n mode: 'exact';\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n }\n )\n | (\n | {\n morpho?: string;\n onBehalfOf?: string;\n mode: 'all';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n onBehalfOf?: string;\n mode: 'all';\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n }\n );\n\nexport type MorphoBlueWithdrawCollateralConfig =\n | {\n morpho?: string;\n amount: IntegerStringInput;\n onBehalfOf?: string;\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n amount: IntegerStringInput;\n onBehalfOf?: string;\n receiver?: string;\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n };\n\nexport type MorphoBlueBorrowConfig =\n | {\n morpho?: string;\n amount: IntegerStringInput;\n onBehalfOf?: string;\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n amount: IntegerStringInput;\n onBehalfOf?: string;\n receiver?: string;\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n };\n\nexport type MorphoBlueRepayConfig =\n | (\n | {\n morpho?: string;\n mode: 'exact';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n mode: 'exact';\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n }\n )\n | (\n | {\n morpho?: string;\n mode: 'max';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n mode: 'max';\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n }\n );\n\nexport type MorphoBlueSupplyConfig =\n | {\n morpho?: string;\n onBehalfOf?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n onBehalfOf?: string;\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n };\n\nexport type MorphoBlueWithdrawConfig =\n | (\n | {\n morpho?: string;\n mode: 'exact';\n amount: IntegerStringInput;\n onBehalfOf?: string;\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n mode: 'exact';\n amount: IntegerStringInput;\n onBehalfOf?: string;\n receiver?: string;\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n }\n )\n | (\n | {\n morpho?: string;\n mode: 'max';\n onBehalfOf?: string;\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n mode: 'max';\n onBehalfOf?: string;\n receiver?: string;\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n }\n );\n\nexport type MorphoBlueGetPositionConfig =\n | {\n morpho?: string;\n user?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n morpho?: string;\n user?: string;\n marketParams: {\n loanToken: string;\n collateralToken: string;\n oracle: string;\n irm: string;\n lltv: string;\n };\n };\n\nexport interface LifiFlashloanRepayConfig {\n leg: string;\n fee?: string;\n}\n\nexport type ContinuationAssertReadyConfig =\n | {\n kind: 'erc20BalanceGte';\n chainId: Positive;\n token: StartsWith0X;\n owner: StartsWith0X;\n minAmount: string;\n }\n | {\n kind: 'nativeBalanceGte';\n chainId: Positive;\n owner: StartsWith0X;\n minAmount: string;\n }\n | {\n kind: 'call';\n chainId: Positive;\n to: StartsWith0X;\n calldata: StartsWith0X;\n comparator: 'gte' | 'eq' | 'lte';\n value: string;\n };\n\nexport interface LifiZapConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n token: Address;\n chainId: Positive;\n };\n}\n\nexport interface LifiZapAsyncConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n token: Address;\n chainId: Positive;\n };\n}\n\nexport interface ParaswapBuyConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n token: Address;\n chainId: Positive;\n };\n exactAmountOut: string;\n srcDecimals: NonNegative;\n destDecimals: NonNegative;\n maxSlippageBps?: Between010000;\n partner?: string;\n partnerAddress?: string;\n /**\n * Integrator fee in basis points; non-negative integer string capped at 9000.\n */\n partnerFeeBps?: string;\n}\n\nexport interface CorePeekConfig {\n target: Address;\n functionSignature: string;\n args?: string[];\n}\n\n/**\n * a number between 0 and 3318\n */\nexport type Between03318 = number;\n/**\n * a number between 0 and 5000\n */\nexport type Between05000 = number;\n\nexport interface FlySwapConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n token: Address;\n chainId: Positive;\n };\n inputVarianceBps?: Between03318;\n maxSlippageBps?: Between05000;\n}\n\nexport interface SlippageGuardConfig {\n port: string;\n bps: Between010000;\n}\n\nexport interface CoreNumericInvariantGuardConfig {\n port: string;\n op: 'gte' | 'gt' | 'lte' | 'lt' | 'eq' | 'neq';\n threshold: IntegerStringInput;\n}\n\nexport interface BalanceOfMaterialiserConfig {\n owner: Address;\n}\n\nexport type DirectDepositMaterialiserConfig =\n | {\n amount: IntegerStringInput;\n allowNonExact?: false;\n }\n | {\n amount: IntegerStringInput;\n allowNonExact: true;\n }\n | {\n allowNonExact: true;\n simAmount?: string;\n };\n\nexport interface CallMaterialiserConfig {\n target: Address;\n calldata: string;\n}\n\nexport interface FlashloanMaterialiserConfig {\n providerKind: 'aave-v3' | 'erc3156' | 'balancer-v2' | 'morpho-blue';\n amount: IntegerStringInput;\n}\n\nexport interface Erc20BalancePreconditionConfig {\n wallet: Address;\n token: Address;\n balance: IntegerStringInput;\n}\n\nexport interface NativeBalancePreconditionConfig {\n wallet: Address;\n balance: IntegerStringInput;\n}\n\nexport interface Erc20AllowancePreconditionConfig {\n owner: Address;\n spender: Address;\n token: Address;\n allowance: IntegerStringInput;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/generated/config.generated.ts"],"sourcesContent":["// AUTO-GENERATED from manifest.json — do not edit by hand.\n// Regenerate with: yarn workspace @lifi/composer-sdk generate\n\nimport type { Address, IntegerStringInput } from '../types.js';\n\n/**\n * a number between 0 and 10000\n */\nexport type Between010000 = number;\n\nexport interface CoreSplitConfig {\n bps: Between010000;\n}\n\n/**\n * an array of at most 16 item(s)\n *\n * @minItems 2\n * @maxItems 16\n */\nexport type MaxItems16 =\n | [Between19999, Between19999]\n | [Between19999, Between19999, Between19999]\n | [Between19999, Between19999, Between19999, Between19999]\n | [Between19999, Between19999, Between19999, Between19999, Between19999]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ]\n | [\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n Between19999,\n ];\n/**\n * a number between 1 and 9999\n */\nexport type Between19999 = number;\n\nexport interface CorePartitionConfig {\n bps: MaxItems16;\n}\n\n/**\n * a positive number\n */\nexport type Positive = number;\n/**\n * a string at most 64 character(s) long\n */\nexport type MaxLength64 = string;\n/**\n * an array of at most 50 item(s)\n *\n * @maxItems 50\n */\nexport type MaxItems50 = MaxLength64[];\n\nexport interface LifiSwapConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n chainId: Positive;\n };\n slippage?: number;\n timing?: {\n swapStepTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n routeTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n };\n exchanges?: {\n allow?: MaxItems50;\n deny?: MaxItems50;\n prefer?: MaxItems50;\n };\n}\n\n/**\n * a string starting with \"0x\"\n */\nexport type StartsWith0X = string;\n/**\n * a number between 0 and 1\n */\nexport type Between01 = number;\n\nexport interface LifiBridgeConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n chainId: Positive;\n };\n destination: StartsWith0X;\n slippage?: Between01;\n timing?: {\n swapStepTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n routeTimingStrategies?: {\n strategy: 'minWaitTime';\n minWaitTimeMs: number;\n startingExpectedResults: number;\n reduceEveryMs: number;\n }[];\n };\n bridges?: {\n allow?: MaxItems50;\n deny?: MaxItems50;\n prefer?: MaxItems50;\n };\n exchanges?: {\n allow?: MaxItems50;\n deny?: MaxItems50;\n prefer?: MaxItems50;\n };\n order?: 'FASTEST' | 'CHEAPEST';\n}\n\nexport interface InvariantNumericConfig {\n op: 'gte' | 'gt' | 'lte' | 'lt' | 'eq' | 'neq';\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantNumericInRangeConfig {\n min: IntegerStringInput;\n max: IntegerStringInput;\n}\n\nexport interface InvariantGteConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantGtConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantLteConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantLtConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantEqConfig {\n threshold: IntegerStringInput;\n}\n\nexport interface InvariantNeqConfig {\n threshold: IntegerStringInput;\n}\n\n/**\n * a non-negative number\n */\nexport type NonNegative = number;\n\nexport interface CoreBpsDownConfig {\n bps: NonNegative;\n}\n\nexport interface CoreBpsUpConfig {\n bps: NonNegative;\n}\n\nexport interface CoreApproveConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n spender: Address;\n}\n\nexport interface CoreBalanceOfConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n owner?: Address;\n}\n\nexport interface CoreTransferConfig {\n amount?: IntegerStringInput;\n}\n\nexport interface CoreEmitEvent1Config {\n signature: string;\n}\n\nexport interface CoreEmitEvent2Config {\n signature: string;\n}\n\nexport interface CoreEmitEvent3Config {\n signature: string;\n}\n\nexport interface CoreEmitEvent4Config {\n signature: string;\n}\n\n/**\n * a string at most 65536 character(s) long\n */\nexport type MaxLength65536 = string;\n\nexport interface CoreCallConfig {\n target: Address;\n functionSignature: string;\n callType?: 'Call' | 'ValueCall';\n args?: (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )[]\n )[]\n )[]\n )[]\n )[]\n )[];\n approvals?: (\n | {\n spender: Address;\n }\n | {\n from: 'sender';\n }\n )[];\n}\n\nexport interface CoreStaticCallConfig {\n target: Address;\n functionSignature: string;\n args?: (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )[]\n )[]\n )[]\n )[]\n )[]\n )[];\n}\n\nexport interface CoreRawCallConfig {\n target: Address;\n calldata: string;\n callType?: 'Call' | 'StaticCall' | 'ValueCall' | 'DelegateCall';\n resultType?: string;\n}\n\nexport interface CoreInvokeConfig {\n target: Address;\n functionSignature: string;\n callType?: 'Call' | 'ValueCall';\n args?: (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )\n | (\n | MaxLength65536\n | number\n | boolean\n | {\n $ref: string;\n }\n )[]\n )[]\n )[]\n )[]\n )[]\n )[];\n}\n\nexport interface CoreAsResourceConfig {\n resource:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n chainId: Positive;\n };\n}\n\nexport interface AaveBorrowConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n pool: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n asset: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n variableDebtToken: string;\n amount: IntegerStringInput;\n referralId?: number;\n}\n\nexport type AaveRepayConfig =\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n pool: string;\n mode: 'exact';\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n pool: string;\n mode: 'max';\n };\n\nexport interface AaveRepayWithATokensConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n pool: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n asset: string;\n}\n\nexport interface AaveClaimRewardsConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n rewardsController: string;\n assets: string[];\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n reward: string;\n amount?: IntegerStringInput;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n to?: string;\n}\n\n/**\n * a number between 0 and 255\n */\nexport type Between0255 = number;\n\nexport interface AaveSetEModeConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n pool: string;\n category: Between0255;\n}\n\nexport interface AaveGetHealthFactorConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n pool: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n user?: string;\n}\n\nexport type MorphoBlueSupplyCollateralConfig =\n | (\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n mode: 'exact';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n mode: 'exact';\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n }\n )\n | (\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n mode: 'all';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n mode: 'all';\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n }\n );\n\nexport type MorphoBlueWithdrawCollateralConfig =\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n amount: IntegerStringInput;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n amount: IntegerStringInput;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n };\n\nexport type MorphoBlueBorrowConfig =\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n amount: IntegerStringInput;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n amount: IntegerStringInput;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n };\n\nexport type MorphoBlueRepayConfig =\n | (\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'exact';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'exact';\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n }\n )\n | (\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'max';\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'max';\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n }\n );\n\nexport type MorphoBlueSupplyConfig =\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n };\n\nexport type MorphoBlueWithdrawConfig =\n | (\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'exact';\n amount: IntegerStringInput;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'exact';\n amount: IntegerStringInput;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n }\n )\n | (\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'max';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n mode: 'max';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n onBehalfOf?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n receiver?: string;\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n }\n );\n\nexport type MorphoBlueGetPositionConfig =\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n user?: string;\n /**\n * a string matching the pattern ^0x[0-9a-fA-F]{64}$\n */\n marketId: string;\n }\n | {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n morpho?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n user?: string;\n marketParams: {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n loanToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n collateralToken: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n oracle: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n irm: string;\n lltv: string;\n };\n };\n\nexport interface LifiFlashloanRepayConfig {\n leg: string;\n fee?: string;\n}\n\nexport type ContinuationAssertReadyConfig =\n | {\n kind: 'erc20BalanceGte';\n chainId: Positive;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n owner: Address;\n minAmount: string;\n }\n | {\n kind: 'nativeBalanceGte';\n chainId: Positive;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n owner: Address;\n minAmount: string;\n }\n | {\n kind: 'call';\n chainId: Positive;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n to: string;\n /**\n * Hex bytes: 0x followed by an even number of hex characters\n */\n calldata: string;\n comparator: 'gte' | 'eq' | 'lte';\n value: string;\n };\n\nexport interface LifiZapConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n chainId: Positive;\n };\n}\n\nexport interface LifiZapAsyncConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n chainId: Positive;\n };\n}\n\nexport interface ParaswapBuyConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n chainId: Positive;\n };\n exactAmountOut: string;\n srcDecimals: NonNegative;\n destDecimals: NonNegative;\n maxSlippageBps?: Between010000;\n partner?: string;\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n partnerAddress?: string;\n /**\n * Integrator fee in basis points; non-negative integer string capped at 9000.\n */\n partnerFeeBps?: string;\n}\n\nexport interface CorePeekConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n target: Address;\n functionSignature: string;\n args?: string[];\n}\n\n/**\n * a number between 0 and 3318\n */\nexport type Between03318 = number;\n/**\n * a number between 0 and 5000\n */\nexport type Between05000 = number;\n\nexport interface FlySwapConfig {\n resourceOut:\n | {\n kind: 'native';\n chainId: Positive;\n }\n | {\n kind: 'erc20';\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n token: Address;\n chainId: Positive;\n };\n inputVarianceBps?: Between03318;\n maxSlippageBps?: Between05000;\n}\n\nexport interface SlippageGuardConfig {\n port: string;\n bps: Between010000;\n}\n\nexport interface CoreNumericInvariantGuardConfig {\n port: string;\n op: 'gte' | 'gt' | 'lte' | 'lt' | 'eq' | 'neq';\n threshold: IntegerStringInput;\n}\n\nexport interface BalanceOfMaterialiserConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n owner: Address;\n}\n\nexport type DirectDepositMaterialiserConfig =\n | {\n amount: IntegerStringInput;\n allowNonExact?: false;\n }\n | {\n amount: IntegerStringInput;\n allowNonExact: true;\n }\n | {\n allowNonExact: true;\n simAmount?: string;\n };\n\nexport interface CallMaterialiserConfig {\n /**\n * EVM address: 0x followed by 40 hex characters\n */\n target: Address;\n calldata: string;\n}\n\nexport interface FlashloanMaterialiserConfig {\n providerKind: 'aave-v3' | 'erc3156' | 'balancer-v2' | 'morpho-blue';\n amount: IntegerStringInput;\n}\n\nexport interface Erc20BalancePreconditionConfig {\n wallet: Address;\n token: Address;\n balance: IntegerStringInput;\n}\n\nexport interface NativeBalancePreconditionConfig {\n wallet: Address;\n balance: IntegerStringInput;\n}\n\nexport interface Erc20AllowancePreconditionConfig {\n owner: Address;\n spender: Address;\n token: Address;\n allowance: IntegerStringInput;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|