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

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 (395) 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 +30 -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/{devnet/instructions → instructions}/cancelRental.js +10 -33
  18. package/dist/cjs/codama/instructions/cancelRental.js.map +1 -0
  19. package/dist/cjs/codama/{devnet/instructions → instructions}/closeContract.js +15 -23
  20. package/dist/cjs/codama/instructions/closeContract.js.map +1 -0
  21. package/dist/cjs/codama/{devnet/instructions → instructions}/closeRental.js +19 -19
  22. package/dist/cjs/codama/instructions/closeRental.js.map +1 -0
  23. package/dist/cjs/codama/{devnet/instructions → instructions}/createContract.js +13 -16
  24. package/dist/cjs/codama/instructions/createContract.js.map +1 -0
  25. package/dist/cjs/codama/{devnet/instructions → instructions}/index.js +2 -1
  26. package/dist/cjs/codama/instructions/index.js.map +1 -0
  27. package/dist/cjs/codama/instructions/initializeConfig.js +131 -0
  28. package/dist/cjs/codama/instructions/initializeConfig.js.map +1 -0
  29. package/dist/cjs/codama/{devnet/instructions → instructions}/payRental.js +32 -23
  30. package/dist/cjs/codama/instructions/payRental.js.map +1 -0
  31. package/dist/cjs/codama/{devnet/instructions → instructions}/resetRental.js +0 -9
  32. package/dist/cjs/codama/instructions/resetRental.js.map +1 -0
  33. package/dist/cjs/codama/instructions/updateConfig.js +145 -0
  34. package/dist/cjs/codama/instructions/updateConfig.js.map +1 -0
  35. package/dist/cjs/codama/programs/index.js.map +1 -0
  36. package/dist/cjs/codama/{devnet/programs → programs}/srsly.js +12 -8
  37. package/dist/cjs/codama/programs/srsly.js.map +1 -0
  38. package/dist/cjs/codama/shared/index.js.map +1 -0
  39. package/dist/cjs/codama/types/clockData.js.map +1 -0
  40. package/dist/cjs/codama/types/equality.js.map +1 -0
  41. package/dist/cjs/codama/types/execContext.js.map +1 -0
  42. package/dist/cjs/codama/types/index.js.map +1 -0
  43. package/dist/cjs/codama/types/paymentFrequency.js.map +1 -0
  44. package/dist/cjs/codama/types/serializableAccount.js.map +1 -0
  45. package/dist/cjs/codama/types/serializableInstruction.js.map +1 -0
  46. package/dist/cjs/codama/types/threadResponse.js.map +1 -0
  47. package/dist/cjs/codama/types/trigger.js.map +1 -0
  48. package/dist/cjs/codama/types/triggerContext.js.map +1 -0
  49. package/dist/cjs/contract/close.js +74 -31
  50. package/dist/cjs/contract/close.js.map +1 -1
  51. package/dist/cjs/contract/create.js +79 -35
  52. package/dist/cjs/contract/create.js.map +1 -1
  53. package/dist/cjs/index.js +25 -2
  54. package/dist/cjs/index.js.map +1 -1
  55. package/dist/cjs/package.json +53 -0
  56. package/dist/cjs/rental/accept.js +76 -42
  57. package/dist/cjs/rental/accept.js.map +1 -1
  58. package/dist/cjs/rental/cancel.js +40 -28
  59. package/dist/cjs/rental/cancel.js.map +1 -1
  60. package/dist/cjs/rental/close.js +42 -30
  61. package/dist/cjs/rental/close.js.map +1 -1
  62. package/dist/cjs/rental/reset.js +50 -43
  63. package/dist/cjs/rental/reset.js.map +1 -1
  64. package/dist/cjs/types/paymentFrequency.js +58 -0
  65. package/dist/cjs/types/paymentFrequency.js.map +1 -0
  66. package/dist/cjs/utils/config.js +216 -0
  67. package/dist/cjs/utils/config.js.map +1 -0
  68. package/dist/cjs/utils/constants.js +55 -27
  69. package/dist/cjs/utils/constants.js.map +1 -1
  70. package/dist/cjs/utils/duration.js +77 -0
  71. package/dist/cjs/utils/duration.js.map +1 -0
  72. package/dist/cjs/utils/index.js +4 -0
  73. package/dist/cjs/utils/index.js.map +1 -1
  74. package/dist/cjs/utils/instruction-converter.js +66 -0
  75. package/dist/cjs/utils/instruction-converter.js.map +1 -0
  76. package/dist/cjs/utils/paymentFrequency.js +60 -0
  77. package/dist/cjs/utils/paymentFrequency.js.map +1 -0
  78. package/dist/cjs/utils/profiles.js +38 -18
  79. package/dist/cjs/utils/profiles.js.map +1 -1
  80. package/dist/cjs/utils/types.js +6 -0
  81. package/dist/cjs/utils/types.js.map +1 -0
  82. package/dist/esm/codama/accounts/config.js +76 -0
  83. package/dist/esm/codama/accounts/config.js.map +1 -0
  84. package/dist/esm/codama/{devnet/accounts → accounts}/contractState.js +3 -7
  85. package/dist/esm/codama/accounts/contractState.js.map +1 -0
  86. package/dist/esm/codama/{devnet/accounts → accounts}/index.js +1 -1
  87. package/dist/esm/codama/accounts/index.js.map +1 -0
  88. package/dist/esm/codama/{devnet/accounts → accounts}/rentalState.js +3 -1
  89. package/dist/esm/codama/accounts/rentalState.js.map +1 -0
  90. package/dist/esm/codama/accounts/thread.js.map +1 -0
  91. package/dist/esm/codama/errors/index.js.map +1 -0
  92. package/dist/esm/codama/{devnet/errors → errors}/srsly.js +29 -2
  93. package/dist/esm/codama/errors/srsly.js.map +1 -0
  94. package/dist/esm/codama/index.js.map +1 -0
  95. package/dist/esm/codama/{devnet/instructions → instructions}/acceptRental.js +30 -39
  96. package/dist/esm/codama/instructions/acceptRental.js.map +1 -0
  97. package/dist/esm/codama/{devnet/instructions → instructions}/cancelRental.js +10 -33
  98. package/dist/esm/codama/instructions/cancelRental.js.map +1 -0
  99. package/dist/esm/codama/{devnet/instructions → instructions}/closeContract.js +17 -25
  100. package/dist/esm/codama/instructions/closeContract.js.map +1 -0
  101. package/dist/esm/codama/{devnet/instructions → instructions}/closeRental.js +19 -19
  102. package/dist/esm/codama/instructions/closeRental.js.map +1 -0
  103. package/dist/esm/codama/{devnet/instructions → instructions}/createContract.js +13 -16
  104. package/dist/esm/codama/instructions/createContract.js.map +1 -0
  105. package/dist/esm/codama/{devnet/instructions → instructions}/index.js +2 -1
  106. package/dist/esm/codama/instructions/index.js.map +1 -0
  107. package/dist/esm/codama/instructions/initializeConfig.js +121 -0
  108. package/dist/esm/codama/instructions/initializeConfig.js.map +1 -0
  109. package/dist/esm/codama/{devnet/instructions → instructions}/payRental.js +34 -25
  110. package/dist/esm/codama/instructions/payRental.js.map +1 -0
  111. package/dist/esm/codama/{devnet/instructions → instructions}/resetRental.js +0 -9
  112. package/dist/esm/codama/instructions/resetRental.js.map +1 -0
  113. package/dist/esm/codama/instructions/updateConfig.js +135 -0
  114. package/dist/esm/codama/instructions/updateConfig.js.map +1 -0
  115. package/dist/esm/codama/programs/index.js.map +1 -0
  116. package/dist/esm/codama/{devnet/programs → programs}/srsly.js +12 -8
  117. package/dist/esm/codama/programs/srsly.js.map +1 -0
  118. package/dist/esm/codama/shared/index.js.map +1 -0
  119. package/dist/esm/codama/types/clockData.js.map +1 -0
  120. package/dist/esm/codama/types/equality.js.map +1 -0
  121. package/dist/esm/codama/types/execContext.js.map +1 -0
  122. package/dist/esm/codama/types/index.js.map +1 -0
  123. package/dist/esm/codama/types/paymentFrequency.js.map +1 -0
  124. package/dist/esm/codama/types/serializableAccount.js.map +1 -0
  125. package/dist/esm/codama/types/serializableInstruction.js.map +1 -0
  126. package/dist/esm/codama/types/threadResponse.js.map +1 -0
  127. package/dist/esm/codama/types/trigger.js.map +1 -0
  128. package/dist/esm/codama/types/triggerContext.js.map +1 -0
  129. package/dist/esm/contract/close.js +75 -32
  130. package/dist/esm/contract/close.js.map +1 -1
  131. package/dist/esm/contract/create.js +79 -34
  132. package/dist/esm/contract/create.js.map +1 -1
  133. package/dist/esm/index.js +8 -2
  134. package/dist/esm/index.js.map +1 -1
  135. package/dist/esm/package.json +53 -0
  136. package/dist/esm/rental/accept.js +77 -43
  137. package/dist/esm/rental/accept.js.map +1 -1
  138. package/dist/esm/rental/cancel.js +40 -28
  139. package/dist/esm/rental/cancel.js.map +1 -1
  140. package/dist/esm/rental/close.js +42 -30
  141. package/dist/esm/rental/close.js.map +1 -1
  142. package/dist/esm/rental/reset.js +51 -44
  143. package/dist/esm/rental/reset.js.map +1 -1
  144. package/dist/esm/types/paymentFrequency.js +53 -0
  145. package/dist/esm/types/paymentFrequency.js.map +1 -0
  146. package/dist/esm/utils/config.js +173 -0
  147. package/dist/esm/utils/config.js.map +1 -0
  148. package/dist/esm/utils/constants.js +49 -24
  149. package/dist/esm/utils/constants.js.map +1 -1
  150. package/dist/esm/utils/duration.js +68 -0
  151. package/dist/esm/utils/duration.js.map +1 -0
  152. package/dist/esm/utils/index.js +4 -0
  153. package/dist/esm/utils/index.js.map +1 -1
  154. package/dist/esm/utils/instruction-converter.js +62 -0
  155. package/dist/esm/utils/instruction-converter.js.map +1 -0
  156. package/dist/esm/utils/paymentFrequency.js +55 -0
  157. package/dist/esm/utils/paymentFrequency.js.map +1 -0
  158. package/dist/esm/utils/profiles.js +39 -19
  159. package/dist/esm/utils/profiles.js.map +1 -1
  160. package/dist/esm/utils/types.js +5 -0
  161. package/dist/esm/utils/types.js.map +1 -0
  162. package/dist/types/codama/accounts/config.d.ts +52 -0
  163. package/dist/types/codama/accounts/config.d.ts.map +1 -0
  164. package/dist/types/codama/{devnet/accounts → accounts}/contractState.d.ts +2 -4
  165. package/dist/types/codama/accounts/contractState.d.ts.map +1 -0
  166. package/dist/types/codama/{devnet/accounts → accounts}/index.d.ts +1 -1
  167. package/dist/types/codama/accounts/index.d.ts.map +1 -0
  168. package/dist/types/codama/{devnet/accounts → accounts}/rentalState.d.ts +2 -0
  169. package/dist/types/codama/accounts/rentalState.d.ts.map +1 -0
  170. package/dist/types/codama/accounts/thread.d.ts.map +1 -0
  171. package/dist/types/codama/errors/index.d.ts.map +1 -0
  172. package/dist/types/codama/{devnet/errors → errors}/srsly.d.ts +20 -2
  173. package/dist/types/codama/errors/srsly.d.ts.map +1 -0
  174. package/dist/types/codama/index.d.ts.map +1 -0
  175. package/dist/types/codama/instructions/acceptRental.d.ts +135 -0
  176. package/dist/types/codama/instructions/acceptRental.d.ts.map +1 -0
  177. package/dist/types/codama/{devnet/instructions → instructions}/cancelRental.d.ts +14 -10
  178. package/dist/types/codama/instructions/cancelRental.d.ts.map +1 -0
  179. package/dist/types/codama/instructions/closeContract.d.ts +104 -0
  180. package/dist/types/codama/instructions/closeContract.d.ts.map +1 -0
  181. package/dist/types/codama/{devnet/instructions → instructions}/closeRental.d.ts +20 -12
  182. package/dist/types/codama/instructions/closeRental.d.ts.map +1 -0
  183. package/dist/types/codama/instructions/createContract.d.ts +112 -0
  184. package/dist/types/codama/instructions/createContract.d.ts.map +1 -0
  185. package/dist/types/codama/{devnet/instructions → instructions}/index.d.ts +2 -1
  186. package/dist/types/codama/instructions/index.d.ts.map +1 -0
  187. package/dist/types/codama/instructions/initializeConfig.d.ts +60 -0
  188. package/dist/types/codama/instructions/initializeConfig.d.ts.map +1 -0
  189. package/dist/types/codama/{devnet/instructions → instructions}/payRental.d.ts +28 -13
  190. package/dist/types/codama/instructions/payRental.d.ts.map +1 -0
  191. package/dist/types/codama/{devnet/instructions → instructions}/resetRental.d.ts +3 -3
  192. package/dist/types/codama/instructions/resetRental.d.ts.map +1 -0
  193. package/dist/types/codama/instructions/updateConfig.d.ts +93 -0
  194. package/dist/types/codama/instructions/updateConfig.d.ts.map +1 -0
  195. package/dist/types/codama/programs/index.d.ts.map +1 -0
  196. package/dist/types/codama/{devnet/programs → programs}/srsly.d.ts +11 -8
  197. package/dist/types/codama/programs/srsly.d.ts.map +1 -0
  198. package/dist/types/codama/shared/index.d.ts.map +1 -0
  199. package/dist/types/codama/types/clockData.d.ts.map +1 -0
  200. package/dist/types/codama/types/equality.d.ts.map +1 -0
  201. package/dist/types/codama/types/execContext.d.ts.map +1 -0
  202. package/dist/types/codama/types/index.d.ts.map +1 -0
  203. package/dist/types/codama/types/paymentFrequency.d.ts.map +1 -0
  204. package/dist/types/codama/types/serializableAccount.d.ts.map +1 -0
  205. package/dist/types/codama/types/serializableInstruction.d.ts.map +1 -0
  206. package/dist/types/codama/types/threadResponse.d.ts.map +1 -0
  207. package/dist/types/codama/types/trigger.d.ts.map +1 -0
  208. package/dist/types/codama/types/triggerContext.d.ts.map +1 -0
  209. package/dist/types/contract/close.d.ts +29 -13
  210. package/dist/types/contract/close.d.ts.map +1 -1
  211. package/dist/types/contract/create.d.ts +55 -54
  212. package/dist/types/contract/create.d.ts.map +1 -1
  213. package/dist/types/index.d.ts +5 -2
  214. package/dist/types/index.d.ts.map +1 -1
  215. package/dist/types/rental/accept.d.ts +65 -15
  216. package/dist/types/rental/accept.d.ts.map +1 -1
  217. package/dist/types/rental/cancel.d.ts +36 -8
  218. package/dist/types/rental/cancel.d.ts.map +1 -1
  219. package/dist/types/rental/close.d.ts +36 -8
  220. package/dist/types/rental/close.d.ts.map +1 -1
  221. package/dist/types/rental/reset.d.ts +42 -11
  222. package/dist/types/rental/reset.d.ts.map +1 -1
  223. package/dist/types/types/paymentFrequency.d.ts +44 -0
  224. package/dist/types/types/paymentFrequency.d.ts.map +1 -0
  225. package/dist/types/utils/config.d.ts +110 -0
  226. package/dist/types/utils/config.d.ts.map +1 -0
  227. package/dist/types/utils/constants.d.ts +14 -11
  228. package/dist/types/utils/constants.d.ts.map +1 -1
  229. package/dist/types/utils/duration.d.ts +56 -0
  230. package/dist/types/utils/duration.d.ts.map +1 -0
  231. package/dist/types/utils/index.d.ts +4 -0
  232. package/dist/types/utils/index.d.ts.map +1 -1
  233. package/dist/types/utils/instruction-converter.d.ts +117 -0
  234. package/dist/types/utils/instruction-converter.d.ts.map +1 -0
  235. package/dist/types/utils/paymentFrequency.d.ts +18 -0
  236. package/dist/types/utils/paymentFrequency.d.ts.map +1 -0
  237. package/dist/types/utils/profiles.d.ts +14 -8
  238. package/dist/types/utils/profiles.d.ts.map +1 -1
  239. package/dist/types/utils/types.d.ts +6 -0
  240. package/dist/types/utils/types.d.ts.map +1 -0
  241. package/package.json +33 -25
  242. package/target/idl/{srsly-devnet.json → srsly.json} +795 -523
  243. package/dist/cjs/codama/devnet/accounts/contractState.js.map +0 -1
  244. package/dist/cjs/codama/devnet/accounts/fleet.js +0 -77
  245. package/dist/cjs/codama/devnet/accounts/fleet.js.map +0 -1
  246. package/dist/cjs/codama/devnet/accounts/index.js.map +0 -1
  247. package/dist/cjs/codama/devnet/accounts/rentalState.js.map +0 -1
  248. package/dist/cjs/codama/devnet/accounts/thread.js.map +0 -1
  249. package/dist/cjs/codama/devnet/errors/index.js.map +0 -1
  250. package/dist/cjs/codama/devnet/errors/srsly.js.map +0 -1
  251. package/dist/cjs/codama/devnet/index.js.map +0 -1
  252. package/dist/cjs/codama/devnet/instructions/acceptRental.js.map +0 -1
  253. package/dist/cjs/codama/devnet/instructions/cancelRental.js.map +0 -1
  254. package/dist/cjs/codama/devnet/instructions/closeContract.js.map +0 -1
  255. package/dist/cjs/codama/devnet/instructions/closeRental.js.map +0 -1
  256. package/dist/cjs/codama/devnet/instructions/createContract.js.map +0 -1
  257. package/dist/cjs/codama/devnet/instructions/index.js.map +0 -1
  258. package/dist/cjs/codama/devnet/instructions/normalizeAdmin.js +0 -152
  259. package/dist/cjs/codama/devnet/instructions/normalizeAdmin.js.map +0 -1
  260. package/dist/cjs/codama/devnet/instructions/payRental.js.map +0 -1
  261. package/dist/cjs/codama/devnet/instructions/resetRental.js.map +0 -1
  262. package/dist/cjs/codama/devnet/programs/index.js.map +0 -1
  263. package/dist/cjs/codama/devnet/programs/srsly.js.map +0 -1
  264. package/dist/cjs/codama/devnet/shared/index.js.map +0 -1
  265. package/dist/cjs/codama/devnet/types/clockData.js.map +0 -1
  266. package/dist/cjs/codama/devnet/types/equality.js.map +0 -1
  267. package/dist/cjs/codama/devnet/types/execContext.js.map +0 -1
  268. package/dist/cjs/codama/devnet/types/index.js.map +0 -1
  269. package/dist/cjs/codama/devnet/types/paymentFrequency.js.map +0 -1
  270. package/dist/cjs/codama/devnet/types/serializableAccount.js.map +0 -1
  271. package/dist/cjs/codama/devnet/types/serializableInstruction.js.map +0 -1
  272. package/dist/cjs/codama/devnet/types/threadResponse.js.map +0 -1
  273. package/dist/cjs/codama/devnet/types/trigger.js.map +0 -1
  274. package/dist/cjs/codama/devnet/types/triggerContext.js.map +0 -1
  275. package/dist/cjs/network.js +0 -107
  276. package/dist/cjs/network.js.map +0 -1
  277. package/dist/esm/codama/devnet/accounts/contractState.js.map +0 -1
  278. package/dist/esm/codama/devnet/accounts/fleet.js +0 -64
  279. package/dist/esm/codama/devnet/accounts/fleet.js.map +0 -1
  280. package/dist/esm/codama/devnet/accounts/index.js.map +0 -1
  281. package/dist/esm/codama/devnet/accounts/rentalState.js.map +0 -1
  282. package/dist/esm/codama/devnet/accounts/thread.js.map +0 -1
  283. package/dist/esm/codama/devnet/errors/index.js.map +0 -1
  284. package/dist/esm/codama/devnet/errors/srsly.js.map +0 -1
  285. package/dist/esm/codama/devnet/index.js.map +0 -1
  286. package/dist/esm/codama/devnet/instructions/acceptRental.js.map +0 -1
  287. package/dist/esm/codama/devnet/instructions/cancelRental.js.map +0 -1
  288. package/dist/esm/codama/devnet/instructions/closeContract.js.map +0 -1
  289. package/dist/esm/codama/devnet/instructions/closeRental.js.map +0 -1
  290. package/dist/esm/codama/devnet/instructions/createContract.js.map +0 -1
  291. package/dist/esm/codama/devnet/instructions/index.js.map +0 -1
  292. package/dist/esm/codama/devnet/instructions/normalizeAdmin.js +0 -142
  293. package/dist/esm/codama/devnet/instructions/normalizeAdmin.js.map +0 -1
  294. package/dist/esm/codama/devnet/instructions/payRental.js.map +0 -1
  295. package/dist/esm/codama/devnet/instructions/resetRental.js.map +0 -1
  296. package/dist/esm/codama/devnet/programs/index.js.map +0 -1
  297. package/dist/esm/codama/devnet/programs/srsly.js.map +0 -1
  298. package/dist/esm/codama/devnet/shared/index.js.map +0 -1
  299. package/dist/esm/codama/devnet/types/clockData.js.map +0 -1
  300. package/dist/esm/codama/devnet/types/equality.js.map +0 -1
  301. package/dist/esm/codama/devnet/types/execContext.js.map +0 -1
  302. package/dist/esm/codama/devnet/types/index.js.map +0 -1
  303. package/dist/esm/codama/devnet/types/paymentFrequency.js.map +0 -1
  304. package/dist/esm/codama/devnet/types/serializableAccount.js.map +0 -1
  305. package/dist/esm/codama/devnet/types/serializableInstruction.js.map +0 -1
  306. package/dist/esm/codama/devnet/types/threadResponse.js.map +0 -1
  307. package/dist/esm/codama/devnet/types/trigger.js.map +0 -1
  308. package/dist/esm/codama/devnet/types/triggerContext.js.map +0 -1
  309. package/dist/esm/network.js +0 -67
  310. package/dist/esm/network.js.map +0 -1
  311. package/dist/types/codama/devnet/accounts/contractState.d.ts.map +0 -1
  312. package/dist/types/codama/devnet/accounts/fleet.d.ts +0 -38
  313. package/dist/types/codama/devnet/accounts/fleet.d.ts.map +0 -1
  314. package/dist/types/codama/devnet/accounts/index.d.ts.map +0 -1
  315. package/dist/types/codama/devnet/accounts/rentalState.d.ts.map +0 -1
  316. package/dist/types/codama/devnet/accounts/thread.d.ts.map +0 -1
  317. package/dist/types/codama/devnet/errors/index.d.ts.map +0 -1
  318. package/dist/types/codama/devnet/errors/srsly.d.ts.map +0 -1
  319. package/dist/types/codama/devnet/index.d.ts.map +0 -1
  320. package/dist/types/codama/devnet/instructions/acceptRental.d.ts +0 -128
  321. package/dist/types/codama/devnet/instructions/acceptRental.d.ts.map +0 -1
  322. package/dist/types/codama/devnet/instructions/cancelRental.d.ts.map +0 -1
  323. package/dist/types/codama/devnet/instructions/closeContract.d.ts +0 -96
  324. package/dist/types/codama/devnet/instructions/closeContract.d.ts.map +0 -1
  325. package/dist/types/codama/devnet/instructions/closeRental.d.ts.map +0 -1
  326. package/dist/types/codama/devnet/instructions/createContract.d.ts +0 -108
  327. package/dist/types/codama/devnet/instructions/createContract.d.ts.map +0 -1
  328. package/dist/types/codama/devnet/instructions/index.d.ts.map +0 -1
  329. package/dist/types/codama/devnet/instructions/normalizeAdmin.d.ts +0 -67
  330. package/dist/types/codama/devnet/instructions/normalizeAdmin.d.ts.map +0 -1
  331. package/dist/types/codama/devnet/instructions/payRental.d.ts.map +0 -1
  332. package/dist/types/codama/devnet/instructions/resetRental.d.ts.map +0 -1
  333. package/dist/types/codama/devnet/programs/index.d.ts.map +0 -1
  334. package/dist/types/codama/devnet/programs/srsly.d.ts.map +0 -1
  335. package/dist/types/codama/devnet/shared/index.d.ts.map +0 -1
  336. package/dist/types/codama/devnet/types/clockData.d.ts.map +0 -1
  337. package/dist/types/codama/devnet/types/equality.d.ts.map +0 -1
  338. package/dist/types/codama/devnet/types/execContext.d.ts.map +0 -1
  339. package/dist/types/codama/devnet/types/index.d.ts.map +0 -1
  340. package/dist/types/codama/devnet/types/paymentFrequency.d.ts.map +0 -1
  341. package/dist/types/codama/devnet/types/serializableAccount.d.ts.map +0 -1
  342. package/dist/types/codama/devnet/types/serializableInstruction.d.ts.map +0 -1
  343. package/dist/types/codama/devnet/types/threadResponse.d.ts.map +0 -1
  344. package/dist/types/codama/devnet/types/trigger.d.ts.map +0 -1
  345. package/dist/types/codama/devnet/types/triggerContext.d.ts.map +0 -1
  346. package/dist/types/network.d.ts +0 -58
  347. package/dist/types/network.d.ts.map +0 -1
  348. package/target/idl/srsly-mainnet.json +0 -3011
  349. package/target/types/srsly-mainnet.ts +0 -1
  350. /package/dist/cjs/codama/{devnet/accounts → accounts}/thread.js +0 -0
  351. /package/dist/cjs/codama/{devnet/errors → errors}/index.js +0 -0
  352. /package/dist/cjs/codama/{devnet/index.js → index.js} +0 -0
  353. /package/dist/cjs/codama/{devnet/programs → programs}/index.js +0 -0
  354. /package/dist/cjs/codama/{devnet/shared → shared}/index.js +0 -0
  355. /package/dist/cjs/codama/{devnet/types → types}/clockData.js +0 -0
  356. /package/dist/cjs/codama/{devnet/types → types}/equality.js +0 -0
  357. /package/dist/cjs/codama/{devnet/types → types}/execContext.js +0 -0
  358. /package/dist/cjs/codama/{devnet/types → types}/index.js +0 -0
  359. /package/dist/cjs/codama/{devnet/types → types}/paymentFrequency.js +0 -0
  360. /package/dist/cjs/codama/{devnet/types → types}/serializableAccount.js +0 -0
  361. /package/dist/cjs/codama/{devnet/types → types}/serializableInstruction.js +0 -0
  362. /package/dist/cjs/codama/{devnet/types → types}/threadResponse.js +0 -0
  363. /package/dist/cjs/codama/{devnet/types → types}/trigger.js +0 -0
  364. /package/dist/cjs/codama/{devnet/types → types}/triggerContext.js +0 -0
  365. /package/dist/esm/codama/{devnet/accounts → accounts}/thread.js +0 -0
  366. /package/dist/esm/codama/{devnet/errors → errors}/index.js +0 -0
  367. /package/dist/esm/codama/{devnet/index.js → index.js} +0 -0
  368. /package/dist/esm/codama/{devnet/programs → programs}/index.js +0 -0
  369. /package/dist/esm/codama/{devnet/shared → shared}/index.js +0 -0
  370. /package/dist/esm/codama/{devnet/types → types}/clockData.js +0 -0
  371. /package/dist/esm/codama/{devnet/types → types}/equality.js +0 -0
  372. /package/dist/esm/codama/{devnet/types → types}/execContext.js +0 -0
  373. /package/dist/esm/codama/{devnet/types → types}/index.js +0 -0
  374. /package/dist/esm/codama/{devnet/types → types}/paymentFrequency.js +0 -0
  375. /package/dist/esm/codama/{devnet/types → types}/serializableAccount.js +0 -0
  376. /package/dist/esm/codama/{devnet/types → types}/serializableInstruction.js +0 -0
  377. /package/dist/esm/codama/{devnet/types → types}/threadResponse.js +0 -0
  378. /package/dist/esm/codama/{devnet/types → types}/trigger.js +0 -0
  379. /package/dist/esm/codama/{devnet/types → types}/triggerContext.js +0 -0
  380. /package/dist/types/codama/{devnet/accounts → accounts}/thread.d.ts +0 -0
  381. /package/dist/types/codama/{devnet/errors → errors}/index.d.ts +0 -0
  382. /package/dist/types/codama/{devnet/index.d.ts → index.d.ts} +0 -0
  383. /package/dist/types/codama/{devnet/programs → programs}/index.d.ts +0 -0
  384. /package/dist/types/codama/{devnet/shared → shared}/index.d.ts +0 -0
  385. /package/dist/types/codama/{devnet/types → types}/clockData.d.ts +0 -0
  386. /package/dist/types/codama/{devnet/types → types}/equality.d.ts +0 -0
  387. /package/dist/types/codama/{devnet/types → types}/execContext.d.ts +0 -0
  388. /package/dist/types/codama/{devnet/types → types}/index.d.ts +0 -0
  389. /package/dist/types/codama/{devnet/types → types}/paymentFrequency.d.ts +0 -0
  390. /package/dist/types/codama/{devnet/types → types}/serializableAccount.d.ts +0 -0
  391. /package/dist/types/codama/{devnet/types → types}/serializableInstruction.d.ts +0 -0
  392. /package/dist/types/codama/{devnet/types → types}/threadResponse.d.ts +0 -0
  393. /package/dist/types/codama/{devnet/types → types}/trigger.d.ts +0 -0
  394. /package/dist/types/codama/{devnet/types → types}/triggerContext.d.ts +0 -0
  395. /package/target/types/{srsly-devnet.ts → srsly.ts} +0 -0
