UNPKG

@lifi/composer-sdk

Version:

Public Composer SDK for building and submitting flows

31 lines (30 loc) • 1.42 kB
import { __exportAll } from "../_virtual/_rolldown/runtime.js"; // src/generated/guards.generated.ts var guards_generated_exports = /* @__PURE__ */ __exportAll({ band: () => band, coreNumericInvariant: () => coreNumericInvariant, minAmount: () => minAmount, slippage: () => slippage }); /** Assert that output amounts are within a slippage tolerance in basis points */ const slippage = (config) => ({ kind: "slippage", ...config }); /** 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. */ const coreNumericInvariant = (config) => ({ kind: "core.numericInvariant", ...config }); /** Assert that an output stays within a tolerance in basis points of its simulated value, in both directions */ const band = (config) => ({ kind: "band", ...config }); /** 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`. */ const minAmount = (config) => ({ kind: "minAmount", ...config }); export { band, coreNumericInvariant, guards_generated_exports, minAmount, slippage }; //# sourceMappingURL=guards.generated.js.map