@misonetwork/sdk 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/README.md +181 -124
  2. package/dist/client.d.ts +1229 -15
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +43 -21
  5. package/dist/client.js.map +1 -1
  6. package/dist/contracts/composition_credits/composition_credits.d.ts +181 -0
  7. package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -0
  8. package/dist/contracts/composition_credits/composition_credits.js +109 -0
  9. package/dist/contracts/composition_credits/composition_credits.js.map +1 -0
  10. package/dist/contracts/composition_credits/composition_party_role.d.ts +119 -0
  11. package/dist/contracts/composition_credits/composition_party_role.d.ts.map +1 -0
  12. package/dist/contracts/composition_credits/composition_party_role.js +139 -0
  13. package/dist/contracts/composition_credits/composition_party_role.js.map +1 -0
  14. package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts +24 -0
  15. package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +1 -0
  16. package/dist/contracts/composition_credits/deps/miso_credit/credit.js +23 -0
  17. package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +1 -0
  18. package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts +37 -0
  19. package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +1 -0
  20. package/dist/contracts/composition_credits/deps/sui/vec_map.js +28 -0
  21. package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +1 -0
  22. package/dist/contracts/miso/composition.d.ts +17 -39
  23. package/dist/contracts/miso/composition.d.ts.map +1 -1
  24. package/dist/contracts/miso/composition.js +18 -39
  25. package/dist/contracts/miso/composition.js.map +1 -1
  26. package/dist/contracts/miso/deps/bps/bps.d.ts +1 -1
  27. package/dist/contracts/miso/deps/bps/bps.js +1 -1
  28. package/dist/contracts/miso/recording.d.ts +44 -19
  29. package/dist/contracts/miso/recording.d.ts.map +1 -1
  30. package/dist/contracts/miso/recording.js +46 -20
  31. package/dist/contracts/miso/recording.js.map +1 -1
  32. package/dist/contracts/miso/release.d.ts +63 -37
  33. package/dist/contracts/miso/release.d.ts.map +1 -1
  34. package/dist/contracts/miso/release.js +65 -38
  35. package/dist/contracts/miso/release.js.map +1 -1
  36. package/dist/contracts/miso/track.d.ts +41 -10
  37. package/dist/contracts/miso/track.d.ts.map +1 -1
  38. package/dist/contracts/miso/track.js +44 -10
  39. package/dist/contracts/miso/track.js.map +1 -1
  40. package/dist/contracts/recording_advisory/recording_advisory.d.ts +194 -0
  41. package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -0
  42. package/dist/contracts/recording_advisory/recording_advisory.js +204 -0
  43. package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -0
  44. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +24 -0
  45. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -0
  46. package/dist/contracts/recording_credits/deps/miso_credit/credit.js +23 -0
  47. package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -0
  48. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +37 -0
  49. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -0
  50. package/dist/contracts/recording_credits/deps/sui/vec_map.js +28 -0
  51. package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -0
  52. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +21 -0
  53. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -0
  54. package/dist/contracts/recording_credits/deps/sui/vec_set.js +20 -0
  55. package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -0
  56. package/dist/contracts/recording_credits/recording_credits.d.ts +2313 -0
  57. package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -0
  58. package/dist/contracts/recording_credits/recording_credits.js +270 -0
  59. package/dist/contracts/recording_credits/recording_credits.js.map +1 -0
  60. package/dist/contracts/recording_credits/recording_party_role.d.ts +1174 -0
  61. package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -0
  62. package/dist/contracts/recording_credits/recording_party_role.js +692 -0
  63. package/dist/contracts/recording_credits/recording_party_role.js.map +1 -0
  64. package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +6 -0
  65. package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +1 -0
  66. package/dist/contracts/recording_language/deps/language_code/language_code.js +8 -0
  67. package/dist/contracts/recording_language/deps/language_code/language_code.js.map +1 -0
  68. package/dist/contracts/recording_language/recording_language.d.ts +152 -0
  69. package/dist/contracts/recording_language/recording_language.d.ts.map +1 -0
  70. package/dist/contracts/recording_language/recording_language.js +149 -0
  71. package/dist/contracts/recording_language/recording_language.js.map +1 -0
  72. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts +52 -0
  73. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts.map +1 -0
  74. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js +37 -0
  75. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js.map +1 -0
  76. package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +131 -0
  77. package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -0
  78. package/dist/contracts/recording_master_reference/recording_master_reference.js +121 -0
  79. package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -0
  80. package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts +52 -0
  81. package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts.map +1 -0
  82. package/dist/contracts/recording_preview/deps/ori/walrus_data.js +37 -0
  83. package/dist/contracts/recording_preview/deps/ori/walrus_data.js.map +1 -0
  84. package/dist/contracts/recording_preview/recording_preview.d.ts +104 -0
  85. package/dist/contracts/recording_preview/recording_preview.d.ts.map +1 -0
  86. package/dist/contracts/recording_preview/recording_preview.js +94 -0
  87. package/dist/contracts/recording_preview/recording_preview.js.map +1 -0
  88. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +52 -0
  89. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +1 -0
  90. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +37 -0
  91. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +1 -0
  92. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +46 -0
  93. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -0
  94. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +21 -0
  95. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -0
  96. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +33 -0
  97. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -0
  98. package/dist/contracts/release_cover_art/deps/per_track/per_track.js +32 -0
  99. package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -0
  100. package/dist/contracts/release_cover_art/release_cover_art.d.ts +300 -0
  101. package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -0
  102. package/dist/contracts/release_cover_art/release_cover_art.js +168 -0
  103. package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -0
  104. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +24 -0
  105. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -0
  106. package/dist/contracts/release_credits/deps/miso_credit/credit.js +23 -0
  107. package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -0
  108. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +37 -0
  109. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -0
  110. package/dist/contracts/release_credits/deps/sui/vec_map.js +28 -0
  111. package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -0
  112. package/dist/contracts/release_credits/release_credits.d.ts +142 -0
  113. package/dist/contracts/release_credits/release_credits.d.ts.map +1 -0
  114. package/dist/contracts/release_credits/release_credits.js +108 -0
  115. package/dist/contracts/release_credits/release_credits.js.map +1 -0
  116. package/dist/contracts/release_credits/release_party_role.d.ts +58 -0
  117. package/dist/contracts/release_credits/release_party_role.d.ts.map +1 -0
  118. package/dist/contracts/release_credits/release_party_role.js +66 -0
  119. package/dist/contracts/release_credits/release_party_role.js.map +1 -0
  120. package/dist/contracts/release_description/release_description.d.ts +112 -0
  121. package/dist/contracts/release_description/release_description.d.ts.map +1 -0
  122. package/dist/contracts/release_description/release_description.js +123 -0
  123. package/dist/contracts/release_description/release_description.js.map +1 -0
  124. package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +644 -0
  125. package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -0
  126. package/dist/contracts/release_dsp_link/release_dsp_link.js +556 -0
  127. package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -0
  128. package/dist/contracts/release_genre/deps/per_track/per_track.d.ts +33 -0
  129. package/dist/contracts/release_genre/deps/per_track/per_track.d.ts.map +1 -0
  130. package/dist/contracts/release_genre/deps/per_track/per_track.js +32 -0
  131. package/dist/contracts/release_genre/deps/per_track/per_track.js.map +1 -0
  132. package/dist/contracts/release_genre/release_genre.d.ts +193 -0
  133. package/dist/contracts/release_genre/release_genre.d.ts.map +1 -0
  134. package/dist/contracts/release_genre/release_genre.js +207 -0
  135. package/dist/contracts/release_genre/release_genre.js.map +1 -0
  136. package/dist/contracts/release_kind/release_kind.d.ts +98 -0
  137. package/dist/contracts/release_kind/release_kind.d.ts.map +1 -0
  138. package/dist/contracts/release_kind/release_kind.js +109 -0
  139. package/dist/contracts/release_kind/release_kind.js.map +1 -0
  140. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts +52 -0
  141. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +1 -0
  142. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +37 -0
  143. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +1 -0
  144. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +91 -0
  145. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +1 -0
  146. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +91 -0
  147. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js.map +1 -0
  148. package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +54 -0
  149. package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -0
  150. package/dist/contracts/routed_stake/deps/royalty_pool/stake.js +37 -0
  151. package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -0
  152. package/dist/contracts/routed_stake/deps/std/type_name.d.ts +18 -0
  153. package/dist/contracts/routed_stake/deps/std/type_name.d.ts.map +1 -0
  154. package/dist/contracts/routed_stake/deps/std/type_name.js +20 -0
  155. package/dist/contracts/routed_stake/deps/std/type_name.js.map +1 -0
  156. package/dist/contracts/routed_stake/deps/sui/balance.d.ts +13 -0
  157. package/dist/contracts/routed_stake/deps/sui/balance.d.ts.map +1 -0
  158. package/dist/contracts/routed_stake/deps/sui/balance.js +15 -0
  159. package/dist/contracts/routed_stake/deps/sui/balance.js.map +1 -0
  160. package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts +37 -0
  161. package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts.map +1 -0
  162. package/dist/contracts/routed_stake/deps/sui/vec_map.js +28 -0
  163. package/dist/contracts/routed_stake/deps/sui/vec_map.js.map +1 -0
  164. package/dist/contracts/routed_stake/routed_stake.d.ts +356 -0
  165. package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
  166. package/dist/contracts/routed_stake/routed_stake.js +311 -0
  167. package/dist/contracts/routed_stake/routed_stake.js.map +1 -0
  168. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +18 -0
  169. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -0
  170. package/dist/contracts/royalty_pool/deps/std/type_name.js +20 -0
  171. package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -0
  172. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +13 -0
  173. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -0
  174. package/dist/contracts/royalty_pool/deps/sui/balance.js +15 -0
  175. package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -0
  176. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +37 -0
  177. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -0
  178. package/dist/contracts/royalty_pool/deps/sui/vec_map.js +28 -0
  179. package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -0
  180. package/dist/contracts/royalty_pool/pool.d.ts +394 -0
  181. package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
  182. package/dist/contracts/royalty_pool/pool.js +387 -0
  183. package/dist/contracts/royalty_pool/pool.js.map +1 -0
  184. package/dist/contracts/royalty_pool/stake.d.ts +202 -0
  185. package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
  186. package/dist/contracts/royalty_pool/stake.js +197 -0
  187. package/dist/contracts/royalty_pool/stake.js.map +1 -0
  188. package/dist/contracts.d.ts +37 -3
  189. package/dist/contracts.d.ts.map +1 -1
  190. package/dist/contracts.js +42 -8
  191. package/dist/contracts.js.map +1 -1
  192. package/dist/deployments.d.ts +46 -12
  193. package/dist/deployments.d.ts.map +1 -1
  194. package/dist/deployments.js +119 -11
  195. package/dist/deployments.js.map +1 -1
  196. package/dist/events.d.ts +1081 -0
  197. package/dist/events.d.ts.map +1 -0
  198. package/dist/events.js +124 -0
  199. package/dist/events.js.map +1 -0
  200. package/dist/execute.d.ts.map +1 -1
  201. package/dist/execute.js +0 -4
  202. package/dist/execute.js.map +1 -1
  203. package/dist/index.d.ts +3 -0
  204. package/dist/index.d.ts.map +1 -1
  205. package/dist/index.js +6 -3
  206. package/dist/index.js.map +1 -1
  207. package/dist/internal.d.ts.map +1 -1
  208. package/dist/internal.js +2 -0
  209. package/dist/internal.js.map +1 -1
  210. package/dist/numeric.d.ts +5 -0
  211. package/dist/numeric.d.ts.map +1 -0
  212. package/dist/numeric.js +21 -0
  213. package/dist/numeric.js.map +1 -0
  214. package/dist/packages.d.ts +159 -0
  215. package/dist/packages.d.ts.map +1 -0
  216. package/dist/packages.js +179 -0
  217. package/dist/packages.js.map +1 -0
  218. package/dist/parsers.d.ts +5 -2
  219. package/dist/parsers.d.ts.map +1 -1
  220. package/dist/parsers.js +19 -7
  221. package/dist/parsers.js.map +1 -1
  222. package/dist/queries.d.ts +92 -0
  223. package/dist/queries.d.ts.map +1 -1
  224. package/dist/queries.js +132 -23
  225. package/dist/queries.js.map +1 -1
  226. package/dist/transactions.d.ts +96 -12
  227. package/dist/transactions.d.ts.map +1 -1
  228. package/dist/transactions.js +124 -14
  229. package/dist/transactions.js.map +1 -1
  230. package/dist/types.d.ts +35 -8
  231. package/dist/types.d.ts.map +1 -1
  232. package/dist/view.d.ts +6 -5
  233. package/dist/view.d.ts.map +1 -1
  234. package/dist/view.js +8 -2
  235. package/dist/view.js.map +1 -1
  236. package/package.json +14 -4
  237. package/src/client.ts +57 -25
  238. package/src/contracts/composition_credits/composition_credits.ts +169 -0
  239. package/src/contracts/composition_credits/composition_party_role.ts +189 -0
  240. package/src/contracts/composition_credits/deps/miso_credit/credit.ts +27 -0
  241. package/src/contracts/composition_credits/deps/sui/vec_map.ts +33 -0
  242. package/src/contracts/miso/composition.ts +24 -61
  243. package/src/contracts/miso/deps/bps/bps.ts +3 -3
  244. package/src/contracts/miso/recording.ts +69 -32
  245. package/src/contracts/miso/release.ts +103 -67
  246. package/src/contracts/miso/track.ts +56 -13
  247. package/src/contracts/recording_advisory/recording_advisory.ts +315 -0
  248. package/src/contracts/recording_credits/deps/miso_credit/credit.ts +27 -0
  249. package/src/contracts/recording_credits/deps/sui/vec_map.ts +33 -0
  250. package/src/contracts/recording_credits/deps/sui/vec_set.ts +21 -0
  251. package/src/contracts/recording_credits/recording_credits.ts +458 -0
  252. package/src/contracts/recording_credits/recording_party_role.ts +1041 -0
  253. package/src/contracts/recording_language/deps/language_code/language_code.ts +7 -0
  254. package/src/contracts/recording_language/recording_language.ts +237 -0
  255. package/src/contracts/recording_master_reference/deps/ori/walrus_data.ts +36 -0
  256. package/src/contracts/recording_master_reference/recording_master_reference.ts +181 -0
  257. package/src/contracts/recording_preview/deps/ori/walrus_data.ts +36 -0
  258. package/src/contracts/recording_preview/recording_preview.ts +154 -0
  259. package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +36 -0
  260. package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +23 -0
  261. package/src/contracts/release_cover_art/deps/per_track/per_track.ts +36 -0
  262. package/src/contracts/release_cover_art/release_cover_art.ts +251 -0
  263. package/src/contracts/release_credits/deps/miso_credit/credit.ts +27 -0
  264. package/src/contracts/release_credits/deps/sui/vec_map.ts +33 -0
  265. package/src/contracts/release_credits/release_credits.ts +156 -0
  266. package/src/contracts/release_credits/release_party_role.ts +87 -0
  267. package/src/contracts/release_description/release_description.ts +167 -0
  268. package/src/contracts/release_dsp_link/release_dsp_link.ts +813 -0
  269. package/src/contracts/release_genre/deps/per_track/per_track.ts +36 -0
  270. package/src/contracts/release_genre/release_genre.ts +314 -0
  271. package/src/contracts/release_kind/release_kind.ts +153 -0
  272. package/src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts +36 -0
  273. package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +124 -0
  274. package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +39 -0
  275. package/src/contracts/routed_stake/deps/std/type_name.ts +22 -0
  276. package/src/contracts/routed_stake/deps/sui/balance.ts +17 -0
  277. package/src/contracts/routed_stake/deps/sui/vec_map.ts +33 -0
  278. package/src/contracts/routed_stake/routed_stake.ts +508 -0
  279. package/src/contracts/royalty_pool/deps/std/type_name.ts +22 -0
  280. package/src/contracts/royalty_pool/deps/sui/balance.ts +17 -0
  281. package/src/contracts/royalty_pool/deps/sui/vec_map.ts +33 -0
  282. package/src/contracts/royalty_pool/pool.ts +613 -0
  283. package/src/contracts/royalty_pool/stake.ts +317 -0
  284. package/src/contracts.ts +59 -6
  285. package/src/deployments.ts +160 -22
  286. package/src/events.ts +129 -0
  287. package/src/execute.ts +0 -4
  288. package/src/index.ts +6 -3
  289. package/src/internal.ts +2 -4
  290. package/src/numeric.ts +25 -0
  291. package/src/packages.ts +251 -0
  292. package/src/parsers.ts +32 -11
  293. package/src/queries.ts +227 -25
  294. package/src/transactions.ts +255 -23
  295. package/src/types.ts +37 -9
  296. package/src/view.ts +12 -6
