@misofm/sdk 0.9.0 → 0.11.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 (265) hide show
  1. package/README.md +88 -56
  2. package/dist/client.d.ts +121 -18
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +200 -44
  5. package/dist/client.js.map +1 -1
  6. package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts +205 -0
  7. package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts.map +1 -0
  8. package/dist/contracts/composition_routed_stake/composition_routed_stake.js +184 -0
  9. package/dist/contracts/composition_routed_stake/composition_routed_stake.js.map +1 -0
  10. package/dist/contracts/composition_routed_stake/witness.d.ts +7 -0
  11. package/dist/contracts/composition_routed_stake/witness.d.ts.map +1 -0
  12. package/dist/contracts/composition_routed_stake/witness.js +9 -0
  13. package/dist/contracts/composition_routed_stake/witness.js.map +1 -0
  14. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +89 -28
  15. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
  16. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +84 -23
  17. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
  18. package/dist/contracts/composition_royalty_pool/witness.d.ts +6 -0
  19. package/dist/contracts/composition_royalty_pool/witness.d.ts.map +1 -0
  20. package/dist/contracts/composition_royalty_pool/witness.js +8 -0
  21. package/dist/contracts/composition_royalty_pool/witness.js.map +1 -0
  22. package/dist/contracts/genre/genre.d.ts +96 -0
  23. package/dist/contracts/genre/genre.d.ts.map +1 -0
  24. package/dist/contracts/genre/genre.js +107 -0
  25. package/dist/contracts/genre/genre.js.map +1 -0
  26. package/dist/contracts/recording_advisory/recording_advisory.d.ts +194 -0
  27. package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -0
  28. package/dist/contracts/recording_advisory/recording_advisory.js +204 -0
  29. package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -0
  30. package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +6 -0
  31. package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +1 -0
  32. package/dist/contracts/recording_language/deps/language_code/language_code.js +8 -0
  33. package/dist/contracts/recording_language/deps/language_code/language_code.js.map +1 -0
  34. package/dist/contracts/recording_language/recording_language.d.ts +152 -0
  35. package/dist/contracts/recording_language/recording_language.d.ts.map +1 -0
  36. package/dist/contracts/recording_language/recording_language.js +149 -0
  37. package/dist/contracts/recording_language/recording_language.js.map +1 -0
  38. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts +52 -0
  39. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts.map +1 -0
  40. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js +37 -0
  41. package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js.map +1 -0
  42. package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +131 -0
  43. package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -0
  44. package/dist/contracts/recording_master_reference/recording_master_reference.js +121 -0
  45. package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -0
  46. package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts +52 -0
  47. package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts.map +1 -0
  48. package/dist/contracts/recording_preview/deps/ori/walrus_data.js +37 -0
  49. package/dist/contracts/recording_preview/deps/ori/walrus_data.js.map +1 -0
  50. package/dist/contracts/recording_preview/recording_preview.d.ts +104 -0
  51. package/dist/contracts/recording_preview/recording_preview.d.ts.map +1 -0
  52. package/dist/contracts/recording_preview/recording_preview.js +94 -0
  53. package/dist/contracts/recording_preview/recording_preview.js.map +1 -0
  54. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +90 -28
  55. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
  56. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +84 -23
  57. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
  58. package/dist/contracts/recording_royalty_pool/witness.d.ts +6 -0
  59. package/dist/contracts/recording_royalty_pool/witness.d.ts.map +1 -0
  60. package/dist/contracts/recording_royalty_pool/witness.js +8 -0
  61. package/dist/contracts/recording_royalty_pool/witness.js.map +1 -0
  62. package/dist/contracts/release_description/release_description.d.ts +112 -0
  63. package/dist/contracts/release_description/release_description.d.ts.map +1 -0
  64. package/dist/contracts/release_description/release_description.js +123 -0
  65. package/dist/contracts/release_description/release_description.js.map +1 -0
  66. package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +644 -0
  67. package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -0
  68. package/dist/contracts/release_dsp_link/release_dsp_link.js +556 -0
  69. package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -0
  70. package/dist/contracts/release_genre/deps/per_track/per_track.d.ts +33 -0
  71. package/dist/contracts/release_genre/deps/per_track/per_track.d.ts.map +1 -0
  72. package/dist/contracts/release_genre/deps/per_track/per_track.js +32 -0
  73. package/dist/contracts/release_genre/deps/per_track/per_track.js.map +1 -0
  74. package/dist/contracts/release_genre/release_genre.d.ts +193 -0
  75. package/dist/contracts/release_genre/release_genre.d.ts.map +1 -0
  76. package/dist/contracts/release_genre/release_genre.js +207 -0
  77. package/dist/contracts/release_genre/release_genre.js.map +1 -0
  78. package/dist/contracts/release_kind/release_kind.d.ts +98 -0
  79. package/dist/contracts/release_kind/release_kind.d.ts.map +1 -0
  80. package/dist/contracts/release_kind/release_kind.js +109 -0
  81. package/dist/contracts/release_kind/release_kind.js.map +1 -0
  82. package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts +106 -0
  83. package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts.map +1 -0
  84. package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js +113 -0
  85. package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js.map +1 -0
  86. package/dist/contracts/release_revenue_distributor/witness.d.ts +7 -0
  87. package/dist/contracts/release_revenue_distributor/witness.d.ts.map +1 -0
  88. package/dist/contracts/release_revenue_distributor/witness.js +9 -0
  89. package/dist/contracts/release_revenue_distributor/witness.js.map +1 -0
  90. package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +54 -0
  91. package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -0
  92. package/dist/contracts/routed_stake/deps/royalty_pool/stake.js +37 -0
  93. package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -0
  94. package/dist/contracts/routed_stake/deps/std/type_name.d.ts +18 -0
  95. package/dist/contracts/routed_stake/deps/std/type_name.d.ts.map +1 -0
  96. package/dist/contracts/routed_stake/deps/std/type_name.js +20 -0
  97. package/dist/contracts/routed_stake/deps/std/type_name.js.map +1 -0
  98. package/dist/contracts/routed_stake/deps/sui/balance.d.ts +13 -0
  99. package/dist/contracts/routed_stake/deps/sui/balance.d.ts.map +1 -0
  100. package/dist/contracts/routed_stake/deps/sui/balance.js +15 -0
  101. package/dist/contracts/routed_stake/deps/sui/balance.js.map +1 -0
  102. package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts +37 -0
  103. package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts.map +1 -0
  104. package/dist/contracts/routed_stake/deps/sui/vec_map.js +28 -0
  105. package/dist/contracts/routed_stake/deps/sui/vec_map.js.map +1 -0
  106. package/dist/contracts/routed_stake/routed_stake.d.ts +356 -0
  107. package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
  108. package/dist/contracts/routed_stake/routed_stake.js +311 -0
  109. package/dist/contracts/routed_stake/routed_stake.js.map +1 -0
  110. package/dist/contracts/royalty_pool/pool.d.ts +27 -17
  111. package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
  112. package/dist/contracts/royalty_pool/pool.js +26 -17
  113. package/dist/contracts/royalty_pool/pool.js.map +1 -1
  114. package/dist/contracts/vault/deps/sui/bag.d.ts +35 -0
  115. package/dist/contracts/vault/deps/sui/bag.d.ts.map +1 -0
  116. package/dist/contracts/vault/deps/sui/bag.js +37 -0
  117. package/dist/contracts/vault/deps/sui/bag.js.map +1 -0
  118. package/dist/contracts/vault/deps/sui/borrow.d.ts +20 -0
  119. package/dist/contracts/vault/deps/sui/borrow.d.ts.map +1 -0
  120. package/dist/contracts/vault/deps/sui/borrow.js +21 -0
  121. package/dist/contracts/vault/deps/sui/borrow.js.map +1 -0
  122. package/dist/contracts/vault/vault.d.ts +276 -0
  123. package/dist/contracts/vault/vault.d.ts.map +1 -0
  124. package/dist/contracts/vault/vault.js +274 -0
  125. package/dist/contracts/vault/vault.js.map +1 -0
  126. package/dist/contracts.d.ts +13 -2
  127. package/dist/contracts.d.ts.map +1 -1
  128. package/dist/contracts.js +15 -7
  129. package/dist/contracts.js.map +1 -1
  130. package/dist/cover.d.ts +17 -3
  131. package/dist/cover.d.ts.map +1 -1
  132. package/dist/cover.js +43 -20
  133. package/dist/cover.js.map +1 -1
  134. package/dist/credits.d.ts +31 -12
  135. package/dist/credits.d.ts.map +1 -1
  136. package/dist/credits.js +41 -25
  137. package/dist/credits.js.map +1 -1
  138. package/dist/deployments.d.ts +30 -57
  139. package/dist/deployments.d.ts.map +1 -1
  140. package/dist/deployments.js +5 -53
  141. package/dist/deployments.js.map +1 -1
  142. package/dist/index.d.ts +4 -2
  143. package/dist/index.d.ts.map +1 -1
  144. package/dist/index.js +6 -5
  145. package/dist/index.js.map +1 -1
  146. package/dist/pressing.d.ts +8 -7
  147. package/dist/pressing.d.ts.map +1 -1
  148. package/dist/pressing.js +91 -32
  149. package/dist/pressing.js.map +1 -1
  150. package/dist/read/artist.js +3 -3
  151. package/dist/read/artist.js.map +1 -1
  152. package/dist/read/catalog.d.ts +14 -9
  153. package/dist/read/catalog.d.ts.map +1 -1
  154. package/dist/read/catalog.js +71 -37
  155. package/dist/read/catalog.js.map +1 -1
  156. package/dist/read/client.d.ts +4 -2
  157. package/dist/read/client.d.ts.map +1 -1
  158. package/dist/read/client.js +15 -4
  159. package/dist/read/client.js.map +1 -1
  160. package/dist/read/config.d.ts +14 -11
  161. package/dist/read/config.d.ts.map +1 -1
  162. package/dist/read/config.js +10 -37
  163. package/dist/read/config.js.map +1 -1
  164. package/dist/read/index.d.ts +2 -2
  165. package/dist/read/index.d.ts.map +1 -1
  166. package/dist/read/index.js +1 -1
  167. package/dist/read/index.js.map +1 -1
  168. package/dist/read/receipts.d.ts +24 -7
  169. package/dist/read/receipts.d.ts.map +1 -1
  170. package/dist/read/receipts.js +78 -25
  171. package/dist/read/receipts.js.map +1 -1
  172. package/dist/read/types.d.ts +43 -25
  173. package/dist/read/types.d.ts.map +1 -1
  174. package/dist/read/types.js +2 -2
  175. package/dist/read/types.js.map +1 -1
  176. package/dist/recording-extensions.d.ts +37 -0
  177. package/dist/recording-extensions.d.ts.map +1 -0
  178. package/dist/recording-extensions.js +61 -0
  179. package/dist/recording-extensions.js.map +1 -0
  180. package/dist/release-extensions.d.ts +84 -0
  181. package/dist/release-extensions.d.ts.map +1 -0
  182. package/dist/release-extensions.js +160 -0
  183. package/dist/release-extensions.js.map +1 -0
  184. package/dist/release-graph.d.ts +17 -26
  185. package/dist/release-graph.d.ts.map +1 -1
  186. package/dist/release-graph.js +55 -49
  187. package/dist/release-graph.js.map +1 -1
  188. package/dist/transactions.d.ts +43 -24
  189. package/dist/transactions.d.ts.map +1 -1
  190. package/dist/transactions.js +48 -27
  191. package/dist/transactions.js.map +1 -1
  192. package/dist/vault.d.ts +268 -0
  193. package/dist/vault.d.ts.map +1 -0
  194. package/dist/vault.js +389 -0
  195. package/dist/vault.js.map +1 -0
  196. package/package.json +17 -11
  197. package/src/client.ts +399 -61
  198. package/src/contracts/composition_routed_stake/composition_routed_stake.ts +346 -0
  199. package/src/contracts/composition_routed_stake/witness.ts +11 -0
  200. package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +151 -35
  201. package/src/contracts/composition_royalty_pool/witness.ts +7 -0
  202. package/src/contracts/genre/genre.ts +151 -0
  203. package/src/contracts/recording_advisory/recording_advisory.ts +315 -0
  204. package/src/contracts/recording_language/deps/language_code/language_code.ts +7 -0
  205. package/src/contracts/recording_language/recording_language.ts +237 -0
  206. package/src/contracts/recording_master_reference/deps/ori/walrus_data.ts +36 -0
  207. package/src/contracts/recording_master_reference/recording_master_reference.ts +181 -0
  208. package/src/contracts/recording_preview/deps/ori/walrus_data.ts +36 -0
  209. package/src/contracts/recording_preview/recording_preview.ts +154 -0
  210. package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +152 -35
  211. package/src/contracts/recording_royalty_pool/witness.ts +7 -0
  212. package/src/contracts/release_description/release_description.ts +167 -0
  213. package/src/contracts/release_dsp_link/release_dsp_link.ts +813 -0
  214. package/src/contracts/release_genre/deps/per_track/per_track.ts +36 -0
  215. package/src/contracts/release_genre/release_genre.ts +314 -0
  216. package/src/contracts/release_kind/release_kind.ts +153 -0
  217. package/src/contracts/release_revenue_distributor/release_revenue_distributor.ts +178 -0
  218. package/src/contracts/release_revenue_distributor/witness.ts +11 -0
  219. package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +39 -0
  220. package/src/contracts/routed_stake/deps/std/type_name.ts +22 -0
  221. package/src/contracts/routed_stake/deps/sui/balance.ts +17 -0
  222. package/src/contracts/routed_stake/deps/sui/vec_map.ts +33 -0
  223. package/src/contracts/routed_stake/routed_stake.ts +508 -0
  224. package/src/contracts/royalty_pool/pool.ts +34 -24
  225. package/src/contracts/vault/deps/sui/bag.ts +39 -0
  226. package/src/contracts/vault/deps/sui/borrow.ts +25 -0
  227. package/src/contracts/vault/vault.ts +454 -0
  228. package/src/contracts.ts +16 -9
  229. package/src/cover.ts +62 -37
  230. package/src/credits.ts +64 -51
  231. package/src/deployments.ts +35 -97
  232. package/src/index.ts +11 -5
  233. package/src/pressing.ts +135 -39
  234. package/src/read/artist.ts +3 -3
  235. package/src/read/catalog.ts +99 -44
  236. package/src/read/client.ts +20 -4
  237. package/src/read/config.ts +23 -49
  238. package/src/read/index.ts +3 -1
  239. package/src/read/receipts.ts +103 -26
  240. package/src/read/types.ts +44 -27
  241. package/src/recording-extensions.ts +102 -0
  242. package/src/release-extensions.ts +261 -0
  243. package/src/release-graph.ts +68 -81
  244. package/src/transactions.ts +79 -53
  245. package/src/vault.ts +777 -0
  246. package/dist/contracts/miso_drop/drop.d.ts +0 -550
  247. package/dist/contracts/miso_drop/drop.d.ts.map +0 -1
  248. package/dist/contracts/miso_drop/drop.js +0 -523
  249. package/dist/contracts/miso_drop/drop.js.map +0 -1
  250. package/dist/contracts/release_registry/release_registry.d.ts +0 -114
  251. package/dist/contracts/release_registry/release_registry.d.ts.map +0 -1
  252. package/dist/contracts/release_registry/release_registry.js +0 -119
  253. package/dist/contracts/release_registry/release_registry.js.map +0 -1
  254. package/dist/drop.d.ts +0 -127
  255. package/dist/drop.d.ts.map +0 -1
  256. package/dist/drop.js +0 -202
  257. package/dist/drop.js.map +0 -1
  258. package/dist/extensions/royalty-pool.d.ts +0 -32
  259. package/dist/extensions/royalty-pool.d.ts.map +0 -1
  260. package/dist/extensions/royalty-pool.js +0 -33
  261. package/dist/extensions/royalty-pool.js.map +0 -1
  262. package/src/contracts/miso_drop/drop.ts +0 -798
  263. package/src/contracts/release_registry/release_registry.ts +0 -160
  264. package/src/drop.ts +0 -376
  265. package/src/extensions/royalty-pool.ts +0 -90
