@wuwei-labs/srsly 2.0.0-beta.2 → 2.0.0-beta.21

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.
Files changed (188) hide show
  1. package/README.md +305 -110
  2. package/dist/cjs/codama/accounts/config.js +88 -0
  3. package/dist/cjs/codama/accounts/config.js.map +1 -0
  4. package/dist/cjs/codama/accounts/contractState.js +17 -39
  5. package/dist/cjs/codama/accounts/contractState.js.map +1 -1
  6. package/dist/cjs/codama/accounts/index.js +1 -1
  7. package/dist/cjs/codama/accounts/index.js.map +1 -1
  8. package/dist/cjs/codama/accounts/rentalState.js +18 -33
  9. package/dist/cjs/codama/accounts/rentalState.js.map +1 -1
  10. package/dist/cjs/codama/accounts/thread.js +15 -32
  11. package/dist/cjs/codama/accounts/thread.js.map +1 -1
  12. package/dist/cjs/codama/errors/srsly.js +24 -3
  13. package/dist/cjs/codama/errors/srsly.js.map +1 -1
  14. package/dist/cjs/codama/instructions/acceptRental.js +202 -224
  15. package/dist/cjs/codama/instructions/acceptRental.js.map +1 -1
  16. package/dist/cjs/codama/instructions/cancelRental.js +100 -136
  17. package/dist/cjs/codama/instructions/cancelRental.js.map +1 -1
  18. package/dist/cjs/codama/instructions/closeContract.js +95 -116
  19. package/dist/cjs/codama/instructions/closeContract.js.map +1 -1
  20. package/dist/cjs/codama/instructions/closeRental.js +119 -132
  21. package/dist/cjs/codama/instructions/closeRental.js.map +1 -1
  22. package/dist/cjs/codama/instructions/createContract.js +127 -143
  23. package/dist/cjs/codama/instructions/createContract.js.map +1 -1
  24. package/dist/cjs/codama/instructions/index.js +2 -1
  25. package/dist/cjs/codama/instructions/index.js.map +1 -1
  26. package/dist/cjs/codama/instructions/initializeConfig.js +131 -0
  27. package/dist/cjs/codama/instructions/initializeConfig.js.map +1 -0
  28. package/dist/cjs/codama/instructions/payRental.js +125 -129
  29. package/dist/cjs/codama/instructions/payRental.js.map +1 -1
  30. package/dist/cjs/codama/instructions/resetRental.js +55 -77
  31. package/dist/cjs/codama/instructions/resetRental.js.map +1 -1
  32. package/dist/cjs/codama/instructions/updateConfig.js +145 -0
  33. package/dist/cjs/codama/instructions/updateConfig.js.map +1 -0
  34. package/dist/cjs/codama/programs/srsly.js +12 -8
  35. package/dist/cjs/codama/programs/srsly.js.map +1 -1
  36. package/dist/cjs/codama/shared/index.js +6 -2
  37. package/dist/cjs/codama/shared/index.js.map +1 -1
  38. package/dist/cjs/codama/types/trigger.js +1 -1
  39. package/dist/cjs/codama/types/trigger.js.map +1 -1
  40. package/dist/cjs/codama/types/triggerContext.js +1 -1
  41. package/dist/cjs/codama/types/triggerContext.js.map +1 -1
  42. package/dist/cjs/contract/close.js +75 -34
  43. package/dist/cjs/contract/close.js.map +1 -1
  44. package/dist/cjs/contract/create.js +59 -43
  45. package/dist/cjs/contract/create.js.map +1 -1
  46. package/dist/cjs/index.js +7 -1
  47. package/dist/cjs/index.js.map +1 -1
  48. package/dist/cjs/package.json +54 -0
  49. package/dist/cjs/rental/accept.js +68 -40
  50. package/dist/cjs/rental/accept.js.map +1 -1
  51. package/dist/cjs/rental/cancel.js +36 -28
  52. package/dist/cjs/rental/cancel.js.map +1 -1
  53. package/dist/cjs/rental/close.js +37 -29
  54. package/dist/cjs/rental/close.js.map +1 -1
  55. package/dist/cjs/rental/reset.js +46 -42
  56. package/dist/cjs/rental/reset.js.map +1 -1
  57. package/dist/cjs/utils/config.js +319 -0
  58. package/dist/cjs/utils/config.js.map +1 -0
  59. package/dist/cjs/utils/constants.js +69 -9
  60. package/dist/cjs/utils/constants.js.map +1 -1
  61. package/dist/cjs/utils/index.js +1 -0
  62. package/dist/cjs/utils/index.js.map +1 -1
  63. package/dist/cjs/utils/profiles.js +96 -95
  64. package/dist/cjs/utils/profiles.js.map +1 -1
  65. package/dist/esm/codama/accounts/config.js +76 -0
  66. package/dist/esm/codama/accounts/config.js.map +1 -0
  67. package/dist/esm/codama/accounts/contractState.js +3 -7
  68. package/dist/esm/codama/accounts/contractState.js.map +1 -1
  69. package/dist/esm/codama/accounts/index.js +1 -1
  70. package/dist/esm/codama/accounts/index.js.map +1 -1
  71. package/dist/esm/codama/accounts/rentalState.js +3 -1
  72. package/dist/esm/codama/accounts/rentalState.js.map +1 -1
  73. package/dist/esm/codama/errors/srsly.js +23 -2
  74. package/dist/esm/codama/errors/srsly.js.map +1 -1
  75. package/dist/esm/codama/instructions/acceptRental.js +30 -39
  76. package/dist/esm/codama/instructions/acceptRental.js.map +1 -1
  77. package/dist/esm/codama/instructions/cancelRental.js +10 -33
  78. package/dist/esm/codama/instructions/cancelRental.js.map +1 -1
  79. package/dist/esm/codama/instructions/closeContract.js +17 -25
  80. package/dist/esm/codama/instructions/closeContract.js.map +1 -1
  81. package/dist/esm/codama/instructions/closeRental.js +19 -19
  82. package/dist/esm/codama/instructions/closeRental.js.map +1 -1
  83. package/dist/esm/codama/instructions/createContract.js +13 -16
  84. package/dist/esm/codama/instructions/createContract.js.map +1 -1
  85. package/dist/esm/codama/instructions/index.js +2 -1
  86. package/dist/esm/codama/instructions/index.js.map +1 -1
  87. package/dist/esm/codama/instructions/initializeConfig.js +121 -0
  88. package/dist/esm/codama/instructions/initializeConfig.js.map +1 -0
  89. package/dist/esm/codama/instructions/payRental.js +34 -25
  90. package/dist/esm/codama/instructions/payRental.js.map +1 -1
  91. package/dist/esm/codama/instructions/resetRental.js +0 -9
  92. package/dist/esm/codama/instructions/resetRental.js.map +1 -1
  93. package/dist/esm/codama/instructions/updateConfig.js +135 -0
  94. package/dist/esm/codama/instructions/updateConfig.js.map +1 -0
  95. package/dist/esm/codama/programs/srsly.js +12 -8
  96. package/dist/esm/codama/programs/srsly.js.map +1 -1
  97. package/dist/esm/contract/close.js +68 -16
  98. package/dist/esm/contract/close.js.map +1 -1
  99. package/dist/esm/contract/create.js +60 -33
  100. package/dist/esm/contract/create.js.map +1 -1
  101. package/dist/esm/index.js +5 -1
  102. package/dist/esm/index.js.map +1 -1
  103. package/dist/esm/package.json +54 -0
  104. package/dist/esm/rental/accept.js +70 -31
  105. package/dist/esm/rental/accept.js.map +1 -1
  106. package/dist/esm/rental/cancel.js +37 -18
  107. package/dist/esm/rental/cancel.js.map +1 -1
  108. package/dist/esm/rental/close.js +38 -19
  109. package/dist/esm/rental/close.js.map +1 -1
  110. package/dist/esm/rental/reset.js +48 -33
  111. package/dist/esm/rental/reset.js.map +1 -1
  112. package/dist/esm/utils/config.js +277 -0
  113. package/dist/esm/utils/config.js.map +1 -0
  114. package/dist/esm/utils/constants.js +60 -7
  115. package/dist/esm/utils/constants.js.map +1 -1
  116. package/dist/esm/utils/index.js +1 -0
  117. package/dist/esm/utils/index.js.map +1 -1
  118. package/dist/esm/utils/profiles.js +39 -19
  119. package/dist/esm/utils/profiles.js.map +1 -1
  120. package/dist/types/codama/accounts/config.d.ts +52 -0
  121. package/dist/types/codama/accounts/config.d.ts.map +1 -0
  122. package/dist/types/codama/accounts/contractState.d.ts +2 -4
  123. package/dist/types/codama/accounts/contractState.d.ts.map +1 -1
  124. package/dist/types/codama/accounts/index.d.ts +1 -1
  125. package/dist/types/codama/accounts/index.d.ts.map +1 -1
  126. package/dist/types/codama/accounts/rentalState.d.ts +2 -0
  127. package/dist/types/codama/accounts/rentalState.d.ts.map +1 -1
  128. package/dist/types/codama/errors/srsly.d.ts +16 -2
  129. package/dist/types/codama/errors/srsly.d.ts.map +1 -1
  130. package/dist/types/codama/instructions/acceptRental.d.ts +41 -34
  131. package/dist/types/codama/instructions/acceptRental.d.ts.map +1 -1
  132. package/dist/types/codama/instructions/cancelRental.d.ts +14 -10
  133. package/dist/types/codama/instructions/cancelRental.d.ts.map +1 -1
  134. package/dist/types/codama/instructions/closeContract.d.ts +29 -21
  135. package/dist/types/codama/instructions/closeContract.d.ts.map +1 -1
  136. package/dist/types/codama/instructions/closeRental.d.ts +20 -12
  137. package/dist/types/codama/instructions/closeRental.d.ts.map +1 -1
  138. package/dist/types/codama/instructions/createContract.d.ts +27 -23
  139. package/dist/types/codama/instructions/createContract.d.ts.map +1 -1
  140. package/dist/types/codama/instructions/index.d.ts +2 -1
  141. package/dist/types/codama/instructions/index.d.ts.map +1 -1
  142. package/dist/types/codama/instructions/initializeConfig.d.ts +60 -0
  143. package/dist/types/codama/instructions/initializeConfig.d.ts.map +1 -0
  144. package/dist/types/codama/instructions/payRental.d.ts +28 -13
  145. package/dist/types/codama/instructions/payRental.d.ts.map +1 -1
  146. package/dist/types/codama/instructions/resetRental.d.ts +3 -3
  147. package/dist/types/codama/instructions/resetRental.d.ts.map +1 -1
  148. package/dist/types/codama/instructions/updateConfig.d.ts +93 -0
  149. package/dist/types/codama/instructions/updateConfig.d.ts.map +1 -0
  150. package/dist/types/codama/programs/srsly.d.ts +11 -8
  151. package/dist/types/codama/programs/srsly.d.ts.map +1 -1
  152. package/dist/types/contract/close.d.ts +20 -24
  153. package/dist/types/contract/close.d.ts.map +1 -1
  154. package/dist/types/contract/create.d.ts +34 -22
  155. package/dist/types/contract/create.d.ts.map +1 -1
  156. package/dist/types/index.d.ts +4 -1
  157. package/dist/types/index.d.ts.map +1 -1
  158. package/dist/types/rental/accept.d.ts +42 -20
  159. package/dist/types/rental/accept.d.ts.map +1 -1
  160. package/dist/types/rental/cancel.d.ts +16 -11
  161. package/dist/types/rental/cancel.d.ts.map +1 -1
  162. package/dist/types/rental/close.d.ts +16 -11
  163. package/dist/types/rental/close.d.ts.map +1 -1
  164. package/dist/types/rental/reset.d.ts +17 -20
  165. package/dist/types/rental/reset.d.ts.map +1 -1
  166. package/dist/types/utils/config.d.ts +167 -0
  167. package/dist/types/utils/config.d.ts.map +1 -0
  168. package/dist/types/utils/constants.d.ts +23 -7
  169. package/dist/types/utils/constants.d.ts.map +1 -1
  170. package/dist/types/utils/index.d.ts +1 -0
  171. package/dist/types/utils/index.d.ts.map +1 -1
  172. package/dist/types/utils/profiles.d.ts +14 -8
  173. package/dist/types/utils/profiles.d.ts.map +1 -1
  174. package/package.json +36 -14
  175. package/target/idl/srsly.json +3279 -0
  176. package/target/types/srsly.ts +1 -0
  177. package/dist/cjs/codama/accounts/fleet.js +0 -94
  178. package/dist/cjs/codama/accounts/fleet.js.map +0 -1
  179. package/dist/cjs/codama/instructions/normalizeAdmin.js +0 -165
  180. package/dist/cjs/codama/instructions/normalizeAdmin.js.map +0 -1
  181. package/dist/esm/codama/accounts/fleet.js +0 -64
  182. package/dist/esm/codama/accounts/fleet.js.map +0 -1
  183. package/dist/esm/codama/instructions/normalizeAdmin.js +0 -142
  184. package/dist/esm/codama/instructions/normalizeAdmin.js.map +0 -1
  185. package/dist/types/codama/accounts/fleet.d.ts +0 -38
  186. package/dist/types/codama/accounts/fleet.d.ts.map +0 -1
  187. package/dist/types/codama/instructions/normalizeAdmin.d.ts +0 -67
  188. package/dist/types/codama/instructions/normalizeAdmin.d.ts.map +0 -1
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@wuwei-labs/srsly",
3
+ "version": "2.0.0-beta.21",
4
+ "description": "",
5
+ "source": "./src/index.ts",
6
+ "sideEffects": false,
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "files": [
11
+ "dist/cjs",
12
+ "dist/esm",
13
+ "dist/types",
14
+ "target/idl/srsly.json",
15
+ "target/types/srsly.ts"
16
+ ],
17
+ "keywords": [
18
+ "SRSLY",
19
+ "Star",
20
+ "Atlas",
21
+ "sdk"
22
+ ],
23
+ "scripts": {
24
+ "package": "pnpm run clean && pnpm build && pnpm run package:cjs && pnpm run package:esm && pnpm run generate",
25
+ "package:cjs": "tsc -p tsconfig.cjs.json && tsconfig-to-dual-package tsconfig.cjs.json",
26
+ "package:esm": "tsc -p tsconfig.esm.json && tsconfig-to-dual-package tsconfig.esm.json",
27
+ "clean": "rm -rf dist && cargo clean && pnpm install",
28
+ "generate": "node generate.mjs",
29
+ "build": "anchor build && pnpm run generate",
30
+ "docs": "typedoc",
31
+ "test": "vitest run",
32
+ "test:watch": "vitest",
33
+ "test:coverage": "vitest run --coverage"
34
+ },
35
+ "author": "",
36
+ "license": "ISC",
37
+ "packageManager": "pnpm@10.6.5",
38
+ "devDependencies": {
39
+ "@codama/nodes-from-anchor": "^1.1.13",
40
+ "@codama/renderers": "^1.0.21",
41
+ "@solana/web3.js": "^1.98.2",
42
+ "@types/node": "^24.0.3",
43
+ "codama": "^1.2.13",
44
+ "tsconfig-to-dual-package": "^1.2.0",
45
+ "typedoc": "^0.28.3",
46
+ "typescript": "^5.8.3",
47
+ "vitest": "^3.2.4"
48
+ },
49
+ "dependencies": {
50
+ "@solana/kit": "^2.1.0",
51
+ "@wuwei-labs/srsly": "2.0.0-beta.12"
52
+ },
53
+ "type": "commonjs"
54
+ }
@@ -1,64 +1,92 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getAcceptRentalInstructionAsync = void 0;
13
3
  exports.acceptRental = acceptRental;
