UNPKG

@lifi/composer-sdk

Version:

Public Composer SDK for building and submitting flows

20 lines (16 loc) 1.01 kB
import { TypedGuard } from './types.js'; import { CoreNumericInvariantGuardConfig, SlippageGuardConfig } from './generated/config.generated.js'; /** Assert that output amounts are within a slippage tolerance in basis points */ declare const slippage: <P extends string>(config: Omit<SlippageGuardConfig, "port"> & { port: P; }) => TypedGuard<P>; /** 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. */ declare const coreNumericInvariant: <P extends string>(config: Omit<CoreNumericInvariantGuardConfig, "port"> & { port: P; }) => TypedGuard<P>; declare const guardsMod_coreNumericInvariant: typeof coreNumericInvariant; declare const guardsMod_slippage: typeof slippage; declare namespace guardsMod { export { guardsMod_coreNumericInvariant as coreNumericInvariant, guardsMod_slippage as slippage }; } export { coreNumericInvariant as c, guardsMod as g, slippage as s };