@wuwei-labs/srsly 4.2.9 → 4.3.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/cjs/cost/constants.js +34 -0
- package/dist/cjs/cost/constants.js.map +1 -0
- package/dist/cjs/cost/estimate.js +128 -0
- package/dist/cjs/cost/estimate.js.map +1 -0
- package/dist/cjs/cost/estimate.test.js +145 -0
- package/dist/cjs/cost/estimate.test.js.map +1 -0
- package/dist/cjs/cost/index.js +20 -0
- package/dist/cjs/cost/index.js.map +1 -0
- package/dist/cjs/cost/sizes.js +21 -0
- package/dist/cjs/cost/sizes.js.map +1 -0
- package/dist/cjs/generated/codama/accounts/borrowerState.js +2 -2
- package/dist/cjs/generated/codama/accounts/borrowerState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/configState.js +11 -9
- package/dist/cjs/generated/codama/accounts/configState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/contractState.js +4 -0
- package/dist/cjs/generated/codama/accounts/contractState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/rentalState.js +4 -2
- package/dist/cjs/generated/codama/accounts/rentalState.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/closeRental.js +2 -2
- package/dist/cjs/generated/codama/instructions/closeRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/createContract.js +2 -0
- package/dist/cjs/generated/codama/instructions/createContract.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/reserveRental.js +2 -2
- package/dist/cjs/generated/codama/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/updateConfig.js +8 -8
- package/dist/cjs/generated/codama/instructions/updateConfig.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/updateContract.js +2 -0
- package/dist/cjs/generated/codama/instructions/updateContract.js.map +1 -1
- package/dist/cjs/generated/codama/types/index.js +1 -1
- package/dist/cjs/generated/codama/types/index.js.map +1 -1
- package/dist/cjs/generated/codama/types/rentalClosed.js +2 -2
- package/dist/cjs/generated/codama/types/rentalClosed.js.map +1 -1
- package/dist/cjs/generated/codama/types/reservationContested.js +41 -0
- package/dist/cjs/generated/codama/types/reservationContested.js.map +1 -0
- package/dist/cjs/generated/codama/types/reservationCreated.js +2 -2
- package/dist/cjs/generated/codama/types/reservationCreated.js.map +1 -1
- package/dist/cjs/instructions/createBorrower.js +1 -1
- package/dist/cjs/instructions/createContract.js +2 -1
- package/dist/cjs/instructions/createContract.js.map +1 -1
- package/dist/cjs/instructions/createContractThread.js +2 -4
- package/dist/cjs/instructions/createContractThread.js.map +1 -1
- package/dist/cjs/instructions/reserveRental.js +14 -2
- package/dist/cjs/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/instructions/updateConfig.js +1 -1
- package/dist/cjs/instructions/updateConfig.js.map +1 -1
- package/dist/cjs/instructions/updateContract.js +3 -1
- package/dist/cjs/instructions/updateContract.js.map +1 -1
- package/dist/cjs/kit/index.js +1 -0
- package/dist/cjs/kit/index.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/utils/bidMath.js +154 -0
- package/dist/cjs/utils/bidMath.js.map +1 -0
- package/dist/cjs/utils/index.js +5 -1
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/cost/constants.js +31 -0
- package/dist/esm/cost/constants.js.map +1 -0
- package/dist/esm/cost/estimate.js +122 -0
- package/dist/esm/cost/estimate.js.map +1 -0
- package/dist/esm/cost/estimate.test.js +143 -0
- package/dist/esm/cost/estimate.test.js.map +1 -0
- package/dist/esm/cost/index.js +4 -0
- package/dist/esm/cost/index.js.map +1 -0
- package/dist/esm/cost/sizes.js +18 -0
- package/dist/esm/cost/sizes.js.map +1 -0
- package/dist/esm/generated/codama/accounts/borrowerState.js +3 -3
- package/dist/esm/generated/codama/accounts/borrowerState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/configState.js +11 -9
- package/dist/esm/generated/codama/accounts/configState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/contractState.js +4 -0
- package/dist/esm/generated/codama/accounts/contractState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/rentalState.js +4 -2
- package/dist/esm/generated/codama/accounts/rentalState.js.map +1 -1
- package/dist/esm/generated/codama/instructions/closeRental.js +2 -2
- package/dist/esm/generated/codama/instructions/closeRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/createContract.js +3 -1
- package/dist/esm/generated/codama/instructions/createContract.js.map +1 -1
- package/dist/esm/generated/codama/instructions/reserveRental.js +3 -3
- package/dist/esm/generated/codama/instructions/reserveRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/updateConfig.js +8 -8
- package/dist/esm/generated/codama/instructions/updateConfig.js.map +1 -1
- package/dist/esm/generated/codama/instructions/updateContract.js +3 -1
- package/dist/esm/generated/codama/instructions/updateContract.js.map +1 -1
- package/dist/esm/generated/codama/types/index.js +1 -1
- package/dist/esm/generated/codama/types/index.js.map +1 -1
- package/dist/esm/generated/codama/types/rentalClosed.js +3 -3
- package/dist/esm/generated/codama/types/rentalClosed.js.map +1 -1
- package/dist/esm/generated/codama/types/reservationContested.js +36 -0
- package/dist/esm/generated/codama/types/reservationContested.js.map +1 -0
- package/dist/esm/generated/codama/types/reservationCreated.js +3 -3
- package/dist/esm/generated/codama/types/reservationCreated.js.map +1 -1
- package/dist/esm/instructions/createBorrower.js +1 -1
- package/dist/esm/instructions/createContract.js +2 -1
- package/dist/esm/instructions/createContract.js.map +1 -1
- package/dist/esm/instructions/createContractThread.js +1 -3
- package/dist/esm/instructions/createContractThread.js.map +1 -1
- package/dist/esm/instructions/reserveRental.js +14 -2
- package/dist/esm/instructions/reserveRental.js.map +1 -1
- package/dist/esm/instructions/updateConfig.js +1 -1
- package/dist/esm/instructions/updateConfig.js.map +1 -1
- package/dist/esm/instructions/updateContract.js +3 -1
- package/dist/esm/instructions/updateContract.js.map +1 -1
- package/dist/esm/kit/index.js +1 -0
- package/dist/esm/kit/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/utils/bidMath.js +150 -0
- package/dist/esm/utils/bidMath.js.map +1 -0
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/idl/srsly.json +133 -49
- package/dist/types/cost/constants.d.ts +31 -0
- package/dist/types/cost/constants.d.ts.map +1 -0
- package/dist/types/cost/estimate.d.ts +94 -0
- package/dist/types/cost/estimate.d.ts.map +1 -0
- package/dist/types/cost/estimate.test.d.ts +2 -0
- package/dist/types/cost/estimate.test.d.ts.map +1 -0
- package/dist/types/cost/index.d.ts +4 -0
- package/dist/types/cost/index.d.ts.map +1 -0
- package/dist/types/cost/sizes.d.ts +18 -0
- package/dist/types/cost/sizes.d.ts.map +1 -0
- package/dist/types/generated/codama/accounts/borrowerState.d.ts +2 -2
- package/dist/types/generated/codama/accounts/borrowerState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/configState.d.ts +44 -12
- package/dist/types/generated/codama/accounts/configState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/contractState.d.ts +22 -0
- package/dist/types/generated/codama/accounts/contractState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/rentalState.d.ts +22 -6
- package/dist/types/generated/codama/accounts/rentalState.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/closeRental.d.ts +1 -1
- package/dist/types/generated/codama/instructions/createContract.d.ts +4 -0
- package/dist/types/generated/codama/instructions/createContract.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/reserveRental.d.ts +2 -2
- package/dist/types/generated/codama/instructions/reserveRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/updateConfig.d.ts +20 -12
- package/dist/types/generated/codama/instructions/updateConfig.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/updateContract.d.ts +14 -0
- package/dist/types/generated/codama/instructions/updateContract.d.ts.map +1 -1
- package/dist/types/generated/codama/types/index.d.ts +1 -1
- package/dist/types/generated/codama/types/index.d.ts.map +1 -1
- package/dist/types/generated/codama/types/rentalClosed.d.ts +2 -2
- package/dist/types/generated/codama/types/rentalClosed.d.ts.map +1 -1
- package/dist/types/generated/codama/types/reservationContested.d.ts +50 -0
- package/dist/types/generated/codama/types/reservationContested.d.ts.map +1 -0
- package/dist/types/generated/codama/types/reservationCreated.d.ts +2 -2
- package/dist/types/generated/codama/types/reservationCreated.d.ts.map +1 -1
- package/dist/types/instructions/createBorrower.d.ts +1 -1
- package/dist/types/instructions/createContract.d.ts +10 -0
- package/dist/types/instructions/createContract.d.ts.map +1 -1
- package/dist/types/instructions/createContractThread.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/instructions/updateConfig.d.ts +3 -2
- package/dist/types/instructions/updateConfig.d.ts.map +1 -1
- package/dist/types/instructions/updateContract.d.ts +8 -0
- package/dist/types/instructions/updateContract.d.ts.map +1 -1
- package/dist/types/kit/index.d.ts +1 -0
- package/dist/types/kit/index.d.ts.map +1 -1
- package/dist/types/utils/bidMath.d.ts +89 -0
- package/dist/types/utils/bidMath.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -10,14 +10,14 @@ export type RentalClosed = {
|
|
|
10
10
|
rentalState: Address;
|
|
11
11
|
contract: Address;
|
|
12
12
|
borrower: Address;
|
|
13
|
-
pointsAwarded:
|
|
13
|
+
pointsAwarded: bigint;
|
|
14
14
|
feeFlushed: bigint;
|
|
15
15
|
};
|
|
16
16
|
export type RentalClosedArgs = {
|
|
17
17
|
rentalState: Address;
|
|
18
18
|
contract: Address;
|
|
19
19
|
borrower: Address;
|
|
20
|
-
pointsAwarded: number;
|
|
20
|
+
pointsAwarded: number | bigint;
|
|
21
21
|
feeFlushed: number | bigint;
|
|
22
22
|
};
|
|
23
23
|
export declare function getRentalClosedEncoder(): FixedSizeEncoder<RentalClosedArgs>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rentalClosed.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/rentalClosed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"rentalClosed.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/rentalClosed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAQL,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,CAQ3E;AAED,wBAAgB,sBAAsB,IAAI,gBAAgB,CAAC,YAAY,CAAC,CAQvE;AAED,wBAAgB,oBAAoB,IAAI,cAAc,CACpD,gBAAgB,EAChB,YAAY,CACb,CAEA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
+
export type ReservationContested = {
|
|
10
|
+
contract: Address;
|
|
11
|
+
defender: Address;
|
|
12
|
+
challenger: Address;
|
|
13
|
+
defenderRefund: bigint;
|
|
14
|
+
defenderBonus: bigint;
|
|
15
|
+
/**
|
|
16
|
+
* 0..=10_000 — how late in the active rental the challenger bid
|
|
17
|
+
* (now / active_duration). Drives the ramped minimum-bid floor.
|
|
18
|
+
*/
|
|
19
|
+
floorClosenessBps: bigint;
|
|
20
|
+
/**
|
|
21
|
+
* 0..=10_000 — how long the defender held the reservation
|
|
22
|
+
* (hold_time / active_duration). Drives the bonus rate scaling.
|
|
23
|
+
*/
|
|
24
|
+
bonusClosenessBps: bigint;
|
|
25
|
+
/** Stardust contest minimum-bid floor at the moment of this contest. */
|
|
26
|
+
minBidStardust: bigint;
|
|
27
|
+
};
|
|
28
|
+
export type ReservationContestedArgs = {
|
|
29
|
+
contract: Address;
|
|
30
|
+
defender: Address;
|
|
31
|
+
challenger: Address;
|
|
32
|
+
defenderRefund: number | bigint;
|
|
33
|
+
defenderBonus: number | bigint;
|
|
34
|
+
/**
|
|
35
|
+
* 0..=10_000 — how late in the active rental the challenger bid
|
|
36
|
+
* (now / active_duration). Drives the ramped minimum-bid floor.
|
|
37
|
+
*/
|
|
38
|
+
floorClosenessBps: number | bigint;
|
|
39
|
+
/**
|
|
40
|
+
* 0..=10_000 — how long the defender held the reservation
|
|
41
|
+
* (hold_time / active_duration). Drives the bonus rate scaling.
|
|
42
|
+
*/
|
|
43
|
+
bonusClosenessBps: number | bigint;
|
|
44
|
+
/** Stardust contest minimum-bid floor at the moment of this contest. */
|
|
45
|
+
minBidStardust: number | bigint;
|
|
46
|
+
};
|
|
47
|
+
export declare function getReservationContestedEncoder(): FixedSizeEncoder<ReservationContestedArgs>;
|
|
48
|
+
export declare function getReservationContestedDecoder(): FixedSizeDecoder<ReservationContested>;
|
|
49
|
+
export declare function getReservationContestedCodec(): FixedSizeCodec<ReservationContestedArgs, ReservationContested>;
|
|
50
|
+
//# sourceMappingURL=reservationContested.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reservationContested.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/reservationContested.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAQL,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC,wEAAwE;IACxE,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC,CAAC;AAEF,wBAAgB,8BAA8B,IAAI,gBAAgB,CAAC,wBAAwB,CAAC,CAW3F;AAED,wBAAgB,8BAA8B,IAAI,gBAAgB,CAAC,oBAAoB,CAAC,CAWvF;AAED,wBAAgB,4BAA4B,IAAI,cAAc,CAC5D,wBAAwB,EACxB,oBAAoB,CACrB,CAKA"}
|
|
@@ -9,7 +9,7 @@ import { type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSiz
|
|
|
9
9
|
export type ReservationCreated = {
|
|
10
10
|
contract: Address;
|
|
11
11
|
challenger: Address;
|
|
12
|
-
bidPoints:
|
|
12
|
+
bidPoints: bigint;
|
|
13
13
|
bidAtlas: bigint;
|
|
14
14
|
escrowAmount: bigint;
|
|
15
15
|
serviceFee: bigint;
|
|
@@ -19,7 +19,7 @@ export type ReservationCreated = {
|
|
|
19
19
|
export type ReservationCreatedArgs = {
|
|
20
20
|
contract: Address;
|
|
21
21
|
challenger: Address;
|
|
22
|
-
bidPoints: number;
|
|
22
|
+
bidPoints: number | bigint;
|
|
23
23
|
bidAtlas: number | bigint;
|
|
24
24
|
escrowAmount: number | bigint;
|
|
25
25
|
serviceFee: number | bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservationCreated.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/reservationCreated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"reservationCreated.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/reservationCreated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAYL,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,wBAAgB,4BAA4B,IAAI,gBAAgB,CAAC,sBAAsB,CAAC,CAWvF;AAED,wBAAgB,4BAA4B,IAAI,gBAAgB,CAAC,kBAAkB,CAAC,CAWnF;AAED,wBAAgB,0BAA0B,IAAI,cAAc,CAC1D,sBAAsB,EACtB,kBAAkB,CACnB,CAKA"}
|
|
@@ -26,7 +26,7 @@ export interface CreateBorrowerParams {
|
|
|
26
26
|
* Create a borrower state account
|
|
27
27
|
*
|
|
28
28
|
* Creates a BorrowerState PDA and an associated managed token account.
|
|
29
|
-
* The managed token account holds ATLAS refunds from reservation
|
|
29
|
+
* The managed token account holds ATLAS refunds from reservation contests.
|
|
30
30
|
*
|
|
31
31
|
* @param params - Borrower creation parameters
|
|
32
32
|
* @param config - Optional SDK configuration overrides
|
|
@@ -68,6 +68,16 @@ export interface CreateContractParams {
|
|
|
68
68
|
* @default true
|
|
69
69
|
*/
|
|
70
70
|
reservationsDisabled?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Number of contests that must accumulate before the contract rate
|
|
73
|
+
* auto-increments by `capture_rate_bps`. Owner-tunable per contract.
|
|
74
|
+
*
|
|
75
|
+
* - `0` disables capture-rate entirely (rate stays fixed forever).
|
|
76
|
+
* - `1..=10` enables it with the chosen sensitivity.
|
|
77
|
+
*
|
|
78
|
+
* @default 1
|
|
79
|
+
*/
|
|
80
|
+
contestedThreshold?: number;
|
|
71
81
|
/**
|
|
72
82
|
* Enable contract automation thread (default: true)
|
|
73
83
|
* When true, bundles createContractThread into the same transaction.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createContract.d.ts","sourceRoot":"","sources":["../../../src/instructions/createContract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAyC,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAkC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;;;OAIG;IACH,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IAExB;;;;;OAKG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;;;;OAKG;IACH,WAAW,EAAE,aAAa,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC;IAE/B;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IA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aAAa,CAAC;IAE/B;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAE7B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CA4HjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createContractThread.d.ts","sourceRoot":"","sources":["../../../src/instructions/createContractThread.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,EAAyC,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAU5D,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"createContractThread.d.ts","sourceRoot":"","sources":["../../../src/instructions/createContractThread.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,EAAyC,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAU5D,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG1D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB,uEAAuE;IACvE,YAAY,EAAE,aAAa,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,0BAA0B,EAClC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CA2EjD"}
|
|
@@ -51,6 +51,14 @@ export interface ReserveRentalParams {
|
|
|
51
51
|
* If provided, the affiliate receives a portion of fees
|
|
52
52
|
*/
|
|
53
53
|
referrer?: Address | string;
|
|
54
|
+
/**
|
|
55
|
+
* When true (default) and neither `bidAtlas` nor `bidPoints` is set,
|
|
56
|
+
* the wrapper fetches the contract's current minimum bid via
|
|
57
|
+
* `getMinimumBid` and submits exactly that as `bidAtlas`. Set to `false`
|
|
58
|
+
* to opt out — the instruction will then go through with bid = 0 and
|
|
59
|
+
* the program will reject if a defender already exists.
|
|
60
|
+
*/
|
|
61
|
+
autoMinBid?: boolean;
|
|
54
62
|
/**
|
|
55
63
|
* Optional compute units to allocate for the transaction
|
|
56
64
|
* @example 200000
|
|
@@ -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;AAWzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
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;AAWzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,UAAU,EAAE,eAAe,CAAC;IAE5B;;OAEG;IACH,iBAAiB,EAAE,OAAO,GAAG,MAAM,CAAC;IAEpC;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,EAAE,aAAa,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE5B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAqJjD"}
|
|
@@ -83,9 +83,10 @@ export interface UpdateConfigParams {
|
|
|
83
83
|
*/
|
|
84
84
|
atlasPerPoint?: number | bigint | null;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Maximum floor multiplier in basis points (100 = 1×, 465 = 4.65×).
|
|
87
|
+
* 100 disables the snipe ramp; 100..=10000 enables it.
|
|
87
88
|
*/
|
|
88
|
-
|
|
89
|
+
contestedMultiplierMaxBps?: number | null;
|
|
89
90
|
/**
|
|
90
91
|
* Optional compute units to allocate for the transaction
|
|
91
92
|
* @example 400000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateConfig.d.ts","sourceRoot":"","sources":["../../../src/instructions/updateConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,KAAK,OAAO,EAEb,MAAM,aAAa,CAAC;AAErB,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAEnC;;OA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CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1C;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAuDjD"}
|
|
@@ -67,6 +67,14 @@ export interface UpdateContractParams {
|
|
|
67
67
|
* Set to true to flag contract for closure after current rental ends.
|
|
68
68
|
*/
|
|
69
69
|
toClose?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Number of contests that must accumulate before the contract rate
|
|
72
|
+
* auto-increments by `capture_rate_bps`. Owner-tunable per contract.
|
|
73
|
+
*
|
|
74
|
+
* - `0` disables capture-rate entirely (rate stays fixed forever).
|
|
75
|
+
* - `1..=10` enables it with the chosen sensitivity.
|
|
76
|
+
*/
|
|
77
|
+
contestedThreshold?: number;
|
|
70
78
|
/**
|
|
71
79
|
* Optional compute units to allocate for the transaction
|
|
72
80
|
* @example 400000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateContract.d.ts","sourceRoot":"","sources":["../../../src/instructions/updateContract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEpD,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;AACzE,OA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WAAW,oBAAoB;IACnC;;;;OAIG;IACH,SAAS,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,aAAa,CAAC;IAE/B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAyEjD"}
|
|
@@ -20,6 +20,7 @@ export * from '../instructions';
|
|
|
20
20
|
export * from '../accounts';
|
|
21
21
|
export * from '../params';
|
|
22
22
|
export * from '../pda';
|
|
23
|
+
export * from '../cost';
|
|
23
24
|
export { claim, type ClaimParams } from '@wuwei-labs/slyvault';
|
|
24
25
|
export * as codama from '../generated/codama';
|
|
25
26
|
//# 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;
|
|
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,EACL,KAAK,EACL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @purpose Reservation bid math helpers
|
|
3
|
+
*
|
|
4
|
+
* Pure-math + on-chain-fetch helpers for computing the contest minimum-bid
|
|
5
|
+
* floor that a challenger must clear to take an existing reservation.
|
|
6
|
+
* Mirrors the on-chain `ConfigState::bid_min_stardust` formula so client UIs
|
|
7
|
+
* (and on-chain-aware tooling) can preview the floor without hitting an RPC
|
|
8
|
+
* for every keystroke.
|
|
9
|
+
*/
|
|
10
|
+
import { type Address } from '@solana/kit';
|
|
11
|
+
/**
|
|
12
|
+
* Pure math: contest minimum-bid floor in stardust.
|
|
13
|
+
*
|
|
14
|
+
* Mirror of `ConfigState::bid_min_stardust` on-chain.
|
|
15
|
+
*
|
|
16
|
+
* floor = max(rate, defenderBid) × ramp
|
|
17
|
+
* ramp = max(captureRate, 1 + (maxMult - 1) × closeness)
|
|
18
|
+
*
|
|
19
|
+
* `closenessFraction` is in `[0, 1]` — the fraction of the active rental's
|
|
20
|
+
* remaining window that has elapsed since the defender's reservation. 0 =
|
|
21
|
+
* defender just placed; 1 = active rental about to end (snipe).
|
|
22
|
+
*
|
|
23
|
+
* `contestedMultiplierMaxBps` is on the protocol's custom 100=1× scale:
|
|
24
|
+
* 100 disables the ramp, 10_000 = 100×.
|
|
25
|
+
*/
|
|
26
|
+
export declare function computeMinimumBid(args: {
|
|
27
|
+
rateStardust: bigint;
|
|
28
|
+
defenderBidStardust?: bigint;
|
|
29
|
+
contestedMultiplierMaxBps: number;
|
|
30
|
+
captureRateBps: bigint;
|
|
31
|
+
closenessFraction: number;
|
|
32
|
+
}): bigint;
|
|
33
|
+
export type MinimumBid = {
|
|
34
|
+
/** Stardust amount a challenger must bid to clear the floor. */
|
|
35
|
+
minBidStardust: bigint;
|
|
36
|
+
/** Stardust amount of the existing defender bid (sum of bidAtlas + bidPoints
|
|
37
|
+
* converted via `atlasPerPoint`). 0 if no defender. */
|
|
38
|
+
defenderBidStardust: bigint;
|
|
39
|
+
/** Contract rate per day in stardust. */
|
|
40
|
+
rateStardust: bigint;
|
|
41
|
+
/** Closeness fraction at the moment of evaluation (0..1). */
|
|
42
|
+
closenessFraction: number;
|
|
43
|
+
/** Effective ramp multiplier applied (e.g. 4.65 for 4.65×). */
|
|
44
|
+
rampMultiplier: number;
|
|
45
|
+
/** Unix-second timestamp the floor was computed for (now + delaySeconds). */
|
|
46
|
+
evaluatedAtSeconds: number;
|
|
47
|
+
/** Active rental's end_time in unix seconds, if an active rental exists. */
|
|
48
|
+
activeEndSeconds: number | null;
|
|
49
|
+
/** Active rental's start_time in unix seconds, if one exists. */
|
|
50
|
+
activeStartSeconds: number | null;
|
|
51
|
+
};
|
|
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
|
+
//# sourceMappingURL=bidMath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bidMath.d.ts","sourceRoot":"","sources":["../../../src/utils/bidMath.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAa3C;;;;;;;;;;;;;;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;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;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;;gCAE4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,UAAU,CAAC,CAmGtB"}
|
|
@@ -11,5 +11,6 @@ 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, getMinimumBid, type MinimumBid, } from './bidMath';
|
|
14
15
|
export { createDiscount, deserializeDiscountAuth, type CreateDiscountParams, type SerializedDiscountAuth, type MessageSigner, } from './discountAuth';
|
|
15
16
|
//# 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,EACrB,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,EACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,WAAW,EACX,eAAe,EACf,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACrC,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,iBAAiB,EACjB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC"}
|
|
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,EACrB,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,EACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,WAAW,EACX,eAAe,EACf,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACrC,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,iBAAiB,EACjB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.3.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wuwei-labs/srsly",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "TypeScript SDK for SRSLY",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@codama/nodes-from-anchor": "^1.2.9",
|
|
60
60
|
"@codama/renderers-js": "^1.4.2",
|
|
61
61
|
"@solana/kit": "^2.1.1",
|
|
62
|
-
"@wuwei-labs/slyvault": "1.
|
|
62
|
+
"@wuwei-labs/slyvault": "1.3.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/node": "^24.0.3",
|