14
- const codama_1 = require("../codama");
15
- Object.defineProperty(exports, "getAcceptRentalInstructionAsync", { enumerable: true, get: function () { return codama_1.getAcceptRentalInstructionAsync; } });
4
+ exports.getAcceptRentalInstructionAsync = getAcceptRentalInstructionAsync;
5
+ const config_1 = require("../utils/config");
6
+ const constants_1 = require("../utils/constants");
16
7
  const utils_1 = require("../utils");
17
8
  /**
18
- * Asynchronously creates an instruction to accept a rental with minimal required parameters.
19
- * Derives borrowerProfileFaction, starbase, and starbasePlayer automatically.
9
+ * Internal function to accept a rental instruction with configuration options
10
+ */
11
+ async function _acceptRental(params, config) {
12
+ const { borrower, borrowerProfile, borrowerFaction, fleet, contract, gameId, rate, duration, referralTokenAccount, } = params;
13
+ // Get the actual game ID to use (param override, config override, or network default)
14
+ const actualGameId = gameId ? (0, constants_1.toAddress)(gameId) : await (0, constants_1.getSageGameId)(config);
15
+ // Calculate the total amount from rate and duration
16
+ // Convert ATLAS to stardust (smallest unit): 1 ATLAS = 100,000,000 stardust
17
+ const amount = BigInt(rate) * BigInt(duration) * BigInt(constants_1.ATLAS_TO_STARDUST);
18
+ // Derive the three accounts we need
19
+ const { profileFaction, starbase, starbasePlayer } = await (0, utils_1.deriveGameAccounts)((0, constants_1.toAddress)(borrowerProfile), borrowerFaction, actualGameId, 0, // starbaseSeqId
20
+ config);
21
+ // Let codama derive the rest (rentalThread, rentalState, rentalAuthority, etc.)
22
+ const input = {
23
+ borrower,
24
+ borrowerProfile: (0, constants_1.toAddress)(borrowerProfile),
25
+ borrowerProfileFaction: profileFaction,
26
+ fleet: (0, constants_1.toAddress)(fleet),
27
+ contract: (0, constants_1.toAddress)(contract),
28
+ gameId: actualGameId,
29
+ starbase,
30
+ starbasePlayer,
31
+ amount,
32
+ duration,
33
+ referralTokenAccount: referralTokenAccount ? (0, constants_1.toAddress)(referralTokenAccount) : undefined,
34
+ };
35
+ // Get network-specific codama functions from centralized config
36
+ const instructionsModule = (0, config_1.getModule)('instructions');
37
+ const programsModule = (0, config_1.getModule)('programs');
38
+ const { getAcceptRentalInstructionAsync } = instructionsModule;
39
+ const { SRSLY_PROGRAM_ADDRESS } = programsModule;
40
+ return getAcceptRentalInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
41
+ }
42
+ /**
43
+ * Creates an instruction to accept a rental with fluent configuration.
20
44
  *
21
45
  * @example
22
46
  * ```typescript
23
- * // Create the instruction with automatic account derivation
47
+ * // Use devnet defaults
24
48
  * const ix = await acceptRental({
25
49
  * borrower: wallet,
26
50
  * borrowerProfile: profileAddress,
27
51
  * borrowerFaction: 1, // 1 = mud, 2 = oni, 3 = ustur
28
52
  * fleet: fleetAddress,
29
53
  * contract: contractAddress,
30
- * amount: 1000,
31
- * duration: 86400 // 1 day in seconds
32
- * // gameId is optional and will default to the standard game ID
54
+ * rate: 1000, // ATLAS tokens
55
+ * duration: 86400 // 1 day in seconds (total: 1000 * 86400 * 100M stardust)
56
+ * });
57
+ *
58
+ * // With referral (referrer gets 5% of platform fees)
59
+ * const ix = await acceptRental({
60
+ * borrower: wallet,
61
+ * borrowerProfile: profileAddress,
62
+ * borrowerFaction: 1,
63
+ * fleet: fleetAddress,
64
+ * contract: contractAddress,
65
+ * rate: 1000,
66
+ * duration: 86400,
67
+ * referralTokenAccount: referrerTokenAddress
33
68
  * });
34
69
  *
35
- * // Add to transaction and sign
36
- * const tx = new Transaction().add(ix);
37
- * await sendAndConfirmTransaction(connection, tx, [wallet]);
70
+ * // Use mainnet configuration
71
+ * const ix = await acceptRental(params).set({ network: 'mainnet' });
72
+ *
73
+ * // Override specific constants
74
+ * const ix = await acceptRental(params).set({
75
+ * network: 'mainnet',
76
+ * gameId: 'custom-game-id...'
77
+ * });
38
78
  * ```
39
79
  *
40
80
  * @param params The simplified parameters for accepting a rental
41
- * @returns A promise that resolves to the instruction to accept a rental
81
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
42
82
  */
