@sly-rentals/core 1.1.2 → 2.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 +12242 -9231
- package/dist/cjs/calculator/ContestTimeline.js +396 -0
- package/dist/cjs/calculator/ContestTimeline.js.map +1 -0
- package/dist/cjs/calculator/MinBidChart.js +419 -0
- package/dist/cjs/calculator/MinBidChart.js.map +1 -0
- package/dist/cjs/calculator/dom.js +39 -0
- package/dist/cjs/calculator/dom.js.map +1 -0
- package/dist/cjs/calculator/emitter.js +36 -0
- package/dist/cjs/calculator/emitter.js.map +1 -0
- package/dist/cjs/calculator/index.js +20 -0
- package/dist/cjs/calculator/index.js.map +1 -0
- package/dist/cjs/cost/constants.js +54 -5
- package/dist/cjs/cost/constants.js.map +1 -1
- package/dist/cjs/cost/estimate.js +7 -4
- package/dist/cjs/cost/estimate.js.map +1 -1
- package/dist/cjs/cost/estimate.test.js +16 -4
- package/dist/cjs/cost/estimate.test.js.map +1 -1
- package/dist/cjs/cost/index.js +32 -17
- package/dist/cjs/cost/index.js.map +1 -1
- package/dist/cjs/cost/sizes.js +20 -3
- package/dist/cjs/cost/sizes.js.map +1 -1
- package/dist/cjs/instructions/acceptRental.js +39 -53
- package/dist/cjs/instructions/acceptRental.js.map +1 -1
- package/dist/cjs/instructions/closeContract.js +18 -50
- package/dist/cjs/instructions/closeContract.js.map +1 -1
- package/dist/cjs/instructions/closeRental.js +19 -15
- package/dist/cjs/instructions/closeRental.js.map +1 -1
- package/dist/cjs/instructions/createContract.js +2 -4
- package/dist/cjs/instructions/createContract.js.map +1 -1
- package/dist/cjs/instructions/createContractThread.js +1 -2
- package/dist/cjs/instructions/createContractThread.js.map +1 -1
- package/dist/cjs/instructions/index.js +65 -42
- package/dist/cjs/instructions/index.js.map +1 -1
- package/dist/cjs/instructions/reserveRental.js +34 -46
- package/dist/cjs/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/kit/index.js +5 -27
- package/dist/cjs/kit/index.js.map +1 -1
- package/dist/cjs/legacy/index.js +6 -3
- package/dist/cjs/legacy/index.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/react/ContestTimeline.js +59 -0
- package/dist/cjs/react/ContestTimeline.js.map +1 -0
- package/dist/cjs/react/MinBidChart.js +34 -0
- package/dist/cjs/react/MinBidChart.js.map +1 -0
- package/dist/cjs/react/index.js +18 -0
- package/dist/cjs/react/index.js.map +1 -0
- package/dist/cjs/utils/bidMath.js +6 -115
- package/dist/cjs/utils/bidMath.js.map +1 -1
- package/dist/cjs/utils/contestChain.js +199 -0
- package/dist/cjs/utils/contestChain.js.map +1 -0
- package/dist/cjs/utils/contractSnapshot.js +207 -0
- package/dist/cjs/utils/contractSnapshot.js.map +1 -0
- package/dist/cjs/utils/contractSnapshot.test.js +247 -0
- package/dist/cjs/utils/contractSnapshot.test.js.map +1 -0
- package/dist/cjs/utils/index.js +8 -3
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/calculator/ContestTimeline.js +392 -0
- package/dist/esm/calculator/ContestTimeline.js.map +1 -0
- package/dist/esm/calculator/MinBidChart.js +412 -0
- package/dist/esm/calculator/MinBidChart.js.map +1 -0
- package/dist/esm/calculator/dom.js +35 -0
- package/dist/esm/calculator/dom.js.map +1 -0
- package/dist/esm/calculator/emitter.js +32 -0
- package/dist/esm/calculator/emitter.js.map +1 -0
- package/dist/esm/calculator/index.js +13 -0
- package/dist/esm/calculator/index.js.map +1 -0
- package/dist/esm/cost/constants.js +52 -4
- package/dist/esm/cost/constants.js.map +1 -1
- package/dist/esm/cost/estimate.js +9 -6
- package/dist/esm/cost/estimate.js.map +1 -1
- package/dist/esm/cost/estimate.test.js +18 -6
- package/dist/esm/cost/estimate.test.js.map +1 -1
- package/dist/esm/cost/index.js +13 -3
- package/dist/esm/cost/index.js.map +1 -1
- package/dist/esm/cost/sizes.js +19 -2
- package/dist/esm/cost/sizes.js.map +1 -1
- package/dist/esm/instructions/acceptRental.js +40 -54
- package/dist/esm/instructions/acceptRental.js.map +1 -1
- package/dist/esm/instructions/closeContract.js +16 -15
- package/dist/esm/instructions/closeContract.js.map +1 -1
- package/dist/esm/instructions/closeRental.js +20 -16
- package/dist/esm/instructions/closeRental.js.map +1 -1
- package/dist/esm/instructions/createContract.js +2 -4
- package/dist/esm/instructions/createContract.js.map +1 -1
- package/dist/esm/instructions/createContractThread.js +2 -3
- package/dist/esm/instructions/createContractThread.js.map +1 -1
- package/dist/esm/instructions/index.js +36 -28
- package/dist/esm/instructions/index.js.map +1 -1
- package/dist/esm/instructions/reserveRental.js +34 -46
- package/dist/esm/instructions/reserveRental.js.map +1 -1
- package/dist/esm/kit/index.js +4 -4
- package/dist/esm/kit/index.js.map +1 -1
- package/dist/esm/legacy/index.js +5 -2
- package/dist/esm/legacy/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/react/ContestTimeline.js +56 -0
- package/dist/esm/react/ContestTimeline.js.map +1 -0
- package/dist/esm/react/MinBidChart.js +30 -0
- package/dist/esm/react/MinBidChart.js.map +1 -0
- package/dist/esm/react/index.js +12 -0
- package/dist/esm/react/index.js.map +1 -0
- package/dist/esm/utils/bidMath.js +6 -114
- package/dist/esm/utils/bidMath.js.map +1 -1
- package/dist/esm/utils/contestChain.js +191 -0
- package/dist/esm/utils/contestChain.js.map +1 -0
- package/dist/esm/utils/contractSnapshot.js +201 -0
- package/dist/esm/utils/contractSnapshot.js.map +1 -0
- package/dist/esm/utils/contractSnapshot.test.js +245 -0
- package/dist/esm/utils/contractSnapshot.test.js.map +1 -0
- package/dist/esm/utils/index.js +4 -2
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/calculator/ContestTimeline.d.ts +69 -0
- package/dist/types/calculator/ContestTimeline.d.ts.map +1 -0
- package/dist/types/calculator/MinBidChart.d.ts +73 -0
- package/dist/types/calculator/MinBidChart.d.ts.map +1 -0
- package/dist/types/calculator/dom.d.ts +16 -0
- package/dist/types/calculator/dom.d.ts.map +1 -0
- package/dist/types/calculator/emitter.d.ts +13 -0
- package/dist/types/calculator/emitter.d.ts.map +1 -0
- package/dist/types/calculator/index.d.ts +13 -0
- package/dist/types/calculator/index.d.ts.map +1 -0
- package/dist/types/cost/constants.d.ts +49 -4
- package/dist/types/cost/constants.d.ts.map +1 -1
- package/dist/types/cost/estimate.d.ts +12 -1
- package/dist/types/cost/estimate.d.ts.map +1 -1
- package/dist/types/cost/index.d.ts +13 -3
- package/dist/types/cost/index.d.ts.map +1 -1
- package/dist/types/cost/sizes.d.ts +19 -2
- package/dist/types/cost/sizes.d.ts.map +1 -1
- package/dist/types/instructions/acceptRental.d.ts +8 -0
- package/dist/types/instructions/acceptRental.d.ts.map +1 -1
- package/dist/types/instructions/closeContract.d.ts +9 -0
- package/dist/types/instructions/closeContract.d.ts.map +1 -1
- package/dist/types/instructions/closeRental.d.ts +8 -0
- package/dist/types/instructions/closeRental.d.ts.map +1 -1
- package/dist/types/instructions/createContract.d.ts.map +1 -1
- package/dist/types/instructions/index.d.ts +36 -28
- package/dist/types/instructions/index.d.ts.map +1 -1
- package/dist/types/instructions/reserveRental.d.ts +8 -0
- package/dist/types/instructions/reserveRental.d.ts.map +1 -1
- package/dist/types/kit/index.d.ts +0 -2
- package/dist/types/kit/index.d.ts.map +1 -1
- package/dist/types/legacy/index.d.ts +1 -2
- package/dist/types/legacy/index.d.ts.map +1 -1
- package/dist/types/react/ContestTimeline.d.ts +17 -0
- package/dist/types/react/ContestTimeline.d.ts.map +1 -0
- package/dist/types/react/MinBidChart.d.ts +12 -0
- package/dist/types/react/MinBidChart.d.ts.map +1 -0
- package/dist/types/react/index.d.ts +12 -0
- package/dist/types/react/index.d.ts.map +1 -0
- package/dist/types/utils/bidMath.d.ts +6 -44
- package/dist/types/utils/bidMath.d.ts.map +1 -1
- package/dist/types/utils/contestChain.d.ts +118 -0
- package/dist/types/utils/contestChain.d.ts.map +1 -0
- package/dist/types/utils/contractSnapshot.d.ts +123 -0
- package/dist/types/utils/contractSnapshot.d.ts.map +1 -0
- package/dist/types/utils/contractSnapshot.test.d.ts +2 -0
- package/dist/types/utils/contractSnapshot.test.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +2 -1
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +15 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructions/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,KAAK,mBAAmB,EAAE,MAAM,i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AAmB,CAAC"}
|
|
@@ -10,6 +10,7 @@ import { type UniversalSigner } from '../utils/signer';
|
|
|
10
10
|
import { type AmountParam } from '../params/amount';
|
|
11
11
|
import { type DurationParam } from '../params/duration';
|
|
12
12
|
import { prepareInstructions } from '../utils/instructions';
|
|
13
|
+
import { type ContractSnapshot } from '../utils/contractSnapshot';
|
|
13
14
|
/**
|
|
14
15
|
* Parameters for reserving a rental contract
|
|
15
16
|
*/
|
|
@@ -64,6 +65,13 @@ export interface ReserveRentalParams {
|
|
|
64
65
|
* @example 200000
|
|
65
66
|
*/
|
|
66
67
|
computeUnits?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Optional pre-fetched `ContractSnapshot`. When supplied, skips the
|
|
70
|
+
* aggregated RPC fetch. If the snapshot is stale (contract pointer set
|
|
71
|
+
* but rental account null), the SDK lazy-refetches once and throws if
|
|
72
|
+
* still inconsistent.
|
|
73
|
+
*/
|
|
74
|
+
snapshot?: ContractSnapshot;
|
|
67
75
|
}
|
|
68
76
|
/**
|
|
69
77
|
* Bid on a contract via the GBM-style reservation auction. The winner
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reserveRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/reserveRental.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"reserveRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/reserveRental.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAwB,KAAK,OAAO,EA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|
24
24
|
export { claim, type ClaimParams } from '@sly-rentals/vault';
|
|
25
|
-
export * as codama from '../generated/codama';
|
|
26
|
-
export * as audit from '../audit';
|
|
27
25
|
export { closeSrslyEventListener, events, getEventsFromTx, onSrslyEvent } from '../audit';
|
|
28
26
|
export type { EventChannel, EventsTree, GroupNamespace, SrslyAnyEventHandler, SrslyEventHandler, SrslyEventListener, SrslyEventName, } from '../audit';
|
|
29
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/kit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/kit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAQ7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1F,YAAY,EACV,YAAY,EACZ,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,GACf,MAAM,UAAU,CAAC"}
|
|
@@ -27,9 +27,8 @@ export * from '../utils';
|
|
|
27
27
|
export * from '../accounts';
|
|
28
28
|
export * from '../params';
|
|
29
29
|
export * from '../pda';
|
|
30
|
+
export * from '../cost';
|
|
30
31
|
export { VERSION } from '../version';
|
|
31
|
-
export * as codama from '../generated/codama';
|
|
32
|
-
export * as audit from '../audit';
|
|
33
32
|
export { closeSrslyEventListener, events, getEventsFromTx, onSrslyEvent } from '../audit';
|
|
34
33
|
export type { EventChannel, EventsTree, GroupNamespace, SrslyAnyEventHandler, SrslyEventHandler, SrslyEventListener, SrslyEventName, } from '../audit';
|
|
35
34
|
export type * from '../instructions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAgB,KAAK,iBAAiB,EAA0B,MAAM,UAAU,CAAC;AACxF,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AAIvC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAgB,KAAK,iBAAiB,EAA0B,MAAM,UAAU,CAAC;AACxF,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AAIvC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,E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.
|
|
3
|
+
* Owns container ref + lifecycle; converts emitter events back into the
|
|
4
|
+
* React-style callback props (`onKnobsChange` etc.).
|
|
5
|
+
*
|
|
6
|
+
* Logic lives in `@sly-rentals/core/calculator`.
|
|
7
|
+
*/
|
|
8
|
+
import { type ContestTimelineProps as VanillaContestTimelineProps, type ContestTimelineClassNames } from '../calculator';
|
|
9
|
+
import type { ContestKnob } from '../utils';
|
|
10
|
+
export type { ContestTimelineClassNames };
|
|
11
|
+
export interface ContestTimelineProps extends VanillaContestTimelineProps {
|
|
12
|
+
onKnobsChange: (next: ContestKnob[]) => void;
|
|
13
|
+
onPresetChange: (next: 'even' | 'snipe' | 'custom') => void;
|
|
14
|
+
onCalcDefenderAtDayChange: (atDay: number) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function ContestTimeline(props: ContestTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=ContestTimeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContestTimeline.d.ts","sourceRoot":"","sources":["../../../src/react/ContestTimeline.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAEL,KAAK,oBAAoB,IAAI,2BAA2B,EACxD,KAAK,yBAAyB,EAC/B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,YAAY,EAAE,yBAAyB,EAAE,CAAC;AAE1C,MAAM,WAAW,oBAAqB,SAAQ,2BAA2B;IACvE,aAAa,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,KAAK,IAAI,CAAC;IAC5D,yBAAyB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAoC1D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @purpose Thin React wrapper around the vanilla `MinBidChart` class.
|
|
3
|
+
* Owns container ref + lifecycle; forwards prop changes via `.update()`.
|
|
4
|
+
*
|
|
5
|
+
* Visual + math logic lives in `@sly-rentals/core/calculator` so non-React
|
|
6
|
+
* consumers can use the same code without paying for React.
|
|
7
|
+
*/
|
|
8
|
+
import { DEFAULT_MIN_BID_CHART_THEME, type MinBidChartProps, type MinBidChartTheme, type MinBidChartClassNames } from '../calculator';
|
|
9
|
+
export { DEFAULT_MIN_BID_CHART_THEME };
|
|
10
|
+
export type { MinBidChartProps, MinBidChartTheme, MinBidChartClassNames };
|
|
11
|
+
export declare function MinBidChart(props: MinBidChartProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=MinBidChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MinBidChart.d.ts","sourceRoot":"","sources":["../../../src/react/MinBidChart.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAEL,2BAA2B,EAC3B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,2BAA2B,EAAE,CAAC;AACvC,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,CAAC;AAE1E,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAmBlD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @purpose React component entry point for the SRSLY reservation
|
|
3
|
+
* calculator. Sits behind the `@sly-rentals/core/react` subpath export
|
|
4
|
+
* so non-React consumers don't pay the import cost.
|
|
5
|
+
*
|
|
6
|
+
* Pair with `@sly-rentals/core/react/styles.css` for the default
|
|
7
|
+
* SRSLY-themed look, or pass `classNames` / `theme` props for custom
|
|
8
|
+
* styling.
|
|
9
|
+
*/
|
|
10
|
+
export { MinBidChart, DEFAULT_MIN_BID_CHART_THEME, type MinBidChartProps, type MinBidChartTheme, type MinBidChartClassNames, } from './MinBidChart';
|
|
11
|
+
export { ContestTimeline, type ContestTimelineProps, type ContestTimelineClassNames, } from './ContestTimeline';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,WAAW,EACX,2BAA2B,EAC3B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose Reservation bid math
|
|
2
|
+
* @purpose Reservation bid math (pure formula + type)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Mirror of the on-chain `ConfigState::bid_min_stardust` formula so UIs
|
|
5
|
+
* can preview the contest minimum-bid floor without hitting an RPC for
|
|
6
|
+
* every keystroke. Fetch-aware helpers (`getMinimumBid`,
|
|
7
|
+
* `computeMinimumBidFromSnapshot`) live in `./contractSnapshot` — they
|
|
8
|
+
* call into the pure formula here.
|
|
9
9
|
*/
|
|
10
|
-
import { type Address } from '@solana/kit';
|
|
11
10
|
/**
|
|
12
11
|
* Pure math: contest minimum-bid floor in stardust.
|
|
13
12
|
*
|
|
@@ -49,41 +48,4 @@ export type MinimumBid = {
|
|
|
49
48
|
/** Active rental's start_time in unix seconds, if one exists. */
|
|
50
49
|
activeStartSeconds: number | null;
|
|
51
50
|
};
|
|
52
|
-
/**
|
|
53
|
-
* High-level helper: compute the contest minimum bid for a contract right
|
|
54
|
-
* now (or at `now + delaySeconds`).
|
|
55
|
-
*
|
|
56
|
-
* Fetches `ConfigState`, `ContractState`, and the active/queued `RentalState`
|
|
57
|
-
* accounts, derives `closeness` from the active rental window, and returns
|
|
58
|
-
* the floor a challenger must clear plus enough context to render a UI.
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```ts
|
|
62
|
-
* const floor = await getMinimumBid({ contractAddress: 'Abc...' });
|
|
63
|
-
* console.log('Bid at least', floor.minBidStardust, 'stardust');
|
|
64
|
-
*
|
|
65
|
-
* // Preview the floor 4 hours from now (snipe-window pricing):
|
|
66
|
-
* const later = await getMinimumBid({
|
|
67
|
-
* contractAddress: 'Abc...',
|
|
68
|
-
* delaySeconds: 4 * 60 * 60,
|
|
69
|
-
* });
|
|
70
|
-
* ```
|
|
71
|
-
*
|
|
72
|
-
* If the contract has no active rental yet, closeness = 0 and the floor
|
|
73
|
-
* collapses to the rate-bump floor (`rate × captureRate`).
|
|
74
|
-
*/
|
|
75
|
-
export declare function getMinimumBid(args: {
|
|
76
|
-
contractAddress: Address | string;
|
|
77
|
-
/** Seconds to advance the evaluation past `now`. Negative values are
|
|
78
|
-
* clamped to 0 (no back-dating). Default 0. */
|
|
79
|
-
delaySeconds?: number;
|
|
80
|
-
/** Override the evaluation moment outright (unix seconds). Takes priority
|
|
81
|
-
* over `delaySeconds`. */
|
|
82
|
-
nowSeconds?: number;
|
|
83
|
-
/** ATLAS-per-point conversion (whole-ATLAS per whole-point). Defaults to
|
|
84
|
-
* the cached `cfg.atlasPerPoint`; override if you want to project a
|
|
85
|
-
* different conversion. */
|
|
86
|
-
atlasPerPoint?: bigint;
|
|
87
|
-
rpcUrl?: string;
|
|
88
|
-
}): Promise<MinimumBid>;
|
|
89
51
|
//# 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
|
|
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,gEAAgE;IAChE,cAAc,EAAE,MAAM,CAAC;IACvB;4DACwD;IACxD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iEAAiE;IACjE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @purpose Pure-math chain-of-contests simulator.
|
|
3
|
+
*
|
|
4
|
+
* Walks a sequence of reservation events (calc defender + user-added
|
|
5
|
+
* takeovers) and produces per-row floor / bonus / owner-take values
|
|
6
|
+
* plus the segment breakdown UIs use to render piecewise curves.
|
|
7
|
+
*
|
|
8
|
+
* No React, no IO, no RPC. Feeds a calculator/visualization layer
|
|
9
|
+
* (`@sly-rentals/core/react/calculator`) but is callable standalone
|
|
10
|
+
* from any environment.
|
|
11
|
+
*/
|
|
12
|
+
export type Cur = 'ATLAS' | 'POINTS';
|
|
13
|
+
export type EventSource = 'calc' | 'knob';
|
|
14
|
+
export type ContestKnob = {
|
|
15
|
+
id: string;
|
|
16
|
+
atDay: number;
|
|
17
|
+
};
|
|
18
|
+
export type ContestSegment = {
|
|
19
|
+
startDay: number;
|
|
20
|
+
endDay: number;
|
|
21
|
+
/** Defender bid (in stardust) during this segment. May legitimately be
|
|
22
|
+
* 0 when the defender placed a zero-bid first reservation. */
|
|
23
|
+
defenderBidStardust: bigint;
|
|
24
|
+
/** False only for the pre-reservation gap (no defender exists yet).
|
|
25
|
+
* Once the calc defender enters the chain, every following segment
|
|
26
|
+
* has one — even if the recorded bid is 0. */
|
|
27
|
+
hasDefender: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type ContestRow = {
|
|
30
|
+
id: string;
|
|
31
|
+
idx: number;
|
|
32
|
+
atDay: number;
|
|
33
|
+
floorStardust: bigint;
|
|
34
|
+
/** Floor + bonus + owner take, expressed in the caller's display
|
|
35
|
+
* currency. Math is computed in stardust then converted at the end. */
|
|
36
|
+
floorDisplay: number;
|
|
37
|
+
bonusDisplay: number;
|
|
38
|
+
ownerTakeDisplay: number;
|
|
39
|
+
defenderBidStardust: bigint;
|
|
40
|
+
defenderAtDay: number;
|
|
41
|
+
source: EventSource;
|
|
42
|
+
isInitial: boolean;
|
|
43
|
+
/** Running contested_count after this event. */
|
|
44
|
+
contestedCountAfter: number;
|
|
45
|
+
/** True when this event's activation would trigger an on-chain rate
|
|
46
|
+
* bump (`contestedCount >= contestedThreshold`). */
|
|
47
|
+
triggersRateBump: boolean;
|
|
48
|
+
};
|
|
49
|
+
export type ContestChain = {
|
|
50
|
+
segments: ContestSegment[];
|
|
51
|
+
rows: ContestRow[];
|
|
52
|
+
totalOwnerDisplay: number;
|
|
53
|
+
totalBonusDisplay: number;
|
|
54
|
+
baselineDisplay: number;
|
|
55
|
+
multiplier: number;
|
|
56
|
+
};
|
|
57
|
+
/** Subset of `ConfigState` the chain math needs. */
|
|
58
|
+
export interface ContestChainConfig {
|
|
59
|
+
contestedMultiplierMaxBps: number;
|
|
60
|
+
captureRateBps: bigint;
|
|
61
|
+
/**
|
|
62
|
+
* Bonus payout multiplier in bps (100 = 1× = no-op).
|
|
63
|
+
*
|
|
64
|
+
* TODO(bonus_multiplier_bps): make this required (drop the `?`) once
|
|
65
|
+
* the on-chain ConfigState includes the field — all callers will
|
|
66
|
+
* source it from chain.
|
|
67
|
+
*
|
|
68
|
+
* Optional today so consumers on older program shapes (no on-chain
|
|
69
|
+
* bonus multiplier field yet) can omit it — math falls back to 100
|
|
70
|
+
* internally.
|
|
71
|
+
*/
|
|
72
|
+
bonusMultiplierBps?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Convert a stardust value into the caller's display currency.
|
|
76
|
+
*
|
|
77
|
+
* ATLAS: stardust / stardustPerAtlas.
|
|
78
|
+
* POINTS: stardust / (stardustPerAtlas × atlasPerPoint), with a
|
|
79
|
+
* min-capture floor since the on-chain threshold rejects sub-floor bids.
|
|
80
|
+
*/
|
|
81
|
+
export declare function stardustToDisplay(stardust: bigint, cur: Cur, stardustPerAtlas: number, atlasPerPoint: number, minCaptureThresholdPoints: number): number;
|
|
82
|
+
/**
|
|
83
|
+
* Walk a chain of contest events and produce per-contest math + segment
|
|
84
|
+
* breakdown.
|
|
85
|
+
*
|
|
86
|
+
* The chain begins with an optional calc defender row (the simulator's
|
|
87
|
+
* "your bid" entry). Subsequent takeover knobs are computed via
|
|
88
|
+
* `computeMinimumBid` against the previous row's bid.
|
|
89
|
+
*
|
|
90
|
+
* v1 assumes same-currency ATLAS knockoffs; tier-upgrade compensation
|
|
91
|
+
* is not modeled.
|
|
92
|
+
*/
|
|
93
|
+
export declare function computeContestChain(args: {
|
|
94
|
+
cfg: ContestChainConfig;
|
|
95
|
+
rateStardust: bigint;
|
|
96
|
+
activeDays: number;
|
|
97
|
+
/** User-controlled defender from calculator inputs. */
|
|
98
|
+
userDefender?: {
|
|
99
|
+
atDay: number;
|
|
100
|
+
bidStardust: bigint;
|
|
101
|
+
};
|
|
102
|
+
/** Takeover knobs added by the user via `+` on the strip. */
|
|
103
|
+
takeoverKnobs: ContestKnob[];
|
|
104
|
+
displayCur: Cur;
|
|
105
|
+
stardustPerAtlas: number;
|
|
106
|
+
atlasPerPoint: number;
|
|
107
|
+
minCaptureThresholdPoints: number;
|
|
108
|
+
/** Contract's `contested_threshold` (0 disables the bump). */
|
|
109
|
+
contestedThreshold: number;
|
|
110
|
+
/** Contract's current `contested_count` at the moment the chain begins. */
|
|
111
|
+
contestedCountStart: number;
|
|
112
|
+
}): ContestChain;
|
|
113
|
+
/** Even spacing across [from, to] excluding endpoints. */
|
|
114
|
+
export declare function distributeEven(count: number, from: number, to: number): number[];
|
|
115
|
+
/** Quadratic bias toward `to` — clusters knobs near the snipe window. */
|
|
116
|
+
export declare function distributeSnipeHeavy(count: number, from: number, to: number): number[];
|
|
117
|
+
export declare const nextKnobId: () => string;
|
|
118
|
+
//# sourceMappingURL=contestChain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contestChain.d.ts","sourceRoot":"","sources":["../../../src/utils/contestChain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,MAAM,GAAG,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf;mEAC+D;IAC/D,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;mDAE+C;IAC/C,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAA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AuD;IACvD,YAAY,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,6DAA6D;IAC7D,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,UAAU,EAAE,GAAG,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,yBAAyB,EAAE,MAAM,CAAC;IAClC,8DAA8D;IAC9D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,mBAAmB,EAAE,MAAM,CAAC;CAC7B,GAAG,YAAY,CA8Kf;AAED,0DAA0D;AAC1D,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAIhF;AAED,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAQtF;AAGD,eAAO,MAAM,UAAU,QAAO,MAA6B,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @purpose Aggregated point-in-time view of a contract and its rentals
|
|
3
|
+
*
|
|
4
|
+
* One-shot fetch that pulls every on-chain account relevant to a single
|
|
5
|
+
* contract — `ConfigState`, `ContractState`, and the active / queued
|
|
6
|
+
* `RentalState`s (when they exist) — and also computes the contest
|
|
7
|
+
* minimum-bid floor evaluated at "now". The raw account states are
|
|
8
|
+
* exposed verbatim so callers decide what matters; `minimumBid` is the
|
|
9
|
+
* one piece of derived data that nearly every consumer of this snapshot
|
|
10
|
+
* needs.
|
|
11
|
+
*
|
|
12
|
+
* Granular `fetchConfig` / `fetchContract` / `fetchRental` remain
|
|
13
|
+
* available for narrow lookups that don't need the whole picture.
|
|
14
|
+
*/
|
|
15
|
+
import { type Address } from '@solana/kit';
|
|
16
|
+
import type { ConfigState } from '../generated/codama/accounts/configState';
|
|
17
|
+
import type { ContractState } from '../generated/codama/accounts/contractState';
|
|
18
|
+
import type { RentalState } from '../generated/codama/accounts/rentalState';
|
|
19
|
+
import { type MinimumBid } from './bidMath';
|
|
20
|
+
export type FetchedAccount<T> = {
|
|
21
|
+
data: T;
|
|
22
|
+
address: Address;
|
|
23
|
+
};
|
|
24
|
+
export type ContractSnapshot = {
|
|
25
|
+
config: FetchedAccount<ConfigState>;
|
|
26
|
+
contract: FetchedAccount<ContractState>;
|
|
27
|
+
/** Null when contract.activeRental points at SystemProgram, or when the
|
|
28
|
+
* rental account has been closed since the contract was last touched. */
|
|
29
|
+
activeRental: FetchedAccount<RentalState> | null;
|
|
30
|
+
/** Null when contract.queuedRental points at SystemProgram, or when the
|
|
31
|
+
* rental account has been closed since the contract was last touched. */
|
|
32
|
+
queuedRental: FetchedAccount<RentalState> | null;
|
|
33
|
+
/** Contest minimum-bid floor evaluated at the snapshot's fetch time. For
|
|
34
|
+
* time-projected floors (`delaySeconds`, custom `nowSeconds`), call
|
|
35
|
+
* `computeMinimumBidFromSnapshot(snap, opts)` — no extra RPC needed. */
|
|
36
|
+
minimumBid: MinimumBid;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Fetch a contract and every account directly attached to it in one shot,
|
|
40
|
+
* then derive the contest minimum-bid floor at "now".
|
|
41
|
+
*
|
|
42
|
+
* Strategy: fetch `ConfigState` and `ContractState` in parallel, then read
|
|
43
|
+
* the contract's `activeRental` / `queuedRental` pointers and fetch
|
|
44
|
+
* whichever ones exist (in parallel). Pointers that equal SystemProgram
|
|
45
|
+
* are skipped without an RPC call. The bid floor is computed locally
|
|
46
|
+
* once all states are in.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const snap = await getContractSnapshot({ contractAddress: 'Abc...' });
|
|
51
|
+
* const rate = snap.contract.data.rate;
|
|
52
|
+
* const defenderBid = snap.queuedRental?.data.bidAtlas ?? 0n;
|
|
53
|
+
* const floorNow = snap.minimumBid.minBidStardust;
|
|
54
|
+
*
|
|
55
|
+
* // Project the floor 4 hours forward without re-fetching:
|
|
56
|
+
* const floorLater = computeMinimumBidFromSnapshot(snap, {
|
|
57
|
+
* delaySeconds: 4 * 60 * 60,
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function getContractSnapshot(args: {
|
|
62
|
+
contractAddress: Address | string;
|
|
63
|
+
rpcUrl?: string;
|
|
64
|
+
}): Promise<ContractSnapshot>;
|
|
65
|
+
/**
|
|
66
|
+
* Resolve a `ContractSnapshot` from caller-supplied data or fetch fresh.
|
|
67
|
+
*
|
|
68
|
+
* Designed for callers (e.g. UIs) that already have a snapshot in hand and
|
|
69
|
+
* want to skip the RPC roundtrip when building an instruction. Behavior:
|
|
70
|
+
*
|
|
71
|
+
* 1. If no snapshot is supplied → fetch a fresh one.
|
|
72
|
+
* 2. If snapshot's contract address doesn't match `contractAddress` →
|
|
73
|
+
* throw immediately (programmer error).
|
|
74
|
+
* 3. If snapshot's rental fields are stale relative to the contract's
|
|
75
|
+
* pointers (contract says a rental exists but snapshot has `null` —
|
|
76
|
+
* typical when the snapshot was fetched mid-state-change) → lazy
|
|
77
|
+
* refetch the snapshot once.
|
|
78
|
+
* 4. If still stale after the refetch → throw. The on-chain reality
|
|
79
|
+
* conflicts with itself; let the caller decide how to recover.
|
|
80
|
+
*/
|
|
81
|
+
export declare function resolveContractSnapshot(args: {
|
|
82
|
+
contractAddress: Address | string;
|
|
83
|
+
rpcUrl?: string;
|
|
84
|
+
snapshot?: ContractSnapshot;
|
|
85
|
+
}): Promise<ContractSnapshot>;
|
|
86
|
+
/**
|
|
87
|
+
* Pure derivation of `MinimumBid` from an already-fetched snapshot. No RPC.
|
|
88
|
+
*
|
|
89
|
+
* Use when the caller has a snapshot and wants the floor at a custom time
|
|
90
|
+
* projection (`delaySeconds` / `nowSeconds`) or with an overridden
|
|
91
|
+
* `atlasPerPoint` ratio. For the at-fetch-time floor, read
|
|
92
|
+
* `snap.minimumBid` directly.
|
|
93
|
+
*/
|
|
94
|
+
export declare function computeMinimumBidFromSnapshot(snap: Omit<ContractSnapshot, 'minimumBid'>, opts?: {
|
|
95
|
+
delaySeconds?: number;
|
|
96
|
+
nowSeconds?: number;
|
|
97
|
+
atlasPerPoint?: bigint;
|
|
98
|
+
}): MinimumBid;
|
|
99
|
+
/**
|
|
100
|
+
* Convenience wrapper: fetch a snapshot and return only its `minimumBid`.
|
|
101
|
+
*
|
|
102
|
+
* Same fetches as `getContractSnapshot` — if you need the contract / rental
|
|
103
|
+
* states too, call `getContractSnapshot` directly so you don't fetch twice.
|
|
104
|
+
*
|
|
105
|
+
* For time-projected floors, pass `delaySeconds` or `nowSeconds`; the
|
|
106
|
+
* underlying fetch is identical.
|
|
107
|
+
*/
|
|
108
|
+
export declare function getMinimumBid(args: {
|
|
109
|
+
contractAddress: Address | string;
|
|
110
|
+
/** Seconds to advance the evaluation past `now`. Negative values are
|
|
111
|
+
* clamped to 0 (no back-dating). Default 0. */
|
|
112
|
+
delaySeconds?: number;
|
|
113
|
+
/** Override the evaluation moment outright (unix seconds). Takes priority
|
|
114
|
+
* over `delaySeconds`. */
|
|
115
|
+
nowSeconds?: number;
|
|
116
|
+
/** ATLAS-per-point conversion override. Defaults to `cfg.atlasPerPoint`. */
|
|
117
|
+
atlasPerPoint?: bigint;
|
|
118
|
+
rpcUrl?: string;
|
|
119
|
+
/** Optional pre-fetched snapshot — when supplied, no RPC fetches happen
|
|
120
|
+
* and `contractAddress` / `rpcUrl` are ignored. */
|
|
121
|
+
snapshot?: ContractSnapshot;
|
|
122
|
+
}): Promise<MinimumBid>;
|
|
123
|
+
//# sourceMappingURL=contractSnapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractSnapshot.d.ts","sourceRoot":"","sources":["../../../src/utils/contractSnapshot.ts"],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OG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,EAC1C,IAAI,GAAE;IACJ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACnB,GACL,UAAU,CA0DZ;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,eAAe,EAAE,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contractSnapshot.test.d.ts","sourceRoot":"","sources":["../../../src/utils/contractSnapshot.test.ts"],"names":[],"mappings":""}
|
|
@@ -11,7 +11,8 @@ export { InstructionResult, type LegacyInstruction } from './instructionResult';
|
|
|
11
11
|
export { createRpc, setRpcDebug, isRpcDebugEnabled } from './rpc';
|
|
12
12
|
export { fetchLookupTable, getLookupTableAddress, type AddressLookupTableData, } from './lookupTable';
|
|
13
13
|
export { hasActiveRental, hasQueuedRental } from './rental';
|
|
14
|
-
export { computeMinimumBid,
|
|
14
|
+
export { computeMinimumBid, type MinimumBid } from './bidMath';
|
|
15
|
+
export { getContractSnapshot, resolveContractSnapshot, computeMinimumBidFromSnapshot, getMinimumBid, type ContractSnapshot, type FetchedAccount, } from './contractSnapshot';
|
|
15
16
|
export { createDiscount, deserializeDiscountAuth, type CreateDiscountParams, type SerializedDiscountAuth, type MessageSigner, } from './discountAuth';
|
|
16
17
|
export { resolveReferrer, requireValidReferrer } from './referrer';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,WAAW,EACX,eAAe,EACf,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,GACrC,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAGtF,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,sBAAsB,GAC5B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG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AAG/D,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,6BAA6B,EAC7B,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "
|
|
1
|
+
export declare const VERSION = "2.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sly-rentals/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "TypeScript SDK for SRSLY",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -45,6 +45,20 @@
|
|
|
45
45
|
"import": "./dist/esm/audit/index.js",
|
|
46
46
|
"default": "./dist/cjs/audit/index.js"
|
|
47
47
|
},
|
|
48
|
+
"./codama": {
|
|
49
|
+
"bun": "./src/generated/codama/index.ts",
|
|
50
|
+
"types": "./dist/types/generated/codama/index.d.ts",
|
|
51
|
+
"require": "./dist/cjs/generated/codama/index.js",
|
|
52
|
+
"import": "./dist/esm/generated/codama/index.js",
|
|
53
|
+
"default": "./dist/cjs/generated/codama/index.js"
|
|
54
|
+
},
|
|
55
|
+
"./cost": {
|
|
56
|
+
"bun": "./src/cost/index.ts",
|
|
57
|
+
"types": "./dist/types/cost/index.d.ts",
|
|
58
|
+
"require": "./dist/cjs/cost/index.js",
|
|
59
|
+
"import": "./dist/esm/cost/index.js",
|
|
60
|
+
"default": "./dist/cjs/cost/index.js"
|
|
61
|
+
},
|
|
48
62
|
"./idl": "./dist/idl/srsly.json",
|
|
49
63
|
"./api.json": "./dist/api.json"
|
|
50
64
|
},
|