@misofm/platform 0.23.0 → 0.25.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 +125 -57
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +1 -1
- package/dist/catalog.js.map +1 -1
- package/dist/client.d.ts +107 -97
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +59 -39
- 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/credit/credit.d.ts +24 -0
- package/dist/contracts/composition_credits/deps/credit/credit.d.ts.map +1 -0
- package/dist/contracts/composition_credits/deps/credit/credit.js +23 -0
- package/dist/contracts/composition_credits/deps/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/composition_routed_stake/composition_routed_stake.d.ts +143 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts.map +1 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js +125 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js.map +1 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +93 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +86 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -0
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts +90 -0
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts.map +1 -0
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js +85 -0
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js.map +1 -0
- package/dist/contracts/composition_royalty_pool_plugin/witness.d.ts +6 -0
- package/dist/contracts/composition_royalty_pool_plugin/witness.d.ts.map +1 -0
- package/dist/contracts/composition_royalty_pool_plugin/witness.js +8 -0
- package/dist/contracts/composition_royalty_pool_plugin/witness.js.map +1 -0
- package/dist/contracts/cover_art/cover_art.d.ts +83 -0
- package/dist/contracts/cover_art/cover_art.d.ts.map +1 -0
- package/dist/contracts/cover_art/cover_art.js +66 -0
- package/dist/contracts/cover_art/cover_art.js.map +1 -0
- package/dist/contracts/cover_art/deps/ori/confidentiality.d.ts +24 -0
- package/dist/contracts/cover_art/deps/ori/confidentiality.d.ts.map +1 -0
- package/dist/contracts/cover_art/deps/ori/confidentiality.js +24 -0
- package/dist/contracts/cover_art/deps/ori/confidentiality.js.map +1 -0
- package/dist/contracts/cover_art/deps/ori/data.d.ts +16 -0
- package/dist/contracts/cover_art/deps/ori/data.d.ts.map +1 -0
- package/dist/contracts/cover_art/deps/ori/data.js +12 -0
- package/dist/contracts/cover_art/deps/ori/data.js.map +1 -0
- package/dist/contracts/genre/genre.d.ts +78 -0
- package/dist/contracts/genre/genre.d.ts.map +1 -0
- package/dist/contracts/genre/genre.js +87 -0
- package/dist/contracts/genre/genre.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/party_wallet/party_wallet.d.ts +112 -0
- package/dist/contracts/party_wallet/party_wallet.d.ts.map +1 -0
- package/dist/contracts/party_wallet/party_wallet.js +114 -0
- package/dist/contracts/party_wallet/party_wallet.js.map +1 -0
- package/dist/contracts/record/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/record/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/record/deps/std/type_name.js +20 -0
- package/dist/contracts/record/deps/std/type_name.js.map +1 -0
- package/dist/contracts/record/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/record/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/record/deps/sui/vec_set.js +20 -0
- package/dist/contracts/record/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/record/pressing.d.ts +327 -0
- package/dist/contracts/record/pressing.d.ts.map +1 -0
- package/dist/contracts/record/pressing.js +345 -0
- package/dist/contracts/record/pressing.js.map +1 -0
- package/dist/contracts/record/record.d.ts +190 -0
- package/dist/contracts/record/record.d.ts.map +1 -0
- package/dist/contracts/record/record.js +226 -0
- package/dist/contracts/record/record.js.map +1 -0
- package/dist/contracts/record_shop/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/record_shop/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/record_shop/deps/std/type_name.js +20 -0
- package/dist/contracts/record_shop/deps/std/type_name.js.map +1 -0
- package/dist/contracts/record_shop/listing.d.ts +387 -0
- package/dist/contracts/record_shop/listing.d.ts.map +1 -0
- package/dist/contracts/record_shop/listing.js +380 -0
- package/dist/contracts/record_shop/listing.js.map +1 -0
- package/dist/contracts/record_shop/witness.d.ts +7 -0
- package/dist/contracts/record_shop/witness.d.ts.map +1 -0
- package/dist/contracts/record_shop/witness.js +9 -0
- package/dist/contracts/record_shop/witness.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/credit/credit.d.ts +24 -0
- package/dist/contracts/recording_credits/deps/credit/credit.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/credit/credit.js +23 -0
- package/dist/contracts/recording_credits/deps/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_engine_session/deps/ori/confidentiality.d.ts +24 -0
- package/dist/contracts/recording_engine_session/deps/ori/confidentiality.d.ts.map +1 -0
- package/dist/contracts/recording_engine_session/deps/ori/confidentiality.js +24 -0
- package/dist/contracts/recording_engine_session/deps/ori/confidentiality.js.map +1 -0
- package/dist/contracts/recording_engine_session/deps/ori/data.d.ts +16 -0
- package/dist/contracts/recording_engine_session/deps/ori/data.d.ts.map +1 -0
- package/dist/contracts/recording_engine_session/deps/ori/data.js +12 -0
- package/dist/contracts/recording_engine_session/deps/ori/data.js.map +1 -0
- package/dist/contracts/recording_engine_session/recording_engine_session.d.ts +296 -0
- package/dist/contracts/recording_engine_session/recording_engine_session.d.ts.map +1 -0
- package/dist/contracts/recording_engine_session/recording_engine_session.js +216 -0
- package/dist/contracts/recording_engine_session/recording_engine_session.js.map +1 -0
- package/dist/contracts/recording_genre/recording_genre.d.ts +173 -0
- package/dist/contracts/recording_genre/recording_genre.d.ts.map +1 -0
- package/dist/contracts/recording_genre/recording_genre.js +170 -0
- package/dist/contracts/recording_genre/recording_genre.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/confidentiality.d.ts +24 -0
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.js +24 -0
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.js.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/data.d.ts +16 -0
- package/dist/contracts/recording_master_reference/deps/ori/data.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/data.js +12 -0
- package/dist/contracts/recording_master_reference/deps/ori/data.js.map +1 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +129 -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 +119 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +96 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +85 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -0
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts +92 -0
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts.map +1 -0
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js +85 -0
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js.map +1 -0
- package/dist/contracts/recording_royalty_pool_plugin/witness.d.ts +6 -0
- package/dist/contracts/recording_royalty_pool_plugin/witness.d.ts.map +1 -0
- package/dist/contracts/recording_royalty_pool_plugin/witness.js +8 -0
- package/dist/contracts/recording_royalty_pool_plugin/witness.js.map +1 -0
- package/dist/contracts/recording_streaming_transcode/deps/ori/data.d.ts +8 -0
- package/dist/contracts/recording_streaming_transcode/deps/ori/data.d.ts.map +1 -0
- package/dist/contracts/recording_streaming_transcode/deps/ori/data.js +10 -0
- package/dist/contracts/recording_streaming_transcode/deps/ori/data.js.map +1 -0
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.d.ts +124 -0
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.d.ts.map +1 -0
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.js +124 -0
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/confidentiality.d.ts +24 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/confidentiality.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/confidentiality.js +24 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/confidentiality.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/data.d.ts +16 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/data.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/data.js +12 -0
- package/dist/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/data.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +47 -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 +22 -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/credit/credit.d.ts +24 -0
- package/dist/contracts/release_credits/deps/credit/credit.d.ts.map +1 -0
- package/dist/contracts/release_credits/deps/credit/credit.js +23 -0
- package/dist/contracts/release_credits/deps/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 +643 -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 +555 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -0
- package/dist/contracts/release_genre/release_genre.d.ts +145 -0
- package/dist/contracts/release_genre/release_genre.d.ts.map +1 -0
- package/dist/contracts/release_genre/release_genre.js +154 -0
- package/dist/contracts/release_genre/release_genre.js.map +1 -0
- package/dist/contracts/release_kind/release_kind.d.ts +98 -0
- package/dist/contracts/release_kind/release_kind.d.ts.map +1 -0
- package/dist/contracts/release_kind/release_kind.js +109 -0
- package/dist/contracts/release_kind/release_kind.js.map +1 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts +91 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js +92 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js.map +1 -0
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts +73 -0
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js +80 -0
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js.map +1 -0
- package/dist/contracts/release_revenue_distributor_plugin/witness.d.ts +6 -0
- package/dist/contracts/release_revenue_distributor_plugin/witness.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor_plugin/witness.js +8 -0
- package/dist/contracts/release_revenue_distributor_plugin/witness.js.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +67 -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 +50 -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 +347 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.js +302 -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 +414 -0
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/pool.js +409 -0
- package/dist/contracts/royalty_pool/pool.js.map +1 -0
- package/dist/contracts/royalty_pool/stake.d.ts +202 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/stake.js +196 -0
- package/dist/contracts/royalty_pool/stake.js.map +1 -0
- package/dist/contracts/utils/index.d.ts +104 -0
- package/dist/contracts/utils/index.d.ts.map +1 -0
- package/dist/contracts/utils/index.js +272 -0
- package/dist/contracts/utils/index.js.map +1 -0
- package/dist/contracts/vault/deps/sui/bag.d.ts +35 -0
- package/dist/contracts/vault/deps/sui/bag.d.ts.map +1 -0
- package/dist/contracts/vault/deps/sui/bag.js +37 -0
- package/dist/contracts/vault/deps/sui/bag.js.map +1 -0
- package/dist/contracts/vault/deps/sui/borrow.d.ts +20 -0
- package/dist/contracts/vault/deps/sui/borrow.d.ts.map +1 -0
- package/dist/contracts/vault/deps/sui/borrow.js +21 -0
- package/dist/contracts/vault/deps/sui/borrow.js.map +1 -0
- package/dist/contracts/vault/vault.d.ts +316 -0
- package/dist/contracts/vault/vault.d.ts.map +1 -0
- package/dist/contracts/vault/vault.js +308 -0
- package/dist/contracts/vault/vault.js.map +1 -0
- package/dist/contracts.d.ts +57 -33
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +63 -41
- package/dist/contracts.js.map +1 -1
- package/dist/cover.js +2 -2
- package/dist/cover.js.map +1 -1
- package/dist/credits.js +6 -6
- package/dist/credits.js.map +1 -1
- package/dist/deployments.d.ts +104 -64
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +170 -36
- package/dist/deployments.js.map +1 -1
- package/dist/events.d.ts +1045 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +116 -0
- package/dist/events.js.map +1 -0
- package/dist/execute.d.ts +2 -2
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +2 -2
- package/dist/execute.js.map +1 -1
- package/dist/genre.d.ts +124 -0
- package/dist/genre.d.ts.map +1 -0
- package/dist/genre.js +238 -0
- package/dist/genre.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.js +2 -2
- package/dist/internal.js.map +1 -1
- package/dist/packages.d.ts +4185 -0
- package/dist/packages.d.ts.map +1 -0
- package/dist/packages.js +190 -0
- package/dist/packages.js.map +1 -0
- package/dist/party/client.d.ts +324 -0
- package/dist/party/client.d.ts.map +1 -0
- package/dist/party/client.js +214 -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 +18 -0
- package/dist/party/index.js.map +1 -0
- package/dist/party/internal.d.ts +14 -0
- package/dist/party/internal.d.ts.map +1 -0
- package/dist/party/internal.js +89 -0
- package/dist/party/internal.js.map +1 -0
- package/dist/party/queries.d.ts +17 -0
- package/dist/party/queries.d.ts.map +1 -0
- package/dist/party/queries.js +118 -0
- package/dist/party/queries.js.map +1 -0
- package/dist/party/types.d.ts +43 -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/pressing.js +3 -3
- package/dist/pressing.js.map +1 -1
- package/dist/publication.d.ts +4 -8
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +53 -40
- package/dist/publication.js.map +1 -1
- package/dist/queries.d.ts +1 -1
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +2 -2
- package/dist/queries.js.map +1 -1
- package/dist/read/artist.js +3 -3
- package/dist/read/artist.js.map +1 -1
- package/dist/read/catalog.d.ts +1 -1
- package/dist/read/catalog.d.ts.map +1 -1
- package/dist/read/catalog.js +3 -3
- package/dist/read/catalog.js.map +1 -1
- package/dist/read/client.d.ts +6 -3
- package/dist/read/client.d.ts.map +1 -1
- package/dist/read/client.js +5 -1
- package/dist/read/client.js.map +1 -1
- package/dist/read/config.d.ts +7 -2
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +2 -0
- package/dist/read/config.js.map +1 -1
- package/dist/read/index.js +1 -1
- package/dist/read/index.js.map +1 -1
- package/dist/read/receipts.js +4 -4
- package/dist/read/receipts.js.map +1 -1
- package/dist/read/types.d.ts +1 -1
- package/dist/read/types.d.ts.map +1 -1
- package/dist/read/wallet.d.ts +1 -1
- package/dist/read/wallet.d.ts.map +1 -1
- package/dist/read/wallet.js +15 -14
- package/dist/read/wallet.js.map +1 -1
- package/dist/read/works.d.ts +1 -1
- package/dist/read/works.d.ts.map +1 -1
- package/dist/read/works.js +1 -1
- package/dist/read/works.js.map +1 -1
- package/dist/recording-extensions.js +7 -7
- package/dist/recording-extensions.js.map +1 -1
- package/dist/release-extensions.d.ts +0 -18
- package/dist/release-extensions.d.ts.map +1 -1
- package/dist/release-extensions.js +4 -49
- package/dist/release-extensions.js.map +1 -1
- package/dist/release-graph.js +2 -2
- package/dist/release-graph.js.map +1 -1
- package/dist/royalty.d.ts +87 -0
- package/dist/royalty.d.ts.map +1 -0
- package/dist/royalty.js +78 -0
- package/dist/royalty.js.map +1 -0
- package/dist/share.js +1 -1
- package/dist/share.js.map +1 -1
- package/dist/transactions.d.ts +2 -2
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +6 -6
- package/dist/transactions.js.map +1 -1
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +13 -10
- package/dist/vault.js.map +1 -1
- package/package.json +24 -10
- package/src/catalog.ts +2 -2
- package/src/client.ts +103 -44
- package/src/contracts/composition_credits/composition_credits.ts +170 -0
- package/src/contracts/composition_credits/composition_party_role.ts +190 -0
- package/src/contracts/composition_credits/deps/credit/credit.ts +28 -0
- package/src/contracts/composition_credits/deps/sui/vec_map.ts +34 -0
- package/src/contracts/composition_routed_stake/composition_routed_stake.ts +239 -0
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +154 -0
- package/src/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.ts +165 -0
- package/src/contracts/composition_royalty_pool_plugin/witness.ts +8 -0
- package/src/contracts/cover_art/cover_art.ts +98 -0
- package/src/contracts/cover_art/deps/ori/confidentiality.ts +24 -0
- package/src/contracts/cover_art/deps/ori/data.ts +12 -0
- package/src/contracts/genre/genre.ts +121 -0
- package/src/contracts/party_cta/party_cta.ts +213 -0
- package/src/contracts/party_genre/party_genre.ts +200 -0
- package/src/contracts/party_media/party_media.ts +142 -0
- package/src/contracts/party_music/party_music.ts +406 -0
- package/src/contracts/party_platform_link/party_platform_link.ts +149 -0
- package/src/contracts/party_pro_link/party_pro_link.ts +454 -0
- package/src/contracts/party_profile/deps/country_code/country_code.ts +20 -0
- package/src/contracts/party_profile/deps/language_code/language_code.ts +8 -0
- package/src/contracts/party_profile/party_profile.ts +240 -0
- package/src/contracts/party_roles/party_roles.ts +364 -0
- package/src/contracts/party_social/party_social.ts +503 -0
- package/src/contracts/party_tags/party_tags.ts +199 -0
- package/src/contracts/party_wallet/party_wallet.ts +174 -0
- package/src/contracts/record/deps/std/type_name.ts +23 -0
- package/src/contracts/record/deps/sui/vec_set.ts +22 -0
- package/src/contracts/record/pressing.ts +523 -0
- package/src/contracts/record/record.ts +339 -0
- package/src/contracts/record_shop/deps/std/type_name.ts +23 -0
- package/src/contracts/record_shop/listing.ts +603 -0
- package/src/contracts/record_shop/witness.ts +12 -0
- package/src/contracts/recording_advisory/recording_advisory.ts +316 -0
- package/src/contracts/recording_credits/deps/credit/credit.ts +28 -0
- package/src/contracts/recording_credits/deps/sui/vec_map.ts +34 -0
- package/src/contracts/recording_credits/deps/sui/vec_set.ts +22 -0
- package/src/contracts/recording_credits/recording_credits.ts +459 -0
- package/src/contracts/recording_credits/recording_party_role.ts +1042 -0
- package/src/contracts/recording_engine_session/deps/ori/confidentiality.ts +24 -0
- package/src/contracts/recording_engine_session/deps/ori/data.ts +12 -0
- package/src/contracts/recording_engine_session/recording_engine_session.ts +335 -0
- package/src/contracts/recording_genre/recording_genre.ts +235 -0
- package/src/contracts/recording_language/deps/language_code/language_code.ts +8 -0
- package/src/contracts/recording_language/recording_language.ts +238 -0
- package/src/contracts/recording_master_reference/deps/ori/confidentiality.ts +24 -0
- package/src/contracts/recording_master_reference/deps/ori/data.ts +12 -0
- package/src/contracts/recording_master_reference/recording_master_reference.ts +180 -0
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +157 -0
- package/src/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.ts +167 -0
- package/src/contracts/recording_royalty_pool_plugin/witness.ts +8 -0
- package/src/contracts/recording_streaming_transcode/deps/ori/data.ts +10 -0
- package/src/contracts/recording_streaming_transcode/recording_streaming_transcode.ts +203 -0
- package/src/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/confidentiality.ts +24 -0
- package/src/contracts/release_cover_art/deps/0x51792b9adb9a5d05d7c4d74d7d0cb5aefc5639afa80c0089399cab8b99752e60/data.ts +12 -0
- package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +25 -0
- package/src/contracts/release_cover_art/deps/per_track/per_track.ts +37 -0
- package/src/contracts/release_cover_art/release_cover_art.ts +252 -0
- package/src/contracts/release_credits/deps/credit/credit.ts +28 -0
- package/src/contracts/release_credits/deps/sui/vec_map.ts +34 -0
- package/src/contracts/release_credits/release_credits.ts +157 -0
- package/src/contracts/release_credits/release_party_role.ts +87 -0
- package/src/contracts/release_description/release_description.ts +168 -0
- package/src/contracts/release_dsp_link/release_dsp_link.ts +813 -0
- package/src/contracts/release_genre/release_genre.ts +203 -0
- package/src/contracts/release_kind/release_kind.ts +154 -0
- package/src/contracts/release_revenue_distributor/release_revenue_distributor.ts +141 -0
- package/src/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.ts +143 -0
- package/src/contracts/release_revenue_distributor_plugin/witness.ts +8 -0
- package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +53 -0
- package/src/contracts/routed_stake/deps/std/type_name.ts +23 -0
- package/src/contracts/routed_stake/deps/sui/balance.ts +18 -0
- package/src/contracts/routed_stake/deps/sui/vec_map.ts +34 -0
- package/src/contracts/routed_stake/routed_stake.ts +487 -0
- package/src/contracts/royalty_pool/deps/std/type_name.ts +23 -0
- package/src/contracts/royalty_pool/deps/sui/balance.ts +18 -0
- package/src/contracts/royalty_pool/deps/sui/vec_map.ts +34 -0
- package/src/contracts/royalty_pool/pool.ts +634 -0
- package/src/contracts/royalty_pool/stake.ts +305 -0
- package/src/contracts/utils/index.ts +428 -0
- package/src/contracts/vault/deps/sui/bag.ts +40 -0
- package/src/contracts/vault/deps/sui/borrow.ts +26 -0
- package/src/contracts/vault/vault.ts +509 -0
- package/src/contracts.ts +86 -39
- package/src/cover.ts +2 -2
- package/src/credits.ts +6 -6
- package/src/deployments.ts +253 -39
- package/src/events.ts +121 -0
- package/src/execute.ts +3 -3
- package/src/genre.ts +369 -0
- package/src/index.ts +10 -1
- package/src/internal.ts +2 -2
- package/src/packages.ts +243 -0
- package/src/party/client.ts +268 -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 +40 -0
- package/src/party/internal.ts +102 -0
- package/src/party/queries.ts +163 -0
- package/src/party/types.ts +84 -0
- package/src/pressing.ts +5 -5
- package/src/publication.ts +58 -45
- package/src/queries.ts +2 -2
- package/src/read/artist.ts +3 -3
- package/src/read/catalog.ts +4 -4
- package/src/read/client.ts +9 -3
- package/src/read/config.ts +9 -2
- package/src/read/index.ts +1 -1
- package/src/read/receipts.ts +4 -4
- package/src/read/types.ts +1 -1
- package/src/read/wallet.ts +15 -14
- package/src/read/works.ts +1 -1
- package/src/recording-extensions.ts +7 -7
- package/src/release-extensions.ts +4 -75
- package/src/release-graph.ts +2 -2
- package/src/royalty.ts +167 -0
- package/src/share.ts +1 -1
- package/src/transactions.ts +6 -6
- package/src/vault.ts +18 -17
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// Party EXTENSIONS bound to one `PartyExtensionsDeployment`, wrapping a
|
|
5
|
+
// `PartyosClient` for the Party core. Consumers reach this through
|
|
6
|
+
// `client.miso.party`.
|
|
7
|
+
|
|
8
|
+
import type { ClientWithCoreApi } from "@mysten/sui/client";
|
|
9
|
+
import type { Party, PartyosClient } from "@misofm/partyos";
|
|
10
|
+
import type { PartyExtensionsDeployment } from "../deployments.ts";
|
|
11
|
+
import * as queries from "./queries.ts";
|
|
12
|
+
import * as profileExt from "./extensions/profile.ts";
|
|
13
|
+
import * as mediaExt from "./extensions/media.ts";
|
|
14
|
+
import * as rolesExt from "./extensions/roles.ts";
|
|
15
|
+
import * as tagsExt from "./extensions/tags.ts";
|
|
16
|
+
import * as genresExt from "./extensions/genres.ts";
|
|
17
|
+
import * as ctasExt from "./extensions/ctas.ts";
|
|
18
|
+
import * as linksExt from "./extensions/links.ts";
|
|
19
|
+
import type { Cta, Media, PlatformKey, PlatformLink, Profile } from "./types.ts";
|
|
20
|
+
import * as profileMod from "../contracts/party_profile/party_profile.ts";
|
|
21
|
+
import * as mediaMod from "../contracts/party_media/party_media.ts";
|
|
22
|
+
import * as rolesMod from "../contracts/party_roles/party_roles.ts";
|
|
23
|
+
import * as tagsMod from "../contracts/party_tags/party_tags.ts";
|
|
24
|
+
import * as ctaMod from "../contracts/party_cta/party_cta.ts";
|
|
25
|
+
import * as genreMod from "../contracts/party_genre/party_genre.ts";
|
|
26
|
+
import * as platformLinkMod from "../contracts/party_platform_link/party_platform_link.ts";
|
|
27
|
+
import * as socialMod from "../contracts/party_social/party_social.ts";
|
|
28
|
+
import * as musicMod from "../contracts/party_music/party_music.ts";
|
|
29
|
+
import * as proLinkMod from "../contracts/party_pro_link/party_pro_link.ts";
|
|
30
|
+
|
|
31
|
+
type BoundMoveFunction<F> = F extends (options: infer Options) => infer Result
|
|
32
|
+
? Options extends { package?: unknown }
|
|
33
|
+
? (options: Omit<Options, "package">) => Result
|
|
34
|
+
: F
|
|
35
|
+
: F;
|
|
36
|
+
type BoundModule<M extends object, Removed extends PropertyKey> = {
|
|
37
|
+
[Key in Exclude<keyof M, Removed>]: BoundMoveFunction<M[Key]>;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** Defaults generated calls to one package and removes reference-returning calls. */
|
|
41
|
+
function bindModulePackage<M extends object, K extends readonly (keyof M)[]>(
|
|
42
|
+
mod: M,
|
|
43
|
+
pkg: string,
|
|
44
|
+
unavailable: K = [] as unknown as K,
|
|
45
|
+
): BoundModule<M, K[number]> {
|
|
46
|
+
const out: Record<string, unknown> = {};
|
|
47
|
+
for (const [key, value] of Object.entries({ ...mod })) {
|
|
48
|
+
if ((unavailable as readonly string[]).includes(key)) continue;
|
|
49
|
+
out[key] =
|
|
50
|
+
typeof value === "function"
|
|
51
|
+
? (options: { package?: string }) => (value as (o: unknown) => unknown)({ package: pkg, ...options })
|
|
52
|
+
: value;
|
|
53
|
+
}
|
|
54
|
+
return out as BoundModule<M, K[number]>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Package-bound Party client exposed at `client.miso.party`. Wraps a
|
|
59
|
+
* `PartyosClient` for the Party core (identity, admin caps, group membership)
|
|
60
|
+
* and adds the first-party extensions (profile, media, roles, tags, genres,
|
|
61
|
+
* CTAs, platform links) this package owns.
|
|
62
|
+
*/
|
|
63
|
+
export class PartyPlatformClient {
|
|
64
|
+
#client: ClientWithCoreApi;
|
|
65
|
+
#core: PartyosClient;
|
|
66
|
+
#profilePkg: string;
|
|
67
|
+
#countryCodePkg: string;
|
|
68
|
+
#languageCodePkg: string;
|
|
69
|
+
#mediaPkg: string;
|
|
70
|
+
#rolesPkg: string;
|
|
71
|
+
#tagsPkg: string;
|
|
72
|
+
#partyGenrePkg: string;
|
|
73
|
+
#ctaPkg: string;
|
|
74
|
+
#platformLinkPkg: string;
|
|
75
|
+
#socialPkg: string;
|
|
76
|
+
#musicPkg: string;
|
|
77
|
+
#proLinkPkg: string;
|
|
78
|
+
|
|
79
|
+
constructor(client: ClientWithCoreApi, core: PartyosClient, extensions: PartyExtensionsDeployment) {
|
|
80
|
+
this.#client = client;
|
|
81
|
+
this.#core = core;
|
|
82
|
+
this.#profilePkg = extensions.partyProfile;
|
|
83
|
+
this.#countryCodePkg = extensions.countryCode;
|
|
84
|
+
this.#languageCodePkg = extensions.languageCode;
|
|
85
|
+
this.#mediaPkg = extensions.partyMedia;
|
|
86
|
+
this.#rolesPkg = extensions.partyRoles;
|
|
87
|
+
this.#tagsPkg = extensions.partyTags;
|
|
88
|
+
this.#partyGenrePkg = extensions.partyGenre;
|
|
89
|
+
this.#ctaPkg = extensions.partyCta;
|
|
90
|
+
this.#platformLinkPkg = extensions.partyPlatformLink;
|
|
91
|
+
this.#socialPkg = extensions.partySocial;
|
|
92
|
+
this.#musicPkg = extensions.partyMusic;
|
|
93
|
+
this.#proLinkPkg = extensions.partyProLink;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** The wrapped Party-core client (identity, admin caps, group membership). */
|
|
97
|
+
get core(): PartyosClient {
|
|
98
|
+
return this.#core;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// === Core (delegated to `PartyosClient`) ===
|
|
102
|
+
|
|
103
|
+
async getPartyById(partyId: string): Promise<Party> {
|
|
104
|
+
return this.#core.getPartyById(partyId);
|
|
105
|
+
}
|
|
106
|
+
async getPartiesByIds(partyIds: readonly string[]): Promise<Partial<Record<string, Party>>> {
|
|
107
|
+
return this.#core.getPartiesByIds(partyIds);
|
|
108
|
+
}
|
|
109
|
+
derivePartyAdminCapId(partyId: string): string {
|
|
110
|
+
return this.#core.derivePartyAdminCapId(partyId);
|
|
111
|
+
}
|
|
112
|
+
/** Group ids a party belongs to (member-side membership records). */
|
|
113
|
+
async getMemberships(partyId: string): Promise<string[]> {
|
|
114
|
+
return this.#core.getMemberships(partyId);
|
|
115
|
+
}
|
|
116
|
+
/** Member ids invited to a group but not yet accepted. */
|
|
117
|
+
async getPendingInvites(groupId: string): Promise<string[]> {
|
|
118
|
+
return this.#core.getPendingInvites(groupId);
|
|
119
|
+
}
|
|
120
|
+
/** Group ids that have invited this party but are awaiting its response. */
|
|
121
|
+
async getPendingMemberships(partyId: string): Promise<string[]> {
|
|
122
|
+
return this.#core.getPendingMemberships(partyId);
|
|
123
|
+
}
|
|
124
|
+
/** Whether a party is a member of a group. */
|
|
125
|
+
async isMember(memberId: string, groupId: string): Promise<boolean> {
|
|
126
|
+
return this.#core.isMember(memberId, groupId);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// === Extension queries ===
|
|
130
|
+
|
|
131
|
+
async getProfile(partyId: string): Promise<Profile | null> {
|
|
132
|
+
return queries.getProfile(this.#client, partyId, this.#profilePkg);
|
|
133
|
+
}
|
|
134
|
+
async getMedia(partyId: string): Promise<Media | null> {
|
|
135
|
+
return queries.getMedia(this.#client, partyId, this.#mediaPkg);
|
|
136
|
+
}
|
|
137
|
+
/** The party's artist-type roles (display names). */
|
|
138
|
+
async getRoles(partyId: string): Promise<string[]> {
|
|
139
|
+
return queries.getRoles(this.#client, partyId, this.#rolesPkg);
|
|
140
|
+
}
|
|
141
|
+
/** The party's free-form tags. */
|
|
142
|
+
async getTags(partyId: string): Promise<string[]> {
|
|
143
|
+
return queries.getTags(this.#client, partyId, this.#tagsPkg);
|
|
144
|
+
}
|
|
145
|
+
/** The party's genre object ids. */
|
|
146
|
+
async getGenres(partyId: string): Promise<string[]> {
|
|
147
|
+
return queries.getGenres(this.#client, partyId, this.#partyGenrePkg);
|
|
148
|
+
}
|
|
149
|
+
/** The party's ordered CTA list (position is priority). */
|
|
150
|
+
async getCtas(partyId: string): Promise<Cta[]> {
|
|
151
|
+
return queries.getCtas(this.#client, partyId, this.#ctaPkg);
|
|
152
|
+
}
|
|
153
|
+
/** All external-platform links attached to the party (social, music, professional). */
|
|
154
|
+
async getLinks(partyId: string): Promise<PlatformLink[]> {
|
|
155
|
+
return queries.getLinks(this.#client, partyId);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// === Transaction builders (thunks; package ids bound from the client) ===
|
|
159
|
+
|
|
160
|
+
get tx() {
|
|
161
|
+
const profilePkg = this.#profilePkg;
|
|
162
|
+
const cc = this.#countryCodePkg;
|
|
163
|
+
const lc = this.#languageCodePkg;
|
|
164
|
+
const mediaPkg = this.#mediaPkg;
|
|
165
|
+
const rolesPkg = this.#rolesPkg;
|
|
166
|
+
const tagsPkg = this.#tagsPkg;
|
|
167
|
+
const ctaPkg = this.#ctaPkg;
|
|
168
|
+
const partyGenrePkg = this.#partyGenrePkg;
|
|
169
|
+
const linkIds: linksExt.LinkPackageIds = {
|
|
170
|
+
partyPlatformLinkPackageId: this.#platformLinkPkg,
|
|
171
|
+
partySocialPackageId: this.#socialPkg,
|
|
172
|
+
partyMusicPackageId: this.#musicPkg,
|
|
173
|
+
partyProLinkPackageId: this.#proLinkPkg,
|
|
174
|
+
};
|
|
175
|
+
return {
|
|
176
|
+
// Party core builders — delegated straight from `PartyosClient`.
|
|
177
|
+
...this.#core.tx,
|
|
178
|
+
setProfile: (
|
|
179
|
+
p: Omit<profileExt.SetProfileParams, "partyProfilePackageId" | "countryCodePackageId" | "languageCodePackageId">,
|
|
180
|
+
) =>
|
|
181
|
+
profileExt.setProfile({
|
|
182
|
+
...p,
|
|
183
|
+
partyProfilePackageId: profilePkg,
|
|
184
|
+
countryCodePackageId: cc,
|
|
185
|
+
languageCodePackageId: lc,
|
|
186
|
+
}),
|
|
187
|
+
clearProfile: (p: Omit<profileExt.ClearProfileParams, "partyProfilePackageId">) =>
|
|
188
|
+
profileExt.clearProfile({ ...p, partyProfilePackageId: profilePkg }),
|
|
189
|
+
setMedia: (p: Omit<mediaExt.SetMediaParams, "partyMediaPackageId">) =>
|
|
190
|
+
mediaExt.setMedia({ ...p, partyMediaPackageId: mediaPkg }),
|
|
191
|
+
clearMedia: (p: Omit<mediaExt.ClearMediaParams, "partyMediaPackageId">) =>
|
|
192
|
+
mediaExt.clearMedia({ ...p, partyMediaPackageId: mediaPkg }),
|
|
193
|
+
// Roles
|
|
194
|
+
addRole: (p: Omit<rolesExt.AddRoleParams, "partyRolesPackageId">) =>
|
|
195
|
+
rolesExt.addRole({ ...p, partyRolesPackageId: rolesPkg }),
|
|
196
|
+
removeRole: (p: Omit<rolesExt.RemoveRoleParams, "partyRolesPackageId">) =>
|
|
197
|
+
rolesExt.removeRole({ ...p, partyRolesPackageId: rolesPkg }),
|
|
198
|
+
clearRoles: (p: Omit<rolesExt.ClearRolesParams, "partyRolesPackageId">) =>
|
|
199
|
+
rolesExt.clearRoles({ ...p, partyRolesPackageId: rolesPkg }),
|
|
200
|
+
// Tags
|
|
201
|
+
addTag: (p: Omit<tagsExt.AddTagParams, "partyTagsPackageId">) =>
|
|
202
|
+
tagsExt.addTag({ ...p, partyTagsPackageId: tagsPkg }),
|
|
203
|
+
removeTag: (p: Omit<tagsExt.RemoveTagParams, "partyTagsPackageId">) =>
|
|
204
|
+
tagsExt.removeTag({ ...p, partyTagsPackageId: tagsPkg }),
|
|
205
|
+
clearTags: (p: Omit<tagsExt.ClearTagsParams, "partyTagsPackageId">) =>
|
|
206
|
+
tagsExt.clearTags({ ...p, partyTagsPackageId: tagsPkg }),
|
|
207
|
+
// Genres
|
|
208
|
+
addGenre: (p: Omit<genresExt.AddGenreParams, "partyGenrePackageId">) =>
|
|
209
|
+
genresExt.addGenre({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
210
|
+
removeGenre: (p: Omit<genresExt.RemoveGenreParams, "partyGenrePackageId">) =>
|
|
211
|
+
genresExt.removeGenre({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
212
|
+
clearGenres: (p: Omit<genresExt.ClearGenresParams, "partyGenrePackageId">) =>
|
|
213
|
+
genresExt.clearGenres({ ...p, partyGenrePackageId: partyGenrePkg }),
|
|
214
|
+
// CTAs
|
|
215
|
+
setCtas: (p: Omit<ctasExt.SetCtasParams, "partyCtaPackageId">) =>
|
|
216
|
+
ctasExt.setCtas({ ...p, partyCtaPackageId: ctaPkg }),
|
|
217
|
+
clearCtas: (p: Omit<ctasExt.ClearCtasParams, "partyCtaPackageId">) =>
|
|
218
|
+
ctasExt.clearCtas({ ...p, partyCtaPackageId: ctaPkg }),
|
|
219
|
+
// Platform links — generic (any platform) plus per-platform `set…`/`clear…`.
|
|
220
|
+
setLink: (platform: PlatformKey, p: linksExt.BoundSetLinkParams) =>
|
|
221
|
+
linksExt.setLink(platform, { ...p, ...linkIds }),
|
|
222
|
+
clearLink: (platform: PlatformKey, p: linksExt.BoundClearLinkParams) =>
|
|
223
|
+
linksExt.clearLink(platform, { ...p, ...linkIds }),
|
|
224
|
+
...linksExt.linkTxBuilders(linkIds),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// === Generated type-safe Move calls (for tx.add) ===
|
|
229
|
+
|
|
230
|
+
get call() {
|
|
231
|
+
return {
|
|
232
|
+
party: this.#core.call.party,
|
|
233
|
+
profile: bindModulePackage(profileMod, this.#profilePkg, ["profile"] as const),
|
|
234
|
+
media: bindModulePackage(mediaMod, this.#mediaPkg),
|
|
235
|
+
roles: bindModulePackage(rolesMod, this.#rolesPkg),
|
|
236
|
+
tags: bindModulePackage(tagsMod, this.#tagsPkg),
|
|
237
|
+
cta: bindModulePackage(ctaMod, this.#ctaPkg),
|
|
238
|
+
genre: bindModulePackage(genreMod, this.#partyGenrePkg),
|
|
239
|
+
platformLink: bindModulePackage(platformLinkMod, this.#platformLinkPkg),
|
|
240
|
+
social: bindModulePackage(socialMod, this.#socialPkg),
|
|
241
|
+
music: bindModulePackage(musicMod, this.#musicPkg),
|
|
242
|
+
proLink: bindModulePackage(proLinkMod, this.#proLinkPkg),
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// === Generated BCS structs (for parsing object/event content) ===
|
|
247
|
+
|
|
248
|
+
get bcs() {
|
|
249
|
+
return {
|
|
250
|
+
...this.#core.bcs,
|
|
251
|
+
Profile: profileMod.Profile,
|
|
252
|
+
ProfileSetEvent: profileMod.ProfileSetEvent,
|
|
253
|
+
Media: mediaMod.Media,
|
|
254
|
+
MediaSetEvent: mediaMod.MediaSetEvent,
|
|
255
|
+
ArtistRole: rolesMod.ArtistRole,
|
|
256
|
+
RoleAddedEvent: rolesMod.RoleAddedEvent,
|
|
257
|
+
TagAddedEvent: tagsMod.TagAddedEvent,
|
|
258
|
+
Cta: ctaMod.Cta,
|
|
259
|
+
CtasSetEvent: ctaMod.CtasSetEvent,
|
|
260
|
+
GenreAddedEvent: genreMod.GenreAddedEvent,
|
|
261
|
+
LinkSetEvent: platformLinkMod.LinkSetEvent,
|
|
262
|
+
LinkClearedEvent: platformLinkMod.LinkClearedEvent,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** @deprecated Use `PartyPlatformClient`. Retained for callers migrating from the pre-split class. */
|
|
268
|
+
export { PartyPlatformClient as PartyProtocolClient };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// The `party_cta` extension: a party's ordered call-to-action list (Tickets,
|
|
5
|
+
// Merch, Newsletter, …). Each CTA is a `{ label, url }`; the whole list is written
|
|
6
|
+
// at once (position is priority). The builder constructs each `Cta` via `new_cta`
|
|
7
|
+
// and passes the vector to `set_ctas`.
|
|
8
|
+
|
|
9
|
+
import * as ctaMod from "../../contracts/party_cta/party_cta.ts";
|
|
10
|
+
import type { TxThunk } from "@misofm/partyos";
|
|
11
|
+
import type { Cta } from "../types.ts";
|
|
12
|
+
|
|
13
|
+
export interface SetCtasParams {
|
|
14
|
+
partyId: string;
|
|
15
|
+
capId: string;
|
|
16
|
+
/** The ordered CTA list — position is priority. */
|
|
17
|
+
ctas: Cta[];
|
|
18
|
+
partyCtaPackageId: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Sets (or replaces) the party's ordered CTA list. */
|
|
22
|
+
export function setCtas(params: SetCtasParams): TxThunk {
|
|
23
|
+
return (tx) => {
|
|
24
|
+
const ctaType = `${params.partyCtaPackageId}::party_cta::Cta`;
|
|
25
|
+
const ctas = tx.makeMoveVec({
|
|
26
|
+
type: ctaType,
|
|
27
|
+
elements: params.ctas.map((c) =>
|
|
28
|
+
tx.add(ctaMod.newCta({ package: params.partyCtaPackageId, arguments: [c.label, c.url] })),
|
|
29
|
+
),
|
|
30
|
+
});
|
|
31
|
+
tx.add(ctaMod.setCtas({ package: params.partyCtaPackageId, arguments: [params.partyId, params.capId, ctas] }));
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ClearCtasParams {
|
|
36
|
+
partyId: string;
|
|
37
|
+
capId: string;
|
|
38
|
+
partyCtaPackageId: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Removes the party's CTA list. No-op on-chain if none is set. */
|
|
42
|
+
export function clearCtas(params: ClearCtasParams): TxThunk {
|
|
43
|
+
return (tx) => {
|
|
44
|
+
tx.add(ctaMod.clearCtas({ package: params.partyCtaPackageId, arguments: [params.partyId, params.capId] }));
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// The `party_genre` extension: a set of `genre::Genre` object ids tagged on a
|
|
5
|
+
// party. `add_genre` takes a `&Genre` vocabulary object (proving the id is a real
|
|
6
|
+
// entry), so the builder passes `tx.object(genreId)`; removal is by id.
|
|
7
|
+
|
|
8
|
+
import * as genreMod from "../../contracts/party_genre/party_genre.ts";
|
|
9
|
+
import type { TxThunk } from "@misofm/partyos";
|
|
10
|
+
|
|
11
|
+
export interface AddGenreParams {
|
|
12
|
+
partyId: string;
|
|
13
|
+
capId: string;
|
|
14
|
+
/** The `genre::Genre` vocabulary object id to tag. */
|
|
15
|
+
genreId: string;
|
|
16
|
+
partyGenrePackageId: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Tags a genre on the party. Aborts on-chain if already present or the max is reached. */
|
|
20
|
+
export function addGenre(params: AddGenreParams): TxThunk {
|
|
21
|
+
return (tx) => {
|
|
22
|
+
tx.add(
|
|
23
|
+
genreMod.addGenre({
|
|
24
|
+
package: params.partyGenrePackageId,
|
|
25
|
+
arguments: [params.partyId, params.capId, tx.object(params.genreId)],
|
|
26
|
+
}),
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface RemoveGenreParams {
|
|
32
|
+
partyId: string;
|
|
33
|
+
capId: string;
|
|
34
|
+
/** The genre id to untag. */
|
|
35
|
+
genreId: string;
|
|
36
|
+
partyGenrePackageId: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Untags a genre from the party. Aborts on-chain if not present. */
|
|
40
|
+
export function removeGenre(params: RemoveGenreParams): TxThunk {
|
|
41
|
+
return (tx) => {
|
|
42
|
+
tx.add(
|
|
43
|
+
genreMod.removeGenre({
|
|
44
|
+
package: params.partyGenrePackageId,
|
|
45
|
+
arguments: [params.partyId, params.capId, params.genreId],
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ClearGenresParams {
|
|
52
|
+
partyId: string;
|
|
53
|
+
capId: string;
|
|
54
|
+
partyGenrePackageId: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Removes the party's entire genre set. No-op on-chain if none is set. */
|
|
58
|
+
export function clearGenres(params: ClearGenresParams): TxThunk {
|
|
59
|
+
return (tx) => {
|
|
60
|
+
tx.add(genreMod.clearGenres({ package: params.partyGenrePackageId, arguments: [params.partyId, params.capId] }));
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// The platform-link facade: attaches one independent `PlatformLink<Data>` per
|
|
5
|
+
// platform to a party via `party_platform_link`. The payload `Data` types live in
|
|
6
|
+
// their own packages (`party_social`, `party_music`, `party_pro_link`); this file
|
|
7
|
+
// drives all ~27 platforms from a single table (`PLATFORMS`) rather than 27×
|
|
8
|
+
// copy-paste. Each setter builds the link via the platform's constructor move-call
|
|
9
|
+
// (returning a `PlatformLink<…Data>`), then calls `set_link` with the matching
|
|
10
|
+
// `Data` type argument; clearers call `clear_link` with the same type argument.
|
|
11
|
+
// Only the native identifier is stored on-chain; the public URL is rebuilt from it.
|
|
12
|
+
|
|
13
|
+
import * as platformLinkMod from "../../contracts/party_platform_link/party_platform_link.ts";
|
|
14
|
+
import type { TxThunk } from "@misofm/partyos";
|
|
15
|
+
import type { PlatformKey, PlatformLink } from "../types.ts";
|
|
16
|
+
|
|
17
|
+
/** Which payload package a platform's `Data` type + constructor live in. */
|
|
18
|
+
type PayloadPkgKind = "social" | "music" | "pro";
|
|
19
|
+
|
|
20
|
+
/** Everything needed to build, store, and rebuild one platform's link. */
|
|
21
|
+
export interface PlatformSpec {
|
|
22
|
+
key: PlatformKey;
|
|
23
|
+
/** Payload package the `Data` type + constructor live in. */
|
|
24
|
+
pkgKind: PayloadPkgKind;
|
|
25
|
+
/** Move module holding the constructor + `Data` type. */
|
|
26
|
+
module: "party_social" | "party_music" | "party_pro_link";
|
|
27
|
+
/** Constructor function (snake_case) — takes a single `String`, returns `PlatformLink<Data>`. */
|
|
28
|
+
ctor: string;
|
|
29
|
+
/** The `Data` type name (e.g. `InstagramData`). */
|
|
30
|
+
dataType: string;
|
|
31
|
+
/** Rebuilds the public URL from the stored native identifier. */
|
|
32
|
+
url: (value: string) => string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Every platform this SDK can link, keyed by `PlatformKey`. The single source of
|
|
37
|
+
* truth: setters, clearers, and the read-side URL/type mapping all derive from it.
|
|
38
|
+
*/
|
|
39
|
+
export const PLATFORMS: Record<PlatformKey, PlatformSpec> = {
|
|
40
|
+
// === Social (party_social) ===
|
|
41
|
+
x: { key: "x", pkgKind: "social", module: "party_social", ctor: "x", dataType: "XData", url: (v) => `https://x.com/${v}` },
|
|
42
|
+
instagram: { key: "instagram", pkgKind: "social", module: "party_social", ctor: "instagram", dataType: "InstagramData", url: (v) => `https://instagram.com/${v}` },
|
|
43
|
+
threads: { key: "threads", pkgKind: "social", module: "party_social", ctor: "threads", dataType: "ThreadsData", url: (v) => `https://www.threads.net/@${v}` },
|
|
44
|
+
tiktok: { key: "tiktok", pkgKind: "social", module: "party_social", ctor: "tiktok", dataType: "TikTokData", url: (v) => `https://www.tiktok.com/@${v}` },
|
|
45
|
+
youtube: { key: "youtube", pkgKind: "social", module: "party_social", ctor: "youtube", dataType: "YouTubeData", url: (v) => `https://youtube.com/@${v}` },
|
|
46
|
+
discord: { key: "discord", pkgKind: "social", module: "party_social", ctor: "discord", dataType: "DiscordData", url: (v) => `https://discord.gg/${v}` },
|
|
47
|
+
telegram: { key: "telegram", pkgKind: "social", module: "party_social", ctor: "telegram", dataType: "TelegramData", url: (v) => `https://t.me/${v}` },
|
|
48
|
+
reddit: { key: "reddit", pkgKind: "social", module: "party_social", ctor: "reddit", dataType: "RedditData", url: (v) => `https://reddit.com/user/${v}` },
|
|
49
|
+
twitch: { key: "twitch", pkgKind: "social", module: "party_social", ctor: "twitch", dataType: "TwitchData", url: (v) => `https://twitch.tv/${v}` },
|
|
50
|
+
facebook: { key: "facebook", pkgKind: "social", module: "party_social", ctor: "facebook", dataType: "FacebookData", url: (v) => `https://facebook.com/${v}` },
|
|
51
|
+
// === Music (party_music) ===
|
|
52
|
+
spotify: { key: "spotify", pkgKind: "music", module: "party_music", ctor: "spotify", dataType: "SpotifyData", url: (v) => `https://open.spotify.com/artist/${v}` },
|
|
53
|
+
bandcamp: { key: "bandcamp", pkgKind: "music", module: "party_music", ctor: "bandcamp", dataType: "BandcampData", url: (v) => `https://${v}.bandcamp.com` },
|
|
54
|
+
soundcloud: { key: "soundcloud", pkgKind: "music", module: "party_music", ctor: "soundcloud", dataType: "SoundCloudData", url: (v) => `https://soundcloud.com/${v}` },
|
|
55
|
+
appleMusic: { key: "appleMusic", pkgKind: "music", module: "party_music", ctor: "apple_music", dataType: "AppleMusicData", url: (v) => `https://music.apple.com/artist/${v}` },
|
|
56
|
+
deezer: { key: "deezer", pkgKind: "music", module: "party_music", ctor: "deezer", dataType: "DeezerData", url: (v) => `https://www.deezer.com/artist/${v}` },
|
|
57
|
+
tidal: { key: "tidal", pkgKind: "music", module: "party_music", ctor: "tidal", dataType: "TidalData", url: (v) => `https://tidal.com/artist/${v}` },
|
|
58
|
+
amazonMusic: { key: "amazonMusic", pkgKind: "music", module: "party_music", ctor: "amazon_music", dataType: "AmazonMusicData", url: (v) => `https://music.amazon.com/artists/${v}` },
|
|
59
|
+
audiomack: { key: "audiomack", pkgKind: "music", module: "party_music", ctor: "audiomack", dataType: "AudiomackData", url: (v) => `https://audiomack.com/${v}` },
|
|
60
|
+
// === Professional / industry (party_pro_link). URL-based payloads store a full URL. ===
|
|
61
|
+
website: { key: "website", pkgKind: "pro", module: "party_pro_link", ctor: "website", dataType: "WebsiteData", url: (v) => v },
|
|
62
|
+
bookingPage: { key: "bookingPage", pkgKind: "pro", module: "party_pro_link", ctor: "booking_page", dataType: "BookingPageData", url: (v) => v },
|
|
63
|
+
managementPage: { key: "managementPage", pkgKind: "pro", module: "party_pro_link", ctor: "management_page", dataType: "ManagementPageData", url: (v) => v },
|
|
64
|
+
publisherPage: { key: "publisherPage", pkgKind: "pro", module: "party_pro_link", ctor: "publisher_page", dataType: "PublisherPageData", url: (v) => v },
|
|
65
|
+
labelPage: { key: "labelPage", pkgKind: "pro", module: "party_pro_link", ctor: "label_page", dataType: "LabelPageData", url: (v) => v },
|
|
66
|
+
epk: { key: "epk", pkgKind: "pro", module: "party_pro_link", ctor: "epk", dataType: "EpkData", url: (v) => v },
|
|
67
|
+
patreon: { key: "patreon", pkgKind: "pro", module: "party_pro_link", ctor: "patreon", dataType: "PatreonData", url: (v) => `https://patreon.com/${v}` },
|
|
68
|
+
substack: { key: "substack", pkgKind: "pro", module: "party_pro_link", ctor: "substack", dataType: "SubstackData", url: (v) => `https://${v}.substack.com` },
|
|
69
|
+
kofi: { key: "kofi", pkgKind: "pro", module: "party_pro_link", ctor: "kofi", dataType: "KofiData", url: (v) => `https://ko-fi.com/${v}` },
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** All platform keys, in table order. */
|
|
73
|
+
export const PLATFORM_KEYS = Object.keys(PLATFORMS) as PlatformKey[];
|
|
74
|
+
|
|
75
|
+
/** The package ids the platform-link facade binds (the facade + the three payload packages). */
|
|
76
|
+
export interface LinkPackageIds {
|
|
77
|
+
partyPlatformLinkPackageId: string;
|
|
78
|
+
partySocialPackageId: string;
|
|
79
|
+
partyMusicPackageId: string;
|
|
80
|
+
partyProLinkPackageId: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function payloadPackageId(spec: PlatformSpec, ids: LinkPackageIds): string {
|
|
84
|
+
switch (spec.pkgKind) {
|
|
85
|
+
case "social":
|
|
86
|
+
return ids.partySocialPackageId;
|
|
87
|
+
case "music":
|
|
88
|
+
return ids.partyMusicPackageId;
|
|
89
|
+
case "pro":
|
|
90
|
+
return ids.partyProLinkPackageId;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** The fully-qualified Move `Data` type for a platform (e.g. `0x…::party_social::InstagramData`). */
|
|
95
|
+
function dataTypeArg(spec: PlatformSpec, ids: LinkPackageIds): string {
|
|
96
|
+
return `${payloadPackageId(spec, ids)}::${spec.module}::${spec.dataType}`;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface SetLinkParams extends LinkPackageIds {
|
|
100
|
+
partyId: string;
|
|
101
|
+
capId: string;
|
|
102
|
+
/** The platform-native identifier to store (handle / id / subdomain / full URL). */
|
|
103
|
+
value: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Sets (or replaces) a platform's link on the party. */
|
|
107
|
+
export function setLink(platform: PlatformKey, params: SetLinkParams): TxThunk {
|
|
108
|
+
return (tx) => {
|
|
109
|
+
const spec = PLATFORMS[platform];
|
|
110
|
+
const pkg = payloadPackageId(spec, params);
|
|
111
|
+
const link = tx.moveCall({
|
|
112
|
+
target: `${pkg}::${spec.module}::${spec.ctor}`,
|
|
113
|
+
arguments: [tx.pure.string(params.value)],
|
|
114
|
+
});
|
|
115
|
+
tx.add(
|
|
116
|
+
platformLinkMod.setLink({
|
|
117
|
+
package: params.partyPlatformLinkPackageId,
|
|
118
|
+
typeArguments: [dataTypeArg(spec, params)],
|
|
119
|
+
arguments: [params.partyId, params.capId, link],
|
|
120
|
+
}),
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface ClearLinkParams extends LinkPackageIds {
|
|
126
|
+
partyId: string;
|
|
127
|
+
capId: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Clears a platform's link from the party. No-op on-chain if unset. */
|
|
131
|
+
export function clearLink(platform: PlatformKey, params: ClearLinkParams): TxThunk {
|
|
132
|
+
return (tx) => {
|
|
133
|
+
const spec = PLATFORMS[platform];
|
|
134
|
+
tx.add(
|
|
135
|
+
platformLinkMod.clearLink({
|
|
136
|
+
package: params.partyPlatformLinkPackageId,
|
|
137
|
+
typeArguments: [dataTypeArg(spec, params)],
|
|
138
|
+
arguments: [params.partyId, params.capId],
|
|
139
|
+
}),
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// === Read helpers ===
|
|
145
|
+
|
|
146
|
+
// The Move `Data` type suffix (`<module>::<dataType>`) → platform key. The package
|
|
147
|
+
// id prefix varies, so match on the last two `::` segments (unique across the table).
|
|
148
|
+
const BY_MOVE_TYPE: Record<string, PlatformKey> = Object.fromEntries(
|
|
149
|
+
PLATFORM_KEYS.map((k) => [`${PLATFORMS[k].module}::${PLATFORMS[k].dataType}`, k]),
|
|
150
|
+
) as Record<string, PlatformKey>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The platform for a fully-qualified `Data` type argument, or null if unknown.
|
|
154
|
+
* @param dataType e.g. `0x…::party_social::InstagramData`.
|
|
155
|
+
*/
|
|
156
|
+
export function platformForDataType(dataType: string): PlatformKey | null {
|
|
157
|
+
const suffix = dataType.split("::").slice(-2).join("::");
|
|
158
|
+
return BY_MOVE_TYPE[suffix] ?? null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** Builds a public `PlatformLink` from a platform key and its stored native identifier. */
|
|
162
|
+
export function buildLink(platform: PlatformKey, value: string): PlatformLink {
|
|
163
|
+
return { platform, value, url: PLATFORMS[platform].url(value) };
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// === Bound builders (the client binds package ids, then exposes per-platform methods) ===
|
|
167
|
+
|
|
168
|
+
export type BoundSetLinkParams = Omit<SetLinkParams, keyof LinkPackageIds>;
|
|
169
|
+
export type BoundClearLinkParams = Omit<ClearLinkParams, keyof LinkPackageIds>;
|
|
170
|
+
|
|
171
|
+
/** Per-platform `setX` / `clearX` builders, keyed off the table so all ~27 are covered. */
|
|
172
|
+
export type LinkTxBuilders =
|
|
173
|
+
& { [K in PlatformKey as `set${Capitalize<K>}`]: (p: BoundSetLinkParams) => TxThunk }
|
|
174
|
+
& { [K in PlatformKey as `clear${Capitalize<K>}`]: (p: BoundClearLinkParams) => TxThunk };
|
|
175
|
+
|
|
176
|
+
/** Builds the per-platform link tx builders with `ids` pre-bound. */
|
|
177
|
+
export function linkTxBuilders(ids: LinkPackageIds): LinkTxBuilders {
|
|
178
|
+
const out: Record<string, unknown> = {};
|
|
179
|
+
for (const key of PLATFORM_KEYS) {
|
|
180
|
+
const cap = key.charAt(0).toUpperCase() + key.slice(1);
|
|
181
|
+
out[`set${cap}`] = (p: BoundSetLinkParams): TxThunk => setLink(key, { ...p, ...ids });
|
|
182
|
+
out[`clear${cap}`] = (p: BoundClearLinkParams): TxThunk => clearLink(key, { ...p, ...ids });
|
|
183
|
+
}
|
|
184
|
+
return out as LinkTxBuilders;
|
|
185
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// The `party_media` extension: a party's imagery, stored on-chain as a single
|
|
5
|
+
// Walrus *quilt* id. Individual images are quilt patches addressed by identifier
|
|
6
|
+
// ("avatar", "header", …) — those roles are a client convention, derived here
|
|
7
|
+
// off-chain, never stored on-chain. The write builder takes the quilt's base64url
|
|
8
|
+
// blob id (what `walrus store-quilt` prints) and converts it to the on-chain
|
|
9
|
+
// u256; the read helpers build aggregator URLs per identifier.
|
|
10
|
+
|
|
11
|
+
import { b64UrlToU256 } from "../internal.ts";
|
|
12
|
+
import * as mediaMod from "../../contracts/party_media/party_media.ts";
|
|
13
|
+
import type { TxThunk } from "@misofm/partyos";
|
|
14
|
+
import type { Media } from "../types.ts";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Quilt patch identifiers party media uses, in role order. Uploaders store images
|
|
18
|
+
* under these identifiers; readers fetch by them. This is the whole "meaning" the
|
|
19
|
+
* chain defers to the client.
|
|
20
|
+
*/
|
|
21
|
+
export const MEDIA_IDENTIFIERS = { avatar: "avatar", header: "header" } as const;
|
|
22
|
+
export type MediaIdentifier = (typeof MEDIA_IDENTIFIERS)[keyof typeof MEDIA_IDENTIFIERS];
|
|
23
|
+
|
|
24
|
+
export interface SetMediaParams {
|
|
25
|
+
partyId: string;
|
|
26
|
+
capId: string;
|
|
27
|
+
/** Walrus quilt blob id (base64url), e.g. from `walrus store-quilt`. */
|
|
28
|
+
quiltId: string;
|
|
29
|
+
partyMediaPackageId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Sets (or replaces) the party's media quilt. */
|
|
33
|
+
export function setMedia(params: SetMediaParams): TxThunk {
|
|
34
|
+
return (tx) => {
|
|
35
|
+
tx.add(
|
|
36
|
+
mediaMod.setMedia({
|
|
37
|
+
package: params.partyMediaPackageId,
|
|
38
|
+
arguments: [params.partyId, params.capId, BigInt(b64UrlToU256(params.quiltId))],
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ClearMediaParams {
|
|
45
|
+
partyId: string;
|
|
46
|
+
capId: string;
|
|
47
|
+
partyMediaPackageId: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Removes the party's media entirely. No-op on-chain if none is set. */
|
|
51
|
+
export function clearMedia(params: ClearMediaParams): TxThunk {
|
|
52
|
+
return (tx) => {
|
|
53
|
+
tx.add(mediaMod.clearMedia({ package: params.partyMediaPackageId, arguments: [params.partyId, params.capId] }));
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Aggregator URL for one image in a party's quilt, addressed by identifier. */
|
|
58
|
+
export function mediaImageUrl(aggregatorUrl: string, quiltId: string, identifier: string): string {
|
|
59
|
+
return `${aggregatorUrl.replace(/\/$/, "")}/v1/blobs/by-quilt-id/${quiltId}/${identifier}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** The avatar + header image URLs for a party's media, or null if unset. */
|
|
63
|
+
export function mediaUrls(
|
|
64
|
+
aggregatorUrl: string,
|
|
65
|
+
media: Media | null,
|
|
66
|
+
): { avatar: string; header: string } | null {
|
|
67
|
+
if (!media) return null;
|
|
68
|
+
return {
|
|
69
|
+
avatar: mediaImageUrl(aggregatorUrl, media.quiltId, MEDIA_IDENTIFIERS.avatar),
|
|
70
|
+
header: mediaImageUrl(aggregatorUrl, media.quiltId, MEDIA_IDENTIFIERS.header),
|
|
71
|
+
};
|
|
72
|
+
}
|