43
83
  function acceptRental(params) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- const { borrower, borrowerProfile, borrowerFaction, fleet, contract, gameId = utils_1.DEFAULT_GAME_ID, amount, duration, } = params;
46
- // Derive the three accounts we need
47
- const { profileFaction, starbase, starbasePlayer } = yield (0, utils_1.deriveGameAccounts)(borrowerProfile, borrowerFaction, gameId);
48
- // Let codama derive the rest (rentalThread, rentalState, rentalAuthority, etc.)
49
- const input = {
50
- borrower,
51
- borrowerProfile,
52
- borrowerProfileFaction: profileFaction,
53
- fleet,
54
- contract,
55
- gameId,
56
- starbase,
57
- starbasePlayer,
58
- amount,
59
- duration,
60
- };
61
- return (0, codama_1.getAcceptRentalInstructionAsync)(input, { programAddress: codama_1.SRSLY_PROGRAM_ADDRESS });
84
+ return (0, config_1.createConfigSelector)((config) => _acceptRental(params, config));
85
+ }
86
+ function getAcceptRentalInstructionAsync(input, options) {
87
+ return (0, config_1.createConfigSelector)(async (config) => {
88
+ const instructionsModule = (0, config_1.getModule)('instructions');
89
+ return instructionsModule.getAcceptRentalInstructionAsync(input, options);
62
90
  });
63
91
  }
