@aephia/atlas-kit 0.6.0-next.17 → 0.6.0-next.170

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 (926) hide show
  1. package/README.md +2 -1
  2. package/dist/cargo/actions/deposit.d.ts +5 -2
  3. package/dist/cargo/actions/deposit.d.ts.map +1 -1
  4. package/dist/cargo/actions/deposit.js +60 -129
  5. package/dist/cargo/actions/deposit.js.map +1 -1
  6. package/dist/cargo/actions/index.d.ts +12 -6
  7. package/dist/cargo/actions/index.d.ts.map +1 -1
  8. package/dist/cargo/actions/index.js +98 -94
  9. package/dist/cargo/actions/index.js.map +1 -1
  10. package/dist/cargo/actions/wallet-context.d.ts +52 -3
  11. package/dist/cargo/actions/wallet-context.d.ts.map +1 -1
  12. package/dist/cargo/actions/wallet-context.js +118 -7
  13. package/dist/cargo/actions/wallet-context.js.map +1 -1
  14. package/dist/cargo/actions/wallet-token.d.ts +1 -6
  15. package/dist/cargo/actions/wallet-token.d.ts.map +1 -1
  16. package/dist/cargo/actions/wallet-token.js +0 -45
  17. package/dist/cargo/actions/wallet-token.js.map +1 -1
  18. package/dist/cargo/actions/withdrawal.d.ts +1 -1
  19. package/dist/cargo/actions/withdrawal.d.ts.map +1 -1
  20. package/dist/cargo/actions/withdrawal.js +39 -168
  21. package/dist/cargo/actions/withdrawal.js.map +1 -1
  22. package/dist/cargo/index.d.ts.map +1 -1
  23. package/dist/cargo/index.js +2 -10
  24. package/dist/cargo/index.js.map +1 -1
  25. package/dist/claim-stakes/actions/index.d.ts +93 -14
  26. package/dist/claim-stakes/actions/index.d.ts.map +1 -1
  27. package/dist/claim-stakes/actions/index.js +739 -742
  28. package/dist/claim-stakes/actions/index.js.map +1 -1
  29. package/dist/claim-stakes/index.d.ts +22 -6
  30. package/dist/claim-stakes/index.d.ts.map +1 -1
  31. package/dist/claim-stakes/index.js +34 -19
  32. package/dist/claim-stakes/index.js.map +1 -1
  33. package/dist/client/context.d.ts.map +1 -1
  34. package/dist/client/context.js +354 -38
  35. package/dist/client/context.js.map +1 -1
  36. package/dist/client/contracts.d.ts +69 -6
  37. package/dist/client/contracts.d.ts.map +1 -1
  38. package/dist/client/deployments.d.ts +17 -0
  39. package/dist/client/deployments.d.ts.map +1 -1
  40. package/dist/client/deployments.js +17 -0
  41. package/dist/client/deployments.js.map +1 -1
  42. package/dist/client/errors.d.ts +2 -2
  43. package/dist/client/errors.d.ts.map +1 -1
  44. package/dist/client/errors.js.map +1 -1
  45. package/dist/client/index.d.ts +57 -1
  46. package/dist/client/index.d.ts.map +1 -1
  47. package/dist/client/index.js +56 -0
  48. package/dist/client/index.js.map +1 -1
  49. package/dist/client/rpc-subscription-provider.d.ts +37 -0
  50. package/dist/client/rpc-subscription-provider.d.ts.map +1 -0
  51. package/dist/client/rpc-subscription-provider.js +224 -0
  52. package/dist/client/rpc-subscription-provider.js.map +1 -0
  53. package/dist/combat/actions/index.d.ts +30 -12
  54. package/dist/combat/actions/index.d.ts.map +1 -1
  55. package/dist/combat/actions/index.js +360 -302
  56. package/dist/combat/actions/index.js.map +1 -1
  57. package/dist/combat/index.d.ts +25 -8
  58. package/dist/combat/index.d.ts.map +1 -1
  59. package/dist/combat/index.js +21 -18
  60. package/dist/combat/index.js.map +1 -1
  61. package/dist/crafting/actions/fee-rate.d.ts +47 -0
  62. package/dist/crafting/actions/fee-rate.d.ts.map +1 -0
  63. package/dist/crafting/actions/fee-rate.js +58 -0
  64. package/dist/crafting/actions/fee-rate.js.map +1 -0
  65. package/dist/crafting/actions/index.d.ts +29 -18
  66. package/dist/crafting/actions/index.d.ts.map +1 -1
  67. package/dist/crafting/actions/index.js +298 -352
  68. package/dist/crafting/actions/index.js.map +1 -1
  69. package/dist/crafting/estimate.d.ts +101 -0
  70. package/dist/crafting/estimate.d.ts.map +1 -0
  71. package/dist/crafting/estimate.js +108 -0
  72. package/dist/crafting/estimate.js.map +1 -0
  73. package/dist/crafting/index.d.ts +34 -3
  74. package/dist/crafting/index.d.ts.map +1 -1
  75. package/dist/crafting/index.js +50 -28
  76. package/dist/crafting/index.js.map +1 -1
  77. package/dist/factions/actions/index.d.ts +2 -1
  78. package/dist/factions/actions/index.d.ts.map +1 -1
  79. package/dist/factions/actions/index.js +6 -4
  80. package/dist/factions/actions/index.js.map +1 -1
  81. package/dist/factions/index.d.ts +19 -2
  82. package/dist/factions/index.d.ts.map +1 -1
  83. package/dist/factions/index.js +38 -26
  84. package/dist/factions/index.js.map +1 -1
  85. package/dist/factions/profile-faction.d.ts +20 -8
  86. package/dist/factions/profile-faction.d.ts.map +1 -1
  87. package/dist/factions/profile-faction.js +20 -8
  88. package/dist/factions/profile-faction.js.map +1 -1
  89. package/dist/fleets/actions/add-ship.d.ts +48 -0
  90. package/dist/fleets/actions/add-ship.d.ts.map +1 -0
  91. package/dist/fleets/actions/add-ship.js +136 -0
  92. package/dist/fleets/actions/add-ship.js.map +1 -0
  93. package/dist/fleets/actions/create-fleet.d.ts +36 -0
  94. package/dist/fleets/actions/create-fleet.d.ts.map +1 -0
  95. package/dist/fleets/actions/create-fleet.js +108 -0
  96. package/dist/fleets/actions/create-fleet.js.map +1 -0
  97. package/dist/fleets/actions/crew-transfer.d.ts +45 -0
  98. package/dist/fleets/actions/crew-transfer.d.ts.map +1 -0
  99. package/dist/fleets/actions/crew-transfer.js +99 -0
  100. package/dist/fleets/actions/crew-transfer.js.map +1 -0
  101. package/dist/fleets/actions/deployment-storage.d.ts +161 -0
  102. package/dist/fleets/actions/deployment-storage.d.ts.map +1 -0
  103. package/dist/fleets/actions/deployment-storage.js +297 -0
  104. package/dist/fleets/actions/deployment-storage.js.map +1 -0
  105. package/dist/fleets/actions/disband.d.ts +42 -0
  106. package/dist/fleets/actions/disband.d.ts.map +1 -0
  107. package/dist/fleets/actions/disband.js +107 -0
  108. package/dist/fleets/actions/disband.js.map +1 -0
  109. package/dist/fleets/actions/dock-bounds.d.ts +38 -0
  110. package/dist/fleets/actions/dock-bounds.d.ts.map +1 -0
  111. package/dist/fleets/actions/dock-bounds.js +46 -0
  112. package/dist/fleets/actions/dock-bounds.js.map +1 -0
  113. package/dist/fleets/actions/index.d.ts +90 -25
  114. package/dist/fleets/actions/index.d.ts.map +1 -1
  115. package/dist/fleets/actions/index.js +492 -353
  116. package/dist/fleets/actions/index.js.map +1 -1
  117. package/dist/fleets/actions/respawn.d.ts +38 -0
  118. package/dist/fleets/actions/respawn.d.ts.map +1 -0
  119. package/dist/fleets/actions/respawn.js +93 -0
  120. package/dist/fleets/actions/respawn.js.map +1 -0
  121. package/dist/fleets/actions/ship-import.d.ts +1 -1
  122. package/dist/fleets/actions/ship-import.d.ts.map +1 -1
  123. package/dist/fleets/actions/ship-import.js +61 -90
  124. package/dist/fleets/actions/ship-import.js.map +1 -1
  125. package/dist/fleets/actions/sync.d.ts +24 -0
  126. package/dist/fleets/actions/sync.d.ts.map +1 -0
  127. package/dist/fleets/actions/sync.js +55 -0
  128. package/dist/fleets/actions/sync.js.map +1 -0
  129. package/dist/fleets/composition-stats.d.ts +101 -0
  130. package/dist/fleets/composition-stats.d.ts.map +1 -0
  131. package/dist/fleets/composition-stats.js +354 -0
  132. package/dist/fleets/composition-stats.js.map +1 -0
  133. package/dist/fleets/cooldown.d.ts +47 -0
  134. package/dist/fleets/cooldown.d.ts.map +1 -0
  135. package/dist/fleets/cooldown.js +48 -0
  136. package/dist/fleets/cooldown.js.map +1 -0
  137. package/dist/fleets/coordinate-warp-estimate.d.ts +70 -0
  138. package/dist/fleets/coordinate-warp-estimate.d.ts.map +1 -0
  139. package/dist/fleets/coordinate-warp-estimate.js +46 -0
  140. package/dist/fleets/coordinate-warp-estimate.js.map +1 -0
  141. package/dist/fleets/index.d.ts +36 -0
  142. package/dist/fleets/index.d.ts.map +1 -1
  143. package/dist/fleets/index.js +55 -12
  144. package/dist/fleets/index.js.map +1 -1
  145. package/dist/fleets/movement-arithmetic.d.ts +21 -0
  146. package/dist/fleets/movement-arithmetic.d.ts.map +1 -0
  147. package/dist/fleets/movement-arithmetic.js +45 -0
  148. package/dist/fleets/movement-arithmetic.js.map +1 -0
  149. package/dist/fleets/subwarp-estimate.d.ts +72 -0
  150. package/dist/fleets/subwarp-estimate.d.ts.map +1 -0
  151. package/dist/fleets/subwarp-estimate.js +40 -0
  152. package/dist/fleets/subwarp-estimate.js.map +1 -0
  153. package/dist/fleets/travel-profile.d.ts +102 -0
  154. package/dist/fleets/travel-profile.d.ts.map +1 -0
  155. package/dist/fleets/travel-profile.js +120 -0
  156. package/dist/fleets/travel-profile.js.map +1 -0
  157. package/dist/fleets/warp-lane-estimate.d.ts +59 -0
  158. package/dist/fleets/warp-lane-estimate.d.ts.map +1 -0
  159. package/dist/fleets/warp-lane-estimate.js +36 -0
  160. package/dist/fleets/warp-lane-estimate.js.map +1 -0
  161. package/dist/fleets/warp-lane-policy.d.ts +74 -0
  162. package/dist/fleets/warp-lane-policy.d.ts.map +1 -0
  163. package/dist/fleets/warp-lane-policy.js +103 -0
  164. package/dist/fleets/warp-lane-policy.js.map +1 -0
  165. package/dist/fleets/warp-lane-toll.d.ts +55 -0
  166. package/dist/fleets/warp-lane-toll.d.ts.map +1 -0
  167. package/dist/fleets/warp-lane-toll.js +79 -0
  168. package/dist/fleets/warp-lane-toll.js.map +1 -0
  169. package/dist/identity/actions/create-profile.d.ts +1 -1
  170. package/dist/identity/actions/create-profile.d.ts.map +1 -1
  171. package/dist/identity/actions/create-profile.js +2 -2
  172. package/dist/identity/actions/create-profile.js.map +1 -1
  173. package/dist/identity/actions/index.d.ts +5 -4
  174. package/dist/identity/actions/index.d.ts.map +1 -1
  175. package/dist/identity/actions/index.js +52 -29
  176. package/dist/identity/actions/index.js.map +1 -1
  177. package/dist/identity/actions/research-unlock.d.ts +61 -0
  178. package/dist/identity/actions/research-unlock.d.ts.map +1 -0
  179. package/dist/identity/actions/research-unlock.js +166 -0
  180. package/dist/identity/actions/research-unlock.js.map +1 -0
  181. package/dist/identity/index.d.ts +63 -2
  182. package/dist/identity/index.d.ts.map +1 -1
  183. package/dist/identity/index.js +64 -12
  184. package/dist/identity/index.js.map +1 -1
  185. package/dist/identity/research-state.d.ts +60 -0
  186. package/dist/identity/research-state.d.ts.map +1 -0
  187. package/dist/identity/research-state.js +68 -0
  188. package/dist/identity/research-state.js.map +1 -0
  189. package/dist/index.d.ts +26 -1
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.js +24 -7
  192. package/dist/index.js.map +1 -1
  193. package/dist/internal/c4/account-decoding.d.ts +49 -0
  194. package/dist/internal/c4/account-decoding.d.ts.map +1 -0
  195. package/dist/internal/c4/account-decoding.js +74 -0
  196. package/dist/internal/c4/account-decoding.js.map +1 -0
  197. package/dist/internal/c4/career-xp.d.ts +58 -0
  198. package/dist/internal/c4/career-xp.d.ts.map +1 -0
  199. package/dist/internal/c4/career-xp.js +80 -0
  200. package/dist/internal/c4/career-xp.js.map +1 -0
  201. package/dist/internal/c4/cargo-bytes-config.d.ts +7 -0
  202. package/dist/internal/c4/cargo-bytes-config.d.ts.map +1 -0
  203. package/dist/internal/c4/cargo-bytes-config.js +19 -0
  204. package/dist/internal/c4/cargo-bytes-config.js.map +1 -0
  205. package/dist/internal/c4/cargo-instructions.d.ts +24 -0
  206. package/dist/internal/c4/cargo-instructions.d.ts.map +1 -0
  207. package/dist/internal/c4/cargo-instructions.js +30 -0
  208. package/dist/internal/c4/cargo-instructions.js.map +1 -0
  209. package/dist/internal/c4/cargo-pod.d.ts +15 -0
  210. package/dist/internal/c4/cargo-pod.d.ts.map +1 -0
  211. package/dist/internal/c4/cargo-pod.js +13 -0
  212. package/dist/internal/c4/cargo-pod.js.map +1 -0
  213. package/dist/internal/c4/character-modifier.d.ts +1 -1
  214. package/dist/internal/c4/character-modifier.d.ts.map +1 -1
  215. package/dist/internal/c4/character-registration.d.ts +2 -0
  216. package/dist/internal/c4/character-registration.d.ts.map +1 -1
  217. package/dist/internal/c4/character-registration.js +2 -0
  218. package/dist/internal/c4/character-registration.js.map +1 -1
  219. package/dist/internal/c4/character.d.ts +157 -0
  220. package/dist/internal/c4/character.d.ts.map +1 -0
  221. package/dist/internal/c4/character.js +64 -0
  222. package/dist/internal/c4/character.js.map +1 -0
  223. package/dist/internal/c4/claim-stake-building-definitions.d.ts.map +1 -1
  224. package/dist/internal/c4/claim-stake-building-definitions.js +2 -1
  225. package/dist/internal/c4/claim-stake-building-definitions.js.map +1 -1
  226. package/dist/internal/c4/claim-stake-configuration.d.ts.map +1 -1
  227. package/dist/internal/c4/claim-stake-configuration.js +5 -36
  228. package/dist/internal/c4/claim-stake-configuration.js.map +1 -1
  229. package/dist/internal/c4/claim-stake-definitions.d.ts +8 -4
  230. package/dist/internal/c4/claim-stake-definitions.d.ts.map +1 -1
  231. package/dist/internal/c4/claim-stake-definitions.js +6 -2
  232. package/dist/internal/c4/claim-stake-definitions.js.map +1 -1
  233. package/dist/internal/c4/claim-stake-plots.d.ts +17 -0
  234. package/dist/internal/c4/claim-stake-plots.d.ts.map +1 -0
  235. package/dist/internal/c4/claim-stake-plots.js +29 -0
  236. package/dist/internal/c4/claim-stake-plots.js.map +1 -0
  237. package/dist/internal/c4/claim-stake-standing.d.ts +80 -0
  238. package/dist/internal/c4/claim-stake-standing.d.ts.map +1 -0
  239. package/dist/internal/c4/claim-stake-standing.js +61 -0
  240. package/dist/internal/c4/claim-stake-standing.js.map +1 -0
  241. package/dist/internal/c4/claim-stake-storage.d.ts +45 -0
  242. package/dist/internal/c4/claim-stake-storage.d.ts.map +1 -0
  243. package/dist/internal/c4/claim-stake-storage.js +207 -0
  244. package/dist/internal/c4/claim-stake-storage.js.map +1 -0
  245. package/dist/internal/c4/claim-stake.d.ts +13 -33
  246. package/dist/internal/c4/claim-stake.d.ts.map +1 -1
  247. package/dist/internal/c4/claim-stake.js +49 -94
  248. package/dist/internal/c4/claim-stake.js.map +1 -1
  249. package/dist/internal/c4/combat-storage.d.ts +20 -0
  250. package/dist/internal/c4/combat-storage.d.ts.map +1 -0
  251. package/dist/internal/c4/combat-storage.js +43 -0
  252. package/dist/internal/c4/combat-storage.js.map +1 -0
  253. package/dist/internal/c4/combat.d.ts +1 -82
  254. package/dist/internal/c4/combat.d.ts.map +1 -1
  255. package/dist/internal/c4/combat.js +16 -213
  256. package/dist/internal/c4/combat.js.map +1 -1
  257. package/dist/internal/c4/crafting-process-codec.d.ts +13 -0
  258. package/dist/internal/c4/crafting-process-codec.d.ts.map +1 -0
  259. package/dist/internal/c4/crafting-process-codec.js +34 -0
  260. package/dist/internal/c4/crafting-process-codec.js.map +1 -0
  261. package/dist/internal/c4/crafting-storage.d.ts +20 -0
  262. package/dist/internal/c4/crafting-storage.d.ts.map +1 -0
  263. package/dist/internal/c4/crafting-storage.js +54 -0
  264. package/dist/internal/c4/crafting-storage.js.map +1 -0
  265. package/dist/internal/c4/crafting.d.ts +33 -33
  266. package/dist/internal/c4/crafting.d.ts.map +1 -1
  267. package/dist/internal/c4/crafting.js +76 -127
  268. package/dist/internal/c4/crafting.js.map +1 -1
  269. package/dist/internal/c4/currency-cache.d.ts +6 -0
  270. package/dist/internal/c4/currency-cache.d.ts.map +1 -0
  271. package/dist/internal/c4/currency-cache.js +27 -0
  272. package/dist/internal/c4/currency-cache.js.map +1 -0
  273. package/dist/internal/c4/discriminators.d.ts +93 -0
  274. package/dist/internal/c4/discriminators.d.ts.map +1 -0
  275. package/dist/internal/c4/discriminators.js +190 -0
  276. package/dist/internal/c4/discriminators.js.map +1 -0
  277. package/dist/internal/c4/docking-funding.d.ts +4 -0
  278. package/dist/internal/c4/docking-funding.d.ts.map +1 -0
  279. package/dist/internal/c4/docking-funding.js +11 -0
  280. package/dist/internal/c4/docking-funding.js.map +1 -0
  281. package/dist/internal/c4/faction-epoch-meter.d.ts +10 -0
  282. package/dist/internal/c4/faction-epoch-meter.d.ts.map +1 -0
  283. package/dist/internal/c4/faction-epoch-meter.js +26 -0
  284. package/dist/internal/c4/faction-epoch-meter.js.map +1 -0
  285. package/dist/internal/c4/faction-treasury.d.ts +23 -0
  286. package/dist/internal/c4/faction-treasury.d.ts.map +1 -0
  287. package/dist/internal/c4/faction-treasury.js +41 -0
  288. package/dist/internal/c4/faction-treasury.js.map +1 -0
  289. package/dist/internal/c4/faction.d.ts +21 -0
  290. package/dist/internal/c4/faction.d.ts.map +1 -0
  291. package/dist/internal/c4/faction.js +23 -0
  292. package/dist/internal/c4/faction.js.map +1 -0
  293. package/dist/internal/c4/factions.d.ts +40 -60
  294. package/dist/internal/c4/factions.d.ts.map +1 -1
  295. package/dist/internal/c4/factions.js +106 -225
  296. package/dist/internal/c4/factions.js.map +1 -1
  297. package/dist/internal/c4/fleet-arrival.d.ts +28 -0
  298. package/dist/internal/c4/fleet-arrival.d.ts.map +1 -0
  299. package/dist/internal/c4/fleet-arrival.js +42 -0
  300. package/dist/internal/c4/fleet-arrival.js.map +1 -0
  301. package/dist/internal/c4/fleet-creation.d.ts +14 -0
  302. package/dist/internal/c4/fleet-creation.d.ts.map +1 -0
  303. package/dist/internal/c4/fleet-creation.js +177 -0
  304. package/dist/internal/c4/fleet-creation.js.map +1 -0
  305. package/dist/internal/c4/fleet-crew-binding.d.ts +9 -0
  306. package/dist/internal/c4/fleet-crew-binding.d.ts.map +1 -1
  307. package/dist/internal/c4/fleet-crew-binding.js +31 -44
  308. package/dist/internal/c4/fleet-crew-binding.js.map +1 -1
  309. package/dist/internal/c4/fleet-disband-layout.d.ts +7 -0
  310. package/dist/internal/c4/fleet-disband-layout.d.ts.map +1 -0
  311. package/dist/internal/c4/fleet-disband-layout.js +7 -0
  312. package/dist/internal/c4/fleet-disband-layout.js.map +1 -0
  313. package/dist/internal/c4/fleet-disband.d.ts +41 -0
  314. package/dist/internal/c4/fleet-disband.d.ts.map +1 -0
  315. package/dist/internal/c4/fleet-disband.js +86 -0
  316. package/dist/internal/c4/fleet-disband.js.map +1 -0
  317. package/dist/internal/c4/fleet-points.d.ts +3 -0
  318. package/dist/internal/c4/fleet-points.d.ts.map +1 -0
  319. package/dist/internal/c4/fleet-points.js +8 -0
  320. package/dist/internal/c4/fleet-points.js.map +1 -0
  321. package/dist/internal/c4/fleet-respawn.d.ts +17 -0
  322. package/dist/internal/c4/fleet-respawn.d.ts.map +1 -0
  323. package/dist/internal/c4/fleet-respawn.js +62 -0
  324. package/dist/internal/c4/fleet-respawn.js.map +1 -0
  325. package/dist/internal/c4/fleet-ship-assembly.d.ts +26 -0
  326. package/dist/internal/c4/fleet-ship-assembly.d.ts.map +1 -0
  327. package/dist/internal/c4/fleet-ship-assembly.js +96 -0
  328. package/dist/internal/c4/fleet-ship-assembly.js.map +1 -0
  329. package/dist/internal/c4/fleet-storage.d.ts +44 -0
  330. package/dist/internal/c4/fleet-storage.d.ts.map +1 -0
  331. package/dist/internal/c4/fleet-storage.js +108 -0
  332. package/dist/internal/c4/fleet-storage.js.map +1 -0
  333. package/dist/internal/c4/fleet-sync.d.ts +5 -0
  334. package/dist/internal/c4/fleet-sync.d.ts.map +1 -0
  335. package/dist/internal/c4/fleet-sync.js +15 -0
  336. package/dist/internal/c4/fleet-sync.js.map +1 -0
  337. package/dist/internal/c4/fleet.d.ts +65 -24
  338. package/dist/internal/c4/fleet.d.ts.map +1 -1
  339. package/dist/internal/c4/fleet.js +50 -91
  340. package/dist/internal/c4/fleet.js.map +1 -1
  341. package/dist/internal/c4/game-definition-layout.d.ts +2 -0
  342. package/dist/internal/c4/game-definition-layout.d.ts.map +1 -1
  343. package/dist/internal/c4/game-definition-layout.js +4 -0
  344. package/dist/internal/c4/game-definition-layout.js.map +1 -1
  345. package/dist/internal/c4/game.d.ts +122 -32
  346. package/dist/internal/c4/game.d.ts.map +1 -1
  347. package/dist/internal/c4/game.js +229 -130
  348. package/dist/internal/c4/game.js.map +1 -1
  349. package/dist/internal/c4/identity.d.ts +3 -152
  350. package/dist/internal/c4/identity.d.ts.map +1 -1
  351. package/dist/internal/c4/identity.js +19 -126
  352. package/dist/internal/c4/identity.js.map +1 -1
  353. package/dist/internal/c4/local-market-order.d.ts +29 -0
  354. package/dist/internal/c4/local-market-order.d.ts.map +1 -0
  355. package/dist/internal/c4/local-market-order.js +46 -0
  356. package/dist/internal/c4/local-market-order.js.map +1 -0
  357. package/dist/internal/c4/loot-layout.js +1 -1
  358. package/dist/internal/c4/loot-layout.js.map +1 -1
  359. package/dist/internal/c4/loot.d.ts +89 -0
  360. package/dist/internal/c4/loot.d.ts.map +1 -0
  361. package/dist/internal/c4/loot.js +109 -0
  362. package/dist/internal/c4/loot.js.map +1 -0
  363. package/dist/internal/c4/loyalty.d.ts +7 -30
  364. package/dist/internal/c4/loyalty.d.ts.map +1 -1
  365. package/dist/internal/c4/loyalty.js +41 -163
  366. package/dist/internal/c4/loyalty.js.map +1 -1
  367. package/dist/internal/c4/market-storage.d.ts +25 -0
  368. package/dist/internal/c4/market-storage.d.ts.map +1 -0
  369. package/dist/internal/c4/market-storage.js +53 -0
  370. package/dist/internal/c4/market-storage.js.map +1 -0
  371. package/dist/internal/c4/market.d.ts +5 -38
  372. package/dist/internal/c4/market.d.ts.map +1 -1
  373. package/dist/internal/c4/market.js +26 -120
  374. package/dist/internal/c4/market.js.map +1 -1
  375. package/dist/internal/c4/mining-instructions.d.ts +2 -0
  376. package/dist/internal/c4/mining-instructions.d.ts.map +1 -0
  377. package/dist/internal/c4/mining-instructions.js +3 -0
  378. package/dist/internal/c4/mining-instructions.js.map +1 -0
  379. package/dist/internal/c4/open-signal.d.ts +8 -0
  380. package/dist/internal/c4/open-signal.d.ts.map +1 -0
  381. package/dist/internal/c4/open-signal.js +37 -0
  382. package/dist/internal/c4/open-signal.js.map +1 -0
  383. package/dist/internal/c4/pda.d.ts +49 -1
  384. package/dist/internal/c4/pda.d.ts.map +1 -1
  385. package/dist/internal/c4/pda.js +122 -17
  386. package/dist/internal/c4/pda.js.map +1 -1
  387. package/dist/internal/c4/profile-faction.d.ts +2 -1
  388. package/dist/internal/c4/profile-faction.d.ts.map +1 -1
  389. package/dist/internal/c4/profile-faction.js +36 -72
  390. package/dist/internal/c4/profile-faction.js.map +1 -1
  391. package/dist/internal/c4/profile-permissions.d.ts +1 -1
  392. package/dist/internal/c4/profile-permissions.d.ts.map +1 -1
  393. package/dist/internal/c4/profile-permissions.js +17 -1
  394. package/dist/internal/c4/profile-permissions.js.map +1 -1
  395. package/dist/internal/c4/region-geometry.d.ts +8 -0
  396. package/dist/internal/c4/region-geometry.d.ts.map +1 -0
  397. package/dist/internal/c4/region-geometry.js +43 -0
  398. package/dist/internal/c4/region-geometry.js.map +1 -0
  399. package/dist/internal/c4/rewards.d.ts +1 -61
  400. package/dist/internal/c4/rewards.d.ts.map +1 -1
  401. package/dist/internal/c4/rewards.js +23 -203
  402. package/dist/internal/c4/rewards.js.map +1 -1
  403. package/dist/internal/c4/runtime-bindings.d.ts +4 -0
  404. package/dist/internal/c4/runtime-bindings.d.ts.map +1 -0
  405. package/dist/internal/c4/runtime-bindings.js +4 -0
  406. package/dist/internal/c4/runtime-bindings.js.map +1 -0
  407. package/dist/internal/c4/scan-detection-codecs.d.ts +3 -0
  408. package/dist/internal/c4/scan-detection-codecs.d.ts.map +1 -0
  409. package/dist/internal/c4/scan-detection-codecs.js +3 -0
  410. package/dist/internal/c4/scan-detection-codecs.js.map +1 -0
  411. package/dist/internal/c4/scan-lifecycle.d.ts +324 -0
  412. package/dist/internal/c4/scan-lifecycle.d.ts.map +1 -0
  413. package/dist/internal/c4/scan-lifecycle.js +249 -0
  414. package/dist/internal/c4/scan-lifecycle.js.map +1 -0
  415. package/dist/internal/c4/scan-storage.d.ts +7 -0
  416. package/dist/internal/c4/scan-storage.d.ts.map +1 -0
  417. package/dist/internal/c4/scan-storage.js +10 -0
  418. package/dist/internal/c4/scan-storage.js.map +1 -0
  419. package/dist/internal/c4/scanning.d.ts +4 -41
  420. package/dist/internal/c4/scanning.d.ts.map +1 -1
  421. package/dist/internal/c4/scanning.js +27 -108
  422. package/dist/internal/c4/scanning.js.map +1 -1
  423. package/dist/internal/c4/ship-import.d.ts +4 -0
  424. package/dist/internal/c4/ship-import.d.ts.map +1 -0
  425. package/dist/internal/c4/ship-import.js +13 -0
  426. package/dist/internal/c4/ship-import.js.map +1 -0
  427. package/dist/internal/c4/ship-stats.d.ts.map +1 -1
  428. package/dist/internal/c4/ship-stats.js +46 -44
  429. package/dist/internal/c4/ship-stats.js.map +1 -1
  430. package/dist/internal/c4/starbase.d.ts +0 -32
  431. package/dist/internal/c4/starbase.d.ts.map +1 -1
  432. package/dist/internal/c4/starbase.js +26 -136
  433. package/dist/internal/c4/starbase.js.map +1 -1
  434. package/dist/internal/c4/stimulant.d.ts +26 -0
  435. package/dist/internal/c4/stimulant.d.ts.map +1 -0
  436. package/dist/internal/c4/stimulant.js +36 -0
  437. package/dist/internal/c4/stimulant.js.map +1 -0
  438. package/dist/internal/c4/wallet-cargo-cache.js +2 -1
  439. package/dist/internal/c4/wallet-cargo-cache.js.map +1 -1
  440. package/dist/internal/c4/world.d.ts +40 -7
  441. package/dist/internal/c4/world.d.ts.map +1 -1
  442. package/dist/internal/c4/world.js +87 -129
  443. package/dist/internal/c4/world.js.map +1 -1
  444. package/dist/internal/cargo.d.ts +2 -0
  445. package/dist/internal/cargo.d.ts.map +1 -1
  446. package/dist/internal/cargo.js +8 -0
  447. package/dist/internal/cargo.js.map +1 -1
  448. package/dist/internal/fleet-route.d.ts +12 -0
  449. package/dist/internal/fleet-route.d.ts.map +1 -0
  450. package/dist/internal/fleet-route.js +11 -0
  451. package/dist/internal/fleet-route.js.map +1 -0
  452. package/dist/internal/fleet.d.ts +3 -2
  453. package/dist/internal/fleet.d.ts.map +1 -1
  454. package/dist/internal/fleet.js +3 -5
  455. package/dist/internal/fleet.js.map +1 -1
  456. package/dist/internal/loyalty-atlas-bank-state.d.ts +17 -0
  457. package/dist/internal/loyalty-atlas-bank-state.d.ts.map +1 -0
  458. package/dist/internal/loyalty-atlas-bank-state.js +11 -0
  459. package/dist/internal/loyalty-atlas-bank-state.js.map +1 -0
  460. package/dist/internal/planning/account-state.d.ts +6 -0
  461. package/dist/internal/planning/account-state.d.ts.map +1 -1
  462. package/dist/internal/planning/account-state.js +13 -0
  463. package/dist/internal/planning/account-state.js.map +1 -1
  464. package/dist/internal/planning/action-runtime.d.ts +38 -0
  465. package/dist/internal/planning/action-runtime.d.ts.map +1 -0
  466. package/dist/internal/planning/action-runtime.js +63 -0
  467. package/dist/internal/planning/action-runtime.js.map +1 -0
  468. package/dist/internal/planning/arrival-guards.d.ts +19 -0
  469. package/dist/internal/planning/arrival-guards.d.ts.map +1 -0
  470. package/dist/internal/planning/arrival-guards.js +172 -0
  471. package/dist/internal/planning/arrival-guards.js.map +1 -0
  472. package/dist/internal/planning/authorization-adapter.d.ts +61 -39
  473. package/dist/internal/planning/authorization-adapter.d.ts.map +1 -1
  474. package/dist/internal/planning/authorization-adapter.js +219 -83
  475. package/dist/internal/planning/authorization-adapter.js.map +1 -1
  476. package/dist/internal/planning/cargo-storage-actions.d.ts +8 -0
  477. package/dist/internal/planning/cargo-storage-actions.d.ts.map +1 -0
  478. package/dist/internal/planning/cargo-storage-actions.js +97 -0
  479. package/dist/internal/planning/cargo-storage-actions.js.map +1 -0
  480. package/dist/internal/planning/character-access.d.ts +28 -0
  481. package/dist/internal/planning/character-access.d.ts.map +1 -0
  482. package/dist/internal/planning/character-access.js +41 -0
  483. package/dist/internal/planning/character-access.js.map +1 -0
  484. package/dist/internal/planning/character-registration-guard.d.ts +4 -0
  485. package/dist/internal/planning/character-registration-guard.d.ts.map +1 -0
  486. package/dist/internal/planning/character-registration-guard.js +59 -0
  487. package/dist/internal/planning/character-registration-guard.js.map +1 -0
  488. package/dist/internal/planning/character-registration.d.ts +23 -0
  489. package/dist/internal/planning/character-registration.d.ts.map +1 -0
  490. package/dist/internal/planning/character-registration.js +87 -0
  491. package/dist/internal/planning/character-registration.js.map +1 -0
  492. package/dist/internal/planning/claim-stake-storage-actions.d.ts +12 -0
  493. package/dist/internal/planning/claim-stake-storage-actions.d.ts.map +1 -0
  494. package/dist/internal/planning/claim-stake-storage-actions.js +63 -0
  495. package/dist/internal/planning/claim-stake-storage-actions.js.map +1 -0
  496. package/dist/internal/planning/combat-storage-actions.d.ts +9 -0
  497. package/dist/internal/planning/combat-storage-actions.d.ts.map +1 -0
  498. package/dist/internal/planning/combat-storage-actions.js +55 -0
  499. package/dist/internal/planning/combat-storage-actions.js.map +1 -0
  500. package/dist/internal/planning/crafting-storage-actions.d.ts +7 -0
  501. package/dist/internal/planning/crafting-storage-actions.d.ts.map +1 -0
  502. package/dist/internal/planning/crafting-storage-actions.js +64 -0
  503. package/dist/internal/planning/crafting-storage-actions.js.map +1 -0
  504. package/dist/internal/planning/currency-cache-guard.d.ts +6 -0
  505. package/dist/internal/planning/currency-cache-guard.d.ts.map +1 -0
  506. package/dist/internal/planning/currency-cache-guard.js +77 -0
  507. package/dist/internal/planning/currency-cache-guard.js.map +1 -0
  508. package/dist/internal/planning/democracy-history.d.ts +50 -0
  509. package/dist/internal/planning/democracy-history.d.ts.map +1 -0
  510. package/dist/internal/planning/democracy-history.js +189 -0
  511. package/dist/internal/planning/democracy-history.js.map +1 -0
  512. package/dist/internal/planning/direct-options.d.ts +17 -0
  513. package/dist/internal/planning/direct-options.d.ts.map +1 -0
  514. package/dist/internal/planning/direct-options.js +43 -0
  515. package/dist/internal/planning/direct-options.js.map +1 -0
  516. package/dist/internal/planning/disband-storage-actions.d.ts +9 -0
  517. package/dist/internal/planning/disband-storage-actions.d.ts.map +1 -0
  518. package/dist/internal/planning/disband-storage-actions.js +24 -0
  519. package/dist/internal/planning/disband-storage-actions.js.map +1 -0
  520. package/dist/internal/planning/faction-enrollment.d.ts +0 -4
  521. package/dist/internal/planning/faction-enrollment.d.ts.map +1 -1
  522. package/dist/internal/planning/faction-enrollment.js +1 -31
  523. package/dist/internal/planning/faction-enrollment.js.map +1 -1
  524. package/dist/internal/planning/faction-trade-guards.d.ts +30 -0
  525. package/dist/internal/planning/faction-trade-guards.d.ts.map +1 -0
  526. package/dist/internal/planning/faction-trade-guards.js +15 -0
  527. package/dist/internal/planning/faction-trade-guards.js.map +1 -0
  528. package/dist/internal/planning/faction-trade-state.d.ts +16 -0
  529. package/dist/internal/planning/faction-trade-state.d.ts.map +1 -0
  530. package/dist/internal/planning/faction-trade-state.js +43 -0
  531. package/dist/internal/planning/faction-trade-state.js.map +1 -0
  532. package/dist/internal/planning/fleet-arrival.d.ts +40 -0
  533. package/dist/internal/planning/fleet-arrival.d.ts.map +1 -0
  534. package/dist/internal/planning/fleet-arrival.js +107 -0
  535. package/dist/internal/planning/fleet-arrival.js.map +1 -0
  536. package/dist/internal/planning/fleet-attack-xp.d.ts +20 -0
  537. package/dist/internal/planning/fleet-attack-xp.d.ts.map +1 -0
  538. package/dist/internal/planning/fleet-attack-xp.js +104 -0
  539. package/dist/internal/planning/fleet-attack-xp.js.map +1 -0
  540. package/dist/internal/planning/fleet-creation.d.ts +30 -0
  541. package/dist/internal/planning/fleet-creation.d.ts.map +1 -0
  542. package/dist/internal/planning/fleet-creation.js +89 -0
  543. package/dist/internal/planning/fleet-creation.js.map +1 -0
  544. package/dist/internal/planning/fleet-crew-guard.d.ts +29 -0
  545. package/dist/internal/planning/fleet-crew-guard.d.ts.map +1 -0
  546. package/dist/internal/planning/fleet-crew-guard.js +48 -0
  547. package/dist/internal/planning/fleet-crew-guard.js.map +1 -0
  548. package/dist/internal/planning/fleet-crew-transfer.d.ts +7 -0
  549. package/dist/internal/planning/fleet-crew-transfer.d.ts.map +1 -0
  550. package/dist/internal/planning/fleet-crew-transfer.js +152 -0
  551. package/dist/internal/planning/fleet-crew-transfer.js.map +1 -0
  552. package/dist/internal/planning/fleet-disband-guard.d.ts +12 -0
  553. package/dist/internal/planning/fleet-disband-guard.d.ts.map +1 -0
  554. package/dist/internal/planning/fleet-disband-guard.js +54 -0
  555. package/dist/internal/planning/fleet-disband-guard.js.map +1 -0
  556. package/dist/internal/planning/fleet-disband.d.ts +36 -0
  557. package/dist/internal/planning/fleet-disband.d.ts.map +1 -0
  558. package/dist/internal/planning/fleet-disband.js +82 -0
  559. package/dist/internal/planning/fleet-disband.js.map +1 -0
  560. package/dist/internal/planning/fleet-dock-funding-guard.d.ts +42 -0
  561. package/dist/internal/planning/fleet-dock-funding-guard.d.ts.map +1 -0
  562. package/dist/internal/planning/fleet-dock-funding-guard.js +216 -0
  563. package/dist/internal/planning/fleet-dock-funding-guard.js.map +1 -0
  564. package/dist/internal/planning/fleet-dock-funding.d.ts +9 -0
  565. package/dist/internal/planning/fleet-dock-funding.d.ts.map +1 -0
  566. package/dist/internal/planning/fleet-dock-funding.js +164 -0
  567. package/dist/internal/planning/fleet-dock-funding.js.map +1 -0
  568. package/dist/internal/planning/fleet-docking-guard.d.ts +4 -0
  569. package/dist/internal/planning/fleet-docking-guard.d.ts.map +1 -0
  570. package/dist/internal/planning/fleet-docking-guard.js +44 -0
  571. package/dist/internal/planning/fleet-docking-guard.js.map +1 -0
  572. package/dist/internal/planning/fleet-docking.d.ts +25 -0
  573. package/dist/internal/planning/fleet-docking.d.ts.map +1 -0
  574. package/dist/internal/planning/fleet-docking.js +106 -0
  575. package/dist/internal/planning/fleet-docking.js.map +1 -0
  576. package/dist/internal/planning/fleet-rental.d.ts +5 -0
  577. package/dist/internal/planning/fleet-rental.d.ts.map +1 -0
  578. package/dist/internal/planning/fleet-rental.js +9 -0
  579. package/dist/internal/planning/fleet-rental.js.map +1 -0
  580. package/dist/internal/planning/fleet-respawn.d.ts +28 -0
  581. package/dist/internal/planning/fleet-respawn.d.ts.map +1 -0
  582. package/dist/internal/planning/fleet-respawn.js +164 -0
  583. package/dist/internal/planning/fleet-respawn.js.map +1 -0
  584. package/dist/internal/planning/fleet-ship-assembly.d.ts +38 -0
  585. package/dist/internal/planning/fleet-ship-assembly.d.ts.map +1 -0
  586. package/dist/internal/planning/fleet-ship-assembly.js +167 -0
  587. package/dist/internal/planning/fleet-ship-assembly.js.map +1 -0
  588. package/dist/internal/planning/fleet-state.d.ts +25 -0
  589. package/dist/internal/planning/fleet-state.d.ts.map +1 -0
  590. package/dist/internal/planning/fleet-state.js +28 -0
  591. package/dist/internal/planning/fleet-state.js.map +1 -0
  592. package/dist/internal/planning/governance-fees.d.ts +64 -0
  593. package/dist/internal/planning/governance-fees.d.ts.map +1 -0
  594. package/dist/internal/planning/governance-fees.js +231 -0
  595. package/dist/internal/planning/governance-fees.js.map +1 -0
  596. package/dist/internal/planning/local-market-order-funding.d.ts +8 -0
  597. package/dist/internal/planning/local-market-order-funding.d.ts.map +1 -0
  598. package/dist/internal/planning/local-market-order-funding.js +128 -0
  599. package/dist/internal/planning/local-market-order-funding.js.map +1 -0
  600. package/dist/internal/planning/local-market-order.d.ts +40 -0
  601. package/dist/internal/planning/local-market-order.d.ts.map +1 -0
  602. package/dist/internal/planning/local-market-order.js +139 -0
  603. package/dist/internal/planning/local-market-order.js.map +1 -0
  604. package/dist/internal/planning/market-storage-actions.d.ts +7 -0
  605. package/dist/internal/planning/market-storage-actions.d.ts.map +1 -0
  606. package/dist/internal/planning/market-storage-actions.js +71 -0
  607. package/dist/internal/planning/market-storage-actions.js.map +1 -0
  608. package/dist/internal/planning/mining-stop.d.ts +14 -0
  609. package/dist/internal/planning/mining-stop.d.ts.map +1 -0
  610. package/dist/internal/planning/mining-stop.js +42 -0
  611. package/dist/internal/planning/mining-stop.js.map +1 -0
  612. package/dist/internal/planning/mining-storage-actions.d.ts +11 -0
  613. package/dist/internal/planning/mining-storage-actions.d.ts.map +1 -0
  614. package/dist/internal/planning/mining-storage-actions.js +57 -0
  615. package/dist/internal/planning/mining-storage-actions.js.map +1 -0
  616. package/dist/internal/planning/movement-storage-actions.d.ts +7 -0
  617. package/dist/internal/planning/movement-storage-actions.d.ts.map +1 -0
  618. package/dist/internal/planning/movement-storage-actions.js +38 -0
  619. package/dist/internal/planning/movement-storage-actions.js.map +1 -0
  620. package/dist/internal/planning/movement-xp-guard.d.ts +4 -0
  621. package/dist/internal/planning/movement-xp-guard.d.ts.map +1 -0
  622. package/dist/internal/planning/movement-xp-guard.js +104 -0
  623. package/dist/internal/planning/movement-xp-guard.js.map +1 -0
  624. package/dist/internal/planning/open-signal-guard.d.ts +3 -0
  625. package/dist/internal/planning/open-signal-guard.d.ts.map +1 -0
  626. package/dist/internal/planning/open-signal-guard.js +32 -0
  627. package/dist/internal/planning/open-signal-guard.js.map +1 -0
  628. package/dist/internal/planning/open-signal.d.ts +31 -0
  629. package/dist/internal/planning/open-signal.d.ts.map +1 -0
  630. package/dist/internal/planning/open-signal.js +94 -0
  631. package/dist/internal/planning/open-signal.js.map +1 -0
  632. package/dist/internal/planning/original-token.d.ts +40 -0
  633. package/dist/internal/planning/original-token.d.ts.map +1 -0
  634. package/dist/internal/planning/original-token.js +112 -0
  635. package/dist/internal/planning/original-token.js.map +1 -0
  636. package/dist/internal/planning/own-starbase-facts.d.ts +37 -0
  637. package/dist/internal/planning/own-starbase-facts.d.ts.map +1 -0
  638. package/dist/internal/planning/own-starbase-facts.js +52 -0
  639. package/dist/internal/planning/own-starbase-facts.js.map +1 -0
  640. package/dist/internal/planning/plan-fields.d.ts +60 -0
  641. package/dist/internal/planning/plan-fields.d.ts.map +1 -0
  642. package/dist/internal/planning/plan-fields.js +159 -0
  643. package/dist/internal/planning/plan-fields.js.map +1 -0
  644. package/dist/internal/planning/plan-guards.d.ts +4 -0
  645. package/dist/internal/planning/plan-guards.d.ts.map +1 -0
  646. package/dist/internal/planning/plan-guards.js +184 -0
  647. package/dist/internal/planning/plan-guards.js.map +1 -0
  648. package/dist/internal/planning/profile-key.d.ts +13 -0
  649. package/dist/internal/planning/profile-key.d.ts.map +1 -0
  650. package/dist/internal/planning/profile-key.js +20 -0
  651. package/dist/internal/planning/profile-key.js.map +1 -0
  652. package/dist/internal/planning/profile-storage-funding-guard.d.ts +29 -0
  653. package/dist/internal/planning/profile-storage-funding-guard.d.ts.map +1 -0
  654. package/dist/internal/planning/profile-storage-funding-guard.js +115 -0
  655. package/dist/internal/planning/profile-storage-funding-guard.js.map +1 -0
  656. package/dist/internal/planning/profile-storage-funding.d.ts +46 -0
  657. package/dist/internal/planning/profile-storage-funding.d.ts.map +1 -0
  658. package/dist/internal/planning/profile-storage-funding.js +58 -0
  659. package/dist/internal/planning/profile-storage-funding.js.map +1 -0
  660. package/dist/internal/planning/recipe-state.d.ts +9 -0
  661. package/dist/internal/planning/recipe-state.d.ts.map +1 -0
  662. package/dist/internal/planning/recipe-state.js +23 -0
  663. package/dist/internal/planning/recipe-state.js.map +1 -0
  664. package/dist/internal/planning/region-access.d.ts +30 -0
  665. package/dist/internal/planning/region-access.d.ts.map +1 -0
  666. package/dist/internal/planning/region-access.js +94 -0
  667. package/dist/internal/planning/region-access.js.map +1 -0
  668. package/dist/internal/planning/rent-catalog.d.ts +37 -0
  669. package/dist/internal/planning/rent-catalog.d.ts.map +1 -0
  670. package/dist/internal/planning/rent-catalog.js +165 -0
  671. package/dist/internal/planning/rent-catalog.js.map +1 -0
  672. package/dist/internal/planning/rent.d.ts +19 -0
  673. package/dist/internal/planning/rent.d.ts.map +1 -0
  674. package/dist/internal/planning/rent.js +35 -0
  675. package/dist/internal/planning/rent.js.map +1 -0
  676. package/dist/internal/planning/research-unlock.d.ts +69 -0
  677. package/dist/internal/planning/research-unlock.d.ts.map +1 -0
  678. package/dist/internal/planning/research-unlock.js +287 -0
  679. package/dist/internal/planning/research-unlock.js.map +1 -0
  680. package/dist/internal/planning/respawn-guards.d.ts +3 -0
  681. package/dist/internal/planning/respawn-guards.d.ts.map +1 -0
  682. package/dist/internal/planning/respawn-guards.js +42 -0
  683. package/dist/internal/planning/respawn-guards.js.map +1 -0
  684. package/dist/internal/planning/runtime-guards.d.ts +41 -0
  685. package/dist/internal/planning/runtime-guards.d.ts.map +1 -0
  686. package/dist/internal/planning/runtime-guards.js +658 -0
  687. package/dist/internal/planning/runtime-guards.js.map +1 -0
  688. package/dist/internal/planning/scan-completion-guard.d.ts +43 -0
  689. package/dist/internal/planning/scan-completion-guard.d.ts.map +1 -0
  690. package/dist/internal/planning/scan-completion-guard.js +95 -0
  691. package/dist/internal/planning/scan-completion-guard.js.map +1 -0
  692. package/dist/internal/planning/scan-completion.d.ts +20 -0
  693. package/dist/internal/planning/scan-completion.d.ts.map +1 -0
  694. package/dist/internal/planning/scan-completion.js +198 -0
  695. package/dist/internal/planning/scan-completion.js.map +1 -0
  696. package/dist/internal/planning/scan-detect-guard.d.ts +34 -0
  697. package/dist/internal/planning/scan-detect-guard.d.ts.map +1 -0
  698. package/dist/internal/planning/scan-detect-guard.js +77 -0
  699. package/dist/internal/planning/scan-detect-guard.js.map +1 -0
  700. package/dist/internal/planning/scan-detect.d.ts +24 -0
  701. package/dist/internal/planning/scan-detect.d.ts.map +1 -0
  702. package/dist/internal/planning/scan-detect.js +246 -0
  703. package/dist/internal/planning/scan-detect.js.map +1 -0
  704. package/dist/internal/planning/scan-idle-scope.d.ts +5 -0
  705. package/dist/internal/planning/scan-idle-scope.d.ts.map +1 -0
  706. package/dist/internal/planning/scan-idle-scope.js +5 -0
  707. package/dist/internal/planning/scan-idle-scope.js.map +1 -0
  708. package/dist/internal/planning/scan-input.d.ts +9 -0
  709. package/dist/internal/planning/scan-input.d.ts.map +1 -0
  710. package/dist/internal/planning/scan-input.js +58 -0
  711. package/dist/internal/planning/scan-input.js.map +1 -0
  712. package/dist/internal/planning/scan-storage-actions.d.ts +9 -0
  713. package/dist/internal/planning/scan-storage-actions.d.ts.map +1 -0
  714. package/dist/internal/planning/scan-storage-actions.js +27 -0
  715. package/dist/internal/planning/scan-storage-actions.js.map +1 -0
  716. package/dist/internal/planning/ship-import-funding.d.ts +22 -0
  717. package/dist/internal/planning/ship-import-funding.d.ts.map +1 -0
  718. package/dist/internal/planning/ship-import-funding.js +53 -0
  719. package/dist/internal/planning/ship-import-funding.js.map +1 -0
  720. package/dist/internal/planning/ship-token.d.ts +1 -6
  721. package/dist/internal/planning/ship-token.d.ts.map +1 -1
  722. package/dist/internal/planning/ship-token.js +0 -37
  723. package/dist/internal/planning/ship-token.js.map +1 -1
  724. package/dist/internal/planning/starbase-player-owner.d.ts +21 -0
  725. package/dist/internal/planning/starbase-player-owner.d.ts.map +1 -0
  726. package/dist/internal/planning/starbase-player-owner.js +17 -0
  727. package/dist/internal/planning/starbase-player-owner.js.map +1 -0
  728. package/dist/internal/planning/starbase-player-recovery-guard.d.ts +7 -0
  729. package/dist/internal/planning/starbase-player-recovery-guard.d.ts.map +1 -0
  730. package/dist/internal/planning/starbase-player-recovery-guard.js +39 -0
  731. package/dist/internal/planning/starbase-player-recovery-guard.js.map +1 -0
  732. package/dist/internal/planning/starbase-system-guard.d.ts +6 -0
  733. package/dist/internal/planning/starbase-system-guard.d.ts.map +1 -0
  734. package/dist/internal/planning/starbase-system-guard.js +94 -0
  735. package/dist/internal/planning/starbase-system-guard.js.map +1 -0
  736. package/dist/internal/planning/starbase-system.d.ts +15 -0
  737. package/dist/internal/planning/starbase-system.d.ts.map +1 -0
  738. package/dist/internal/planning/starbase-system.js +25 -0
  739. package/dist/internal/planning/starbase-system.js.map +1 -0
  740. package/dist/internal/planning/storage-action-readers.d.ts +10 -0
  741. package/dist/internal/planning/storage-action-readers.d.ts.map +1 -0
  742. package/dist/internal/planning/storage-action-readers.js +58 -0
  743. package/dist/internal/planning/storage-action-readers.js.map +1 -0
  744. package/dist/internal/planning/storage-actions.d.ts +89 -0
  745. package/dist/internal/planning/storage-actions.d.ts.map +1 -0
  746. package/dist/internal/planning/storage-actions.js +183 -0
  747. package/dist/internal/planning/storage-actions.js.map +1 -0
  748. package/dist/internal/planning/token-mint.d.ts.map +1 -1
  749. package/dist/internal/planning/token-mint.js +2 -1
  750. package/dist/internal/planning/token-mint.js.map +1 -1
  751. package/dist/internal/planning/trade-faction-market.d.ts +20 -0
  752. package/dist/internal/planning/trade-faction-market.d.ts.map +1 -0
  753. package/dist/internal/planning/trade-faction-market.js +56 -0
  754. package/dist/internal/planning/trade-faction-market.js.map +1 -0
  755. package/dist/internal/planning/wallet-starbase.d.ts +34 -0
  756. package/dist/internal/planning/wallet-starbase.d.ts.map +1 -0
  757. package/dist/internal/planning/wallet-starbase.js +39 -0
  758. package/dist/internal/planning/wallet-starbase.js.map +1 -0
  759. package/dist/internal/planning/xp-runtime.d.ts +36 -0
  760. package/dist/internal/planning/xp-runtime.d.ts.map +1 -0
  761. package/dist/internal/planning/xp-runtime.js +122 -0
  762. package/dist/internal/planning/xp-runtime.js.map +1 -0
  763. package/dist/internal/read-meta.d.ts +12 -0
  764. package/dist/internal/read-meta.d.ts.map +1 -1
  765. package/dist/internal/read-meta.js +10 -0
  766. package/dist/internal/read-meta.js.map +1 -1
  767. package/dist/internal/system-program.d.ts +4 -0
  768. package/dist/internal/system-program.d.ts.map +1 -0
  769. package/dist/internal/system-program.js +3 -0
  770. package/dist/internal/system-program.js.map +1 -0
  771. package/dist/loyalty/actions/index.d.ts +1 -1
  772. package/dist/loyalty/actions/index.d.ts.map +1 -1
  773. package/dist/loyalty/actions/index.js +16 -46
  774. package/dist/loyalty/actions/index.js.map +1 -1
  775. package/dist/loyalty/index.d.ts +4 -0
  776. package/dist/loyalty/index.d.ts.map +1 -1
  777. package/dist/loyalty/index.js +21 -33
  778. package/dist/loyalty/index.js.map +1 -1
  779. package/dist/markets/actions/index.d.ts +62 -4
  780. package/dist/markets/actions/index.d.ts.map +1 -1
  781. package/dist/markets/actions/index.js +261 -187
  782. package/dist/markets/actions/index.js.map +1 -1
  783. package/dist/markets/actions/trade-faction-market.d.ts +45 -0
  784. package/dist/markets/actions/trade-faction-market.d.ts.map +1 -0
  785. package/dist/markets/actions/trade-faction-market.js +311 -0
  786. package/dist/markets/actions/trade-faction-market.js.map +1 -0
  787. package/dist/markets/index.d.ts +38 -7
  788. package/dist/markets/index.d.ts.map +1 -1
  789. package/dist/markets/index.js +59 -20
  790. package/dist/markets/index.js.map +1 -1
  791. package/dist/mining/actions/index.d.ts +18 -15
  792. package/dist/mining/actions/index.d.ts.map +1 -1
  793. package/dist/mining/actions/index.js +146 -69
  794. package/dist/mining/actions/index.js.map +1 -1
  795. package/dist/mining/estimate-input.d.ts +103 -0
  796. package/dist/mining/estimate-input.d.ts.map +1 -0
  797. package/dist/mining/estimate-input.js +86 -0
  798. package/dist/mining/estimate-input.js.map +1 -0
  799. package/dist/mining/estimate.d.ts +114 -0
  800. package/dist/mining/estimate.d.ts.map +1 -0
  801. package/dist/mining/estimate.js +127 -0
  802. package/dist/mining/estimate.js.map +1 -0
  803. package/dist/mining/index.d.ts +10 -2
  804. package/dist/mining/index.d.ts.map +1 -1
  805. package/dist/mining/index.js +11 -13
  806. package/dist/mining/index.js.map +1 -1
  807. package/dist/mining/profile.d.ts +82 -0
  808. package/dist/mining/profile.d.ts.map +1 -0
  809. package/dist/mining/profile.js +109 -0
  810. package/dist/mining/profile.js.map +1 -0
  811. package/dist/planning/assembly.d.ts +6 -1
  812. package/dist/planning/assembly.d.ts.map +1 -1
  813. package/dist/planning/assembly.js +12 -8
  814. package/dist/planning/assembly.js.map +1 -1
  815. package/dist/planning/execution.d.ts +19 -3
  816. package/dist/planning/execution.d.ts.map +1 -1
  817. package/dist/planning/execution.js +623 -72
  818. package/dist/planning/execution.js.map +1 -1
  819. package/dist/planning/index.d.ts +252 -165
  820. package/dist/planning/index.d.ts.map +1 -1
  821. package/dist/planning/index.js +31 -388
  822. package/dist/planning/index.js.map +1 -1
  823. package/dist/planning/plan-construction.d.ts +25 -0
  824. package/dist/planning/plan-construction.d.ts.map +1 -0
  825. package/dist/planning/plan-construction.js +143 -0
  826. package/dist/planning/plan-construction.js.map +1 -0
  827. package/dist/planning/plan-sequence-checkpoint.d.ts +9 -0
  828. package/dist/planning/plan-sequence-checkpoint.d.ts.map +1 -1
  829. package/dist/planning/plan-sequence-checkpoint.js +16 -7
  830. package/dist/planning/plan-sequence-checkpoint.js.map +1 -1
  831. package/dist/planning/plan-sequence-execution.d.ts +5 -0
  832. package/dist/planning/plan-sequence-execution.d.ts.map +1 -1
  833. package/dist/planning/plan-sequence-execution.js +74 -40
  834. package/dist/planning/plan-sequence-execution.js.map +1 -1
  835. package/dist/planning/plan-sequence.d.ts +2 -1
  836. package/dist/planning/plan-sequence.d.ts.map +1 -1
  837. package/dist/planning/plan-sequence.js +8 -1
  838. package/dist/planning/plan-sequence.js.map +1 -1
  839. package/dist/planning/plan-validation.d.ts +17 -0
  840. package/dist/planning/plan-validation.d.ts.map +1 -0
  841. package/dist/planning/plan-validation.js +147 -0
  842. package/dist/planning/plan-validation.js.map +1 -0
  843. package/dist/planning/simulation.d.ts +25 -1
  844. package/dist/planning/simulation.d.ts.map +1 -1
  845. package/dist/planning/simulation.js +111 -11
  846. package/dist/planning/simulation.js.map +1 -1
  847. package/dist/registry/cargo.d.ts +7 -12
  848. package/dist/registry/cargo.d.ts.map +1 -1
  849. package/dist/registry/cargo.js +19 -20
  850. package/dist/registry/cargo.js.map +1 -1
  851. package/dist/registry/definition-section-snapshot.d.ts +1 -1
  852. package/dist/registry/definition-section-snapshot.d.ts.map +1 -1
  853. package/dist/registry/definition-section-snapshot.js +10 -3
  854. package/dist/registry/definition-section-snapshot.js.map +1 -1
  855. package/dist/registry/docking.d.ts +10 -0
  856. package/dist/registry/docking.d.ts.map +1 -0
  857. package/dist/registry/docking.js +12 -0
  858. package/dist/registry/docking.js.map +1 -0
  859. package/dist/registry/index.d.ts +35 -4
  860. package/dist/registry/index.d.ts.map +1 -1
  861. package/dist/registry/index.js +226 -227
  862. package/dist/registry/index.js.map +1 -1
  863. package/dist/registry/onboarding.d.ts +10 -2
  864. package/dist/registry/onboarding.d.ts.map +1 -1
  865. package/dist/registry/onboarding.js +22 -7
  866. package/dist/registry/onboarding.js.map +1 -1
  867. package/dist/registry/scanning.d.ts +7 -0
  868. package/dist/registry/scanning.d.ts.map +1 -0
  869. package/dist/registry/scanning.js +13 -0
  870. package/dist/registry/scanning.js.map +1 -0
  871. package/dist/registry/ship-stats-snapshot.d.ts.map +1 -1
  872. package/dist/registry/ship-stats-snapshot.js +38 -24
  873. package/dist/registry/ship-stats-snapshot.js.map +1 -1
  874. package/dist/registry/ships.d.ts +22 -2
  875. package/dist/registry/ships.d.ts.map +1 -1
  876. package/dist/registry/ships.js +31 -4
  877. package/dist/registry/ships.js.map +1 -1
  878. package/dist/registry/xp-runtime.d.ts +4 -0
  879. package/dist/registry/xp-runtime.d.ts.map +1 -0
  880. package/dist/registry/xp-runtime.js +14 -0
  881. package/dist/registry/xp-runtime.js.map +1 -0
  882. package/dist/rewards/index.d.ts +11 -5
  883. package/dist/rewards/index.d.ts.map +1 -1
  884. package/dist/rewards/index.js +10 -21
  885. package/dist/rewards/index.js.map +1 -1
  886. package/dist/scanning/actions/index.d.ts +116 -0
  887. package/dist/scanning/actions/index.d.ts.map +1 -0
  888. package/dist/scanning/actions/index.js +215 -0
  889. package/dist/scanning/actions/index.js.map +1 -0
  890. package/dist/scanning/index.d.ts +10 -12
  891. package/dist/scanning/index.d.ts.map +1 -1
  892. package/dist/scanning/index.js +19 -23
  893. package/dist/scanning/index.js.map +1 -1
  894. package/dist/scanning/lifecycle.d.ts +77 -0
  895. package/dist/scanning/lifecycle.d.ts.map +1 -0
  896. package/dist/scanning/lifecycle.js +93 -0
  897. package/dist/scanning/lifecycle.js.map +1 -0
  898. package/dist/scanning/odds.d.ts +115 -0
  899. package/dist/scanning/odds.d.ts.map +1 -0
  900. package/dist/scanning/odds.js +294 -0
  901. package/dist/scanning/odds.js.map +1 -0
  902. package/dist/scanning/signals.d.ts +126 -0
  903. package/dist/scanning/signals.d.ts.map +1 -0
  904. package/dist/scanning/signals.js +173 -0
  905. package/dist/scanning/signals.js.map +1 -0
  906. package/dist/starbases/actions/index.d.ts +49 -4
  907. package/dist/starbases/actions/index.d.ts.map +1 -1
  908. package/dist/starbases/actions/index.js +120 -69
  909. package/dist/starbases/actions/index.js.map +1 -1
  910. package/dist/starbases/index.d.ts +18 -0
  911. package/dist/starbases/index.d.ts.map +1 -1
  912. package/dist/starbases/index.js +24 -11
  913. package/dist/starbases/index.js.map +1 -1
  914. package/dist/world/index.d.ts +185 -6
  915. package/dist/world/index.d.ts.map +1 -1
  916. package/dist/world/index.js +186 -15
  917. package/dist/world/index.js.map +1 -1
  918. package/dist/world/planet-claim-stake-plots.d.ts +139 -0
  919. package/dist/world/planet-claim-stake-plots.d.ts.map +1 -0
  920. package/dist/world/planet-claim-stake-plots.js +117 -0
  921. package/dist/world/planet-claim-stake-plots.js.map +1 -0
  922. package/dist/world/starbase-status.d.ts +217 -0
  923. package/dist/world/starbase-status.d.ts.map +1 -0
  924. package/dist/world/starbase-status.js +218 -0
  925. package/dist/world/starbase-status.js.map +1 -0
  926. package/package.json +6 -2
