@wuwei-labs/srsly 2.0.0-beta.3 → 2.0.0-beta.32

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 (414) hide show
  1. package/README.md +322 -197
  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/{devnet/accounts → accounts}/contractState.js +2 -7
  5. package/dist/cjs/codama/accounts/contractState.js.map +1 -0
  6. package/dist/cjs/codama/{devnet/accounts → accounts}/index.js +1 -1
  7. package/dist/cjs/codama/accounts/index.js.map +1 -0
  8. package/dist/cjs/codama/{devnet/accounts → accounts}/rentalState.js +3 -1
  9. package/dist/cjs/codama/accounts/rentalState.js.map +1 -0
  10. package/dist/cjs/codama/accounts/thread.js.map +1 -0
  11. package/dist/cjs/codama/errors/index.js.map +1 -0
  12. package/dist/cjs/codama/{devnet/errors → errors}/srsly.js +33 -3
  13. package/dist/cjs/codama/errors/srsly.js.map +1 -0
  14. package/dist/cjs/codama/index.js.map +1 -0
  15. package/dist/cjs/codama/{devnet/instructions → instructions}/acceptRental.js +30 -39
  16. package/dist/cjs/codama/instructions/acceptRental.js.map +1 -0
  17. package/dist/cjs/codama/instructions/cancelContract.js +131 -0
  18. package/dist/cjs/codama/instructions/cancelContract.js.map +1 -0
  19. package/dist/cjs/codama/{devnet/instructions → instructions}/cancelRental.js +10 -33
  20. package/dist/cjs/codama/instructions/cancelRental.js.map +1 -0
  21. package/dist/cjs/codama/{devnet/instructions → instructions}/closeContract.js +22 -36
  22. package/dist/cjs/codama/instructions/closeContract.js.map +1 -0
  23. package/dist/cjs/codama/{devnet/instructions → instructions}/closeRental.js +19 -19
  24. package/dist/cjs/codama/instructions/closeRental.js.map +1 -0
  25. package/dist/cjs/codama/{devnet/instructions → instructions}/createContract.js +13 -16
  26. package/dist/cjs/codama/instructions/createContract.js.map +1 -0
  27. package/dist/cjs/codama/{devnet/instructions → instructions}/index.js +3 -1
  28. package/dist/cjs/codama/instructions/index.js.map +1 -0
  29. package/dist/cjs/codama/instructions/initializeConfig.js +131 -0
  30. package/dist/cjs/codama/instructions/initializeConfig.js.map +1 -0
  31. package/dist/cjs/codama/{devnet/instructions → instructions}/payRental.js +32 -23
  32. package/dist/cjs/codama/instructions/payRental.js.map +1 -0
  33. package/dist/cjs/codama/{devnet/instructions → instructions}/resetRental.js +6 -10
  34. package/dist/cjs/codama/instructions/resetRental.js.map +1 -0
  35. package/dist/cjs/codama/instructions/updateConfig.js +145 -0
  36. package/dist/cjs/codama/instructions/updateConfig.js.map +1 -0
  37. package/dist/cjs/codama/programs/index.js.map +1 -0
  38. package/dist/cjs/codama/{devnet/programs → programs}/srsly.js +22 -14
  39. package/dist/cjs/codama/programs/srsly.js.map +1 -0
  40. package/dist/cjs/codama/shared/index.js.map +1 -0
  41. package/dist/cjs/codama/types/clockData.js.map +1 -0
  42. package/dist/cjs/codama/types/equality.js.map +1 -0
  43. package/dist/cjs/codama/types/execContext.js.map +1 -0
  44. package/dist/cjs/codama/types/index.js.map +1 -0
  45. package/dist/cjs/codama/types/paymentFrequency.js.map +1 -0
  46. package/dist/cjs/codama/types/serializableAccount.js.map +1 -0
  47. package/dist/cjs/codama/types/serializableInstruction.js.map +1 -0
  48. package/dist/cjs/codama/types/threadResponse.js.map +1 -0
  49. package/dist/cjs/codama/types/trigger.js.map +1 -0
  50. package/dist/cjs/codama/types/triggerContext.js.map +1 -0
  51. package/dist/cjs/contract/cancel.js +77 -0
  52. package/dist/cjs/contract/cancel.js.map +1 -0
  53. package/dist/cjs/contract/close.js +74 -31
  54. package/dist/cjs/contract/close.js.map +1 -1
  55. package/dist/cjs/contract/create.js +79 -35
  56. package/dist/cjs/contract/create.js.map +1 -1
  57. package/dist/cjs/contract/index.js +1 -0
  58. package/dist/cjs/contract/index.js.map +1 -1
  59. package/dist/cjs/index.js +25 -2
  60. package/dist/cjs/index.js.map +1 -1
  61. package/dist/cjs/package.json +53 -0
  62. package/dist/cjs/rental/accept.js +76 -42
  63. package/dist/cjs/rental/accept.js.map +1 -1
  64. package/dist/cjs/rental/cancel.js +40 -28
  65. package/dist/cjs/rental/cancel.js.map +1 -1
  66. package/dist/cjs/rental/close.js +42 -30
  67. package/dist/cjs/rental/close.js.map +1 -1
  68. package/dist/cjs/rental/reset.js +50 -43
  69. package/dist/cjs/rental/reset.js.map +1 -1
  70. package/dist/cjs/types/paymentFrequency.js +58 -0
  71. package/dist/cjs/types/paymentFrequency.js.map +1 -0
  72. package/dist/cjs/utils/config.js +216 -0
  73. package/dist/cjs/utils/config.js.map +1 -0
  74. package/dist/cjs/utils/constants.js +55 -27
  75. package/dist/cjs/utils/constants.js.map +1 -1
  76. package/dist/cjs/utils/duration.js +77 -0
  77. package/dist/cjs/utils/duration.js.map +1 -0
  78. package/dist/cjs/utils/index.js +4 -0
  79. package/dist/cjs/utils/index.js.map +1 -1
  80. package/dist/cjs/utils/instruction-converter.js +66 -0
  81. package/dist/cjs/utils/instruction-converter.js.map +1 -0
  82. package/dist/cjs/utils/paymentFrequency.js +60 -0
  83. package/dist/cjs/utils/paymentFrequency.js.map +1 -0
  84. package/dist/cjs/utils/profiles.js +38 -18
  85. package/dist/cjs/utils/profiles.js.map +1 -1
  86. package/dist/cjs/utils/types.js +6 -0
  87. package/dist/cjs/utils/types.js.map +1 -0
  88. package/dist/esm/codama/accounts/config.js +76 -0
  89. package/dist/esm/codama/accounts/config.js.map +1 -0
  90. package/dist/esm/codama/{devnet/accounts → accounts}/contractState.js +3 -7
  91. package/dist/esm/codama/accounts/contractState.js.map +1 -0
  92. package/dist/esm/codama/{devnet/accounts → accounts}/index.js +1 -1
  93. package/dist/esm/codama/accounts/index.js.map +1 -0
  94. package/dist/esm/codama/{devnet/accounts → accounts}/rentalState.js +3 -1
  95. package/dist/esm/codama/accounts/rentalState.js.map +1 -0
  96. package/dist/esm/codama/accounts/thread.js.map +1 -0
  97. package/dist/esm/codama/errors/index.js.map +1 -0
  98. package/dist/esm/codama/{devnet/errors → errors}/srsly.js +32 -2
  99. package/dist/esm/codama/errors/srsly.js.map +1 -0
  100. package/dist/esm/codama/index.js.map +1 -0
  101. package/dist/esm/codama/{devnet/instructions → instructions}/acceptRental.js +30 -39
  102. package/dist/esm/codama/instructions/acceptRental.js.map +1 -0
  103. package/dist/esm/codama/instructions/cancelContract.js +121 -0
  104. package/dist/esm/codama/instructions/cancelContract.js.map +1 -0
  105. package/dist/esm/codama/{devnet/instructions → instructions}/cancelRental.js +10 -33
  106. package/dist/esm/codama/instructions/cancelRental.js.map +1 -0
  107. package/dist/esm/codama/{devnet/instructions → instructions}/closeContract.js +24 -38
  108. package/dist/esm/codama/instructions/closeContract.js.map +1 -0
  109. package/dist/esm/codama/{devnet/instructions → instructions}/closeRental.js +19 -19
  110. package/dist/esm/codama/instructions/closeRental.js.map +1 -0
  111. package/dist/esm/codama/{devnet/instructions → instructions}/createContract.js +13 -16
  112. package/dist/esm/codama/instructions/createContract.js.map +1 -0
  113. package/dist/esm/codama/{devnet/instructions → instructions}/index.js +3 -1
  114. package/dist/esm/codama/instructions/index.js.map +1 -0
  115. package/dist/esm/codama/instructions/initializeConfig.js +121 -0
  116. package/dist/esm/codama/instructions/initializeConfig.js.map +1 -0
  117. package/dist/esm/codama/{devnet/instructions → instructions}/payRental.js +34 -25
  118. package/dist/esm/codama/instructions/payRental.js.map +1 -0
  119. package/dist/esm/codama/{devnet/instructions → instructions}/resetRental.js +6 -10
  120. package/dist/esm/codama/instructions/resetRental.js.map +1 -0
  121. package/dist/esm/codama/instructions/updateConfig.js +135 -0
  122. package/dist/esm/codama/instructions/updateConfig.js.map +1 -0
  123. package/dist/esm/codama/programs/index.js.map +1 -0
  124. package/dist/esm/codama/{devnet/programs → programs}/srsly.js +22 -14
  125. package/dist/esm/codama/programs/srsly.js.map +1 -0
  126. package/dist/esm/codama/shared/index.js.map +1 -0
  127. package/dist/esm/codama/types/clockData.js.map +1 -0
  128. package/dist/esm/codama/types/equality.js.map +1 -0
  129. package/dist/esm/codama/types/execContext.js.map +1 -0
  130. package/dist/esm/codama/types/index.js.map +1 -0
  131. package/dist/esm/codama/types/paymentFrequency.js.map +1 -0
  132. package/dist/esm/codama/types/serializableAccount.js.map +1 -0
  133. package/dist/esm/codama/types/serializableInstruction.js.map +1 -0
  134. package/dist/esm/codama/types/threadResponse.js.map +1 -0
  135. package/dist/esm/codama/types/trigger.js.map +1 -0
  136. package/dist/esm/codama/types/triggerContext.js.map +1 -0
  137. package/dist/esm/contract/cancel.js +73 -0
  138. package/dist/esm/contract/cancel.js.map +1 -0
  139. package/dist/esm/contract/close.js +75 -32
  140. package/dist/esm/contract/close.js.map +1 -1
  141. package/dist/esm/contract/create.js +79 -34
  142. package/dist/esm/contract/create.js.map +1 -1
  143. package/dist/esm/contract/index.js +1 -0
  144. package/dist/esm/contract/index.js.map +1 -1
  145. package/dist/esm/index.js +8 -2
  146. package/dist/esm/index.js.map +1 -1
  147. package/dist/esm/package.json +53 -0
  148. package/dist/esm/rental/accept.js +77 -43
  149. package/dist/esm/rental/accept.js.map +1 -1
  150. package/dist/esm/rental/cancel.js +40 -28
  151. package/dist/esm/rental/cancel.js.map +1 -1
  152. package/dist/esm/rental/close.js +42 -30
  153. package/dist/esm/rental/close.js.map +1 -1
  154. package/dist/esm/rental/reset.js +51 -44
  155. package/dist/esm/rental/reset.js.map +1 -1
  156. package/dist/esm/types/paymentFrequency.js +53 -0
  157. package/dist/esm/types/paymentFrequency.js.map +1 -0
  158. package/dist/esm/utils/config.js +173 -0
  159. package/dist/esm/utils/config.js.map +1 -0
  160. package/dist/esm/utils/constants.js +49 -24
  161. package/dist/esm/utils/constants.js.map +1 -1
  162. package/dist/esm/utils/duration.js +68 -0
  163. package/dist/esm/utils/duration.js.map +1 -0
  164. package/dist/esm/utils/index.js +4 -0
  165. package/dist/esm/utils/index.js.map +1 -1
  166. package/dist/esm/utils/instruction-converter.js +62 -0
  167. package/dist/esm/utils/instruction-converter.js.map +1 -0
  168. package/dist/esm/utils/paymentFrequency.js +55 -0
  169. package/dist/esm/utils/paymentFrequency.js.map +1 -0
  170. package/dist/esm/utils/profiles.js +39 -19
  171. package/dist/esm/utils/profiles.js.map +1 -1
  172. package/dist/esm/utils/types.js +5 -0
  173. package/dist/esm/utils/types.js.map +1 -0
  174. package/dist/types/codama/accounts/config.d.ts +52 -0
  175. package/dist/types/codama/accounts/config.d.ts.map +1 -0
  176. package/dist/types/codama/{devnet/accounts → accounts}/contractState.d.ts +2 -4
  177. package/dist/types/codama/accounts/contractState.d.ts.map +1 -0
  178. package/dist/types/codama/{devnet/accounts → accounts}/index.d.ts +1 -1
  179. package/dist/types/codama/accounts/index.d.ts.map +1 -0
  180. package/dist/types/codama/{devnet/accounts → accounts}/rentalState.d.ts +2 -0
  181. package/dist/types/codama/accounts/rentalState.d.ts.map +1 -0
  182. package/dist/types/codama/accounts/thread.d.ts.map +1 -0
  183. package/dist/types/codama/errors/index.d.ts.map +1 -0
  184. package/dist/types/codama/errors/srsly.d.ts +68 -0
  185. package/dist/types/codama/errors/srsly.d.ts.map +1 -0
  186. package/dist/types/codama/index.d.ts.map +1 -0
  187. package/dist/types/codama/instructions/acceptRental.d.ts +135 -0
  188. package/dist/types/codama/instructions/acceptRental.d.ts.map +1 -0
  189. package/dist/types/codama/instructions/cancelContract.d.ts +59 -0
  190. package/dist/types/codama/instructions/cancelContract.d.ts.map +1 -0
  191. package/dist/types/codama/{devnet/instructions → instructions}/cancelRental.d.ts +14 -10
  192. package/dist/types/codama/instructions/cancelRental.d.ts.map +1 -0
  193. package/dist/types/codama/instructions/closeContract.d.ts +104 -0
  194. package/dist/types/codama/instructions/closeContract.d.ts.map +1 -0
  195. package/dist/types/codama/{devnet/instructions → instructions}/closeRental.d.ts +20 -12
  196. package/dist/types/codama/instructions/closeRental.d.ts.map +1 -0
  197. package/dist/types/codama/instructions/createContract.d.ts +112 -0
  198. package/dist/types/codama/instructions/createContract.d.ts.map +1 -0
  199. package/dist/types/codama/{devnet/instructions → instructions}/index.d.ts +3 -1
  200. package/dist/types/codama/instructions/index.d.ts.map +1 -0
  201. package/dist/types/codama/instructions/initializeConfig.d.ts +60 -0
  202. package/dist/types/codama/instructions/initializeConfig.d.ts.map +1 -0
  203. package/dist/types/codama/{devnet/instructions → instructions}/payRental.d.ts +28 -13
  204. package/dist/types/codama/instructions/payRental.d.ts.map +1 -0
  205. package/dist/types/codama/{devnet/instructions → instructions}/resetRental.d.ts +15 -11
  206. package/dist/types/codama/instructions/resetRental.d.ts.map +1 -0
  207. package/dist/types/codama/instructions/updateConfig.d.ts +93 -0
  208. package/dist/types/codama/instructions/updateConfig.d.ts.map +1 -0
  209. package/dist/types/codama/programs/index.d.ts.map +1 -0
  210. package/dist/types/codama/{devnet/programs → programs}/srsly.d.ts +19 -13
  211. package/dist/types/codama/programs/srsly.d.ts.map +1 -0
  212. package/dist/types/codama/shared/index.d.ts.map +1 -0
  213. package/dist/types/codama/types/clockData.d.ts.map +1 -0
  214. package/dist/types/codama/types/equality.d.ts.map +1 -0
  215. package/dist/types/codama/types/execContext.d.ts.map +1 -0
  216. package/dist/types/codama/types/index.d.ts.map +1 -0
  217. package/dist/types/codama/types/paymentFrequency.d.ts.map +1 -0
  218. package/dist/types/codama/types/serializableAccount.d.ts.map +1 -0
  219. package/dist/types/codama/types/serializableInstruction.d.ts.map +1 -0
  220. package/dist/types/codama/types/threadResponse.d.ts.map +1 -0
  221. package/dist/types/codama/types/trigger.d.ts.map +1 -0
  222. package/dist/types/codama/types/triggerContext.d.ts.map +1 -0
  223. package/dist/types/contract/cancel.d.ts +66 -0
  224. package/dist/types/contract/cancel.d.ts.map +1 -0
  225. package/dist/types/contract/close.d.ts +29 -13
  226. package/dist/types/contract/close.d.ts.map +1 -1
  227. package/dist/types/contract/create.d.ts +55 -54
  228. package/dist/types/contract/create.d.ts.map +1 -1
  229. package/dist/types/contract/index.d.ts +1 -0
  230. package/dist/types/contract/index.d.ts.map +1 -1
  231. package/dist/types/index.d.ts +5 -2
  232. package/dist/types/index.d.ts.map +1 -1
  233. package/dist/types/rental/accept.d.ts +65 -15
  234. package/dist/types/rental/accept.d.ts.map +1 -1
  235. package/dist/types/rental/cancel.d.ts +36 -8
  236. package/dist/types/rental/cancel.d.ts.map +1 -1
  237. package/dist/types/rental/close.d.ts +36 -8
  238. package/dist/types/rental/close.d.ts.map +1 -1
  239. package/dist/types/rental/reset.d.ts +42 -11
  240. package/dist/types/rental/reset.d.ts.map +1 -1
  241. package/dist/types/types/paymentFrequency.d.ts +44 -0
  242. package/dist/types/types/paymentFrequency.d.ts.map +1 -0
  243. package/dist/types/utils/config.d.ts +110 -0
  244. package/dist/types/utils/config.d.ts.map +1 -0
  245. package/dist/types/utils/constants.d.ts +14 -11
  246. package/dist/types/utils/constants.d.ts.map +1 -1
  247. package/dist/types/utils/duration.d.ts +56 -0
  248. package/dist/types/utils/duration.d.ts.map +1 -0
  249. package/dist/types/utils/index.d.ts +4 -0
  250. package/dist/types/utils/index.d.ts.map +1 -1
  251. package/dist/types/utils/instruction-converter.d.ts +117 -0
  252. package/dist/types/utils/instruction-converter.d.ts.map +1 -0
  253. package/dist/types/utils/paymentFrequency.d.ts +18 -0
  254. package/dist/types/utils/paymentFrequency.d.ts.map +1 -0
  255. package/dist/types/utils/profiles.d.ts +14 -8
  256. package/dist/types/utils/profiles.d.ts.map +1 -1
  257. package/dist/types/utils/types.d.ts +6 -0
  258. package/dist/types/utils/types.d.ts.map +1 -0
  259. package/package.json +33 -25
  260. package/target/idl/{srsly-devnet.json → srsly.json} +834 -466
  261. package/dist/cjs/codama/devnet/accounts/contractState.js.map +0 -1
  262. package/dist/cjs/codama/devnet/accounts/fleet.js +0 -77
  263. package/dist/cjs/codama/devnet/accounts/fleet.js.map +0 -1
  264. package/dist/cjs/codama/devnet/accounts/index.js.map +0 -1
  265. package/dist/cjs/codama/devnet/accounts/rentalState.js.map +0 -1
  266. package/dist/cjs/codama/devnet/accounts/thread.js.map +0 -1
  267. package/dist/cjs/codama/devnet/errors/index.js.map +0 -1
  268. package/dist/cjs/codama/devnet/errors/srsly.js.map +0 -1
  269. package/dist/cjs/codama/devnet/index.js.map +0 -1
  270. package/dist/cjs/codama/devnet/instructions/acceptRental.js.map +0 -1
  271. package/dist/cjs/codama/devnet/instructions/cancelRental.js.map +0 -1
  272. package/dist/cjs/codama/devnet/instructions/closeContract.js.map +0 -1
  273. package/dist/cjs/codama/devnet/instructions/closeRental.js.map +0 -1
  274. package/dist/cjs/codama/devnet/instructions/createContract.js.map +0 -1
  275. package/dist/cjs/codama/devnet/instructions/index.js.map +0 -1
  276. package/dist/cjs/codama/devnet/instructions/normalizeAdmin.js +0 -152
  277. package/dist/cjs/codama/devnet/instructions/normalizeAdmin.js.map +0 -1
  278. package/dist/cjs/codama/devnet/instructions/payRental.js.map +0 -1
  279. package/dist/cjs/codama/devnet/instructions/resetRental.js.map +0 -1
  280. package/dist/cjs/codama/devnet/programs/index.js.map +0 -1
  281. package/dist/cjs/codama/devnet/programs/srsly.js.map +0 -1
  282. package/dist/cjs/codama/devnet/shared/index.js.map +0 -1
  283. package/dist/cjs/codama/devnet/types/clockData.js.map +0 -1
  284. package/dist/cjs/codama/devnet/types/equality.js.map +0 -1
  285. package/dist/cjs/codama/devnet/types/execContext.js.map +0 -1
  286. package/dist/cjs/codama/devnet/types/index.js.map +0 -1
  287. package/dist/cjs/codama/devnet/types/paymentFrequency.js.map +0 -1
  288. package/dist/cjs/codama/devnet/types/serializableAccount.js.map +0 -1
  289. package/dist/cjs/codama/devnet/types/serializableInstruction.js.map +0 -1
  290. package/dist/cjs/codama/devnet/types/threadResponse.js.map +0 -1
  291. package/dist/cjs/codama/devnet/types/trigger.js.map +0 -1
  292. package/dist/cjs/codama/devnet/types/triggerContext.js.map +0 -1
  293. package/dist/cjs/network.js +0 -107
  294. package/dist/cjs/network.js.map +0 -1
  295. package/dist/esm/codama/devnet/accounts/contractState.js.map +0 -1
  296. package/dist/esm/codama/devnet/accounts/fleet.js +0 -64
  297. package/dist/esm/codama/devnet/accounts/fleet.js.map +0 -1
  298. package/dist/esm/codama/devnet/accounts/index.js.map +0 -1
  299. package/dist/esm/codama/devnet/accounts/rentalState.js.map +0 -1
  300. package/dist/esm/codama/devnet/accounts/thread.js.map +0 -1
  301. package/dist/esm/codama/devnet/errors/index.js.map +0 -1
  302. package/dist/esm/codama/devnet/errors/srsly.js.map +0 -1
  303. package/dist/esm/codama/devnet/index.js.map +0 -1
  304. package/dist/esm/codama/devnet/instructions/acceptRental.js.map +0 -1
  305. package/dist/esm/codama/devnet/instructions/cancelRental.js.map +0 -1
  306. package/dist/esm/codama/devnet/instructions/closeContract.js.map +0 -1
  307. package/dist/esm/codama/devnet/instructions/closeRental.js.map +0 -1
  308. package/dist/esm/codama/devnet/instructions/createContract.js.map +0 -1
  309. package/dist/esm/codama/devnet/instructions/index.js.map +0 -1
  310. package/dist/esm/codama/devnet/instructions/normalizeAdmin.js +0 -142
  311. package/dist/esm/codama/devnet/instructions/normalizeAdmin.js.map +0 -1
  312. package/dist/esm/codama/devnet/instructions/payRental.js.map +0 -1
  313. package/dist/esm/codama/devnet/instructions/resetRental.js.map +0 -1
  314. package/dist/esm/codama/devnet/programs/index.js.map +0 -1
  315. package/dist/esm/codama/devnet/programs/srsly.js.map +0 -1
  316. package/dist/esm/codama/devnet/shared/index.js.map +0 -1
  317. package/dist/esm/codama/devnet/types/clockData.js.map +0 -1
  318. package/dist/esm/codama/devnet/types/equality.js.map +0 -1
  319. package/dist/esm/codama/devnet/types/execContext.js.map +0 -1
  320. package/dist/esm/codama/devnet/types/index.js.map +0 -1
  321. package/dist/esm/codama/devnet/types/paymentFrequency.js.map +0 -1
  322. package/dist/esm/codama/devnet/types/serializableAccount.js.map +0 -1
  323. package/dist/esm/codama/devnet/types/serializableInstruction.js.map +0 -1
  324. package/dist/esm/codama/devnet/types/threadResponse.js.map +0 -1
  325. package/dist/esm/codama/devnet/types/trigger.js.map +0 -1
  326. package/dist/esm/codama/devnet/types/triggerContext.js.map +0 -1
  327. package/dist/esm/network.js +0 -67
  328. package/dist/esm/network.js.map +0 -1
  329. package/dist/types/codama/devnet/accounts/contractState.d.ts.map +0 -1
  330. package/dist/types/codama/devnet/accounts/fleet.d.ts +0 -38
  331. package/dist/types/codama/devnet/accounts/fleet.d.ts.map +0 -1
  332. package/dist/types/codama/devnet/accounts/index.d.ts.map +0 -1
  333. package/dist/types/codama/devnet/accounts/rentalState.d.ts.map +0 -1
  334. package/dist/types/codama/devnet/accounts/thread.d.ts.map +0 -1
  335. package/dist/types/codama/devnet/errors/index.d.ts.map +0 -1
  336. package/dist/types/codama/devnet/errors/srsly.d.ts +0 -48
  337. package/dist/types/codama/devnet/errors/srsly.d.ts.map +0 -1
  338. package/dist/types/codama/devnet/index.d.ts.map +0 -1
  339. package/dist/types/codama/devnet/instructions/acceptRental.d.ts +0 -128
  340. package/dist/types/codama/devnet/instructions/acceptRental.d.ts.map +0 -1
  341. package/dist/types/codama/devnet/instructions/cancelRental.d.ts.map +0 -1
  342. package/dist/types/codama/devnet/instructions/closeContract.d.ts +0 -96
  343. package/dist/types/codama/devnet/instructions/closeContract.d.ts.map +0 -1
  344. package/dist/types/codama/devnet/instructions/closeRental.d.ts.map +0 -1
  345. package/dist/types/codama/devnet/instructions/createContract.d.ts +0 -108
  346. package/dist/types/codama/devnet/instructions/createContract.d.ts.map +0 -1
  347. package/dist/types/codama/devnet/instructions/index.d.ts.map +0 -1
  348. package/dist/types/codama/devnet/instructions/normalizeAdmin.d.ts +0 -67
  349. package/dist/types/codama/devnet/instructions/normalizeAdmin.d.ts.map +0 -1
  350. package/dist/types/codama/devnet/instructions/payRental.d.ts.map +0 -1
  351. package/dist/types/codama/devnet/instructions/resetRental.d.ts.map +0 -1
  352. package/dist/types/codama/devnet/programs/index.d.ts.map +0 -1
  353. package/dist/types/codama/devnet/programs/srsly.d.ts.map +0 -1
  354. package/dist/types/codama/devnet/shared/index.d.ts.map +0 -1
  355. package/dist/types/codama/devnet/types/clockData.d.ts.map +0 -1
  356. package/dist/types/codama/devnet/types/equality.d.ts.map +0 -1
  357. package/dist/types/codama/devnet/types/execContext.d.ts.map +0 -1
  358. package/dist/types/codama/devnet/types/index.d.ts.map +0 -1
  359. package/dist/types/codama/devnet/types/paymentFrequency.d.ts.map +0 -1
  360. package/dist/types/codama/devnet/types/serializableAccount.d.ts.map +0 -1
  361. package/dist/types/codama/devnet/types/serializableInstruction.d.ts.map +0 -1
  362. package/dist/types/codama/devnet/types/threadResponse.d.ts.map +0 -1
  363. package/dist/types/codama/devnet/types/trigger.d.ts.map +0 -1
  364. package/dist/types/codama/devnet/types/triggerContext.d.ts.map +0 -1
  365. package/dist/types/network.d.ts +0 -58
  366. package/dist/types/network.d.ts.map +0 -1
  367. package/target/idl/srsly-mainnet.json +0 -3011
  368. package/target/types/srsly-mainnet.ts +0 -1
  369. /package/dist/cjs/codama/{devnet/accounts → accounts}/thread.js +0 -0
  370. /package/dist/cjs/codama/{devnet/errors → errors}/index.js +0 -0
  371. /package/dist/cjs/codama/{devnet/index.js → index.js} +0 -0
  372. /package/dist/cjs/codama/{devnet/programs → programs}/index.js +0 -0
  373. /package/dist/cjs/codama/{devnet/shared → shared}/index.js +0 -0
  374. /package/dist/cjs/codama/{devnet/types → types}/clockData.js +0 -0
  375. /package/dist/cjs/codama/{devnet/types → types}/equality.js +0 -0
  376. /package/dist/cjs/codama/{devnet/types → types}/execContext.js +0 -0
  377. /package/dist/cjs/codama/{devnet/types → types}/index.js +0 -0
  378. /package/dist/cjs/codama/{devnet/types → types}/paymentFrequency.js +0 -0
  379. /package/dist/cjs/codama/{devnet/types → types}/serializableAccount.js +0 -0
  380. /package/dist/cjs/codama/{devnet/types → types}/serializableInstruction.js +0 -0
  381. /package/dist/cjs/codama/{devnet/types → types}/threadResponse.js +0 -0
  382. /package/dist/cjs/codama/{devnet/types → types}/trigger.js +0 -0
  383. /package/dist/cjs/codama/{devnet/types → types}/triggerContext.js +0 -0
  384. /package/dist/esm/codama/{devnet/accounts → accounts}/thread.js +0 -0
  385. /package/dist/esm/codama/{devnet/errors → errors}/index.js +0 -0
  386. /package/dist/esm/codama/{devnet/index.js → index.js} +0 -0
  387. /package/dist/esm/codama/{devnet/programs → programs}/index.js +0 -0
  388. /package/dist/esm/codama/{devnet/shared → shared}/index.js +0 -0
  389. /package/dist/esm/codama/{devnet/types → types}/clockData.js +0 -0
  390. /package/dist/esm/codama/{devnet/types → types}/equality.js +0 -0
  391. /package/dist/esm/codama/{devnet/types → types}/execContext.js +0 -0
  392. /package/dist/esm/codama/{devnet/types → types}/index.js +0 -0
  393. /package/dist/esm/codama/{devnet/types → types}/paymentFrequency.js +0 -0
  394. /package/dist/esm/codama/{devnet/types → types}/serializableAccount.js +0 -0
  395. /package/dist/esm/codama/{devnet/types → types}/serializableInstruction.js +0 -0
  396. /package/dist/esm/codama/{devnet/types → types}/threadResponse.js +0 -0
  397. /package/dist/esm/codama/{devnet/types → types}/trigger.js +0 -0
  398. /package/dist/esm/codama/{devnet/types → types}/triggerContext.js +0 -0
  399. /package/dist/types/codama/{devnet/accounts → accounts}/thread.d.ts +0 -0
  400. /package/dist/types/codama/{devnet/errors → errors}/index.d.ts +0 -0
  401. /package/dist/types/codama/{devnet/index.d.ts → index.d.ts} +0 -0
  402. /package/dist/types/codama/{devnet/programs → programs}/index.d.ts +0 -0
  403. /package/dist/types/codama/{devnet/shared → shared}/index.d.ts +0 -0
  404. /package/dist/types/codama/{devnet/types → types}/clockData.d.ts +0 -0
  405. /package/dist/types/codama/{devnet/types → types}/equality.d.ts +0 -0
  406. /package/dist/types/codama/{devnet/types → types}/execContext.d.ts +0 -0
  407. /package/dist/types/codama/{devnet/types → types}/index.d.ts +0 -0
  408. /package/dist/types/codama/{devnet/types → types}/paymentFrequency.d.ts +0 -0
  409. /package/dist/types/codama/{devnet/types → types}/serializableAccount.d.ts +0 -0
  410. /package/dist/types/codama/{devnet/types → types}/serializableInstruction.d.ts +0 -0
  411. /package/dist/types/codama/{devnet/types → types}/threadResponse.d.ts +0 -0
  412. /package/dist/types/codama/{devnet/types → types}/trigger.d.ts +0 -0
  413. /package/dist/types/codama/{devnet/types → types}/triggerContext.d.ts +0 -0
  414. /package/target/types/{srsly-devnet.ts → srsly.ts} +0 -0