@@ -2,31 +2,62 @@
2
2
  * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
3
  **************************************************************/
4
4
  /**
5
- * Cap-gated royalty-pool extension for `Recording`.
5
+ * Vault-authorized royalty-pool business logic for Miso Recordings.
6
6
  *
7
- * Royalty payers send `Coin<Currency>` directly to the recording's address a
8
- * stable, well-known inbox available from the recording's creation. The recording
9
- * admin (cap holder) folds those funds into the underlying
10
- * `royalty_pool::pool::RoyaltyPool` via `receive_and_deposit` (for direct coin
11
- * transfers) or `redeem_and_deposit` (for funds-accumulator balances).
12
- *
13
- * All three entry points require `&RecordingAdminCap`, so timing of fold
14
- * operations stays under admin control.
7
+ * The plugin temporarily leases the RecordingAdminCap from its Vault, uses it only
8
+ * to reach the matching Recording UID, and returns it before calling external pool
9
+ * logic. Pools remain derived from the Recording, not the Vault, so their
10
+ * canonical identity survives vault replacement.
15
11
  */
16
12
  import {} from '@mysten/sui/transactions';
17
13
  import { normalizeMoveArguments } from '../utils/index.js';
14
+ /** Authorize this package on a Recording capability Vault. */
15
+ export function install(options) {
16
+ const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
17
+ const argumentsTypes = [
18
+ null,
19
+ null
20
+ ];
21
+ const parameterNames = ["vault", "vaultAdminCap"];
22
+ return (tx) => tx.moveCall({
23
+ package: packageAddress,
24
+ module: 'recording_royalty_pool',
25
+ function: 'install',
26
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
27
+ typeArguments: options.typeArguments
28
+ });
29
+ }
30
+ /** Revoke this package from a Recording capability Vault. */
31
+ export function uninstall(options) {
32
+ const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
33
+ const argumentsTypes = [
34
+ null,
35
+ null
36
+ ];
37
+ const parameterNames = ["vault", "vaultAdminCap"];
38
+ return (tx) => tx.moveCall({
39
+ package: packageAddress,
40
+ module: 'recording_royalty_pool',
41
+ function: 'uninstall',
42
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
43
+ typeArguments: options.typeArguments
44
+ });
45
+ }
18
46
  /**
19
- * Create a royalty pool for a recording. Pool address derives from
20
- * `(recording_id, Currency)` — calling twice with the same Currency aborts because
21
- * the address is already claimed.
47
+ * Create and share the canonical pool derived from this Recording.
48
+ *
49
+ * The matching VaultAdminCap chooses which Currency pools may be created. The
50
+ * result cannot be redirected: the pool ID is claimed from the Recording UID and
51
+ * is typed by both RecordingShare and Currency.
22
52
  */