@@ -1,15 +1,26 @@
1
- import { getAddressEncoder, getBytesEncoder, getProgramDerivedAddress, isAddress, } from '@solana/kit';
1
+ import { deriveCurrencyCache, validateCurrencyCache, } from '../../internal/c4/currency-cache.js';
2
+ import { validateStarbaseSystem } from '../../internal/planning/starbase-system.js';
3
+ import { SYSTEM_PROGRAM } from '../../internal/system-program.js';
4
+ import { isAddress } from '@solana/kit';
5
+ import { resolveActionRuntime } from '../../internal/planning/action-runtime.js';
6
+ import { requireProfileStarbasePlayer } from '../../internal/planning/starbase-player-owner.js';
2
7
  import { InvalidActionInputError, SageSdkError } from '../../client/errors.js';
3
8
  import { readContextRawAccounts } from '../../client/reconciliation.js';
4
- import { sage } from '../../internal/c4/bindings.js';
9
+ import { SAGE_PROGRAM_ADDRESS } from '../../internal/c4/runtime-bindings.js';
5
10
  import { craftingHabAccountDefinition, craftingProcessAccountDefinition, deriveRecipeAddress, recipeAccountDefinition, } from '../../internal/c4/crafting.js';
6
- import { characterAccountDefinition, findCharacterPda, } from '../../internal/c4/identity.js';
11
+ import { characterAccountDefinition, findCharacterPda, } from '../../internal/c4/character.js';
7
12
  import { deriveStarbasePlayerAddress, starbasePlayerAccountDefinition, } from '../../internal/c4/starbase.js';
