@misonetwork/sdk 0.1.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 (238) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +644 -0
  3. package/dist/client.d.ts +197 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +218 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/contracts/composition_credits/composition_credits.d.ts +181 -0
  8. package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -0
  9. package/dist/contracts/composition_credits/composition_credits.js +109 -0
  10. package/dist/contracts/composition_credits/composition_credits.js.map +1 -0
  11. package/dist/contracts/composition_credits/composition_party_role.d.ts +119 -0
  12. package/dist/contracts/composition_credits/composition_party_role.d.ts.map +1 -0
  13. package/dist/contracts/composition_credits/composition_party_role.js +139 -0
  14. package/dist/contracts/composition_credits/composition_party_role.js.map +1 -0
  15. package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts +24 -0
  16. package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +1 -0
  17. package/dist/contracts/composition_credits/deps/miso_credit/credit.js +23 -0
  18. package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +1 -0
  19. package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts +37 -0
  20. package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +1 -0
  21. package/dist/contracts/composition_credits/deps/sui/vec_map.js +28 -0
  22. package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +1 -0
  23. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +87 -0
  24. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -0
  25. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +80 -0
  26. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -0
  27. package/dist/contracts/cover_art/cover_art.d.ts +85 -0
  28. package/dist/contracts/cover_art/cover_art.d.ts.map +1 -0
  29. package/dist/contracts/cover_art/cover_art.js +68 -0
  30. package/dist/contracts/cover_art/cover_art.js.map +1 -0
  31. package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts +52 -0
  32. package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts.map +1 -0
  33. package/dist/contracts/cover_art/deps/ori/walrus_data.js +37 -0
  34. package/dist/contracts/cover_art/deps/ori/walrus_data.js.map +1 -0
  35. package/dist/contracts/miso/composition.d.ts +231 -0
  36. package/dist/contracts/miso/composition.d.ts.map +1 -0
  37. package/dist/contracts/miso/composition.js +231 -0
  38. package/dist/contracts/miso/composition.js.map +1 -0
  39. package/dist/contracts/miso/deal.d.ts +184 -0
  40. package/dist/contracts/miso/deal.d.ts.map +1 -0
  41. package/dist/contracts/miso/deal.js +184 -0
  42. package/dist/contracts/miso/deal.js.map +1 -0
  43. package/dist/contracts/miso/deps/bps/bps.d.ts +19 -0
  44. package/dist/contracts/miso/deps/bps/bps.d.ts.map +1 -0
  45. package/dist/contracts/miso/deps/bps/bps.js +21 -0
  46. package/dist/contracts/miso/deps/bps/bps.js.map +1 -0
  47. package/dist/contracts/miso/recording.d.ts +228 -0
  48. package/dist/contracts/miso/recording.d.ts.map +1 -0
  49. package/dist/contracts/miso/recording.js +221 -0
  50. package/dist/contracts/miso/recording.js.map +1 -0
  51. package/dist/contracts/miso/release.d.ts +280 -0
  52. package/dist/contracts/miso/release.d.ts.map +1 -0
  53. package/dist/contracts/miso/release.js +282 -0
  54. package/dist/contracts/miso/release.js.map +1 -0
  55. package/dist/contracts/miso/track.d.ts +118 -0
  56. package/dist/contracts/miso/track.d.ts.map +1 -0
  57. package/dist/contracts/miso/track.js +118 -0
  58. package/dist/contracts/miso/track.js.map +1 -0
  59. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +24 -0
  60. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -0
  61. package/dist/contracts/recording_credits/deps/miso_credit/credit.js +23 -0
  62. package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -0
  63. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +37 -0
  64. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -0
  65. package/dist/contracts/recording_credits/deps/sui/vec_map.js +28 -0
  66. package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -0
  67. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +21 -0
  68. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -0
  69. package/dist/contracts/recording_credits/deps/sui/vec_set.js +20 -0
  70. package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -0
  71. package/dist/contracts/recording_credits/recording_credits.d.ts +2313 -0
  72. package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -0
  73. package/dist/contracts/recording_credits/recording_credits.js +270 -0
  74. package/dist/contracts/recording_credits/recording_credits.js.map +1 -0
  75. package/dist/contracts/recording_credits/recording_party_role.d.ts +1174 -0
  76. package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -0
  77. package/dist/contracts/recording_credits/recording_party_role.js +692 -0
  78. package/dist/contracts/recording_credits/recording_party_role.js.map +1 -0
  79. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +90 -0
  80. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -0
  81. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +80 -0
  82. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -0
  83. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +52 -0
  84. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +1 -0
  85. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +37 -0
  86. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +1 -0
  87. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +46 -0
  88. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -0
  89. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +21 -0
  90. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -0
  91. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +33 -0
  92. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -0
  93. package/dist/contracts/release_cover_art/deps/per_track/per_track.js +32 -0
  94. package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -0
  95. package/dist/contracts/release_cover_art/release_cover_art.d.ts +300 -0
  96. package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -0
  97. package/dist/contracts/release_cover_art/release_cover_art.js +168 -0
  98. package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -0
  99. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +24 -0
  100. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -0
  101. package/dist/contracts/release_credits/deps/miso_credit/credit.js +23 -0
  102. package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -0
  103. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +37 -0
  104. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -0
  105. package/dist/contracts/release_credits/deps/sui/vec_map.js +28 -0
  106. package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -0
  107. package/dist/contracts/release_credits/release_credits.d.ts +142 -0
  108. package/dist/contracts/release_credits/release_credits.d.ts.map +1 -0
  109. package/dist/contracts/release_credits/release_credits.js +108 -0
  110. package/dist/contracts/release_credits/release_credits.js.map +1 -0
  111. package/dist/contracts/release_credits/release_party_role.d.ts +58 -0
  112. package/dist/contracts/release_credits/release_party_role.d.ts.map +1 -0
  113. package/dist/contracts/release_credits/release_party_role.js +66 -0
  114. package/dist/contracts/release_credits/release_party_role.js.map +1 -0
  115. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +18 -0
  116. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -0
  117. package/dist/contracts/royalty_pool/deps/std/type_name.js +20 -0
  118. package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -0
  119. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +13 -0
  120. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -0
  121. package/dist/contracts/royalty_pool/deps/sui/balance.js +15 -0
  122. package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -0
  123. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +37 -0
  124. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -0
  125. package/dist/contracts/royalty_pool/deps/sui/vec_map.js +28 -0
  126. package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -0
  127. package/dist/contracts/royalty_pool/pool.d.ts +358 -0
  128. package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
  129. package/dist/contracts/royalty_pool/pool.js +352 -0
  130. package/dist/contracts/royalty_pool/pool.js.map +1 -0
  131. package/dist/contracts/royalty_pool/stake.d.ts +202 -0
  132. package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
  133. package/dist/contracts/royalty_pool/stake.js +197 -0
  134. package/dist/contracts/royalty_pool/stake.js.map +1 -0
  135. package/dist/contracts/utils/index.d.ts +31 -0
  136. package/dist/contracts/utils/index.d.ts.map +1 -0
  137. package/dist/contracts/utils/index.js +162 -0
  138. package/dist/contracts/utils/index.js.map +1 -0
  139. package/dist/contracts.d.ts +18 -0
  140. package/dist/contracts.d.ts.map +1 -0
  141. package/dist/contracts.js +26 -0
  142. package/dist/contracts.js.map +1 -0
  143. package/dist/cover.d.ts +48 -0
  144. package/dist/cover.d.ts.map +1 -0
  145. package/dist/cover.js +68 -0
  146. package/dist/cover.js.map +1 -0
  147. package/dist/credits.d.ts +171 -0
  148. package/dist/credits.d.ts.map +1 -0
  149. package/dist/credits.js +360 -0
  150. package/dist/credits.js.map +1 -0
  151. package/dist/execute.d.ts +49 -0
  152. package/dist/execute.d.ts.map +1 -0
  153. package/dist/execute.js +114 -0
  154. package/dist/execute.js.map +1 -0
  155. package/dist/extensions/royalty-pool.d.ts +32 -0
  156. package/dist/extensions/royalty-pool.d.ts.map +1 -0
  157. package/dist/extensions/royalty-pool.js +33 -0
  158. package/dist/extensions/royalty-pool.js.map +1 -0
  159. package/dist/index.d.ts +13 -0
  160. package/dist/index.d.ts.map +1 -0
  161. package/dist/index.js +16 -0
  162. package/dist/index.js.map +1 -0
  163. package/dist/internal.d.ts +20 -0
  164. package/dist/internal.d.ts.map +1 -0
  165. package/dist/internal.js +48 -0
  166. package/dist/internal.js.map +1 -0
  167. package/dist/parsers.d.ts +9 -0
  168. package/dist/parsers.d.ts.map +1 -0
  169. package/dist/parsers.js +52 -0
  170. package/dist/parsers.js.map +1 -0
  171. package/dist/queries.d.ts +105 -0
  172. package/dist/queries.d.ts.map +1 -0
  173. package/dist/queries.js +380 -0
  174. package/dist/queries.js.map +1 -0
  175. package/dist/schemas.d.ts +99 -0
  176. package/dist/schemas.d.ts.map +1 -0
  177. package/dist/schemas.js +76 -0
  178. package/dist/schemas.js.map +1 -0
  179. package/dist/transactions.d.ts +158 -0
  180. package/dist/transactions.d.ts.map +1 -0
  181. package/dist/transactions.js +154 -0
  182. package/dist/transactions.js.map +1 -0
  183. package/dist/types.d.ts +204 -0
  184. package/dist/types.d.ts.map +1 -0
  185. package/dist/types.js +4 -0
  186. package/dist/types.js.map +1 -0
  187. package/dist/view.d.ts +21 -0
  188. package/dist/view.d.ts.map +1 -0
  189. package/dist/view.js +36 -0
  190. package/dist/view.js.map +1 -0
  191. package/package.json +111 -0
  192. package/src/client.ts +278 -0
  193. package/src/contracts/composition_credits/composition_credits.ts +169 -0
  194. package/src/contracts/composition_credits/composition_party_role.ts +189 -0
  195. package/src/contracts/composition_credits/deps/miso_credit/credit.ts +27 -0
  196. package/src/contracts/composition_credits/deps/sui/vec_map.ts +33 -0
  197. package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +135 -0
  198. package/src/contracts/cover_art/cover_art.ts +99 -0
  199. package/src/contracts/cover_art/deps/ori/walrus_data.ts +36 -0
  200. package/src/contracts/miso/composition.ts +343 -0
  201. package/src/contracts/miso/deal.ts +257 -0
  202. package/src/contracts/miso/deps/bps/bps.ts +23 -0
  203. package/src/contracts/miso/recording.ts +298 -0
  204. package/src/contracts/miso/release.ts +392 -0
  205. package/src/contracts/miso/track.ts +153 -0
  206. package/src/contracts/recording_credits/deps/miso_credit/credit.ts +27 -0
  207. package/src/contracts/recording_credits/deps/sui/vec_map.ts +33 -0
  208. package/src/contracts/recording_credits/deps/sui/vec_set.ts +21 -0
  209. package/src/contracts/recording_credits/recording_credits.ts +458 -0
  210. package/src/contracts/recording_credits/recording_party_role.ts +1041 -0
  211. package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +138 -0
  212. package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +36 -0
  213. package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +23 -0
  214. package/src/contracts/release_cover_art/deps/per_track/per_track.ts +36 -0
  215. package/src/contracts/release_cover_art/release_cover_art.ts +251 -0
  216. package/src/contracts/release_credits/deps/miso_credit/credit.ts +27 -0
  217. package/src/contracts/release_credits/deps/sui/vec_map.ts +33 -0
  218. package/src/contracts/release_credits/release_credits.ts +156 -0
  219. package/src/contracts/release_credits/release_party_role.ts +87 -0
  220. package/src/contracts/royalty_pool/deps/std/type_name.ts +22 -0
  221. package/src/contracts/royalty_pool/deps/sui/balance.ts +17 -0
  222. package/src/contracts/royalty_pool/deps/sui/vec_map.ts +33 -0
  223. package/src/contracts/royalty_pool/pool.ts +577 -0
  224. package/src/contracts/royalty_pool/stake.ts +317 -0
  225. package/src/contracts/utils/index.ts +229 -0
  226. package/src/contracts.ts +30 -0
  227. package/src/cover.ts +136 -0
  228. package/src/credits.ts +645 -0
  229. package/src/execute.ts +141 -0
  230. package/src/extensions/royalty-pool.ts +85 -0
  231. package/src/index.ts +17 -0
  232. package/src/internal.ts +85 -0
  233. package/src/parsers.ts +80 -0
  234. package/src/queries.ts +478 -0
  235. package/src/schemas.ts +96 -0
  236. package/src/transactions.ts +290 -0
  237. package/src/types.ts +244 -0
  238. package/src/view.ts +59 -0