64
92
  //# sourceMappingURL=accept.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accept.js","sourceRoot":"","sources":["../../../src/rental/accept.ts"],"names":[],"mappings":";;;;;;;;;;;;AA0FA,oCA2CC;AAhID,sCAKmB;AA6HV,gHA/HP,wCAA+B,OA+HO;AA3HxC,oCAGkB;AAiDlB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAAsB,YAAY,CAChC,MAA0B;;QAE1B,MAAM,EACJ,QAAQ,EACR,eAAe,EACf,eAAe,EACf,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,uBAAkC,EAC3C,MAAM,EACN,QAAQ,GACT,GAAG,MAAM,CAAC;QAEX,oCAAoC;QACpC,MAAM,EACJ,cAAc,EACd,QAAQ,EACR,cAAc,EACf,GAAG,MAAM,IAAA,0BAAkB,EAC1B,eAAe,EACf,eAAe,EACf,MAAM,CACP,CAAC;QAEF,gFAAgF;QAChF,MAAM,KAAK,GAAoC;YAC7C,QAAQ;YACR,eAAe;YACf,sBAAsB,EAAE,cAAc;YACtC,KAAK;YACL,QAAQ;YACR,MAAM;YACN,QAAQ;YACR,cAAc;YACd,MAAM;YACN,QAAQ;SACT,CAAC;QAEF,OAAO,IAAA,wCAA+B,EACpC,KAAY,EACZ,EAAE,cAAc,EAAE,8BAAqB,EAAE,CAC1C,CAAC;IACJ,CAAC;CAAA"}