8
13
  import { deriveInternalCraftingProcessState } from '../../internal/crafting-process-state.js';
9
14
  import { requireGameAddress } from '../../internal/game-context.js';
10
- import { adaptCancelCraftingProcessInstruction, adaptStartCraftingProcessInstruction, adaptCompleteCraftingProcessInstruction, validatePlanAuthorization, } from '../../internal/planning/authorization-adapter.js';
11
- import { deriveStarSystemAddress, starSystemAccountDefinition, } from '../../internal/c4/world.js';
12
- import { createPlan, } from '../../planning/index.js';
15
+ import { adaptCancelCraftingProcessInstruction, adaptStartCraftingProcessInstruction, adaptCompleteCraftingProcessInstruction, readPlanAuthorization, } from '../../internal/planning/authorization-adapter.js';
16
+ import { starSystemAccountDefinition } from '../../internal/c4/world.js';
17
+ import { buildPlannerPlan } from '../../planning/plan-construction.js';
18
+ import { hashRecipeConfiguration, validateRecipeUsage, } from '../../internal/planning/recipe-state.js';
19
+ import { accountStatePrecondition } from '../../internal/planning/account-state.js';
20
+ import { GAME_DISCRIMINATOR } from '../../internal/c4/discriminators.js';
21
+ import { readCraftingStorageAction } from '../../internal/planning/crafting-storage-actions.js';
22
+ import { planStorageFunding } from '../../internal/planning/storage-actions.js';
23
+ import { RENT_ADDRESS } from '../../internal/planning/rent.js';
13
24
  const U64_MAX = (1n << 64n) - 1n;
