@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,109 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * First-party credits extension for compositions.
6
+ *
7
+ * Attribution (writing credits) is display-oriented and varies across platforms,
8
+ * so it lives here as a dynamic field on the composition rather than in immutable
9
+ * core. The data is attached under `ExtensionKey()` via the composition's
10
+ * cap-gated `uid_mut`, so every mutation is authorized by the composition's admin
11
+ * and credits survive into any lifecycle state (they may be attached before or
12
+ * after the composition is published).
13
+ *
14
+ * This is Miso's canonical credits standard; because it is an extension, other
15
+ * parties may publish their own composition-credits standard against the same
16
+ * `Composition`. Credits are NOT read by the economics — they are attribution.
17
+ */
18
+ import { MoveTuple, MoveStruct, normalizeMoveArguments } from '../utils/index.js';
19
+ import { bcs } from '@mysten/sui/bcs';
20
+ import {} from '@mysten/sui/transactions';
21
+ import * as vec_map from './deps/sui/vec_map.js';
22
+ import * as credit from './deps/miso_credit/credit.js';
23
+ import * as composition_party_role from './composition_party_role.js';
24
+ const $moduleName = '@local-pkg/composition_credits::composition_credits';
25
+ export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
26
+ export const CompositionCredits = new MoveStruct({ name: `${$moduleName}::CompositionCredits`, fields: {
27
+ /** Map of party IDs to their credit (display name + roles). */
28
+ credits: vec_map.VecMap(bcs.Address, credit.Credit(composition_party_role.CompositionPartyRole))
29
+ } });
30
+ export const CreditAddedEvent = new MoveStruct({ name: `${$moduleName}::CreditAddedEvent`, fields: {
31
+ composition_id: bcs.Address,
32
+ party_id: bcs.Address,
33
+ credit: credit.Credit(composition_party_role.CompositionPartyRole)
34
+ } });
35
+ export const CreditRemovedEvent = new MoveStruct({ name: `${$moduleName}::CreditRemovedEvent`, fields: {
36
+ composition_id: bcs.Address,
37
+ party_id: bcs.Address,
38
+ credit: credit.Credit(composition_party_role.CompositionPartyRole)
39
+ } });
40
+ /**
41
+ * Adds a credit for a party on the composition, lazily creating the credits record
42
+ * on first use. Each credit must have 1-5 roles, and a party may hold at most one
43
+ * credit. Requires the composition's admin capability.
44
+ */
45
+ export function addCredit(options) {
46
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
47
+ const argumentsTypes = [
48
+ null,
49
+ null,
50
+ null,
51
+ null
52
+ ];
53
+ const parameterNames = ["self", "cap", "party", "credit"];
54
+ return (tx) => tx.moveCall({
55
+ package: packageAddress,
56
+ module: 'composition_credits',
57
+ function: 'add_credit',
58
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
59
+ typeArguments: options.typeArguments
60
+ });
61
+ }
62
+ /** Removes a party's credit. Requires the composition's admin capability. */
63
+ export function removeCredit(options) {
64
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
65
+ const argumentsTypes = [
66
+ null,
67
+ null,
68
+ '0x2::object::ID'
69
+ ];
70
+ const parameterNames = ["self", "cap", "partyId"];
71
+ return (tx) => tx.moveCall({
72
+ package: packageAddress,
73
+ module: 'composition_credits',
74
+ function: 'remove_credit',
75
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
76
+ typeArguments: options.typeArguments
77
+ });
78
+ }
79
+ /** Returns whether a credits record has been attached to this composition yet. */
80
+ export function hasCredits(options) {
81
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
82
+ const argumentsTypes = [
83
+ null
84
+ ];
85
+ const parameterNames = ["self"];
86
+ return (tx) => tx.moveCall({
87
+ package: packageAddress,
88
+ module: 'composition_credits',
89
+ function: 'has_credits',
90
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
91
+ typeArguments: options.typeArguments
92
+ });
93
+ }
94
+ /** Returns the party-to-credit map. Aborts if no credits are attached. */
95
+ export function credits(options) {
96
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
97
+ const argumentsTypes = [
98
+ null
99
+ ];
100
+ const parameterNames = ["self"];
101
+ return (tx) => tx.moveCall({
102
+ package: packageAddress,
103
+ module: 'composition_credits',
104
+ function: 'credits',
105
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
106
+ typeArguments: options.typeArguments
107
+ });
108
+ }
109
+ //# sourceMappingURL=composition_credits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition_credits.js","sourceRoot":"","sources":["../../../src/contracts/composition_credits/composition_credits.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,OAAO,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,8BAA8B,CAAC;AACvD,OAAO,KAAK,sBAAsB,MAAM,6BAA6B,CAAC;AACtE,MAAM,WAAW,GAAG,qDAAqD,CAAC;AAC1E,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,gBAAgB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,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AAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,gCAAgC,CAAC;IAC3E,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,qBAAqB;QAC7B,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"}
@@ -0,0 +1,119 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * Defines the roles that parties can hold on a composition. Compositions are the
6
+ * underlying musical works (melody + lyrics), and these roles represent the
7
+ * writing and adaptation contributions to them.
8
+ *
9
+ * ### Design
10
+ *
11
+ * `CompositionPartyRole` is a closed enum: variants can only be constructed and
12
+ * matched inside this module, so the `new_*_role` constructors are the external
13
+ * write-API and `name()` is the external read-API.
14
+ *
15
+ * - **No seniority axis.** Unlike recording roles, composition roles carry no
16
+ * level — a writer either contributed in a given capacity or did not.
17
+ * - **`Custom` is the escape hatch.** The canonical variants cover the common
18
+ * writing vocabulary; anything outside it is a `Custom(name)` whose name is
19
+ * validated. Prefer a canonical variant when one fits.
20
+ * - **`name()` is the canonical identifier**, returned as a stable PascalCase
21
+ * token (e.g. `"Songwriter"`). For `Custom`, `name()` returns the user-supplied
22
+ * string.
23
+ *
24
+ * These identifiers are Miso's own canonical vocabulary; any overlap with an
25
+ * external standard (e.g. DDEX) is coincidental, not a reproduction of it.
26
+ */
27
+ import { MoveEnum, type RawTransactionArgument } from '../utils/index.js';
28
+ import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
29
+ /** Represents a party's role on a composition. */
30
+ export declare const CompositionPartyRole: MoveEnum<{
31
+ /** Adapted an existing work into this composition. */
32
+ Adapter: null;
33
+ /** Arranged the musical parts of the composition. */
34
+ Arranger: null;
35
+ /** Composed the music of the composition. */
36
+ Composer: null;
37
+ /** Wrote the lyrics of the composition. */
38
+ Lyricist: null;
39
+ /** Wrote both music and lyrics of the composition. */
40
+ Songwriter: null;
41
+ /** Translated the lyrics of the composition. */
42
+ Translator: null;
43
+ /**
44
+ * A user-defined role not covered by a canonical variant. Carries the role name
45
+ * (validated). An escape hatch — prefer a canonical variant when one fits.
46
+ */
47
+ Custom: import("@mysten/sui/bcs").BcsType<string, string, "string">;
48
+ }, "@local-pkg/composition_credits::composition_party_role::CompositionPartyRole">;
49
+ export interface NewAdapterRoleOptions {
50
+ package?: string;
51
+ arguments?: [
52
+ ];
53
+ }
54
+ /** Creates a new Adapter role. */
55
+ export declare function newAdapterRole(options?: NewAdapterRoleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
56
+ export interface NewArrangerRoleOptions {
57
+ package?: string;
58
+ arguments?: [
59
+ ];
60
+ }
61
+ /** Creates a new Arranger role. */
62
+ export declare function newArrangerRole(options?: NewArrangerRoleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
63
+ export interface NewComposerRoleOptions {
64
+ package?: string;
65
+ arguments?: [
66
+ ];
67
+ }
68
+ /** Creates a new Composer role. */
69
+ export declare function newComposerRole(options?: NewComposerRoleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
70
+ export interface NewLyricistRoleOptions {
71
+ package?: string;
72
+ arguments?: [
73
+ ];
74
+ }
75
+ /** Creates a new Lyricist role. */
76
+ export declare function newLyricistRole(options?: NewLyricistRoleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
77
+ export interface NewSongwriterRoleOptions {
78
+ package?: string;
79
+ arguments?: [
80
+ ];
81
+ }
82
+ /** Creates a new Songwriter role. */
83
+ export declare function newSongwriterRole(options?: NewSongwriterRoleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
84
+ export interface NewTranslatorRoleOptions {
85
+ package?: string;
86
+ arguments?: [
87
+ ];
88
+ }
89
+ /** Creates a new Translator role. */
90
+ export declare function newTranslatorRole(options?: NewTranslatorRoleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
91
+ export interface NewCustomRoleArguments {
92
+ roleName: RawTransactionArgument<string>;
93
+ }
94
+ export interface NewCustomRoleOptions {
95
+ package?: string;
96
+ arguments: NewCustomRoleArguments | [
97
+ roleName: RawTransactionArgument<string>
98
+ ];
99
+ }
100
+ /**
101
+ * Creates a new Custom role with a user-defined name. The name freezes into
102
+ * credits, so it is validated here. Prefer a canonical variant when one fits.
103
+ */
104
+ export declare function newCustomRole(options: NewCustomRoleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
105
+ export interface NameArguments {
106
+ self: TransactionArgument;
107
+ }
108
+ export interface NameOptions {
109
+ package?: string;
110
+ arguments: NameArguments | [
111
+ self: TransactionArgument
112
+ ];
113
+ }
114
+ /**
115
+ * Returns the canonical identifier of the role as a stable PascalCase token. For
116
+ * `Custom`, returns the user-supplied name.
117
+ */
118
+ export declare function name(options: NameOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
119
+ //# sourceMappingURL=composition_party_role.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition_party_role.d.ts","sourceRoot":"","sources":["../../../src/contracts/composition_credits/composition_party_role.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,QAAQ,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAElG,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,kDAAkD;AAClD,eAAO,MAAM,oBAAoB;IACzB,sDAAs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AAI,WAAW,0DAK1B;AACD,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CAC5C;AACD,MAAM,WAAW,oBAAoB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,sBAAsB,GAAG;QAChC,QAAQ,EAAE,sBAAsB,CAAC,MAAM,CAAC;KAC3C,CAAC;CACL;AACD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,IAM/C,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,WAAW;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,aAAa,GAAG;QACvB,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,WAAW,IAM7B,IAAI,WAAW,0DAM1B"}
@@ -0,0 +1,139 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * Defines the roles that parties can hold on a composition. Compositions are the
6
+ * underlying musical works (melody + lyrics), and these roles represent the
7
+ * writing and adaptation contributions to them.
8
+ *
9
+ * ### Design
10
+ *
11
+ * `CompositionPartyRole` is a closed enum: variants can only be constructed and
12
+ * matched inside this module, so the `new_*_role` constructors are the external
13
+ * write-API and `name()` is the external read-API.
14
+ *
15
+ * - **No seniority axis.** Unlike recording roles, composition roles carry no
16
+ * level — a writer either contributed in a given capacity or did not.
17
+ * - **`Custom` is the escape hatch.** The canonical variants cover the common
18
+ * writing vocabulary; anything outside it is a `Custom(name)` whose name is
19
+ * validated. Prefer a canonical variant when one fits.
20
+ * - **`name()` is the canonical identifier**, returned as a stable PascalCase
21
+ * token (e.g. `"Songwriter"`). For `Custom`, `name()` returns the user-supplied
22
+ * string.
23
+ *
24
+ * These identifiers are Miso's own canonical vocabulary; any overlap with an
25
+ * external standard (e.g. DDEX) is coincidental, not a reproduction of it.
26
+ */
27
+ import { MoveEnum, normalizeMoveArguments } from '../utils/index.js';
28
+ import { bcs } from '@mysten/sui/bcs';
29
+ import {} from '@mysten/sui/transactions';
30
+ const $moduleName = '@local-pkg/composition_credits::composition_party_role';
31
+ /** Represents a party's role on a composition. */
32
+ export const CompositionPartyRole = new MoveEnum({ name: `${$moduleName}::CompositionPartyRole`, fields: {
33
+ /** Adapted an existing work into this composition. */
34
+ Adapter: null,
35
+ /** Arranged the musical parts of the composition. */
36
+ Arranger: null,
37
+ /** Composed the music of the composition. */
38
+ Composer: null,
39
+ /** Wrote the lyrics of the composition. */
40
+ Lyricist: null,
41
+ /** Wrote both music and lyrics of the composition. */
42
+ Songwriter: null,
43
+ /** Translated the lyrics of the composition. */
44
+ Translator: null,
45
+ /**
46
+ * A user-defined role not covered by a canonical variant. Carries the role name
47
+ * (validated). An escape hatch — prefer a canonical variant when one fits.
48
+ */
49
+ Custom: bcs.string()
50
+ } });
51
+ /** Creates a new Adapter role. */
52
+ export function newAdapterRole(options = {}) {
53
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
54
+ return (tx) => tx.moveCall({
55
+ package: packageAddress,
56
+ module: 'composition_party_role',
57
+ function: 'new_adapter_role',
58
+ });
59
+ }
60
+ /** Creates a new Arranger role. */
61
+ export function newArrangerRole(options = {}) {
62
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
63
+ return (tx) => tx.moveCall({
64
+ package: packageAddress,
65
+ module: 'composition_party_role',
66
+ function: 'new_arranger_role',
67
+ });
68
+ }
69
+ /** Creates a new Composer role. */
70
+ export function newComposerRole(options = {}) {
71
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
72
+ return (tx) => tx.moveCall({
73
+ package: packageAddress,
74
+ module: 'composition_party_role',
75
+ function: 'new_composer_role',
76
+ });
77
+ }
78
+ /** Creates a new Lyricist role. */
79
+ export function newLyricistRole(options = {}) {
80
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
81
+ return (tx) => tx.moveCall({
82
+ package: packageAddress,
83
+ module: 'composition_party_role',
84
+ function: 'new_lyricist_role',
85
+ });
86
+ }
87
+ /** Creates a new Songwriter role. */
88
+ export function newSongwriterRole(options = {}) {
89
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
90
+ return (tx) => tx.moveCall({
91
+ package: packageAddress,
92
+ module: 'composition_party_role',
93
+ function: 'new_songwriter_role',
94
+ });
95
+ }
96
+ /** Creates a new Translator role. */
97
+ export function newTranslatorRole(options = {}) {
98
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
99
+ return (tx) => tx.moveCall({
100
+ package: packageAddress,
101
+ module: 'composition_party_role',
102
+ function: 'new_translator_role',
103
+ });
104
+ }
105
+ /**
106
+ * Creates a new Custom role with a user-defined name. The name freezes into
107
+ * credits, so it is validated here. Prefer a canonical variant when one fits.
108
+ */
109
+ export function newCustomRole(options) {
110
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
111
+ const argumentsTypes = [
112
+ '0x1::string::String'
113
+ ];
114
+ const parameterNames = ["roleName"];
115
+ return (tx) => tx.moveCall({
116
+ package: packageAddress,
117
+ module: 'composition_party_role',
118
+ function: 'new_custom_role',
119
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
120
+ });
121
+ }
122
+ /**
123
+ * Returns the canonical identifier of the role as a stable PascalCase token. For
124
+ * `Custom`, returns the user-supplied name.
125
+ */
126
+ export function name(options) {
127
+ const packageAddress = options.package ?? '@local-pkg/composition_credits';
128
+ const argumentsTypes = [
129
+ null
130
+ ];
131
+ const parameterNames = ["self"];
132
+ return (tx) => tx.moveCall({
133
+ package: packageAddress,
134
+ module: 'composition_party_role',
135
+ function: 'name',
136
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
137
+ });
138
+ }
139
+ //# sourceMappingURL=composition_party_role.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition_party_role.js","sourceRoot":"","sources":["../../../src/contracts/composition_credits/composition_party_role.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,MAAM,WAAW,GAAG,wDAAwD,CAAC;AAC7E,kDAAkD;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,wBAAwB,EAAE,MAAM,EAAE;QACjG,sDAAsD;QACtD,OAAO,EAAE,IAAI;QACb,qDAAqD;QACrD,QAAQ,EAAE,IAAI;QACd,6CAA6C;QAC7C,QAAQ,EAAE,IAAI;QACd,2CAA2C;QAC3C,QAAQ,EAAE,IAAI;QACd,sDAAsD;QACtD,UAAU,EAAE,IAAI;QAChB,gDAAgD;QAChD,UAAU,EAAE,IAAI;QAChB;;;WAGG;QACH,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;KACvB,EAAE,CAAC,CAAC;AAMT,kCAAkC;AAClC,MAAM,UAAU,cAAc,CAAC,UAAiC,EAAE;IAC9D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,gCAAgC,CAAC;IAC3E,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,kBAAkB;KAC/B,CAAC,CAAC;AACP,CAAC;AAMD,mCAAmC;AACnC,MAAM,UAAU,eAAe,CAAC,UAAkC,EAAE;IAChE,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,gCAAgC,CAAC;IAC3E,OAAO,CAAC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,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,qBAAqB;KAClC,CAAC,CAAC;AACP,CAAC;AAUD;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,OAA6B;IACvD,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,gCAAgC,CAAC;IAC3E,MAAM,cAAc,GAAG;QACnB,qBAAqB;KACI,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,UAAU,CAAC,CAAC;IACpC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,iBAAiB;QAC3B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,OAAoB;IACrC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,gCAAgC,CAAC;IAC3E,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * Represents a party's credit on a work or activity. A credit pairs a display name
6
+ * with one or more roles, identifying how a party contributed to the work.
7
+ */
8
+ import { type BcsType } from '@mysten/sui/bcs';
9
+ import { MoveStruct } from '../../../utils/index.js';
10
+ /**
11
+ * A credit attributing roles to a party on a work. Generic over the role type to
12
+ * support domain-specific roles.
13
+ */
14
+ export declare function Credit<Role extends BcsType<any>>(...typeParameters: [
15
+ Role
16
+ ]): MoveStruct<{
17
+ /** Human-readable name to display for this credit. */
18
+ display_name: BcsType<string, string, "string">;
19
+ /** Roles assigned to the credited party. */
20
+ roles: BcsType<import("@mysten/bcs").InferBcsType<Role>[], Iterable<import("@mysten/bcs").InferBcsInput<Role>> & {
21
+ length: number;
22
+ }, string>;
23
+ }, `miso_credit::credit::Credit<${Role["name"]}>`>;
24
+ //# sourceMappingURL=credit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credit.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/composition_credits/deps/miso_credit/credit.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;GAGG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAO,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,IAAI,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE;IACjE,IAAI;CACP;IAEW,sDAAsD;;IAEtD,4CAA4C;;;;mDAGvD"}
@@ -0,0 +1,23 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * Represents a party's credit on a work or activity. A credit pairs a display name
6
+ * with one or more roles, identifying how a party contributed to the work.
7
+ */
8
+ import { bcs } from '@mysten/sui/bcs';
9
+ import { MoveStruct } from '../../../utils/index.js';
10
+ const $moduleName = 'miso_credit::credit';
11
+ /**
12
+ * A credit attributing roles to a party on a work. Generic over the role type to
13
+ * support domain-specific roles.
14
+ */
15
+ export function Credit(...typeParameters) {
16
+ return new MoveStruct({ name: `${$moduleName}::Credit<${typeParameters[0].name}>`, fields: {
17
+ /** Human-readable name to display for this credit. */
18
+ display_name: bcs.string(),
19
+ /** Roles assigned to the credited party. */
20
+ roles: bcs.vector(typeParameters[0])
21
+ } });
22
+ }
23
+ //# sourceMappingURL=credit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credit.js","sourceRoot":"","sources":["../../../../../src/contracts/composition_credits/deps/miso_credit/credit.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;GAGG;AAEH,OAAO,EAAgB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C;;;GAGG;AACH,MAAM,UAAU,MAAM,CAA4B,GAAG,cAEpD;IACG,OAAO,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,cAAc,CAAC,CAAC,CAAC,CAAC,IAAoB,GAAG,EAAE,MAAM,EAAE;YACnG,sDAAsD;YACtD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE;YAC1B,4CAA4C;YAC5C,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;SACvC,EAAE,CAAC,CAAC;AACb,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { type BcsType } from '@mysten/sui/bcs';
5
+ import { MoveStruct } from '../../../utils/index.js';
6
+ /** An entry in the map */
7
+ export declare function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
8
+ K,
9
+ V
10
+ ]): MoveStruct<{
11
+ key: K;
12
+ value: V;
13
+ }, `0x2::vec_map::Entry<${K["name"]}, ${V["name"]}>`>;
14
+ /**
15
+ * A map data structure backed by a vector. The map is guaranteed not to contain
16
+ * duplicate keys, but entries are _not_ sorted by key--entries are included in
17
+ * insertion order. All operations are O(N) in the size of the map--the intention
18
+ * of this data structure is only to provide the convenience of programming against
19
+ * a map API. Large maps should use handwritten parent/child relationships instead.
20
+ * Maps that need sorted iteration rather than insertion order iteration should
21
+ * also be handwritten.
22
+ */
23
+ export declare function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
24
+ K,
25
+ V
26
+ ]): MoveStruct<{
27
+ contents: BcsType<{
28
+ key: K extends BcsType<infer U, any, string> ? U : never;
29
+ value: V extends BcsType<infer U, any, string> ? U : never;
30
+ }[], Iterable<{
31
+ key: K extends BcsType<any, infer U_1, string> ? U_1 : never;
32
+ value: V extends BcsType<any, infer U_1, string> ? U_1 : never;
33
+ }> & {
34
+ length: number;
35
+ }, string>;
36
+ }, `0x2::vec_map::VecMap<${K["name"]}, ${V["name"]}>`>;
37
+ //# sourceMappingURL=vec_map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec_map.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/composition_credits/deps/sui/vec_map.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,KAAK,OAAO,EAAO,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,0BAA0B;AAC1B,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE;IACrF,CAAC;IACD,CAAC;CACJ;;;sDAKA;AACD;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE;IACtF,CAAC;IACD,CAAC;CACJ;;;;;;;;;;uDAIA"}
@@ -0,0 +1,28 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { bcs } from '@mysten/sui/bcs';
5
+ import { MoveStruct } from '../../../utils/index.js';
6
+ const $moduleName = '0x2::vec_map';
7
+ /** An entry in the map */
8
+ export function Entry(...typeParameters) {
9
+ return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name}, ${typeParameters[1].name}>`, fields: {
10
+ key: typeParameters[0],
11
+ value: typeParameters[1]
12
+ } });
13
+ }
14
+ /**
15
+ * A map data structure backed by a vector. The map is guaranteed not to contain
16
+ * duplicate keys, but entries are _not_ sorted by key--entries are included in
17
+ * insertion order. All operations are O(N) in the size of the map--the intention
18
+ * of this data structure is only to provide the convenience of programming against
19
+ * a map API. Large maps should use handwritten parent/child relationships instead.
20
+ * Maps that need sorted iteration rather than insertion order iteration should
21
+ * also be handwritten.
22
+ */
23
+ export function VecMap(...typeParameters) {
24
+ return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name}, ${typeParameters[1].name}>`, fields: {
25
+ contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
26
+ } });
27
+ }
28
+ //# sourceMappingURL=vec_map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec_map.js","sourceRoot":"","sources":["../../../../../src/contracts/composition_credits/deps/sui/vec_map.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAgB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,0BAA0B;AAC1B,MAAM,UAAU,KAAK,CAAiD,GAAG,cAGxE;IACG,OAAO,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,WAAW,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,GAAG,EAAE,MAAM,EAAE;YACvI,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;YACtB,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;SAC3B,EAAE,CAAC,CAAC;AACb,CAAC;AACD;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CAAiD,GAAG,cAGzE;IACG,OAAO,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,GAAG,EAAE,MAAM,EAAE;YACxI,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;SACpE,EAAE,CAAC,CAAC;AACb,CAAC"}
@@ -0,0 +1,87 @@
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 { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
17
+ import { type RawTransactionArgument } from '../utils/index.js';
18
+ export interface InitializePoolArguments {
19
+ composition: RawTransactionArgument<string>;
20
+ cap: RawTransactionArgument<string>;
21
+ }
22
+ export interface InitializePoolOptions {
23
+ package?: string;
24
+ arguments: InitializePoolArguments | [
25
+ composition: RawTransactionArgument<string>,
26
+ cap: RawTransactionArgument<string>
27
+ ];
28
+ typeArguments: [
29
+ string,
30
+ string
31
+ ];
32
+ }
33
+ /**
34
+ * Create a royalty pool for a composition. Pool address derives from
35
+ * `(composition_id, Currency)` — calling twice with the same Currency aborts
36
+ * because the address is already claimed.
37
+ */
38
+ export declare function initializePool(options: InitializePoolOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
39
+ export interface ReceiveAndDepositArguments {
40
+ composition: RawTransactionArgument<string>;
41
+ cap: RawTransactionArgument<string>;
42
+ coins: TransactionArgument;
43
+ pool: RawTransactionArgument<string>;
44
+ }
45
+ export interface ReceiveAndDepositOptions {
46
+ package?: string;
47
+ arguments: ReceiveAndDepositArguments | [
48
+ composition: RawTransactionArgument<string>,
49
+ cap: RawTransactionArgument<string>,
50
+ coins: TransactionArgument,
51
+ pool: RawTransactionArgument<string>
52
+ ];
53
+ typeArguments: [
54
+ string,
55
+ string
56
+ ];
57
+ }
58
+ /**
59
+ * Receive `Coin<Currency>` objects sent to the composition's address and fold them
60
+ * into the pool's accumulator.
61
+ */
62
+ export declare function receiveAndDeposit(options: ReceiveAndDepositOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
63
+ export interface RedeemAndDepositArguments {
64
+ composition: RawTransactionArgument<string>;
65
+ cap: RawTransactionArgument<string>;
66
+ value: RawTransactionArgument<number | bigint>;
67
+ pool: RawTransactionArgument<string>;
68
+ }
69
+ export interface RedeemAndDepositOptions {
70
+ package?: string;
71
+ arguments: RedeemAndDepositArguments | [
72
+ composition: RawTransactionArgument<string>,
73
+ cap: RawTransactionArgument<string>,
74
+ value: RawTransactionArgument<number | bigint>,
75
+ pool: RawTransactionArgument<string>
76
+ ];
77
+ typeArguments: [
78
+ string,
79
+ string
80
+ ];
81
+ }
82
+ /**
83
+ * Redeem `value` base units from the composition's funds accumulator and fold the
84
+ * resulting balance into the pool's accumulator.
85
+ */
86
+ export declare function redeemAndDeposit(options: RedeemAndDepositOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
87
+ //# sourceMappingURL=composition_royalty_pool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition_royalty_pool.d.ts","sourceRoot":"","sources":["../../../src/contracts/composition_royalty_pool/composition_royalty_pool.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACxF,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC5C,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACvC;AACD,MAAM,WAAW,qBAAqB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,uBAAuB,GAAG;QACjC,WAAW,EAAE,sBAAsB,CAAC,MAAM,CAAC;QAC3C,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACtC,CAAC;IACF,aAAa,EAAE;QACX,MAAM;QACN,MAAM;KACT,CAAC;CACL;AACD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,IAOjD,IAAI,WAAW,0DAO1B;AACD,MAAM,WAAW,0BAA0B;IACvC,WAAW,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC5C,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACpC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,wBAAwB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,0BAA0B,GAAG;QACpC,WAAW,EAAE,sBAAsB,CAAC,MAAM,CAAC;QAC3C,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACnC,KAAK,EAAE,mBAAmB;QAC1B,IAAI,EAAE,sBAAsB,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