@lifi/compose-spec 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1019 -1095
- package/dist/index.d.cts +1664 -1700
- package/dist/index.d.ts +1664 -1700
- package/dist/index.js +926 -989
- package/package.json +3 -3
- package/src/continuation.ts +4 -3
- package/src/output.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/compose-spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Public wire-format types and schemas for Compose flows",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "yarn check:types &&
|
|
32
|
+
"build": "yarn check:types && tsdown",
|
|
33
33
|
"check:types": "tsc --noEmit",
|
|
34
34
|
"clean": "rm -rf dist out",
|
|
35
35
|
"pack:local": "yarn build && mkdir -p out && yarn pack --out 'out/%s-%v.tgz'",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
55
55
|
"eslint-plugin-import": "^2.22.0",
|
|
56
56
|
"eslint-plugin-require-extensions": "^0.1.3",
|
|
57
|
-
"
|
|
57
|
+
"tsdown": "^0.23.0",
|
|
58
58
|
"typescript": "^6.0.3",
|
|
59
59
|
"vitest": "^3.2.4"
|
|
60
60
|
},
|
package/src/continuation.ts
CHANGED
|
@@ -255,9 +255,10 @@ export const decodeNativeBalanceGte = <C extends NativeBalanceGteLike>(
|
|
|
255
255
|
//
|
|
256
256
|
// - `erc20BalanceDeltaGte` / `nativeBalanceDeltaGte` — `owner`'s post-fill
|
|
257
257
|
// balance of `token` (native) on `chainId` must exceed its pre-fill balance
|
|
258
|
-
// by at least `minDelta`.
|
|
259
|
-
//
|
|
260
|
-
//
|
|
258
|
+
// by at least `minDelta`. The settlement validator already checks each
|
|
259
|
+
// committed outcome's floor itself, so the derivation lowers neither kind
|
|
260
|
+
// into a program and rejects them as an authored invariant; they stay in
|
|
261
|
+
// the vocabulary so a descriptor that carries one still decodes.
|
|
261
262
|
export const Erc20BalanceDeltaGteSpecSchema = Schema.Struct({
|
|
262
263
|
kind: Schema.Literal('erc20BalanceDeltaGte'),
|
|
263
264
|
chainId: ChainIdSchema,
|
package/src/output.ts
CHANGED
|
@@ -7,10 +7,13 @@ import type { Resource } from './resource.js';
|
|
|
7
7
|
// declares `omitIfZero` and the simulation measured it at zero. `estimate` is
|
|
8
8
|
// the measured value when the simulation observed the port, otherwise the
|
|
9
9
|
// prepared op's quote, otherwise absent. `minimum` is the enforced floor: the
|
|
10
|
-
// larger of a guard floor and an op floor when either exists
|
|
11
|
-
//
|
|
12
|
-
// `providesMinimum` (`declared`), else
|
|
13
|
-
//
|
|
10
|
+
// larger of a guard floor and an op floor when either exists, tagged `guard`
|
|
11
|
+
// only when the guard floor is strictly larger (`op` on a tie), else the
|
|
12
|
+
// estimate echoed when the port declares `providesMinimum` (`declared`), else
|
|
13
|
+
// absent. A port behind pure ops carries the floor those ops pass on from the
|
|
14
|
+
// enforced floors and declared input amounts upstream, tagged by the same
|
|
15
|
+
// rule. There is no zero placeholder; an absent `minimum` means no floor is
|
|
16
|
+
// known.
|
|
14
17
|
|
|
15
18
|
export type EstimateBasis = 'simulated' | 'quoted';
|
|
16
19
|
|