@lifi/composer-sdk
Version:
Public Composer SDK for building and submitting flows
40 lines (39 loc) • 1.67 kB
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
// src/generated/guards.generated.ts
var guards_generated_exports = /* @__PURE__ */ require("../_virtual/_rolldown/runtime.cjs").__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
});
exports.band = band;
exports.coreNumericInvariant = coreNumericInvariant;
Object.defineProperty(exports, "guards_generated_exports", {
enumerable: true,
get: function() {
return guards_generated_exports;
}
});
exports.minAmount = minAmount;
exports.slippage = slippage;
//# sourceMappingURL=guards.generated.cjs.map