{"success":true,"data":{"manifestVersion":1,"manifestHash":"b0204d3eaa9f3317986cc9df08d6e0a604e527b08897647a20ea941f3a7febef","flowSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["version","id","chainId","inputs","nodes"],"properties":{"version":{"type":"number","enum":[1]},"id":{"type":"string"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0},"inputs":{"type":"array","items":{"anyOf":[{"type":"object","required":["name","resource"],"properties":{"name":{"type":"string"},"resource":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]}},"additionalProperties":false},{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["uint8","uint16","uint32","uint64","uint128","uint256","int128","int256","address","bool","bytes","bytes4","bytes32","string"]}},"additionalProperties":false}]}},"nodes":{"type":"array","items":{"type":"object","required":["id","op"],"properties":{"id":{"type":"string"},"op":{"type":"string"},"bind":{"type":"object","required":[],"properties":{},"additionalProperties":{"anyOf":[{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["kind","value"],"properties":{"kind":{"type":"string","enum":["uint8","uint16","uint32","uint64","uint128","uint256","int128","int256","address","bool","bytes","bytes4","bytes32","string"]},"value":{"type":"string"}},"additionalProperties":false}]}},"config":{"type":"object","required":[],"properties":{},"additionalProperties":{"$id":"/schemas/unknown","title":"unknown"}},"guards":{"type":"array","items":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string"}},"additionalProperties":{"$id":"/schemas/unknown","title":"unknown"}}}},"additionalProperties":false}},"lineage":{"type":"object","required":["journeyId","parentRequestId"],"properties":{"journeyId":{"type":"string","description":"a string matching the pattern ^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$","pattern":"^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"},"parentRequestId":{"type":"string","description":"a string matching the pattern ^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$","pattern":"^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"}},"additionalProperties":false},"epilogue":{"type":"object","required":[],"properties":{"forwards":{"type":"array","minItems":1,"items":{"type":"object","required":["resource","to"],"properties":{"resource":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]},"to":{"anyOf":[{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]}},"additionalProperties":false}},"remainder":{"anyOf":[{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]}},"additionalProperties":false}},"additionalProperties":false},"operations":[{"id":"core.split","inputs":[{"kind":"resource","name":"source","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"a","mode":"linear"},{"kind":"resource_output","name":"b","mode":"linear"}],"description":"Split a resource into two outputs by basis-point ratio. Output `a` receives `bps` of the source, rounded up, and `b` takes the remainder.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["bps"],"properties":{"bps":{"type":"integer","description":"a number between 0 and 10000","title":"between(0, 10000)","minimum":0,"maximum":10000}},"additionalProperties":false}},{"id":"core.splitAt","inputs":[{"kind":"resource","name":"source","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"head","mode":"linear"},{"kind":"resource_output","name":"tail","mode":"linear","omitIfZero":true}],"description":"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`.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["amount"],"properties":{"amount":{"type":"string"}},"additionalProperties":false}},{"id":"core.partition","inputs":[{"kind":"resource","name":"source","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"parts","mode":"linear","countFrom":"bps"}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["bps"],"properties":{"bps":{"type":"array","items":{"type":"integer","description":"a number between 1 and 9999","title":"between(1, 9999)","minimum":1,"maximum":9999},"description":"an array of at most 16 item(s)","title":"maxItems(16)","minItems":2,"maxItems":16}},"additionalProperties":false}},{"id":"core.merge","inputs":[{"kind":"resource","name":"a","accepts":"any","mode":"linear"},{"kind":"resource","name":"b","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"merged","mode":"linear"}],"description":"Merge two same-token resources into one by addition"},{"id":"lifi.swap","inputs":[{"kind":"resource","name":"amountIn","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"amountOut","mode":"linear","providesMinimum":true},{"kind":"resource_output","name":"unspentIn","mode":"linear","omitIfZero":true}],"description":"Swap tokens via the LI.FI aggregator API","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resourceOut"],"properties":{"resourceOut":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]},"slippage":{"type":"number","description":"a number between 0 and 1","title":"between(0, 1)","minimum":0,"maximum":1},"timing":{"type":"object","required":[],"properties":{"swapStepTimingStrategies":{"type":"array","items":{"type":"object","required":["strategy","minWaitTimeMs","startingExpectedResults","reduceEveryMs"],"properties":{"strategy":{"type":"string","enum":["minWaitTime"]},"minWaitTimeMs":{"type":"number"},"startingExpectedResults":{"type":"number"},"reduceEveryMs":{"type":"number"}},"additionalProperties":false}},"routeTimingStrategies":{"type":"array","items":{"type":"object","required":["strategy","minWaitTimeMs","startingExpectedResults","reduceEveryMs"],"properties":{"strategy":{"type":"string","enum":["minWaitTime"]},"minWaitTimeMs":{"type":"number"},"startingExpectedResults":{"type":"number"},"reduceEveryMs":{"type":"number"}},"additionalProperties":false}}},"additionalProperties":false},"exchanges":{"type":"object","required":[],"properties":{"allow":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50},"deny":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50},"prefer":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50}},"additionalProperties":false}},"additionalProperties":false}},{"id":"lifi.bridge","inputs":[{"kind":"resource","name":"amountIn","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"amountOut","mode":"linear","availability":"future","providesMinimum":true},{"kind":"resource_output","name":"unspentIn","mode":"linear","omitIfZero":true}],"description":"Bridge tokens to another chain via the LI.FI aggregator API","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resourceOut"],"properties":{"resourceOut":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]},"destination":{"type":"string","description":"a string starting with \"0x\"","title":"startsWith(\"0x\")","pattern":"^0x"},"slippage":{"type":"number","description":"a number between 0 and 1","title":"between(0, 1)","minimum":0,"maximum":1},"timing":{"type":"object","required":[],"properties":{"swapStepTimingStrategies":{"type":"array","items":{"type":"object","required":["strategy","minWaitTimeMs","startingExpectedResults","reduceEveryMs"],"properties":{"strategy":{"type":"string","enum":["minWaitTime"]},"minWaitTimeMs":{"type":"number"},"startingExpectedResults":{"type":"number"},"reduceEveryMs":{"type":"number"}},"additionalProperties":false}},"routeTimingStrategies":{"type":"array","items":{"type":"object","required":["strategy","minWaitTimeMs","startingExpectedResults","reduceEveryMs"],"properties":{"strategy":{"type":"string","enum":["minWaitTime"]},"minWaitTimeMs":{"type":"number"},"startingExpectedResults":{"type":"number"},"reduceEveryMs":{"type":"number"}},"additionalProperties":false}}},"additionalProperties":false},"bridges":{"type":"object","required":[],"properties":{"allow":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50},"deny":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50},"prefer":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50}},"additionalProperties":false},"exchanges":{"type":"object","required":[],"properties":{"allow":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50},"deny":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50},"prefer":{"type":"array","items":{"type":"string","description":"a string at most 64 character(s) long","title":"maxLength(64)","maxLength":64},"description":"an array of at most 50 item(s)","title":"maxItems(50)","maxItems":50}},"additionalProperties":false},"order":{"type":"string","enum":["FASTEST","CHEAPEST"]}},"additionalProperties":false}},{"id":"invariant.balanceAtLeast","inputs":[{"kind":"resource","name":"minimumAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"account","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that an account holds at least a minimum token balance"},{"id":"invariant.balanceEquals","inputs":[{"kind":"resource","name":"expectedAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"account","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that an account holds exactly an expected token balance"},{"id":"invariant.balanceAtMost","inputs":[{"kind":"resource","name":"maximumAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"account","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that an account holds at most a maximum token balance"},{"id":"invariant.balanceInRange","inputs":[{"kind":"resource","name":"minimumAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"maximumAmount","type":"uint256","mode":"copy"},{"kind":"handle","name":"account","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that an account's token balance is between a minimum and a maximum (inclusive)"},{"id":"invariant.allowanceAtLeast","inputs":[{"kind":"resource","name":"minimumAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"owner","type":"address","mode":"copy"},{"kind":"handle","name":"spender","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that a spender is permitted to move at least a minimum allowance on behalf of an owner"},{"id":"invariant.allowanceEquals","inputs":[{"kind":"resource","name":"expectedAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"owner","type":"address","mode":"copy"},{"kind":"handle","name":"spender","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that a spender's allowance on behalf of an owner exactly equals an expected amount"},{"id":"invariant.allowanceAtMost","inputs":[{"kind":"resource","name":"maximumAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"owner","type":"address","mode":"copy"},{"kind":"handle","name":"spender","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that a spender is permitted to move at most a maximum allowance on behalf of an owner"},{"id":"invariant.allowanceInRange","inputs":[{"kind":"resource","name":"minimumAmount","accepts":"erc20","mode":"copy"},{"kind":"handle","name":"maximumAmount","type":"uint256","mode":"copy"},{"kind":"handle","name":"owner","type":"address","mode":"copy"},{"kind":"handle","name":"spender","type":"address","mode":"copy"}],"outputs":[],"description":"Assert that a spender's allowance on behalf of an owner is between a minimum and a maximum (inclusive)"},{"id":"invariant.numeric","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a uint256 value satisfies a comparison against a constant threshold; reverts on violation","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["op","threshold"],"properties":{"op":{"type":"string","enum":["gte","gt","lte","lt","eq","neq"]},"threshold":{"type":"string"}},"additionalProperties":false}},{"id":"invariant.numericInRange","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert min <= value <= max against constant bounds; reverts if outside the range","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["min","max"],"properties":{"min":{"type":"string"},"max":{"type":"string"}},"additionalProperties":false}},{"id":"invariant.gte","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a uint256 value is greater than or equal to a constant threshold; reverts on violation","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["threshold"],"properties":{"threshold":{"type":"string"}},"additionalProperties":false}},{"id":"invariant.gt","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a uint256 value is strictly greater than a constant threshold; reverts on violation","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["threshold"],"properties":{"threshold":{"type":"string"}},"additionalProperties":false}},{"id":"invariant.lte","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a uint256 value is less than or equal to a constant threshold; reverts on violation","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["threshold"],"properties":{"threshold":{"type":"string"}},"additionalProperties":false}},{"id":"invariant.lt","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a uint256 value is strictly less than a constant threshold; reverts on violation","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["threshold"],"properties":{"threshold":{"type":"string"}},"additionalProperties":false}},{"id":"invariant.eq","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a uint256 value equals a constant threshold; reverts on violation","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["threshold"],"properties":{"threshold":{"type":"string"}},"additionalProperties":false}},{"id":"invariant.neq","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a uint256 value does not equal a constant threshold; reverts on violation","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["threshold"],"properties":{"threshold":{"type":"string"}},"additionalProperties":false}},{"id":"core.add","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Add two unsigned integers (a + b)"},{"id":"core.subtract","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Subtract b from a (a - b); reverts on underflow"},{"id":"core.multiply","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Multiply two unsigned integers (a * b)"},{"id":"core.divideDown","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Divide a by b, rounding toward zero"},{"id":"core.divideUp","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Divide a by b, rounding away from zero"},{"id":"core.bpsDown","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Multiply value by basis points and divide by 10000, rounding down","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["bps"],"properties":{"bps":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0}},"additionalProperties":false}},{"id":"core.bpsUp","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Multiply value by basis points and divide by 10000, rounding up","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["bps"],"properties":{"bps":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0}},"additionalProperties":false}},{"id":"core.assertEqual","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a == b; reverts if not equal"},{"id":"core.assertNotEqual","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a != b; reverts if equal"},{"id":"core.assertGt","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a > b; reverts if a <= b"},{"id":"core.assertGte","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a >= b; reverts if a < b"},{"id":"core.assertLt","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a < b; reverts if a >= b"},{"id":"core.assertLte","inputs":[{"kind":"handle","name":"a","type":"uint256","mode":"copy"},{"kind":"handle","name":"b","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert a <= b; reverts if a > b"},{"id":"core.assertInRange","inputs":[{"kind":"handle","name":"value","type":"uint256","mode":"copy"},{"kind":"handle","name":"min","type":"uint256","mode":"copy"},{"kind":"handle","name":"max","type":"uint256","mode":"copy"}],"outputs":[],"description":"Assert min <= value <= max; reverts if value is outside the range"},{"id":"core.approve","inputs":[{"kind":"resource","name":"amount","accepts":"erc20","mode":"copy"}],"outputs":[],"description":"Approve an ERC20 spender for the given token and amount","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["spender"],"properties":{"spender":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"core.balanceOf","inputs":[],"outputs":[{"kind":"resource_output","name":"balance","mode":"linear"}],"description":"Read an ERC20 balance, producing a resource","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["token"],"properties":{"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"owner":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"core.transfer","inputs":[{"kind":"resource","name":"amount","accepts":"any","mode":"linear"},{"kind":"handle","name":"recipient","type":"address","mode":"copy"}],"outputs":[{"kind":"resource_output","name":"transferred","mode":"linear","deliveryAddressInput":"recipient"}],"description":"Transfer the whole input resource to a recipient address. To send part of a resource, split it first with `core.split` or `core.splitAt`.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":[],"properties":{},"additionalProperties":false}},{"id":"core.emitEvent1","inputs":[{"kind":"handle","name":"value0","type":"bytes32","mode":"copy"}],"outputs":[],"description":"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).","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["signature"],"properties":{"signature":{"type":"string"}},"additionalProperties":false}},{"id":"core.emitEvent2","inputs":[{"kind":"handle","name":"value0","type":"bytes32","mode":"copy"},{"kind":"handle","name":"value1","type":"bytes32","mode":"copy"}],"outputs":[],"description":"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).","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["signature"],"properties":{"signature":{"type":"string"}},"additionalProperties":false}},{"id":"core.emitEvent3","inputs":[{"kind":"handle","name":"value0","type":"bytes32","mode":"copy"},{"kind":"handle","name":"value1","type":"bytes32","mode":"copy"},{"kind":"handle","name":"value2","type":"bytes32","mode":"copy"}],"outputs":[],"description":"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).","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["signature"],"properties":{"signature":{"type":"string"}},"additionalProperties":false}},{"id":"core.emitEvent4","inputs":[{"kind":"handle","name":"value0","type":"bytes32","mode":"copy"},{"kind":"handle","name":"value1","type":"bytes32","mode":"copy"},{"kind":"handle","name":"value2","type":"bytes32","mode":"copy"},{"kind":"handle","name":"value3","type":"bytes32","mode":"copy"}],"outputs":[],"description":"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).","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["signature"],"properties":{"signature":{"type":"string"}},"additionalProperties":false}},{"id":"core.call","inputs":[{"kind":"resource","name":"input","accepts":"any","mode":"linear"}],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy","optional":true}],"description":"Invoke a smart contract function, optionally spending a token resource","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["target","functionSignature"],"properties":{"target":{"type":"string"},"functionSignature":{"type":"string"},"callType":{"type":"string","enum":["Call","ValueCall"]},"args":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]}}]}}]}}]}}]}}]}},"approvals":{"type":"array","items":{"anyOf":[{"type":"object","required":["spender"],"properties":{"spender":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["from"],"properties":{"from":{"type":"string","enum":["sender"]}},"additionalProperties":false}]}}},"additionalProperties":false}},{"id":"core.staticCall","inputs":[],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Read from a smart contract at runtime (StaticCall); result is fresh at execution time","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["target","functionSignature"],"properties":{"target":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]}}]}}]}}]}}]}}]}}},"additionalProperties":false}},{"id":"core.rawCall","inputs":[],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy","optional":true}],"description":"Invoke a contract with pre-encoded calldata","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["target","calldata"],"properties":{"target":{"type":"string"},"calldata":{"type":"string"},"callType":{"type":"string","enum":["Call","StaticCall","ValueCall","DelegateCall"]},"resultType":{"type":"string"}},"additionalProperties":false}},{"id":"core.invoke","inputs":[],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy","optional":true}],"description":"Invoke a smart contract function without consuming a token resource","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["target","functionSignature"],"properties":{"target":{"type":"string"},"functionSignature":{"type":"string"},"callType":{"type":"string","enum":["Call","ValueCall"]},"args":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"number"},{"type":"boolean"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]}}]}}]}}]}}]}}]}}},"additionalProperties":false}},{"id":"core.asResource","inputs":[{"kind":"handle","name":"handle","type":"uint256","mode":"copy"}],"outputs":[{"kind":"resource_output","name":"resource","mode":"linear"}],"description":"Graduate a raw handle to a resource, enabling slippage surfacing and linearity tracking","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resource"],"properties":{"resource":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]}},"additionalProperties":false}},{"id":"aave.borrow","inputs":[],"outputs":[{"kind":"resource_output","name":"borrowed","mode":"linear","providesMinimum":true},{"kind":"handle","name":"debtBalance","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"}],"description":"Borrow an asset from an Aave v3 pool against existing collateral, exposing the borrowed asset as a Resource","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["pool","asset","variableDebtToken","amount"],"properties":{"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"asset":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"variableDebtToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string"},"referralId":{"type":"number"}},"additionalProperties":false}},{"id":"aave.repay","inputs":[{"kind":"resource","name":"assetIn","accepts":"erc20","mode":"linear"},{"kind":"handle","name":"onBehalfOf","type":"address","mode":"copy"}],"outputs":[{"kind":"handle","name":"actualRepaid","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"},{"kind":"resource_output","name":"residual","mode":"linear","omitIfZero":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["pool","mode"],"properties":{"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]}},"additionalProperties":false},{"type":"object","required":["pool","mode"],"properties":{"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["max"]}},"additionalProperties":false}]}},{"id":"aave.repayWithATokens","inputs":[{"kind":"resource","name":"aTokenIn","accepts":"erc20","mode":"linear"}],"outputs":[{"kind":"handle","name":"actualRepaid","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"},{"kind":"resource_output","name":"residual","mode":"linear","omitIfZero":true}],"description":"Repay an Aave v3 variable-rate debt by burning the caller's aToken balance, returning any unspent residual","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["pool","asset"],"properties":{"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"asset":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"aave.claimRewards","inputs":[],"outputs":[{"kind":"resource_output","name":"claimed","mode":"linear","providesMinimum":true},{"kind":"handle","name":"claimedAmount","type":"uint256","mode":"copy"}],"description":"Claim a specific Aave v3 incentives reward token against a set of receipt-token positions, exposing the claimed amount as a Resource","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["rewardsController","assets","reward"],"properties":{"rewardsController":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"assets":{"type":"array","items":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"reward":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string"},"to":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"aave.setEMode","inputs":[],"outputs":[],"description":"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. Not allowed inside a continuation leg: the category is keyed to the executing proxy.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["pool","category"],"properties":{"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"category":{"type":"integer","description":"a number between 0 and 255","title":"between(0, 255)","minimum":0,"maximum":255}},"additionalProperties":false}},{"id":"aave.getHealthFactor","inputs":[],"outputs":[{"kind":"handle","name":"healthFactor","type":"uint256","mode":"copy"}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["pool"],"properties":{"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"user":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"morphoBlue.supplyCollateral","inputs":[{"kind":"resource","name":"assetIn","accepts":"erc20","mode":"linear"}],"outputs":[],"description":"Deposit the collateral asset of a Morpho Blue market on behalf of onBehalfOf, or of the execution proxy when it is omitted; a continuation leg must set onBehalfOf. 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).","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"anyOf":[{"type":"object","required":["mode","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["mode","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]},{"anyOf":[{"type":"object","required":["mode","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["all"]},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["mode","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["all"]},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]}]}},{"id":"morphoBlue.withdrawCollateral","inputs":[],"outputs":[{"kind":"resource_output","name":"withdrawn","mode":"linear","providesMinimum":true},{"kind":"handle","name":"collateralWithdrawn","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"}],"description":"Withdraw collateral from a Morpho Blue market position to the receiver address. Exposes the withdrawn ERC20 amount as a Resource output.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["amount","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["amount","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]}},{"id":"morphoBlue.borrow","inputs":[],"outputs":[{"kind":"resource_output","name":"borrowed","mode":"linear","providesMinimum":true},{"kind":"handle","name":"assetsBorrowed","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"},{"kind":"handle","name":"sharesBorrowed","type":"uint256","mode":"copy","expose":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["amount","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["amount","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]}},{"id":"morphoBlue.repay","inputs":[{"kind":"resource","name":"assetIn","accepts":"erc20","mode":"linear"},{"kind":"handle","name":"onBehalfOf","type":"address","mode":"copy"}],"outputs":[{"kind":"handle","name":"actualRepaid","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"},{"kind":"handle","name":"sharesRepaid","type":"uint256","mode":"copy","expose":true},{"kind":"resource_output","name":"residual","mode":"linear","omitIfZero":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"anyOf":[{"type":"object","required":["mode","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["mode","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]},{"anyOf":[{"type":"object","required":["mode","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["max"]},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["mode","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["max"]},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]}]}},{"id":"morphoBlue.supply","inputs":[{"kind":"resource","name":"assetIn","accepts":"erc20","mode":"linear"}],"outputs":[{"kind":"handle","name":"assetsSupplied","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"},{"kind":"handle","name":"sharesSupplied","type":"uint256","mode":"copy","expose":true},{"kind":"resource_output","name":"residual","mode":"linear","omitIfZero":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]}},{"id":"morphoBlue.withdraw","inputs":[],"outputs":[{"kind":"resource_output","name":"withdrawn","mode":"linear","providesMinimum":true},{"kind":"handle","name":"assetsWithdrawn","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"},{"kind":"handle","name":"sharesWithdrawn","type":"uint256","mode":"copy","expose":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"anyOf":[{"type":"object","required":["mode","amount","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]},"amount":{"type":"string"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["mode","amount","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]},"amount":{"type":"string"},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]},{"anyOf":[{"type":"object","required":["mode","marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["max"]},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["mode","marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["max"]},"onBehalfOf":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"receiver":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]}]}},{"id":"morphoBlue.getPosition","inputs":[],"outputs":[{"kind":"handle","name":"supplyShares","type":"uint256","mode":"copy","expose":true},{"kind":"handle","name":"borrowShares","type":"uint128","mode":"copy","expose":true},{"kind":"handle","name":"collateral","type":"uint128","mode":"copy","expose":true}],"description":"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).","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["marketId"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"user":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketId":{"type":"string","description":"a string matching the pattern ^0x[0-9a-fA-F]{64}$","pattern":"^0x[0-9a-fA-F]{64}$"}},"additionalProperties":false},{"type":"object","required":["marketParams"],"properties":{"morpho":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"user":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"marketParams":{"type":"object","required":["loanToken","collateralToken","oracle","irm","lltv"],"properties":{"loanToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"collateralToken":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"oracle":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"irm":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"lltv":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}]}},{"id":"continuation.commitment","inputs":[],"outputs":[],"description":"Carries a committed continuation thunk as node metadata for the settlement echo; emits no IR1"},{"id":"lifi.zap","inputs":[{"kind":"resource","name":"amountIn","accepts":"any","mode":"linear"},{"kind":"handle","name":"recipient","type":"address","mode":"copy","optional":true}],"outputs":[{"kind":"resource_output","name":"amountOut","mode":"linear","deliveryAddressInput":"recipient"}],"description":"Route tokens into a DeFi protocol position via the edge catalog","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resourceOut"],"properties":{"resourceOut":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]}},"additionalProperties":false}},{"id":"lifi.zapAsync","inputs":[{"kind":"resource","name":"amountIn","accepts":"any","mode":"linear"},{"kind":"handle","name":"recipient","type":"address","mode":"copy","optional":false}],"outputs":[{"kind":"resource_output","name":"amountOut","mode":"linear","availability":"future"}],"description":"Route tokens into a DeFi protocol position whose output becomes available after the initiating transaction settles","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resourceOut"],"properties":{"resourceOut":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]}},"additionalProperties":false}},{"id":"paraswap.buy","inputs":[{"kind":"resource","name":"amountIn","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"amountOut","mode":"linear","providesMinimum":true},{"kind":"resource_output","name":"unspentIn","mode":"linear","omitIfZero":true}],"description":"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`.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resourceOut","exactAmountOut","srcDecimals","destDecimals"],"properties":{"resourceOut":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]},"exactAmountOut":{"type":"string"},"srcDecimals":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"destDecimals":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"maxSlippageBps":{"type":"integer","description":"a number between 0 and 10000","title":"between(0, 10000)","minimum":0,"maximum":10000},"partner":{"type":"string"},"partnerAddress":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"partnerFeeBps":{"type":"string","description":"Paraswap partner fee in basis points; non-negative integer string capped at 9000."}},"additionalProperties":false}},{"id":"core.peek","inputs":[],"outputs":[{"kind":"handle","name":"result","type":"uint256","mode":"copy"}],"description":"Read a smart contract value at compile time (off-chain eth_call); result is baked as a literal","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["target","functionSignature"],"properties":{"target":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"array","items":{"anyOf":[{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536},{"type":"array","items":{"type":"string","description":"a string at most 65536 character(s) long","title":"maxLength(65536)","maxLength":65536}}]}}]}}]}}]}}]}}},"additionalProperties":false}},{"id":"fly.swap","inputs":[{"kind":"resource","name":"amountIn","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"amountOut","mode":"linear","providesMinimum":true},{"kind":"resource_output","name":"unspentIn","mode":"linear","omitIfZero":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resourceOut"],"properties":{"resourceOut":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]},"inputVarianceBps":{"type":"integer","description":"a number between 0 and 3318","title":"between(0, 3318)","minimum":0,"maximum":3318},"maxSlippageBps":{"type":"integer","description":"a number between 0 and 5000","title":"between(0, 5000)","minimum":0,"maximum":5000}},"additionalProperties":false}},{"id":"continuation.settle","inputs":[{"kind":"resource","name":"input","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"outcomes","mode":"linear","availability":"future","providesMinimum":true,"countFrom":"outcomes"}],"description":"Fund a deferred settlement and commit to its future outcomes; output outcomes.i reports config.outcomes[i]","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["outcomes","validity"],"properties":{"outcomes":{"type":"array","items":{"type":"object","required":["token","destination","chainId"],"properties":{"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"minAmount":{"type":"string"},"destination":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}},"continuationFlow":{"type":"object","required":["version","id","chainId","inputs","nodes"],"properties":{"version":{"type":"number","enum":[1]},"id":{"type":"string"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0},"inputs":{"type":"array","items":{"anyOf":[{"type":"object","required":["name","resource"],"properties":{"name":{"type":"string"},"resource":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]}},"additionalProperties":false},{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["uint8","uint16","uint32","uint64","uint128","uint256","int128","int256","address","bool","bytes","bytes4","bytes32","string"]}},"additionalProperties":false}]}},"nodes":{"type":"array","items":{"type":"object","required":["id","op"],"properties":{"id":{"type":"string"},"op":{"type":"string"},"bind":{"type":"object","required":[],"properties":{},"additionalProperties":{"anyOf":[{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["kind","value"],"properties":{"kind":{"type":"string","enum":["uint8","uint16","uint32","uint64","uint128","uint256","int128","int256","address","bool","bytes","bytes4","bytes32","string"]},"value":{"type":"string"}},"additionalProperties":false}]}},"config":{"type":"object","required":[],"properties":{},"additionalProperties":{"$id":"/schemas/unknown","title":"unknown"}},"guards":{"type":"array","items":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string"}},"additionalProperties":{"$id":"/schemas/unknown","title":"unknown"}}}},"additionalProperties":false}},"lineage":{"type":"object","required":["journeyId","parentRequestId"],"properties":{"journeyId":{"type":"string","description":"a string matching the pattern ^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$","pattern":"^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"},"parentRequestId":{"type":"string","description":"a string matching the pattern ^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$","pattern":"^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"}},"additionalProperties":false},"epilogue":{"type":"object","required":[],"properties":{"forwards":{"type":"array","minItems":1,"items":{"type":"object","required":["resource","to"],"properties":{"resource":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]},"to":{"anyOf":[{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]}},"additionalProperties":false}},"remainder":{"anyOf":[{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},{"type":"object","required":["$ref"],"properties":{"$ref":{"type":"string"}},"additionalProperties":false}]}},"additionalProperties":false}},"additionalProperties":false},"validity":{"type":"object","required":["expiresAtMs"],"properties":{"expiresAtMs":{"type":"integer","description":"a number between -8640000000000000 and 8640000000000000","title":"between(-8640000000000000, 8640000000000000)","minimum":-8640000000000000,"maximum":8640000000000000}},"additionalProperties":false},"provider":{"type":"string"},"funding":{"type":"string","enum":["inline","external"]},"refund":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"exact":{"type":"boolean"}},"additionalProperties":false}},{"id":"uniswapV2.addLiquidity","inputs":[{"kind":"resource","name":"tokenA","accepts":"erc20","mode":"linear"},{"kind":"resource","name":"tokenB","accepts":"erc20","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"liquidity","mode":"linear"},{"kind":"resource_output","name":"residualA","mode":"linear","omitIfZero":true},{"kind":"resource_output","name":"residualB","mode":"linear","omitIfZero":true},{"kind":"handle","name":"poolPrice","type":"uint256","mode":"copy","expose":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["router","factory","pair"],"properties":{"router":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"factory":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"pair":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"uniswapV2.removeLiquidity","inputs":[{"kind":"resource","name":"liquidity","accepts":"erc20","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"tokenA","mode":"linear"},{"kind":"resource_output","name":"tokenB","mode":"linear"}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["router","factory","tokenA","tokenB"],"properties":{"router":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"factory":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"tokenA":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"tokenB":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"uniswapV3.mint","inputs":[{"kind":"resource","name":"tokenA","accepts":"erc20","mode":"linear"},{"kind":"resource","name":"tokenB","accepts":"erc20","mode":"linear"},{"kind":"handle","name":"recipient","type":"address","mode":"copy","optional":false}],"outputs":[{"kind":"handle","name":"tokenId","type":"uint256","mode":"copy","expose":true},{"kind":"handle","name":"liquidity","type":"uint256","mode":"copy","expose":true},{"kind":"handle","name":"sqrtPriceX96","type":"uint256","mode":"copy","expose":true},{"kind":"resource_output","name":"residualA","mode":"linear","omitIfZero":true},{"kind":"resource_output","name":"residualB","mode":"linear","omitIfZero":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["positionManager","factory","pool","fee","tickLower","tickUpper"],"properties":{"positionManager":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"factory":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"fee":{"type":"integer","description":"a number between 0 and 999999","title":"between(0, 999999)","minimum":0,"maximum":999999},"tickLower":{"type":"integer","description":"a number between -887272 and 887272","title":"between(-887272, 887272)","minimum":-887272,"maximum":887272},"tickUpper":{"type":"integer","description":"a number between -887272 and 887272","title":"between(-887272, 887272)","minimum":-887272,"maximum":887272}},"additionalProperties":false}},{"id":"uniswapV3.increaseLiquidity","inputs":[{"kind":"resource","name":"tokenA","accepts":"erc20","mode":"linear"},{"kind":"resource","name":"tokenB","accepts":"erc20","mode":"linear"},{"kind":"handle","name":"owner","type":"address","mode":"copy","optional":false}],"outputs":[{"kind":"handle","name":"liquidity","type":"uint256","mode":"copy","expose":true},{"kind":"handle","name":"sqrtPriceX96","type":"uint256","mode":"copy","expose":true},{"kind":"resource_output","name":"residualA","mode":"linear","omitIfZero":true},{"kind":"resource_output","name":"residualB","mode":"linear","omitIfZero":true}],"description":"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.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["positionManager","factory","pool","tokenId"],"properties":{"positionManager":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"factory":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"pool":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"tokenId":{"type":"string"}},"additionalProperties":false}},{"id":"aaveV4.supply","inputs":[{"kind":"resource","name":"assetIn","accepts":"erc20","mode":"linear"}],"outputs":[],"description":"Supply the input token into an Aave v4 spoke reserve on behalf of the execution proxy, without enabling it as collateral (use aaveV4.supplyCollateral or aaveV4.setUsingAsCollateral for that). The input must be the reserve's underlying token; the spoke pulls it, so the approval goes to the spoke. Exposes no resource output: the supplied position is spoke accounting state, not a token.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["spoke","reserveId"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0}},"additionalProperties":false}},{"id":"aaveV4.supplyCollateral","inputs":[{"kind":"resource","name":"assetIn","accepts":"erc20","mode":"linear"}],"outputs":[],"description":"Supply the input token into an Aave v4 spoke reserve on behalf of the execution proxy and enable the reserve as collateral: supply, then setUsingAsCollateral(reserveId, true). Enabling is idempotent, so a reserve already used as collateral is fine. The input must be the reserve's underlying token; the spoke pulls it, so the approval goes to the spoke. Exposes no resource output: the collateral is spoke accounting state, not a token.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["spoke","reserveId"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0}},"additionalProperties":false}},{"id":"aaveV4.setUsingAsCollateral","inputs":[],"outputs":[],"description":"Enable (usingAsCollateral: true) or disable (false) an Aave v4 spoke reserve as collateral for the execution proxy's position. Enabling is idempotent and runs no health-factor check.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["spoke","reserveId","usingAsCollateral"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"usingAsCollateral":{"type":"boolean"}},"additionalProperties":false}},{"id":"aaveV4.borrow","inputs":[],"outputs":[{"kind":"resource_output","name":"borrowed","mode":"linear","providesMinimum":true},{"kind":"handle","name":"debtBalance","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"}],"description":"Borrow `amount` of `asset` from an Aave v4 spoke reserve against the execution proxy's collateral, exposing the borrowed asset as a Resource and the position's total debt on the reserve (drawn plus premium) as `debtBalance`. Asserts on chain that the reserve's underlying is `asset`. v4 liquidates at the same collateral factor that caps borrowing, so a maximum borrow is immediately liquidatable: guard the result with aaveV4.getHealthFactor and core.numericInvariant.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["spoke","reserveId","asset","amount"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"asset":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string"}},"additionalProperties":false}},{"id":"aaveV4.getHealthFactor","inputs":[],"outputs":[{"kind":"handle","name":"healthFactor","type":"uint256","mode":"copy"}],"description":"Read a position's current Aave v4 health factor on a spoke (WAD-scaled, 1e18; type(uint256).max with no debt) from Spoke.getUserAccountData. Exposes it as a uint256 handle for core.numericInvariant. v4 liquidates at the collateral factor that caps borrowing, so assert a buffer above 1e18 after a borrow.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["spoke"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"user":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"id":"aaveV4.repay","inputs":[{"kind":"resource","name":"assetIn","accepts":"erc20","mode":"linear"}],"outputs":[{"kind":"handle","name":"actualRepaid","type":"uint256","mode":"copy","expose":true,"units":"token-decimals"},{"kind":"resource_output","name":"residual","mode":"linear","omitIfZero":true}],"description":"Repay the execution proxy's debt on an Aave v4 spoke reserve with the input token, which must be the reserve's underlying. mode: 'exact' repays the input amount; mode: 'max' passes type(uint256).max so the spoke repays the whole drawn plus premium debt. Either way the spoke caps the repayment at the debt and pulls at most the input amount, so 'max' reverts when the input does not cover the debt. actualRepaid is the amount the spoke returns; residual is the unspent input.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["spoke","reserveId","mode"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"mode":{"type":"string","enum":["exact"]}},"additionalProperties":false},{"type":"object","required":["spoke","reserveId","mode"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"mode":{"type":"string","enum":["max"]}},"additionalProperties":false}]}},{"id":"aaveV4.withdraw","inputs":[],"outputs":[{"kind":"resource_output","name":"withdrawn","mode":"linear","providesMinimum":true}],"description":"Withdraw `asset` from the execution proxy's supply position on an Aave v4 spoke reserve, exposing the withdrawn amount as a Resource. mode: 'exact' withdraws `amount`; mode: 'max' passes type(uint256).max to withdraw the whole balance. The spoke caps either at the supplied balance and returns the amount it sent, which is the output. Asserts on chain that the reserve's underlying is `asset`. When the reserve is collateral, the spoke reverts if the withdrawal leaves the health factor below 1, so repay the debt first.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["spoke","reserveId","asset","mode","amount"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"asset":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["exact"]},"amount":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["spoke","reserveId","asset","mode"],"properties":{"spoke":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"reserveId":{"type":"integer","description":"a non-negative number","title":"nonNegative","minimum":0},"asset":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"mode":{"type":"string","enum":["max"]}},"additionalProperties":false}]}},{"id":"lifiIntents.order","inputs":[{"kind":"resource","name":"amountIn","accepts":"any","mode":"linear"}],"outputs":[{"kind":"resource_output","name":"amountOut","mode":"linear","availability":"future","providesMinimum":true},{"kind":"resource_output","name":"unspentIn","mode":"linear","omitIfZero":true}],"description":"Swap or bridge tokens through a LI.FI Intents order a solver fills","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["resourceOut"],"properties":{"resourceOut":{"anyOf":[{"type":"object","required":["kind","chainId"],"properties":{"kind":{"type":"string","enum":["native"]},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false},{"type":"object","required":["kind","token","chainId"],"properties":{"kind":{"type":"string","enum":["erc20"]},"token":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"type":"integer","description":"a positive number","title":"positive","exclusiveMinimum":0}},"additionalProperties":false}]},"destination":{"type":"string","description":"a string starting with \"0x\"","title":"startsWith(\"0x\")","pattern":"^0x"},"slippage":{"type":"number","description":"a number less than 1","title":"lessThan(1)","minimum":0,"exclusiveMaximum":1},"validitySeconds":{"type":"integer","description":"a number between 1 and 300","title":"between(1, 300)","minimum":1,"maximum":300},"exclusiveSeconds":{"type":"integer","description":"a number between 0 and 120","title":"between(0, 120)","minimum":0,"maximum":120},"exactAmountOut":{"type":"string"}},"additionalProperties":false}},{"id":"lifiIntents.refund","inputs":[],"outputs":[],"description":"Refund a LI.FI Intents escrow order after its expiry. Anyone may call; the escrow pays the order's user. Only an order the order server reports before delivery (status Open or Signed) is refunded.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["orderId"],"properties":{"orderId":{"type":"string","description":"The order id: lifiIntents.order's delivery.trackingId, or topic1 of the escrow's Open log","pattern":"^0x[0-9a-f]{64}$"}},"additionalProperties":false}},{"id":"lifiIntents.attestNonFill","inputs":[],"outputs":[],"description":"Step 1 of the early refund of a cross-chain LI.FI Intents order: on the order's output chain, after its fill deadline, record that the output was not filled. Keep the transaction hash for lifiIntents.refundOnNonFill.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["orderId"],"properties":{"orderId":{"type":"string","description":"The order id: lifiIntents.order's delivery.trackingId, or topic1 of the escrow's Open log","pattern":"^0x[0-9a-f]{64}$"}},"additionalProperties":false}},{"id":"lifiIntents.refundOnNonFill","inputs":[],"outputs":[],"description":"Step 2 of the early refund of a cross-chain LI.FI Intents order: on the order's input chain, prove the non-fill attestation through Polymer and refund the order's user. A resolution_error means the proof is not ready yet; retry.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["orderId","attestationTxHash"],"properties":{"orderId":{"type":"string","description":"The order id: lifiIntents.order's delivery.trackingId, or topic1 of the escrow's Open log","pattern":"^0x[0-9a-f]{64}$"},"attestationTxHash":{"type":"string","description":"The output-chain transaction of lifiIntents.attestNonFill","pattern":"^0x[0-9a-f]{64}$"}},"additionalProperties":false}}],"guards":[{"kind":"slippage","description":"Assert that output amounts are within a slippage tolerance in basis points","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["port","bps"],"properties":{"port":{"type":"string"},"bps":{"type":"integer","description":"a number between 0 and 10000","title":"between(0, 10000)","minimum":0,"maximum":10000}},"additionalProperties":false},"compatibility":{"selectors":[{"binding":"target","source":"outputs","match":{"kind":["resource_output","handle"]},"selection":{"kind":"config","configKey":"port","cardinality":"one"}}]}},{"kind":"core.numericInvariant","description":"Assert a numeric (uint256) handle output of the target op satisfies a comparison against a constant threshold. Emits one IR1 binary invariant; reverts the run on violation.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["port","op","threshold"],"properties":{"port":{"type":"string"},"op":{"type":"string","enum":["gte","gt","lte","lt","eq","neq"]},"threshold":{"type":"string"}},"additionalProperties":false},"compatibility":{"selectors":[{"binding":"target","source":"outputs","match":{"kind":["handle"]},"selection":{"kind":"config","configKey":"port","cardinality":"one"}}]}},{"kind":"band","description":"Assert that an output stays within a tolerance in basis points of its simulated value, in both directions","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["port","bps"],"properties":{"port":{"type":"string"},"bps":{"type":"integer","description":"a number between 0 and 10000","title":"between(0, 10000)","minimum":0,"maximum":10000}},"additionalProperties":false},"compatibility":{"selectors":[{"binding":"target","source":"outputs","match":{"kind":["resource_output","handle"]},"selection":{"kind":"config","configKey":"port","cardinality":"one"}}]}},{"kind":"minAmount","description":"Require a resource output to carry at least `amount`. Emits one on-chain assertGreaterThanEqual. The compile fails with validation_error and a shortfall when the minimum the flow guarantees at the port is below `amount`, and with a simulation revert when the port has no guaranteed minimum and its simulated amount is below `amount`.","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["port","amount"],"properties":{"port":{"type":"string"},"amount":{"type":"string"}},"additionalProperties":false},"compatibility":{"selectors":[{"binding":"target","source":"outputs","match":{"kind":["resource_output"]},"selection":{"kind":"config","configKey":"port","cardinality":"one"}}]}}],"materialisers":[{"kind":"balanceOf","accepts":"resource","description":"Read the on-chain token balance of an address as the input amount","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["owner"],"properties":{"owner":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"}},"additionalProperties":false}},{"kind":"directDeposit","accepts":"resource","description":"Deposit tokens into the VM — native via msg.value, ERC-20 via transferFrom","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","anyOf":[{"type":"object","required":["amount"],"properties":{"amount":{"type":"string"},"allowNonExact":{"type":"boolean","enum":[false]}},"additionalProperties":false},{"type":"object","required":["amount","allowNonExact"],"properties":{"amount":{"type":"string"},"allowNonExact":{"type":"boolean","enum":[true]}},"additionalProperties":false},{"type":"object","required":["allowNonExact"],"properties":{"allowNonExact":{"type":"boolean","enum":[true]},"simAmount":{"type":"string"},"minAmount":{"type":"string"}},"additionalProperties":false}]}},{"kind":"call","accepts":"resource","description":"Execute an arbitrary contract call and measure the resulting token balance diff","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["target","calldata"],"properties":{"target":{"type":"string","description":"EVM address: 0x followed by 40 hex characters","pattern":"^0x[0-9a-fA-F]{40}$"},"calldata":{"type":"string"}},"additionalProperties":false}}],"routing":{"maxRouteHops":2,"swapHops":"head"},"preconditions":[{"type":"Erc20Balance","description":"Assert that a wallet holds at least a given ERC-20 token balance","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["wallet","token","balance"],"properties":{"wallet":{"type":"string"},"token":{"type":"string"},"balance":{"type":"string"}},"additionalProperties":false}},{"type":"NativeBalance","description":"Assert that a wallet holds at least a given native coin balance","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["wallet","balance"],"properties":{"wallet":{"type":"string"},"balance":{"type":"string"}},"additionalProperties":false}},{"type":"Erc20Allowance","description":"Assert that an ERC-20 allowance is at least a given amount","configSchema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","required":["owner","spender","token","allowance"],"properties":{"owner":{"type":"string"},"spender":{"type":"string"},"token":{"type":"string"},"allowance":{"type":"string"}},"additionalProperties":false}}]}}