@@ -0,0 +1,93 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta, type IAccountSignerMeta, type IInstruction, type IInstructionWithAccounts, type IInstructionWithData, type Option, type OptionOrNullable, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit';
9
+ import { SRSLY_PROGRAM_ADDRESS } from '../programs';
10
+ import { type PaymentFrequency, type PaymentFrequencyArgs } from '../types';
11
+ export declare const UPDATE_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
12
+ export declare function getUpdateConfigDiscriminatorBytes(): ReadonlyUint8Array;
13
+ export type UpdateConfigInstruction<TProgram extends string = typeof SRSLY_PROGRAM_ADDRESS, TAccountConfig extends string | IAccountMeta<string> = string, TAccountAuthority extends string | IAccountMeta<string> = string, TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
14
+ TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
15
+ TAccountAuthority extends string ? ReadonlySignerAccount<TAccountAuthority> & IAccountSignerMeta<TAccountAuthority> : TAccountAuthority,
16
+ ...TRemainingAccounts
17
+ ]>;
18
+ export type UpdateConfigInstructionData = {
19
+ discriminator: ReadonlyUint8Array;
20
+ authority: Option<Address>;
21
+ stardustToAtlas: Option<bigint>;
22
+ serviceFeeBps: Option<bigint>;
23
+ referralFeeBps: Option<bigint>;
24
+ baseBps: Option<bigint>;
25
+ rentalDurationMinSeconds: Option<bigint>;
26
+ rentalDurationMaxSeconds: Option<bigint>;
27
+ feesAccount: Option<Address>;
28
+ atlasMint: Option<Address>;
29
+ defaultPaymentFrequency: Option<PaymentFrequency>;
30
+ allowedFrequencies: Option<Array<PaymentFrequency>>;
31
+ };
32
+ export type UpdateConfigInstructionDataArgs = {
33
+ authority: OptionOrNullable<Address>;
34
+ stardustToAtlas: OptionOrNullable<number | bigint>;
35
+ serviceFeeBps: OptionOrNullable<number | bigint>;
36
+ referralFeeBps: OptionOrNullable<number | bigint>;
37
+ baseBps: OptionOrNullable<number | bigint>;
38
+ rentalDurationMinSeconds: OptionOrNullable<number | bigint>;
39
+ rentalDurationMaxSeconds: OptionOrNullable<number | bigint>;
40
+ feesAccount: OptionOrNullable<Address>;
41
+ atlasMint: OptionOrNullable<Address>;
42
+ defaultPaymentFrequency: OptionOrNullable<PaymentFrequencyArgs>;
43
+ allowedFrequencies: OptionOrNullable<Array<PaymentFrequencyArgs>>;
44
+ };
45
+ export declare function getUpdateConfigInstructionDataEncoder(): Encoder<UpdateConfigInstructionDataArgs>;
46
+ export declare function getUpdateConfigInstructionDataDecoder(): Decoder<UpdateConfigInstructionData>;
47
+ export declare function getUpdateConfigInstructionDataCodec(): Codec<UpdateConfigInstructionDataArgs, UpdateConfigInstructionData>;
48
+ export type UpdateConfigAsyncInput<TAccountConfig extends string = string, TAccountAuthority extends string = string> = {
49
+ config?: Address<TAccountConfig>;
50
+ authority: TransactionSigner<TAccountAuthority>;
51
+ authorityArg: UpdateConfigInstructionDataArgs['authority'];
52
+ stardustToAtlas: UpdateConfigInstructionDataArgs['stardustToAtlas'];
53
+ serviceFeeBps: UpdateConfigInstructionDataArgs['serviceFeeBps'];
54
+ referralFeeBps: UpdateConfigInstructionDataArgs['referralFeeBps'];
55
+ baseBps: UpdateConfigInstructionDataArgs['baseBps'];
56
+ rentalDurationMinSeconds: UpdateConfigInstructionDataArgs['rentalDurationMinSeconds'];
57
+ rentalDurationMaxSeconds: UpdateConfigInstructionDataArgs['rentalDurationMaxSeconds'];
58
+ feesAccount: UpdateConfigInstructionDataArgs['feesAccount'];
59
+ atlasMint: UpdateConfigInstructionDataArgs['atlasMint'];
60
+ defaultPaymentFrequency: UpdateConfigInstructionDataArgs['defaultPaymentFrequency'];
61
+ allowedFrequencies: UpdateConfigInstructionDataArgs['allowedFrequencies'];
62
+ };
63
+ export declare function getUpdateConfigInstructionAsync<TAccountConfig extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof SRSLY_PROGRAM_ADDRESS>(input: UpdateConfigAsyncInput<TAccountConfig, TAccountAuthority>, config?: {
64
+ programAddress?: TProgramAddress;
65
+ }): Promise<UpdateConfigInstruction<TProgramAddress, TAccountConfig, TAccountAuthority>>;
66
+ export type UpdateConfigInput<TAccountConfig extends string = string, TAccountAuthority extends string = string> = {
67
+ config: Address<TAccountConfig>;
68
+ authority: TransactionSigner<TAccountAuthority>;
69
+ authorityArg: UpdateConfigInstructionDataArgs['authority'];
70
+ stardustToAtlas: UpdateConfigInstructionDataArgs['stardustToAtlas'];
71
+ serviceFeeBps: UpdateConfigInstructionDataArgs['serviceFeeBps'];
72
+ referralFeeBps: UpdateConfigInstructionDataArgs['referralFeeBps'];
73
+ baseBps: UpdateConfigInstructionDataArgs['baseBps'];
74
+ rentalDurationMinSeconds: UpdateConfigInstructionDataArgs['rentalDurationMinSeconds'];
75
+ rentalDurationMaxSeconds: UpdateConfigInstructionDataArgs['rentalDurationMaxSeconds'];
76
+ feesAccount: UpdateConfigInstructionDataArgs['feesAccount'];
77
+ atlasMint: UpdateConfigInstructionDataArgs['atlasMint'];
78
+ defaultPaymentFrequency: UpdateConfigInstructionDataArgs['defaultPaymentFrequency'];
79
+ allowedFrequencies: UpdateConfigInstructionDataArgs['allowedFrequencies'];
80
+ };
81
+ export declare function getUpdateConfigInstruction<TAccountConfig extends string, TAccountAuthority extends string, TProgramAddress extends Address = typeof SRSLY_PROGRAM_ADDRESS>(input: UpdateConfigInput<TAccountConfig, TAccountAuthority>, config?: {
82
+ programAddress?: TProgramAddress;
83
+ }): UpdateConfigInstruction<TProgramAddress, TAccountConfig, TAccountAuthority>;
84
+ export type ParsedUpdateConfigInstruction<TProgram extends string = typeof SRSLY_PROGRAM_ADDRESS, TAccountMetas extends readonly IAccountMeta[] = readonly IAccountMeta[]> = {
85
+ programAddress: Address<TProgram>;
86
+ accounts: {
87
+ config: TAccountMetas[0];
88
+ authority: TAccountMetas[1];
89
+ };
90
+ data: UpdateConfigInstructionData;
91
+ };
92
+ export declare function parseUpdateConfigInstruction<TProgram extends string, TAccountMetas extends readonly IAccountMeta[]>(instruction: IInstruction<TProgram> & IInstructionWithAccounts<TAccountMetas> & IInstructionWithData<Uint8Array>): ParsedUpdateConfigInstruction<TProgram, TAccountMetas>;
93
+ //# sourceMappingURL=updateConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateConfig.d.ts","sourceRoot":"","sources":["../../../../src/codama/instructions/updateConfig.ts"],"names":[],"mappings":"AAAA;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7E;AAED,MAAM,MAAM,6BAA6B,CACvC,QAAQ,SAAS,MAAM,GAAG,OAAO,qBAAqB,EACtD,aAAa,SAAS,SAAS,YAAY,EAAE,GAAG,SAAS,YAAY,EAAE,IACrE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KAC7B,CAAC;IACF,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,YAAY,EAAE,EAE7C,WAAW,EAAE,YAAY,CAAC,QAAQ,CAAC,GACjC,wBAAwB,CAAC,aAAa,CAAC,GACvC,oBAAoB,CAAC,UAAU,CAAC,GACjC,6BAA6B,CAAC,QAAQ,EAAE,aAAa,CAAC,CAmBxD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/codama/programs/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,SAAS,CAAC"}
@@ -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 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
  }
