@misonetwork/sdk 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +181 -139
- package/dist/client.d.ts +1225 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +43 -19
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.d.ts +181 -0
- package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -0
- package/dist/contracts/composition_credits/composition_credits.js +109 -0
- package/dist/contracts/composition_credits/composition_credits.js.map +1 -0
- package/dist/contracts/composition_credits/composition_party_role.d.ts +119 -0
- package/dist/contracts/composition_credits/composition_party_role.d.ts.map +1 -0
- package/dist/contracts/composition_credits/composition_party_role.js +139 -0
- package/dist/contracts/composition_credits/composition_party_role.js.map +1 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/miso/composition.d.ts +1 -1
- package/dist/contracts/miso/composition.js +2 -2
- package/dist/contracts/miso/deps/bps/bps.d.ts +1 -1
- package/dist/contracts/miso/deps/bps/bps.js +1 -1
- package/dist/contracts/miso/recording.d.ts +1 -1
- package/dist/contracts/miso/recording.js +1 -1
- package/dist/contracts/miso/release.d.ts +61 -37
- package/dist/contracts/miso/release.d.ts.map +1 -1
- package/dist/contracts/miso/release.js +65 -38
- package/dist/contracts/miso/release.js.map +1 -1
- package/dist/contracts/miso/track.d.ts +2 -2
- package/dist/contracts/miso/track.js +2 -2
- package/dist/contracts/recording_advisory/recording_advisory.d.ts +194 -0
- package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -0
- package/dist/contracts/recording_advisory/recording_advisory.js +204 -0
- package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.js +20 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/recording_credits/recording_credits.d.ts +2313 -0
- package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -0
- package/dist/contracts/recording_credits/recording_credits.js +270 -0
- package/dist/contracts/recording_credits/recording_credits.js.map +1 -0
- package/dist/contracts/recording_credits/recording_party_role.d.ts +1174 -0
- package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -0
- package/dist/contracts/recording_credits/recording_party_role.js +692 -0
- package/dist/contracts/recording_credits/recording_party_role.js.map +1 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +6 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +1 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.js +8 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.js.map +1 -0
- package/dist/contracts/recording_language/recording_language.d.ts +152 -0
- package/dist/contracts/recording_language/recording_language.d.ts.map +1 -0
- package/dist/contracts/recording_language/recording_language.js +149 -0
- package/dist/contracts/recording_language/recording_language.js.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +131 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.js +121 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/recording_preview/recording_preview.d.ts +104 -0
- package/dist/contracts/recording_preview/recording_preview.d.ts.map +1 -0
- package/dist/contracts/recording_preview/recording_preview.js +94 -0
- package/dist/contracts/recording_preview/recording_preview.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +52 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +37 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +46 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +21 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +33 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js +32 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -0
- package/dist/contracts/release_cover_art/release_cover_art.d.ts +300 -0
- package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/release_cover_art.js +168 -0
- package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/release_credits/release_credits.d.ts +142 -0
- package/dist/contracts/release_credits/release_credits.d.ts.map +1 -0
- package/dist/contracts/release_credits/release_credits.js +108 -0
- package/dist/contracts/release_credits/release_credits.js.map +1 -0
- package/dist/contracts/release_credits/release_party_role.d.ts +58 -0
- package/dist/contracts/release_credits/release_party_role.d.ts.map +1 -0
- package/dist/contracts/release_credits/release_party_role.js +66 -0
- package/dist/contracts/release_credits/release_party_role.js.map +1 -0
- package/dist/contracts/release_description/release_description.d.ts +112 -0
- package/dist/contracts/release_description/release_description.d.ts.map +1 -0
- package/dist/contracts/release_description/release_description.js +123 -0
- package/dist/contracts/release_description/release_description.js.map +1 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +644 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.js +556 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.d.ts +33 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.d.ts.map +1 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.js +32 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.js.map +1 -0
- package/dist/contracts/release_genre/release_genre.d.ts +193 -0
- package/dist/contracts/release_genre/release_genre.d.ts.map +1 -0
- package/dist/contracts/release_genre/release_genre.js +207 -0
- package/dist/contracts/release_genre/release_genre.js.map +1 -0
- package/dist/contracts/release_kind/release_kind.d.ts +98 -0
- package/dist/contracts/release_kind/release_kind.d.ts.map +1 -0
- package/dist/contracts/release_kind/release_kind.js +109 -0
- package/dist/contracts/release_kind/release_kind.js.map +1 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +91 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +1 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +91 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +54 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js +37 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -0
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/std/type_name.js +20 -0
- package/dist/contracts/routed_stake/deps/std/type_name.js.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts +13 -0
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/balance.js +15 -0
- package/dist/contracts/routed_stake/deps/sui/balance.js.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.js +28 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts +356 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.js +311 -0
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.js +20 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +13 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.js +15 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js +28 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/royalty_pool/pool.d.ts +394 -0
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/pool.js +387 -0
- package/dist/contracts/royalty_pool/pool.js.map +1 -0
- package/dist/contracts/royalty_pool/stake.d.ts +202 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/stake.js +197 -0
- package/dist/contracts/royalty_pool/stake.js.map +1 -0
- package/dist/contracts.d.ts +37 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +42 -8
- package/dist/contracts.js.map +1 -1
- package/dist/deployments.d.ts +46 -12
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +119 -11
- package/dist/deployments.js.map +1 -1
- package/dist/events.d.ts +1081 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +124 -0
- package/dist/events.js.map +1 -0
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +0 -4
- package/dist/execute.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/numeric.d.ts +5 -0
- package/dist/numeric.d.ts.map +1 -0
- package/dist/numeric.js +21 -0
- package/dist/numeric.js.map +1 -0
- package/dist/packages.d.ts +159 -0
- package/dist/packages.d.ts.map +1 -0
- package/dist/packages.js +179 -0
- package/dist/packages.js.map +1 -0
- package/dist/parsers.d.ts +5 -1
- package/dist/parsers.d.ts.map +1 -1
- package/dist/parsers.js +18 -2
- package/dist/parsers.js.map +1 -1
- package/dist/queries.d.ts +92 -0
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +132 -23
- package/dist/queries.js.map +1 -1
- package/dist/transactions.d.ts +96 -3
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +123 -11
- package/dist/transactions.js.map +1 -1
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/view.d.ts +6 -5
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +8 -2
- package/dist/view.js.map +1 -1
- package/package.json +14 -4
- package/src/client.ts +57 -23
- package/src/contracts/composition_credits/composition_credits.ts +169 -0
- package/src/contracts/composition_credits/composition_party_role.ts +189 -0
- package/src/contracts/composition_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/composition_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/miso/composition.ts +8 -8
- package/src/contracts/miso/deps/bps/bps.ts +3 -3
- package/src/contracts/miso/recording.ts +10 -10
- package/src/contracts/miso/release.ts +103 -67
- package/src/contracts/miso/track.ts +5 -5
- package/src/contracts/recording_advisory/recording_advisory.ts +315 -0
- package/src/contracts/recording_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/recording_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/recording_credits/deps/sui/vec_set.ts +21 -0
- package/src/contracts/recording_credits/recording_credits.ts +458 -0
- package/src/contracts/recording_credits/recording_party_role.ts +1041 -0
- package/src/contracts/recording_language/deps/language_code/language_code.ts +7 -0
- package/src/contracts/recording_language/recording_language.ts +237 -0
- package/src/contracts/recording_master_reference/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/recording_master_reference/recording_master_reference.ts +181 -0
- package/src/contracts/recording_preview/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/recording_preview/recording_preview.ts +154 -0
- package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +36 -0
- package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +23 -0
- package/src/contracts/release_cover_art/deps/per_track/per_track.ts +36 -0
- package/src/contracts/release_cover_art/release_cover_art.ts +251 -0
- package/src/contracts/release_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/release_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/release_credits/release_credits.ts +156 -0
- package/src/contracts/release_credits/release_party_role.ts +87 -0
- package/src/contracts/release_description/release_description.ts +167 -0
- package/src/contracts/release_dsp_link/release_dsp_link.ts +813 -0
- package/src/contracts/release_genre/deps/per_track/per_track.ts +36 -0
- package/src/contracts/release_genre/release_genre.ts +314 -0
- package/src/contracts/release_kind/release_kind.ts +153 -0
- package/src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +124 -0
- package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +39 -0
- package/src/contracts/routed_stake/deps/std/type_name.ts +22 -0
- package/src/contracts/routed_stake/deps/sui/balance.ts +17 -0
- package/src/contracts/routed_stake/deps/sui/vec_map.ts +33 -0
- package/src/contracts/routed_stake/routed_stake.ts +508 -0
- package/src/contracts/royalty_pool/deps/std/type_name.ts +22 -0
- package/src/contracts/royalty_pool/deps/sui/balance.ts +17 -0
- package/src/contracts/royalty_pool/deps/sui/vec_map.ts +33 -0
- package/src/contracts/royalty_pool/pool.ts +613 -0
- package/src/contracts/royalty_pool/stake.ts +317 -0
- package/src/contracts.ts +59 -6
- package/src/deployments.ts +160 -22
- package/src/events.ts +129 -0
- package/src/execute.ts +0 -4
- package/src/index.ts +6 -3
- package/src/internal.ts +0 -4
- package/src/numeric.ts +25 -0
- package/src/packages.ts +251 -0
- package/src/parsers.ts +32 -2
- package/src/queries.ts +227 -25
- package/src/transactions.ts +254 -12
- package/src/types.ts +20 -0
- package/src/view.ts +12 -6
|
@@ -7,44 +7,44 @@
|
|
|
7
7
|
* Represents an audio recording of a composition in Miso. Recordings are the audio
|
|
8
8
|
* performances that are distributed and played. Each recording has its own share
|
|
9
9
|
* token for ownership distribution.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* ### Key Features:
|
|
12
|
-
*
|
|
12
|
+
*
|
|
13
13
|
* - Share token initialization with fixed supply (10M tokens, 6 decimals)
|
|
14
14
|
* - State machine: Initialized -> Published (embedded fields immutable after
|
|
15
15
|
* publish; dynamic fields remain extensible via `uid_mut`, e.g. masters, and
|
|
16
16
|
* credits/attribution attached by the credits extension)
|
|
17
17
|
* - Deterministic addresses via derived object pattern
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
19
|
* Attribution (credits, primary/featured artists) is intentionally NOT part of
|
|
20
20
|
* core: it is display-oriented, varies across platforms, and is never read by the
|
|
21
21
|
* economics. It lives in a first-party credits extension attached via `uid_mut`,
|
|
22
22
|
* so core takes no dependency on an identity package and core publish enforces no
|
|
23
23
|
* attribution.
|
|
24
|
-
*
|
|
24
|
+
*
|
|
25
25
|
* A recording carries no name of its own. Its display title is its composition's
|
|
26
26
|
* title, read by reference — composition titles are immutable, so an embedded copy
|
|
27
27
|
* would carry no information. Anything that names this particular take — "(Live)",
|
|
28
28
|
* "Radio Edit", a translated title — has more than one correct rendering, which
|
|
29
29
|
* makes it presentation, and presentation lives in the metadata extension, never
|
|
30
30
|
* in the frozen core. Core stores what a recording _is_; extensions describe it.
|
|
31
|
-
*
|
|
31
|
+
*
|
|
32
32
|
* ### Lifecycle and trust model
|
|
33
|
-
*
|
|
33
|
+
*
|
|
34
34
|
* A recording is `key`-only with no `drop`: a fresh `Initialized` object cannot be
|
|
35
35
|
* transferred, wrapped, publicly shared, or discarded, and its only by-value
|
|
36
36
|
* consumer is `publish`. Create-and-publish is therefore atomic by construction —
|
|
37
37
|
* an `Initialized` recording cannot outlive its creating transaction, and every
|
|
38
38
|
* recording that exists on-chain is `Published` and shared. There is deliberately
|
|
39
39
|
* no keep function; staged building must fit one transaction.
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
41
|
* `uid_mut` works in any lifecycle state and is permanent root over ALL dynamic
|
|
42
42
|
* fields on the object — including fields attached by other extensions. "Immutable
|
|
43
43
|
* after publish" covers the embedded fields only; extension-layer data stays
|
|
44
44
|
* admin-mutable in perpetuity. This is the designed extension surface, and it is
|
|
45
45
|
* the one trust assumption that never expires: integrators should model the cap
|
|
46
46
|
* holder as able to mutate or delete any extension data, forever.
|
|
47
|
-
*
|
|
47
|
+
*
|
|
48
48
|
* The recording carries its parent composition's identity two ways. The
|
|
49
49
|
* `CompositionShare` phantom type parameter is the durable identity (a share
|
|
50
50
|
* currency is published independently of miso and survives a fresh republish,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
* on-chain consumers holding only `&Recording` — or a bare `Track` — could not
|
|
55
55
|
* otherwise reach the composition at all. Both are set at creation and immutable,
|
|
56
56
|
* so they cannot diverge.
|
|
57
|
-
*
|
|
57
|
+
*
|
|
58
58
|
* A recording is its own freshly-created object (`object::new`), not a derived
|
|
59
59
|
* child of its composition: `recording::new` takes a read-only `&Composition`
|
|
60
60
|
* (only to read its royalty rate and id), so publishing recordings under a
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* collides on a per-composition index.
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
|
-
import { MoveEnum, MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.
|
|
65
|
+
import { MoveEnum, MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
66
66
|
import { bcs } from '@mysten/sui/bcs';
|
|
67
67
|
import { type Transaction } from '@mysten/sui/transactions';
|
|
68
68
|
const $moduleName = '@local-pkg/miso::recording';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Represents a music release in Miso. A release is an ordered tracklist with
|
|
8
8
|
* per-track revenue distribution configuration. Cover art lives in the `cover_art`
|
|
9
9
|
* extension, not in core.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* The tracklist is deliberately FLAT — a `vector<Track>` with no disc structure.
|
|
12
12
|
* Grouping a sequence into discs, vinyl sides, acts, or movements is a property of
|
|
13
13
|
* a distribution medium, not of the release: it has more than one correct
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
* extension. A consequence worth stating: the stored tracklist and the digest
|
|
16
16
|
* pre-image have the same shape, so what signers consented to is exactly what is
|
|
17
17
|
* stored — nothing structural is chosen after consent except the title.
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
19
|
* ### Key Features:
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
21
|
* - Ordered flat tracklist (grouping is presentation, in the metadata extension)
|
|
22
22
|
* - Configurable per-track revenue splits
|
|
23
23
|
* - State machine: Initialized -> Published
|
|
24
|
-
*
|
|
24
|
+
*
|
|
25
25
|
* Attribution (credits, primary/featured artists) is intentionally NOT part of
|
|
26
26
|
* core: it is display-oriented, varies across platforms, and is never read by the
|
|
27
27
|
* economics. It lives in a first-party credits extension attached via `uid_mut`,
|
|
28
28
|
* so core takes no dependency on an identity package and core publish enforces no
|
|
29
29
|
* attribution.
|
|
30
|
-
*
|
|
30
|
+
*
|
|
31
31
|
* The same rule governs naming. Core stores what a thing _is_ — identity and
|
|
32
32
|
* everything the economics read; extensions describe it. The release's `title` is
|
|
33
33
|
* the one embedded name: it is constitutive (naming the package is part of
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
* naming ("Deluxe Edition"), disc titles, localized titles, and DSP-shaped slots
|
|
36
36
|
* all have more than one correct rendering — presentation — and live in the
|
|
37
37
|
* metadata extension.
|
|
38
|
-
*
|
|
38
|
+
*
|
|
39
39
|
* ### Consent scope
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
41
|
* The release digest — and therefore the derived release id every `Track` commits
|
|
42
42
|
* to at creation — binds the economics and membership of the release: the ordered
|
|
43
43
|
* list of `(recording, split)` pairs and the creator's nonce. It deliberately
|
|
@@ -46,17 +46,18 @@
|
|
|
46
46
|
* chosen by the release creator, before or after tracks are created, and are
|
|
47
47
|
* trusted and publicly attributable rather than cryptographically committed. See
|
|
48
48
|
* `track::new` for the signer-side statement of this boundary.
|
|
49
|
-
*
|
|
50
|
-
* The derived id commits to
|
|
51
|
-
* targeting an id also consents to that namespace's liveness. If
|
|
52
|
-
*
|
|
53
|
-
* never exist and every track or offer targeting it
|
|
54
|
-
* blast-radius class as a release that simply never publishes.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
49
|
+
*
|
|
50
|
+
* The derived id commits to the canonical registry's UID and the digest, not the
|
|
51
|
+
* digest alone — so targeting an id also consents to that namespace's liveness. If
|
|
52
|
+
* that parent were deleted, or its `&mut UID` became permanently unreachable, the
|
|
53
|
+
* release could never exist and every track or offer targeting it would be
|
|
54
|
+
* stranded — the same blast-radius class as a release that simply never publishes.
|
|
55
|
+
* `ReleaseRegistry` is therefore created and shared exactly once at package
|
|
56
|
+
* initialization, and exposes neither a constructor, deletion path, nor mutable
|
|
57
|
+
* UID accessor.
|
|
58
|
+
*
|
|
58
59
|
* ### Lifecycle and trust model
|
|
59
|
-
*
|
|
60
|
+
*
|
|
60
61
|
* A release is `key`-only with no `drop`: a fresh `Initialized` object cannot be
|
|
61
62
|
* transferred, wrapped, publicly shared, or discarded, and its only by-value
|
|
62
63
|
* consumer is `publish`. Create-and-publish is therefore atomic by construction —
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
* release that exists on-chain is `Published` and shared. There is deliberately no
|
|
65
66
|
* keep function; assembling tracks, discs, and the release must fit one
|
|
66
67
|
* transaction.
|
|
67
|
-
*
|
|
68
|
+
*
|
|
68
69
|
* `uid_mut` works in any lifecycle state and is permanent root over ALL dynamic
|
|
69
70
|
* fields on the object — including fields attached by other extensions. "Immutable
|
|
70
71
|
* after publish" covers the embedded fields only; extension-layer data stays
|
|
@@ -73,10 +74,10 @@
|
|
|
73
74
|
* holder as able to mutate or delete any extension data, forever.
|
|
74
75
|
*/
|
|
75
76
|
|
|
76
|
-
import { MoveEnum, MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.
|
|
77
|
+
import { MoveEnum, MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
77
78
|
import { bcs } from '@mysten/sui/bcs';
|
|
78
79
|
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
79
|
-
import * as track from './track.
|
|
80
|
+
import * as track from './track.ts';
|
|
80
81
|
const $moduleName = '@local-pkg/miso::release';
|
|
81
82
|
/** Lifecycle state of a release. */
|
|
82
83
|
export const ReleaseState = new MoveEnum({ name: `${$moduleName}::ReleaseState`, fields: {
|
|
@@ -98,6 +99,9 @@ export const Release = new MoveStruct({ name: `${$moduleName}::Release`, fields:
|
|
|
98
99
|
*/
|
|
99
100
|
tracks: bcs.vector(track.Track)
|
|
100
101
|
} });
|
|
102
|
+
export const ReleaseRegistry = new MoveStruct({ name: `${$moduleName}::ReleaseRegistry`, fields: {
|
|
103
|
+
id: bcs.Address
|
|
104
|
+
} });
|
|
101
105
|
export const ReleaseKey = new MoveTuple({ name: `${$moduleName}::ReleaseKey`, fields: [bcs.vector(bcs.u8())] });
|
|
102
106
|
export const ReleaseAdminCap = new MoveStruct({ name: `${$moduleName}::ReleaseAdminCap`, fields: {
|
|
103
107
|
/** Unique identifier for this capability. */
|
|
@@ -109,37 +113,41 @@ export const ReleaseAdminCapKey = new MoveTuple({ name: `${$moduleName}::Release
|
|
|
109
113
|
export const ReleasePublishedEvent = new MoveStruct({ name: `${$moduleName}::ReleasePublishedEvent`, fields: {
|
|
110
114
|
release_id: bcs.Address
|
|
111
115
|
} });
|
|
116
|
+
export const ReleaseRegistryCreatedEvent = new MoveStruct({ name: `${$moduleName}::ReleaseRegistryCreatedEvent`, fields: {
|
|
117
|
+
registry_id: bcs.Address,
|
|
118
|
+
created_by: bcs.Address
|
|
119
|
+
} });
|
|
112
120
|
export interface NewArguments {
|
|
121
|
+
self: RawTransactionArgument<string>;
|
|
113
122
|
title: RawTransactionArgument<string>;
|
|
114
123
|
tracks: TransactionArgument;
|
|
115
124
|
nonce: RawTransactionArgument<number | bigint>;
|
|
116
|
-
parent: RawTransactionArgument<string>;
|
|
117
125
|
}
|
|
118
126
|
export interface NewOptions {
|
|
119
127
|
package?: string;
|
|
120
128
|
arguments: NewArguments | [
|
|
129
|
+
self: RawTransactionArgument<string>,
|
|
121
130
|
title: RawTransactionArgument<string>,
|
|
122
131
|
tracks: TransactionArgument,
|
|
123
|
-
nonce: RawTransactionArgument<number | bigint
|
|
124
|
-
parent: RawTransactionArgument<string>
|
|
132
|
+
nonce: RawTransactionArgument<number | bigint>
|
|
125
133
|
];
|
|
126
134
|
}
|
|
127
135
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
136
|
+
* Assembles a release under the canonical registry namespace. This is
|
|
137
|
+
* permissionless: consent is carried by the supplied tracks, each of which was
|
|
138
|
+
* created for the exact derived release id. Returns the release and admin
|
|
139
|
+
* capability by value so the caller can compose `publish` and custody in the same
|
|
140
|
+
* PTB.
|
|
133
141
|
*/
|
|
134
142
|
export function _new(options: NewOptions) {
|
|
135
143
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
136
144
|
const argumentsTypes = [
|
|
145
|
+
null,
|
|
137
146
|
'0x1::string::String',
|
|
138
147
|
'vector<null>',
|
|
139
|
-
'u256'
|
|
140
|
-
'0x2::object::ID'
|
|
148
|
+
'u256'
|
|
141
149
|
] satisfies (string | null)[];
|
|
142
|
-
const parameterNames = ["
|
|
150
|
+
const parameterNames = ["self", "title", "tracks", "nonce"];
|
|
143
151
|
return (tx: Transaction) => tx.moveCall({
|
|
144
152
|
package: packageAddress,
|
|
145
153
|
module: 'release',
|
|
@@ -147,6 +155,70 @@ export function _new(options: NewOptions) {
|
|
|
147
155
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
148
156
|
});
|
|
149
157
|
}
|
|
158
|
+
export interface DeriveTargetReleaseIdArguments {
|
|
159
|
+
self: RawTransactionArgument<string>;
|
|
160
|
+
recordingIds: RawTransactionArgument<Array<string>>;
|
|
161
|
+
trackSplitValues: RawTransactionArgument<Array<number | bigint>>;
|
|
162
|
+
nonce: RawTransactionArgument<number | bigint>;
|
|
163
|
+
}
|
|
164
|
+
export interface DeriveTargetReleaseIdOptions {
|
|
165
|
+
package?: string;
|
|
166
|
+
arguments: DeriveTargetReleaseIdArguments | [
|
|
167
|
+
self: RawTransactionArgument<string>,
|
|
168
|
+
recordingIds: RawTransactionArgument<Array<string>>,
|
|
169
|
+
trackSplitValues: RawTransactionArgument<Array<number | bigint>>,
|
|
170
|
+
nonce: RawTransactionArgument<number | bigint>
|
|
171
|
+
];
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Derives the release id that `new` would claim under this registry, without
|
|
175
|
+
* creating a release. This immutable shared-object access remains parallelizable
|
|
176
|
+
* for clients preparing tracks.
|
|
177
|
+
*/
|
|
178
|
+
export function deriveTargetReleaseId(options: DeriveTargetReleaseIdOptions) {
|
|
179
|
+
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
180
|
+
const argumentsTypes = [
|
|
181
|
+
null,
|
|
182
|
+
'vector<0x2::object::ID>',
|
|
183
|
+
'vector<u64>',
|
|
184
|
+
'u256'
|
|
185
|
+
] satisfies (string | null)[];
|
|
186
|
+
const parameterNames = ["self", "recordingIds", "trackSplitValues", "nonce"];
|
|
187
|
+
return (tx: Transaction) => tx.moveCall({
|
|
188
|
+
package: packageAddress,
|
|
189
|
+
module: 'release',
|
|
190
|
+
function: 'derive_target_release_id',
|
|
191
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
export interface ReleaseRegistryIdArguments {
|
|
195
|
+
self: RawTransactionArgument<string>;
|
|
196
|
+
}
|
|
197
|
+
export interface ReleaseRegistryIdOptions {
|
|
198
|
+
package?: string;
|
|
199
|
+
arguments: ReleaseRegistryIdArguments | [
|
|
200
|
+
self: RawTransactionArgument<string>
|
|
201
|
+
];
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Returns the canonical registry's object ID, which is the derivation parent
|
|
205
|
+
* committed to by `new` and `derive_target_release_id`. Exported as the
|
|
206
|
+
* `ReleaseRegistry.id()` method to avoid colliding with the existing
|
|
207
|
+
* `release::id(&Release)` ABI function.
|
|
208
|
+
*/
|
|
209
|
+
export function releaseRegistryId(options: ReleaseRegistryIdOptions) {
|
|
210
|
+
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
211
|
+
const argumentsTypes = [
|
|
212
|
+
null
|
|
213
|
+
] satisfies (string | null)[];
|
|
214
|
+
const parameterNames = ["self"];
|
|
215
|
+
return (tx: Transaction) => tx.moveCall({
|
|
216
|
+
package: packageAddress,
|
|
217
|
+
module: 'release',
|
|
218
|
+
function: 'release_registry_id',
|
|
219
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
150
222
|
export interface PublishArguments {
|
|
151
223
|
self: RawTransactionArgument<string>;
|
|
152
224
|
cap: RawTransactionArgument<string>;
|
|
@@ -206,42 +278,6 @@ export function authorize(options: AuthorizeOptions) {
|
|
|
206
278
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
207
279
|
});
|
|
208
280
|
}
|
|
209
|
-
export interface DeriveTargetReleaseIdArguments {
|
|
210
|
-
recordingIds: RawTransactionArgument<Array<string>>;
|
|
211
|
-
trackSplitValues: RawTransactionArgument<Array<number | bigint>>;
|
|
212
|
-
nonce: RawTransactionArgument<number | bigint>;
|
|
213
|
-
parent: RawTransactionArgument<string>;
|
|
214
|
-
}
|
|
215
|
-
export interface DeriveTargetReleaseIdOptions {
|
|
216
|
-
package?: string;
|
|
217
|
-
arguments: DeriveTargetReleaseIdArguments | [
|
|
218
|
-
recordingIds: RawTransactionArgument<Array<string>>,
|
|
219
|
-
trackSplitValues: RawTransactionArgument<Array<number | bigint>>,
|
|
220
|
-
nonce: RawTransactionArgument<number | bigint>,
|
|
221
|
-
parent: RawTransactionArgument<string>
|
|
222
|
-
];
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Derives the target release ID that `new()` would produce for the given inputs
|
|
226
|
-
* and parent, without creating the object. This is the on-chain equivalent of the
|
|
227
|
-
* client-side `deriveReleaseId()` function.
|
|
228
|
-
*/
|
|
229
|
-
export function deriveTargetReleaseId(options: DeriveTargetReleaseIdOptions) {
|
|
230
|
-
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
231
|
-
const argumentsTypes = [
|
|
232
|
-
'vector<0x2::object::ID>',
|
|
233
|
-
'vector<u64>',
|
|
234
|
-
'u256',
|
|
235
|
-
'0x2::object::ID'
|
|
236
|
-
] satisfies (string | null)[];
|
|
237
|
-
const parameterNames = ["recordingIds", "trackSplitValues", "nonce", "parent"];
|
|
238
|
-
return (tx: Transaction) => tx.moveCall({
|
|
239
|
-
package: packageAddress,
|
|
240
|
-
module: 'release',
|
|
241
|
-
function: 'derive_target_release_id',
|
|
242
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
281
|
export interface IdArguments {
|
|
246
282
|
self: RawTransactionArgument<string>;
|
|
247
283
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Represents a track on a release, linking a recording to its position in the
|
|
8
8
|
* tracklist.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* A `Track` is the minimal positioned (recording, revenue-share) pair:
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* - `recording_id` — the routing target for the track's revenue, and the handle
|
|
13
13
|
* through which all other metadata (title, cover art, and the
|
|
14
14
|
* recording/composition share-type identities) is reached.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* release-specific and not derivable from the recording.
|
|
21
21
|
* - `state` — the assign-once lifecycle that carries (then sheds) the recording
|
|
22
22
|
* admin's target release commitment, made at creation; see `TrackState`.
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
|
|
25
25
|
* tracks from many different recordings/compositions, so it cannot be generic over
|
|
26
26
|
* their share types. It stores no title, cover art, or share-type — those are
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
* embeds exactly the facts on-chain consumers cannot reach any other way.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
import { MoveEnum, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.
|
|
31
|
+
import { MoveEnum, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
32
32
|
import { bcs } from '@mysten/sui/bcs';
|
|
33
33
|
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
34
|
-
import * as bps from './deps/bps/bps.
|
|
34
|
+
import * as bps from './deps/bps/bps.ts';
|
|
35
35
|
const $moduleName = '@local-pkg/miso::track';
|
|
36
36
|
/**
|
|
37
37
|
* Lifecycle state of a track within a release. A track is born `Unassigned`,
|