1
+ {"version":3,"file":"accept.js","sourceRoot":"","sources":["../../../src/rental/accept.ts"],"names":[],"mappings":";;AAgLA,oCAIC;AAED,0EAKC;AAtLD,4CAA2G;AAC3G,kDAAiF;AAMjF,oCAEkB;AAuDlB;;GAEG;AACH,KAAK,UAAU,aAAa,CAC1B,MAA0B,EAC1B,MAAsB;IAEtB,MAAM,EACJ,QAAQ,EACR,eAAe,EACf,eAAe,EACf,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,oBAAoB,GACrB,GAAG,MAAM,CAAC;IAEX,sFAAsF;IACtF,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,IAAA,qBAAS,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,IAAA,yBAAa,EAAC,MAAM,CAAC,CAAC;IAE9E,oDAAoD;IACpD,4EAA4E;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,6BAAiB,CAAC,CAAC;IAE3E,oCAAoC;IACpC,MAAM,EACJ,cAAc,EACd,QAAQ,EACR,cAAc,EACf,GAAG,MAAM,IAAA,0BAAkB,EAC1B,IAAA,qBAAS,EAAC,eAAe,CAAC,EAC1B,eAAe,EACf,YAAY,EACZ,CAAC,EAAE,gBAAgB;IACnB,MAAM,CACP,CAAC;IAEF,gFAAgF;IAChF,MAAM,KAAK,GAAoC;QAC7C,QAAQ;QACR,eAAe,EAAE,IAAA,qBAAS,EAAC,eAAe,CAAC;QAC3C,sBAAsB,EAAE,cAAc;QACtC,KAAK,EAAE,IAAA,qBAAS,EAAC,KAAK,CAAC;QACvB,QAAQ,EAAE,IAAA,qBAAS,EAAC,QAAQ,CAAC;QAC7B,MAAM,EAAE,YAAY;QACpB,QAAQ;QACR,cAAc;QACd,MAAM;QACN,QAAQ;QACR,oBAAoB,EAAE,oBAAoB,CAAC,CAAC,CAAC,IAAA,qBAAS,EAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS;KACzF,CAAC;IAEF,gEAAgE;IAChE,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,IAAA,kBAAS,EAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,EAAE,+BAA+B,EAAE,GAAG,kBAAkB,CAAC;IAC/D,MAAM,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAAC;IAEjD,OAAO,+BAA+B,CACpC,KAAY,EACZ,EAAE,cAAc,EAAE,qBAAqB,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,SAAgB,YAAY,CAC1B,MAA0B;IAE1B,OAAO,IAAA,6BAAoB,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,+BAA+B,CAAC,KAAU,EAAE,OAAa;IACvE,OAAO,IAAA,6BAAoB,EAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;QACrD,OAAO,kBAAkB,CAAC,+BAA+B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,48 +1,56 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getCancelRentalInstructionAsync = void 0;
13
3
  exports.cancelRental = cancelRental;
14
- const codama_1 = require("../codama");
15
- Object.defineProperty(exports, "getCancelRentalInstructionAsync", { enumerable: true, get: function () { return codama_1.getCancelRentalInstructionAsync; } });
4
+ exports.getCancelRentalInstructionAsync = getCancelRentalInstructionAsync;
5
+ const config_1 = require("../utils/config");
6
+ /**
7
+ * Internal function to cancel a rental instruction with configuration options
8
+ */
9
+ async function _cancelRental(params, config) {
10
+ const { borrower, contract, } = params;
11
+ // Let codama derive all the optional accounts
12
+ const input = {
13
+ borrower,
14
+ contract,
15
+ };
16
+ // Get network-specific codama functions from centralized config
17
+ const instructionsModule = (0, config_1.getModule)('instructions');
18
+ const programsModule = (0, config_1.getModule)('programs');
19
+ const { getCancelRentalInstructionAsync } = instructionsModule;
20
+ const { SRSLY_PROGRAM_ADDRESS } = programsModule;
21
+ return getCancelRentalInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
22
+ }
16
23
  /**
17
- * Asynchronously creates an instruction to cancel a rental with minimal required parameters.
18
- * Derives rentalState, rentalThread, borrowerTokenAccount, rentalTokenAccount and
19
- * rentalAuthority automatically if not provided.
24
+ * Creates an instruction to cancel a rental with fluent configuration.
20
25
  *
21
26
  * @example
22
27
  * ```typescript
23
- * // Create the instruction with minimal parameters - just borrower and contract
28
+ * // Use devnet defaults
24
29
  * const ix = await cancelRental({
25
30
  * borrower: wallet,
26
31
  * contract: contractAddress
27
32
  * });
28
33
  *
29
- * // Add to transaction and sign
30
- * const tx = new Transaction().add(ix);
31
- * await sendAndConfirmTransaction(connection, tx, [wallet]);
34
+ * // Use mainnet configuration
35
+ * const ix = await cancelRental(params).set({ network: 'mainnet' });
36
+ *
37
+ * // Override specific constants
38
+ * const ix = await cancelRental(params).set({
39
+ * network: 'mainnet',
40
+ * sageProgramAddress: 'custom...'
41
+ * });
32
42
  * ```
33
43
  *
34
44
  * @param params The simplified parameters for canceling a rental
35
- * @returns A promise that resolves to the instruction to cancel a rental
45
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
36
46
  */
37
47
  function cancelRental(params) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- const { borrower, contract, } = params;
40
- // Let codama derive all the optional accounts
41
- const input = {
42
- borrower,
43
- contract,
44
- };
45
- return (0, codama_1.getCancelRentalInstructionAsync)(input, { programAddress: codama_1.SRSLY_PROGRAM_ADDRESS });
48
+ return (0, config_1.createConfigSelector)((config) => _cancelRental(params, config));
49
+ }
50
+ function getCancelRentalInstructionAsync(input, options) {
51
+ return (0, config_1.createConfigSelector)(async (config) => {
52
+ const instructionsModule = (0, config_1.getModule)('instructions');
53
+ return instructionsModule.getCancelRentalInstructionAsync(input, options);
46
54
  });
47
55
  }