@@ -0,0 +1,80 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * Cap-gated royalty-pool extension for `Composition`.
6
+ *
7
+ * Royalty payers send `Coin<Currency>` directly to the composition's address — a
8
+ * stable, well-known inbox available from the composition's creation. The
9
+ * composition 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 `&CompositionAdminCap`, so timing of fold
14
+ * operations stays under admin control.
15
+ */
16
+ import {} from '@mysten/sui/transactions';
17
+ import { normalizeMoveArguments } from '../utils/index.js';
18
+ /**
19
+ * Create a royalty pool for a composition. Pool address derives from
20
+ * `(composition_id, Currency)` — calling twice with the same Currency aborts
21
+ * because the address is already claimed.
22
+ */
23
+ export function initializePool(options) {
24
+ const packageAddress = options.package ?? '@local-pkg/composition_royalty_pool';
25
+ const argumentsTypes = [
26
+ null,
27
+ null
28
+ ];
29
+ const parameterNames = ["composition", "cap"];
30
+ return (tx) => tx.moveCall({
31
+ package: packageAddress,
32
+ module: 'composition_royalty_pool',
33
+ function: 'initialize_pool',
34
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
35
+ typeArguments: options.typeArguments
36
+ });
37
+ }
38
+ /**
39
+ * Receive `Coin<Currency>` objects sent to the composition's address and fold them
40
+ * into the pool's accumulator.
41
+ */
42
+ export function receiveAndDeposit(options) {
43
+ const packageAddress = options.package ?? '@local-pkg/composition_royalty_pool';
44
+ const argumentsTypes = [
45
+ null,
46
+ null,
47
+ 'vector<null>',
48
+ null
49
+ ];
50
+ const parameterNames = ["composition", "cap", "coins", "pool"];
51
+ return (tx) => tx.moveCall({
52
+ package: packageAddress,
53
+ module: 'composition_royalty_pool',
54
+ function: 'receive_and_deposit',
55
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
56
+ typeArguments: options.typeArguments
57
+ });
58
+ }
59
+ /**
60
+ * Redeem `value` base units from the composition's funds accumulator and fold the
61
+ * resulting balance into the pool's accumulator.
62
+ */
63
+ export function redeemAndDeposit(options) {
64
+ const packageAddress = options.package ?? '@local-pkg/composition_royalty_pool';
65
+ const argumentsTypes = [
66
+ null,
67
+ null,
68
+ 'u64',
69
+ null
70
+ ];
71
+ const parameterNames = ["composition", "cap", "value", "pool"];
72
+ return (tx) => tx.moveCall({
73
+ package: packageAddress,
74
+ module: 'composition_royalty_pool',
75
+ function: 'redeem_and_deposit',
76
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
77
+ typeArguments: options.typeArguments
78
+ });
79
+ }
80
+ //# sourceMappingURL=composition_royalty_pool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition_royalty_pool.js","sourceRoot":"","sources":["../../../src/contracts/composition_royalty_pool/composition_royalty_pool.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;GAWG;AAEH,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAgBxF;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,OAA8B;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,qCAAqC,CAAC;IAChF,MAAM,cAAc,GAAG;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,EAAE,MAAM,CAAC,CAAC;IAC/D,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,0BAA0B;QAClC,QAAQ,EAAE,oBAAoB;QAC9B,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,85 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * The evolvable cover art value used by the recording/release cover art
6
+ * extensions.
7
+ *
8
+ * CoverArt format changes over time (static-only → +animated → future formats).
9
+ * Keeping it in an extension rather than immutable core means a new format is a
10
+ * republish of this small package (or a brand-new cover art standard), not of the
11
+ * frozen protocol. `CoverArt` references external storage via `ori::WalrusData`.
12
+ */
13
+ import { MoveStruct } from '../utils/index.js';
14
+ import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
15
+ export declare const CoverArt: MoveStruct<{
16
+ still: import("../utils/index.js").MoveEnum<{
17
+ Blob: import("../utils/index.js").MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("../utils/index.js").MoveEnum<{
18
+ Unencrypted: null;
19
+ Encrypted: MoveStruct<{
20
+ dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
21
+ length: number;
22
+ }, string>;
23
+ }, "Confidentiality.Encrypted">;
24
+ }, "ori::walrus_data::Confidentiality">], "WalrusData.Blob">;
25
+ QuiltPatch: import("../utils/index.js").MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("@mysten/sui/bcs").BcsType<number, number, "u8">, import("@mysten/sui/bcs").BcsType<number, number, "u16">, import("@mysten/sui/bcs").BcsType<number, number, "u16">], "WalrusData.QuiltPatch">;
26
+ }, "ori::walrus_data::WalrusData">;
27
+ animated: import("@mysten/sui/bcs").BcsType<import("@mysten/bcs").EnumOutputShapeWithKeys<{
28
+ Blob: [string, import("@mysten/bcs").EnumOutputShapeWithKeys<{
29
+ Unencrypted: true;
30
+ Encrypted: {
31
+ dek: number[];
32
+ };
33
+ }, "Unencrypted" | "Encrypted">];
34
+ QuiltPatch: [string, number, number, number];
35
+ }, "Blob" | "QuiltPatch"> | null, import("@mysten/bcs").EnumInputShape<{
36
+ Blob: readonly [string | number | bigint, import("@mysten/bcs").EnumInputShape<{
37
+ Unencrypted: boolean | object | null;
38
+ Encrypted: {
39
+ dek: Iterable<number> & {
40
+ length: number;
41
+ };
42
+ };
43
+ }>];
44
+ QuiltPatch: readonly [string | number | bigint, number, number, number];
45
+ }> | null | undefined, "Option<ori::walrus_data::WalrusData>">;
46
+ }, "@local-pkg/cover_art::cover_art::CoverArt">;
47
+ export interface NewArguments {
48
+ still: TransactionArgument;
49
+ animated: TransactionArgument;
50
+ }
51
+ export interface NewOptions {
52
+ package?: string;
53
+ arguments: NewArguments | [
54
+ still: TransactionArgument,
55
+ animated: TransactionArgument
56
+ ];
57
+ }
58
+ /**
59
+ * Creates cover art with a still image and optional animated version. Both
60
+ * references must be Walrus blobs.
61
+ */
62
+ export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
63
+ export interface StillArguments {
64
+ self: TransactionArgument;
65
+ }
66
+ export interface StillOptions {
67
+ package?: string;
68
+ arguments: StillArguments | [
69
+ self: TransactionArgument
70
+ ];
71
+ }
72
+ /** Returns a reference to the still image data. */
73
+ export declare function still(options: StillOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
74
+ export interface AnimatedArguments {
75
+ self: TransactionArgument;
76
+ }
77
+ export interface AnimatedOptions {
78
+ package?: string;
79
+ arguments: AnimatedArguments | [
80
+ self: TransactionArgument
81
+ ];
82
+ }
83
+ /** Returns a reference to the optional animated cover art data. */
84
+ export declare function animated(options: AnimatedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
85
+ //# sourceMappingURL=cover_art.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cover_art.d.ts","sourceRoot":"","sources":["../../../src/contracts/cover_art/cover_art.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAA0B,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAGb,CAAC;AACT,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,EAAE,mBAAmB,CAAC;CACjC;AACD,MAAM,WAAW,UAAU;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,YAAY,GAAG;QACtB,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,mBAAmB;KAChC,CAAC;CACL;AACD;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,UAAU,IAO5B,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,cAAc,GAAG;QACxB,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,mDAAmD;AACnD,wBAAgB,KAAK,CAAC,OAAO,EAAE,YAAY,IAM/B,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,eAAe;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,GAAG;QAC3B,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,IAMrC,IAAI,WAAW,0DAM1B"}
@@ -0,0 +1,68 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * The evolvable cover art value used by the recording/release cover art
6
+ * extensions.
7
+ *
8
+ * CoverArt format changes over time (static-only → +animated → future formats).
9
+ * Keeping it in an extension rather than immutable core means a new format is a
10
+ * republish of this small package (or a brand-new cover art standard), not of the
11
+ * frozen protocol. `CoverArt` references external storage via `ori::WalrusData`.
12
+ */
13
+ import { MoveStruct, normalizeMoveArguments } from '../utils/index.js';
14
+ import { bcs } from '@mysten/sui/bcs';
15
+ import {} from '@mysten/sui/transactions';
16
+ import * as walrus_data from './deps/ori/walrus_data.js';
17
+ const $moduleName = '@local-pkg/cover_art::cover_art';
18
+ export const CoverArt = new MoveStruct({ name: `${$moduleName}::CoverArt`, fields: {
19
+ still: walrus_data.WalrusData,
20
+ animated: bcs.option(walrus_data.WalrusData)
21
+ } });
22
+ /**
23
+ * Creates cover art with a still image and optional animated version. Both
24
+ * references must be Walrus blobs.
25
+ */
26
+ export function _new(options) {
27
+ const packageAddress = options.package ?? '@local-pkg/cover_art';
28
+ const argumentsTypes = [
29
+ null,
30
+ null
31
+ ];
32
+ const parameterNames = ["still", "animated"];
33
+ return (tx) => tx.moveCall({
34
+ package: packageAddress,
35
+ module: 'cover_art',
36
+ function: 'new',
37
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
38
+ });
39
+ }
40
+ /** Returns a reference to the still image data. */
41
+ export function still(options) {
42
+ const packageAddress = options.package ?? '@local-pkg/cover_art';
43
+ const argumentsTypes = [
44
+ null
45
+ ];
46
+ const parameterNames = ["self"];
47
+ return (tx) => tx.moveCall({
48
+ package: packageAddress,
49
+ module: 'cover_art',
50
+ function: 'still',
51
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
52
+ });
53
+ }
54
+ /** Returns a reference to the optional animated cover art data. */
55
+ export function animated(options) {
56
+ const packageAddress = options.package ?? '@local-pkg/cover_art';
57
+ const argumentsTypes = [
58
+ null
59
+ ];
60
+ const parameterNames = ["self"];
61
+ return (tx) => tx.moveCall({
62
+ package: packageAddress,
63
+ module: 'cover_art',
64
+ function: 'animated',
65
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
66
+ });
67
+ }
68
+ //# sourceMappingURL=cover_art.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cover_art.js","sourceRoot":"","sources":["../../../src/contracts/cover_art/cover_art.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,MAAM,WAAW,GAAG,iCAAiC,CAAC;AACtD,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,EAAE,MAAM,EAAE;QAC3E,KAAK,EAAE,WAAW,CAAC,UAAU;QAC7B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;KAC/C,EAAE,CAAC,CAAC;AAYT;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,OAAmB;IACpC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,sBAAsB,CAAC;IACjE,MAAM,cAAc,GAAG;QACnB,IAAI;QACJ,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7C,O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ULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveEnum, MoveStruct, MoveTuple } from '../../../utils/index.js';
5
+ /**
6
+ * Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
7
+ * Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
8
+ * blob and can never be the direct product of an encryption.
9
+ */
10
+ export declare const Confidentiality: MoveEnum<{
11
+ /** The blob is stored in the clear. */
12
+ Unencrypted: null;
13
+ /**
14
+ * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
15
+ * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
16
+ * itself a Seal `EncryptedObject`, which already carries the decryption-policy
17
+ * package id, so no separate policy field is stored here. Decryption is gated by
18
+ * that policy package's `seal_approve`, not by this library.
19
+ */
20
+ Encrypted: MoveStruct<{
21
+ dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
22
+ length: number;
23
+ }, string>;
24
+ }, "Confidentiality.Encrypted">;
25
+ }, "ori::walrus_data::Confidentiality">;
26
+ /** Represents either a standalone Walrus blob or a patch within a quilt. */
27
+ export declare const WalrusData: MoveEnum<{
28
+ /** A standalone Walrus blob. Fields: blob_id, confidentiality. */
29
+ Blob: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, MoveEnum<{
30
+ /** The blob is stored in the clear. */
31
+ Unencrypted: null;
32
+ /**
33
+ * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
34
+ * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
35
+ * itself a Seal `EncryptedObject`, which already carries the decryption-policy
36
+ * package id, so no separate policy field is stored here. Decryption is gated by
37
+ * that policy package's `seal_approve`, not by this library.
38
+ */
39
+ Encrypted: MoveStruct<{
40
+ dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
41
+ length: number;
42
+ }, string>;
43
+ }, "Confidentiality.Encrypted">;
44
+ }, "ori::walrus_data::Confidentiality">], "WalrusData.Blob">;
45
+ /**
46
+ * A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
47
+ * end_index. Always a plaintext reference into a (possibly separately encrypted)
48
+ * quilt blob.
49
+ */
50
+ QuiltPatch: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("@mysten/sui/bcs").BcsType<number, number, "u8">, import("@mysten/sui/bcs").BcsType<number, number, "u16">, import("@mysten/sui/bcs").BcsType<number, number, "u16">], "WalrusData.QuiltPatch">;
51
+ }, "ori::walrus_data::WalrusData">;
52
+ //# sourceMappingURL=walrus_data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walrus_data.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/cover_art/deps/ori/walrus_data.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAG1E;;;;GAIG;AACH,eAAO,MAAM,eAAe;IACpB,uCAAuC;;IAEvC;;;;;;OAMG;;;;;;uCAIH,CAAC;AACT,4EAA4E;AAC5E,eAAO,MAAM,UAAU;IACf,kEAAkE;;QAflE,uCAAuC;;QAEvC;;;;;;WAMG;;;;;;;IASH;;;;OAIG;;kCAEH,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveEnum, MoveStruct, MoveTuple } from '../../../utils/index.js';
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
+ } });
37
+ //# sourceMappingURL=walrus_data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walrus_data.js","sourceRoot":"","sources":["../../../../../src/contracts/cover_art/deps/ori/walrus_data.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,mBAAmB,EAAE,MAAM,EAAE;QACvF,uCAAuC;QACvC,WAAW,EAAE,IAAI;QACjB;;;;;;WAMG;QACH,SAAS,EAAE,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE;gBAC/D,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;aAC5B,EAAE,CAAC;KACX,EAAE,CAAC,CAAC;AACT,4EAA4E;AAC5E,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,cAAc,EAAE,MAAM,EAAE;QAC7E,kEAAkE;QAClE,IAAI,EAAE,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC;QACvF;;;;WAIG;QACH,UAAU,EAAE,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;KACrH,EAAE,CAAC,CAAC"}
@@ -0,0 +1,231 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * Represents a musical composition (song, instrumental work) in Miso. Compositions
6
+ * are the underlying written works that recordings are based on. Each composition
7
+ * has its own share token for ownership distribution.
8
+ *
9
+ * ### Key Features:
10
+ *
11
+ * - Share token initialization with fixed supply (10M tokens, 6 decimals)
12
+ * - State machine: Initialized -> Published (embedded fields immutable after
13
+ * publish; dynamic fields remain extensible via `uid_mut`)
14
+ * - Deterministic addresses via derived object pattern
15
+ *
16
+ * Attribution (credits) is intentionally NOT part of core: it is display-oriented,
17
+ * varies across platforms, and is never read by the economics. It lives in a
18
+ * first-party credits extension attached via `uid_mut`, so core takes no
19
+ * dependency on an identity package and core publish enforces no attribution.
20
+ *
21
+ * ### Lifecycle and trust model
22
+ *
23
+ * A composition is `key`-only with no `drop`: a fresh `Initialized` object cannot
24
+ * be transferred, wrapped, publicly shared, or discarded, and its only by-value
25
+ * consumer is `publish`. Create-and-publish is therefore atomic by construction —
26
+ * an `Initialized` composition cannot outlive its creating transaction, and every
27
+ * composition that exists on-chain is `Published` and shared. There is
28
+ * deliberately no keep function; staged building must fit one transaction.
29
+ *
30
+ * `uid_mut` works in any lifecycle state and is permanent root over ALL dynamic
31
+ * fields on the object — including fields attached by other extensions. "Immutable
32
+ * after publish" covers the embedded fields only; extension-layer data stays
33
+ * admin-mutable in perpetuity. This is the designed extension surface, and it is
34
+ * the one trust assumption that never expires: integrators should model the cap
35
+ * holder as able to mutate or delete any extension data, forever.
36
+ */
37
+ import { MoveEnum, MoveStruct, MoveTuple, type RawTransactionArgument } from '../utils/index.js';
38
+ import { type Transaction } from '@mysten/sui/transactions';
39
+ /** Lifecycle state of a composition. */
40
+ export declare const CompositionState: MoveEnum<{
41
+ /** Composition is initialized but not published. */
42
+ Initialized: null;
43
+ /** Composition is published and immutable. Includes publication timestamp. */
44
+ Published: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
45
+ }, "@local-pkg/miso::composition::CompositionState">;
46
+ export declare const Composition: MoveStruct<{
47
+ /** Unique identifier for this composition. */
48
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
49
+ /** Current lifecycle state. */
50
+ state: MoveEnum<{
51
+ /** Composition is initialized but not published. */
52
+ Initialized: null;
53
+ /** Composition is published and immutable. Includes publication timestamp. */
54
+ Published: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
55
+ }, "@local-pkg/miso::composition::CompositionState">;
56
+ /** Primary title of the composition. */
57
+ title: import("@mysten/sui/bcs").BcsType<string, string, "string">;
58
+ /** Royalty rate this composition earns from each recording's revenue. */
59
+ royalty_rate: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<number, number, "u16">], "bps::bps::BPS">;
60
+ }, "@local-pkg/miso::composition::Composition<phantom CompositionShare>">;
61
+ export declare const CompositionAdminCap: MoveStruct<{
62
+ /** Unique identifier for this capability. */
63
+ id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
64
+ }, "@local-pkg/miso::composition::CompositionAdminCap<phantom CompositionShare>">;
65
+ export declare const CompositionAdminCapKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/miso::composition::CompositionAdminCapKey">;
66
+ export declare const CompositionPublishedEvent: MoveStruct<{
67
+ composition_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
68
+ }, "@local-pkg/miso::composition::CompositionPublishedEvent<phantom CompositionShare>">;
69
+ export declare const CompositionRoyaltySetEvent: MoveStruct<{
70
+ composition_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
71
+ previous_royalty_rate_bps: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
72
+ royalty_rate_bps: import("@mysten/sui/bcs").BcsType<number, number, "u16">;
73
+ changed_by: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
74
+ }, "@local-pkg/miso::composition::CompositionRoyaltySetEvent<phantom CompositionShare>">;
75
+ export interface NewArguments {
76
+ title: RawTransactionArgument<string>;
77
+ royaltyRateBps: RawTransactionArgument<number>;
78
+ shareCurrency: RawTransactionArgument<string>;
79
+ shareTreasuryCap: RawTransactionArgument<string>;
80
+ }
81
+ export interface NewOptions {
82
+ package?: string;
83
+ arguments: NewArguments | [
84
+ title: RawTransactionArgument<string>,
85
+ royaltyRateBps: RawTransactionArgument<number>,
86
+ shareCurrency: RawTransactionArgument<string>,
87
+ shareTreasuryCap: RawTransactionArgument<string>
88
+ ];
89
+ typeArguments: [
90
+ string
91
+ ];
92
+ }
93
+ /**
94
+ * Creates a new composition with the given title and royalty rate. The royalty
95
+ * rate must not exceed `MAX_ROYALTY_RATE_BPS`; there is no floor, so 0% is
96
+ * permitted (e.g. a generative recording with no authored composition).
97
+ * Initializes share tokens (10M supply, 6 decimals) and returns:
98
+ *
99
+ * - The composition object
100
+ * - Admin capability for the owner
101
+ * - Initial share token balance
102
+ */
103
+ export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
104
+ export interface PublishArguments {
105
+ self: RawTransactionArgument<string>;
106
+ _: RawTransactionArgument<string>;
107
+ }
108
+ export interface PublishOptions {
109
+ package?: string;
110
+ arguments: PublishArguments | [
111
+ self: RawTransactionArgument<string>,
112
+ _: RawTransactionArgument<string>
113
+ ];
114
+ typeArguments: [
115
+ string
116
+ ];
117
+ }
118
+ /**
119
+ * Publishes the composition, making its embedded fields immutable. Required State:
120
+ * Initialized
121
+ *
122
+ * Note: core enforces no attribution requirement — credits live in the credits
123
+ * extension and may be attached before or after publish via `uid_mut`.
124
+ */
125
+ export declare function publish(options: PublishOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
126
+ export interface SetRoyaltyRateArguments {
127
+ self: RawTransactionArgument<string>;
128
+ _: RawTransactionArgument<string>;
129
+ royaltyRateBps: RawTransactionArgument<number>;
130
+ }
131
+ export interface SetRoyaltyRateOptions {
132
+ package?: string;
133
+ arguments: SetRoyaltyRateArguments | [
134
+ self: RawTransactionArgument<string>,
135
+ _: RawTransactionArgument<string>,
136
+ royaltyRateBps: RawTransactionArgument<number>
137
+ ];
138
+ typeArguments: [
139
+ string
140
+ ];
141
+ }
142
+ /**
143
+ * Sets the royalty rate this composition earns from each recording. Must not
144
+ * exceed `MAX_ROYALTY_RATE_BPS` (there is no floor; 0% is allowed). The rate can
145
+ * be changed in any lifecycle state, including after publishing, and takes effect
146
+ * immediately. There is deliberately no rate-change cooldown: a change cannot
147
+ * surprise anyone, because each recording snapshots the rate when it is created
148
+ * (existing recordings keep the rate they captured) and `recording::new`'s
149
+ * `max_royalty_rate_bps` slippage guard means no future recorder can be charged a
150
+ * rate they did not consent to.
151
+ */
152
+ export declare function setRoyaltyRate(options: SetRoyaltyRateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
153
+ export interface IdArguments {
154
+ self: RawTransactionArgument<string>;
155
+ }
156
+ export interface IdOptions {
157
+ package?: string;
158
+ arguments: IdArguments | [
159
+ self: RawTransactionArgument<string>
160
+ ];
161
+ typeArguments: [
162
+ string
163
+ ];
164
+ }
165
+ /** Returns the composition's object ID. */
166
+ export declare function id(options: IdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
167
+ export interface TitleArguments {
168
+ self: RawTransactionArgument<string>;
169
+ }
170
+ export interface TitleOptions {
171
+ package?: string;
172
+ arguments: TitleArguments | [
173
+ self: RawTransactionArgument<string>
174
+ ];
175
+ typeArguments: [
176
+ string
177
+ ];
178
+ }
179
+ /** Returns the primary title. */
180
+ export declare function title(options: TitleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
181
+ export interface RoyaltyRateArguments {
182
+ self: RawTransactionArgument<string>;
183
+ }
184
+ export interface RoyaltyRateOptions {
185
+ package?: string;
186
+ arguments: RoyaltyRateArguments | [
187
+ self: RawTransactionArgument<string>
188
+ ];
189
+ typeArguments: [
190
+ string
191
+ ];
192
+ }
193
+ /** Returns the royalty rate this composition earns from each recording. */
194
+ export declare function royaltyRate(options: RoyaltyRateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
195
+ export interface UidArguments {
196
+ self: RawTransactionArgument<string>;
197
+ }
198
+ export interface UidOptions {
199
+ package?: string;
200
+ arguments: UidArguments | [
201
+ self: RawTransactionArgument<string>
202
+ ];
203
+ typeArguments: [
204
+ string
205
+ ];
206
+ }
207
+ /** Returns a reference to the composition's UID for reading dynamic fields. */
208
+ export declare function uid(options: UidOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
209
+ export interface UidMutArguments {
210
+ self: RawTransactionArgument<string>;
211
+ _: RawTransactionArgument<string>;
212
+ }
213
+ export interface UidMutOptions {
214
+ package?: string;
215
+ arguments: UidMutArguments | [
216
+ self: RawTransactionArgument<string>,
217
+ _: RawTransactionArgument<string>
218
+ ];
219
+ typeArguments: [
220
+ string
221
+ ];
222
+ }
223
+ /**
224
+ * Returns a mutable reference to the composition's UID. Requires the admin
225
+ * capability. Works in any lifecycle state — dynamic fields are the extension
226
+ * surface and stay admin-mutable after publish; only the embedded fields are
227
+ * frozen. The reference is root over every dynamic field on the object, including
228
+ * fields attached by other extensions.
229
+ */
230
+ export declare function uidMut(options: UidMutOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
231
+ //# sourceMappingURL=composition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso/composition.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEzH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG5D,wCAAwC;AACxC,eAAO,MAAM,gBAAgB;IACrB,oDAAoD;;IAEpD,8EAA8E;;oDAE9E,CAAC;AACT,eAAO,MAAM,WAAW;IAChB,8CAA8C;;IAE9C,+BAA+B;;QAR/B,oDAAoD;;QAEpD,8EAA8E;;;IAQ9E,wCAAwC;;IAExC,yEAAyE;;yEAEzE,CAAC;AACT,eAAO,MAAM,mBAAmB;IACxB,6CAA6C;;iFAE7C,CAAC;AACT,eAAO,MAAM,sBAAsB,2IAA0F,CAAC;AAC9H,eAAO,MAAM,yBAAyB;;uFAE9B,CAAC;AACT,eAAO,MAAM,0BAA0B;;;;;wFAK/B,CAAC;AACT,MAAM,WAAW,YAAY;IACzB,KAAK,EA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