@misonetwork/sdk 0.7.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 (289) hide show
  1. package/README.md +181 -139
  2. package/dist/client.d.ts +1225 -8
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +43 -19
  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 +1 -1
  23. package/dist/contracts/miso/composition.js +2 -2
  24. package/dist/contracts/miso/deps/bps/bps.d.ts +1 -1
  25. package/dist/contracts/miso/deps/bps/bps.js +1 -1
  26. package/dist/contracts/miso/recording.d.ts +1 -1
  27. package/dist/contracts/miso/recording.js +1 -1
  28. package/dist/contracts/miso/release.d.ts +61 -37
  29. package/dist/contracts/miso/release.d.ts.map +1 -1
  30. package/dist/contracts/miso/release.js +65 -38
  31. package/dist/contracts/miso/release.js.map +1 -1
  32. package/dist/contracts/miso/track.d.ts +2 -2
  33. package/dist/contracts/miso/track.js +2 -2
  34. package/dist/contracts/recording_advisory/recording_advisory.d.ts +194 -0
  35. package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -0
  36. package/dist/contracts/recording_advisory/recording_advisory.js +204 -0
  37. package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -0
  38. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +24 -0
  39. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -0
  40. package/dist/contracts/recording_credits/deps/miso_credit/credit.js +23 -0
  41. package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -0
  42. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +37 -0
  43. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -0
  44. package/dist/contracts/recording_credits/deps/sui/vec_map.js +28 -0
  45. package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -0
  46. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +21 -0
  47. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -0
  48. package/dist/contracts/recording_credits/deps/sui/vec_set.js +20 -0
  49. package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -0
  50. package/dist/contracts/recording_credits/recording_credits.d.ts +2313 -0
  51. package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -0
  52. package/dist/contracts/recording_credits/recording_credits.js +270 -0
  53. package/dist/contracts/recording_credits/recording_credits.js.map +1 -0
  54. package/dist/contracts/recording_credits/recording_party_role.d.ts +1174 -0
  55. package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -0
  56. package/dist/contracts/recording_credits/recording_party_role.js +692 -0
  57. package/dist/contracts/recording_credits/recording_party_role.js.map +1 -0
  58. package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +6 -0
  59. package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +1 -0
  60. package/dist/contracts/recording_language/deps/language_code/language_code.js +8 -0
  61. package/dist/contracts/recording_language/deps/language_code/language_code.js.map +1 -0
  62. package/dist/contracts/recording_language/recording_language.d.ts +152 -0
  63. package/dist/contracts/recording_language/recording_language.d.ts.map +1 -0
  64. package/dist/contracts/recording_language/recording_language.js +149 -0
  65. package/dist/contracts/recording_language/recording_language.js.map +1 -0
  66. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts +52 -0
  67. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts.map +1 -0
  68. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js +37 -0
  69. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js.map +1 -0
  70. package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +131 -0
  71. package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -0
  72. package/dist/contracts/recording_master_reference/recording_master_reference.js +121 -0
  73. package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -0
  74. package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts +52 -0
  75. package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts.map +1 -0
  76. package/dist/contracts/recording_preview/deps/ori/walrus_data.js +37 -0
  77. package/dist/contracts/recording_preview/deps/ori/walrus_data.js.map +1 -0
  78. package/dist/contracts/recording_preview/recording_preview.d.ts +104 -0
  79. package/dist/contracts/recording_preview/recording_preview.d.ts.map +1 -0
  80. package/dist/contracts/recording_preview/recording_preview.js +94 -0
  81. package/dist/contracts/recording_preview/recording_preview.js.map +1 -0
  82. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +52 -0
  83. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +1 -0
  84. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +37 -0
  85. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +1 -0
  86. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +46 -0
  87. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -0
  88. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +21 -0
  89. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -0
  90. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +33 -0
  91. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -0
  92. package/dist/contracts/release_cover_art/deps/per_track/per_track.js +32 -0
  93. package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -0
  94. package/dist/contracts/release_cover_art/release_cover_art.d.ts +300 -0
  95. package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -0
  96. package/dist/contracts/release_cover_art/release_cover_art.js +168 -0
  97. package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -0
  98. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +24 -0
  99. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -0
  100. package/dist/contracts/release_credits/deps/miso_credit/credit.js +23 -0
  101. package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -0
  102. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +37 -0
  103. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -0
  104. package/dist/contracts/release_credits/deps/sui/vec_map.js +28 -0
  105. package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -0
  106. package/dist/contracts/release_credits/release_credits.d.ts +142 -0
  107. package/dist/contracts/release_credits/release_credits.d.ts.map +1 -0
  108. package/dist/contracts/release_credits/release_credits.js +108 -0
  109. package/dist/contracts/release_credits/release_credits.js.map +1 -0
  110. package/dist/contracts/release_credits/release_party_role.d.ts +58 -0
  111. package/dist/contracts/release_credits/release_party_role.d.ts.map +1 -0
  112. package/dist/contracts/release_credits/release_party_role.js +66 -0
  113. package/dist/contracts/release_credits/release_party_role.js.map +1 -0
  114. package/dist/contracts/release_description/release_description.d.ts +112 -0
  115. package/dist/contracts/release_description/release_description.d.ts.map +1 -0
  116. package/dist/contracts/release_description/release_description.js +123 -0
  117. package/dist/contracts/release_description/release_description.js.map +1 -0
  118. package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +644 -0
  119. package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -0
  120. package/dist/contracts/release_dsp_link/release_dsp_link.js +556 -0
  121. package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -0
  122. package/dist/contracts/release_genre/deps/per_track/per_track.d.ts +33 -0
  123. package/dist/contracts/release_genre/deps/per_track/per_track.d.ts.map +1 -0
  124. package/dist/contracts/release_genre/deps/per_track/per_track.js +32 -0
  125. package/dist/contracts/release_genre/deps/per_track/per_track.js.map +1 -0
  126. package/dist/contracts/release_genre/release_genre.d.ts +193 -0
  127. package/dist/contracts/release_genre/release_genre.d.ts.map +1 -0
  128. package/dist/contracts/release_genre/release_genre.js +207 -0
  129. package/dist/contracts/release_genre/release_genre.js.map +1 -0
  130. package/dist/contracts/release_kind/release_kind.d.ts +98 -0
  131. package/dist/contracts/release_kind/release_kind.d.ts.map +1 -0
  132. package/dist/contracts/release_kind/release_kind.js +109 -0
  133. package/dist/contracts/release_kind/release_kind.js.map +1 -0
  134. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts +52 -0
  135. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +1 -0
  136. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +37 -0
  137. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +1 -0
  138. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +91 -0
  139. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +1 -0
  140. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +91 -0
  141. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js.map +1 -0
  142. package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +54 -0
  143. package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -0
  144. package/dist/contracts/routed_stake/deps/royalty_pool/stake.js +37 -0
  145. package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -0
  146. package/dist/contracts/routed_stake/deps/std/type_name.d.ts +18 -0
  147. package/dist/contracts/routed_stake/deps/std/type_name.d.ts.map +1 -0
  148. package/dist/contracts/routed_stake/deps/std/type_name.js +20 -0
  149. package/dist/contracts/routed_stake/deps/std/type_name.js.map +1 -0
  150. package/dist/contracts/routed_stake/deps/sui/balance.d.ts +13 -0
  151. package/dist/contracts/routed_stake/deps/sui/balance.d.ts.map +1 -0
  152. package/dist/contracts/routed_stake/deps/sui/balance.js +15 -0
  153. package/dist/contracts/routed_stake/deps/sui/balance.js.map +1 -0
  154. package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts +37 -0
  155. package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts.map +1 -0
  156. package/dist/contracts/routed_stake/deps/sui/vec_map.js +28 -0
  157. package/dist/contracts/routed_stake/deps/sui/vec_map.js.map +1 -0
  158. package/dist/contracts/routed_stake/routed_stake.d.ts +356 -0
  159. package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
  160. package/dist/contracts/routed_stake/routed_stake.js +311 -0
  161. package/dist/contracts/routed_stake/routed_stake.js.map +1 -0
  162. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +18 -0
  163. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -0
  164. package/dist/contracts/royalty_pool/deps/std/type_name.js +20 -0
  165. package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -0
  166. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +13 -0
  167. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -0
  168. package/dist/contracts/royalty_pool/deps/sui/balance.js +15 -0
  169. package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -0
  170. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +37 -0
  171. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -0
  172. package/dist/contracts/royalty_pool/deps/sui/vec_map.js +28 -0
  173. package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -0
  174. package/dist/contracts/royalty_pool/pool.d.ts +394 -0
  175. package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
  176. package/dist/contracts/royalty_pool/pool.js +387 -0
  177. package/dist/contracts/royalty_pool/pool.js.map +1 -0
  178. package/dist/contracts/royalty_pool/stake.d.ts +202 -0
  179. package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
  180. package/dist/contracts/royalty_pool/stake.js +197 -0
  181. package/dist/contracts/royalty_pool/stake.js.map +1 -0
  182. package/dist/contracts.d.ts +37 -3
  183. package/dist/contracts.d.ts.map +1 -1
  184. package/dist/contracts.js +42 -8
  185. package/dist/contracts.js.map +1 -1
  186. package/dist/deployments.d.ts +46 -12
  187. package/dist/deployments.d.ts.map +1 -1
  188. package/dist/deployments.js +119 -11
  189. package/dist/deployments.js.map +1 -1
  190. package/dist/events.d.ts +1081 -0
  191. package/dist/events.d.ts.map +1 -0
  192. package/dist/events.js +124 -0
  193. package/dist/events.js.map +1 -0
  194. package/dist/execute.d.ts.map +1 -1
  195. package/dist/execute.js +0 -4
  196. package/dist/execute.js.map +1 -1
  197. package/dist/index.d.ts +3 -0
  198. package/dist/index.d.ts.map +1 -1
  199. package/dist/index.js +6 -3
  200. package/dist/index.js.map +1 -1
  201. package/dist/internal.d.ts.map +1 -1
  202. package/dist/internal.js.map +1 -1
  203. package/dist/numeric.d.ts +5 -0
  204. package/dist/numeric.d.ts.map +1 -0
  205. package/dist/numeric.js +21 -0
  206. package/dist/numeric.js.map +1 -0
  207. package/dist/packages.d.ts +159 -0
  208. package/dist/packages.d.ts.map +1 -0
  209. package/dist/packages.js +179 -0
  210. package/dist/packages.js.map +1 -0
  211. package/dist/parsers.d.ts +5 -1
  212. package/dist/parsers.d.ts.map +1 -1
  213. package/dist/parsers.js +18 -2
  214. package/dist/parsers.js.map +1 -1
  215. package/dist/queries.d.ts +92 -0
  216. package/dist/queries.d.ts.map +1 -1
  217. package/dist/queries.js +132 -23
  218. package/dist/queries.js.map +1 -1
  219. package/dist/transactions.d.ts +96 -3
  220. package/dist/transactions.d.ts.map +1 -1
  221. package/dist/transactions.js +123 -11
  222. package/dist/transactions.js.map +1 -1
  223. package/dist/types.d.ts +18 -0
  224. package/dist/types.d.ts.map +1 -1
  225. package/dist/view.d.ts +6 -5
  226. package/dist/view.d.ts.map +1 -1
  227. package/dist/view.js +8 -2
  228. package/dist/view.js.map +1 -1
  229. package/package.json +14 -4
  230. package/src/client.ts +57 -23
  231. package/src/contracts/composition_credits/composition_credits.ts +169 -0
  232. package/src/contracts/composition_credits/composition_party_role.ts +189 -0
  233. package/src/contracts/composition_credits/deps/miso_credit/credit.ts +27 -0
  234. package/src/contracts/composition_credits/deps/sui/vec_map.ts +33 -0
  235. package/src/contracts/miso/composition.ts +8 -8
  236. package/src/contracts/miso/deps/bps/bps.ts +3 -3
  237. package/src/contracts/miso/recording.ts +10 -10
  238. package/src/contracts/miso/release.ts +103 -67
  239. package/src/contracts/miso/track.ts +5 -5
  240. package/src/contracts/recording_advisory/recording_advisory.ts +315 -0
  241. package/src/contracts/recording_credits/deps/miso_credit/credit.ts +27 -0
  242. package/src/contracts/recording_credits/deps/sui/vec_map.ts +33 -0
  243. package/src/contracts/recording_credits/deps/sui/vec_set.ts +21 -0
  244. package/src/contracts/recording_credits/recording_credits.ts +458 -0
  245. package/src/contracts/recording_credits/recording_party_role.ts +1041 -0
  246. package/src/contracts/recording_language/deps/language_code/language_code.ts +7 -0
  247. package/src/contracts/recording_language/recording_language.ts +237 -0
  248. package/src/contracts/recording_master_reference/deps/ori/walrus_data.ts +36 -0
  249. package/src/contracts/recording_master_reference/recording_master_reference.ts +181 -0
  250. package/src/contracts/recording_preview/deps/ori/walrus_data.ts +36 -0
  251. package/src/contracts/recording_preview/recording_preview.ts +154 -0
  252. package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +36 -0
  253. package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +23 -0
  254. package/src/contracts/release_cover_art/deps/per_track/per_track.ts +36 -0
  255. package/src/contracts/release_cover_art/release_cover_art.ts +251 -0
  256. package/src/contracts/release_credits/deps/miso_credit/credit.ts +27 -0
  257. package/src/contracts/release_credits/deps/sui/vec_map.ts +33 -0
  258. package/src/contracts/release_credits/release_credits.ts +156 -0
  259. package/src/contracts/release_credits/release_party_role.ts +87 -0
  260. package/src/contracts/release_description/release_description.ts +167 -0
  261. package/src/contracts/release_dsp_link/release_dsp_link.ts +813 -0
  262. package/src/contracts/release_genre/deps/per_track/per_track.ts +36 -0
  263. package/src/contracts/release_genre/release_genre.ts +314 -0
  264. package/src/contracts/release_kind/release_kind.ts +153 -0
  265. package/src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts +36 -0
  266. package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +124 -0
  267. package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +39 -0
  268. package/src/contracts/routed_stake/deps/std/type_name.ts +22 -0
  269. package/src/contracts/routed_stake/deps/sui/balance.ts +17 -0
  270. package/src/contracts/routed_stake/deps/sui/vec_map.ts +33 -0
  271. package/src/contracts/routed_stake/routed_stake.ts +508 -0
  272. package/src/contracts/royalty_pool/deps/std/type_name.ts +22 -0
  273. package/src/contracts/royalty_pool/deps/sui/balance.ts +17 -0
  274. package/src/contracts/royalty_pool/deps/sui/vec_map.ts +33 -0
  275. package/src/contracts/royalty_pool/pool.ts +613 -0
  276. package/src/contracts/royalty_pool/stake.ts +317 -0
  277. package/src/contracts.ts +59 -6
  278. package/src/deployments.ts +160 -22
  279. package/src/events.ts +129 -0
  280. package/src/execute.ts +0 -4
  281. package/src/index.ts +6 -3
  282. package/src/internal.ts +0 -4
  283. package/src/numeric.ts +25 -0
  284. package/src/packages.ts +251 -0
  285. package/src/parsers.ts +32 -2
  286. package/src/queries.ts +227 -25
  287. package/src/transactions.ts +254 -12
  288. package/src/types.ts +20 -0
  289. package/src/view.ts +12 -6