48
56
  //# sourceMappingURL=cancel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../src/rental/cancel.ts"],"names":[],"mappings":";;;;;;;;;;;;AA+CA,oCAkBC;AA5DD,sCAImB;AA0DV,gHA5DP,wCAA+B,OA4DO;AAzCxC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAsB,YAAY,CAChC,MAA0B;;QAE1B,MAAM,EACJ,QAAQ,EACR,QAAQ,GACT,GAAG,MAAM,CAAC;QAEX,8CAA8C;QAC9C,MAAM,KAAK,GAAG;YACZ,QAAQ;YACR,QAAQ;SACT,CAAC;QAEF,OAAO,IAAA,wCAA+B,EACpC,KAAK,EACL,EAAE,cAAc,EAAE,8BAAqB,EAAE,CAC1C,CAAC;IACJ,CAAC;CAAA"}
1
+ {"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../src/rental/cancel.ts"],"names":[],"mappings":";;AA+EA,oCAIC;AAED,0EAKC;AArFD,4CAA2G;AAoB3G;;GAEG;AACH,KAAK,UAAU,aAAa,CAC1B,MAA0B,EAC1B,MAAsB;IAEtB,MAAM,EACJ,QAAQ,EACR,QAAQ,GACT,GAAG,MAAM,CAAC;IAEX,8CAA8C;IAC9C,MAAM,KAAK,GAAG;QACZ,QAAQ;QACR,QAAQ;KACT,CAAC;IAEF,gEAAgE;IAChE,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,IAAA,kBAAS,EAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,EAAE,+BAA+B,EAAE,GAAG,kBAAkB,CAAC;IAC/D,MAAM,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAAC;IAEjD,OAAO,+BAA+B,CACpC,KAAK,EACL,EAAE,cAAc,EAAE,qBAAqB,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,YAAY,CAC1B,MAA0B;IAE1B,OAAO,IAAA,6BAAoB,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,+BAA+B,CAAC,KAAU,EAAE,OAAa;IACvE,OAAO,IAAA,6BAAoB,EAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;QACrD,OAAO,kBAAkB,CAAC,+BAA+B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,50 +1,58 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getCloseRentalInstructionAsync = void 0;
13
3
  exports.closeRental = closeRental;
14
- const codama_1 = require("../codama");
15
- Object.defineProperty(exports, "getCloseRentalInstructionAsync", { enumerable: true, get: function () { return codama_1.getCloseRentalInstructionAsync; } });
4
+ exports.getCloseRentalInstructionAsync = getCloseRentalInstructionAsync;
5
+ const config_1 = require("../utils/config");
6
+ /**
7
+ * Internal function to close a rental instruction with configuration options
8
+ */
9
+ async function _closeRental(params, config) {
10
+ const { borrower, ownerTokenAccount, contract, } = params;
11
+ // Let codama derive the optional accounts
12
+ const input = {
13
+ borrower,
14
+ ownerTokenAccount,
15
+ contract,
16
+ };
17
+ // Get network-specific codama functions from centralized config
18
+ const instructionsModule = (0, config_1.getModule)('instructions');
19
+ const programsModule = (0, config_1.getModule)('programs');
20
+ const { getCloseRentalInstructionAsync } = instructionsModule;
21
+ const { SRSLY_PROGRAM_ADDRESS } = programsModule;
22
+ return getCloseRentalInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
23
+ }
16
24
  /**
17
- * Asynchronously creates an instruction to close a rental with minimal required parameters.
18
- * This is called by an owner to close a rental that was previously accepted by a borrower.
19
- * Derives rentalState, rentalThread, rentalTokenAccount and rentalAuthority automatically if not provided.
25
+ * Creates an instruction to close a rental with fluent configuration.
20
26
  *
21
27
  * @example
22
28
  * ```typescript
23
- * // Create the instruction with minimal parameters
29
+ * // Use devnet defaults
24
30
  * const ix = await closeRental({
25
31
  * borrower: borrowerAddress,
26
32
  * ownerTokenAccount: ownerTokenAccountAddress,
27
33
  * contract: contractAddress
28
34
  * });
29
35
  *
30
- * // Add to transaction and sign
31
- * const tx = new Transaction().add(ix);
32
- * await sendAndConfirmTransaction(connection, tx, [owner]);
36
+ * // Use mainnet configuration
37
+ * const ix = await closeRental(params).set({ network: 'mainnet' });
38
+ *
39
+ * // Override specific constants
40
+ * const ix = await closeRental(params).set({
41
+ * network: 'mainnet',
42
+ * sageProgramAddress: 'custom...'
43
+ * });
33
44
  * ```
34
45
  *
35
46
  * @param params The simplified parameters for closing a rental
36
- * @returns A promise that resolves to the instruction to close a rental
47
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
37
48
  */