14
25
  const U32_MAX = 4_294_967_295;
15
26
  function invalid(field, value, acceptedRange, remedy) {
@@ -38,15 +49,7 @@ function readAddress(value, field) {
38
49
  function validateStartOptions(value) {
39
50
  const options = readRecord(value, 'options');
40
51
  assertKeys(options, 'options', ['authorization', 'craftingProcess', 'quantity', 'numCrew'], ['craftingHab']);
41
- const authorizationRecord = readRecord(options.authorization, 'authorization');
42
- assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
43
- const authorization = authorizationRecord;
44
- readAddress(authorization.profile, 'authorization.profile');
45
- readAddress(authorization.authority, 'authorization.authority');
46
- if (authorization.certificate !== undefined) {
47
- readAddress(authorization.certificate, 'authorization.certificate');
48
- }
49
- validatePlanAuthorization(authorization);
52
+ const authorization = readPlanAuthorization(options.authorization);
50
53
  if (typeof options.quantity !== 'bigint' ||
51
54
  options.quantity <= 0n ||
52
55
  options.quantity > U64_MAX) {
@@ -54,9 +57,9 @@ function validateStartOptions(value) {
54
57
  }
55
58
  if (typeof options.numCrew !== 'number' ||
56
59
  !Number.isInteger(options.numCrew) ||
57
- options.numCrew < 0 ||
60
+ options.numCrew < 1 ||
58
61
  options.numCrew > U32_MAX) {
59
- invalid('numCrew', options.numCrew, `an integer from 0 through ${String(U32_MAX)} (unsigned u32)`, 'Set numCrew to the exact available crew count within the instruction codec range.');
62
+ invalid('numCrew', options.numCrew, `an integer from 1 through ${String(U32_MAX)} (unsigned u32)`, 'Set numCrew to at least one crew member, within the instruction codec range; a Crafting Process cannot start without crew.');
60
63
  }
61
64
  return {
62
65
  authorization,
@@ -68,18 +71,11 @@ function validateStartOptions(value) {
68
71
  : { craftingHab: options.craftingHab }),
69
72
  };
70
73
  }
71
- function validateCompleteOptions(value) {
74
+ /** Validates completion or cancellation options, which share one shape. */
75
+ function validateProcessOptions(value) {
72
76
  const options = readRecord(value, 'options');
73
77
  assertKeys(options, 'options', ['authorization', 'atUnixSeconds']);
74
- const authorizationRecord = readRecord(options.authorization, 'authorization');
75
- assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
76
- const authorization = authorizationRecord;
77
- readAddress(authorization.profile, 'authorization.profile');
78
- readAddress(authorization.authority, 'authorization.authority');
79
- if (authorization.certificate !== undefined) {
80
- readAddress(authorization.certificate, 'authorization.certificate');
81
- }
82
- validatePlanAuthorization(authorization);
78
+ const authorization = readPlanAuthorization(options.authorization);
83
79
  if (typeof options.atUnixSeconds !== 'bigint' || options.atUnixSeconds < 0n) {
84
80
  invalid('atUnixSeconds', options.atUnixSeconds, 'a non-negative bigint Unix timestamp', 'Set atUnixSeconds to the explicit current Unix timestamp before retrying.');
85
81
  }
@@ -87,20 +83,8 @@ function validateCompleteOptions(value) {
87
83
  }
88
84
  function validateCancelOptions(value) {
89
85
  const options = readRecord(value, 'options');
90
- assertKeys(options, 'options', ['authorization', 'atUnixSeconds']);
91
- const authorizationRecord = readRecord(options.authorization, 'authorization');
92
- assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
93
- const authorization = authorizationRecord;
94
- readAddress(authorization.profile, 'authorization.profile');
95
- readAddress(authorization.authority, 'authorization.authority');
96
- if (authorization.certificate !== undefined) {
97
- readAddress(authorization.certificate, 'authorization.certificate');
98
- }
99
- validatePlanAuthorization(authorization);
100
- if (typeof options.atUnixSeconds !== 'bigint' || options.atUnixSeconds < 0n) {
101
- invalid('atUnixSeconds', options.atUnixSeconds, 'a non-negative bigint Unix timestamp', 'Set atUnixSeconds to the explicit current Unix timestamp before retrying.');
102
- }
103
- return { atUnixSeconds: options.atUnixSeconds, authorization };
86
+ assertKeys(options, 'options', ['authorization']);
87
+ return { authorization: readPlanAuthorization(options.authorization) };
104
88
  }
105
89
  function fail(message, address) {
106
90
  throw new SageSdkError('ACTION_PRECONDITION_FAILED', message, { address });
@@ -134,48 +118,19 @@ function validateKnownInputs(recipe, items, quantity, source, sourceAddress) {
134
118
  }
135
119
  }
136
120
  }
137
- async function deriveCurrencyCacheAddress(game) {
138
- const [address] = await getProgramDerivedAddress({
139
- programAddress: sage.SAGE_PROGRAM_ADDRESS,
140
- seeds: [
141
- getBytesEncoder().encode(new TextEncoder().encode('CurrencyConfig')),
142
- getAddressEncoder().encode(game),
143
- ],
144
- });
145
- return address;
146
- }
147
- function validateCurrencyCache(account, game, canonicalAddress) {
148
- const decoder = sage.getCurrencyConfigCacheDecoder();
149
- const validDiscriminator = sage.CURRENCY_CONFIG_CACHE_DISCRIMINATOR.every((byte, index) => account.data[index] === byte);
150
- if (account.address !== canonicalAddress ||
151
- account.owner !== sage.SAGE_PROGRAM_ADDRESS ||
152
- account.data.length !== decoder.fixedSize ||
153
- !validDiscriminator ||
154
- decoder.decode(account.data).gameId !== game) {
155
- fail(`CurrencyCache ${account.address} does not match the configured Game, canonical PDA, owner, or pinned account layout. Refresh the Game currency configuration and retry.`, account.address);
156
- }
157
- }
158
- async function hashAccountState(account) {
159
- const owner = getAddressEncoder().encode(account.owner);
160
- const canonical = new Uint8Array(owner.length + account.data.length);
161
- canonical.set(owner);
162
- canonical.set(account.data, owner.length);
163
- const digest = new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', canonical));
164
- return [...digest].map((byte) => byte.toString(16).padStart(2, '0')).join('');
165
- }
166
- async function precondition(account, describes) {
167
- return Object.freeze({
121
+ async function recipePrecondition(account, describes, requiredUses = 0n) {
122
+ return {
123
+ kind: 'recipe-state',
168
124
  address: account.address,
169
- dataHash: await hashAccountState(account),
125
+ configHash: await hashRecipeConfiguration(account),
126
+ requiredUses,
170
127
  describes,
171
- kind: 'account-state',
172
- });
128
+ };
173
129
  }
174
- async function resolveAccounts(ctx, recipe, player, options, game) {
175
- const character = await findCharacterPda(options.authorization.profile, game);
130
+ async function resolveAccounts(ctx, recipe, player, options, game, character) {
176
131
  const currencyCache = options.craftingHab === undefined
177
132
  ? undefined
178
- : await deriveCurrencyCacheAddress(game);
133
+ : await deriveCurrencyCache(game).then(([address]) => address);
179
134
  const addresses = [
180
135
  character,
181
136
  player.address,
@@ -218,11 +173,12 @@ async function resolveAccounts(ctx, recipe, player, options, game) {
218
173
  recipeData.id !== recipe.id ||
219
174
  recipeData.status !== recipe.status ||
220
175
  recipeData.habRequired !== recipe.habRequired ||
221
- recipeData.usageCountRaw !== recipe.usageCountRaw ||
222
176
  recipeData.usageLimitRaw !== recipe.usageLimitRaw ||
223
177
  !sameBalances(recipe.ingredients, recipeData.inputs)) {
224
178
  fail(`Recipe ${recipe.address} changed or does not match the configured Game, canonical PDA, status, limits, or ingredients. Refresh the Recipe through this context and retry.`, recipe.address);
225
179
  }
180
+ // One start consumes one Recipe use, independent of the crafted quantity.
181
+ validateRecipeUsage(recipeAccount, 1n);
226
182
  if (options.craftingHab === undefined) {
227
183
  return { character, characterAccount, playerAccount, recipeAccount };
228
184
  }
@@ -234,13 +190,22 @@ async function resolveAccounts(ctx, recipe, player, options, game) {
234
190
  habData.ownerProfile !== options.authorization.profile ||
235
191
  habData.system !== player.system.address ||
236
192
  habData.state.kind !== options.craftingHab.state.kind ||
193
+ // The crew reservation was computed from the snapshot's modifier.
194
+ habData.modifiers.crewCount.raw !==
195
+ options.craftingHab.modifiers.crewCount.raw ||
237
196
  Math.max(0, habData.jobCapacity - habData.jobsRunning) !==
238
197
  options.craftingHab.availableJobSlots ||
239
198
  !habData.unlockedRecipeIds.includes(recipe.id) ||
240
199
  !sameBalances(options.craftingHab.production.inventory.items, habData.production.inventory.amounts)) {
241
- fail(`Crafting Hab ${options.craftingHab.address} changed or does not match its Game, Profile, System, active capacity, unlocked Recipe, or production inventory. Refresh the Crafting Hab through this context and retry.`, options.craftingHab.address);
200
+ fail(`Crafting Hab ${options.craftingHab.address} changed or does not match its Game, Profile, System, active capacity, crew-count modifier, unlocked Recipe, or production inventory. Refresh the Crafting Hab through this context and retry.`, options.craftingHab.address);
242
201
  }
243
- validateCurrencyCache(currencyCacheAccount, game, currencyCache);
202
+ // The Character's research concurrency bonus raises the Hab's job limit.
203
+ const jobLimit = habData.jobCapacity +
204
+ characterData.modifiers.values.craftingJobConcurrencyBonus;
205
+ if (habData.jobsRunning >= jobLimit) {
206
+ fail(`Crafting Hab ${options.craftingHab.address} runs ${String(habData.jobsRunning)} jobs, its limit including the Character's concurrency bonus (${String(jobLimit)}). Complete or cancel another Hab job, refresh it, and retry.`, options.craftingHab.address);
207
+ }
208
+ await validateCurrencyCache(currencyCacheAccount, game, 'crafting');
244
209
  return {
245
210
  character,
246
211
  characterAccount,
@@ -254,9 +219,16 @@ async function resolveAccounts(ctx, recipe, player, options, game) {
254
219
  /** Plans one Crafting Process start without signing, simulation, or writes.
255
220
  *
256
221
  * The planner validates the loaded Recipe and Starbase Player, optional Hab,
257
- * known ingredient balances, available crew, and exact whole-account state. It
258
- * returns one inert Plan whose two required signer roles are bound only during
259
- * execution.
222
+ * known ingredient balances, the crew the job reserves, the Hab job limit
223
+ * including the Character's research concurrency bonus, and exact
224
+ * whole-account state. The ATLAS fee and any crew-roster bonuses remain
225
+ * chain-authoritative. It returns one inert Plan whose two required signer
226
+ * roles are bound only during execution.
227
+ *
228
+ * Each start consumes exactly one Recipe use, whatever its quantity, and needs
229
+ * the Recipe's fresh `usageCountRaw` to be below `usageLimitRaw`. A stored
230
+ * limit of `0n` is therefore never usable. Cancelling or destroying a process
231
+ * returns its use. See `docs/evidence/crafting-zero-usage-limit.md`.
260
232
  *
261
233
  * @example
262
234
  * ```ts
@@ -275,26 +247,19 @@ export async function planStartCraftingProcess(ctx, recipe, player, input) {
275
247
  if (recipe.game.address !== game || canonicalRecipe !== recipe.address) {
276
248
  fail(`Recipe ${recipe.address} does not match the configured Game ${game} or its canonical recipe-id PDA. Refresh the Recipe through this context and retry.`, recipe.address);
277
249
  }
278
- if (player.playerProfile.address !== options.authorization.profile) {
279
- fail(`Starbase Player ${player.address} does not belong to authorization Profile ${options.authorization.profile}. Refresh the Starbase Player for that Profile and retry.`, player.address);
280
- }
281
- const canonicalPlayer = await deriveStarbasePlayerAddress(player.system.address, player.character.address);
282
- if (canonicalPlayer !== player.address) {
283
- fail(`Starbase Player ${player.address} is not canonical for its Character and System. Refresh the Starbase Player through this context and retry.`, player.address);
284
- }
250
+ const character = await requireProfileStarbasePlayer(player, options.authorization.profile, game);
285
251
  if (recipe.status !== 'active') {
286
252
  fail(`Recipe ${recipe.name} is ${recipe.status}, so it cannot start a Crafting Process. Choose an active Recipe, refresh it, and retry.`, recipe.address);
287
253
  }
288
- if (recipe.usageLimitRaw !== 0n &&
289
- (recipe.usageCountRaw >= recipe.usageLimitRaw ||
290
- options.quantity > recipe.usageLimitRaw - recipe.usageCountRaw)) {
291
- const remaining = recipe.usageCountRaw >= recipe.usageLimitRaw
292
- ? 0n
293
- : recipe.usageLimitRaw - recipe.usageCountRaw;
294
- fail(`Recipe ${recipe.name} usage limit has remaining ${String(remaining)}, but requested ${String(options.quantity)}. Reduce quantity or choose another active Recipe before retrying.`, recipe.address);
295
- }
296
- if (options.numCrew > player.availableCrew) {
297
- fail(`Starbase Player ${player.address} has only ${String(player.availableCrew)} crew available, but numCrew requested ${String(options.numCrew)}. Reduce numCrew or free crew, refresh the Starbase Player, and retry.`, player.address);
254
+ // A Crafting Hab scales the reserved crew by its crew-count modifier
255
+ // (U26F6, 64 raw units per 1.0), rounded up.
256
+ const reservedCrew = options.craftingHab === undefined
257
+ ? BigInt(options.numCrew)
258
+ : (BigInt(options.numCrew) * options.craftingHab.modifiers.crewCount.raw +
259
+ 63n) /
260
+ 64n;
261
+ if (reservedCrew > BigInt(player.availableCrew)) {
262
+ fail(`Starbase Player ${player.address} has only ${String(player.availableCrew)} crew available, but this job reserves ${String(reservedCrew)} (numCrew ${String(options.numCrew)}${options.craftingHab === undefined ? '' : ' scaled by the Crafting Hab crew-count modifier'}). Reduce numCrew or free crew, refresh the Starbase Player, and retry.`, player.address);
298
263
  }
299
264
  if (recipe.habRequired && options.craftingHab === undefined) {
300
265
  fail(`Recipe ${recipe.name} requires a Crafting Hab. Provide craftingHab from the same Profile and Star System before retrying.`, recipe.address);
@@ -312,57 +277,90 @@ export async function planStartCraftingProcess(ctx, recipe, player, input) {
312
277
  if (options.craftingHab.state.kind !== 'active') {
313
278
  fail(`Crafting Hab ${options.craftingHab.address} is ${options.craftingHab.state.kind}; it must be active before starting a Crafting Process. Refresh or reactivate the Hab and retry.`, options.craftingHab.address);
314
279
  }
315
- if (options.craftingHab.availableJobSlots < 1) {
316
- fail(`Crafting Hab ${options.craftingHab.address} has no available job slots. Complete or cancel another Hab job, refresh it, and retry.`, options.craftingHab.address);
317
- }
318
280
  if (!options.craftingHab.unlockedRecipes.some(({ address }) => address === recipe.address)) {
319
281
  fail(`Crafting Hab ${options.craftingHab.address} has not unlocked Recipe ${recipe.name}. Choose an unlocked Recipe or update the Hab before retrying.`, options.craftingHab.address);
320
282
  }
321
- validateKnownInputs(recipe, options.craftingHab.production.inventory.items, options.quantity, 'Crafting Hab', options.craftingHab.address);
322
- }
323
- else {
324
- validateKnownInputs(recipe, player.cargo.items, options.quantity, 'Starbase Player', player.address);
325
283
  }
326
- const resolved = await resolveAccounts(ctx, recipe, player, options, game);
284
+ // Inputs come from the Starbase Player's cargo whether or not a Hab is used.
285
+ validateKnownInputs(recipe, player.cargo.items, options.quantity, 'Starbase Player', player.address);
286
+ const resolved = await resolveAccounts(ctx, recipe, player, options, game, character);
287
+ const [runtimeSystem] = await readContextRawAccounts(ctx, [
288
+ player.system.address,
289
+ ]);
290
+ if (!runtimeSystem)
291
+ fail('The crafting System is missing. Refresh the Starbase and recreate this Plan.', player.system.address);
292
+ const runtime = await resolveActionRuntime(ctx, {
293
+ mode: 'crafting-start',
294
+ game,
295
+ system: player.system.address,
296
+ starbaseSeqId: starSystemAccountDefinition.decode(runtimeSystem).sequenceId,
297
+ ...(options.craftingHab === undefined
298
+ ? {}
299
+ : { structure: options.craftingHab.address }),
300
+ });
327
301
  const description = `Start crafting ${String(options.quantity)} units of ${recipe.name} with ${String(options.numCrew)} crew at Starbase Player ${player.address}.`;
328
302
  const preconditions = [
329
- precondition(resolved.characterAccount, `The canonical Character remains assigned to Profile ${options.authorization.profile} in the configured Game.`),
330
- precondition(resolved.playerAccount, `Starbase Player ${player.address} retains its Character, Profile, System, crew, and input inventory.`),
331
- precondition(resolved.recipeAccount, `Recipe ${recipe.name} remains active with the validated usage limit and ingredients.`),
303
+ accountStatePrecondition(resolved.characterAccount, `The canonical Character remains assigned to Profile ${options.authorization.profile} in the configured Game.`),
304
+ accountStatePrecondition(resolved.playerAccount, `Starbase Player ${player.address} retains its Character, Profile, System, crew, and input inventory.`),
305
+ recipePrecondition(resolved.recipeAccount, `Recipe ${recipe.name} retains its configuration and at least one remaining use for this job.`, 1n),
332
306
  ...(resolved.habAccount === undefined
333
307
  ? []
334
308
  : [
335
- precondition(resolved.habAccount, `Crafting Hab ${resolved.habAccount.address} remains active with an available job slot, the Recipe unlocked, and sufficient inputs.`),
336
- precondition(resolved.currencyCacheAccount, 'The canonical CurrencyCache remains assigned to the configured Game for Hab crafting.'),
309
+ accountStatePrecondition(resolved.habAccount, `Crafting Hab ${resolved.habAccount.address} remains active with an available job slot and the Recipe unlocked; inputs come from the Starbase Player's cargo.`),
337
310
  ]),
338
311
  ];
339
- return createPlan({
312
+ const instruction = adaptStartCraftingProcessInstruction({
313
+ ...runtime.accounts,
314
+ starbaseGovernance: runtime.accounts.starbaseGovernance,
315
+ authorization: options.authorization,
316
+ character: resolved.character,
317
+ craftingProcess: options.craftingProcess,
318
+ game,
319
+ numCrew: options.numCrew,
320
+ quantity: options.quantity,
321
+ recipe: recipe.address,
322
+ starbasePlayer: player.address,
323
+ system: player.system.address,
324
+ ...(options.craftingHab === undefined
325
+ ? {}
326
+ : {
327
+ craftingHabInstance: options.craftingHab.address,
328
+ currencyCache: resolved.currencyCache,
329
+ }),
330
+ });
331
+ // A start creates the Crafting Process and consumes inputs from the Starbase
332
+ // Player; the program funds the net growth from the Profile vault with the
333
+ // signing key.
334
+ const [profileAccount, rentAccount] = await readContextRawAccounts(ctx, [
335
+ options.authorization.profile,
336
+ RENT_ADDRESS,
337
+ ]);
338
+ const storageAccounts = new Map([
339
+ [resolved.recipeAccount.address, resolved.recipeAccount],
340
+ [resolved.playerAccount.address, resolved.playerAccount],
341
+ [options.authorization.profile, profileAccount],
342
+ [RENT_ADDRESS, rentAccount],
343
+ ]);
344
+ const storage = planStorageFunding({
345
+ action: readCraftingStorageAction(instruction, storageAccounts),
346
+ accounts: storageAccounts,
347
+ label: 'Crafting Process start',
348
+ });
349
+ return buildPlannerPlan({
340
350
  kind: 'crafting.start-process',
341
- preconditions: await Promise.all(preconditions),
351
+ preconditions: [
352
+ ...runtime.guards,
353
+ ...(await Promise.all(preconditions)),
354
+ storage.guard,
355
+ ],
342
356
  steps: [
343
357
  {
344
- describes: description,
345
- instruction: adaptStartCraftingProcessInstruction({
346
- authorization: options.authorization,
347
- character: resolved.character,
348
- craftingProcess: options.craftingProcess,
349
- game,
350
- numCrew: options.numCrew,
351
- quantity: options.quantity,
352
- recipe: recipe.address,
353
- starbasePlayer: player.address,
354
- system: player.system.address,
355
- ...(options.craftingHab === undefined
356
- ? {}
357
- : {
358
- craftingHabInstance: options.craftingHab.address,
359
- currencyCache: resolved.currencyCache,
360
- }),
361
- }),
358
+ describes: `${description} ${runtime.description} ${storage.disclosure}`,
359
+ instruction,
362
360
  signers: [options.authorization.authority, options.craftingProcess],
363
361
  },
364
362
  ],
365
- summary: description,
363
+ summary: `${description} ${runtime.description} ${storage.disclosure}`,
366
364
  });
367
365
  }
368
366
  function sameProcessSnapshot(process, account) {
@@ -372,7 +370,7 @@ function sameProcessSnapshot(process, account) {
372
370
  account.system === process.system.address &&
373
371
  account.starbasePlayer === process.starbasePlayer.address &&
374
372
  account.starbaseSequenceId === process.starbaseSequenceId &&
375
- account.craftingHab === process.craftingHab.address &&
373
+ account.craftingHab === process.craftingHab?.address &&
376
374
  account.quantityRaw === process.quantityRaw &&
377
375
  account.numCrew === process.numCrew &&
378
376
  account.startsAtUnixSeconds === process.startsAtUnixSeconds &&
@@ -382,47 +380,64 @@ function sameProcessSnapshot(process, account) {
382
380
  account.inputs.storageCostRaw === process.inputs.usedStorageUnitsRaw &&
383
381
  sameBalances(process.inputs.items, account.inputs.amounts));
384
382
  }
383
+ /** SDK reads omit `craftingHab` for a Process without a Hab; a caller-built
384
+ * snapshot carrying the raw stored System address is rejected with that cause
385
+ * instead of being read as a Hab and reported as a changed Process. */
386
+ function processHabAddress(process) {
387
+ const habAddress = process.craftingHab?.address;
388
+ if (habAddress === SYSTEM_PROGRAM)
389
+ invalid('process.craftingHab', habAddress, 'a Crafting Hab address, or no craftingHab for a Process started without a Hab', 'The stored System address means this Process has no Hab. Use a snapshot from getCraftingProcess, which omits craftingHab, or omit craftingHab, then plan again.');
390
+ return habAddress;
391
+ }
385
392
  function validateGameRead(account, game) {
386
393
  if (account.address !== game ||
387
- account.owner !== sage.SAGE_PROGRAM_ADDRESS ||
388
- account.data.length < sage.GAME_DISCRIMINATOR.length ||
389
- !sage.GAME_DISCRIMINATOR.every((byte, index) => account.data[index] === byte)) {
394
+ account.owner !== SAGE_PROGRAM_ADDRESS ||
395
+ account.data.length < GAME_DISCRIMINATOR.length ||
396
+ !GAME_DISCRIMINATOR.every((byte, index) => account.data[index] === byte)) {
390
397
  fail(`Game ${account.address} does not match the configured address, owner, or pinned account layout. Refresh the configured Game and retry.`, account.address);
391
398
  }
392
399
  }
393
- async function resolveCompleteAccounts(ctx, process, options, game) {
394
- const character = await findCharacterPda(options.authorization.profile, game);
395
- const currencyCache = await deriveCurrencyCacheAddress(game);
396
- const habAddress = process.craftingHab.address === sage.SAGE_PROGRAM_ADDRESS
397
- ? undefined
398
- : process.craftingHab.address;
399
- const addresses = [
400
+ /** Reads and validates the Crafting Process graph shared by completion and
401
+ * cancellation, with `extra` in the same read: the unchanged Process, its
402
+ * canonical System and Starbase, the unchanged Recipe and its Hab policy, the
403
+ * Profile's canonical Starbase Player and Character, and the Process Hab,
404
+ * active and owned, when present. `action` completes the remedies, and
405
+ * `staleStarbaseGuidance` adds advice for a replaced Starbase. With
406
+ * `readHab` false the Hab is passed by its stored address only and is not
407
+ * read, as cancellation tolerates a Hab in any state or none at all. */
408
+ async function resolveProcessAccounts(ctx, process, profile, game, action, extra, staleStarbaseGuidance, readHab = true) {
409
+ const character = await findCharacterPda(profile, game);
410
+ const habAddress = processHabAddress(process);
411
+ const habRead = readHab ? habAddress : undefined;
412
+ // The SAGE program address is the omitted-account placeholder, so the
413
+ // program would see no Hab where the Process stores one.
414
+ if (!readHab && habAddress === SAGE_PROGRAM_ADDRESS)
415
+ fail(`Crafting Process ${process.address} stores the SAGE program address as its Crafting Hab, which the instruction cannot pass as a Hab. Refresh the Crafting Process; it cannot be cancelled while it stores that address.`, process.address);
416
+ const [processCandidate, recipeCandidate, playerCandidate, systemCandidate, characterCandidate, extraAccount, habCandidate,] = await readContextRawAccounts(ctx, [
400
417
  process.address,
401
418
  process.recipe.address,
402
419
  process.starbasePlayer.address,
403
420
  process.system.address,
404
- ...(habAddress === undefined ? [] : [habAddress]),
405
421
  character,
406
- game,
407
- currencyCache,
408
- ];
409
- const reads = await readContextRawAccounts(ctx, addresses);
410
- const byAddress = new Map(addresses.map((address, index) => [address, reads[index]]));
411
- const processAccount = requireAccount(byAddress.get(process.address), process.address, `Crafting Process ${process.address} is missing, so it may already be cancelled or closed. Refresh the Crafting Process and retry only if it still exists.`);
412
- const recipeAccount = requireAccount(byAddress.get(process.recipe.address), process.recipe.address, `Recipe ${process.recipe.address} is missing. Refresh the Crafting Process and its Recipe before retrying completion.`);
413
- const playerAccount = requireAccount(byAddress.get(process.starbasePlayer.address), process.starbasePlayer.address, `Starbase Player ${process.starbasePlayer.address} is missing. Refresh the Crafting Process and Starbase Player before retrying completion.`);
414
- const systemAccount = requireAccount(byAddress.get(process.system.address), process.system.address, `Star System ${process.system.address} is missing. Refresh the Crafting Process and Star System before retrying completion.`);
415
- const characterAccount = requireAccount(byAddress.get(character), character, `Canonical Character ${character} is missing for Profile ${options.authorization.profile}. Create or repair the Character in the configured Game before retrying completion.`);
416
- const gameAccount = requireAccount(byAddress.get(game), game, `Configured Game ${game} is missing. Refresh the configured Game before retrying completion.`);
417
- const currencyCacheAccount = requireAccount(byAddress.get(currencyCache), currencyCache, `Canonical CurrencyCache ${currencyCache} is missing for the configured Game. Refresh the Game currency configuration before retrying completion.`);
418
- const habAccount = habAddress === undefined
419
- ? undefined
420
- : requireAccount(byAddress.get(habAddress), habAddress, `Crafting Hab ${habAddress} is missing. Refresh the Crafting Process and Hab before retrying completion.`);
421
- const processData = craftingProcessAccountDefinition.decode(processAccount);
422
+ extra,
423
+ ...(habRead === undefined ? [] : [habRead]),
424
+ ]);
425
+ const processAccount = requireAccount(processCandidate, process.address, `Crafting Process ${process.address} is missing, so it may already be completed, cancelled, or closed. Refresh the Crafting Process and retry only if it still exists.`);
422
426
  if (processAccount.address !== process.address ||
423
- !sameProcessSnapshot(process, processData)) {
427
+ !sameProcessSnapshot(process, craftingProcessAccountDefinition.decode(processAccount))) {
424
428
  fail(`Crafting Process ${process.address} changed or no longer matches its relationships, timing, crew, quantity, fee, or inputs. Refresh the Crafting Process and retry.`, process.address);
425
429
  }
430
+ await validateStarbaseSystem(requireAccount(systemCandidate, process.system.address, `Star System ${process.system.address} is missing. Refresh the Crafting Process and Star System before retrying ${action}.`), {
431
+ address: process.system.address,
432
+ game,
433
+ starbaseSequenceId: process.starbaseSequenceId,
434
+ }, staleStarbaseGuidance);
435
+ const recipeAccount = requireAccount(recipeCandidate, process.recipe.address, `Recipe ${process.recipe.address} is missing. Refresh the Crafting Process and its Recipe before retrying ${action}.`);
436
+ const playerAccount = requireAccount(playerCandidate, process.starbasePlayer.address, `Starbase Player ${process.starbasePlayer.address} is missing. Refresh the Crafting Process and Starbase Player before retrying ${action}.`);
437
+ const characterAccount = requireAccount(characterCandidate, character, `Canonical Character ${character} is missing for Profile ${profile}. Create or repair the Character in the configured Game before retrying ${action}.`);
438
+ const habAccount = habRead === undefined
439
+ ? undefined
440
+ : requireAccount(habCandidate, habRead, `Crafting Hab ${habAddress} is missing. Refresh the Crafting Process and Hab before retrying ${action}.`);
426
441
  const recipeData = recipeAccountDefinition.decode(recipeAccount);
427
442
  const canonicalRecipe = await deriveRecipeAddress(game, recipeData.id);
428
443
  if (recipeAccount.address !== process.recipe.address ||
@@ -432,65 +447,73 @@ async function resolveCompleteAccounts(ctx, process, options, game) {
432
447
  recipeData.name !== process.recipe.name ||
433
448
  recipeData.status !== process.recipe.status ||
434
449
  recipeData.habRequired !== process.recipe.habRequired ||
435
- recipeData.usageCountRaw !== process.recipe.usageCountRaw ||
436
450
  recipeData.usageLimitRaw !== process.recipe.usageLimitRaw ||
437
451
  !sameBalances(process.recipe.ingredients, recipeData.inputs) ||
438
452
  !sameBalances(process.recipe.outputs, recipeData.outputs)) {
439
- fail(`Recipe ${process.recipe.address} changed or does not match the configured Game, canonical recipe-id PDA, status, Hab policy, limits, ingredients, or outputs. Refresh the Crafting Process and Recipe before retrying completion.`, process.recipe.address);
453
+ fail(`Recipe ${process.recipe.address} changed or does not match the configured Game, canonical recipe-id PDA, status, Hab policy, limits, ingredients, or outputs. Refresh the Crafting Process and Recipe before retrying ${action}.`, process.recipe.address);
440
454
  }
441
455
  if (recipeData.habRequired && habAddress === undefined) {
442
- fail(`Recipe ${recipeData.name} requires a Crafting Hab, but Crafting Process ${process.address} omits one. Refresh or repair the Process relationship before retrying completion.`, process.address);
456
+ fail(`Recipe ${recipeData.name} requires a Crafting Hab, but Crafting Process ${process.address} omits one. Refresh or repair the Process relationship before retrying ${action}.`, process.address);
443
457
  }
444
458
  const playerData = starbasePlayerAccountDefinition.decode(playerAccount);
445
459
  const canonicalPlayer = await deriveStarbasePlayerAddress(process.system.address, character);
446
460
  if (playerAccount.address !== process.starbasePlayer.address ||
447
461
  canonicalPlayer !== process.starbasePlayer.address ||
448
- playerData.playerProfile !== options.authorization.profile ||
462
+ playerData.playerProfile !== profile ||
449
463
  playerData.character !== character ||
450
464
  playerData.system !== process.system.address) {
451
- fail(`Starbase Player ${process.starbasePlayer.address} does not match the authorization Profile, canonical Character, or Crafting Process System. Refresh the Crafting Process and Starbase Player before retrying completion.`, process.starbasePlayer.address);
452
- }
453
- const systemData = starSystemAccountDefinition.decode(systemAccount);
454
- const canonicalSystem = await deriveStarSystemAddress(game, systemData.systemId);
455
- if (systemAccount.address !== process.system.address ||
456
- canonicalSystem !== process.system.address ||
457
- systemData.game !== game ||
458
- systemData.sequenceId !== process.starbaseSequenceId ||
459
- systemData.starbase === undefined) {
460
- fail(`Star System ${process.system.address} does not match the configured Game, canonical system-id PDA, active Starbase, or Crafting Process Starbase sequence. Refresh the Crafting Process and Star System before retrying completion.`, process.system.address);
465
+ fail(`Starbase Player ${process.starbasePlayer.address} does not match the authorization Profile, canonical Character, or Crafting Process System. Refresh the Crafting Process and Starbase Player before retrying ${action}.`, process.starbasePlayer.address);
461
466
  }
462
467
  if (habAccount !== undefined) {
463
468
  const habData = craftingHabAccountDefinition.decode(habAccount);
464
469
  if (habAccount.address !== habAddress ||
465
470
  habData.game !== game ||
466
- habData.ownerProfile !== options.authorization.profile ||
471
+ habData.ownerProfile !== profile ||
467
472
  habData.system !== process.system.address ||
468
473
  habData.systemSequenceId !== process.starbaseSequenceId ||
469
474
  habData.state.kind !== 'active') {
470
- fail(`Crafting Hab ${habAddress} is not active or does not match the configured Game, authorization Profile, Crafting Process System, or Starbase sequence. Refresh the Crafting Process and Hab before retrying completion.`, habAccount.address);
475
+ fail(`Crafting Hab ${habAddress} is not active or does not match the configured Game, authorization Profile, Crafting Process System, or Starbase sequence. Refresh the Crafting Process and Hab before retrying ${action}.`, habAccount.address);
471
476
  }
472
477
  }
473
478
  const characterData = characterAccountDefinition.decode(characterAccount);
474
479
  if (characterAccount.address !== character ||
475
- characterData.playerProfile !== options.authorization.profile ||
480
+ characterData.playerProfile !== profile ||
476
481
  characterData.game !== game) {
477
- fail(`The canonical Character does not match Profile ${options.authorization.profile} and the configured Game ${game}. Refresh or repair the Character relationship before retrying completion.`, characterAccount.address);
482
+ fail(`The canonical Character does not match Profile ${profile} and the configured Game ${game}. Refresh or repair the Character relationship before retrying ${action}.`, characterAccount.address);
478
483
  }
479
- validateGameRead(gameAccount, game);
480
- validateCurrencyCache(currencyCacheAccount, game, currencyCache);
481
484
  return {
482
485
  character,
483
486
  characterAccount,
484
- currencyCache,
485
- currencyCacheAccount,
486
- gameAccount,
487
- ...(habAccount === undefined ? {} : { habAccount }),
487
+ extraAccount,
488
+ habAccount,
489
+ habAddress,
488
490
  playerAccount,
489
491
  processAccount,
490
492
  recipeAccount,
491
- systemAccount,
492
493
  };
493
494
  }
495
+ /** The validated Process graph preconditions, with `systemGuard` after the
496
+ * Starbase Player when the action guards the Starbase separately. */
497
+ function processPreconditions(process, resolved, profile, systemGuard = []) {
498
+ return [
499
+ accountStatePrecondition(resolved.processAccount, `Crafting Process ${process.address} retains its validated relationships, timing, crew, quantity, fee, and inputs.`),
500
+ recipePrecondition(resolved.recipeAccount, `Recipe ${process.recipe.name} retains its validated Game, Hab policy, ingredients, and outputs.`),
501
+ accountStatePrecondition(resolved.playerAccount, `Starbase Player ${process.starbasePlayer.address} retains its Profile, Character, and System relationships.`),
502
+ ...systemGuard.map((guard) => Promise.resolve(guard)),
503
+ ...(resolved.habAccount === undefined
504
+ ? []
505
+ : [
506
+ accountStatePrecondition(resolved.habAccount, `Crafting Hab ${resolved.habAccount.address} remains active in the validated Game, Profile, System, and Starbase sequence.`),
507
+ ]),
508
+ accountStatePrecondition(resolved.characterAccount, `The canonical Character remains assigned to Profile ${profile} in the configured Game.`),
509
+ ];
510
+ }
511
+ /** Requires the authorization Profile to own the Process. */
512
+ function requireProcessOwner(process, profile) {
513
+ if (process.profile.address !== profile) {
514
+ fail(`Crafting Process ${process.address} does not belong to authorization Profile ${profile}. Use the owning Profile, refresh the Process, and retry.`, process.address);
515
+ }
516
+ }
494
517
  /** Plans completion of one Crafting Process without signing, simulation, or writes.
495
518
  *
496
519
  * The planner resolves and validates the Process account graph, requires Profile
@@ -508,11 +531,10 @@ async function resolveCompleteAccounts(ctx, process, options, game) {
508
531
  * ```
509
532
  */
510
533
  export async function planCompleteCraftingProcess(ctx, process, input) {
511
- const options = validateCompleteOptions(input);
534
+ const options = validateProcessOptions(input);
512
535
  const game = requireGameAddress(ctx);
513
- if (process.profile.address !== options.authorization.profile) {
514
- fail(`Crafting Process ${process.address} does not belong to authorization Profile ${options.authorization.profile}. Use the owning Profile, refresh the Process, and retry.`, process.address);
515
- }
536
+ const { profile } = options.authorization;
537
+ requireProcessOwner(process, profile);
516
538
  const state = deriveInternalCraftingProcessState(process, options.atUnixSeconds);
517
539
  if (state.kind !== 'complete') {
518
540
  const timing = state.kind === 'scheduled'
@@ -520,33 +542,36 @@ export async function planCompleteCraftingProcess(ctx, process, input) {
520
542
  : `in-progress and not complete with ${String(state.remainingSeconds)} seconds remaining`;
521
543
  fail(`Crafting Process ${process.address} is ${timing} at Unix timestamp ${String(options.atUnixSeconds)}. Wait until it is complete, provide a current timestamp, and retry.`, process.address);
522
544
  }
523
- const resolved = await resolveCompleteAccounts(ctx, process, options, game);
524
- const description = `Complete crafting ${String(process.quantityRaw)} units of ${process.recipe.name} at Starbase Player ${process.starbasePlayer.address}, returning ${String(process.numCrew)} crew and producing the Recipe outputs.`;
525
- const preconditions = [
526
- precondition(resolved.processAccount, `Crafting Process ${process.address} retains its validated relationships, timing, crew, quantity, fee, and inputs.`),
527
- precondition(resolved.recipeAccount, `Recipe ${process.recipe.name} retains its validated Game, Hab policy, ingredients, and outputs.`),
528
- precondition(resolved.playerAccount, `Starbase Player ${process.starbasePlayer.address} retains its Profile, Character, and System relationships.`),
529
- precondition(resolved.systemAccount, `Star System ${process.system.address} retains its active Starbase and validated sequence.`),
545
+ const [currencyCache] = await deriveCurrencyCache(game);
546
+ const resolved = await resolveProcessAccounts(ctx, process, profile, game, 'completion', currencyCache);
547
+ await validateCurrencyCache(requireAccount(resolved.extraAccount, currencyCache, `Canonical CurrencyCache ${currencyCache} is missing for the configured Game. Refresh the Game currency configuration before retrying completion.`), game, 'crafting');
548
+ const runtime = await resolveActionRuntime(ctx, {
549
+ mode: 'crafting-complete',
550
+ game,
551
+ system: process.system.address,
552
+ starbaseSeqId: process.starbaseSequenceId,
553
+ character: resolved.character,
554
+ process: process.address,
530
555
  ...(resolved.habAccount === undefined
531
- ? []
532
- : [
533
- precondition(resolved.habAccount, `Crafting Hab ${resolved.habAccount.address} remains active in the validated Game, Profile, System, and Starbase sequence.`),
534
- ]),
535
- precondition(resolved.characterAccount, `The canonical Character remains assigned to Profile ${options.authorization.profile} in the configured Game.`),
536
- precondition(resolved.gameAccount, `Game ${game} retains its pinned owner and account layout.`),
537
- precondition(resolved.currencyCacheAccount, 'The canonical CurrencyCache remains assigned to the configured Game.'),
538
- ];
539
- return createPlan({
556
+ ? {}
557
+ : { structure: resolved.habAccount.address }),
558
+ });
559
+ const description = `Complete crafting ${String(process.quantityRaw)} units of ${process.recipe.name} at Starbase Player ${process.starbasePlayer.address}, returning ${String(process.numCrew)} crew and producing the Recipe outputs.`;
560
+ return buildPlannerPlan({
540
561
  kind: 'crafting.complete-process',
541
- preconditions: await Promise.all(preconditions),
562
+ preconditions: [
563
+ ...runtime.guards,
564
+ ...(await Promise.all(processPreconditions(process, resolved, profile))),
565
+ ],
542
566
  steps: [
543
567
  {
544
- describes: description,
568
+ describes: `${description} ${runtime.description}`,
545
569
  instruction: adaptCompleteCraftingProcessInstruction({
570
+ ...runtime.accounts,
546
571
  authorization: options.authorization,
547
572
  character: resolved.character,
548
573
  craftingProcess: process.address,
549
- currencyCache: resolved.currencyCache,
574
+ currencyCache,
550
575
  game,
551
576
  recipe: process.recipe.address,
552
577
  starbasePlayer: process.starbasePlayer.address,
@@ -558,114 +583,18 @@ export async function planCompleteCraftingProcess(ctx, process, input) {
558
583
  signers: [options.authorization.authority],
559
584
  },
560
585
  ],
561
- summary: description,
586
+ summary: `${description} ${runtime.description}`,
562
587
  });
563
588
  }
564
- async function resolveCancelAccounts(ctx, process, options, game) {
565
- const character = await findCharacterPda(options.authorization.profile, game);
566
- const habAddress = process.craftingHab.address === sage.SAGE_PROGRAM_ADDRESS
567
- ? undefined
568
- : process.craftingHab.address;
569
- const addresses = [
570
- process.address,
571
- process.recipe.address,
572
- process.starbasePlayer.address,
573
- process.system.address,
574
- ...(habAddress === undefined ? [] : [habAddress]),
575
- character,
576
- game,
577
- ];
578
- const reads = await readContextRawAccounts(ctx, addresses);
579
- const byAddress = new Map(addresses.map((address, index) => [address, reads[index]]));
580
- const processAccount = requireAccount(byAddress.get(process.address), process.address, `Crafting Process ${process.address} is missing, so it may already be completed, cancelled, or closed. Refresh the Crafting Process and retry only if it still exists.`);
581
- const systemAccount = requireAccount(byAddress.get(process.system.address), process.system.address, `Star System ${process.system.address} is missing. Refresh the Crafting Process and Star System before retrying cancellation.`);
582
- const processData = craftingProcessAccountDefinition.decode(processAccount);
583
- if (processAccount.address !== process.address ||
584
- !sameProcessSnapshot(process, processData)) {
585
- fail(`Crafting Process ${process.address} changed or no longer matches its relationships, timing, crew, quantity, fee, or inputs. Refresh the Crafting Process and retry.`, process.address);
586
- }
587
- const systemData = starSystemAccountDefinition.decode(systemAccount);
588
- const canonicalSystem = await deriveStarSystemAddress(game, systemData.systemId);
589
- if (systemAccount.address !== process.system.address ||
590
- canonicalSystem !== process.system.address ||
591
- systemData.game !== game) {
592
- fail(`Star System ${process.system.address} does not match the configured Game or canonical system-id PDA. Refresh the Crafting Process and Star System before retrying cancellation.`, process.system.address);
593
- }
594
- if (systemData.sequenceId !== process.starbaseSequenceId) {
595
- fail(`The Starbase sequence for Crafting Process ${process.address} is stale at ${String(process.starbaseSequenceId)}, while Star System ${process.system.address} is at sequence ${String(systemData.sequenceId)}. The program requires destroyCraftingProcess for this destroyed-Starbase cleanup case; do not cancel the Process.`, process.address);
596
- }
597
- if (systemData.starbase === undefined) {
598
- fail(`Star System ${process.system.address} does not have an active Starbase. Refresh the Crafting Process and Star System before retrying cancellation.`, process.system.address);
599
- }
600
- const recipeAccount = requireAccount(byAddress.get(process.recipe.address), process.recipe.address, `Recipe ${process.recipe.address} is missing. Refresh the Crafting Process and its Recipe before retrying cancellation.`);
601
- const playerAccount = requireAccount(byAddress.get(process.starbasePlayer.address), process.starbasePlayer.address, `Starbase Player ${process.starbasePlayer.address} is missing. Refresh the Crafting Process and Starbase Player before retrying cancellation.`);
602
- const characterAccount = requireAccount(byAddress.get(character), character, `Canonical Character ${character} is missing for Profile ${options.authorization.profile}. Create or repair the Character in the configured Game before retrying cancellation.`);
603
- const gameAccount = requireAccount(byAddress.get(game), game, `Configured Game ${game} is missing. Refresh the configured Game before retrying cancellation.`);
604
- const habAccount = habAddress === undefined
605
- ? undefined
606
- : requireAccount(byAddress.get(habAddress), habAddress, `Crafting Hab ${habAddress} is missing. Refresh the Crafting Process and Hab before retrying cancellation.`);
607
- const recipeData = recipeAccountDefinition.decode(recipeAccount);
608
- const canonicalRecipe = await deriveRecipeAddress(game, recipeData.id);
609
- if (recipeAccount.address !== process.recipe.address ||
610
- canonicalRecipe !== process.recipe.address ||
611
- recipeData.game !== game ||
612
- recipeData.id !== process.recipe.id ||
613
- recipeData.name !== process.recipe.name ||
614
- recipeData.status !== process.recipe.status ||
615
- recipeData.habRequired !== process.recipe.habRequired ||
616
- recipeData.usageCountRaw !== process.recipe.usageCountRaw ||
617
- recipeData.usageLimitRaw !== process.recipe.usageLimitRaw ||
618
- !sameBalances(process.recipe.ingredients, recipeData.inputs) ||
619
- !sameBalances(process.recipe.outputs, recipeData.outputs)) {
620
- fail(`Recipe ${process.recipe.address} changed or does not match the configured Game, canonical recipe-id PDA, status, Hab policy, limits, ingredients, or outputs. Refresh the Crafting Process and Recipe before retrying cancellation.`, process.recipe.address);
621
- }
622
- if (recipeData.habRequired && habAddress === undefined) {
623
- fail(`Recipe ${recipeData.name} requires a Crafting Hab, but Crafting Process ${process.address} omits one. Refresh or repair the Process relationship before retrying cancellation.`, process.address);
624
- }
625
- const playerData = starbasePlayerAccountDefinition.decode(playerAccount);
626
- const canonicalPlayer = await deriveStarbasePlayerAddress(process.system.address, character);
627
- if (playerAccount.address !== process.starbasePlayer.address ||
628
- canonicalPlayer !== process.starbasePlayer.address ||
629
- playerData.playerProfile !== options.authorization.profile ||
630
- playerData.character !== character ||
631
- playerData.system !== process.system.address) {
632
- fail(`Starbase Player ${process.starbasePlayer.address} does not match the authorization Profile, canonical Character, or Crafting Process System. Refresh the Crafting Process and Starbase Player before retrying cancellation.`, process.starbasePlayer.address);
633
- }
634
- if (habAccount !== undefined) {
635
- const habData = craftingHabAccountDefinition.decode(habAccount);
636
- if (habAccount.address !== habAddress ||
637
- habData.game !== game ||
638
- habData.ownerProfile !== options.authorization.profile ||
639
- habData.system !== process.system.address ||
640
- habData.systemSequenceId !== process.starbaseSequenceId ||
641
- habData.state.kind !== 'active') {
642
- fail(`Crafting Hab ${habAddress} is not active or does not match the configured Game, authorization Profile, Crafting Process System, or Starbase sequence. Refresh the Crafting Process and Hab before retrying cancellation.`, habAccount.address);
643
- }
644
- }
645
- const characterData = characterAccountDefinition.decode(characterAccount);
646
- if (characterAccount.address !== character ||
647
- characterData.playerProfile !== options.authorization.profile ||
648
- characterData.game !== game) {
649
- fail(`The canonical Character does not match Profile ${options.authorization.profile} and the configured Game ${game}. Refresh or repair the Character relationship before retrying cancellation.`, characterAccount.address);
650
- }
651
- validateGameRead(gameAccount, game);
652
- return {
653
- character,
654
- characterAccount,
655
- gameAccount,
656
- ...(habAccount === undefined ? {} : { habAccount }),
657
- playerAccount,
658
- processAccount,
659
- recipeAccount,
660
- systemAccount,
661
- };
662
- }
663
- /** Plans cancellation of one unfinished Crafting Process without signing or writes.
589
+ /** Plans cancellation of one Crafting Process without signing or writes.
664
590
  *
665
591
  * The planner resolves and validates the Process account graph, requires Profile
666
- * ownership, and rejects completed or destroyed-Starbase Process snapshots.
667
- * Final inventory capacity, permissions, returned inputs and crew, and account
668
- * closure remain chain-authoritative.
592
+ * ownership, and rejects a Process whose Starbase was destroyed. Cancellation
593
+ * has no timing rule: a finished Process can still be cancelled, which returns
594
+ * its inputs and crew instead of producing outputs. A Process Hab is passed by
595
+ * its stored address in whatever state it is in, or even if it no longer
596
+ * exists. Final inventory capacity, permissions, returned inputs and crew, and
597
+ * account closure remain chain-authoritative.
669
598
  *
670
599
  * @example
671
600
  * ```ts
@@ -679,50 +608,67 @@ async function resolveCancelAccounts(ctx, process, options, game) {
679
608
  export async function planCancelCraftingProcess(ctx, process, input) {
680
609
  const options = validateCancelOptions(input);
681
610
  const game = requireGameAddress(ctx);
682
- if (process.profile.address !== options.authorization.profile) {
683
- fail(`Crafting Process ${process.address} does not belong to authorization Profile ${options.authorization.profile}. Use the owning Profile, refresh the Process, and retry.`, process.address);
684
- }
685
- const state = deriveInternalCraftingProcessState(process, options.atUnixSeconds);
686
- if (state.kind === 'complete') {
687
- fail(`Crafting Process ${process.address} is complete at Unix timestamp ${String(options.atUnixSeconds)} and cannot be cancelled. Use planCompleteCraftingProcess with a refreshed snapshot instead.`, process.address);
688
- }
689
- const resolved = await resolveCancelAccounts(ctx, process, options, game);
690
- const description = `Cancel crafting ${String(process.quantityRaw)} units of ${process.recipe.name} at Starbase Player ${process.starbasePlayer.address}, returning all inputs and ${String(process.numCrew)} crew and closing the Crafting Process.`;
691
- const preconditions = [
692
- precondition(resolved.processAccount, `Crafting Process ${process.address} retains its validated relationships, timing, crew, quantity, fee, and inputs.`),
693
- precondition(resolved.recipeAccount, `Recipe ${process.recipe.name} retains its validated Game, Hab policy, usage, ingredients, and outputs.`),
694
- precondition(resolved.playerAccount, `Starbase Player ${process.starbasePlayer.address} retains its Profile, Character, and System relationships.`),
695
- precondition(resolved.systemAccount, `Star System ${process.system.address} retains its active Starbase and validated sequence.`),
696
- ...(resolved.habAccount === undefined
697
- ? []
698
- : [
699
- precondition(resolved.habAccount, `Crafting Hab ${resolved.habAccount.address} remains active in the validated Game, Profile, System, and Starbase sequence.`),
700
- ]),
701
- precondition(resolved.characterAccount, `The canonical Character remains assigned to Profile ${options.authorization.profile} in the configured Game.`),
702
- precondition(resolved.gameAccount, `Game ${game} retains its pinned owner and account layout.`),
703
- ];
704
- return createPlan({
611
+ const { profile } = options.authorization;
612
+ requireProcessOwner(process, profile);
613
+ const resolved = await resolveProcessAccounts(ctx, process, profile, game, 'cancellation', game, 'For a Crafting Process belonging to the destroyed Starbase, use destroyCraftingProcess; do not cancel the Process.', false);
614
+ const gameAccount = requireAccount(resolved.extraAccount, game, `Configured Game ${game} is missing. Refresh the configured Game before retrying cancellation.`);
615
+ validateGameRead(gameAccount, game);
616
+ const instruction = adaptCancelCraftingProcessInstruction({
617
+ authorization: options.authorization,
618
+ character: resolved.character,
619
+ craftingProcess: process.address,
620
+ game,
621
+ recipe: process.recipe.address,
622
+ starbasePlayer: process.starbasePlayer.address,
623
+ system: process.system.address,
624
+ ...(resolved.habAddress === undefined
625
+ ? {}
626
+ : { craftingHabInstance: resolved.habAddress }),
627
+ });
628
+ // Returned inputs can reopen Starbase Player lines, which the program funds
629
+ // from the Profile vault before the closed Process refunds its rent.
630
+ const [profileAccount, rentAccount] = await readContextRawAccounts(ctx, [
631
+ profile,
632
+ RENT_ADDRESS,
633
+ ]);
634
+ const storageAccounts = new Map([
635
+ [resolved.playerAccount.address, resolved.playerAccount],
636
+ [resolved.processAccount.address, resolved.processAccount],
637
+ [profile, profileAccount],
638
+ [RENT_ADDRESS, rentAccount],
639
+ ]);
640
+ const storage = planStorageFunding({
641
+ action: readCraftingStorageAction(instruction, storageAccounts),
642
+ accounts: storageAccounts,
643
+ label: 'Crafting Process cancellation',
644
+ });
645
+ const description = `Cancel crafting ${String(process.quantityRaw)} units of ${process.recipe.name} at Starbase Player ${process.starbasePlayer.address}, returning all inputs and ${String(process.numCrew)} crew and closing the Crafting Process. ${storage.disclosure}`;
646
+ return buildPlannerPlan({
705
647
  kind: 'crafting.cancel-process',
706
- preconditions: await Promise.all(preconditions),
648
+ preconditions: [
649
+ ...(await Promise.all([
650
+ ...processPreconditions(process, resolved, profile, [
651
+ {
652
+ kind: 'starbase-system',
653
+ address: process.system.address,
654
+ game,
655
+ starbaseSequenceId: process.starbaseSequenceId,
656
+ describes: `Star System ${process.system.address} retains its canonical Game identity, active Starbase and sequence ${process.starbaseSequenceId}; unrelated shared activity may change.`,
657
+ },
658
+ ]),
659
+ accountStatePrecondition(gameAccount, `Game ${game} retains its pinned owner and account layout.`),
660
+ ])),
661
+ storage.guard,
662
+ ],
707
663
  steps: [
708
664
  {
709
665
  describes: description,
710
- instruction: adaptCancelCraftingProcessInstruction({
711
- authorization: options.authorization,
712
- character: resolved.character,
713
- craftingProcess: process.address,
714
- game,
715
- recipe: process.recipe.address,
716
- starbasePlayer: process.starbasePlayer.address,
717
- system: process.system.address,
718
- ...(resolved.habAccount === undefined
719
- ? {}
720
- : { craftingHabInstance: resolved.habAccount.address }),
721
- }),
666
+ instruction,
722
667
  signers: [options.authorization.authority],
723
668
  },
724
669
  ],
725
670
  summary: description,
726
671
  });
727
672
  }
673
+ export { getCraftingFeeRate } from './fee-rate.js';
728
674
  //# sourceMappingURL=index.js.map