@@ -0,0 +1,7 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveTuple } from '../../../utils/index.ts';
5
+ import { bcs } from '@mysten/sui/bcs';
6
+ const $moduleName = 'language_code::language_code';
7
+ export const LanguageCode = new MoveTuple({ name: `${$moduleName}::LanguageCode`, fields: [bcs.string()] });
@@ -0,0 +1,237 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+
5
+
6
+ /**
7
+ * The languages sung or spoken on a recording, stored as a dynamic field on the
8
+ * recording's UID and written through its cap-gated `uid_mut`.
9
+ *
10
+ * Its own package, for the same reason the advisory rating is: language is set by
11
+ * different people, at different times, and governed by a standard (ISO 639) that
12
+ * has nothing to do with any other fact about the recording. A consumer
13
+ * implementing a metadata profile picks this extension up or leaves it, and
14
+ * replacing it never disturbs anything else attached to the work.
15
+ *
16
+ * A `vector`, not a single code — bilingual and code-switching recordings are
17
+ * ordinary, and forcing one language would mean choosing which of them to erase.
18
+ * Order is the caller's: first is conventionally the predominant one.
19
+ *
20
+ * **An empty vector means instrumental** — attached, and asserting there is no
21
+ * sung or spoken content at all. That is a genuine claim about the recording and
22
+ * is deliberately distinct from attaching nothing, which says only that nobody has
23
+ * looked. `set_instrumental` exists so that claim reads as intent at the call site
24
+ * rather than as an empty argument someone might mistake for an oversight.
25
+ *
26
+ * `LanguageCode` is a valid ISO 639-1 code by construction, so this package checks
27
+ * only what construction cannot: how many, and whether any repeat.
28
+ */
29
+
30
+ import { MoveTuple, 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
+ import * as language_code from './deps/language_code/language_code.ts';
34
+ const $moduleName = '@local-pkg/recording_language::recording_language';
35
+ export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
36
+ export const LanguagesSetEvent = new MoveStruct({ name: `${$moduleName}::LanguagesSetEvent`, fields: {
37
+ recording_id: bcs.Address,
38
+ languages: bcs.vector(language_code.LanguageCode)
39
+ } });
40
+ export const LanguagesUnsetEvent = new MoveStruct({ name: `${$moduleName}::LanguagesUnsetEvent`, fields: {
41
+ recording_id: bcs.Address
42
+ } });
43
+ export interface SetLanguagesArguments {
44
+ self: RawTransactionArgument<string>;
45
+ cap: RawTransactionArgument<string>;
46
+ languages: TransactionArgument;
47
+ }
48
+ export interface SetLanguagesOptions {
49
+ package?: string;
50
+ arguments: SetLanguagesArguments | [
51
+ self: RawTransactionArgument<string>,
52
+ cap: RawTransactionArgument<string>,
53
+ languages: TransactionArgument
54
+ ];
55
+ typeArguments: [
56
+ string,
57
+ string
58
+ ];
59
+ }
60
+ /**
61
+ * Sets (or replaces) the languages sung or spoken on the recording.
62
+ *
63
+ * Passing an empty vector asserts the recording is instrumental; prefer
64
+ * `set_instrumental`, which says so at the call site.
65
+ */
66
+ export function setLanguages(options: SetLanguagesOptions) {
67
+ const packageAddress = options.package ?? '@local-pkg/recording_language';
68
+ const argumentsTypes = [
69
+ null,
70
+ null,
71
+ 'vector<null>'
72
+ ] satisfies (string | null)[];
73
+ const parameterNames = ["self", "cap", "languages"];
74
+ return (tx: Transaction) => tx.moveCall({
75
+ package: packageAddress,
76
+ module: 'recording_language',
77
+ function: 'set_languages',
78
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
79
+ typeArguments: options.typeArguments
80
+ });
81
+ }
82
+ export interface SetInstrumentalArguments {
83
+ self: RawTransactionArgument<string>;
84
+ cap: RawTransactionArgument<string>;
85
+ }
86
+ export interface SetInstrumentalOptions {
87
+ package?: string;
88
+ arguments: SetInstrumentalArguments | [
89
+ self: RawTransactionArgument<string>,
90
+ cap: RawTransactionArgument<string>
91
+ ];
92
+ typeArguments: [
93
+ string,
94
+ string
95
+ ];
96
+ }
97
+ /** Asserts the recording has no sung or spoken content. */
98
+ export function setInstrumental(options: SetInstrumentalOptions) {
99
+ const packageAddress = options.package ?? '@local-pkg/recording_language';
100
+ const argumentsTypes = [
101
+ null,
102
+ null
103
+ ] satisfies (string | null)[];
104
+ const parameterNames = ["self", "cap"];
105
+ return (tx: Transaction) => tx.moveCall({
106
+ package: packageAddress,
107
+ module: 'recording_language',
108
+ function: 'set_instrumental',
109
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
110
+ typeArguments: options.typeArguments
111
+ });
112
+ }
113
+ export interface UnsetLanguagesArguments {
114
+ self: RawTransactionArgument<string>;
115
+ cap: RawTransactionArgument<string>;
116
+ }
117
+ export interface UnsetLanguagesOptions {
118
+ package?: string;
119
+ arguments: UnsetLanguagesArguments | [
120
+ self: RawTransactionArgument<string>,
121
+ cap: RawTransactionArgument<string>
122
+ ];
123
+ typeArguments: [
124
+ string,
125
+ string
126
+ ];
127
+ }
128
+ /**
129
+ * Removes the language record, if any. Idempotent. Leaves the recording having
130
+ * said nothing — which is not the same as asserting it is instrumental.
131
+ */
132
+ export function unsetLanguages(options: UnsetLanguagesOptions) {
133
+ const packageAddress = options.package ?? '@local-pkg/recording_language';
134
+ const argumentsTypes = [
135
+ null,
136
+ null
137
+ ] satisfies (string | null)[];
138
+ const parameterNames = ["self", "cap"];
139
+ return (tx: Transaction) => tx.moveCall({
140
+ package: packageAddress,
141
+ module: 'recording_language',
142
+ function: 'unset_languages',
143
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
144
+ typeArguments: options.typeArguments
145
+ });
146
+ }
147
+ export interface HasLanguagesArguments {
148
+ self: RawTransactionArgument<string>;
149
+ }
150
+ export interface HasLanguagesOptions {
151
+ package?: string;
152
+ arguments: HasLanguagesArguments | [
153
+ self: RawTransactionArgument<string>
154
+ ];
155
+ typeArguments: [
156
+ string,
157
+ string
158
+ ];
159
+ }
160
+ /** Whether a language record is attached to this recording. */
161
+ export function hasLanguages(options: HasLanguagesOptions) {
162
+ const packageAddress = options.package ?? '@local-pkg/recording_language';
163
+ const argumentsTypes = [
164
+ null
165
+ ] satisfies (string | null)[];
166
+ const parameterNames = ["self"];
167
+ return (tx: Transaction) => tx.moveCall({
168
+ package: packageAddress,
169
+ module: 'recording_language',
170
+ function: 'has_languages',
171
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
172
+ typeArguments: options.typeArguments
173
+ });
174
+ }
175
+ export interface LanguagesArguments {
176
+ self: RawTransactionArgument<string>;
177
+ }
178
+ export interface LanguagesOptions {
179
+ package?: string;
180
+ arguments: LanguagesArguments | [
181
+ self: RawTransactionArgument<string>
182
+ ];
183
+ typeArguments: [
184
+ string,
185
+ string
186
+ ];
187
+ }
188
+ /**
189
+ * The recording's languages, in the order given. Empty means instrumental. Aborts
190
+ * if nothing is attached — absence is a distinct state from an empty vector and
191
+ * must not collapse into it.
192
+ */
193
+ export function languages(options: LanguagesOptions) {
194
+ const packageAddress = options.package ?? '@local-pkg/recording_language';
195
+ const argumentsTypes = [
196
+ null
197
+ ] satisfies (string | null)[];
198
+ const parameterNames = ["self"];
199
+ return (tx: Transaction) => tx.moveCall({
200
+ package: packageAddress,
201
+ module: 'recording_language',
202
+ function: 'languages',
203
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
204
+ typeArguments: options.typeArguments
205
+ });
206
+ }
207
+ export interface IsInstrumentalArguments {
208
+ self: RawTransactionArgument<string>;
209
+ }
210
+ export interface IsInstrumentalOptions {
211
+ package?: string;
212
+ arguments: IsInstrumentalArguments | [
213
+ self: RawTransactionArgument<string>
214
+ ];
215
+ typeArguments: [
216
+ string,
217
+ string
218
+ ];
219
+ }
220
+ /**
221
+ * Whether the recording asserts it is instrumental: attached, and empty. False
222
+ * when nothing is attached, because that asserts nothing.
223
+ */
224
+ export function isInstrumental(options: IsInstrumentalOptions) {
225
+ const packageAddress = options.package ?? '@local-pkg/recording_language';
226
+ const argumentsTypes = [
227
+ null
228
+ ] satisfies (string | null)[];
229
+ const parameterNames = ["self"];
230
+ return (tx: Transaction) => tx.moveCall({
231
+ package: packageAddress,
232
+ module: 'recording_language',
233
+ function: 'is_instrumental',
234
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
235
+ typeArguments: options.typeArguments
236
+ });
237
+ }
@@ -0,0 +1,36 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveEnum, MoveStruct, MoveTuple } from '../../../utils/index.ts';
5
+ import { bcs } from '@mysten/sui/bcs';
6
+ const $moduleName = 'ori::walrus_data';
7
+ /**
8
+ * Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
9
+ * Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
10
+ * blob and can never be the direct product of an encryption.
11
+ */
12
+ export const Confidentiality = new MoveEnum({ name: `${$moduleName}::Confidentiality`, fields: {
13
+ /** The blob is stored in the clear. */
14
+ Unencrypted: null,
15
+ /**
16
+ * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
17
+ * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
18
+ * itself a Seal `EncryptedObject`, which already carries the decryption-policy
19
+ * package id, so no separate policy field is stored here. Decryption is gated by
20
+ * that policy package's `seal_approve`, not by this library.
21
+ */
22
+ Encrypted: new MoveStruct({ name: `Confidentiality.Encrypted`, fields: {
23
+ dek: bcs.vector(bcs.u8())
24
+ } })
25
+ } });
26
+ /** Represents either a standalone Walrus blob or a patch within a quilt. */
27
+ export const WalrusData = new MoveEnum({ name: `${$moduleName}::WalrusData`, fields: {
28
+ /** A standalone Walrus blob. Fields: blob_id, confidentiality. */
29
+ Blob: new MoveTuple({ name: `WalrusData.Blob`, fields: [bcs.u256(), Confidentiality] }),
30
+ /**
31
+ * A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
32
+ * end_index. Always a plaintext reference into a (possibly separately encrypted)
33
+ * quilt blob.
34
+ */
35
+ QuiltPatch: new MoveTuple({ name: `WalrusData.QuiltPatch`, fields: [bcs.u256(), bcs.u8(), bcs.u16(), bcs.u16()] })
36
+ } });
@@ -0,0 +1,181 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+
5
+
6
+ /**
7
+ * A pointer to a recording's master audio — nothing more.
8
+ *
9
+ * The value is a bare `ori::WalrusData` blob reference. This extension makes no
10
+ * claim about what the blob contains: not its codec, not its sample rate, not its
11
+ * duration, not that it is even audio. The only assertion is that the holder of
12
+ * the recording's admin cap says this blob is the master. Everything else is
13
+ * client-side convention.
14
+ *
15
+ * That thinness is the point. Miso's attested path — the Nautilus-verified master
16
+ * flow (`audio_ingester` producing a `miso_audio::Audio`), deferred — carries
17
+ * channel count, bit depth, sample rate, sample count and a PCM digest, and every
18
+ * one of those is backed by a Nautilus enclave signature over the measured audio.
19
+ * Until that path is running, stating the same fields _unverified_ would dress an
20
+ * assertion up as a measurement. A pointer cannot be mistaken for a measurement.
21
+ *
22
+ * # This extension is a holdover
23
+ *
24
+ * It exists to carry the catalogue until enclave ingestion is ready, and it is
25
+ * meant to be removed rather than grown. When a recording's master is ingested for
26
+ * real, attach the attested master via the ingester's master flow and call
27
+ * `unset_master_reference` here. The two never need to coexist, and this package
28
+ * deliberately holds nothing the attested path cannot restate.
29
+ *
30
+ * Resist adding fields. Anything worth asserting about the audio is worth
31
+ * attesting, and belongs in the ingested `Audio` rather than here.
32
+ */
33
+
34
+ import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
35
+ import { bcs } from '@mysten/sui/bcs';
36
+ import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
37
+ import * as walrus_data from './deps/ori/walrus_data.ts';
38
+ const $moduleName = '@local-pkg/recording_master_reference::recording_master_reference';
39
+ export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
40
+ export const MasterReferenceSetEvent = new MoveStruct({ name: `${$moduleName}::MasterReferenceSetEvent`, fields: {
41
+ recording_id: bcs.Address,
42
+ reference: walrus_data.WalrusData
43
+ } });
44
+ export const MasterReferenceUnsetEvent = new MoveStruct({ name: `${$moduleName}::MasterReferenceUnsetEvent`, fields: {
45
+ recording_id: bcs.Address
46
+ } });
47
+ export interface SetMasterReferenceArguments {
48
+ self: RawTransactionArgument<string>;
49
+ cap: RawTransactionArgument<string>;
50
+ reference: TransactionArgument;
51
+ }
52
+ export interface SetMasterReferenceOptions {
53
+ package?: string;
54
+ arguments: SetMasterReferenceArguments | [
55
+ self: RawTransactionArgument<string>,
56
+ cap: RawTransactionArgument<string>,
57
+ reference: TransactionArgument
58
+ ];
59
+ typeArguments: [
60
+ string,
61
+ string
62
+ ];
63
+ }
64
+ /**
65
+ * Sets (or replaces) the recording's master reference.
66
+ *
67
+ * The reference must be a standalone blob. A quilt patch is rejected: a master is
68
+ * addressed and fetched on its own, and batching it with unrelated files would
69
+ * make its identity depend on what it happened to be stored alongside. Encrypted
70
+ * blobs are accepted — a sealed master is the expected shape once access control
71
+ * lands, and the reference is the same either way.
72
+ */
73
+ export function setMasterReference(options: SetMasterReferenceOptions) {
74
+ const packageAddress = options.package ?? '@local-pkg/recording_master_reference';
75
+ const argumentsTypes = [
76
+ null,
77
+ null,
78
+ null
79
+ ] satisfies (string | null)[];
80
+ const parameterNames = ["self", "cap", "reference"];
81
+ return (tx: Transaction) => tx.moveCall({
82
+ package: packageAddress,
83
+ module: 'recording_master_reference',
84
+ function: 'set_master_reference',
85
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
86
+ typeArguments: options.typeArguments
87
+ });
88
+ }
89
+ export interface UnsetMasterReferenceArguments {
90
+ self: RawTransactionArgument<string>;
91
+ cap: RawTransactionArgument<string>;
92
+ }
93
+ export interface UnsetMasterReferenceOptions {
94
+ package?: string;
95
+ arguments: UnsetMasterReferenceArguments | [
96
+ self: RawTransactionArgument<string>,
97
+ cap: RawTransactionArgument<string>
98
+ ];
99
+ typeArguments: [
100
+ string,
101
+ string
102
+ ];
103
+ }
104
+ /**
105
+ * Removes the master reference, if any. Idempotent.
106
+ *
107
+ * The intended use is migration: once an attested master is attached via the
108
+ * Nautilus-verified master flow (deferred), this reference has nothing left to say
109
+ * and should go.
110
+ */
111
+ export function unsetMasterReference(options: UnsetMasterReferenceOptions) {
112
+ const packageAddress = options.package ?? '@local-pkg/recording_master_reference';
113
+ const argumentsTypes = [
114
+ null,
115
+ null
116
+ ] satisfies (string | null)[];
117
+ const parameterNames = ["self", "cap"];
118
+ return (tx: Transaction) => tx.moveCall({
119
+ package: packageAddress,
120
+ module: 'recording_master_reference',
121
+ function: 'unset_master_reference',
122
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
123
+ typeArguments: options.typeArguments
124
+ });
125
+ }
126
+ export interface HasMasterReferenceArguments {
127
+ self: RawTransactionArgument<string>;
128
+ }
129
+ export interface HasMasterReferenceOptions {
130
+ package?: string;
131
+ arguments: HasMasterReferenceArguments | [
132
+ self: RawTransactionArgument<string>
133
+ ];
134
+ typeArguments: [
135
+ string,
136
+ string
137
+ ];
138
+ }
139
+ /** Whether a master reference is attached to this recording. */
140
+ export function hasMasterReference(options: HasMasterReferenceOptions) {
141
+ const packageAddress = options.package ?? '@local-pkg/recording_master_reference';
142
+ const argumentsTypes = [
143
+ null
144
+ ] satisfies (string | null)[];
145
+ const parameterNames = ["self"];
146
+ return (tx: Transaction) => tx.moveCall({
147
+ package: packageAddress,
148
+ module: 'recording_master_reference',
149
+ function: 'has_master_reference',
150
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
151
+ typeArguments: options.typeArguments
152
+ });
153
+ }
154
+ export interface MasterReferenceArguments {
155
+ self: RawTransactionArgument<string>;
156
+ }
157
+ export interface MasterReferenceOptions {
158
+ package?: string;
159
+ arguments: MasterReferenceArguments | [
160
+ self: RawTransactionArgument<string>
161
+ ];
162
+ typeArguments: [
163
+ string,
164
+ string
165
+ ];
166
+ }
167
+ /** The recording's master reference. Aborts if none is attached. */
168
+ export function masterReference(options: MasterReferenceOptions) {
169
+ const packageAddress = options.package ?? '@local-pkg/recording_master_reference';
170
+ const argumentsTypes = [
171
+ null
172
+ ] satisfies (string | null)[];
173
+ const parameterNames = ["self"];
174
+ return (tx: Transaction) => tx.moveCall({
175
+ package: packageAddress,
176
+ module: 'recording_master_reference',
177
+ function: 'master_reference',
178
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
179
+ typeArguments: options.typeArguments
180
+ });
181
+ }
@@ -0,0 +1,36 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveEnum, MoveStruct, MoveTuple } from '../../../utils/index.ts';
5
+ import { bcs } from '@mysten/sui/bcs';
6
+ const $moduleName = 'ori::walrus_data';
7
+ /**
8
+ * Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
9
+ * Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
10
+ * blob and can never be the direct product of an encryption.
11
+ */
12
+ export const Confidentiality = new MoveEnum({ name: `${$moduleName}::Confidentiality`, fields: {
13
+ /** The blob is stored in the clear. */
14
+ Unencrypted: null,
15
+ /**
16
+ * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
17
+ * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
18
+ * itself a Seal `EncryptedObject`, which already carries the decryption-policy
19
+ * package id, so no separate policy field is stored here. Decryption is gated by
20
+ * that policy package's `seal_approve`, not by this library.
21
+ */
22
+ Encrypted: new MoveStruct({ name: `Confidentiality.Encrypted`, fields: {
23
+ dek: bcs.vector(bcs.u8())
24
+ } })
25
+ } });
26
+ /** Represents either a standalone Walrus blob or a patch within a quilt. */
27
+ export const WalrusData = new MoveEnum({ name: `${$moduleName}::WalrusData`, fields: {
28
+ /** A standalone Walrus blob. Fields: blob_id, confidentiality. */
29
+ Blob: new MoveTuple({ name: `WalrusData.Blob`, fields: [bcs.u256(), Confidentiality] }),
30
+ /**
31
+ * A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
32
+ * end_index. Always a plaintext reference into a (possibly separately encrypted)
33
+ * quilt blob.
34
+ */
35
+ QuiltPatch: new MoveTuple({ name: `WalrusData.QuiltPatch`, fields: [bcs.u256(), bcs.u8(), bcs.u16(), bcs.u16()] })
36
+ } });
@@ -0,0 +1,154 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+
5
+
6
+ /**
7
+ * Recording audio preview: a short, public teaser clip for a recording, stored as
8
+ * a dynamic field on the recording's UID, set/cleared via the recording's
9
+ * cap-gated `uid_mut`.
10
+ *
11
+ * V1 is deliberately minimal: the value is a bare `ori::WalrusData` blob reference
12
+ * — no ingestion or attestation ties the preview to the recording's master. What
13
+ * the blob contains (codec, duration, clip offset) is client-side convention, not
14
+ * protocol state. An attested preview standard can ship later as its own extension
15
+ * without touching this one.
16
+ */
17
+
18
+ import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
19
+ import { bcs } from '@mysten/sui/bcs';
20
+ import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
21
+ import * as walrus_data from './deps/ori/walrus_data.ts';
22
+ const $moduleName = '@local-pkg/recording_preview::recording_preview';
23
+ export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
24
+ export const PreviewSetEvent = new MoveStruct({ name: `${$moduleName}::PreviewSetEvent`, fields: {
25
+ recording_id: bcs.Address,
26
+ preview: walrus_data.WalrusData
27
+ } });
28
+ export const PreviewUnsetEvent = new MoveStruct({ name: `${$moduleName}::PreviewUnsetEvent`, fields: {
29
+ recording_id: bcs.Address
30
+ } });
31
+ export interface SetPreviewArguments {
32
+ self: RawTransactionArgument<string>;
33
+ cap: RawTransactionArgument<string>;
34
+ preview: TransactionArgument;
35
+ }
36
+ export interface SetPreviewOptions {
37
+ package?: string;
38
+ arguments: SetPreviewArguments | [
39
+ self: RawTransactionArgument<string>,
40
+ cap: RawTransactionArgument<string>,
41
+ preview: TransactionArgument
42
+ ];
43
+ typeArguments: [
44
+ string,
45
+ string
46
+ ];
47
+ }
48
+ /**
49
+ * Sets (or replaces) the recording's preview. The reference must be a standalone
50
+ * Walrus blob.
51
+ */
52
+ export function setPreview(options: SetPreviewOptions) {
53
+ const packageAddress = options.package ?? '@local-pkg/recording_preview';
54
+ const argumentsTypes = [
55
+ null,
56
+ null,
57
+ null
58
+ ] satisfies (string | null)[];
59
+ const parameterNames = ["self", "cap", "preview"];
60
+ return (tx: Transaction) => tx.moveCall({
61
+ package: packageAddress,
62
+ module: 'recording_preview',
63
+ function: 'set_preview',
64
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
65
+ typeArguments: options.typeArguments
66
+ });
67
+ }
68
+ export interface UnsetPreviewArguments {
69
+ self: RawTransactionArgument<string>;
70
+ cap: RawTransactionArgument<string>;
71
+ }
72
+ export interface UnsetPreviewOptions {
73
+ package?: string;
74
+ arguments: UnsetPreviewArguments | [
75
+ self: RawTransactionArgument<string>,
76
+ cap: RawTransactionArgument<string>
77
+ ];
78
+ typeArguments: [
79
+ string,
80
+ string
81
+ ];
82
+ }
83
+ /** Removes the preview, if any. */
84
+ export function unsetPreview(options: UnsetPreviewOptions) {
85
+ const packageAddress = options.package ?? '@local-pkg/recording_preview';
86
+ const argumentsTypes = [
87
+ null,
88
+ null
89
+ ] satisfies (string | null)[];
90
+ const parameterNames = ["self", "cap"];
91
+ return (tx: Transaction) => tx.moveCall({
92
+ package: packageAddress,
93
+ module: 'recording_preview',
94
+ function: 'unset_preview',
95
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
96
+ typeArguments: options.typeArguments
97
+ });
98
+ }
99
+ export interface HasPreviewArguments {
100
+ self: RawTransactionArgument<string>;
101
+ }
102
+ export interface HasPreviewOptions {
103
+ package?: string;
104
+ arguments: HasPreviewArguments | [
105
+ self: RawTransactionArgument<string>
106
+ ];
107
+ typeArguments: [
108
+ string,
109
+ string
110
+ ];
111
+ }
112
+ /** Returns whether a preview is attached to this recording. */
113
+ export function hasPreview(options: HasPreviewOptions) {
114
+ const packageAddress = options.package ?? '@local-pkg/recording_preview';
115
+ const argumentsTypes = [
116
+ null
117
+ ] satisfies (string | null)[];
118
+ const parameterNames = ["self"];
119
+ return (tx: Transaction) => tx.moveCall({
120
+ package: packageAddress,
121
+ module: 'recording_preview',
122
+ function: 'has_preview',
123
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
124
+ typeArguments: options.typeArguments
125
+ });
126
+ }
127
+ export interface PreviewArguments {
128
+ self: RawTransactionArgument<string>;
129
+ }
130
+ export interface PreviewOptions {
131
+ package?: string;
132
+ arguments: PreviewArguments | [
133
+ self: RawTransactionArgument<string>
134
+ ];
135
+ typeArguments: [
136
+ string,
137
+ string
138
+ ];
139
+ }
140
+ /** Borrows the preview's Walrus reference. Aborts if none is attached. */
141
+ export function preview(options: PreviewOptions) {
142
+ const packageAddress = options.package ?? '@local-pkg/recording_preview';
143
+ const argumentsTypes = [
144
+ null
145
+ ] satisfies (string | null)[];
146
+ const parameterNames = ["self"];
147
+ return (tx: Transaction) => tx.moveCall({
148
+ package: packageAddress,
149
+ module: 'recording_preview',
150
+ function: 'preview',
151
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
152
+ typeArguments: options.typeArguments
153
+ });
154
+ }