@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,36 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `PerTrack<Data>` — one `Data` value per track of a release, held in tracklist
|
|
8
|
+
* order.
|
|
9
|
+
*
|
|
10
|
+
* A release's tracks are a flat, ordered `vector<Track>`, frozen at release
|
|
11
|
+
* creation. `PerTrack` is the parallel array to that list: index `i` holds the
|
|
12
|
+
* payload for the `i`-th track. It is the shared shape behind per-track release
|
|
13
|
+
* metadata such as cover art (`PerTrack<Option<CoverArt>>`) or genre — and the
|
|
14
|
+
* natural home for display grouping (disc/side boundaries), which core
|
|
15
|
+
* deliberately does not store.
|
|
16
|
+
*
|
|
17
|
+
* Construction reads the `Release` and sizes/validates the array against the
|
|
18
|
+
* tracklist length, so a `PerTrack` is parallel to the tracklist _by construction_
|
|
19
|
+
* — an extension cannot attach a misaligned array. Because a release's tracklist
|
|
20
|
+
* is frozen at creation, that alignment holds for the release's whole life.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
24
|
+
import { MoveTuple } from '../../../utils/index.ts';
|
|
25
|
+
const $moduleName = 'per_track::per_track';
|
|
26
|
+
/**
|
|
27
|
+
* One `Data` per track, indexed by the release's tracklist position. `Data` is the
|
|
28
|
+
* per-track payload — e.g. `CoverArt` when every track carries one, or
|
|
29
|
+
* `Option<CoverArt>` for override-style metadata layered over an album-level
|
|
30
|
+
* default.
|
|
31
|
+
*/
|
|
32
|
+
export function PerTrack<Data extends BcsType<any>>(...typeParameters: [
|
|
33
|
+
Data
|
|
34
|
+
]) {
|
|
35
|
+
return new MoveTuple({ name: `${$moduleName}::PerTrack<${typeParameters[0].name as Data['name']}>`, fields: [bcs.vector(typeParameters[0])] });
|
|
36
|
+
}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Genre assignment for a Miso release: an album-level primary + secondary genres,
|
|
8
|
+
* plus optional per-track primary overrides.
|
|
9
|
+
*
|
|
10
|
+
* Genre is presentation, not objective recording data, so it is assigned on the
|
|
11
|
+
* release (the consumer object), not the recording. Stored as a single
|
|
12
|
+
* `ReleaseGenre` dynamic field on the release's UID, gated by the
|
|
13
|
+
* `ReleaseAdminCap`.
|
|
14
|
+
*
|
|
15
|
+
* A track's effective primary genre resolves as: its per-track override if set,
|
|
16
|
+
* else the album primary.
|
|
17
|
+
*
|
|
18
|
+
* A genre is either the album primary or a secondary, never both — the two are
|
|
19
|
+
* kept disjoint: setting the primary to a current secondary aborts (remove it from
|
|
20
|
+
* the secondaries first), and adding the current primary as a secondary aborts.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
24
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
25
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
26
|
+
import * as per_track from './deps/per_track/per_track.ts';
|
|
27
|
+
const $moduleName = '@local-pkg/release_genre::release_genre';
|
|
28
|
+
export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
|
|
29
|
+
export const ReleaseGenre = new MoveStruct({ name: `${$moduleName}::ReleaseGenre`, fields: {
|
|
30
|
+
primary: bcs.Address,
|
|
31
|
+
secondary: bcs.vector(bcs.Address),
|
|
32
|
+
track_primary: per_track.PerTrack(bcs.option(bcs.Address))
|
|
33
|
+
} });
|
|
34
|
+
export const PrimaryGenreSetEvent = new MoveStruct({ name: `${$moduleName}::PrimaryGenreSetEvent`, fields: {
|
|
35
|
+
release_id: bcs.Address,
|
|
36
|
+
genre_id: bcs.Address
|
|
37
|
+
} });
|
|
38
|
+
export const SecondaryGenreAddedEvent = new MoveStruct({ name: `${$moduleName}::SecondaryGenreAddedEvent`, fields: {
|
|
39
|
+
release_id: bcs.Address,
|
|
40
|
+
genre_id: bcs.Address
|
|
41
|
+
} });
|
|
42
|
+
export const SecondaryGenreRemovedEvent = new MoveStruct({ name: `${$moduleName}::SecondaryGenreRemovedEvent`, fields: {
|
|
43
|
+
release_id: bcs.Address,
|
|
44
|
+
genre_id: bcs.Address
|
|
45
|
+
} });
|
|
46
|
+
export const TrackPrimaryGenreSetEvent = new MoveStruct({ name: `${$moduleName}::TrackPrimaryGenreSetEvent`, fields: {
|
|
47
|
+
release_id: bcs.Address,
|
|
48
|
+
track_index: bcs.u64(),
|
|
49
|
+
genre_id: bcs.Address
|
|
50
|
+
} });
|
|
51
|
+
export const TrackPrimaryGenreUnsetEvent = new MoveStruct({ name: `${$moduleName}::TrackPrimaryGenreUnsetEvent`, fields: {
|
|
52
|
+
release_id: bcs.Address,
|
|
53
|
+
track_index: bcs.u64()
|
|
54
|
+
} });
|
|
55
|
+
export interface SetPrimaryGenreArguments {
|
|
56
|
+
self: RawTransactionArgument<string>;
|
|
57
|
+
cap: RawTransactionArgument<string>;
|
|
58
|
+
genre: RawTransactionArgument<string>;
|
|
59
|
+
}
|
|
60
|
+
export interface SetPrimaryGenreOptions {
|
|
61
|
+
package?: string;
|
|
62
|
+
arguments: SetPrimaryGenreArguments | [
|
|
63
|
+
self: RawTransactionArgument<string>,
|
|
64
|
+
cap: RawTransactionArgument<string>,
|
|
65
|
+
genre: RawTransactionArgument<string>
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Sets (or replaces) the album primary genre. Gated by the release admin cap.
|
|
70
|
+
* Aborts if the genre is currently an album secondary — remove it from the
|
|
71
|
+
* secondaries first (primary and secondary are kept disjoint).
|
|
72
|
+
*/
|
|
73
|
+
export function setPrimaryGenre(options: SetPrimaryGenreOptions) {
|
|
74
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
75
|
+
const argumentsTypes = [
|
|
76
|
+
null,
|
|
77
|
+
null,
|
|
78
|
+
null
|
|
79
|
+
] satisfies (string | null)[];
|
|
80
|
+
const parameterNames = ["self", "cap", "genre"];
|
|
81
|
+
return (tx: Transaction) => tx.moveCall({
|
|
82
|
+
package: packageAddress,
|
|
83
|
+
module: 'release_genre',
|
|
84
|
+
function: 'set_primary_genre',
|
|
85
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export interface AddSecondaryGenreArguments {
|
|
89
|
+
self: RawTransactionArgument<string>;
|
|
90
|
+
cap: RawTransactionArgument<string>;
|
|
91
|
+
genre: RawTransactionArgument<string>;
|
|
92
|
+
}
|
|
93
|
+
export interface AddSecondaryGenreOptions {
|
|
94
|
+
package?: string;
|
|
95
|
+
arguments: AddSecondaryGenreArguments | [
|
|
96
|
+
self: RawTransactionArgument<string>,
|
|
97
|
+
cap: RawTransactionArgument<string>,
|
|
98
|
+
genre: RawTransactionArgument<string>
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Adds an album secondary genre. Requires the album primary first. Rejects a
|
|
103
|
+
* secondary equal to the primary, duplicates, and counts at/above the maximum.
|
|
104
|
+
*/
|
|
105
|
+
export function addSecondaryGenre(options: AddSecondaryGenreOptions) {
|
|
106
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
107
|
+
const argumentsTypes = [
|
|
108
|
+
null,
|
|
109
|
+
null,
|
|
110
|
+
null
|
|
111
|
+
] satisfies (string | null)[];
|
|
112
|
+
const parameterNames = ["self", "cap", "genre"];
|
|
113
|
+
return (tx: Transaction) => tx.moveCall({
|
|
114
|
+
package: packageAddress,
|
|
115
|
+
module: 'release_genre',
|
|
116
|
+
function: 'add_secondary_genre',
|
|
117
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export interface RemoveSecondaryGenreArguments {
|
|
121
|
+
self: RawTransactionArgument<string>;
|
|
122
|
+
cap: RawTransactionArgument<string>;
|
|
123
|
+
genre: RawTransactionArgument<string>;
|
|
124
|
+
}
|
|
125
|
+
export interface RemoveSecondaryGenreOptions {
|
|
126
|
+
package?: string;
|
|
127
|
+
arguments: RemoveSecondaryGenreArguments | [
|
|
128
|
+
self: RawTransactionArgument<string>,
|
|
129
|
+
cap: RawTransactionArgument<string>,
|
|
130
|
+
genre: RawTransactionArgument<string>
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
/** Removes an album secondary genre. */
|
|
134
|
+
export function removeSecondaryGenre(options: RemoveSecondaryGenreOptions) {
|
|
135
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
136
|
+
const argumentsTypes = [
|
|
137
|
+
null,
|
|
138
|
+
null,
|
|
139
|
+
null
|
|
140
|
+
] satisfies (string | null)[];
|
|
141
|
+
const parameterNames = ["self", "cap", "genre"];
|
|
142
|
+
return (tx: Transaction) => tx.moveCall({
|
|
143
|
+
package: packageAddress,
|
|
144
|
+
module: 'release_genre',
|
|
145
|
+
function: 'remove_secondary_genre',
|
|
146
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
export interface SetTrackPrimaryGenreArguments {
|
|
150
|
+
self: RawTransactionArgument<string>;
|
|
151
|
+
cap: RawTransactionArgument<string>;
|
|
152
|
+
trackIndex: RawTransactionArgument<number | bigint>;
|
|
153
|
+
genre: RawTransactionArgument<string>;
|
|
154
|
+
}
|
|
155
|
+
export interface SetTrackPrimaryGenreOptions {
|
|
156
|
+
package?: string;
|
|
157
|
+
arguments: SetTrackPrimaryGenreArguments | [
|
|
158
|
+
self: RawTransactionArgument<string>,
|
|
159
|
+
cap: RawTransactionArgument<string>,
|
|
160
|
+
trackIndex: RawTransactionArgument<number | bigint>,
|
|
161
|
+
genre: RawTransactionArgument<string>
|
|
162
|
+
];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Sets (or replaces) a track's primary-genre override (by tracklist index).
|
|
166
|
+
* Requires the album primary first. Aborts if the index is out of range.
|
|
167
|
+
*/
|
|
168
|
+
export function setTrackPrimaryGenre(options: SetTrackPrimaryGenreOptions) {
|
|
169
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
170
|
+
const argumentsTypes = [
|
|
171
|
+
null,
|
|
172
|
+
null,
|
|
173
|
+
'u64',
|
|
174
|
+
null
|
|
175
|
+
] satisfies (string | null)[];
|
|
176
|
+
const parameterNames = ["self", "cap", "trackIndex", "genre"];
|
|
177
|
+
return (tx: Transaction) => tx.moveCall({
|
|
178
|
+
package: packageAddress,
|
|
179
|
+
module: 'release_genre',
|
|
180
|
+
function: 'set_track_primary_genre',
|
|
181
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
export interface UnsetTrackPrimaryGenreArguments {
|
|
185
|
+
self: RawTransactionArgument<string>;
|
|
186
|
+
cap: RawTransactionArgument<string>;
|
|
187
|
+
trackIndex: RawTransactionArgument<number | bigint>;
|
|
188
|
+
}
|
|
189
|
+
export interface UnsetTrackPrimaryGenreOptions {
|
|
190
|
+
package?: string;
|
|
191
|
+
arguments: UnsetTrackPrimaryGenreArguments | [
|
|
192
|
+
self: RawTransactionArgument<string>,
|
|
193
|
+
cap: RawTransactionArgument<string>,
|
|
194
|
+
trackIndex: RawTransactionArgument<number | bigint>
|
|
195
|
+
];
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Removes a track's primary-genre override — the track falls back to the album
|
|
199
|
+
* primary. Aborts if the index is out of range.
|
|
200
|
+
*/
|
|
201
|
+
export function unsetTrackPrimaryGenre(options: UnsetTrackPrimaryGenreOptions) {
|
|
202
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
203
|
+
const argumentsTypes = [
|
|
204
|
+
null,
|
|
205
|
+
null,
|
|
206
|
+
'u64'
|
|
207
|
+
] satisfies (string | null)[];
|
|
208
|
+
const parameterNames = ["self", "cap", "trackIndex"];
|
|
209
|
+
return (tx: Transaction) => tx.moveCall({
|
|
210
|
+
package: packageAddress,
|
|
211
|
+
module: 'release_genre',
|
|
212
|
+
function: 'unset_track_primary_genre',
|
|
213
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
export interface HasGenreArguments {
|
|
217
|
+
self: RawTransactionArgument<string>;
|
|
218
|
+
}
|
|
219
|
+
export interface HasGenreOptions {
|
|
220
|
+
package?: string;
|
|
221
|
+
arguments: HasGenreArguments | [
|
|
222
|
+
self: RawTransactionArgument<string>
|
|
223
|
+
];
|
|
224
|
+
}
|
|
225
|
+
/** Returns whether the release has a genre assignment. */
|
|
226
|
+
export function hasGenre(options: HasGenreOptions) {
|
|
227
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
228
|
+
const argumentsTypes = [
|
|
229
|
+
null
|
|
230
|
+
] satisfies (string | null)[];
|
|
231
|
+
const parameterNames = ["self"];
|
|
232
|
+
return (tx: Transaction) => tx.moveCall({
|
|
233
|
+
package: packageAddress,
|
|
234
|
+
module: 'release_genre',
|
|
235
|
+
function: 'has_genre',
|
|
236
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
export interface PrimaryGenreArguments {
|
|
240
|
+
self: RawTransactionArgument<string>;
|
|
241
|
+
}
|
|
242
|
+
export interface PrimaryGenreOptions {
|
|
243
|
+
package?: string;
|
|
244
|
+
arguments: PrimaryGenreArguments | [
|
|
245
|
+
self: RawTransactionArgument<string>
|
|
246
|
+
];
|
|
247
|
+
}
|
|
248
|
+
/** Returns the album primary genre id, if set. */
|
|
249
|
+
export function primaryGenre(options: PrimaryGenreOptions) {
|
|
250
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
251
|
+
const argumentsTypes = [
|
|
252
|
+
null
|
|
253
|
+
] satisfies (string | null)[];
|
|
254
|
+
const parameterNames = ["self"];
|
|
255
|
+
return (tx: Transaction) => tx.moveCall({
|
|
256
|
+
package: packageAddress,
|
|
257
|
+
module: 'release_genre',
|
|
258
|
+
function: 'primary_genre',
|
|
259
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
export interface SecondaryGenresArguments {
|
|
263
|
+
self: RawTransactionArgument<string>;
|
|
264
|
+
}
|
|
265
|
+
export interface SecondaryGenresOptions {
|
|
266
|
+
package?: string;
|
|
267
|
+
arguments: SecondaryGenresArguments | [
|
|
268
|
+
self: RawTransactionArgument<string>
|
|
269
|
+
];
|
|
270
|
+
}
|
|
271
|
+
/** Returns the album secondary genre ids (empty if none). */
|
|
272
|
+
export function secondaryGenres(options: SecondaryGenresOptions) {
|
|
273
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
274
|
+
const argumentsTypes = [
|
|
275
|
+
null
|
|
276
|
+
] satisfies (string | null)[];
|
|
277
|
+
const parameterNames = ["self"];
|
|
278
|
+
return (tx: Transaction) => tx.moveCall({
|
|
279
|
+
package: packageAddress,
|
|
280
|
+
module: 'release_genre',
|
|
281
|
+
function: 'secondary_genres',
|
|
282
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
export interface TrackPrimaryGenreArguments {
|
|
286
|
+
self: RawTransactionArgument<string>;
|
|
287
|
+
trackIndex: RawTransactionArgument<number | bigint>;
|
|
288
|
+
}
|
|
289
|
+
export interface TrackPrimaryGenreOptions {
|
|
290
|
+
package?: string;
|
|
291
|
+
arguments: TrackPrimaryGenreArguments | [
|
|
292
|
+
self: RawTransactionArgument<string>,
|
|
293
|
+
trackIndex: RawTransactionArgument<number | bigint>
|
|
294
|
+
];
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Returns a track's effective primary genre: its override if set, else the album
|
|
298
|
+
* primary. None if no genre is assigned to the release. Aborts if the track index
|
|
299
|
+
* is out of range (when an assignment exists).
|
|
300
|
+
*/
|
|
301
|
+
export function trackPrimaryGenre(options: TrackPrimaryGenreOptions) {
|
|
302
|
+
const packageAddress = options.package ?? '@local-pkg/release_genre';
|
|
303
|
+
const argumentsTypes = [
|
|
304
|
+
null,
|
|
305
|
+
'u64'
|
|
306
|
+
] satisfies (string | null)[];
|
|
307
|
+
const parameterNames = ["self", "trackIndex"];
|
|
308
|
+
return (tx: Transaction) => tx.moveCall({
|
|
309
|
+
package: packageAddress,
|
|
310
|
+
module: 'release_genre',
|
|
311
|
+
function: 'track_primary_genre',
|
|
312
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
313
|
+
});
|
|
314
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What a release calls itself — "Album", "EP", "Mixtape", "Split" — asserted by
|
|
8
|
+
* whoever holds the release's admin cap, and believed.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately a free string rather than an enum. An enum would not decide the
|
|
11
|
+
* classification (the admin still picks) but it would decide the _menu_, and
|
|
12
|
+
* deciding which self-descriptions are legitimate is not the protocol's job.
|
|
13
|
+
* Artists release beat tapes and splits and things nobody has named yet; a closed
|
|
14
|
+
* set would make each of those a package swap, and in the meantime would quietly
|
|
15
|
+
* push releases into whichever official-looking box fit worst.
|
|
16
|
+
*
|
|
17
|
+
* Nothing here derives the value or checks it for plausibility. A four-track
|
|
18
|
+
* release may call itself an Album and a twelve-track one an EP; both happen, and
|
|
19
|
+
* the artist's intent is the fact worth recording. The only checks are structural
|
|
20
|
+
* — non-empty and bounded — so the field stays storable.
|
|
21
|
+
*
|
|
22
|
+
* This is the opposite call from `release_genre`, on purpose. Genre is a curated
|
|
23
|
+
* vocabulary because discovery and reward-eligibility depend on releases agreeing
|
|
24
|
+
* with each other about what a genre _is_. Nothing depends on two releases
|
|
25
|
+
* agreeing about what an EP is.
|
|
26
|
+
*
|
|
27
|
+
* The cost of that freedom lands on readers: "EP", "ep" and "Extended Play" are
|
|
28
|
+
* three distinct values here. Clients that group or facet by kind should normalise
|
|
29
|
+
* (case-fold at minimum) rather than expect canonical strings.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
33
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
34
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
35
|
+
const $moduleName = '@local-pkg/release_kind::release_kind';
|
|
36
|
+
export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
|
|
37
|
+
export const KindSetEvent = new MoveStruct({ name: `${$moduleName}::KindSetEvent`, fields: {
|
|
38
|
+
release_id: bcs.Address,
|
|
39
|
+
kind: bcs.string()
|
|
40
|
+
} });
|
|
41
|
+
export const KindUnsetEvent = new MoveStruct({ name: `${$moduleName}::KindUnsetEvent`, fields: {
|
|
42
|
+
release_id: bcs.Address
|
|
43
|
+
} });
|
|
44
|
+
export interface SetKindArguments {
|
|
45
|
+
self: RawTransactionArgument<string>;
|
|
46
|
+
cap: RawTransactionArgument<string>;
|
|
47
|
+
kind: RawTransactionArgument<string>;
|
|
48
|
+
}
|
|
49
|
+
export interface SetKindOptions {
|
|
50
|
+
package?: string;
|
|
51
|
+
arguments: SetKindArguments | [
|
|
52
|
+
self: RawTransactionArgument<string>,
|
|
53
|
+
cap: RawTransactionArgument<string>,
|
|
54
|
+
kind: RawTransactionArgument<string>
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Sets (or replaces) what the release calls itself.
|
|
59
|
+
*
|
|
60
|
+
* The string is stored exactly as given, including case — it is the release's own
|
|
61
|
+
* word for itself, and normalising it here would be the protocol having an opinion
|
|
62
|
+
* after all.
|
|
63
|
+
*/
|
|
64
|
+
export function setKind(options: SetKindOptions) {
|
|
65
|
+
const packageAddress = options.package ?? '@local-pkg/release_kind';
|
|
66
|
+
const argumentsTypes = [
|
|
67
|
+
null,
|
|
68
|
+
null,
|
|
69
|
+
'0x1::string::String'
|
|
70
|
+
] satisfies (string | null)[];
|
|
71
|
+
const parameterNames = ["self", "cap", "kind"];
|
|
72
|
+
return (tx: Transaction) => tx.moveCall({
|
|
73
|
+
package: packageAddress,
|
|
74
|
+
module: 'release_kind',
|
|
75
|
+
function: 'set_kind',
|
|
76
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
export interface UnsetKindArguments {
|
|
80
|
+
self: RawTransactionArgument<string>;
|
|
81
|
+
cap: RawTransactionArgument<string>;
|
|
82
|
+
}
|
|
83
|
+
export interface UnsetKindOptions {
|
|
84
|
+
package?: string;
|
|
85
|
+
arguments: UnsetKindArguments | [
|
|
86
|
+
self: RawTransactionArgument<string>,
|
|
87
|
+
cap: RawTransactionArgument<string>
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Removes the kind, if any. Idempotent. Leaves the release having said nothing
|
|
92
|
+
* about what it is, which is a different state from calling itself anything.
|
|
93
|
+
*/
|
|
94
|
+
export function unsetKind(options: UnsetKindOptions) {
|
|
95
|
+
const packageAddress = options.package ?? '@local-pkg/release_kind';
|
|
96
|
+
const argumentsTypes = [
|
|
97
|
+
null,
|
|
98
|
+
null
|
|
99
|
+
] satisfies (string | null)[];
|
|
100
|
+
const parameterNames = ["self", "cap"];
|
|
101
|
+
return (tx: Transaction) => tx.moveCall({
|
|
102
|
+
package: packageAddress,
|
|
103
|
+
module: 'release_kind',
|
|
104
|
+
function: 'unset_kind',
|
|
105
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export interface HasKindArguments {
|
|
109
|
+
self: RawTransactionArgument<string>;
|
|
110
|
+
}
|
|
111
|
+
export interface HasKindOptions {
|
|
112
|
+
package?: string;
|
|
113
|
+
arguments: HasKindArguments | [
|
|
114
|
+
self: RawTransactionArgument<string>
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
/** Whether a kind is attached to this release. */
|
|
118
|
+
export function hasKind(options: HasKindOptions) {
|
|
119
|
+
const packageAddress = options.package ?? '@local-pkg/release_kind';
|
|
120
|
+
const argumentsTypes = [
|
|
121
|
+
null
|
|
122
|
+
] satisfies (string | null)[];
|
|
123
|
+
const parameterNames = ["self"];
|
|
124
|
+
return (tx: Transaction) => tx.moveCall({
|
|
125
|
+
package: packageAddress,
|
|
126
|
+
module: 'release_kind',
|
|
127
|
+
function: 'has_kind',
|
|
128
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export interface KindArguments {
|
|
132
|
+
self: RawTransactionArgument<string>;
|
|
133
|
+
}
|
|
134
|
+
export interface KindOptions {
|
|
135
|
+
package?: string;
|
|
136
|
+
arguments: KindArguments | [
|
|
137
|
+
self: RawTransactionArgument<string>
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
/** What the release calls itself. Aborts if nothing is attached. */
|
|
141
|
+
export function kind(options: KindOptions) {
|
|
142
|
+
const packageAddress = options.package ?? '@local-pkg/release_kind';
|
|
143
|
+
const argumentsTypes = [
|
|
144
|
+
null
|
|
145
|
+
] satisfies (string | null)[];
|
|
146
|
+
const parameterNames = ["self"];
|
|
147
|
+
return (tx: Transaction) => tx.moveCall({
|
|
148
|
+
package: packageAddress,
|
|
149
|
+
module: 'release_kind',
|
|
150
|
+
function: 'kind',
|
|
151
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
152
|
+
});
|
|
153
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A position holding share tokens registered against a `RoyaltyPool`.
|
|
8
|
+
*
|
|
9
|
+
* Stakes are owned objects with an immutable balance — to increase a holder's
|
|
10
|
+
* total staked amount, mint additional Stake objects rather than modify an
|
|
11
|
+
* existing one. This mirrors Sui's native staking model.
|
|
12
|
+
*
|
|
13
|
+
* Each stake tracks the royalty pools it is currently registered with via an
|
|
14
|
+
* inline `VecMap<TypeName, Registration>`, keyed by the pool's `Currency`
|
|
15
|
+
* `TypeName`. The stake cannot be destroyed while any registrations remain. Pool
|
|
16
|
+
* registrations are mutated by `royalty_pool::pool` through the package-private
|
|
17
|
+
* accessors below.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
21
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
22
|
+
import * as balance from '../sui/balance.ts';
|
|
23
|
+
import * as vec_map from '../sui/vec_map.ts';
|
|
24
|
+
import * as type_name from '../std/type_name.ts';
|
|
25
|
+
const $moduleName = 'royalty_pool::stake';
|
|
26
|
+
export const Registration = new MoveStruct({ name: `${$moduleName}::Registration`, fields: {
|
|
27
|
+
pool_id: bcs.Address,
|
|
28
|
+
last_claim_index: bcs.u256()
|
|
29
|
+
} });
|
|
30
|
+
export const Stake = new MoveStruct({ name: `${$moduleName}::Stake<phantom Share>`, fields: {
|
|
31
|
+
id: bcs.Address,
|
|
32
|
+
/** The staked balance. Immutable after creation. */
|
|
33
|
+
balance: balance.Balance,
|
|
34
|
+
/**
|
|
35
|
+
* Active royalty-pool registrations, keyed by `Currency` `TypeName`. Must be empty
|
|
36
|
+
* to destroy.
|
|
37
|
+
*/
|
|
38
|
+
registrations: vec_map.VecMap(type_name.TypeName, Registration)
|
|
39
|
+
} });
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
7
|
+
|
|
8
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
9
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
10
|
+
const $moduleName = 'std::type_name';
|
|
11
|
+
export const TypeName = new MoveStruct({ name: `${$moduleName}::TypeName`, fields: {
|
|
12
|
+
/**
|
|
13
|
+
* String representation of the type. All types are represented using their source
|
|
14
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
15
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
16
|
+
* `00000000000000000000000000000001::string::String` or
|
|
17
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
18
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
19
|
+
* 32 depending on the Move platform)
|
|
20
|
+
*/
|
|
21
|
+
name: bcs.string()
|
|
22
|
+
} });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
8
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
9
|
+
* and `Balance`s.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
13
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
14
|
+
const $moduleName = '0x2::balance';
|
|
15
|
+
export const Balance = new MoveStruct({ name: `${$moduleName}::Balance<phantom T>`, fields: {
|
|
16
|
+
value: bcs.u64()
|
|
17
|
+
} });
|
|
@@ -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
|
+
}
|