@@ -23,9 +23,10 @@ export declare enum SrslyInstruction {
23
23
  CloseContract = 2,
24
24
  CloseRental = 3,
25
25
  CreateContract = 4,
26
- NormalizeAdmin = 5,
26
+ InitializeConfig = 5,
27
27
  PayRental = 6,
28
- ResetRental = 7
28
+ ResetRental = 7,
29
+ UpdateConfig = 8
29
30
  }
30
31
  export declare function identifySrslyInstruction(instruction: {
31
32
  data: ReadonlyUint8Array;
@@ -41,10 +42,12 @@ export type ParsedSrslyInstruction<TProgram extends string = 'SRSLY1fq9TJqCk1gNS
41
42
  } & ParsedCloseRentalInstruction<TProgram>) | ({
42
43
  instructionType: SrslyInstruction.CreateContract;
43
44
  } & ParsedCreateContractInstruction<TProgram>) | ({
44
- instructionType: SrslyInstruction.NormalizeAdmin;
45
- } & ParsedNormalizeAdminInstruction<TProgram>) | ({
45
+ instructionType: SrslyInstruction.InitializeConfig;
46
+ } & ParsedInitializeConfigInstruction<TProgram>) | ({
46
47
  instructionType: SrslyInstruction.PayRental;
47
48
  } & ParsedPayRentalInstruction<TProgram>) | ({
48
49
  instructionType: SrslyInstruction.ResetRental;
49
- } & ParsedResetRentalInstruction<TProgram>);
50
+ } & ParsedResetRentalInstruction<TProgram>) | ({
51
+ instructionType: SrslyInstruction.UpdateConfig;
52
+ } & ParsedUpdateConfigInstruction<TProgram>);
50
53
  //# 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,OA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,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,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;AAEpC,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CAE1D;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,QA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,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,EAAE,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACzC,sDAAsD;IACtD,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,wBAAgB,iCAAiC,IAAI,OAAO,CAAC,2B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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"}
@@ -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,O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,GAAG,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAAC;IAC1C,KAAK,EAAE,gBAAgB,CAAC;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,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, 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,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,Y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