38
49
  function closeRental(params) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- const { borrower, ownerTokenAccount, contract, } = params;
41
- // Let codama derive the optional accounts
42
- const input = {
43
- borrower,
44
- ownerTokenAccount,
45
- contract,
46
- };
47
- return (0, codama_1.getCloseRentalInstructionAsync)(input, { programAddress: codama_1.SRSLY_PROGRAM_ADDRESS });
50
+ return (0, config_1.createConfigSelector)((config) => _closeRental(params, config));
51
+ }
52
+ function getCloseRentalInstructionAsync(input, options) {
53
+ return (0, config_1.createConfigSelector)(async (config) => {
54
+ const instructionsModule = (0, config_1.getModule)('instructions');
55
+ return instructionsModule.getCloseRentalInstructionAsync(input, options);
48
56
  });
49
57
  }
50
58
  //# sourceMappingURL=close.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"close.js","sourceRoot":"","sources":["../../../src/rental/close.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoDA,kCAoBC;AApED,sCAImB;AAkEV,+GApEP,uCAA8B,OAoEO;AA5CvC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAsB,WAAW,CAC/B,MAAyB;;QAEzB,MAAM,EACJ,QAAQ,EACR,iBAAiB,EACjB,QAAQ,GACT,GAAG,MAAM,CAAC;QAEX,0CAA0C;QAC1C,MAAM,KAAK,GAAG;YACZ,QAAQ;YACR,iBAAiB;YACjB,QAAQ;SACT,CAAC;QAEF,OAAO,IAAA,uCAA8B,EACnC,KAAK,EACL,EAAE,cAAc,EAAE,8BAAqB,EAAE,CAC1C,CAAC;IACJ,CAAC;CAAA"}
1
+ {"version":3,"file":"close.js","sourceRoot":"","sources":["../../../src/rental/close.ts"],"names":[],"mappings":";;AAsFA,kCAIC;AAED,wEAKC;AA7FD,4CAA2G;AAyB3G;;GAEG;AACH,KAAK,UAAU,YAAY,CACzB,MAAyB,EACzB,MAAsB;IAEtB,MAAM,EACJ,QAAQ,EACR,iBAAiB,EACjB,QAAQ,GACT,GAAG,MAAM,CAAC;IAEX,0CAA0C;IAC1C,MAAM,KAAK,GAAG;QACZ,QAAQ;QACR,iBAAiB;QACjB,QAAQ;KACT,CAAC;IAEF,gEAAgE;IAChE,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,IAAA,kBAAS,EAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,EAAE,8BAA8B,EAAE,GAAG,kBAAkB,CAAC;IAC9D,MAAM,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAAC;IAEjD,OAAO,8BAA8B,CACnC,KAAK,EACL,EAAE,cAAc,EAAE,qBAAqB,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,WAAW,CACzB,MAAyB;IAEzB,OAAO,IAAA,6BAAoB,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAgB,8BAA8B,CAAC,KAAU,EAAE,OAAa;IACtE,OAAO,IAAA,6BAAoB,EAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;QACrD,OAAO,kBAAkB,CAAC,8BAA8B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,27 +1,42 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getResetRentalInstructionAsync = void 0;
13
3
  exports.resetRental = resetRental;
14
- const codama_1 = require("../codama");
15
- Object.defineProperty(exports, "getResetRentalInstructionAsync", { enumerable: true, get: function () { return codama_1.getResetRentalInstructionAsync; } });
4
+ exports.getResetRentalInstructionAsync = getResetRentalInstructionAsync;
5
+ const config_1 = require("../utils/config");
6
+ const constants_1 = require("../utils/constants");
16
7
  const utils_1 = require("../utils");
17
8
  /**
18
- * Asynchronously creates an instruction to reset a rental with minimal required parameters.
19
- * This is used to reset a fleet's rental state after a rental has ended.
20
- * Can derive starbase, starbasePlayer, and rentalAuthority automatically.
9
+ * Internal function to reset a rental instruction with configuration options
10
+ */
11
+ async function _resetRental(params, config) {
12
+ const { fleet, contract, rentalState, gameId, faction, ownerProfile, } = params;
13
+ // Get the actual game ID to use (param override, config override, or network default)
14
+ const actualGameId = gameId || await (0, constants_1.getSageGameId)(config);
15
+ // Derive the three accounts we need
16
+ const { starbase, starbasePlayer } = await (0, utils_1.deriveGameAccounts)(ownerProfile, faction, actualGameId, 0, // starbaseSeqId
17
+ config);
18
+ // Get network-specific codama functions from centralized config
19
+ const instructionsModule = (0, config_1.getModule)('instructions');
20
+ const programsModule = (0, config_1.getModule)('programs');
21
+ const { getResetRentalInstructionAsync } = instructionsModule;
22
+ const { SRSLY_PROGRAM_ADDRESS } = programsModule;
23
+ // Let codama derive the rest (rentalAuthority)
24
+ const input = {
25
+ fleet,
26
+ contract,
27
+ rentalState,
28
+ gameId: actualGameId,
29
+ starbase,
30
+ starbasePlayer,
31
+ };
32
+ return getResetRentalInstructionAsync(input, { programAddress: SRSLY_PROGRAM_ADDRESS });
33
+ }
34
+ /**
35
+ * Creates an instruction to reset a rental with fluent configuration.
21
36
  *
22
37
  * @example
23
38
  * ```typescript
24
- * // Create the instruction with minimum required parameters and faction
39
+ * // Use devnet defaults
25
40
  * const ix = await resetRental({
26
41
  * fleet: fleetAddress,
27
42
  * contract: contractAddress,
@@ -30,38 +45,27 @@ const utils_1 = require("../utils");
30
45
  * ownerProfile: ownerProfileAddress
31
46
  * });
32
47
  *
33
- * // Or with explicit starbase and starbasePlayer
34
- * const ix = await resetRental({
35
- * fleet: fleetAddress,
36
- * contract: contractAddress,
37
- * rentalState: rentalStateAddress,
38
- * starbase: starbaseAddress,
39
- * starbasePlayer: starbasePlayerAddress
40
- * });
48
+ * // Use mainnet configuration
49
+ * const ix = await resetRental(params).set({ network: 'mainnet' });
41
50
  *
42
- * // Add to transaction and sign
43
- * const tx = new Transaction().add(ix);
44
- * await sendAndConfirmTransaction(connection, tx, [owner]);
51
+ * // Override specific constants
52
+ * const ix = await resetRental(params).set({
53
+ * network: 'mainnet',
54
+ * gameId: 'custom-game-id...',
55
+ * sageProgramAddress: 'custom...'
56
+ * });
45
57
  * ```
46
58
  *
47
59
  * @param params The simplified parameters for resetting a rental
48
- * @returns A promise that resolves to the instruction to reset a rental
60
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
49
61
  */
50
62
  function resetRental(params) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- const { fleet, contract, rentalState, gameId = utils_1.DEFAULT_GAME_ID, faction, ownerProfile, } = params;
53
- // Derive the three accounts we need
54
- const { starbase, starbasePlayer } = yield (0, utils_1.deriveGameAccounts)(ownerProfile, faction, gameId);
55
- // Let codama derive the rest (rentalAuthority)
56
- const input = {
57
- fleet,
58
- contract,
59
- rentalState,
60
- gameId,
61
- starbase,
62
- starbasePlayer,
63
- };
64
- return (0, codama_1.getResetRentalInstructionAsync)(input, { programAddress: codama_1.SRSLY_PROGRAM_ADDRESS });
63
+ return (0, config_1.createConfigSelector)((config) => _resetRental(params, config));
64
+ }
65
+ function getResetRentalInstructionAsync(input, options) {
66
+ return (0, config_1.createConfigSelector)(async (config) => {
67
+ const instructionsModule = (0, config_1.getModule)('instructions');
68
+ return instructionsModule.getResetRentalInstructionAsync(input, options);
65
69
  });
66
70
  }
