@wuwei-labs/srsly 4.1.4 → 4.2.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/demos.js +13 -26
- package/dist/cjs/demos.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/configState.js +3 -1
- package/dist/cjs/generated/codama/accounts/configState.js.map +1 -1
- package/dist/cjs/generated/codama/accounts/contractState.js +2 -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/errors/srsly.js +7 -4
- package/dist/cjs/generated/codama/errors/srsly.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/acceptRental.js +39 -11
- package/dist/cjs/generated/codama/instructions/acceptRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/activateRental.js +1 -70
- package/dist/cjs/generated/codama/instructions/activateRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/closeRental.js +170 -25
- package/dist/cjs/generated/codama/instructions/closeRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/createConfig.js +0 -8
- package/dist/cjs/generated/codama/instructions/createConfig.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/deleteBorrower.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/deleteContract.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/deleteContractThread.js +175 -0
- package/dist/cjs/generated/codama/instructions/deleteContractThread.js.map +1 -0
- package/dist/cjs/generated/codama/instructions/deleteRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/index.js +1 -1
- package/dist/cjs/generated/codama/instructions/index.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/reserveRental.js +7 -10
- package/dist/cjs/generated/codama/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/generated/codama/instructions/updateConfig.js +2 -0
- package/dist/cjs/generated/codama/instructions/updateConfig.js.map +1 -1
- package/dist/cjs/generated/codama/programs/srsly.js +18 -18
- package/dist/cjs/generated/codama/programs/srsly.js.map +1 -1
- package/dist/cjs/generated/codama/types/fleet.js +14 -0
- package/dist/cjs/generated/codama/types/fleet.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 -0
- package/dist/cjs/generated/codama/types/rentalClosed.js.map +1 -1
- package/dist/cjs/generated/codama/types/reservationCreated.js +2 -0
- package/dist/cjs/generated/codama/types/reservationCreated.js.map +1 -1
- package/dist/cjs/generated/codama/types/shipStats.js +2 -0
- package/dist/cjs/generated/codama/types/shipStats.js.map +1 -1
- package/dist/cjs/instructions/acceptRental.js +15 -23
- package/dist/cjs/instructions/acceptRental.js.map +1 -1
- package/dist/cjs/instructions/activateRental.js +0 -8
- package/dist/cjs/instructions/activateRental.js.map +1 -1
- package/dist/cjs/instructions/closeContract.js +79 -27
- package/dist/cjs/instructions/closeContract.js.map +1 -1
- package/dist/cjs/instructions/closeRental.js +25 -20
- package/dist/cjs/instructions/closeRental.js.map +1 -1
- package/dist/cjs/instructions/createConfig.js +1 -4
- package/dist/cjs/instructions/createConfig.js.map +1 -1
- package/dist/cjs/instructions/deleteContractThread.js +65 -0
- package/dist/cjs/instructions/deleteContractThread.js.map +1 -0
- package/dist/cjs/instructions/index.js +1 -1
- package/dist/cjs/instructions/index.js.map +1 -1
- package/dist/cjs/instructions/invalidateRental.js +10 -7
- package/dist/cjs/instructions/invalidateRental.js.map +1 -1
- package/dist/cjs/instructions/releaseRental.js +10 -7
- package/dist/cjs/instructions/releaseRental.js.map +1 -1
- package/dist/cjs/instructions/reserveRental.js +3 -10
- package/dist/cjs/instructions/reserveRental.js.map +1 -1
- package/dist/cjs/instructions/updateConfig.js +1 -0
- package/dist/cjs/instructions/updateConfig.js.map +1 -1
- package/dist/cjs/kit/index.js +2 -2
- package/dist/cjs/kit/index.js.map +1 -1
- package/dist/cjs/legacy/index.js +2 -3
- package/dist/cjs/legacy/index.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/utils/config.js.map +1 -1
- package/dist/cjs/utils/discountAuth.js +45 -106
- package/dist/cjs/utils/discountAuth.js.map +1 -1
- package/dist/cjs/utils/index.js +1 -7
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/demos.js +12 -25
- package/dist/esm/demos.js.map +1 -1
- package/dist/esm/generated/codama/accounts/configState.js +3 -1
- package/dist/esm/generated/codama/accounts/configState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/contractState.js +2 -0
- package/dist/esm/generated/codama/accounts/contractState.js.map +1 -1
- package/dist/esm/generated/codama/accounts/rentalState.js +6 -4
- package/dist/esm/generated/codama/accounts/rentalState.js.map +1 -1
- package/dist/esm/generated/codama/errors/srsly.js +6 -3
- package/dist/esm/generated/codama/errors/srsly.js.map +1 -1
- package/dist/esm/generated/codama/instructions/acceptRental.js +40 -12
- package/dist/esm/generated/codama/instructions/acceptRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/activateRental.js +1 -70
- package/dist/esm/generated/codama/instructions/activateRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/closeRental.js +170 -25
- package/dist/esm/generated/codama/instructions/closeRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/createConfig.js +0 -8
- package/dist/esm/generated/codama/instructions/createConfig.js.map +1 -1
- package/dist/esm/generated/codama/instructions/deleteBorrower.js.map +1 -1
- package/dist/esm/generated/codama/instructions/deleteContract.js.map +1 -1
- package/dist/esm/generated/codama/instructions/deleteContractThread.js +165 -0
- package/dist/esm/generated/codama/instructions/deleteContractThread.js.map +1 -0
- package/dist/esm/generated/codama/instructions/deleteRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/index.js +1 -1
- package/dist/esm/generated/codama/instructions/index.js.map +1 -1
- package/dist/esm/generated/codama/instructions/reserveRental.js +8 -11
- package/dist/esm/generated/codama/instructions/reserveRental.js.map +1 -1
- package/dist/esm/generated/codama/instructions/updateConfig.js +2 -0
- package/dist/esm/generated/codama/instructions/updateConfig.js.map +1 -1
- package/dist/esm/generated/codama/programs/srsly.js +18 -18
- package/dist/esm/generated/codama/programs/srsly.js.map +1 -1
- package/dist/esm/generated/codama/types/fleet.js +15 -1
- package/dist/esm/generated/codama/types/fleet.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 -1
- package/dist/esm/generated/codama/types/rentalClosed.js.map +1 -1
- package/dist/esm/generated/codama/types/reservationCreated.js +3 -1
- package/dist/esm/generated/codama/types/reservationCreated.js.map +1 -1
- package/dist/esm/generated/codama/types/shipStats.js +3 -1
- package/dist/esm/generated/codama/types/shipStats.js.map +1 -1
- package/dist/esm/instructions/acceptRental.js +15 -23
- package/dist/esm/instructions/acceptRental.js.map +1 -1
- package/dist/esm/instructions/activateRental.js +0 -8
- package/dist/esm/instructions/activateRental.js.map +1 -1
- package/dist/esm/instructions/closeContract.js +79 -27
- package/dist/esm/instructions/closeContract.js.map +1 -1
- package/dist/esm/instructions/closeRental.js +25 -20
- package/dist/esm/instructions/closeRental.js.map +1 -1
- package/dist/esm/instructions/createConfig.js +1 -4
- package/dist/esm/instructions/createConfig.js.map +1 -1
- package/dist/esm/instructions/deleteContractThread.js +62 -0
- package/dist/esm/instructions/deleteContractThread.js.map +1 -0
- package/dist/esm/instructions/index.js +1 -1
- package/dist/esm/instructions/index.js.map +1 -1
- package/dist/esm/instructions/invalidateRental.js +10 -7
- package/dist/esm/instructions/invalidateRental.js.map +1 -1
- package/dist/esm/instructions/releaseRental.js +10 -7
- package/dist/esm/instructions/releaseRental.js.map +1 -1
- package/dist/esm/instructions/reserveRental.js +3 -10
- package/dist/esm/instructions/reserveRental.js.map +1 -1
- package/dist/esm/instructions/updateConfig.js +1 -0
- package/dist/esm/instructions/updateConfig.js.map +1 -1
- package/dist/esm/kit/index.js +1 -1
- package/dist/esm/kit/index.js.map +1 -1
- package/dist/esm/legacy/index.js +1 -2
- package/dist/esm/legacy/index.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/utils/config.js.map +1 -1
- package/dist/esm/utils/discountAuth.js +45 -103
- package/dist/esm/utils/discountAuth.js.map +1 -1
- package/dist/esm/utils/index.js +0 -2
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/idl/srsly.json +411 -352
- package/dist/types/demos.d.ts +0 -2
- package/dist/types/demos.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/configState.d.ts +4 -0
- package/dist/types/generated/codama/accounts/configState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/contractState.d.ts +4 -0
- package/dist/types/generated/codama/accounts/contractState.d.ts.map +1 -1
- package/dist/types/generated/codama/accounts/rentalState.d.ts +13 -9
- package/dist/types/generated/codama/accounts/rentalState.d.ts.map +1 -1
- package/dist/types/generated/codama/errors/srsly.d.ts +5 -3
- package/dist/types/generated/codama/errors/srsly.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/acceptRental.d.ts +53 -32
- package/dist/types/generated/codama/instructions/acceptRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/activateRental.d.ts +18 -49
- package/dist/types/generated/codama/instructions/activateRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/closeRental.d.ts +83 -28
- package/dist/types/generated/codama/instructions/closeRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/createConfig.d.ts +3 -3
- package/dist/types/generated/codama/instructions/createConfig.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/deleteBorrower.d.ts +3 -0
- package/dist/types/generated/codama/instructions/deleteBorrower.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/deleteContract.d.ts +3 -0
- package/dist/types/generated/codama/instructions/deleteContract.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/deleteContractThread.d.ts +70 -0
- package/dist/types/generated/codama/instructions/deleteContractThread.d.ts.map +1 -0
- package/dist/types/generated/codama/instructions/deleteRental.d.ts +3 -0
- package/dist/types/generated/codama/instructions/deleteRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/index.d.ts +1 -1
- package/dist/types/generated/codama/instructions/index.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/reserveRental.d.ts +18 -23
- package/dist/types/generated/codama/instructions/reserveRental.d.ts.map +1 -1
- package/dist/types/generated/codama/instructions/updateConfig.d.ts +6 -0
- package/dist/types/generated/codama/instructions/updateConfig.d.ts.map +1 -1
- package/dist/types/generated/codama/programs/srsly.d.ts +18 -18
- package/dist/types/generated/codama/programs/srsly.d.ts.map +1 -1
- package/dist/types/generated/codama/types/fleet.d.ts +14 -0
- package/dist/types/generated/codama/types/fleet.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 +8 -1
- package/dist/types/generated/codama/types/rentalClosed.d.ts.map +1 -1
- package/dist/types/generated/codama/types/reservationCreated.d.ts +2 -0
- package/dist/types/generated/codama/types/reservationCreated.d.ts.map +1 -1
- package/dist/types/generated/codama/types/shipStats.d.ts +3 -1
- package/dist/types/generated/codama/types/shipStats.d.ts.map +1 -1
- package/dist/types/instructions/acceptRental.d.ts +3 -12
- package/dist/types/instructions/acceptRental.d.ts.map +1 -1
- package/dist/types/instructions/activateRental.d.ts.map +1 -1
- package/dist/types/instructions/closeContract.d.ts +5 -0
- package/dist/types/instructions/closeContract.d.ts.map +1 -1
- package/dist/types/instructions/closeRental.d.ts.map +1 -1
- package/dist/types/instructions/createConfig.d.ts +4 -4
- package/dist/types/instructions/createConfig.d.ts.map +1 -1
- package/dist/types/instructions/deleteContractThread.d.ts +42 -0
- package/dist/types/instructions/deleteContractThread.d.ts.map +1 -0
- package/dist/types/instructions/index.d.ts +1 -1
- package/dist/types/instructions/index.d.ts.map +1 -1
- package/dist/types/instructions/invalidateRental.d.ts +4 -3
- package/dist/types/instructions/invalidateRental.d.ts.map +1 -1
- package/dist/types/instructions/releaseRental.d.ts +4 -3
- package/dist/types/instructions/releaseRental.d.ts.map +1 -1
- package/dist/types/instructions/reserveRental.d.ts +0 -7
- package/dist/types/instructions/reserveRental.d.ts.map +1 -1
- package/dist/types/instructions/updateConfig.d.ts +4 -4
- package/dist/types/instructions/updateConfig.d.ts.map +1 -1
- package/dist/types/kit/index.d.ts +1 -1
- 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/utils/config.d.ts +3 -3
- package/dist/types/utils/config.d.ts.map +1 -1
- package/dist/types/utils/discountAuth.d.ts +38 -70
- package/dist/types/utils/discountAuth.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -11,8 +11,15 @@ export type RentalClosed = {
|
|
|
11
11
|
contract: Address;
|
|
12
12
|
borrower: Address;
|
|
13
13
|
pointsAwarded: number;
|
|
14
|
+
feeFlushed: bigint;
|
|
15
|
+
};
|
|
16
|
+
export type RentalClosedArgs = {
|
|
17
|
+
rentalState: Address;
|
|
18
|
+
contract: Address;
|
|
19
|
+
borrower: Address;
|
|
20
|
+
pointsAwarded: number;
|
|
21
|
+
feeFlushed: number | bigint;
|
|
14
22
|
};
|
|
15
|
-
export type RentalClosedArgs = RentalClosed;
|
|
16
23
|
export declare function getRentalClosedEncoder(): FixedSizeEncoder<RentalClosedArgs>;
|
|
17
24
|
export declare function getRentalClosedDecoder(): FixedSizeDecoder<RentalClosed>;
|
|
18
25
|
export declare function getRentalClosedCodec(): FixedSizeCodec<RentalClosedArgs, RentalClosed>;
|
|
@@ -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,EAUL,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,CAAC;IACtB,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"}
|
|
@@ -13,6 +13,7 @@ export type ReservationCreated = {
|
|
|
13
13
|
bidAtlas: bigint;
|
|
14
14
|
escrowAmount: bigint;
|
|
15
15
|
serviceFee: bigint;
|
|
16
|
+
feeBps: number;
|
|
16
17
|
durationSeconds: bigint;
|
|
17
18
|
};
|
|
18
19
|
export type ReservationCreatedArgs = {
|
|
@@ -22,6 +23,7 @@ export type ReservationCreatedArgs = {
|
|
|
22
23
|
bidAtlas: number | bigint;
|
|
23
24
|
escrowAmount: number | bigint;
|
|
24
25
|
serviceFee: number | bigint;
|
|
26
|
+
feeBps: number;
|
|
25
27
|
durationSeconds: number | bigint;
|
|
26
28
|
};
|
|
27
29
|
export declare function getReservationCreatedEncoder(): FixedSizeEncoder<ReservationCreatedArgs>;
|
|
@@ -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,EAcL,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,CAAC;IAClB,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"}
|
|
@@ -6,16 +6,18 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
|
|
9
|
-
import { type CargoStats, type CargoStatsArgs, type MiscStats, type MiscStatsArgs, type MovementStats, type MovementStatsArgs } from ".";
|
|
9
|
+
import { type CargoStats, type CargoStatsArgs, type CombatStats, type CombatStatsArgs, type MiscStats, type MiscStatsArgs, type MovementStats, type MovementStatsArgs } from ".";
|
|
10
10
|
/** A ship's stats */
|
|
11
11
|
export type ShipStats = {
|
|
12
12
|
movementStats: MovementStats;
|
|
13
13
|
cargoStats: CargoStats;
|
|
14
|
+
combatStats: CombatStats;
|
|
14
15
|
miscStats: MiscStats;
|
|
15
16
|
};
|
|
16
17
|
export type ShipStatsArgs = {
|
|
17
18
|
movementStats: MovementStatsArgs;
|
|
18
19
|
cargoStats: CargoStatsArgs;
|
|
20
|
+
combatStats: CombatStatsArgs;
|
|
19
21
|
miscStats: MiscStatsArgs;
|
|
20
22
|
};
|
|
21
23
|
export declare function getShipStatsEncoder(): FixedSizeEncoder<ShipStatsArgs>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipStats.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/shipStats.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"shipStats.d.ts","sourceRoot":"","sources":["../../../../../src/generated/codama/types/shipStats.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EASL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACvB,MAAM,GAAG,CAAC;AAEX,qBAAqB;AACrB,MAAM,MAAM,SAAS,GAAG;IACtB,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,EAAE,iBAAiB,CAAC;IACjC,UAAU,EAAE,cAAc,CAAC;IAC3B,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,gBAAgB,CAAC,aAAa,CAAC,CAOrE;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAOjE;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAAC,aAAa,EAAE,SAAS,CAAC,CAE5E"}
|
|
@@ -10,7 +10,6 @@ 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 SerializedDiscountAuth } from '../utils/discountAuth';
|
|
14
13
|
/**
|
|
15
14
|
* Parameters for accepting a rental contract
|
|
16
15
|
*/
|
|
@@ -21,11 +20,10 @@ export interface AcceptRentalParams {
|
|
|
21
20
|
*/
|
|
22
21
|
borrower: UniversalSigner;
|
|
23
22
|
/**
|
|
24
|
-
* Borrower's profile address in Star Atlas SAGE
|
|
23
|
+
* Borrower's profile address in Star Atlas SAGE
|
|
25
24
|
* This is the profile that will control the fleet during rental
|
|
26
|
-
* If not provided, it will be fetched from borrower_state
|
|
27
25
|
*/
|
|
28
|
-
borrowerProfile
|
|
26
|
+
borrowerProfile: Address | string;
|
|
29
27
|
/**
|
|
30
28
|
* Rental contract address to accept
|
|
31
29
|
*/
|
|
@@ -49,13 +47,6 @@ export interface AcceptRentalParams {
|
|
|
49
47
|
* @example 400000
|
|
50
48
|
*/
|
|
51
49
|
computeUnits?: number;
|
|
52
|
-
/**
|
|
53
|
-
* Optional discount authorization from an affiliate member
|
|
54
|
-
*
|
|
55
|
-
* Accepts a SerializedDiscountAuth from createDiscount() (JSON-safe, for server-to-client).
|
|
56
|
-
* Use createDiscount() to generate this value before calling acceptRental().
|
|
57
|
-
*/
|
|
58
|
-
discountAuth?: SerializedDiscountAuth | null;
|
|
59
50
|
/**
|
|
60
51
|
* Expected rental rate (optional client-side safety check)
|
|
61
52
|
*
|
|
@@ -94,9 +85,9 @@ export interface AcceptRentalParams {
|
|
|
94
85
|
*
|
|
95
86
|
* @example
|
|
96
87
|
* ```typescript
|
|
97
|
-
* // Accept a 7-day rental (borrowerProfile auto-fetched)
|
|
98
88
|
* const ixs = await acceptRental({
|
|
99
89
|
* borrower: wallet,
|
|
90
|
+
* borrowerProfile: "BORROWER_PROFILE_ADDRESS",
|
|
100
91
|
* contract: "CONTRACT_ADDRESS",
|
|
101
92
|
* duration: { days: 7 },
|
|
102
93
|
* computeUnits: 400_000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acceptRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/acceptRental.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":"acceptRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/acceptRental.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;AASzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B;;;OAGG;IACH,eAAe,EAAE,OAAO,GAAG,MAAM,CAAC;IAElC;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE5B;;;;;;OAMG;IACH,QAAQ,EAAE,aAAa,CAAC;IAExB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAuJjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activateRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/activateRental.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,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAU5D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,wDAAwD;IACxD,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,eAAe,EAAE,OAAO,GAAG,MAAM,CAAC;IAElC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"activateRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/activateRental.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,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAU5D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,wDAAwD;IACxD,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,eAAe,EAAE,OAAO,GAAG,MAAM,CAAC;IAElC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAwEjD"}
|
|
@@ -33,6 +33,11 @@ export interface CloseContractParams {
|
|
|
33
33
|
* SAGE program address (optional - uses config default if not provided)
|
|
34
34
|
*/
|
|
35
35
|
sageProgram?: Address | string;
|
|
36
|
+
/**
|
|
37
|
+
* Borrower address for the queued rental (optional - auto-fetched if not provided)
|
|
38
|
+
* Only needed when a queued rental exists
|
|
39
|
+
*/
|
|
40
|
+
queuedBorrower?: Address | string;
|
|
36
41
|
/**
|
|
37
42
|
* Optional compute units to allocate for the transaction
|
|
38
43
|
* @example 400000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeContract.d.ts","sourceRoot":"","sources":["../../../src/instructions/closeContract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAwB,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"closeContract.d.ts","sourceRoot":"","sources":["../../../src/instructions/closeContract.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAwB,KAAK,OAAO,EAAoB,MAAM,aAAa,CAAC;AAEnF,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAQ5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE/B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAElC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAgLjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closeRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/closeRental.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"closeRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/closeRental.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAQ5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAuFjD"}
|
|
@@ -13,11 +13,11 @@ import { prepareInstructions } from '../utils/instructions';
|
|
|
13
13
|
*/
|
|
14
14
|
export interface CreateConfigParams {
|
|
15
15
|
/**
|
|
16
|
-
* Authority who will initialize the config
|
|
17
|
-
*
|
|
18
|
-
* Accepts
|
|
16
|
+
* Authority who will initialize the config
|
|
17
|
+
* Must be the authorized initializer keypair
|
|
18
|
+
* Accepts web3.js Keypair or @solana/kit signer
|
|
19
19
|
*/
|
|
20
|
-
authority
|
|
20
|
+
authority: UniversalSigner;
|
|
21
21
|
/**
|
|
22
22
|
* Slyvault address for storing funds
|
|
23
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createConfig.d.ts","sourceRoot":"","sources":["../../../src/instructions/createConfig.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;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,SAAS,
|
|
1
|
+
{"version":3,"file":"createConfig.d.ts","sourceRoot":"","sources":["../../../src/instructions/createConfig.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;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,SAAS,EAAE,eAAe,CAAC;IAE3B;;OAEG;IACH,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IAExB;;OAEG;IACH,iBAAiB,EAAE,OAAO,GAAG,MAAM,CAAC;IAEpC;;;OAGG;IACH,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAE9B;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAiDjD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @purpose Simplified deleteContractThread instruction wrapper
|
|
3
|
+
*
|
|
4
|
+
* Thin convenience wrapper around Codama-generated deleteContractThread instruction.
|
|
5
|
+
* Admin-only instruction to delete a contract's thread for schema migrations.
|
|
6
|
+
* Unlike closeContractThread, does not require the contract account.
|
|
7
|
+
*/
|
|
8
|
+
import { type Address } from '@solana/kit';
|
|
9
|
+
import { type SdkConfig } from '../utils/config';
|
|
10
|
+
import { type UniversalSigner } from '../utils/signer';
|
|
11
|
+
import { prepareInstructions } from '../utils/instructions';
|
|
12
|
+
/**
|
|
13
|
+
* Parameters for admin-deleting a contract automation thread
|
|
14
|
+
*/
|
|
15
|
+
export interface DeleteContractThreadParams {
|
|
16
|
+
/**
|
|
17
|
+
* Admin authority (must be config.admin)
|
|
18
|
+
* Accepts string address, web3.js Keypair, or @solana/kit signer
|
|
19
|
+
*/
|
|
20
|
+
admin: UniversalSigner;
|
|
21
|
+
/** Contract address whose thread to delete (used to derive thread PDA) */
|
|
22
|
+
contract: Address | string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional compute units to allocate for the transaction
|
|
25
|
+
* @example 400000
|
|
26
|
+
*/
|
|
27
|
+
computeUnits?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Admin-delete a per-contract automation thread
|
|
31
|
+
*
|
|
32
|
+
* Like closeContractThread but uses admin auth and does not require the
|
|
33
|
+
* contract account on-chain (for when contracts are already deleted or
|
|
34
|
+
* undeserializable). Fetches the thread account to read `fiberIds`, then
|
|
35
|
+
* derives and passes fiber PDAs as remaining accounts.
|
|
36
|
+
*
|
|
37
|
+
* @param params - Thread deletion parameters
|
|
38
|
+
* @param config - Optional SDK configuration overrides
|
|
39
|
+
* @returns Kit instruction (or web3.js if PublicKey in config)
|
|
40
|
+
*/
|
|
41
|
+
export declare function deleteContractThread(params: DeleteContractThreadParams, config?: Partial<SdkConfig>): Promise<ReturnType<typeof prepareInstructions>>;
|
|
42
|
+
//# sourceMappingURL=deleteContractThread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteContractThread.d.ts","sourceRoot":"","sources":["../../../src/instructions/deleteContractThread.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;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,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;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,CA8CjD"}
|
|
@@ -19,9 +19,9 @@ export * from './closeBorrower';
|
|
|
19
19
|
export * from './createBorrower';
|
|
20
20
|
export * from './deleteBorrower';
|
|
21
21
|
export * from './claimContract';
|
|
22
|
-
export * from './activateRental';
|
|
23
22
|
export * from './createContractThread';
|
|
24
23
|
export * from './closeContractThread';
|
|
24
|
+
export * from './deleteContractThread';
|
|
25
25
|
export * from './updateContractThread';
|
|
26
26
|
export * from './createConfig';
|
|
27
27
|
export * from './updateConfig';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
|
@@ -23,14 +23,15 @@ export interface InvalidateRentalParams {
|
|
|
23
23
|
signer: UniversalSigner;
|
|
24
24
|
/**
|
|
25
25
|
* Fleet owner's profile address (NOT borrower's)
|
|
26
|
-
*
|
|
26
|
+
* Optional — auto-fetched from fleet account when omitted
|
|
27
27
|
*/
|
|
28
|
-
ownerProfile
|
|
28
|
+
ownerProfile?: Address | string;
|
|
29
29
|
/**
|
|
30
30
|
* Owner's faction for starbase derivation
|
|
31
31
|
* Can be faction name ('mud', 'oni', 'ustur') or ID (1, 2, 3)
|
|
32
|
+
* Optional — auto-fetched from fleet account when omitted
|
|
32
33
|
*/
|
|
33
|
-
faction
|
|
34
|
+
faction?: string | number;
|
|
34
35
|
/**
|
|
35
36
|
* Optional compute units to allocate for the transaction
|
|
36
37
|
* @example 200000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invalidateRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/invalidateRental.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,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"invalidateRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/invalidateRental.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,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI5D;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,MAAM,EAAE,eAAe,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEhC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,sBAAsB,EAC9B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAuDjD"}
|
|
@@ -23,14 +23,15 @@ export interface ReleaseRentalParams {
|
|
|
23
23
|
signer: UniversalSigner;
|
|
24
24
|
/**
|
|
25
25
|
* Fleet owner's profile address (NOT borrower's)
|
|
26
|
-
*
|
|
26
|
+
* Optional — auto-fetched from fleet account when omitted
|
|
27
27
|
*/
|
|
28
|
-
ownerProfile
|
|
28
|
+
ownerProfile?: Address | string;
|
|
29
29
|
/**
|
|
30
30
|
* Owner's faction for starbase derivation
|
|
31
31
|
* Can be faction name ('mud', 'oni', 'ustur') or ID (1, 2, 3)
|
|
32
|
+
* Optional — auto-fetched from fleet account when omitted
|
|
32
33
|
*/
|
|
33
|
-
faction
|
|
34
|
+
faction?: string | number;
|
|
34
35
|
/**
|
|
35
36
|
* Optional compute units to allocate for the transaction
|
|
36
37
|
* @example 200000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releaseRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/releaseRental.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,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"releaseRental.d.ts","sourceRoot":"","sources":["../../../src/instructions/releaseRental.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,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI5D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,MAAM,EAAE,eAAe,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEhC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,EAC3B,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAuDjD"}
|
|
@@ -10,7 +10,6 @@ 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 SerializedDiscountAuth } from '../utils/discountAuth';
|
|
14
13
|
/**
|
|
15
14
|
* Parameters for reserving a rental contract
|
|
16
15
|
*/
|
|
@@ -47,12 +46,6 @@ export interface ReserveRentalParams {
|
|
|
47
46
|
* @example { days: 7 } // 7 days
|
|
48
47
|
*/
|
|
49
48
|
duration: DurationParam;
|
|
50
|
-
/**
|
|
51
|
-
* Optional discount authorization from an affiliate member
|
|
52
|
-
*
|
|
53
|
-
* Accepts a SerializedDiscountAuth from createDiscount() (JSON-safe, for server-to-client).
|
|
54
|
-
*/
|
|
55
|
-
discountAuth?: SerializedDiscountAuth | null;
|
|
56
49
|
/**
|
|
57
50
|
* Affiliate member state address (optional)
|
|
58
51
|
* If provided, the affiliate receives a portion of fees
|
|
@@ -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;AAE5D;;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;;;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,CAuIjD"}
|
|
@@ -78,14 +78,14 @@ export interface UpdateConfigParams {
|
|
|
78
78
|
* Rate increase in basis points after capture (10000 = 100%, 11000 = 110%)
|
|
79
79
|
*/
|
|
80
80
|
captureRateBps?: number | bigint | null;
|
|
81
|
-
/**
|
|
82
|
-
* Maximum discount rate for borrowers (global setting)
|
|
83
|
-
*/
|
|
84
|
-
maxDiscountBps?: number | null;
|
|
85
81
|
/**
|
|
86
82
|
* ATLAS lamports per point equivalent for reservation bidding
|
|
87
83
|
*/
|
|
88
84
|
atlasPerPoint?: number | bigint | null;
|
|
85
|
+
/**
|
|
86
|
+
* Knockoff bonus in basis points (500 = 5%)
|
|
87
|
+
*/
|
|
88
|
+
knockoffBonusBps?: number | bigint | null;
|
|
89
89
|
/**
|
|
90
90
|
* Optional compute units to allocate for the transaction
|
|
91
91
|
* @example 400000
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateConfig.d.ts","sourceRoot":"","sources":["../../../src/instructions/updateConfig.ts"],"names":[],"mappings":"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AC;IAEpC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAEvC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,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"}
|
|
@@ -20,6 +20,6 @@ export * from '../instructions';
|
|
|
20
20
|
export * from '../accounts';
|
|
21
21
|
export * from '../params';
|
|
22
22
|
export * from '../pda';
|
|
23
|
-
export {
|
|
23
|
+
export { deriveDiscountPda, claim, type ClaimParams } from '@wuwei-labs/slyvault';
|
|
24
24
|
export * as codama from '../generated/codama';
|
|
25
25
|
//# 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;AAGvB,OAAO,EACL,
|
|
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;AAGvB,OAAO,EACL,iBAAiB,EACjB,KAAK,EACL,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC"}
|
|
@@ -30,7 +30,7 @@ export * from '../pda';
|
|
|
30
30
|
export { VERSION } from '../version';
|
|
31
31
|
export * as codama from '../generated/codama';
|
|
32
32
|
export type * from '../instructions';
|
|
33
|
-
export {
|
|
33
|
+
export { deriveDiscountPda, type ClaimParams } from '@wuwei-labs/slyvault';
|
|
34
34
|
export declare const createContract: (params: kit.CreateContractParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
35
35
|
export declare const updateContract: (params: kit.UpdateContractParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
36
36
|
export declare const closeContract: (params: kit.CloseContractParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
@@ -48,7 +48,6 @@ export declare const closeBorrower: (params: kit.CloseBorrowerParams, config?: P
|
|
|
48
48
|
export declare const createBorrower: (params: kit.CreateBorrowerParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
49
49
|
export declare const deleteBorrower: (params: kit.DeleteBorrowerParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
50
50
|
export declare const claimContract: (params: kit.ClaimContractParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
51
|
-
export declare const activateRental: (params: kit.ActivateRentalParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
52
51
|
export declare const createContractThread: (params: kit.CreateContractThreadParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
53
52
|
export declare const closeContractThread: (params: kit.CloseContractThreadParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
54
53
|
export declare const updateContractThread: (params: kit.UpdateContractThreadParams, config?: Partial<import("../utils").SdkConfig> | undefined) => Promise<LegacyInstruction[]>;
|
|
@@ -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,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,mBAAmB,iBAAiB,CAAC;AAGrC,OAAO,EACL,
|
|
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;AAC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,iBAAiB,EAAE,CAiCD,CAAC;AAClD,eAAO,MAAM,cAAc,oGAlCJ,OAAO,CAAC,iBAAiB,EAAE,CAkCC,CAAC;AACpD,eAAO,MAAM,cAAc,oGAnCJ,OAAO,CAAC,iBAAiB,EAAE,CAmCC,CAAC;AACpD,eAAO,MAAM,aAAa,mGApCH,OAAO,CAAC,iBAAiB,EAAE,CAoCD,CAAC;AAClD,eAAO,MAAM,oBAAoB,0GArCV,OAAO,CAAC,iBAAiB,EAAE,CAqCa,CAAC;AAChE,eAAO,MAAM,mBAAmB,yGAtCT,OAAO,CAAC,iBAAiB,EAAE,CAsCW,CAAC;AAC9D,eAAO,MAAM,oBAAoB,0GAvCV,OAAO,CAAC,iBAAiB,EAAE,CAuCa,CAAC;AAChE,eAAO,MAAM,YAAY,kGAxCF,OAAO,CAAC,iBAAiB,EAAE,CAwCH,CAAC;AAChD,eAAO,MAAM,YAAY,kGAzCF,OAAO,CAAC,iBAAiB,EAAE,CAyCH,CAAC;AAChD,eAAO,MAAM,YAAY,kGA1CF,OAAO,CAAC,iBAAiB,EAAE,CA0CH,CAAC;AAChD,eAAO,MAAM,eAAe,qGA3CL,OAAO,CAAC,iBAAiB,EAAE,CA2CG,CAAC;AACtD,eAAO,MAAM,gBAAgB,kHA5CN,OAAO,CAAC,iBAAiB,EAAE,CA4CK,CAAC;AACxD,eAAO,MAAM,eAAe,iHA7CL,OAAO,CAAC,iBAAiB,EAAE,CA6CG,CAAC;AACtD,eAAO,MAAM,eAAe,qGA9CL,OAAO,CAAC,iBAAiB,EAAE,CA8CG,CAAC;AACtD,eAAO,MAAM,KAAK,kIA/CK,OAAO,CAAC,iBAAiB,EAAE,CA+Cb,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Commitment } from '@solana/kit';
|
|
8
8
|
import { type ProgramSet as AddressesProgramSet, type NetworkAddresses } from './addresses';
|
|
9
|
-
import {
|
|
9
|
+
import type { TransactionSigner } from '@solana/kit';
|
|
10
10
|
/**
|
|
11
11
|
* PublicKey constructor type for web3.js compatibility
|
|
12
12
|
*/
|
|
@@ -27,8 +27,8 @@ export type ProgramSet = AddressesProgramSet;
|
|
|
27
27
|
export interface AffiliateConfig {
|
|
28
28
|
/** Affiliate member PDA address */
|
|
29
29
|
address: string;
|
|
30
|
-
/** Signer for discount
|
|
31
|
-
signer:
|
|
30
|
+
/** Signer for discount creation (discount_authority or main authority) */
|
|
31
|
+
signer: TransactionSigner;
|
|
32
32
|
/** Slot buffer for expiry (default: 1000 slots, ~6-7 minutes) */
|
|
33
33
|
expirySlotBuffer?: bigint;
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAiG,KAAK,UAAU,IAAI,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE3L,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAiG,KAAK,UAAU,IAAI,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE3L,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,UAAU,GAAG,GAAG;IACpD,KAAK,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,OAAO,EAAE,MAA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G;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,gBAAgB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAS9F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAItE"}
|
|
@@ -1,94 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @purpose Discount
|
|
2
|
+
* @purpose Discount PDA helpers for rental discount vouchers
|
|
3
3
|
* @module utils/discountAuth
|
|
4
|
+
*
|
|
5
|
+
* The discount system uses on-chain PDAs instead of ed25519 signatures.
|
|
6
|
+
* Server creates a Discount PDA via slyvault's discount_create instruction,
|
|
7
|
+
* then returns the PDA address to the user for inclusion in rental transactions.
|
|
4
8
|
*/
|
|
5
|
-
import { type Address } from '@solana/kit';
|
|
6
|
-
import { type
|
|
9
|
+
import { type Address, type TransactionSigner } from '@solana/kit';
|
|
10
|
+
import { type CreateDiscountParams } from '@wuwei-labs/slyvault';
|
|
7
11
|
import { type SdkConfig } from './config';
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
/**
|
|
13
|
+
* A signer that can sign transactions
|
|
14
|
+
*/
|
|
15
|
+
export type DiscountAuthoritySigner = TransactionSigner;
|
|
16
|
+
export interface CreateDiscountForRentalParams {
|
|
10
17
|
/** Affiliate member state PDA address */
|
|
11
|
-
|
|
12
|
-
/** Context address
|
|
13
|
-
|
|
18
|
+
memberAddress: Address | string;
|
|
19
|
+
/** Context binding address (the borrower's wallet) */
|
|
20
|
+
context: Address | string;
|
|
14
21
|
/** Discount percentage (0-100) */
|
|
15
22
|
discount: number;
|
|
16
|
-
/**
|
|
17
|
-
|
|
23
|
+
/** Seconds from now until discount expires */
|
|
24
|
+
expirySeconds: number;
|
|
18
25
|
/**
|
|
19
26
|
* The discount authority signer
|
|
20
27
|
*
|
|
21
28
|
* Accepts:
|
|
22
|
-
* - A
|
|
29
|
+
* - A TransactionSigner from @solana/kit
|
|
23
30
|
* - A web3.js Keypair (with secretKey)
|
|
24
31
|
* - A Uint8Array or number[] of 64 bytes (secret key)
|
|
25
32
|
* - A JSON stringified keypair: "[1,2,3,...64 bytes]"
|
|
26
33
|
*/
|
|
27
|
-
discountAuthority:
|
|
34
|
+
discountAuthority: TransactionSigner | {
|
|
28
35
|
secretKey: Uint8Array;
|
|
29
36
|
} | Uint8Array | number[] | string;
|
|
30
37
|
}
|
|
31
38
|
/**
|
|
32
|
-
*
|
|
33
|
-
*/
|
|
34
|
-
export interface SerializedDiscountAuth {
|
|
35
|
-
/** Context address the authorization is bound to (the contract PDA) */
|
|
36
|
-
context: string;
|
|
37
|
-
memberNonce: number;
|
|
38
|
-
discountBps: number;
|
|
39
|
-
/** Slot as string (bigint serialized) */
|
|
40
|
-
expirySlot: string;
|
|
41
|
-
/** Signature as base64 string */
|
|
42
|
-
signature: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Create a signed discount authorization
|
|
46
|
-
*
|
|
47
|
-
* Server-side helper that fetches the member to get the nonce,
|
|
48
|
-
* then creates a signed discount authorization in a JSON-serializable format.
|
|
49
|
-
*
|
|
50
|
-
* @param params - Discount parameters including member address
|
|
51
|
-
* @param config - Optional SDK configuration overrides
|
|
52
|
-
* @returns A SerializedDiscountAuth object ready for API transport
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```typescript
|
|
56
|
-
* import { createDiscount } from '@wuwei-labs/srsly';
|
|
57
|
-
*
|
|
58
|
-
* const discountAuth = await createDiscount({
|
|
59
|
-
* address: 'AFFILIATE_MEMBER_PDA',
|
|
60
|
-
* discount: 10, // 10%
|
|
61
|
-
* expirySlots: 1000, // ~6-7 minutes
|
|
62
|
-
* discountAuthority: serverKeypair,
|
|
63
|
-
* });
|
|
64
|
-
*
|
|
65
|
-
* // Ready to return via API - no serialization needed
|
|
66
|
-
* return discountAuth;
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export declare function createDiscount(params: CreateDiscountParams, config?: Partial<SdkConfig>): Promise<SerializedDiscountAuth>;
|
|
70
|
-
/**
|
|
71
|
-
* Deserialize a discount authorization from API format
|
|
72
|
-
*
|
|
73
|
-
* Converts the JSON-safe SerializedDiscountAuth back to the format
|
|
74
|
-
* expected by the on-chain program.
|
|
39
|
+
* Create a Discount PDA for a rental via slyvault's discount_create instruction.
|
|
75
40
|
*
|
|
76
|
-
*
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*
|
|
41
|
+
* Server-side helper that:
|
|
42
|
+
* 1. Fetches the member to get nonce + vault
|
|
43
|
+
* 2. Generates a random 16-byte nonce
|
|
44
|
+
* 3. Derives the Discount PDA address
|
|
45
|
+
* 4. Returns the PDA address and the parameters needed to build the create_discount transaction
|
|
81
46
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
47
|
+
* The caller is responsible for building and sending the transaction with the
|
|
48
|
+
* codama-generated `discountCreate` instruction using the returned params.
|
|
84
49
|
*
|
|
85
|
-
* @param
|
|
86
|
-
* @
|
|
87
|
-
|
|
88
|
-
export declare function serializeDiscountAuth(raw: DiscountAuthorizationArgs): SerializedDiscountAuth;
|
|
89
|
-
/**
|
|
90
|
-
* Check if a value is a SerializedDiscountAuth
|
|
50
|
+
* @param params - Discount parameters
|
|
51
|
+
* @param config - Optional SDK configuration overrides
|
|
52
|
+
* @returns Object with the PDA address and instruction params
|
|
91
53
|
*/
|
|
92
|
-
export declare function
|
|
93
|
-
|
|
54
|
+
export declare function createDiscountForRental(params: CreateDiscountForRentalParams, config?: Partial<SdkConfig>): Promise<{
|
|
55
|
+
/** The Discount PDA address to pass to rental instructions */
|
|
56
|
+
discountPda: Address;
|
|
57
|
+
/** The rent payer (member_state PDA) */
|
|
58
|
+
rentPayer: Address;
|
|
59
|
+
/** Parameters for building the discount_create instruction */
|
|
60
|
+
createParams: CreateDiscountParams;
|
|
61
|
+
}>;
|
|
94
62
|
//# sourceMappingURL=discountAuth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discountAuth.d.ts","sourceRoot":"","sources":["../../../src/utils/discountAuth.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"discountAuth.d.ts","sourceRoot":"","sources":["../../../src/utils/discountAuth.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAW,KAAK,OAAO,EAAE,KAAK,iBAAiB,EAAgC,MAAM,aAAa,CAAC;AAC1G,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAGlE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AAiBxD,MAAM,WAAW,6BAA6B;IAC5C,yCAAyC;IACzC,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,sDAAsD;IACtD,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;;;OAQG;IACH,iBAAiB,EAAE,iBAAiB,GAAG;QAAE,SAAS,EAAE,UAAU,CAAA;KAAE,GAAG,UAAU,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;CACnG;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,6BAA6B,EACrC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC;IACT,8DAA8D;IAC9D,WAAW,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,YAAY,EAAE,oBAAoB,CAAC;CACpC,CAAC,CAyDD"}
|