@@ -6,27 +6,32 @@
6
6
  /**
7
7
  * Represents a track on a release, linking a recording to its position in the
8
8
  * tracklist.
9
- *
9
+ *
10
10
  * A `Track` is the minimal positioned (recording, revenue-share) pair:
11
- *
11
+ *
12
12
  * - `recording_id` — the routing target for the track's revenue, and the handle
13
13
  * through which all other metadata (title, cover art, and the
14
14
  * recording/composition share-type identities) is reached.
15
+ * - `composition_id` — the identity of the recording's underlying work, so the
16
+ * composition–recording–release graph is walkable on-chain from the release
17
+ * alone. Move cannot chase an ID to an object, so this edge is unreachable in a
18
+ * track loop unless embedded here.
15
19
  * - `split_bps` — this track's share of the release's revenue; genuinely
16
20
  * release-specific and not derivable from the recording.
17
21
  * - `state` — the assign-once lifecycle that carries (then sheds) the recording
18
22
  * admin's target release commitment, made at creation; see `TrackState`.
19
- *
23
+ *
20
24
  * `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
21
25
  * tracks from many different recordings/compositions, so it cannot be generic over
22
- * their share types. It stores no title, cover art, or share-type — all derived
23
- * from the recording via `recording_id`.
26
+ * their share types. It stores no title, cover art, or share-type — those are
27
+ * consumed off-chain and derived from the recording via `recording_id`; a `Track`
28
+ * embeds exactly the facts on-chain consumers cannot reach any other way.
24
29
  */
