UNPKG

@lifi/composer-sdk

Version:

Public Composer SDK for building and submitting flows

1 lines 1.22 kB
{"version":3,"sources":["../../src/generated/guards.generated.ts"],"sourcesContent":["// AUTO-GENERATED from manifest.json — do not edit by hand.\n// Regenerate with: yarn workspace @lifi/composer-sdk generate\n\nimport type { TypedGuard } from '../types.js';\n\nimport type {\n CoreNumericInvariantGuardConfig,\n SlippageGuardConfig,\n} from './config.generated.js';\n\n/** Assert that output amounts are within a slippage tolerance in basis points */\nexport const slippage = <P extends string>(\n config: Omit<SlippageGuardConfig, 'port'> & { port: P },\n): TypedGuard<P> => ({\n kind: 'slippage',\n ...config,\n});\n\n/** 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. */\nexport const coreNumericInvariant = <P extends string>(\n config: Omit<CoreNumericInvariantGuardConfig, 'port'> & { port: P },\n): TypedGuard<P> => ({\n kind: 'core.numericInvariant',\n ...config,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,MAAM,WAAW,CACtB,YACmB;AAAA,EACnB,MAAM;AAAA,EACN,GAAG;AACL;AAGO,MAAM,uBAAuB,CAClC,YACmB;AAAA,EACnB,MAAM;AAAA,EACN,GAAG;AACL;","names":[]}