67
71
  //# sourceMappingURL=reset.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../src/rental/reset.ts"],"names":[],"mappings":";;;;;;;;;;;;AAuFA,kCAoCC;AAvHD,sCAImB;AAqHV,+GAvHP,uCAA8B,OAuHO;AAnHvC,oCAGkB;AAyClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,SAAsB,WAAW,CAC/B,MAAyB;;QAEzB,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,GAAG,uBAAkC,EAC3C,OAAO,EACP,YAAY,GACb,GAAG,MAAM,CAAC;QAEX,oCAAoC;QACpC,MAAM,EACJ,QAAQ,EACR,cAAc,EACf,GAAG,MAAM,IAAA,0BAAkB,EAC1B,YAAY,EACZ,OAAO,EACP,MAAM,CACP,CAAC;QAEF,+CAA+C;QAC/C,MAAM,KAAK,GAAG;YACZ,KAAK;YACL,QAAQ;YACR,WAAW;YACX,MAAM;YACN,QAAQ;YACR,cAAc;SACf,CAAC;QAEF,OAAO,IAAA,uCAA8B,EACnC,KAAK,EACL,EAAE,cAAc,EAAE,8BAAqB,EAAE,CAC1C,CAAC;IACJ,CAAC;CAAA"}
1
+ {"version":3,"file":"reset.js","sourceRoot":"","sources":["../../../src/rental/reset.ts"],"names":[],"mappings":";;AAsIA,kCAIC;AAED,wEAKC;AA7ID,4CAA2G;AAC3G,kDAAmD;AAKnD,oCAEkB;AAyClB;;GAEG;AACH,KAAK,UAAU,YAAY,CACzB,MAAyB,EACzB,MAAsB;IAEtB,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAO,EACP,YAAY,GACb,GAAG,MAAM,CAAC;IAEX,sFAAsF;IACtF,MAAM,YAAY,GAAG,MAAM,IAAI,MAAM,IAAA,yBAAa,EAAC,MAAM,CAAC,CAAC;IAE3D,oCAAoC;IACpC,MAAM,EACJ,QAAQ,EACR,cAAc,EACf,GAAG,MAAM,IAAA,0BAAkB,EAC1B,YAAY,EACZ,OAAO,EACP,YAA+B,EAC/B,CAAC,EAAE,gBAAgB;IACnB,MAAM,CACP,CAAC;IAEF,gEAAgE;IAChE,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,IAAA,kBAAS,EAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,EAAE,8BAA8B,EAAE,GAAG,kBAAkB,CAAC;IAC9D,MAAM,EAAE,qBAAqB,EAAE,GAAG,cAAc,CAAC;IAEjD,+CAA+C;IAC/C,MAAM,KAAK,GAAG;QACZ,KAAK;QACL,QAAQ;QACR,WAAW;QACX,MAAM,EAAE,YAAY;QACpB,QAAQ;QACR,cAAc;KACf,CAAC;IAEF,OAAO,8BAA8B,CACnC,KAAK,EACL,EAAE,cAAc,EAAE,qBAAqB,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,WAAW,CACzB,MAAyB;IAEzB,OAAO,IAAA,6BAAoB,EAAC,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAgB,8BAA8B,CAAC,KAAU,EAAE,OAAa;IACtE,OAAO,IAAA,6BAAoB,EAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;QACrD,OAAO,kBAAkB,CAAC,8BAA8B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC"}