23
53
  export function initializePool(options) {
24
54
  const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
25
55
  const argumentsTypes = [
56
+ null,
26
57
  null,
27
58
  null
28
59
  ];
29
- const parameterNames = ["recording", "cap"];
60
+ const parameterNames = ["vault", "recording", "vaultAdminCap"];
30
61
  return (tx) => tx.moveCall({
31
62
  package: packageAddress,
32
63
  module: 'recording_royalty_pool',
@@ -36,18 +67,19 @@ export function initializePool(options) {
36
67
  });
37
68
  }
38
69
  /**
39
- * Receive `Coin<Currency>` objects sent to the recording's address and fold them
40
- * into the pool's accumulator.
70
+ * Receive coins sent to the Recording and deposit them into its canonical pool.
71
+ * Anyone may crank this after the plugin is installed, but the funds can only
72
+ * reach the pool derived from this Recording.
41
73
  */
42
74
  export function receiveAndDeposit(options) {
43
75
  const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
44
76
  const argumentsTypes = [
45
77
  null,
46
78
  null,
47
- 'vector<null>',
48
- null
79
+ null,
80
+ 'vector<null>'
49
81
  ];
50
- const parameterNames = ["recording", "cap", "coins", "pool"];
82
+ const parameterNames = ["vault", "recording", "pool", "coins"];
51
83
  return (tx) => tx.moveCall({
52
84
  package: packageAddress,
53
85
  module: 'recording_royalty_pool',
@@ -57,18 +89,18 @@ export function receiveAndDeposit(options) {
57
89
  });
58
90
  }
59
91
  /**
60
- * Redeem `value` base units from the recording's funds accumulator and fold the
61
- * resulting balance into the pool's accumulator.
92
+ * Redeem funds accumulated at the Recording address and deposit them into its
93
+ * canonical pool. Anyone may crank this after installation.
62
94
  */
63
95
  export function redeemAndDeposit(options) {
64
96
  const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
65
97
  const argumentsTypes = [
66
98
  null,
67
99
  null,
68
- 'u64',
69
- null
100
+ null,
101
+ 'u64'
70
102
  ];
71
- const parameterNames = ["recording", "cap", "value", "pool"];
103
+ const parameterNames = ["vault", "recording", "pool", "value"];
72
104
  return (tx) => tx.moveCall({
73
105
  package: packageAddress,
74
106
  module: 'recording_royalty_pool',
@@ -77,4 +109,33 @@ export function redeemAndDeposit(options) {
77
109
  typeArguments: options.typeArguments
78
110
  });
79
111
  }
112
+ export function isInstalled(options) {
113
+ const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
114
+ const argumentsTypes = [
115
+ null
116
+ ];
117
+ const parameterNames = ["vault"];
118
+ return (tx) => tx.moveCall({
119
+ package: packageAddress,
120
+ module: 'recording_royalty_pool',
121
+ function: 'is_installed',
122
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
123
+ typeArguments: options.typeArguments
124
+ });
125
+ }
126
+ /** The canonical pool address for this Recording, share type, and Currency. */
127
+ export function poolAddress(options) {
128
+ const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
129
+ const argumentsTypes = [
130
+ null
131
+ ];
132
+ const parameterNames = ["recording"];
133
+ return (tx) => tx.moveCall({
134
+ package: packageAddress,
135
+ module: 'recording_royalty_pool',
136
+ function: 'pool_address',
137
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
138
+ typeArguments: options.typeArguments
139
+ });
140
+ }
80
141
  //# sourceMappingURL=recording_royalty_pool.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recording_royalty_pool.js","sourceRoot":"","sources":["../../../src/contracts/recording_royalty_pool/recording_royalty_pool.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;GAWG;AAEH,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAiBxF;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAA8B;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,mCAAmC,CAAC;IAC9E,MAAM,cAAc,GAAG;QACnB,IAAI;QACJ,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,c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S,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;QACpF,aAAa,EAAE,OAAO,CAAC,aAAa;KACvC,CAAC,CAAC;AACP,CAAC"}
1
+ {"version":3,"file":"recording_royalty_pool.js","sourceRoot":"","sources":["../../../src/contracts/recording_royalty_pool/recording_royalty_pool.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;GAOG;AAEH,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAexF,8DAA8D;AAC9D,MAAM,UAAU,OAAO,CAAC,OAAuB;IAC3C,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,mCAAmC,CAAC;IAC9E,MAAM,cAAc,GAAG;QACnB,IAAI;QACJ,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAClD,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;QACpF,aAAa,EAAE,OAAO,CAAC,aAAa;KACvC,CAAC,CAAC;AACP,CAAC;AAeD,6DAA6D;AAC7D,MAAM,UAAU,SAAS,CAAC,OAAyB;IAC/C,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,mCAAmC,CAAC;IAC9E,MAAM,cAAc,GAAG;QACnB,IAAI;QACJ,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAClD,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB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AM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,mCAAmC,CAAC;IAC9E,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,WAAW,CAAC,CAAC;IACrC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,cAAc;QACxB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;QACpF,aAAa,EAAE,OAAO,CAAC,aAAa;KACvC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveTuple } from '../utils/index.js';
5
+ export declare const Witness: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/recording_royalty_pool::witness::Witness">;
6
+ //# sourceMappingURL=witness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"witness.d.ts","sourceRoot":"","sources":["../../../src/contracts/recording_royalty_pool/witness.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,eAAO,MAAM,OAAO,0IAA2E,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveTuple } from '../utils/index.js';
5
+ import { bcs } from '@mysten/sui/bcs';
6
+ const $moduleName = '@local-pkg/recording_royalty_pool::witness';
7
+ export const Witness = new MoveTuple({ name: `${$moduleName}::Witness`, fields: [bcs.bool()] });
8
+ //# sourceMappingURL=witness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"witness.js","sourceRoot":"","sources":["../../../src/contracts/recording_royalty_pool/witness.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,4CAA4C,CAAC;AACjE,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,WAAW,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,112 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * What a release says about itself — the paragraph that runs under the title,
6
+ * written by whoever holds the release's admin cap, and believed.
7
+ *
8
+ * A free string, deliberately. Nothing on-chain reads it and nothing derives from
9
+ * it: this is editorial prose, not a fact the protocol can check. The facts a
10
+ * release carries that _are_ checkable — its tracklist, its splits, its state —
11
+ * live on the core object, and the claims two releases have to agree about to be
12
+ * comparable (genre, credits, languages) each get their own typed extension so
13
+ * they can be queried rather than read. What is left over is what a person wants
14
+ * to say, and the only useful thing to do with it is store it and attribute it to
15
+ * the cap holder.
16
+ *
17
+ * One slot, not a set. A release has one thing to say about itself; per-track
18
+ * notes and per-language translations are different concerns and would be
19
+ * different extensions. Folding either in here would turn a paragraph into a
20
+ * schema, and a schema is exactly what prose is not.
21
+ *
22
+ * The 8 KB ceiling is storage hygiene, not an editorial opinion — a backstop
23
+ * against pathological bloat in a shared object, deliberately set well above any
24
+ * description anyone is expected to write. It is the most generous free-text bound
25
+ * in the stack, and that is the intended asymmetry: this package publishes
26
+ * immutable, so a ceiling that turns out to be too low can never be raised, while
27
+ * one that is too high costs only the gas of the writer who fills it. A
28
+ * description is also edited rarely, so the cost of rewriting the field in full
29
+ * lands on almost nobody.
30
+ *
31
+ * Genuinely long-form writing — an essay, a full set of liner notes — still
32
+ * belongs where the artwork goes, in a Walrus blob referenced by an extension.
33
+ * Nothing here stops someone using the whole 8 KB; the bound is a limit, not a
34
+ * recommendation.
35
+ *
36
+ * Attaching nothing and attaching a description are distinct states: absence means
37
+ * nobody has written one, which is why an empty string is rejected rather than
38
+ * stored. There is no such thing as an empty description.
39
+ */
40
+ import { MoveTuple, MoveStruct, type RawTransactionArgument } from '../utils/index.js';
41
+ import { type Transaction } from '@mysten/sui/transactions';
42
+ export declare const ExtensionKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/release_description::release_description::ExtensionKey">;
43
+ export declare const DescriptionSetEvent: MoveStruct<{
44
+ release_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
45
+ description: import("@mysten/sui/bcs").BcsType<string, string, "string">;
46
+ }, "@local-pkg/release_description::release_description::DescriptionSetEvent">;
47
+ export declare const DescriptionClearedEvent: MoveStruct<{
48
+ release_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
49
+ }, "@local-pkg/release_description::release_description::DescriptionClearedEvent">;
50
+ export interface SetDescriptionArguments {
51
+ self: RawTransactionArgument<string>;
52
+ cap: RawTransactionArgument<string>;
53
+ description: RawTransactionArgument<string>;
54
+ }
55
+ export interface SetDescriptionOptions {
56
+ package?: string;
57
+ arguments: SetDescriptionArguments | [
58
+ self: RawTransactionArgument<string>,
59
+ cap: RawTransactionArgument<string>,
60
+ description: RawTransactionArgument<string>
61
+ ];
62
+ }
63
+ /**
64
+ * Sets (or replaces) what the release says about itself.
65
+ *
66
+ * Stored exactly as given — whitespace, line breaks and case included. It is the
67
+ * release's own words, and normalising them here would be the protocol editing
68
+ * prose it has already declined to interpret.
69
+ */
70
+ export declare function setDescription(options: SetDescriptionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
71
+ export interface ClearDescriptionArguments {
72
+ self: RawTransactionArgument<string>;
73
+ cap: RawTransactionArgument<string>;
74
+ }
75
+ export interface ClearDescriptionOptions {
76
+ package?: string;
77
+ arguments: ClearDescriptionArguments | [
78
+ self: RawTransactionArgument<string>,
79
+ cap: RawTransactionArgument<string>
80
+ ];
81
+ }
82
+ /**
83
+ * Removes the description, if any. Idempotent. Leaves the release having said
84
+ * nothing about itself, which is where every release starts.
85
+ */
86
+ export declare function clearDescription(options: ClearDescriptionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
87
+ export interface HasDescriptionArguments {
88
+ self: RawTransactionArgument<string>;
89
+ }
90
+ export interface HasDescriptionOptions {
91
+ package?: string;
92
+ arguments: HasDescriptionArguments | [
93
+ self: RawTransactionArgument<string>
94
+ ];
95
+ }
96
+ /** Whether a description is attached to this release. */
97
+ export declare function hasDescription(options: HasDescriptionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
98
+ export interface DescriptionArguments {
99
+ self: RawTransactionArgument<string>;
100
+ }
101
+ export interface DescriptionOptions {
102
+ package?: string;
103
+ arguments: DescriptionArguments | [
104
+ self: RawTransactionArgument<string>
105
+ ];
106
+ }
107
+ /**
108
+ * What the release says about itself. Aborts if nothing is attached — absence is a
109
+ * distinct state and must not collapse into an empty string.
110
+ */
111
+ export declare function description(options: DescriptionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
112
+ //# sourceMappingURL=release_description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release_description.d.ts","sourceRoot":"","sources":["../../../src/contracts/release_description/release_description.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE/G,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,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G;QACjC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD,yDAAyD;AACzD,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,IAMjD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,kBAAkB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,oBAAoB,GAAG;QAC9B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,IAM3C,IAAI,WAAW,0DAM1B"}
@@ -0,0 +1,123 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * What a release says about itself — the paragraph that runs under the title,
6
+ * written by whoever holds the release's admin cap, and believed.
7
+ *
8
+ * A free string, deliberately. Nothing on-chain reads it and nothing derives from
9
+ * it: this is editorial prose, not a fact the protocol can check. The facts a
10
+ * release carries that _are_ checkable — its tracklist, its splits, its state —
11
+ * live on the core object, and the claims two releases have to agree about to be
12
+ * comparable (genre, credits, languages) each get their own typed extension so
13
+ * they can be queried rather than read. What is left over is what a person wants
14
+ * to say, and the only useful thing to do with it is store it and attribute it to
15
+ * the cap holder.
16
+ *
17
+ * One slot, not a set. A release has one thing to say about itself; per-track
18
+ * notes and per-language translations are different concerns and would be
19
+ * different extensions. Folding either in here would turn a paragraph into a
20
+ * schema, and a schema is exactly what prose is not.
21
+ *
22
+ * The 8 KB ceiling is storage hygiene, not an editorial opinion — a backstop
23
+ * against pathological bloat in a shared object, deliberately set well above any
24
+ * description anyone is expected to write. It is the most generous free-text bound
25
+ * in the stack, and that is the intended asymmetry: this package publishes
26
+ * immutable, so a ceiling that turns out to be too low can never be raised, while
27
+ * one that is too high costs only the gas of the writer who fills it. A
28
+ * description is also edited rarely, so the cost of rewriting the field in full
29
+ * lands on almost nobody.
30
+ *
31
+ * Genuinely long-form writing — an essay, a full set of liner notes — still
32
+ * belongs where the artwork goes, in a Walrus blob referenced by an extension.
33
+ * Nothing here stops someone using the whole 8 KB; the bound is a limit, not a
34
+ * recommendation.
35
+ *
36
+ * Attaching nothing and attaching a description are distinct states: absence means
37
+ * nobody has written one, which is why an empty string is rejected rather than
38
+ * stored. There is no such thing as an empty description.
39
+ */
40
+ import { MoveTuple, MoveStruct, normalizeMoveArguments } from '../utils/index.js';
41
+ import { bcs } from '@mysten/sui/bcs';
42
+ import {} from '@mysten/sui/transactions';
43
+ const $moduleName = '@local-pkg/release_description::release_description';
44
+ export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
45
+ export const DescriptionSetEvent = new MoveStruct({ name: `${$moduleName}::DescriptionSetEvent`, fields: {
46
+ release_id: bcs.Address,
47
+ description: bcs.string()
48
+ } });
49
+ export const DescriptionClearedEvent = new MoveStruct({ name: `${$moduleName}::DescriptionClearedEvent`, fields: {
50
+ release_id: bcs.Address
51
+ } });
52
+ /**
53
+ * Sets (or replaces) what the release says about itself.
54
+ *
55
+ * Stored exactly as given — whitespace, line breaks and case included. It is the
56
+ * release's own words, and normalising them here would be the protocol editing
57
+ * prose it has already declined to interpret.
58
+ */
59
+ export function setDescription(options) {
60
+ const packageAddress = options.package ?? '@local-pkg/release_description';
61
+ const argumentsTypes = [
62
+ null,
63
+ null,
64
+ '0x1::string::String'
65
+ ];
66
+ const parameterNames = ["self", "cap", "description"];
67
+ return (tx) => tx.moveCall({
68
+ package: packageAddress,
69
+ module: 'release_description',
70
+ function: 'set_description',
71
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
72
+ });
73
+ }
74
+ /**
75
+ * Removes the description, if any. Idempotent. Leaves the release having said
76
+ * nothing about itself, which is where every release starts.
77
+ */
78
+ export function clearDescription(options) {
79
+ const packageAddress = options.package ?? '@local-pkg/release_description';
80
+ const argumentsTypes = [
81
+ null,
82
+ null
83
+ ];
84
+ const parameterNames = ["self", "cap"];
85
+ return (tx) => tx.moveCall({
86
+ package: packageAddress,
87
+ module: 'release_description',
88
+ function: 'clear_description',
89
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
90
+ });
91
+ }
92
+ /** Whether a description is attached to this release. */
93
+ export function hasDescription(options) {
94
+ const packageAddress = options.package ?? '@local-pkg/release_description';
95
+ const argumentsTypes = [
96
+ null
97
+ ];
98
+ const parameterNames = ["self"];
99
+ return (tx) => tx.moveCall({
100
+ package: packageAddress,
101
+ module: 'release_description',
102
+ function: 'has_description',
103
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
104
+ });
105
+ }
106
+ /**
107
+ * What the release says about itself. Aborts if nothing is attached — absence is a
108
+ * distinct state and must not collapse into an empty string.
109
+ */
110
+ export function description(options) {
111
+ const packageAddress = options.package ?? '@local-pkg/release_description';
112
+ const argumentsTypes = [
113
+ null
114
+ ];
115
+ const parameterNames = ["self"];
116
+ return (tx) => tx.moveCall({
117
+ package: packageAddress,
118
+ module: 'release_description',
119
+ function: 'description',
120
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
121
+ });
122
+ }
123
+ //# sourceMappingURL=release_description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release_description.js","sourceRoot":"","sources":["../../../src/contracts/release_description/release_description.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAoB,MAAM,0BAA0B,CAAC;AAC5D,MAAM,WAAW,GAAG,qDAAq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