25
30
 
26
- import { MoveEnum, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
31
+ import { MoveEnum, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
27
32
  import { bcs } from '@mysten/sui/bcs';
28
33
  import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
29
- import * as bps from './deps/bps/bps.js';
34
+ import * as bps from './deps/bps/bps.ts';
30
35
  const $moduleName = '@local-pkg/miso::track';
31
36
  /**
32
37
  * Lifecycle state of a track within a release. A track is born `Unassigned`,
@@ -48,6 +53,14 @@ export const TrackState = new MoveEnum({ name: `${$moduleName}::TrackState`, fie
48
53
  export const Track = new MoveStruct({ name: `${$moduleName}::Track`, fields: {
49
54
  /** Current state of the track. */
50
55
  state: TrackState,
56
+ /**
57
+ * ID of the composition underlying this track's recording. An identity and
58
+ * membership handle — NOT a revenue routing target: the composition is paid
59
+ * through its recording-share ownership (settled at `recording::new`), so a track
60
+ * routes its full split to the recording. Immutable and safe to denormalize: the
61
+ * recording↔composition pairing is fixed at recording creation.
62
+ */
63
+ composition_id: bcs.Address,
51
64
  /**
52
65
  * ID of the recording on this track. The routing target for the track's revenue;
53
66
  * also the handle a consumer uses to fetch the recording (whose type carries the
@@ -89,9 +102,10 @@ export interface NewOptions {
89
102
  * would be unable to distinguish pending from dead. Pre-publish observability is
90
103
  * the responsibility of whatever wraps the track (see below).
91
104
  *
92
- * The composition is identified by the recording's `CompositionShare` phantom, so
93
- * the recording↔composition pairing is compile-time enforced there is no
94
- * `Composition` argument and no runtime ID check.
105
+ * The recording↔composition pairing is compile-time enforced by the recording's
106
+ * `CompositionShare` phantom, and its address-level counterpart is embedded on the
107
+ * recording at creation so the composition id is copied from the `&Recording`
108
+ * argument with no `Composition` argument and no runtime check needed.
95
109
  *
96
110
  * ### What creating a track consents to
97
111
  *
@@ -115,9 +129,10 @@ export interface NewOptions {
115
129
  * encodes — visible in its type, not in core.
116
130
  *
117
131
  * `recording` compile-time-binds the `RecordingShare`/`CompositionShare` phantom
118
- * pairing, and is read for its id: the monomorphic `Track` must store the
119
- * recording's _address_ for revenue routing, and an address cannot come from a
120
- * phantom.
132
+ * pairing, and is read for its own id and its embedded composition id: the
133
+ * monomorphic `Track` must store both _addresses_ the recording's for revenue
134
+ * routing, the composition's for graph reachability — and an address cannot come
135
+ * from a phantom.
121
136
  */
122
137
  export function _new(options: NewOptions) {
123
138
  const packageAddress = options.package ?? '@local-pkg/miso';
@@ -159,6 +174,34 @@ export function recordingId(options: RecordingIdOptions) {
159
174
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
160
175
  });
161
176
  }
177
+ export interface CompositionIdArguments {
178
+ self: TransactionArgument;
179
+ }
180
+ export interface CompositionIdOptions {
181
+ package?: string;
182
+ arguments: CompositionIdArguments | [
183
+ self: TransactionArgument
184
+ ];
185
+ }
186
+ /**
187
+ * Returns the ID of the composition underlying this track's recording. An
188
+ * identity/membership handle (e.g. "is this composition on this release?") — not a
189
+ * revenue routing target: the composition is paid via its recording-share
190
+ * ownership, and a track routes its full split to the recording.
191
+ */
192
+ export function compositionId(options: CompositionIdOptions) {
193
+ const packageAddress = options.package ?? '@local-pkg/miso';
194
+ const argumentsTypes = [
195
+ null
196
+ ] satisfies (string | null)[];
197
+ const parameterNames = ["self"];
198
+ return (tx: Transaction) => tx.moveCall({
199
+ package: packageAddress,
200
+ module: 'track',
201
+ function: 'composition_id',
202
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
203
+ });
204
+ }
162
205
  export interface SplitBpsArguments {
163
206
  self: TransactionArgument;
164
207
  }
@@ -0,0 +1,315 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+
5
+
6
+ /**
7
+ * The parental advisory rating for a recording — whether its lyrics are explicit —
8
+ * stored as a dynamic field on the recording's UID and written through its
9
+ * cap-gated `uid_mut`.
10
+ *
11
+ * This is its own package on purpose. Advisory ratings are set by a different
12
+ * person, at a different time, for entirely different reasons than the other facts
13
+ * about a recording, and the standard that governs them moves on its own schedule.
14
+ * Bundling it into a general "recording metadata" object would mean that revising
15
+ * the advisory standard drags every unrelated field through the migration. Kept
16
+ * separate, a consumer implementing some future metadata profile selects this
17
+ * extension or ignores it, and swapping it touches nothing else.
18
+ *
19
+ * The rating is deliberately not a boolean. Every distributor and storefront
20
+ * distinguishes a _cleaned_ edit — an explicit recording re-issued with the
21
+ * offending content removed — from a recording that was never explicit at all.
22
+ * They are merchandised differently and a boolean cannot express the difference,
23
+ * so `Cleaned` is a first-class variant.
24
+ *
25
+ * Attaching the extension IS the statement. There is no "attached but undeclared"
26
+ * state: if a rating is present it has been asserted by the rights holder, and a
27
+ * recording with nothing attached has simply said nothing.
28
+ */
29
+
30
+ import { MoveTuple, MoveEnum, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
31
+ import { bcs } from '@mysten/sui/bcs';
32
+ import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
33
+ const $moduleName = '@local-pkg/recording_advisory::recording_advisory';
34
+ export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
35
+ /** A recording's parental advisory rating. */
36
+ export const ExplicitRating = new MoveEnum({ name: `${$moduleName}::ExplicitRating`, fields: {
37
+ /** Contains explicit content. */
38
+ Explicit: null,
39
+ /** Contains no explicit content, and never did. */
40
+ NotExplicit: null,
41
+ /** An edited version of a recording that was originally explicit. */
42
+ Cleaned: null
43
+ } });
44
+ export const AdvisoryRatingSetEvent = new MoveStruct({ name: `${$moduleName}::AdvisoryRatingSetEvent`, fields: {
45
+ recording_id: bcs.Address,
46
+ rating: ExplicitRating
47
+ } });
48
+ export const AdvisoryRatingUnsetEvent = new MoveStruct({ name: `${$moduleName}::AdvisoryRatingUnsetEvent`, fields: {
49
+ recording_id: bcs.Address
50
+ } });
51
+ export interface ExplicitOptions {
52
+ package?: string;
53
+ arguments?: [
54
+ ];
55
+ }
56
+ /** Contains explicit content. */
57
+ export function explicit(options: ExplicitOptions = {}) {
58
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
59
+ return (tx: Transaction) => tx.moveCall({
60
+ package: packageAddress,
61
+ module: 'recording_advisory',
62
+ function: 'explicit',
63
+ });
64
+ }
65
+ export interface NotExplicitOptions {
66
+ package?: string;
67
+ arguments?: [
68
+ ];
69
+ }
70
+ /** Contains no explicit content, and never did. */
71
+ export function notExplicit(options: NotExplicitOptions = {}) {
72
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
73
+ return (tx: Transaction) => tx.moveCall({
74
+ package: packageAddress,
75
+ module: 'recording_advisory',
76
+ function: 'not_explicit',
77
+ });
78
+ }
79
+ export interface CleanedOptions {
80
+ package?: string;
81
+ arguments?: [
82
+ ];
83
+ }
84
+ /** An edited version of a recording that was originally explicit. */
85
+ export function cleaned(options: CleanedOptions = {}) {
86
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
87
+ return (tx: Transaction) => tx.moveCall({
88
+ package: packageAddress,
89
+ module: 'recording_advisory',
90
+ function: 'cleaned',
91
+ });
92
+ }
93
+ export interface SetRatingArguments {
94
+ self: RawTransactionArgument<string>;
95
+ cap: RawTransactionArgument<string>;
96
+ rating: TransactionArgument;
97
+ }
98
+ export interface SetRatingOptions {
99
+ package?: string;
100
+ arguments: SetRatingArguments | [
101
+ self: RawTransactionArgument<string>,
102
+ cap: RawTransactionArgument<string>,
103
+ rating: TransactionArgument
104
+ ];
105
+ typeArguments: [
106
+ string,
107
+ string
108
+ ];
109
+ }
110
+ /** Sets (or replaces) the recording's advisory rating. */
111
+ export function setRating(options: SetRatingOptions) {
112
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
113
+ const argumentsTypes = [
114
+ null,
115
+ null,
116
+ null
117
+ ] satisfies (string | null)[];
118
+ const parameterNames = ["self", "cap", "rating"];
119
+ return (tx: Transaction) => tx.moveCall({
120
+ package: packageAddress,
121
+ module: 'recording_advisory',
122
+ function: 'set_rating',
123
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
124
+ typeArguments: options.typeArguments
125
+ });
126
+ }
127
+ export interface UnsetRatingArguments {
128
+ self: RawTransactionArgument<string>;
129
+ cap: RawTransactionArgument<string>;
130
+ }
131
+ export interface UnsetRatingOptions {
132
+ package?: string;
133
+ arguments: UnsetRatingArguments | [
134
+ self: RawTransactionArgument<string>,
135
+ cap: RawTransactionArgument<string>
136
+ ];
137
+ typeArguments: [
138
+ string,
139
+ string
140
+ ];
141
+ }
142
+ /**
143
+ * Removes the rating, if any. Idempotent — the recording is left having said
144
+ * nothing about its content, which is distinct from asserting `NotExplicit`.
145
+ */
146
+ export function unsetRating(options: UnsetRatingOptions) {
147
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
148
+ const argumentsTypes = [
149
+ null,
150
+ null
151
+ ] satisfies (string | null)[];
152
+ const parameterNames = ["self", "cap"];
153
+ return (tx: Transaction) => tx.moveCall({
154
+ package: packageAddress,
155
+ module: 'recording_advisory',
156
+ function: 'unset_rating',
157
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
158
+ typeArguments: options.typeArguments
159
+ });
160
+ }
161
+ export interface HasRatingArguments {
162
+ self: RawTransactionArgument<string>;
163
+ }
164
+ export interface HasRatingOptions {
165
+ package?: string;
166
+ arguments: HasRatingArguments | [
167
+ self: RawTransactionArgument<string>
168
+ ];
169
+ typeArguments: [
170
+ string,
171
+ string
172
+ ];
173
+ }
174
+ /** Whether an advisory rating is attached to this recording. */
175
+ export function hasRating(options: HasRatingOptions) {
176
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
177
+ const argumentsTypes = [
178
+ null
179
+ ] satisfies (string | null)[];
180
+ const parameterNames = ["self"];
181
+ return (tx: Transaction) => tx.moveCall({
182
+ package: packageAddress,
183
+ module: 'recording_advisory',
184
+ function: 'has_rating',
185
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
186
+ typeArguments: options.typeArguments
187
+ });
188
+ }
189
+ export interface RatingArguments {
190
+ self: RawTransactionArgument<string>;
191
+ }
192
+ export interface RatingOptions {
193
+ package?: string;
194
+ arguments: RatingArguments | [
195
+ self: RawTransactionArgument<string>
196
+ ];
197
+ typeArguments: [
198
+ string,
199
+ string
200
+ ];
201
+ }
202
+ /**
203
+ * The recording's advisory rating. Aborts if none is attached — callers that
204
+ * tolerate an unrated recording should check `has_rating` first, since absence is
205
+ * a meaningful state and must not be silently read as `NotExplicit`.
206
+ */
207
+ export function rating(options: RatingOptions) {
208
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
209
+ const argumentsTypes = [
210
+ null
211
+ ] satisfies (string | null)[];
212
+ const parameterNames = ["self"];
213
+ return (tx: Transaction) => tx.moveCall({
214
+ package: packageAddress,
215
+ module: 'recording_advisory',
216
+ function: 'rating',
217
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
218
+ typeArguments: options.typeArguments
219
+ });
220
+ }
221
+ export interface IsExplicitArguments {
222
+ self: TransactionArgument;
223
+ }
224
+ export interface IsExplicitOptions {
225
+ package?: string;
226
+ arguments: IsExplicitArguments | [
227
+ self: TransactionArgument
228
+ ];
229
+ }
230
+ /** Whether the recording contains explicit content. */
231
+ export function isExplicit(options: IsExplicitOptions) {
232
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
233
+ const argumentsTypes = [
234
+ null
235
+ ] satisfies (string | null)[];
236
+ const parameterNames = ["self"];
237
+ return (tx: Transaction) => tx.moveCall({
238
+ package: packageAddress,
239
+ module: 'recording_advisory',
240
+ function: 'is_explicit',
241
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
242
+ });
243
+ }
244
+ export interface IsNotExplicitArguments {
245
+ self: TransactionArgument;
246
+ }
247
+ export interface IsNotExplicitOptions {
248
+ package?: string;
249
+ arguments: IsNotExplicitArguments | [
250
+ self: TransactionArgument
251
+ ];
252
+ }
253
+ /** Whether the recording contains no explicit content and never did. */
254
+ export function isNotExplicit(options: IsNotExplicitOptions) {
255
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
256
+ const argumentsTypes = [
257
+ null
258
+ ] satisfies (string | null)[];
259
+ const parameterNames = ["self"];
260
+ return (tx: Transaction) => tx.moveCall({
261
+ package: packageAddress,
262
+ module: 'recording_advisory',
263
+ function: 'is_not_explicit',
264
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
265
+ });
266
+ }
267
+ export interface IsCleanedArguments {
268
+ self: TransactionArgument;
269
+ }
270
+ export interface IsCleanedOptions {
271
+ package?: string;
272
+ arguments: IsCleanedArguments | [
273
+ self: TransactionArgument
274
+ ];
275
+ }
276
+ /** Whether the recording is an edited version of an originally explicit one. */
277
+ export function isCleaned(options: IsCleanedOptions) {
278
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
279
+ const argumentsTypes = [
280
+ null
281
+ ] satisfies (string | null)[];
282
+ const parameterNames = ["self"];
283
+ return (tx: Transaction) => tx.moveCall({
284
+ package: packageAddress,
285
+ module: 'recording_advisory',
286
+ function: 'is_cleaned',
287
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
288
+ });
289
+ }
290
+ export interface NameArguments {
291
+ self: TransactionArgument;
292
+ }
293
+ export interface NameOptions {
294
+ package?: string;
295
+ arguments: NameArguments | [
296
+ self: TransactionArgument
297
+ ];
298
+ }
299
+ /**
300
+ * The rating's canonical name, for clients and indexers that need a stable string
301
+ * rather than a Move value.
302
+ */
303
+ export function name(options: NameOptions) {
304
+ const packageAddress = options.package ?? '@local-pkg/recording_advisory';
305
+ const argumentsTypes = [
306
+ null
307
+ ] satisfies (string | null)[];
308
+ const parameterNames = ["self"];
309
+ return (tx: Transaction) => tx.moveCall({
310
+ package: packageAddress,
311
+ module: 'recording_advisory',
312
+ function: 'name',
313
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
314
+ });
315
+ }
@@ -0,0 +1,27 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+
5
+
6
+ /**
7
+ * Represents a party's credit on a work or activity. A credit pairs a display name
8
+ * with one or more roles, identifying how a party contributed to the work.
9
+ */
10
+
11
+ import { type BcsType, bcs } from '@mysten/sui/bcs';
12
+ import { MoveStruct } from '../../../utils/index.ts';
13
+ const $moduleName = 'miso_credit::credit';
14
+ /**
15
+ * A credit attributing roles to a party on a work. Generic over the role type to
16
+ * support domain-specific roles.
17
+ */
18
+ export function Credit<Role extends BcsType<any>>(...typeParameters: [
19
+ Role
20
+ ]) {
21
+ return new MoveStruct({ name: `${$moduleName}::Credit<${typeParameters[0].name as Role['name']}>`, fields: {
22
+ /** Human-readable name to display for this credit. */
23
+ display_name: bcs.string(),
24
+ /** Roles assigned to the credited party. */
25
+ roles: bcs.vector(typeParameters[0])
26
+ } });
27
+ }
@@ -0,0 +1,33 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { type BcsType, bcs } from '@mysten/sui/bcs';
5
+ import { MoveStruct } from '../../../utils/index.ts';
6
+ const $moduleName = '0x2::vec_map';
7
+ /** An entry in the map */
8
+ export function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
9
+ K,
10
+ V
11
+ ]) {
12
+ return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
13
+ key: typeParameters[0],
14
+ value: typeParameters[1]
15
+ } });
16
+ }
17
+ /**
18
+ * A map data structure backed by a vector. The map is guaranteed not to contain
19
+ * duplicate keys, but entries are _not_ sorted by key--entries are included in
20
+ * insertion order. All operations are O(N) in the size of the map--the intention
21
+ * of this data structure is only to provide the convenience of programming against
22
+ * a map API. Large maps should use handwritten parent/child relationships instead.
23
+ * Maps that need sorted iteration rather than insertion order iteration should
24
+ * also be handwritten.
25
+ */
26
+ export function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
27
+ K,
28
+ V
29
+ ]) {
30
+ return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
31
+ contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
32
+ } });
33
+ }
@@ -0,0 +1,21 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { type BcsType, bcs } from '@mysten/sui/bcs';
5
+ import { MoveStruct } from '../../../utils/index.ts';
6
+ const $moduleName = '0x2::vec_set';
7
+ /**
8
+ * A set data structure backed by a vector. The set is guaranteed not to contain
9
+ * duplicate keys. All operations are O(N) in the size of the set
10
+ *
11
+ * - the intention of this data structure is only to provide the convenience of
12
+ * programming against a set API. Sets that need sorted iteration rather than
13
+ * insertion order iteration should be handwritten.
14
+ */
15
+ export function VecSet<K extends BcsType<any>>(...typeParameters: [
16
+ K
17
+ ]) {
18
+ return new MoveStruct({ name: `${$moduleName}::VecSet<${typeParameters[0].name as K['name']}>`, fields: {
19
+ contents: bcs.vector(typeParameters[0])
20
+ } });
21
+ }