@@ -6,11 +6,11 @@
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
8
  import { type Address, type ReadonlyUint8Array } from '@solana/kit';
9
- import { type ParsedAcceptRentalInstruction, type ParsedCancelRentalInstruction, type ParsedCloseContractInstruction, type ParsedCloseRentalInstruction, type ParsedCreateContractInstruction, type ParsedNormalizeAdminInstruction, type ParsedPayRentalInstruction, type ParsedResetRentalInstruction } from '../instructions';
9
+ import { type ParsedAcceptRentalInstruction, type ParsedCancelContractInstruction, type ParsedCancelRentalInstruction, type ParsedCloseContractInstruction, type ParsedCloseRentalInstruction, type ParsedCreateContractInstruction, type ParsedInitializeConfigInstruction, type ParsedPayRentalInstruction, type ParsedResetRentalInstruction, type ParsedUpdateConfigInstruction } from '../instructions';
10
10
  export declare const SRSLY_PROGRAM_ADDRESS: Address<"SRSLY1fq9TJqCk1gNSE7VZL2bztvTn9wm4VR8u8jMKT">;
11
11
  export declare enum SrslyAccount {
12
- ContractState = 0,
13
- Fleet = 1,
12
+ Config = 0,
13
+ ContractState = 1,
14
14
  RentalState = 2,
15
15
  Thread = 3
16
16
  }
