@misonetwork/sdk 0.7.0 → 0.9.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 +210 -136
- package/dist/client.d.ts +1211 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +56 -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 -15
- package/dist/contracts/miso/composition.d.ts.map +1 -1
- package/dist/contracts/miso/composition.js +2 -17
- package/dist/contracts/miso/composition.js.map +1 -1
- 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 -16
- package/dist/contracts/miso/recording.d.ts.map +1 -1
- package/dist/contracts/miso/recording.js +1 -16
- package/dist/contracts/miso/recording.js.map +1 -1
- package/dist/contracts/miso/release.d.ts +61 -48
- package/dist/contracts/miso/release.d.ts.map +1 -1
- package/dist/contracts/miso/release.js +59 -46
- 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/miso_party/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js +20 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/miso_party/party.d.ts +481 -0
- package/dist/contracts/miso_party/party.d.ts.map +1 -0
- package/dist/contracts/miso_party/party.js +527 -0
- package/dist/contracts/miso_party/party.js.map +1 -0
- package/dist/contracts/party_cta/party_cta.d.ts +120 -0
- package/dist/contracts/party_cta/party_cta.d.ts.map +1 -0
- package/dist/contracts/party_cta/party_cta.js +139 -0
- package/dist/contracts/party_cta/party_cta.js.map +1 -0
- package/dist/contracts/party_genre/party_genre.d.ts +117 -0
- package/dist/contracts/party_genre/party_genre.d.ts.map +1 -0
- package/dist/contracts/party_genre/party_genre.js +131 -0
- package/dist/contracts/party_genre/party_genre.js.map +1 -0
- package/dist/contracts/party_media/party_media.d.ts +86 -0
- package/dist/contracts/party_media/party_media.d.ts.map +1 -0
- package/dist/contracts/party_media/party_media.js +97 -0
- package/dist/contracts/party_media/party_media.js.map +1 -0
- package/dist/contracts/party_music/party_music.d.ts +209 -0
- package/dist/contracts/party_music/party_music.d.ts.map +1 -0
- package/dist/contracts/party_music/party_music.js +259 -0
- package/dist/contracts/party_music/party_music.js.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts +89 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.js +92 -0
- package/dist/contracts/party_platform_link/party_platform_link.js.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts +233 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.js +289 -0
- package/dist/contracts/party_pro_link/party_pro_link.js.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts +15 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js +17 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts +6 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js +8 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js.map +1 -0
- package/dist/contracts/party_profile/party_profile.d.ts +133 -0
- package/dist/contracts/party_profile/party_profile.d.ts.map +1 -0
- package/dist/contracts/party_profile/party_profile.js +153 -0
- package/dist/contracts/party_profile/party_profile.js.map +1 -0
- package/dist/contracts/party_roles/party_roles.d.ts +201 -0
- package/dist/contracts/party_roles/party_roles.d.ts.map +1 -0
- package/dist/contracts/party_roles/party_roles.js +237 -0
- package/dist/contracts/party_roles/party_roles.js.map +1 -0
- package/dist/contracts/party_social/party_social.d.ts +258 -0
- package/dist/contracts/party_social/party_social.d.ts.map +1 -0
- package/dist/contracts/party_social/party_social.js +320 -0
- package/dist/contracts/party_social/party_social.js.map +1 -0
- package/dist/contracts/party_tags/party_tags.d.ts +116 -0
- package/dist/contracts/party_tags/party_tags.d.ts.map +1 -0
- package/dist/contracts/party_tags/party_tags.js +130 -0
- package/dist/contracts/party_tags/party_tags.js.map +1 -0
- 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/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 +342 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.js +297 -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 +380 -0
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/pool.js +373 -0
- package/dist/contracts/royalty_pool/pool.js.map +1 -0
- package/dist/contracts/royalty_pool/stake.d.ts +189 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/stake.js +183 -0
- package/dist/contracts/royalty_pool/stake.js.map +1 -0
- package/dist/contracts.d.ts +48 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +54 -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 +132 -11
- package/dist/deployments.js.map +1 -1
- package/dist/events.d.ts +1067 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +120 -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 +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -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 +194 -0
- package/dist/packages.d.ts.map +1 -0
- package/dist/packages.js +214 -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/party/client.d.ts +233 -0
- package/dist/party/client.d.ts.map +1 -0
- package/dist/party/client.js +222 -0
- package/dist/party/client.js.map +1 -0
- package/dist/party/extensions/ctas.d.ts +19 -0
- package/dist/party/extensions/ctas.d.ts.map +1 -0
- package/dist/party/extensions/ctas.js +25 -0
- package/dist/party/extensions/ctas.js.map +1 -0
- package/dist/party/extensions/genres.d.ts +27 -0
- package/dist/party/extensions/genres.d.ts.map +1 -0
- package/dist/party/extensions/genres.js +31 -0
- package/dist/party/extensions/genres.js.map +1 -0
- package/dist/party/extensions/links.d.ts +65 -0
- package/dist/party/extensions/links.d.ts.map +1 -0
- package/dist/party/extensions/links.js +117 -0
- package/dist/party/extensions/links.js.map +1 -0
- package/dist/party/extensions/media.d.ts +36 -0
- package/dist/party/extensions/media.d.ts.map +1 -0
- package/dist/party/extensions/media.js +45 -0
- package/dist/party/extensions/media.js.map +1 -0
- package/dist/party/extensions/profile.d.ts +24 -0
- package/dist/party/extensions/profile.d.ts.map +1 -0
- package/dist/party/extensions/profile.js +48 -0
- package/dist/party/extensions/profile.js.map +1 -0
- package/dist/party/extensions/roles.d.ts +37 -0
- package/dist/party/extensions/roles.d.ts.map +1 -0
- package/dist/party/extensions/roles.js +46 -0
- package/dist/party/extensions/roles.js.map +1 -0
- package/dist/party/extensions/tags.d.ts +25 -0
- package/dist/party/extensions/tags.d.ts.map +1 -0
- package/dist/party/extensions/tags.js +25 -0
- package/dist/party/extensions/tags.js.map +1 -0
- package/dist/party/index.d.ts +12 -0
- package/dist/party/index.d.ts.map +1 -0
- package/dist/party/index.js +14 -0
- package/dist/party/index.js.map +1 -0
- package/dist/party/internal.d.ts +15 -0
- package/dist/party/internal.d.ts.map +1 -0
- package/dist/party/internal.js +103 -0
- package/dist/party/internal.js.map +1 -0
- package/dist/party/queries.d.ts +38 -0
- package/dist/party/queries.d.ts.map +1 -0
- package/dist/party/queries.js +232 -0
- package/dist/party/queries.js.map +1 -0
- package/dist/party/transactions.d.ts +74 -0
- package/dist/party/transactions.d.ts.map +1 -0
- package/dist/party/transactions.js +85 -0
- package/dist/party/transactions.js.map +1 -0
- package/dist/party/types.d.ts +54 -0
- package/dist/party/types.d.ts.map +1 -0
- package/dist/party/types.js +4 -0
- package/dist/party/types.js.map +1 -0
- 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 +18 -4
- package/src/client.ts +73 -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 -35
- package/src/contracts/miso/deps/bps/bps.ts +3 -3
- package/src/contracts/miso/recording.ts +10 -38
- package/src/contracts/miso/release.ts +99 -86
- package/src/contracts/miso/track.ts +5 -5
- package/src/contracts/miso_party/deps/sui/vec_set.ts +21 -0
- package/src/contracts/miso_party/party.ts +797 -0
- package/src/contracts/party_cta/party_cta.ts +212 -0
- package/src/contracts/party_genre/party_genre.ts +199 -0
- package/src/contracts/party_media/party_media.ts +141 -0
- package/src/contracts/party_music/party_music.ts +405 -0
- package/src/contracts/party_platform_link/party_platform_link.ts +148 -0
- package/src/contracts/party_pro_link/party_pro_link.ts +453 -0
- package/src/contracts/party_profile/deps/country_code/country_code.ts +19 -0
- package/src/contracts/party_profile/deps/language_code/language_code.ts +7 -0
- package/src/contracts/party_profile/party_profile.ts +239 -0
- package/src/contracts/party_roles/party_roles.ts +363 -0
- package/src/contracts/party_social/party_social.ts +502 -0
- package/src/contracts/party_tags/party_tags.ts +198 -0
- 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/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 +481 -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 +586 -0
- package/src/contracts/royalty_pool/stake.ts +291 -0
- package/src/contracts.ts +72 -6
- package/src/deployments.ts +175 -22
- package/src/events.ts +125 -0
- package/src/execute.ts +0 -4
- package/src/index.ts +8 -3
- package/src/internal.ts +0 -4
- package/src/numeric.ts +25 -0
- package/src/packages.ts +283 -0
- package/src/parsers.ts +32 -2
- package/src/party/client.ts +283 -0
- package/src/party/extensions/ctas.ts +46 -0
- package/src/party/extensions/genres.ts +62 -0
- package/src/party/extensions/links.ts +185 -0
- package/src/party/extensions/media.ts +72 -0
- package/src/party/extensions/profile.ts +81 -0
- package/src/party/extensions/roles.ts +94 -0
- package/src/party/extensions/tags.ts +54 -0
- package/src/party/index.ts +14 -0
- package/src/party/internal.ts +119 -0
- package/src/party/queries.ts +303 -0
- package/src/party/transactions.ts +167 -0
- package/src/party/types.ts +95 -0
- package/src/queries.ts +227 -25
- package/src/transactions.ts +254 -12
- package/src/types.ts +20 -0
- package/src/view.ts +12 -6
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Represents a party's credit on a work or activity. A credit pairs a display name
|
|
8
|
+
* with one or more roles, identifying how a party contributed to the work.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
12
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
13
|
+
const $moduleName = 'miso_credit::credit';
|
|
14
|
+
/**
|
|
15
|
+
* A credit attributing roles to a party on a work. Generic over the role type to
|
|
16
|
+
* support domain-specific roles.
|
|
17
|
+
*/
|
|
18
|
+
export function Credit<Role extends BcsType<any>>(...typeParameters: [
|
|
19
|
+
Role
|
|
20
|
+
]) {
|
|
21
|
+
return new MoveStruct({ name: `${$moduleName}::Credit<${typeParameters[0].name as Role['name']}>`, fields: {
|
|
22
|
+
/** Human-readable name to display for this credit. */
|
|
23
|
+
display_name: bcs.string(),
|
|
24
|
+
/** Roles assigned to the credited party. */
|
|
25
|
+
roles: bcs.vector(typeParameters[0])
|
|
26
|
+
} });
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
6
|
+
const $moduleName = '0x2::vec_map';
|
|
7
|
+
/** An entry in the map */
|
|
8
|
+
export function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
9
|
+
K,
|
|
10
|
+
V
|
|
11
|
+
]) {
|
|
12
|
+
return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
|
|
13
|
+
key: typeParameters[0],
|
|
14
|
+
value: typeParameters[1]
|
|
15
|
+
} });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A map data structure backed by a vector. The map is guaranteed not to contain
|
|
19
|
+
* duplicate keys, but entries are _not_ sorted by key--entries are included in
|
|
20
|
+
* insertion order. All operations are O(N) in the size of the map--the intention
|
|
21
|
+
* of this data structure is only to provide the convenience of programming against
|
|
22
|
+
* a map API. Large maps should use handwritten parent/child relationships instead.
|
|
23
|
+
* Maps that need sorted iteration rather than insertion order iteration should
|
|
24
|
+
* also be handwritten.
|
|
25
|
+
*/
|
|
26
|
+
export function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
27
|
+
K,
|
|
28
|
+
V
|
|
29
|
+
]) {
|
|
30
|
+
return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
|
|
31
|
+
contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
|
|
32
|
+
} });
|
|
33
|
+
}
|
|
@@ -7,28 +7,28 @@
|
|
|
7
7
|
* Represents a musical composition (song, instrumental work) in Miso. Compositions
|
|
8
8
|
* are the underlying written works that recordings are based on. Each composition
|
|
9
9
|
* has its own share 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`)
|
|
16
16
|
* - Deterministic addresses via derived object pattern
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
18
|
* Attribution (credits) is intentionally NOT part of core: it is display-oriented,
|
|
19
19
|
* varies across platforms, and is never read by the economics. It lives in a
|
|
20
20
|
* first-party credits extension attached via `uid_mut`, so core takes no
|
|
21
21
|
* dependency on an identity package and core publish enforces no attribution.
|
|
22
|
-
*
|
|
22
|
+
*
|
|
23
23
|
* ### Lifecycle and trust model
|
|
24
|
-
*
|
|
24
|
+
*
|
|
25
25
|
* A composition is `key`-only with no `drop`: a fresh `Initialized` object cannot
|
|
26
26
|
* be transferred, wrapped, publicly shared, or discarded, and its only by-value
|
|
27
27
|
* consumer is `publish`. Create-and-publish is therefore atomic by construction —
|
|
28
28
|
* an `Initialized` composition cannot outlive its creating transaction, and every
|
|
29
29
|
* composition that exists on-chain is `Published` and shared. There is
|
|
30
30
|
* deliberately no keep function; staged building must fit one transaction.
|
|
31
|
-
*
|
|
31
|
+
*
|
|
32
32
|
* `uid_mut` works in any lifecycle state and is permanent root over ALL dynamic
|
|
33
33
|
* fields on the object — including fields attached by other extensions. "Immutable
|
|
34
34
|
* after publish" covers the embedded fields only; extension-layer data stays
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
* holder as able to mutate or delete any extension data, forever.
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
import { MoveEnum, MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.
|
|
40
|
+
import { MoveEnum, MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
41
41
|
import { bcs } from '@mysten/sui/bcs';
|
|
42
42
|
import { type Transaction } from '@mysten/sui/transactions';
|
|
43
|
-
import * as bps from './deps/bps/bps.
|
|
43
|
+
import * as bps from './deps/bps/bps.ts';
|
|
44
44
|
const $moduleName = '@local-pkg/miso::composition';
|
|
45
45
|
/** Lifecycle state of a composition. */
|
|
46
46
|
export const CompositionState = new MoveEnum({ name: `${$moduleName}::CompositionState`, fields: {
|
|
@@ -156,33 +156,6 @@ export function publish(options: PublishOptions) {
|
|
|
156
156
|
typeArguments: options.typeArguments
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
export interface IdArguments {
|
|
160
|
-
self: RawTransactionArgument<string>;
|
|
161
|
-
}
|
|
162
|
-
export interface IdOptions {
|
|
163
|
-
package?: string;
|
|
164
|
-
arguments: IdArguments | [
|
|
165
|
-
self: RawTransactionArgument<string>
|
|
166
|
-
];
|
|
167
|
-
typeArguments: [
|
|
168
|
-
string
|
|
169
|
-
];
|
|
170
|
-
}
|
|
171
|
-
/** Returns the composition's object ID. */
|
|
172
|
-
export function id(options: IdOptions) {
|
|
173
|
-
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
174
|
-
const argumentsTypes = [
|
|
175
|
-
null
|
|
176
|
-
] satisfies (string | null)[];
|
|
177
|
-
const parameterNames = ["self"];
|
|
178
|
-
return (tx: Transaction) => tx.moveCall({
|
|
179
|
-
package: packageAddress,
|
|
180
|
-
module: 'composition',
|
|
181
|
-
function: 'id',
|
|
182
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
183
|
-
typeArguments: options.typeArguments
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
159
|
export interface TitleArguments {
|
|
187
160
|
self: RawTransactionArgument<string>;
|
|
188
161
|
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Basis-points arithmetic with a newtype wrapper.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* 1 bps = 0.01%. 10_000 bps = 100%.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* Storage-optimal: `BPS` stores a `u16` (2 bytes), the tightest width that fits
|
|
12
12
|
* the `[0, 10_000]` range. Apply functions cover every standard integer width
|
|
13
13
|
* (`u8` through `u256`); overflow safety on `u8`–`u128` is delegated to
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* (~1.16e73).
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { MoveTuple } from '../../../utils/index.
|
|
20
|
+
import { MoveTuple } from '../../../utils/index.ts';
|
|
21
21
|
import { bcs } from '@mysten/sui/bcs';
|
|
22
22
|
const $moduleName = 'bps::bps';
|
|
23
23
|
export const BPS = new MoveTuple({ name: `${$moduleName}::BPS`, fields: [bcs.u16()] });
|
|
@@ -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';
|
|
@@ -240,34 +240,6 @@ export function compositionId(options: CompositionIdOptions) {
|
|
|
240
240
|
typeArguments: options.typeArguments
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
export interface IdArguments {
|
|
244
|
-
self: RawTransactionArgument<string>;
|
|
245
|
-
}
|
|
246
|
-
export interface IdOptions {
|
|
247
|
-
package?: string;
|
|
248
|
-
arguments: IdArguments | [
|
|
249
|
-
self: RawTransactionArgument<string>
|
|
250
|
-
];
|
|
251
|
-
typeArguments: [
|
|
252
|
-
string,
|
|
253
|
-
string
|
|
254
|
-
];
|
|
255
|
-
}
|
|
256
|
-
/** Returns the recording's object ID. */
|
|
257
|
-
export function id(options: IdOptions) {
|
|
258
|
-
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
259
|
-
const argumentsTypes = [
|
|
260
|
-
null
|
|
261
|
-
] satisfies (string | null)[];
|
|
262
|
-
const parameterNames = ["self"];
|
|
263
|
-
return (tx: Transaction) => tx.moveCall({
|
|
264
|
-
package: packageAddress,
|
|
265
|
-
module: 'recording',
|
|
266
|
-
function: 'id',
|
|
267
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
268
|
-
typeArguments: options.typeArguments
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
243
|
export interface UidArguments {
|
|
272
244
|
self: RawTransactionArgument<string>;
|
|
273
245
|
}
|
|
@@ -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,121 +155,126 @@ export function _new(options: NewOptions) {
|
|
|
147
155
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
148
156
|
});
|
|
149
157
|
}
|
|
150
|
-
export interface
|
|
158
|
+
export interface DeriveTargetReleaseIdArguments {
|
|
151
159
|
self: RawTransactionArgument<string>;
|
|
152
|
-
|
|
160
|
+
recordingIds: RawTransactionArgument<Array<string>>;
|
|
161
|
+
trackSplitValues: RawTransactionArgument<Array<number | bigint>>;
|
|
162
|
+
nonce: RawTransactionArgument<number | bigint>;
|
|
153
163
|
}
|
|
154
|
-
export interface
|
|
164
|
+
export interface DeriveTargetReleaseIdOptions {
|
|
155
165
|
package?: string;
|
|
156
|
-
arguments:
|
|
166
|
+
arguments: DeriveTargetReleaseIdArguments | [
|
|
157
167
|
self: RawTransactionArgument<string>,
|
|
158
|
-
|
|
168
|
+
recordingIds: RawTransactionArgument<Array<string>>,
|
|
169
|
+
trackSplitValues: RawTransactionArgument<Array<number | bigint>>,
|
|
170
|
+
nonce: RawTransactionArgument<number | bigint>
|
|
159
171
|
];
|
|
160
172
|
}
|
|
161
173
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* Note: core enforces no attribution requirement — credits live in the credits
|
|
166
|
-
* extension and may be attached before or after publish via `uid_mut`.
|
|
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.
|
|
167
177
|
*/
|
|
168
|
-
export function
|
|
178
|
+
export function deriveTargetReleaseId(options: DeriveTargetReleaseIdOptions) {
|
|
169
179
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
170
180
|
const argumentsTypes = [
|
|
171
181
|
null,
|
|
172
|
-
|
|
173
|
-
'
|
|
182
|
+
'vector<0x2::object::ID>',
|
|
183
|
+
'vector<u64>',
|
|
184
|
+
'u256'
|
|
174
185
|
] satisfies (string | null)[];
|
|
175
|
-
const parameterNames = ["self", "
|
|
186
|
+
const parameterNames = ["self", "recordingIds", "trackSplitValues", "nonce"];
|
|
176
187
|
return (tx: Transaction) => tx.moveCall({
|
|
177
188
|
package: packageAddress,
|
|
178
189
|
module: 'release',
|
|
179
|
-
function: '
|
|
190
|
+
function: 'derive_target_release_id',
|
|
180
191
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
181
192
|
});
|
|
182
193
|
}
|
|
183
|
-
export interface
|
|
194
|
+
export interface ReleaseRegistryIdArguments {
|
|
184
195
|
self: RawTransactionArgument<string>;
|
|
185
|
-
cap: RawTransactionArgument<string>;
|
|
186
196
|
}
|
|
187
|
-
export interface
|
|
197
|
+
export interface ReleaseRegistryIdOptions {
|
|
188
198
|
package?: string;
|
|
189
|
-
arguments:
|
|
190
|
-
self: RawTransactionArgument<string
|
|
191
|
-
cap: RawTransactionArgument<string>
|
|
199
|
+
arguments: ReleaseRegistryIdArguments | [
|
|
200
|
+
self: RawTransactionArgument<string>
|
|
192
201
|
];
|
|
193
202
|
}
|
|
194
|
-
/**
|
|
195
|
-
|
|
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) {
|
|
196
210
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
197
211
|
const argumentsTypes = [
|
|
198
|
-
null,
|
|
199
212
|
null
|
|
200
213
|
] satisfies (string | null)[];
|
|
201
|
-
const parameterNames = ["self"
|
|
214
|
+
const parameterNames = ["self"];
|
|
202
215
|
return (tx: Transaction) => tx.moveCall({
|
|
203
216
|
package: packageAddress,
|
|
204
217
|
module: 'release',
|
|
205
|
-
function: '
|
|
218
|
+
function: 'release_registry_id',
|
|
206
219
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
207
220
|
});
|
|
208
221
|
}
|
|
209
|
-
export interface
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
nonce: RawTransactionArgument<number | bigint>;
|
|
213
|
-
parent: RawTransactionArgument<string>;
|
|
222
|
+
export interface PublishArguments {
|
|
223
|
+
self: RawTransactionArgument<string>;
|
|
224
|
+
cap: RawTransactionArgument<string>;
|
|
214
225
|
}
|
|
215
|
-
export interface
|
|
226
|
+
export interface PublishOptions {
|
|
216
227
|
package?: string;
|
|
217
|
-
arguments:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
nonce: RawTransactionArgument<number | bigint>,
|
|
221
|
-
parent: RawTransactionArgument<string>
|
|
228
|
+
arguments: PublishArguments | [
|
|
229
|
+
self: RawTransactionArgument<string>,
|
|
230
|
+
cap: RawTransactionArgument<string>
|
|
222
231
|
];
|
|
223
232
|
}
|
|
224
233
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
234
|
+
* Publishes the release, making it immutable. Track splits must be set and sum to
|
|
235
|
+
* 100% before publishing. Required State: Initialized
|
|
236
|
+
*
|
|
237
|
+
* Note: core enforces no attribution requirement — credits live in the credits
|
|
238
|
+
* extension and may be attached before or after publish via `uid_mut`.
|
|
228
239
|
*/
|
|
229
|
-
export function
|
|
240
|
+
export function publish(options: PublishOptions) {
|
|
230
241
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
231
242
|
const argumentsTypes = [
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
'
|
|
235
|
-
'0x2::object::ID'
|
|
243
|
+
null,
|
|
244
|
+
null,
|
|
245
|
+
'0x2::clock::Clock'
|
|
236
246
|
] satisfies (string | null)[];
|
|
237
|
-
const parameterNames = ["
|
|
247
|
+
const parameterNames = ["self", "cap"];
|
|
238
248
|
return (tx: Transaction) => tx.moveCall({
|
|
239
249
|
package: packageAddress,
|
|
240
250
|
module: 'release',
|
|
241
|
-
function: '
|
|
251
|
+
function: 'publish',
|
|
242
252
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
243
253
|
});
|
|
244
254
|
}
|
|
245
|
-
export interface
|
|
255
|
+
export interface AuthorizeArguments {
|
|
246
256
|
self: RawTransactionArgument<string>;
|
|
257
|
+
cap: RawTransactionArgument<string>;
|
|
247
258
|
}
|
|
248
|
-
export interface
|
|
259
|
+
export interface AuthorizeOptions {
|
|
249
260
|
package?: string;
|
|
250
|
-
arguments:
|
|
251
|
-
self: RawTransactionArgument<string
|
|
261
|
+
arguments: AuthorizeArguments | [
|
|
262
|
+
self: RawTransactionArgument<string>,
|
|
263
|
+
cap: RawTransactionArgument<string>
|
|
252
264
|
];
|
|
253
265
|
}
|
|
254
|
-
/**
|
|
255
|
-
export function
|
|
266
|
+
/** Verifies that the admin capability matches this release. */
|
|
267
|
+
export function authorize(options: AuthorizeOptions) {
|
|
256
268
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
257
269
|
const argumentsTypes = [
|
|
270
|
+
null,
|
|
258
271
|
null
|
|
259
272
|
] satisfies (string | null)[];
|
|
260
|
-
const parameterNames = ["self"];
|
|
273
|
+
const parameterNames = ["self", "cap"];
|
|
261
274
|
return (tx: Transaction) => tx.moveCall({
|
|
262
275
|
package: packageAddress,
|
|
263
276
|
module: 'release',
|
|
264
|
-
function: '
|
|
277
|
+
function: 'authorize',
|
|
265
278
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
266
279
|
});
|
|
267
280
|
}
|
|
@@ -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`,
|