@sly-rentals/core 3.0.0 → 4.0.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/api.json +4930 -4937
- package/dist/cjs/instructions/reserveRental.js +4 -4
- package/dist/cjs/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/utils/contractSnapshot.js +32 -21
- package/dist/cjs/utils/contractSnapshot.js.map +1 -1
- package/dist/cjs/utils/contractSnapshot.test.js +11 -15
- package/dist/cjs/utils/contractSnapshot.test.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/instructions/reserveRental.js +4 -4
- package/dist/esm/instructions/reserveRental.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/utils/contractSnapshot.js +32 -21
- package/dist/esm/utils/contractSnapshot.js.map +1 -1
- package/dist/esm/utils/contractSnapshot.test.js +11 -15
- package/dist/esm/utils/contractSnapshot.test.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/utils/bidMath.d.ts +27 -17
- package/dist/types/utils/bidMath.d.ts.map +1 -1
- package/dist/types/utils/contractSnapshot.d.ts +3 -2
- package/dist/types/utils/contractSnapshot.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -30,22 +30,32 @@ export declare function computeMinimumBid(args: {
|
|
|
30
30
|
closenessFraction: number;
|
|
31
31
|
}): bigint;
|
|
32
32
|
export type MinimumBid = {
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
/** Minimum bid a challenger paying in ATLAS must submit as `bidAtlas`
|
|
34
|
+
* to clear the floor. Same unit as the on-chain field — ATLAS is
|
|
35
|
+
* denominated in stardust (1 ATLAS = `stardustPerAtlas` stardust). */
|
|
36
|
+
atlas: bigint;
|
|
37
|
+
/** Minimum bid a challenger paying in POINTS must submit as `bidPoints`
|
|
38
|
+
* to clear the floor. Same unit as the on-chain field — points-dust
|
|
39
|
+
* (1 point = 1e8 dust). Rounded up so the result clears the floor
|
|
40
|
+
* exactly; straight integer division would underbid by one dust unit
|
|
41
|
+
* at non-multiple boundaries and fail the on-chain `>=` check. */
|
|
42
|
+
points: bigint;
|
|
43
|
+
/** The current queued-reservation holder's bid in raw on-chain units —
|
|
44
|
+
* the challenger needs to clear at least these levels (or whichever
|
|
45
|
+
* is higher between this and the contract rate) to take the slot.
|
|
46
|
+
* `null` when no reservation is queued (challenger faces only the
|
|
47
|
+
* contract rate). Mixed-currency bids populate both fields;
|
|
48
|
+
* single-currency bids leave the unused field at `0n`. Presence
|
|
49
|
+
* (`current !== null`) is the canonical "is there an incumbent to
|
|
50
|
+
* outbid" check. */
|
|
51
|
+
current: {
|
|
52
|
+
atlas: bigint;
|
|
53
|
+
points: bigint;
|
|
54
|
+
} | null;
|
|
55
|
+
/** Unix-second timestamp the floor was evaluated for — `Math.floor(
|
|
56
|
+
* Date.now() / 1000) + delaySeconds`, or `nowSeconds` when supplied.
|
|
57
|
+
* Consumers anchor against this rather than client wall-clock so
|
|
58
|
+
* time-projected floors line up with the moment the math was done. */
|
|
59
|
+
now: number;
|
|
50
60
|
};
|
|
51
61
|
//# sourceMappingURL=bidMath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bidMath.d.ts","sourceRoot":"","sources":["../../../src/utils/bidMath.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,MAAM,CAYT;AAED,MAAM,MAAM,UAAU,GAAG;IACvB
|
|
1
|
+
{"version":3,"file":"bidMath.d.ts","sourceRoot":"","sources":["../../../src/utils/bidMath.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,MAAM,CAYT;AAED,MAAM,MAAM,UAAU,GAAG;IACvB;;2EAEuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd;;;;uEAImE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;yBAOqB;IACrB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,IAAI,CAAC;IACT;;;2EAGuE;IACvE,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -49,8 +49,9 @@ export type ContractSnapshot = {
|
|
|
49
49
|
* ```ts
|
|
50
50
|
* const snap = await getContractSnapshot({ contractAddress: 'Abc...' });
|
|
51
51
|
* const rate = snap.contract.data.rate;
|
|
52
|
-
* const
|
|
53
|
-
* const
|
|
52
|
+
* const currentBid = snap.minimumBid.current?.atlas ?? 0n;
|
|
53
|
+
* const floorNowAtlas = snap.minimumBid.atlas;
|
|
54
|
+
* const floorNowPoints = snap.minimumBid.points;
|
|
54
55
|
*
|
|
55
56
|
* // Project the floor 4 hours forward without re-fetching:
|
|
56
57
|
* const floorLater = computeMinimumBidFromSnapshot(snap, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contractSnapshot.d.ts","sourceRoot":"","sources":["../../../src/utils/contractSnapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAM5E,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAI/D,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACpC,QAAQ,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACxC;8EAC0E;IAC1E,YAAY,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IACjD;8EAC0E;IAC1E,YAAY,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IACjD;;6EAEyE;IACzE,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"contractSnapshot.d.ts","sourceRoot":"","sources":["../../../src/utils/contractSnapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAM5E,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,WA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OAAO,GAAG,MAAM,CAAC;IAClC;oDACgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;+BAC2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;wDACoD;IACpD,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B,GAAG,OAAO,CAAC,UAAU,CAAC,CA2BtB"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "
|
|
1
|
+
export declare const VERSION = "4.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|