@@ -19,13 +19,15 @@ export declare function identifySrslyAccount(account: {
19
19
  } | ReadonlyUint8Array): SrslyAccount;
20
20
  export declare enum SrslyInstruction {
21
21
  AcceptRental = 0,
22
- CancelRental = 1,
23
- CloseContract = 2,
24
- CloseRental = 3,
25
- CreateContract = 4,
26
- NormalizeAdmin = 5,
27
- PayRental = 6,
28
- ResetRental = 7
22
+ CancelContract = 1,
23
+ CancelRental = 2,
24
+ CloseContract = 3,
25
+ CloseRental = 4,
26
+ CreateContract = 5,
27
+ InitializeConfig = 6,
28
+ PayRental = 7,
29
+ ResetRental = 8,
30
+ UpdateConfig = 9
29
31
  }
30
32
  export declare function identifySrslyInstruction(instruction: {
31
33
  data: ReadonlyUint8Array;
@@ -33,6 +35,8 @@ export declare function identifySrslyInstruction(instruction: {
33
35
  export type ParsedSrslyInstruction<TProgram extends string = 'SRSLY1fq9TJqCk1gNSE7VZL2bztvTn9wm4VR8u8jMKT'> = ({
34
36
  instructionType: SrslyInstruction.AcceptRental;
35
37
  } & ParsedAcceptRentalInstruction<TProgram>) | ({
38
+ instructionType: SrslyInstruction.CancelContract;
39
+ } & ParsedCancelContractInstruction<TProgram>) | ({
36
40
  instructionType: SrslyInstruction.CancelRental;
37
41
  } & ParsedCancelRentalInstruction<TProgram>) | ({
38
42
  instructionType: SrslyInstruction.CloseContract;
@@ -41,10 +45,12 @@ export type ParsedSrslyInstruction<TProgram extends string = 'SRSLY1fq9TJqCk1gNS
41
45
  } & ParsedCloseRentalInstruction<TProgram>) | ({
42
46
  instructionType: SrslyInstruction.CreateContract;
43
47
  } & ParsedCreateContractInstruction<TProgram>) | ({
44
- instructionType: SrslyInstruction.NormalizeAdmin;
45
- } & ParsedNormalizeAdminInstruction<TProgram>) | ({
48
+ instructionType: SrslyInstruction.InitializeConfig;
49
+ } & ParsedInitializeConfigInstruction<TProgram>) | ({
46
50
  instructionType: SrslyInstruction.PayRental;
47
51
  } & ParsedPayRentalInstruction<TProgram>) | ({
48
52
  instructionType: SrslyInstruction.ResetRental;
49
- } & ParsedResetRentalInstruction<TProgram>);
53
+ } & ParsedResetRentalInstruction<TProgram>) | ({
54
+ instructionType: SrslyInstruction.UpdateConfig;
55
+ } & ParsedUpdateConfigInstruction<TProgram>);
50
56
  //# sourceMappingURL=srsly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"srsly.d.ts","sourceRoot":"","sources":["../../../../src/codama/programs/srsly.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,O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,OAAO,CAAC,QAAQ,CAAC,GACjB,qBAAqB,CAAC,QAAQ,CAAC,GAC/B,iBAAiB,CAAC,QAAQ,CAAC,GAC9B,KAAK,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAOtC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clockData.d.ts","sourceRoot":"","sources":["../../../../src/codama/types/clockData.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAQL,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AAErB,6FAA6F;AAC7F,MAAM,MAAM,SAAS,GAAG;IACtB,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,sBAAsB;IACtB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,kCAAkC;IAClC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,aAAa,CAAC,CAM5D;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,SAAS,CAAC,CAMxD;AAED,wBAAgB,iBAAiB,IAAI,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,CAEnE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["../../../../src/codama/types/equality.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AAErB,yEAAyE;AACzE,oBAAY,QAAQ;IAClB,kBAAkB,IAAA;IAClB,eAAe,IAAA;CAChB;AAED,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AgB,qBAAqB,IAAI,OAAO,CAAC,eAAe,CAAC,CAShE;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAAC,WAAW,CAAC,CAS5D;AAED,wBAAgB,mBAAmB,IAAI,KAAK,CAAC,eAAe,EAAE,WAAW,CAAC,CAEzE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/codama/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paymentFrequency.d.ts","sourceRoot":"","sources":["../../../../src/codama/types/paymentFrequency.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AAErB,oBAAY,gBAAgB;IAC1B,MAAM,IAAA;IACN,KAAK,IAAA;IACL,QAAQ,IAAA;IACR,MAAM,IAAA;IACN,OAAO,IAAA;IACP,UAAU,IAAA;IACV,MAAM,IAAA;CACP;AAED,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAEpD,wBAAgB,0BAA0B,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAE1E;AAED,wBAAgB,0BAA0B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAEtE;AAED,wBAAgB,wBAAwB,IAAI,KAAK,CAC/C,oBAAoB,EACpB,gBAAgB,CACjB,CAKA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializableAccount.d.ts","sourceRoot":"","sources":["../../../../src/codama/types/serializableAccount.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAQL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AAErB,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAE1D,wBAAgB,6BAA6B,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAMhF;AAED,wBAAgB,6BAA6B,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAM5E;AAED,wBAAgB,2BAA2B,IAAI,KAAK,CAClD,uBAAuB,EACvB,mBAAmB,CACpB,CAKA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serializableInstruction.d.ts","sourceRoot":"","sources":["../../../../src/codama/types/serializableInstruction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAcL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,GAAG,CAAC;AAEX,wDAAwD;AACxD,MAAM,MAAM,uBAAuB,GAAG;IACpC,yEAAyE;IACzE,SAAS,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACrC,sDAAsD;IACtD,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,yEAAyE;IACzE,SAAS,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,E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Ac,CAC5B,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,mCAAmC,CACvC,kBAAkB,EAClB,QAAQ,EACR,WAAW,CACZ,GACA,4BAA4B,CAAC,kBAAkB,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC3E,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,mCAAmC,CACvC,kBAAkB,EAClB,QAAQ,EACR,MAAM,CACP,GACA,4BAA4B,CAAC,kBAAkB,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAUtE,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,cAAc,CAAC,QAAQ,CAAC,EACjE,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,cAAc,GACpB,KAAK,IAAI,cAAc,GAAG;IAAE,MAAM,EAAE,CAAC,CAAA;CAAE,CAEzC"}
@@ -0,0 +1,66 @@
1
+ import { type ConfigSelector } from '../utils/config';
2
+ import { type FluentInstruction, type FluentConfigSelector } from '../utils/instruction-converter';
3
+ type UniversalAddress = string;
4
+ type UniversalSigner = any;
5
+ /**
6
+ * Simplified parameters for canceling a rental contract - strings only!
7
+ */
8
+ export interface CancelContractParams {
9
+ /**
10
+ * The owner wallet that will sign the transaction (can be signer or string)
11
+ */
12
+ owner: UniversalSigner | UniversalAddress;
13
+ /**
14
+ * The fleet account address associated with the contract
15
+ */
16
+ fleet: UniversalAddress;
17
+ /**
18
+ * The rental contract account address to cancel
19
+ */
20
+ contract: UniversalAddress;
21
+ /**
22
+ * The sage program address for CPI calls
23
+ * If not provided, will use network-specific default
24
+ */
25
+ sageProgramAddress?: UniversalAddress;
26
+ }
27
+ /**
28
+ * Creates an instruction to cancel a rental contract with fluent configuration.
29
+ * This unified version works with both @solana/kit and @solana/web3.js using strings for addresses.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * // Works with any library - just use strings for addresses!
34
+ *
35
+ * // Default returns @solana/kit format
36
+ * const kitInstruction = await cancelContract({
37
+ * owner: wallet, // Can be signer object or string
38
+ * fleet: "FleetAddress123...", // String address
39
+ * contract: "ContractAddr...", // String address
40
+ * });
41
+ *
42
+ * // Convert to @solana/web3.js format using fluent interface
43
+ * const web3jsInstruction = await cancelContract({
44
+ * owner: wallet,
45
+ * fleet: "FleetAddress123...",
46
+ * contract: "ContractAddr...",
47
+ * }).web3js();
48
+ *
49
+ * // Chain configuration and format conversion
50
+ * const web3jsInstructionWithConfig = await cancelContract({
51
+ * owner: wallet,
52
+ * fleet: "FleetAddress123...",
53
+ * contract: "ContractAddr...",
54
+ * }).set({ programs: 'mainnet' }).web3js();
55
+ *
56
+ * // Use with your preferred Solana library
57
+ * const transaction = new Transaction().add(web3jsInstruction);
58
+ * ```
59
+ *
60
+ * @param params The simplified parameters for canceling a rental contract
61
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
62
+ */
63
+ export declare function cancelContract(params: CancelContractParams): FluentConfigSelector<FluentInstruction>;
64
+ export declare function getCancelContractInstructionAsync(input: any, options?: any): ConfigSelector<any>;
65
+ export {};
66
+ //# sourceMappingURL=cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel.d.ts","sourceRoot":"","sources":["../../../src/contract/cancel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAE3G,OAAO,EAAuD,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGxJ,KAAK,gBAAgB,GAAG,MAAM,CAAC;AAC/B,KAAK,eAAe,GAAG,GAAG,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAAC;IAE1C;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAE3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;CACvC;AAwCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,oBAAoB,GAC3B,oBAAoB,CAAC,iBAAiB,CAAC,CAGzC;AAGD,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC,CAKhG"}
@@ -1,22 +1,23 @@
1
- import { Address, TransactionSigner } from '@solana/kit';
2
- import { type NetworkSelector } from '../network';
3
- type CloseContractInstruction = any;
1
+ import { type ConfigSelector } from '../utils/config';
2
+ import { type FluentInstruction, type FluentConfigSelector } from '../utils/instruction-converter';
3
+ type UniversalAddress = string;
4
+ type UniversalSigner = any;
4
5
  /**
5
- * Simplified parameters for closing a rental contract
6
+ * Simplified parameters for closing a rental contract - strings only!
6
7
  */
7
8
  export interface CloseContractParams {
8
9
  /**
9
- * The owner wallet that will sign the transaction
10
+ * The owner wallet that will sign the transaction (can be signer or string)
10
11
  */
11
- owner: TransactionSigner<string>;
12
+ owner: UniversalSigner | UniversalAddress;
12
13
  /**
13
14
  * The fleet account address associated with the contract
14
15
  */
15
- fleet: Address<string>;
16
+ fleet: UniversalAddress;
16
17
  /**
17
18
  * The rental contract account address to close
18
19
  */
19
- contract: Address<string>;
20
+ contract: UniversalAddress;
20
21
  /**
21
22
  * Optional faction (1 = mud, 2 = oni, 3 = ustur)
22
23
  * Or as string: 'mud', 'oni', 'ustur'
@@ -24,14 +25,29 @@ export interface CloseContractParams {
24
25
  faction: number | string;
25
26
  /**
26
27
  * The game ID account address
27
- * Defaults to 'GAMEzqJehF8yAnKiTARUuhZMvLvkZVAsCVri5vSfemLr' if not provided
28
+ * If not provided, will use network-specific default
28
29
  */
29
- gameId?: Address<string>;
30
+ gameId?: UniversalAddress;
30
31
  }
31
32
  /**
32
- * Creates an instruction to close a rental contract with fluent network selection.
33
+ * Creates an instruction to close a rental contract with fluent configuration.
34
+ *
35
+ * @param params The contract closing parameters
36
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * // Use atlasnet defaults (instruction building only)
41
+ * await closeContract(params);
42
+ *
43
+ * // Use mainnet
44
+ * await closeContract(params).set({ programs: 'mainnet' });
45
+ *
46
+ * // Override game ID
47
+ * await closeContract(params).set({ gameId: 'custom...' });
48
+ * ```
33
49
  */
34
- export declare function closeContract(params: CloseContractParams): NetworkSelector<CloseContractInstruction>;
35
- export declare function getCloseContractInstructionAsync(input: any, options?: any): NetworkSelector<any>;
50
+ export declare function closeContract(params: CloseContractParams): FluentConfigSelector<FluentInstruction>;
51
+ export declare function getCloseContractInstructionAsync(input: any, options?: any): ConfigSelector<any>;
36
52
  export {};
37
53
  //# sourceMappingURL=close.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../../../src/contract/close.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAiD,KAAK,eAAe,EAAgB,MAAM,YAAY,CAAC;AAG/G,KAAK,wBAAwB,GAAG,GAAG,CAAC;AAOpC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1B;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1B;AAsED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,mBAAmB,GAC1B,eAAe,CAAC,wBAAwB,CAAC,CAE3C;AAGD,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAKhG"}
1
+ {"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../../../src/contract/close.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAG3G,OAAO,EAAuD,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGxJ,KAAK,gBAAgB,GAAG,MAAM,CAAC;AAC/B,KAAK,eAAe,GAAG,GAAG,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAAC;IAE1C;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAE3B;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAkGD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,mBAAmB,GAC1B,oBAAoB,CAAC,iBAAiB,CAAC,CAGzC;AAGD,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC,CAK/F"}
@@ -1,70 +1,71 @@
1
- import { Address, TransactionSigner } from '@solana/kit';
2
- import { type NetworkSelector } from '../network';
3
- type CreateContractInstruction = any;
4
1
  /**
5
- * Simplified parameters for creating a rental contract
2
+ * Unified contract creation - works with both @solana/kit and @solana/web3.js
3
+ * Uses strings for all addresses to eliminate library-specific type complexity
4
+ */
5
+ import { PaymentFrequencyString } from '../types/paymentFrequency';
6
+ import { type FluentInstruction, type FluentConfigSelector } from '../utils/instruction-converter';
7
+ type UniversalAddress = string;
8
+ type UniversalSigner = any;
9
+ /**
10
+ * Simplified parameters for creating a rental contract - strings only!
6
11
  */
7
12
  export interface CreateContractParams {
8
- /**
9
- * The owner wallet that will sign the transaction
10
- */
11
- owner: TransactionSigner<string>;
12
- /**
13
- * The fleet account address to be rented out
14
- */
15
- fleet: Address<string>;
16
- /**
17
- * The owner's profile account address
18
- */
19
- ownerProfile: Address<string>;
20
- /**
21
- * The rental rate in ATLAS tokens
22
- */
23
- rate: number | bigint;
24
- /**
25
- * The minimum rental duration in seconds
26
- */
27
- durationMin: number | bigint;
28
- /**
29
- * The maximum rental duration in seconds
30
- */
31
- durationMax: number | bigint;
32
- /**
33
- * The payment frequency (e.g., "daily", "weekly", "monthly")
34
- */
35
- paymentsFreq: string;
36
- /**
37
- * The owner key index
38
- * Typically 0 unless the owner has multiple authorized keys
39
- */
13
+ owner: UniversalSigner | UniversalAddress;
14
+ fleet: UniversalAddress;
15
+ ownerProfile: UniversalAddress;
16
+ rate: number;
17
+ durationMax: number;
18
+ paymentsFreq: PaymentFrequencyString;
19
+ gameId?: UniversalAddress;
20
+ sageProgramAddress?: UniversalAddress;
21
+ atlasMint?: UniversalAddress;
40
22
  ownerKeyIndex?: number;
41
- /**
42
- * The game ID account address
43
- * Defaults to 'GAMEzqJehF8yAnKiTARUuhZMvLvkZVAsCVri5vSfemLr' if not provided
44
- */
45
- gameId?: Address<string>;
46
23
  }
47
24
  /**
48
- * Creates an instruction to create a rental contract with fluent network selection.
25
+ * Creates an instruction to create a rental contract with fluent configuration.
26
+ * This unified version works with both @solana/kit and @solana/web3.js using strings for addresses.
49
27
  *
50
28
  * @example
51
29
  * ```typescript
52
- * // Use global network setting
53
- * const ix = await createContract(params).execute();
30
+ * // Works with any library - just use strings for addresses!
31
+ *
32
+ * // Default returns @solana/kit format
33
+ * const kitInstruction = await createContract({
34
+ * owner: wallet, // Can be signer object or string
35
+ * fleet: "FleetAddress123...", // String address
36
+ * ownerProfile: "ProfileAddr...", // String address
37
+ * rate: 1000,
38
+ * durationMax: days(7),
39
+ * paymentsFreq: 'daily'
40
+ * });
41
+ *
42
+ * // Convert to @solana/web3.js format using fluent interface
43
+ * const web3jsInstruction = await createContract({
44
+ * owner: wallet,
45
+ * fleet: "FleetAddress123...",
46
+ * ownerProfile: "ProfileAddr...",
47
+ * rate: 1000,
48
+ * durationMax: days(7),
49
+ * paymentsFreq: 'daily'
50
+ * }).web3js();
54
51
  *
55
- * // Use specific network for this instruction
56
- * const ix = await createContract(params).mainnet();
57
- * const ix = await createContract(params).devnet();
58
- * const ix = await createContract(params).network('mainnet');
52
+ * // Chain configuration and format conversion
53
+ * const web3jsInstructionWithConfig = await createContract({
54
+ * owner: wallet,
55
+ * fleet: "FleetAddress123...",
56
+ * ownerProfile: "ProfileAddr...",
57
+ * rate: 1000,
58
+ * durationMax: days(7),
59
+ * paymentsFreq: 'daily'
60
+ * }).set({ programs: 'mainnet' }).web3js();
61
+ *
62
+ * // Use with your preferred Solana library
63
+ * const transaction = new Transaction().add(web3jsInstruction);
59
64
  * ```
60
65
  *
61
66
  * @param params The simplified parameters for creating a rental contract
62
- * @returns A network selector for creating the instruction
63
- */
64
- export declare function createContract(params: CreateContractParams): NetworkSelector<CreateContractInstruction>;
65
- /**
66
- * Export network selector for getCreateContractInstructionAsync
67
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
67
68
  */
68
- export declare function getCreateContractInstructionAsync(input: any, options?: any): NetworkSelector<any>;
69
+ export declare function createContract(params: CreateContractParams): FluentConfigSelector<FluentInstruction>;
69
70
  export {};
70
71
  //# sourceMappingURL=create.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/contract/create.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAiD,KAAK,eAAe,EAAgB,MAAM,YAAY,CAAC;AAG/G,KAAK,yBAAyB,GAAG,GA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C;IACxB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,sBAAsB,CAAC;IACrC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;IACtC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA8DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAGpG"}
@@ -1,3 +1,4 @@
1
+ export * from "./cancel";
1
2
  export * from "./close";
2
3
  export * from "./create";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA"}
@@ -1,6 +1,9 @@
1
- export * from "./network";
2
1
  export * from "./contract";
3
2
  export * from "./rental";
4
3
  export * from "./utils";
5
- export type { ContractState, RentalState, Fleet, CreateContractInstruction, AcceptRentalInstruction, CancelRentalInstruction, CloseRentalInstruction, CloseContractInstruction, ResetRentalInstruction, PaymentFrequency, ClockData, ThreadResponse } from "./codama/devnet";
4
+ export type { ContractState, RentalState, CreateContractInstruction, CancelContractInstruction, AcceptRentalInstruction, CancelRentalInstruction, CloseRentalInstruction, CloseContractInstruction, ResetRentalInstruction, ClockData, ThreadResponse } from "./codama";
5
+ export { PaymentFrequency } from "./codama/types/paymentFrequency";
6
+ export { PaymentFrequencyString, VALID_PAYMENT_FREQUENCIES, PAYMENT_FREQUENCY_MAP, PAYMENT_FREQUENCY_CONSTANTS, getPaymentFrequencyFromString, isValidPaymentFrequency } from "./types/paymentFrequency";
7
+ export { paymentFrequencyToSeconds, paymentFrequencyStringToSeconds, validateDurationAlignment } from "./utils/paymentFrequency";
8
+ export { decaseconds, minutes, hours, days, weeks, months, duration } from "./utils/duration";
6
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAG1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAIxB,YAAY,EAEV,aAAa,EACb,WAAW,EACX,KAAK,EAGL,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EAGtB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACf,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAIxB,YAAY,EAEV,aAAa,EACb,WAAW,EAGX,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EAGtB,SAAS,EACT,cAAc,EACf,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,2BAA2B,EAC3B,6BAA6B,EAC7B,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,WAAW,EACX,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACT,MAAM,kBAAkB,CAAC"}
@@ -1,18 +1,19 @@
1
- import { Address, TransactionSigner } from '@solana/kit';
2
- import { type NetworkSelector } from '../network';
3
- type AcceptRentalInstruction = any;
1
+ import { type ConfigSelector } from '../utils/config';
2
+ import { type FluentInstruction, type FluentConfigSelector } from '../utils/instruction-converter';
3
+ type UniversalAddress = string;
4
+ type UniversalSigner = any;
4
5
  /**
5
- * Simplified parameters for accepting a rental
6
+ * Simplified parameters for accepting a rental - strings only!
6
7
  */
7
8
  export interface AcceptRentalParams {
8
9
  /**
9
- * The borrower wallet that will sign the transaction
10
+ * The borrower wallet that will sign the transaction (can be signer or string)
10
11
  */
11
- borrower: TransactionSigner<string>;
12
+ borrower: UniversalSigner | UniversalAddress;
12
13
  /**
13
14
  * The borrower's profile account address
14
15
  */
15
- borrowerProfile: Address<string>;
16
+ borrowerProfile: UniversalAddress;
16
17
  /**
17
18
  * The borrower's faction (1 = mud, 2 = oni, 3 = ustur)
18
19
  * Or as string: 'mud', 'oni', 'ustur'
@@ -21,26 +22,75 @@ export interface AcceptRentalParams {
21
22
  /**
22
23
  * The fleet account address that will be rented
23
24
  */
24
- fleet: Address<string>;
25
+ fleet: UniversalAddress;
25
26
  /**
26
27
  * The rental contract account address
27
28
  */
28
- contract: Address<string>;
29
+ contract: UniversalAddress;
29
30
  /**
30
31
  * The game ID account address
31
- * Defaults to 'GAMEzqJehF8yAnKiTARUuhZMvLvkZVAsCVri5vSfemLr' if not provided
32
+ * If not provided, will use network-specific default
32
33
  */
33
- gameId?: Address<string>;
34
+ gameId?: UniversalAddress;
34
35
  /**
35
- * The rental amount (in ATLAS tokens)
36
+ * The rental rate (in ATLAS tokens)
36
37
  */
37
- amount: number | bigint;
38
+ rate: number | bigint;
38
39
  /**
39
40
  * The rental duration (in seconds)
40
41
  */
41
42
  duration: number | bigint;
43
+ /**
44
+ * Optional referral token account address
45
+ * If provided, referrer will receive 5% of the platform fees
46
+ */
47
+ referralTokenAccount?: UniversalAddress;
42
48
  }
43
- export declare function acceptRental(params: AcceptRentalParams): NetworkSelector<AcceptRentalInstruction>;
44
- export declare function getAcceptRentalInstructionAsync(input: any, options?: any): NetworkSelector<any>;
49
+ /**
50
+ * Creates an instruction to accept a rental with fluent configuration.
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * // Works with any library - just use strings for addresses!
55
+ * const instruction = await acceptRental({
56
+ * borrower: wallet, // Can be signer object or string
57
+ * borrowerProfile: "ProfileAddr...", // String address
58
+ * borrowerFaction: 1, // 1 = mud, 2 = oni, 3 = ustur
59
+ * fleet: "FleetAddress123...", // String address
60
+ * contract: "ContractAddr...", // String address
61
+ * rate: 1000, // ATLAS tokens
62
+ * duration: 86400 // 1 day in seconds (total: 1000 * 86400 * 100M stardust)
63
+ * });
64
+ *
65
+ * // With referral (referrer gets 5% of platform fees)
66
+ * const instruction = await acceptRental({
67
+ * borrower: wallet,
68
+ * borrowerProfile: "ProfileAddr...",
69
+ * borrowerFaction: 1,
70
+ * fleet: "FleetAddress123...",
71
+ * contract: "ContractAddr...",
72
+ * rate: 1000,
73
+ * duration: 86400,
74
+ * referralTokenAccount: "ReferralAddr..."
75
+ * });
76
+ *
77
+ * // Use mainnet configuration
78
+ * const instruction = await acceptRental(params).set({ programs: 'mainnet' });
79
+ *
80
+ * // Override specific constants
81
+ * const instruction = await acceptRental(params).set({
82
+ * programs: 'mainnet',
83
+ * gameId: 'custom-game-id...'
84
+ * });
85
+ *
86
+ * // Use the instruction with your preferred Solana library
87
+ * // instruction is compatible with both @solana/kit and @solana/web3.js
88
+ * ```
89
+ *
90
+ * @param params The simplified parameters for accepting a rental
91
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
92
+ */
93
+ export declare function acceptRental(params: AcceptRentalParams): FluentConfigSelector<FluentInstruction>;
94
+ export declare function getAcceptRentalInstructionAsync(input: any, options?: any): ConfigSelector<any>;
45
95
  export {};
46
96
  //# sourceMappingURL=accept.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accept.d.ts","sourceRoot":"","sources":["../../../src/rental/accept.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAiD,KAAK,eAAe,EAAgB,MAAM,YAAY,CAAC;AAI/G,KAAK,uBAAuB,GAAG,GAAG,CAAC;AAOnC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEpC;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjC;;;OAGG;IACH,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;IAEjC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AA8ED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,kBAAkB,GACzB,eAAe,CAAC,uBAAuB,CAAC,CAE1C;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAK/F"}
1
+ {"version":3,"file":"accept.d.ts","sourceRoot":"","sources":["../../../src/rental/accept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAG3G,OAAO,EAAuD,KAAK,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGxJ,KAAK,gBAAgB,GAAG,MAAM,CAAC;AAC/B,KAAK,eAAe,GAAG,GAAG,CAAC;AAG3B;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,eAAe,GAAG,gBAAgB,CAAC;IAE7C;;OAEG;IACH,eAAe,EAAE,gBAAgB,CAAC;IAElC;;;OAGG;IACH,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;IAEjC;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAE3B;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,gBAAgB,CAAC;CACzC;AAqED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,kBAAkB,GACzB,oBAAoB,CAAC,iBAAiB,CAAC,CAGzC;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC,CAK9F"}
@@ -1,20 +1,48 @@
1
- import { Address, TransactionSigner } from '@solana/kit';
2
- import { type NetworkSelector } from '../network';
1
+ import { type ConfigSelector } from '../utils/config';
2
+ type UniversalAddress = string;
3
+ type UniversalSigner = any;
3
4
  type CancelRentalInstruction = any;
4
5
  /**
5
- * Simplified parameters for canceling a rental
6
+ * Simplified parameters for canceling a rental - strings only!
6
7
  */
7
8
  export interface CancelRentalParams {
8
9
  /**
9
- * The borrower wallet that will sign the transaction
10
+ * The borrower wallet that will sign the transaction (can be signer or string)
10
11
  */
11
- borrower: TransactionSigner<string>;
12
+ borrower: UniversalSigner | UniversalAddress;
12
13
  /**
13
14
  * The rental contract account address
14
15
  */
15
- contract: Address<string>;
16
+ contract: UniversalAddress;
16
17
  }
17
- export declare function cancelRental(params: CancelRentalParams): NetworkSelector<CancelRentalInstruction>;
18
- export declare function getCancelRentalInstructionAsync(input: any, options?: any): NetworkSelector<any>;
18
+ /**
19
+ * Creates an instruction to cancel a rental with fluent configuration.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * // Works with any library - just use strings for addresses!
24
+ * const instruction = await cancelRental({
25
+ * borrower: wallet, // Can be signer object or string
26
+ * contract: "ContractAddr..." // String address
27
+ * });
28
+ *
29
+ * // Use mainnet configuration
30
+ * const instruction = await cancelRental(params).set({ programs: 'mainnet' });
31
+ *
32
+ * // Override specific constants
33
+ * const instruction = await cancelRental(params).set({
34
+ * programs: 'mainnet',
35
+ * sageProgramAddress: 'custom...'
36
+ * });
37
+ *
38
+ * // Use the instruction with your preferred Solana library
39
+ * // instruction is compatible with both @solana/kit and @solana/web3.js
40
+ * ```
41
+ *
42
+ * @param params The simplified parameters for canceling a rental
43
+ * @returns A ConfigSelector that can be configured with .set() or awaited directly
44
+ */
45
+ export declare function cancelRental(params: CancelRentalParams): ConfigSelector<CancelRentalInstruction>;
46
+ export declare function getCancelRentalInstructionAsync(input: any, options?: any): ConfigSelector<any>;
19
47
  export {};
20
48
  //# sourceMappingURL=cancel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cancel.d.ts","sourceRoot":"","sources":["../../../src/rental/cancel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAiD,KAAK,eAAe,EAAgB,MAAM,YAAY,CAAC;AAG/G,KAAK,uBAAuB,GAAG,GAAG,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEpC;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3B;AAgDD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,kBAAkB,GACzB,eAAe,CAAC,uBAAuB,CAAC,CAE1C;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,eAAe,CAAC,GAAG,CAAC,CAK/F"}
1
+ {"version":3,"file":"cancel.d.ts","sourceRoot":"","sources":["../../../src/rental/cancel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,cAAc,EAAsB,MAAM,iBAAiB,CAAC;AAI3G,KAAK,gBAAgB,GAAG,MAAM,CAAC;AAC/B,KAAK,eAAe,GAAG,GAAG,CAAC;AAC3B,KAAK,uBAAuB,GAAG,GAAG,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,eAAe,GAAG,gBAAgB,CAAC;IAE7C;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,kBAAkB,GACzB,cAAc,CAAC,uBAAuB,CAAC,CAEzC;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC,CAK9F"}