@misofm/platform 0.27.0 → 0.28.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 +309 -204
- package/dist/Miso.d.ts +403 -0
- package/dist/Miso.d.ts.map +1 -0
- package/dist/Miso.js +455 -0
- package/dist/Miso.js.map +1 -0
- package/dist/auth.d.ts +11 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +16 -3
- package/dist/auth.js.map +1 -1
- package/dist/catalog.d.ts +8 -5
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +36 -19
- package/dist/catalog.js.map +1 -1
- package/dist/client.d.ts +52 -443
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +58 -775
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.d.ts +38 -48
- package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.js +20 -4
- package/dist/contracts/composition_credits/composition_credits.js.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts +64 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js +66 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +52 -4
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +52 -4
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts +63 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js +63 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js.map +1 -1
- package/dist/contracts/genre/genre.d.ts +10 -1
- package/dist/contracts/genre/genre.d.ts.map +1 -1
- package/dist/contracts/genre/genre.js +8 -1
- package/dist/contracts/genre/genre.js.map +1 -1
- package/dist/contracts/miso_pay/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/miso_pay/deps/std/type_name.js.map +1 -0
- package/dist/contracts/miso_pay/pay.d.ts +209 -0
- package/dist/contracts/miso_pay/pay.d.ts.map +1 -0
- package/dist/contracts/miso_pay/pay.js +195 -0
- package/dist/contracts/miso_pay/pay.js.map +1 -0
- package/dist/contracts/party_cta/party_cta.d.ts +49 -3
- package/dist/contracts/party_cta/party_cta.d.ts.map +1 -1
- package/dist/contracts/party_cta/party_cta.js +27 -5
- package/dist/contracts/party_cta/party_cta.js.map +1 -1
- package/dist/contracts/party_genre/party_genre.d.ts +25 -0
- package/dist/contracts/party_genre/party_genre.d.ts.map +1 -1
- package/dist/contracts/party_genre/party_genre.js +14 -3
- package/dist/contracts/party_genre/party_genre.js.map +1 -1
- package/dist/contracts/party_media/party_media.d.ts +19 -3
- package/dist/contracts/party_media/party_media.d.ts.map +1 -1
- package/dist/contracts/party_media/party_media.js +20 -4
- package/dist/contracts/party_media/party_media.js.map +1 -1
- package/dist/contracts/party_platform_link/party_platform_link.d.ts +15 -7
- package/dist/contracts/party_platform_link/party_platform_link.d.ts.map +1 -1
- package/dist/contracts/party_platform_link/party_platform_link.js +15 -7
- package/dist/contracts/party_platform_link/party_platform_link.js.map +1 -1
- package/dist/contracts/party_profile/party_profile.d.ts +63 -8
- package/dist/contracts/party_profile/party_profile.d.ts.map +1 -1
- package/dist/contracts/party_profile/party_profile.js +33 -8
- package/dist/contracts/party_profile/party_profile.js.map +1 -1
- package/dist/contracts/party_roles/party_roles.d.ts +28 -3
- package/dist/contracts/party_roles/party_roles.d.ts.map +1 -1
- package/dist/contracts/party_roles/party_roles.js +19 -4
- package/dist/contracts/party_roles/party_roles.js.map +1 -1
- package/dist/contracts/party_tags/party_tags.d.ts +23 -3
- package/dist/contracts/party_tags/party_tags.d.ts.map +1 -1
- package/dist/contracts/party_tags/party_tags.js +16 -4
- package/dist/contracts/party_tags/party_tags.js.map +1 -1
- package/dist/contracts/party_wallet/party_wallet.d.ts +4 -1
- package/dist/contracts/party_wallet/party_wallet.d.ts.map +1 -1
- package/dist/contracts/party_wallet/party_wallet.js +2 -1
- package/dist/contracts/party_wallet/party_wallet.js.map +1 -1
- package/dist/contracts/platform_link/platform_link.d.ts +207 -0
- package/dist/contracts/platform_link/platform_link.d.ts.map +1 -0
- package/dist/contracts/platform_link/platform_link.js +209 -0
- package/dist/contracts/platform_link/platform_link.js.map +1 -0
- package/dist/contracts/record/pressing.d.ts +53 -7
- package/dist/contracts/record/pressing.d.ts.map +1 -1
- package/dist/contracts/record/pressing.js +50 -4
- package/dist/contracts/record/pressing.js.map +1 -1
- package/dist/contracts/record/record.d.ts +14 -0
- package/dist/contracts/record/record.d.ts.map +1 -1
- package/dist/contracts/record/record.js +15 -1
- package/dist/contracts/record/record.js.map +1 -1
- package/dist/contracts/record_shop/listing.d.ts +80 -35
- package/dist/contracts/record_shop/listing.d.ts.map +1 -1
- package/dist/contracts/record_shop/listing.js +76 -13
- package/dist/contracts/record_shop/listing.js.map +1 -1
- package/dist/contracts/recording_advisory/recording_advisory.d.ts +15 -15
- package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -1
- package/dist/contracts/recording_advisory/recording_advisory.js +15 -8
- package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -1
- package/dist/contracts/recording_credits/recording_credits.d.ts +95 -1350
- package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -1
- package/dist/contracts/recording_credits/recording_credits.js +63 -12
- package/dist/contracts/recording_credits/recording_credits.js.map +1 -1
- package/dist/contracts/recording_engine_session/recording_engine_session.d.ts +30 -49
- package/dist/contracts/recording_engine_session/recording_engine_session.d.ts.map +1 -1
- package/dist/contracts/recording_engine_session/recording_engine_session.js +19 -4
- package/dist/contracts/recording_engine_session/recording_engine_session.js.map +1 -1
- package/dist/contracts/recording_genre/recording_genre.d.ts +67 -9
- package/dist/contracts/recording_genre/recording_genre.d.ts.map +1 -1
- package/dist/contracts/recording_genre/recording_genre.js +53 -9
- package/dist/contracts/recording_genre/recording_genre.js.map +1 -1
- package/dist/contracts/recording_language/recording_language.d.ts +29 -5
- package/dist/contracts/recording_language/recording_language.d.ts.map +1 -1
- package/dist/contracts/recording_language/recording_language.js +18 -5
- package/dist/contracts/recording_language/recording_language.js.map +1 -1
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +25 -15
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -1
- package/dist/contracts/recording_master_reference/recording_master_reference.js +18 -5
- package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +55 -4
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +55 -4
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts +66 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js +66 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js.map +1 -1
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.d.ts +12 -9
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.d.ts.map +1 -1
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.js +11 -4
- package/dist/contracts/recording_streaming_transcode/recording_streaming_transcode.js.map +1 -1
- package/dist/contracts/release_cover_art/release_cover_art.d.ts +168 -74
- package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -1
- package/dist/contracts/release_cover_art/release_cover_art.js +126 -10
- package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -1
- package/dist/contracts/release_credits/release_credits.d.ts +24 -28
- package/dist/contracts/release_credits/release_credits.d.ts.map +1 -1
- package/dist/contracts/release_credits/release_credits.js +18 -4
- package/dist/contracts/release_credits/release_credits.js.map +1 -1
- package/dist/contracts/release_description/release_description.d.ts +16 -5
- package/dist/contracts/release_description/release_description.d.ts.map +1 -1
- package/dist/contracts/release_description/release_description.js +9 -4
- package/dist/contracts/release_description/release_description.js.map +1 -1
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +130 -160
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -1
- package/dist/contracts/release_dsp_link/release_dsp_link.js +74 -19
- package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -1
- package/dist/contracts/release_genre/release_genre.d.ts +66 -11
- package/dist/contracts/release_genre/release_genre.d.ts.map +1 -1
- package/dist/contracts/release_genre/release_genre.js +52 -11
- package/dist/contracts/release_genre/release_genre.js.map +1 -1
- package/dist/contracts/release_kind/release_kind.d.ts +28 -5
- package/dist/contracts/release_kind/release_kind.d.ts.map +1 -1
- package/dist/contracts/release_kind/release_kind.js +19 -4
- package/dist/contracts/release_kind/release_kind.js.map +1 -1
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts +17 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts.map +1 -1
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js +15 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js.map +1 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts +37 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts.map +1 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js +37 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.d.ts +78 -6
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.js +79 -7
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -1
- package/dist/contracts/royalty_pool/pool.d.ts +117 -27
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/pool.js +117 -28
- package/dist/contracts/royalty_pool/pool.js.map +1 -1
- package/dist/contracts/royalty_pool/stake.d.ts +3 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/stake.js +5 -2
- package/dist/contracts/royalty_pool/stake.js.map +1 -1
- package/dist/contracts/share/share.d.ts +80 -0
- package/dist/contracts/share/share.d.ts.map +1 -0
- package/dist/contracts/share/share.js +72 -0
- package/dist/contracts/share/share.js.map +1 -0
- package/dist/contracts/vault/vault.d.ts +51 -0
- package/dist/contracts/vault/vault.d.ts.map +1 -1
- package/dist/contracts/vault/vault.js +55 -4
- package/dist/contracts/vault/vault.js.map +1 -1
- package/dist/contracts.d.ts +60 -0
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +17 -0
- package/dist/contracts.js.map +1 -1
- package/dist/cover.d.ts +5 -6
- package/dist/cover.d.ts.map +1 -1
- package/dist/cover.js +10 -10
- package/dist/cover.js.map +1 -1
- package/dist/credits.d.ts +12 -13
- package/dist/credits.d.ts.map +1 -1
- package/dist/credits.js +16 -10
- package/dist/credits.js.map +1 -1
- package/dist/deployments.d.ts +3 -3
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +2 -3
- package/dist/deployments.js.map +1 -1
- package/dist/errors.d.ts +24 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +43 -16
- package/dist/errors.js.map +1 -1
- package/dist/events.d.ts +1687 -835
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +258 -39
- package/dist/events.js.map +1 -1
- package/dist/genre.d.ts +11 -12
- package/dist/genre.d.ts.map +1 -1
- package/dist/genre.js +5 -3
- package/dist/genre.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/packages.d.ts +1047 -1695
- package/dist/packages.d.ts.map +1 -1
- package/dist/party/client.d.ts +113 -296
- package/dist/party/client.d.ts.map +1 -1
- package/dist/party/client.js +93 -178
- package/dist/party/client.js.map +1 -1
- package/dist/party/extensions/ctas.d.ts +3 -3
- package/dist/party/extensions/ctas.d.ts.map +1 -1
- package/dist/party/extensions/genres.d.ts +4 -4
- package/dist/party/extensions/genres.d.ts.map +1 -1
- package/dist/party/extensions/links.d.ts +5 -5
- package/dist/party/extensions/links.d.ts.map +1 -1
- package/dist/party/extensions/links.js.map +1 -1
- package/dist/party/extensions/media.d.ts +3 -3
- package/dist/party/extensions/media.d.ts.map +1 -1
- package/dist/party/extensions/profile.d.ts +3 -3
- package/dist/party/extensions/profile.d.ts.map +1 -1
- package/dist/party/extensions/roles.d.ts +4 -4
- package/dist/party/extensions/roles.d.ts.map +1 -1
- package/dist/party/extensions/roles.js.map +1 -1
- package/dist/party/extensions/tags.d.ts +4 -4
- package/dist/party/extensions/tags.d.ts.map +1 -1
- package/dist/party/index.d.ts +1 -1
- package/dist/party/index.d.ts.map +1 -1
- package/dist/party/index.js.map +1 -1
- package/dist/party/queries.d.ts +8 -8
- package/dist/party/queries.d.ts.map +1 -1
- package/dist/party/queries.js +83 -56
- package/dist/party/queries.js.map +1 -1
- package/dist/pressing.d.ts +13 -15
- package/dist/pressing.d.ts.map +1 -1
- package/dist/pressing.js +99 -29
- package/dist/pressing.js.map +1 -1
- package/dist/publication.d.ts +13 -6
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +26 -21
- package/dist/publication.js.map +1 -1
- package/dist/queries.js +3 -3
- package/dist/queries.js.map +1 -1
- package/dist/read/artist.d.ts +4 -3
- package/dist/read/artist.d.ts.map +1 -1
- package/dist/read/artist.js +24 -8
- package/dist/read/artist.js.map +1 -1
- package/dist/read/catalog.d.ts +17 -16
- package/dist/read/catalog.d.ts.map +1 -1
- package/dist/read/catalog.js +25 -11
- package/dist/read/catalog.js.map +1 -1
- package/dist/read/client.d.ts +41 -20
- package/dist/read/client.d.ts.map +1 -1
- package/dist/read/client.js +20 -12
- package/dist/read/client.js.map +1 -1
- package/dist/read/config.d.ts +25 -3
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +42 -25
- package/dist/read/config.js.map +1 -1
- package/dist/read/genres.d.ts +8 -3
- package/dist/read/genres.d.ts.map +1 -1
- package/dist/read/genres.js +23 -17
- package/dist/read/genres.js.map +1 -1
- package/dist/read/index.d.ts +1 -1
- package/dist/read/index.d.ts.map +1 -1
- package/dist/read/index.js +8 -6
- package/dist/read/index.js.map +1 -1
- package/dist/read/receipts.d.ts +5 -4
- package/dist/read/receipts.d.ts.map +1 -1
- package/dist/read/receipts.js +94 -46
- package/dist/read/receipts.js.map +1 -1
- package/dist/read/royalties.d.ts +6 -5
- package/dist/read/royalties.d.ts.map +1 -1
- package/dist/read/royalties.js +16 -9
- package/dist/read/royalties.js.map +1 -1
- package/dist/read/wallet.d.ts +23 -12
- package/dist/read/wallet.d.ts.map +1 -1
- package/dist/read/wallet.js +158 -177
- package/dist/read/wallet.js.map +1 -1
- package/dist/read/works.d.ts +6 -6
- package/dist/read/works.d.ts.map +1 -1
- package/dist/read/works.js +40 -26
- package/dist/read/works.js.map +1 -1
- package/dist/recording-extensions.d.ts +15 -16
- package/dist/recording-extensions.d.ts.map +1 -1
- package/dist/recording-extensions.js +12 -8
- package/dist/recording-extensions.js.map +1 -1
- package/dist/release-extensions.d.ts +5 -6
- package/dist/release-extensions.d.ts.map +1 -1
- package/dist/release-extensions.js +3 -2
- package/dist/release-extensions.js.map +1 -1
- package/dist/release-graph.d.ts +2 -2
- package/dist/release-graph.d.ts.map +1 -1
- package/dist/release-graph.js.map +1 -1
- package/dist/royalty.d.ts +4 -4
- package/dist/royalty.d.ts.map +1 -1
- package/dist/royalty.js +16 -7
- package/dist/royalty.js.map +1 -1
- package/dist/share.d.ts +58 -24
- package/dist/share.d.ts.map +1 -1
- package/dist/share.js +167 -92
- package/dist/share.js.map +1 -1
- package/dist/transactions.d.ts +15 -6
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +1 -0
- package/dist/transactions.js.map +1 -1
- package/dist/vault.d.ts +13 -3
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +22 -16
- package/dist/vault.js.map +1 -1
- package/package.json +9 -8
- package/src/Miso.ts +951 -0
- package/src/auth.ts +16 -3
- package/src/catalog.ts +58 -25
- package/src/client.ts +98 -1359
- package/src/contracts/composition_credits/composition_credits.ts +20 -4
- package/src/contracts/composition_routed_stake/composition_routed_stake.ts +67 -1
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +53 -4
- package/src/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.ts +64 -1
- package/src/contracts/genre/genre.ts +8 -1
- package/src/contracts/miso_pay/pay.ts +356 -0
- package/src/contracts/party_cta/party_cta.ts +27 -5
- package/src/contracts/party_genre/party_genre.ts +14 -3
- package/src/contracts/party_media/party_media.ts +20 -4
- package/src/contracts/party_platform_link/party_platform_link.ts +15 -7
- package/src/contracts/party_profile/party_profile.ts +33 -8
- package/src/contracts/party_roles/party_roles.ts +19 -4
- package/src/contracts/party_tags/party_tags.ts +16 -4
- package/src/contracts/party_wallet/party_wallet.ts +2 -1
- package/src/contracts/platform_link/platform_link.ts +322 -0
- package/src/contracts/record/pressing.ts +50 -4
- package/src/contracts/record/record.ts +15 -1
- package/src/contracts/record_shop/listing.ts +76 -13
- package/src/contracts/recording_advisory/recording_advisory.ts +15 -8
- package/src/contracts/recording_credits/recording_credits.ts +63 -12
- package/src/contracts/recording_engine_session/recording_engine_session.ts +19 -4
- package/src/contracts/recording_genre/recording_genre.ts +53 -9
- package/src/contracts/recording_language/recording_language.ts +18 -5
- package/src/contracts/recording_master_reference/recording_master_reference.ts +18 -5
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +56 -4
- package/src/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.ts +67 -1
- package/src/contracts/recording_streaming_transcode/recording_streaming_transcode.ts +11 -4
- package/src/contracts/release_cover_art/release_cover_art.ts +126 -10
- package/src/contracts/release_credits/release_credits.ts +18 -4
- package/src/contracts/release_description/release_description.ts +9 -4
- package/src/contracts/release_dsp_link/release_dsp_link.ts +74 -19
- package/src/contracts/release_genre/release_genre.ts +52 -11
- package/src/contracts/release_kind/release_kind.ts +19 -4
- package/src/contracts/release_revenue_distributor/release_revenue_distributor.ts +15 -0
- package/src/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.ts +38 -1
- package/src/contracts/routed_stake/routed_stake.ts +79 -7
- package/src/contracts/royalty_pool/pool.ts +140 -38
- package/src/contracts/royalty_pool/stake.ts +5 -2
- package/src/contracts/share/share.ts +97 -0
- package/src/contracts/vault/vault.ts +55 -4
- package/src/contracts.ts +18 -0
- package/src/cover.ts +14 -15
- package/src/credits.ts +27 -22
- package/src/deployments.ts +3 -4
- package/src/errors.ts +64 -34
- package/src/events.ts +260 -39
- package/src/genre.ts +15 -14
- package/src/index.ts +19 -10
- package/src/party/client.ts +217 -208
- package/src/party/extensions/ctas.ts +3 -3
- package/src/party/extensions/genres.ts +4 -4
- package/src/party/extensions/links.ts +7 -7
- package/src/party/extensions/media.ts +3 -3
- package/src/party/extensions/profile.ts +3 -3
- package/src/party/extensions/roles.ts +5 -5
- package/src/party/extensions/tags.ts +4 -4
- package/src/party/index.ts +0 -1
- package/src/party/queries.ts +90 -87
- package/src/pressing.ts +132 -89
- package/src/publication.ts +33 -32
- package/src/queries.ts +3 -3
- package/src/read/artist.ts +36 -17
- package/src/read/catalog.ts +68 -36
- package/src/read/client.ts +55 -30
- package/src/read/config.ts +55 -30
- package/src/read/genres.ts +22 -18
- package/src/read/index.ts +8 -6
- package/src/read/receipts.ts +130 -67
- package/src/read/royalties.ts +22 -10
- package/src/read/wallet.ts +226 -216
- package/src/read/works.ts +51 -44
- package/src/recording-extensions.ts +27 -24
- package/src/release-extensions.ts +7 -7
- package/src/release-graph.ts +2 -1
- package/src/royalty.ts +19 -25
- package/src/share.ts +197 -128
- package/src/transactions.ts +15 -8
- package/src/vault.ts +24 -31
- package/dist/contracts/record_shop/deps/std/type_name.d.ts.map +0 -1
- package/dist/contracts/record_shop/deps/std/type_name.js.map +0 -1
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +0 -6
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +0 -1
- package/dist/contracts/recording_language/deps/language_code/language_code.js +0 -8
- package/dist/contracts/recording_language/deps/language_code/language_code.js.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.d.ts +0 -24
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.d.ts.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.js +0 -24
- package/dist/contracts/recording_master_reference/deps/ori/confidentiality.js.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/data.d.ts +0 -16
- package/dist/contracts/recording_master_reference/deps/ori/data.d.ts.map +0 -1
- package/dist/contracts/recording_master_reference/deps/ori/data.js +0 -12
- package/dist/contracts/recording_master_reference/deps/ori/data.js.map +0 -1
- package/dist/execute.d.ts +0 -32
- package/dist/execute.d.ts.map +0 -1
- package/dist/execute.js +0 -36
- package/dist/execute.js.map +0 -1
- package/src/contracts/recording_language/deps/language_code/language_code.ts +0 -8
- package/src/contracts/recording_master_reference/deps/ori/confidentiality.ts +0 -24
- package/src/contracts/recording_master_reference/deps/ori/data.ts +0 -12
- package/src/execute.ts +0 -56
- /package/dist/contracts/{record_shop → miso_pay}/deps/std/type_name.d.ts +0 -0
- /package/dist/contracts/{record_shop → miso_pay}/deps/std/type_name.js +0 -0
- /package/src/contracts/{record_shop → miso_pay}/deps/std/type_name.ts +0 -0
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
* The CTAs are an ordered list: **position is priority**. The whole list is
|
|
16
16
|
* written at once (`set_ctas`) — the natural fit for a drag-to-reorder editor that
|
|
17
17
|
* saves on submit — so there are no per-entry ids to track. Gated by the
|
|
18
|
-
* `PartyAdminCap`; views are permissionless.
|
|
18
|
+
* `PartyAdminCap`; views are permissionless. Each successful write emits one
|
|
19
|
+
* self-contained event with the authorizing cap address and complete ordered
|
|
20
|
+
* prior/resulting label and URL bytes; an absent clear is silent.
|
|
19
21
|
*/
|
|
20
22
|
|
|
21
23
|
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
@@ -30,10 +32,21 @@ export const Cta = new MoveStruct({ name: `${$moduleName}::Cta`, fields: {
|
|
|
30
32
|
} });
|
|
31
33
|
export const CtasSetEvent = new MoveStruct({ name: `${$moduleName}::CtasSetEvent`, fields: {
|
|
32
34
|
party_id: bcs.Address,
|
|
33
|
-
|
|
35
|
+
admin_cap_id: bcs.Address,
|
|
36
|
+
existed_before: bcs.bool(),
|
|
37
|
+
previous_count: bcs.u64(),
|
|
38
|
+
count: bcs.u64(),
|
|
39
|
+
previous_labels: bcs.vector(bcs.vector(bcs.u8())),
|
|
40
|
+
previous_urls: bcs.vector(bcs.vector(bcs.u8())),
|
|
41
|
+
labels: bcs.vector(bcs.vector(bcs.u8())),
|
|
42
|
+
urls: bcs.vector(bcs.vector(bcs.u8()))
|
|
34
43
|
} });
|
|
35
44
|
export const CtasClearedEvent = new MoveStruct({ name: `${$moduleName}::CtasClearedEvent`, fields: {
|
|
36
|
-
party_id: bcs.Address
|
|
45
|
+
party_id: bcs.Address,
|
|
46
|
+
admin_cap_id: bcs.Address,
|
|
47
|
+
previous_count: bcs.u64(),
|
|
48
|
+
previous_labels: bcs.vector(bcs.vector(bcs.u8())),
|
|
49
|
+
previous_urls: bcs.vector(bcs.vector(bcs.u8()))
|
|
37
50
|
} });
|
|
38
51
|
export interface NewCtaArguments {
|
|
39
52
|
label: RawTransactionArgument<string>;
|
|
@@ -123,7 +136,12 @@ export interface SetCtasOptions {
|
|
|
123
136
|
ctas: TransactionArgument
|
|
124
137
|
];
|
|
125
138
|
}
|
|
126
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* Sets (or replaces) the party's ordered CTA list. Position is priority. Length is
|
|
141
|
+
* checked before authorization. Every successful call, including an empty or
|
|
142
|
+
* identical replacement, emits exactly one event with complete prior and resulting
|
|
143
|
+
* label and URL byte vectors.
|
|
144
|
+
*/
|
|
127
145
|
export function setCtas(options: SetCtasOptions) {
|
|
128
146
|
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
129
147
|
const argumentsTypes = [
|
|
@@ -150,7 +168,11 @@ export interface ClearCtasOptions {
|
|
|
150
168
|
cap: RawTransactionArgument<string>
|
|
151
169
|
];
|
|
152
170
|
}
|
|
153
|
-
/**
|
|
171
|
+
/**
|
|
172
|
+
* Removes the party's CTA list. Authorization happens before checking existence;
|
|
173
|
+
* an absent list is a silent no-op, while an existing list emits exactly one event
|
|
174
|
+
* containing the complete removed payload.
|
|
175
|
+
*/
|
|
154
176
|
export function clearCtas(options: ClearCtasOptions) {
|
|
155
177
|
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
156
178
|
const argumentsTypes = [
|
|
@@ -27,14 +27,25 @@ const $moduleName = '@local-pkg/party_genre::party_genre';
|
|
|
27
27
|
export const GenresKey = new MoveTuple({ name: `${$moduleName}::GenresKey`, fields: [bcs.bool()] });
|
|
28
28
|
export const GenreAddedEvent = new MoveStruct({ name: `${$moduleName}::GenreAddedEvent`, fields: {
|
|
29
29
|
party_id: bcs.Address,
|
|
30
|
-
|
|
30
|
+
admin_cap_id: bcs.Address,
|
|
31
|
+
genre_id: bcs.Address,
|
|
32
|
+
genre_name: bcs.vector(bcs.u8()),
|
|
33
|
+
genre_ids_before: bcs.vector(bcs.Address),
|
|
34
|
+
genre_ids_after: bcs.vector(bcs.Address),
|
|
35
|
+
max_genres: bcs.u64()
|
|
31
36
|
} });
|
|
32
37
|
export const GenreRemovedEvent = new MoveStruct({ name: `${$moduleName}::GenreRemovedEvent`, fields: {
|
|
33
38
|
party_id: bcs.Address,
|
|
34
|
-
|
|
39
|
+
admin_cap_id: bcs.Address,
|
|
40
|
+
genre_id: bcs.Address,
|
|
41
|
+
genre_ids_before: bcs.vector(bcs.Address),
|
|
42
|
+
genre_ids_after: bcs.vector(bcs.Address)
|
|
35
43
|
} });
|
|
36
44
|
export const GenresClearedEvent = new MoveStruct({ name: `${$moduleName}::GenresClearedEvent`, fields: {
|
|
37
|
-
party_id: bcs.Address
|
|
45
|
+
party_id: bcs.Address,
|
|
46
|
+
admin_cap_id: bcs.Address,
|
|
47
|
+
genre_ids_before: bcs.vector(bcs.Address),
|
|
48
|
+
genre_ids_after: bcs.vector(bcs.Address)
|
|
38
49
|
} });
|
|
39
50
|
export interface AddGenreArguments {
|
|
40
51
|
self: RawTransactionArgument<string>;
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
* The chain is deliberately role-agnostic: which patch is the avatar vs the header
|
|
16
16
|
* is a client convention (quilt patch _identifiers_, e.g. "avatar" / "header"),
|
|
17
17
|
* derived off-chain — never stored here. Updating any image means re-storing the
|
|
18
|
-
* quilt and calling `set_media` with the new id.
|
|
18
|
+
* quilt and calling `set_media` with the new id. Every successful set emits the
|
|
19
|
+
* prior/resulting quilt ids and the authorizing cap address; a clear emits the
|
|
20
|
+
* removed id only when a field existed. All writes are cap-gated through
|
|
21
|
+
* `party::uid_mut`, and views are permissionless.
|
|
19
22
|
*/
|
|
20
23
|
|
|
21
24
|
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
@@ -34,10 +37,15 @@ export const Media = new MoveStruct({ name: `${$moduleName}::Media`, fields: {
|
|
|
34
37
|
} });
|
|
35
38
|
export const MediaSetEvent = new MoveStruct({ name: `${$moduleName}::MediaSetEvent`, fields: {
|
|
36
39
|
party_id: bcs.Address,
|
|
40
|
+
admin_cap_id: bcs.Address,
|
|
41
|
+
existed_before: bcs.bool(),
|
|
42
|
+
previous_quilt: bcs.u256(),
|
|
37
43
|
quilt: bcs.u256()
|
|
38
44
|
} });
|
|
39
45
|
export const MediaClearedEvent = new MoveStruct({ name: `${$moduleName}::MediaClearedEvent`, fields: {
|
|
40
|
-
party_id: bcs.Address
|
|
46
|
+
party_id: bcs.Address,
|
|
47
|
+
admin_cap_id: bcs.Address,
|
|
48
|
+
previous_quilt: bcs.u256()
|
|
41
49
|
} });
|
|
42
50
|
export interface SetMediaArguments {
|
|
43
51
|
self: RawTransactionArgument<string>;
|
|
@@ -52,7 +60,11 @@ export interface SetMediaOptions {
|
|
|
52
60
|
quilt: RawTransactionArgument<number | bigint>
|
|
53
61
|
];
|
|
54
62
|
}
|
|
55
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Sets (or replaces) the party's media quilt. Aborts on a zero id before
|
|
65
|
+
* authorization. Every successful call, including an identical replacement, emits
|
|
66
|
+
* exactly one event with the complete prior/resulting quilt snapshot.
|
|
67
|
+
*/
|
|
56
68
|
export function setMedia(options: SetMediaOptions) {
|
|
57
69
|
const packageAddress = options.package ?? '@local-pkg/party_media';
|
|
58
70
|
const argumentsTypes = [
|
|
@@ -79,7 +91,11 @@ export interface ClearMediaOptions {
|
|
|
79
91
|
cap: RawTransactionArgument<string>
|
|
80
92
|
];
|
|
81
93
|
}
|
|
82
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Removes the party's media. Authorization happens before checking existence; an
|
|
96
|
+
* absent field is a silent no-op, while an existing field emits exactly one event
|
|
97
|
+
* containing the removed quilt id.
|
|
98
|
+
*/
|
|
83
99
|
export function clearMedia(options: ClearMediaOptions) {
|
|
84
100
|
const packageAddress = options.package ?? '@local-pkg/party_media';
|
|
85
101
|
const argumentsTypes = [
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* This one module serves every platform (social, music, anything) because it is
|
|
13
13
|
* generic over `Data`; the payload types live in their own small packages
|
|
14
14
|
* (`party_social`, `party_music`, …). All writes are gated by the `PartyAdminCap`
|
|
15
|
-
* via `uid_mut`; views are permissionless.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* via `uid_mut`; views are permissionless. Storage mutations emit the
|
|
16
|
+
* authoritative rich `platform_link::PlatformLinkSetEvent` or
|
|
17
|
+
* `platform_link::PlatformLinkRemovedEvent` from the primitive, so the event
|
|
18
|
+
* carries the parent, defining-ID-qualified payload type, existence transition,
|
|
19
|
+
* and bounded payload summaries. This module adds no replacement event.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
@@ -46,7 +46,11 @@ export interface SetLinkOptions {
|
|
|
46
46
|
string
|
|
47
47
|
];
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Sets (or replaces) a platform's link on the party. The primitive emits one
|
|
51
|
+
* `PlatformLinkSetEvent<Data>` for every successful call, including an equal
|
|
52
|
+
* replacement.
|
|
53
|
+
*/
|
|
50
54
|
export function setLink(options: SetLinkOptions) {
|
|
51
55
|
const packageAddress = options.package ?? '@local-pkg/party_platform_link';
|
|
52
56
|
const argumentsTypes = [
|
|
@@ -77,7 +81,11 @@ export interface ClearLinkOptions {
|
|
|
77
81
|
string
|
|
78
82
|
];
|
|
79
83
|
}
|
|
80
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Clears a platform's link from the party. Cap authorization is checked before the
|
|
86
|
+
* existence check. A present link delegates to the primitive, which emits one
|
|
87
|
+
* `PlatformLinkRemovedEvent<Data>`; absent and repeated clears are silent.
|
|
88
|
+
*/
|
|
81
89
|
export function clearLink(options: ClearLinkOptions) {
|
|
82
90
|
const packageAddress = options.package ?? '@local-pkg/party_platform_link';
|
|
83
91
|
const argumentsTypes = [
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
* validated code primitives (`country_code`, `language_code`), so a stored value
|
|
15
15
|
* is always a real code. The party's `name` is NOT duplicated here — it lives on
|
|
16
16
|
* the core `Party` (`party::set_name`) — and the join date comes from the party's
|
|
17
|
-
* creation event (the indexer has it for free).
|
|
17
|
+
* creation event (the indexer has it for free). Every successful set emits a
|
|
18
|
+
* complete before/after byte snapshot and the authorizing cap address; a clear
|
|
19
|
+
* emits the complete removed snapshot only when a profile exists. All writes are
|
|
20
|
+
* cap-gated through `party::uid_mut`, and views are permissionless.
|
|
18
21
|
*/
|
|
19
22
|
|
|
20
23
|
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
@@ -31,11 +34,26 @@ export const Profile = new MoveStruct({ name: `${$moduleName}::Profile`, fields:
|
|
|
31
34
|
country: bcs.option(country_code.CountryCode),
|
|
32
35
|
languages: bcs.vector(language_code.LanguageCode)
|
|
33
36
|
} });
|
|
34
|
-
export const
|
|
35
|
-
party_id: bcs.Address
|
|
37
|
+
export const PartyProfileSetEvent = new MoveStruct({ name: `${$moduleName}::PartyProfileSetEvent`, fields: {
|
|
38
|
+
party_id: bcs.Address,
|
|
39
|
+
admin_cap_id: bcs.Address,
|
|
40
|
+
had_profile: bcs.bool(),
|
|
41
|
+
previous_bio_short: bcs.vector(bcs.u8()),
|
|
42
|
+
previous_bio_long: bcs.option(bcs.vector(bcs.u8())),
|
|
43
|
+
previous_country: bcs.option(bcs.vector(bcs.u8())),
|
|
44
|
+
previous_languages: bcs.vector(bcs.vector(bcs.u8())),
|
|
45
|
+
bio_short: bcs.vector(bcs.u8()),
|
|
46
|
+
bio_long: bcs.option(bcs.vector(bcs.u8())),
|
|
47
|
+
country: bcs.option(bcs.vector(bcs.u8())),
|
|
48
|
+
languages: bcs.vector(bcs.vector(bcs.u8()))
|
|
36
49
|
} });
|
|
37
|
-
export const
|
|
38
|
-
party_id: bcs.Address
|
|
50
|
+
export const PartyProfileClearedEvent = new MoveStruct({ name: `${$moduleName}::PartyProfileClearedEvent`, fields: {
|
|
51
|
+
party_id: bcs.Address,
|
|
52
|
+
admin_cap_id: bcs.Address,
|
|
53
|
+
previous_bio_short: bcs.vector(bcs.u8()),
|
|
54
|
+
previous_bio_long: bcs.option(bcs.vector(bcs.u8())),
|
|
55
|
+
previous_country: bcs.option(bcs.vector(bcs.u8())),
|
|
56
|
+
previous_languages: bcs.vector(bcs.vector(bcs.u8()))
|
|
39
57
|
} });
|
|
40
58
|
export interface SetProfileArguments {
|
|
41
59
|
self: RawTransactionArgument<string>;
|
|
@@ -57,8 +75,11 @@ export interface SetProfileOptions {
|
|
|
57
75
|
];
|
|
58
76
|
}
|
|
59
77
|
/**
|
|
60
|
-
* Sets (creates or replaces) the party's whole profile.
|
|
61
|
-
*
|
|
78
|
+
* Sets (creates or replaces) the party's whole profile. Validation and profile
|
|
79
|
+
* construction happen before authorization, preserving validation precedence;
|
|
80
|
+
* authorization happens before any dynamic-field snapshot or mutation. Every
|
|
81
|
+
* successful call, including an identical replacement, emits exactly one event
|
|
82
|
+
* containing complete prior and resulting raw-byte snapshots.
|
|
62
83
|
*/
|
|
63
84
|
export function setProfile(options: SetProfileOptions) {
|
|
64
85
|
const packageAddress = options.package ?? '@local-pkg/party_profile';
|
|
@@ -89,7 +110,11 @@ export interface ClearProfileOptions {
|
|
|
89
110
|
cap: RawTransactionArgument<string>
|
|
90
111
|
];
|
|
91
112
|
}
|
|
92
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* Removes the party's profile. Authorization happens before checking existence; an
|
|
115
|
+
* absent field is a silent no-op, while an existing field is removed and emits
|
|
116
|
+
* exactly one complete snapshot event.
|
|
117
|
+
*/
|
|
93
118
|
export function clearProfile(options: ClearProfileOptions) {
|
|
94
119
|
const packageAddress = options.package ?? '@local-pkg/party_profile';
|
|
95
120
|
const argumentsTypes = [
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
* live in the shared `typed_set` primitive; this package keeps the role type, name
|
|
15
15
|
* validation, the capacity, and the typed events. Duplicate / not-present /
|
|
16
16
|
* over-max aborts come from `typed_set` with its own error codes. Gated by the
|
|
17
|
-
* `PartyAdminCap`; views are permissionless.
|
|
17
|
+
* `PartyAdminCap`; views are permissionless. Mutation events carry the party and
|
|
18
|
+
* cap addresses, a stable kind/name pair, and before/after counts; a populated
|
|
19
|
+
* clear also carries ordered removed role snapshots.
|
|
18
20
|
*/
|
|
19
21
|
|
|
20
22
|
import { MoveTuple, MoveStruct, MoveEnum, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
@@ -25,14 +27,27 @@ const $moduleName = '@local-pkg/party_roles::party_roles';
|
|
|
25
27
|
export const RolesKey = new MoveTuple({ name: `${$moduleName}::RolesKey`, fields: [bcs.bool()] });
|
|
26
28
|
export const RoleAddedEvent = new MoveStruct({ name: `${$moduleName}::RoleAddedEvent`, fields: {
|
|
27
29
|
party_id: bcs.Address,
|
|
28
|
-
|
|
30
|
+
admin_cap_id: bcs.Address,
|
|
31
|
+
role_kind: bcs.u8(),
|
|
32
|
+
role_name: bcs.vector(bcs.u8()),
|
|
33
|
+
roles_count_before: bcs.u64(),
|
|
34
|
+
roles_count_after: bcs.u64()
|
|
29
35
|
} });
|
|
30
36
|
export const RoleRemovedEvent = new MoveStruct({ name: `${$moduleName}::RoleRemovedEvent`, fields: {
|
|
31
37
|
party_id: bcs.Address,
|
|
32
|
-
|
|
38
|
+
admin_cap_id: bcs.Address,
|
|
39
|
+
role_kind: bcs.u8(),
|
|
40
|
+
role_name: bcs.vector(bcs.u8()),
|
|
41
|
+
roles_count_before: bcs.u64(),
|
|
42
|
+
roles_count_after: bcs.u64()
|
|
33
43
|
} });
|
|
34
44
|
export const RolesClearedEvent = new MoveStruct({ name: `${$moduleName}::RolesClearedEvent`, fields: {
|
|
35
|
-
party_id: bcs.Address
|
|
45
|
+
party_id: bcs.Address,
|
|
46
|
+
admin_cap_id: bcs.Address,
|
|
47
|
+
removed_role_kinds: bcs.vector(bcs.u8()),
|
|
48
|
+
removed_role_names: bcs.vector(bcs.vector(bcs.u8())),
|
|
49
|
+
roles_count_before: bcs.u64(),
|
|
50
|
+
roles_count_after: bcs.u64()
|
|
36
51
|
} });
|
|
37
52
|
/** The kind of act a party represents. Closed enum + `Custom` escape hatch. */
|
|
38
53
|
export const ArtistRole = new MoveEnum({ name: `${$moduleName}::ArtistRole`, fields: {
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
* validation, the capacity, and the typed events. Duplicate / not-present /
|
|
15
15
|
* over-max aborts come from `typed_set` with its own error codes. Tags are stored
|
|
16
16
|
* as given (exact dedupe); normalization for search/display is a client concern.
|
|
17
|
-
* Gated by the `PartyAdminCap`; views are permissionless.
|
|
17
|
+
* Gated by the `PartyAdminCap`; views are permissionless. Mutation events carry
|
|
18
|
+
* the party and cap addresses, the raw tag bytes, and before/after counts; a
|
|
19
|
+
* populated clear also carries the ordered raw tag snapshots.
|
|
18
20
|
*/
|
|
19
21
|
|
|
20
22
|
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
@@ -25,14 +27,24 @@ const $moduleName = '@local-pkg/party_tags::party_tags';
|
|
|
25
27
|
export const TagsKey = new MoveTuple({ name: `${$moduleName}::TagsKey`, fields: [bcs.bool()] });
|
|
26
28
|
export const TagAddedEvent = new MoveStruct({ name: `${$moduleName}::TagAddedEvent`, fields: {
|
|
27
29
|
party_id: bcs.Address,
|
|
28
|
-
|
|
30
|
+
admin_cap_id: bcs.Address,
|
|
31
|
+
tag: bcs.vector(bcs.u8()),
|
|
32
|
+
tag_count_before: bcs.u64(),
|
|
33
|
+
tag_count_after: bcs.u64()
|
|
29
34
|
} });
|
|
30
35
|
export const TagRemovedEvent = new MoveStruct({ name: `${$moduleName}::TagRemovedEvent`, fields: {
|
|
31
36
|
party_id: bcs.Address,
|
|
32
|
-
|
|
37
|
+
admin_cap_id: bcs.Address,
|
|
38
|
+
tag: bcs.vector(bcs.u8()),
|
|
39
|
+
tag_count_before: bcs.u64(),
|
|
40
|
+
tag_count_after: bcs.u64()
|
|
33
41
|
} });
|
|
34
42
|
export const TagsClearedEvent = new MoveStruct({ name: `${$moduleName}::TagsClearedEvent`, fields: {
|
|
35
|
-
party_id: bcs.Address
|
|
43
|
+
party_id: bcs.Address,
|
|
44
|
+
admin_cap_id: bcs.Address,
|
|
45
|
+
removed_tags: bcs.vector(bcs.vector(bcs.u8())),
|
|
46
|
+
tag_count_before: bcs.u64(),
|
|
47
|
+
tag_count_after: bcs.u64()
|
|
36
48
|
} });
|
|
37
49
|
export interface AddTagArguments {
|
|
38
50
|
self: RawTransactionArgument<string>;
|
|
@@ -20,12 +20,13 @@ import { bcs } from '@mysten/sui/bcs';
|
|
|
20
20
|
import type {} from "@mysten/bcs";
|
|
21
21
|
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
22
22
|
const $moduleName = '@local-pkg/party_wallet::party_wallet';
|
|
23
|
-
export const ObjectReceivedEvent = new MoveStruct({ name: `${$moduleName}::ObjectReceivedEvent
|
|
23
|
+
export const ObjectReceivedEvent = new MoveStruct({ name: `${$moduleName}::ObjectReceivedEvent<phantom T>`, fields: {
|
|
24
24
|
party_id: bcs.Address,
|
|
25
25
|
object_id: bcs.Address
|
|
26
26
|
} });
|
|
27
27
|
export const CoinsReceivedEvent = new MoveStruct({ name: `${$moduleName}::CoinsReceivedEvent<phantom Currency>`, fields: {
|
|
28
28
|
party_id: bcs.Address,
|
|
29
|
+
coin_ids: bcs.vector(bcs.Address),
|
|
29
30
|
amount: bcs.u64(),
|
|
30
31
|
coins: bcs.u64()
|
|
31
32
|
} });
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `PlatformLink<Data>` — a typed link to an entity on one external platform: a
|
|
8
|
+
* streaming service (Spotify, Bandcamp), a social network (X, Instagram), or any
|
|
9
|
+
* other site.
|
|
10
|
+
*
|
|
11
|
+
* A protocol-agnostic primitive: it knows nothing about any specific platform, nor
|
|
12
|
+
* about any consumer object (a `Party`, a `Release`, …). It is a generic wrapper
|
|
13
|
+
* around a `Data` payload plus the machinery to store exactly one such link, by
|
|
14
|
+
* type, as a dynamic field on any object's `UID`.
|
|
15
|
+
*
|
|
16
|
+
* `Data` is the platform-specific native identifier(s) — an Instagram handle, a
|
|
17
|
+
* Spotify artist id, a Bandcamp subdomain, etc. Each platform defines its own
|
|
18
|
+
* `Data` type in its own small package, so adding a platform is a new type, never
|
|
19
|
+
* a change here. URLs are never stored: a client rebuilds the public URL from the
|
|
20
|
+
* `Data` it reads back, so a platform reshaping its URLs needs no on-chain change.
|
|
21
|
+
*
|
|
22
|
+
* Storage is keyed by `PlatformLinkKey<Data>`, whose `phantom Data` makes
|
|
23
|
+
* `PlatformLinkKey<InstagramData>` and `PlatformLinkKey<SpotifyData>` distinct
|
|
24
|
+
* keys — so each platform occupies its own independent field on the same `UID`,
|
|
25
|
+
* and a new platform can be added to a record without touching the others.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
29
|
+
import type {} from "@mysten/bcs";
|
|
30
|
+
import { MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
31
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
32
|
+
const $moduleName = '@local-pkg/platform_link::platform_link';
|
|
33
|
+
/**
|
|
34
|
+
* A link to an entity on one platform. `Data` carries that platform's native
|
|
35
|
+
* identifier(s); the public URL is rebuilt from it client-side.
|
|
36
|
+
*/
|
|
37
|
+
export function PlatformLink<Data extends BcsType<any>>(...typeParameters: [
|
|
38
|
+
Data
|
|
39
|
+
]) {
|
|
40
|
+
return new MoveStruct({ name: `${$moduleName}::PlatformLink<${typeParameters[0].name as Data['name']}>`, fields: {
|
|
41
|
+
data: typeParameters[0]
|
|
42
|
+
} });
|
|
43
|
+
}
|
|
44
|
+
export const PlatformLinkKey = new MoveTuple({ name: `${$moduleName}::PlatformLinkKey<phantom Data>`, fields: [bcs.bool()] });
|
|
45
|
+
export const PlatformLinkSetEvent = new MoveStruct({ name: `${$moduleName}::PlatformLinkSetEvent<phantom Data>`, fields: {
|
|
46
|
+
parent_id: bcs.Address,
|
|
47
|
+
data_type: bcs.vector(bcs.u8()),
|
|
48
|
+
existed_before: bcs.bool(),
|
|
49
|
+
exists_after: bcs.bool(),
|
|
50
|
+
previous_bcs_length: bcs.u64(),
|
|
51
|
+
previous_bcs_hash: bcs.vector(bcs.u8()),
|
|
52
|
+
data_bcs_length: bcs.u64(),
|
|
53
|
+
data_bcs_hash: bcs.vector(bcs.u8())
|
|
54
|
+
} });
|
|
55
|
+
export const PlatformLinkRemovedEvent = new MoveStruct({ name: `${$moduleName}::PlatformLinkRemovedEvent<phantom Data>`, fields: {
|
|
56
|
+
parent_id: bcs.Address,
|
|
57
|
+
data_type: bcs.vector(bcs.u8()),
|
|
58
|
+
existed_before: bcs.bool(),
|
|
59
|
+
exists_after: bcs.bool(),
|
|
60
|
+
removed_bcs_length: bcs.u64(),
|
|
61
|
+
removed_bcs_hash: bcs.vector(bcs.u8())
|
|
62
|
+
} });
|
|
63
|
+
export interface MaxIdentifierLengthOptions {
|
|
64
|
+
package?: string;
|
|
65
|
+
arguments?: [
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Maximum length of a platform identifier — a handle, username, id, or subdomain —
|
|
70
|
+
* in bytes.
|
|
71
|
+
*/
|
|
72
|
+
export function maxIdentifierLength(options: MaxIdentifierLengthOptions = {}) {
|
|
73
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
74
|
+
return (tx: Transaction) => tx.moveCall({
|
|
75
|
+
package: packageAddress,
|
|
76
|
+
module: 'platform_link',
|
|
77
|
+
function: 'max_identifier_length',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
export interface MaxUrlLengthOptions {
|
|
81
|
+
package?: string;
|
|
82
|
+
arguments?: [
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Maximum length of a stored URL in bytes, for payloads whose URL is the identity
|
|
87
|
+
* (no reconstructable handle).
|
|
88
|
+
*/
|
|
89
|
+
export function maxUrlLength(options: MaxUrlLengthOptions = {}) {
|
|
90
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
91
|
+
return (tx: Transaction) => tx.moveCall({
|
|
92
|
+
package: packageAddress,
|
|
93
|
+
module: 'platform_link',
|
|
94
|
+
function: 'max_url_length',
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export interface NewArguments<Data extends BcsType<any>> {
|
|
98
|
+
data: RawTransactionArgument<Data>;
|
|
99
|
+
}
|
|
100
|
+
export interface NewOptions<Data extends BcsType<any>> {
|
|
101
|
+
package?: string;
|
|
102
|
+
arguments: NewArguments<Data> | [
|
|
103
|
+
data: RawTransactionArgument<Data>
|
|
104
|
+
];
|
|
105
|
+
typeArguments: [
|
|
106
|
+
string
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
/** Wraps a platform-specific payload into a link. */
|
|
110
|
+
export function _new<Data extends BcsType<any>>(options: NewOptions<Data>) {
|
|
111
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
112
|
+
const argumentsTypes = [
|
|
113
|
+
`${options.typeArguments[0]}`
|
|
114
|
+
] satisfies (string | null)[];
|
|
115
|
+
const parameterNames = ["data"];
|
|
116
|
+
return (tx: Transaction) => tx.moveCall({
|
|
117
|
+
package: packageAddress,
|
|
118
|
+
module: 'platform_link',
|
|
119
|
+
function: 'new',
|
|
120
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
121
|
+
typeArguments: options.typeArguments
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
export interface DataArguments {
|
|
125
|
+
self: TransactionArgument;
|
|
126
|
+
}
|
|
127
|
+
export interface DataOptions {
|
|
128
|
+
package?: string;
|
|
129
|
+
arguments: DataArguments | [
|
|
130
|
+
self: TransactionArgument
|
|
131
|
+
];
|
|
132
|
+
typeArguments: [
|
|
133
|
+
string
|
|
134
|
+
];
|
|
135
|
+
}
|
|
136
|
+
/** The wrapped platform-specific payload. */
|
|
137
|
+
export function data(options: DataOptions) {
|
|
138
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
139
|
+
const argumentsTypes = [
|
|
140
|
+
null
|
|
141
|
+
] satisfies (string | null)[];
|
|
142
|
+
const parameterNames = ["self"];
|
|
143
|
+
return (tx: Transaction) => tx.moveCall({
|
|
144
|
+
package: packageAddress,
|
|
145
|
+
module: 'platform_link',
|
|
146
|
+
function: 'data',
|
|
147
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
148
|
+
typeArguments: options.typeArguments
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
export interface Exists_Arguments {
|
|
152
|
+
uid: RawTransactionArgument<string>;
|
|
153
|
+
}
|
|
154
|
+
export interface Exists_Options {
|
|
155
|
+
package?: string;
|
|
156
|
+
arguments: Exists_Arguments | [
|
|
157
|
+
uid: RawTransactionArgument<string>
|
|
158
|
+
];
|
|
159
|
+
typeArguments: [
|
|
160
|
+
string
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
/** Whether a `PlatformLink<Data>` is stored under `uid`. */
|
|
164
|
+
export function exists_(options: Exists_Options) {
|
|
165
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
166
|
+
const argumentsTypes = [
|
|
167
|
+
'0x2::object::ID'
|
|
168
|
+
] satisfies (string | null)[];
|
|
169
|
+
const parameterNames = ["uid"];
|
|
170
|
+
return (tx: Transaction) => tx.moveCall({
|
|
171
|
+
package: packageAddress,
|
|
172
|
+
module: 'platform_link',
|
|
173
|
+
function: 'exists_',
|
|
174
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
175
|
+
typeArguments: options.typeArguments
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
export interface SetArguments {
|
|
179
|
+
uid: RawTransactionArgument<string>;
|
|
180
|
+
link: TransactionArgument;
|
|
181
|
+
}
|
|
182
|
+
export interface SetOptions {
|
|
183
|
+
package?: string;
|
|
184
|
+
arguments: SetArguments | [
|
|
185
|
+
uid: RawTransactionArgument<string>,
|
|
186
|
+
link: TransactionArgument
|
|
187
|
+
];
|
|
188
|
+
typeArguments: [
|
|
189
|
+
string
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Sets the `PlatformLink<Data>` under `uid`, replacing any existing one. Emits
|
|
194
|
+
* `PlatformLinkSetEvent<Data>` with bounded summaries of the previous and new
|
|
195
|
+
* payloads. An equal replacement still emits an event.
|
|
196
|
+
*/
|
|
197
|
+
export function set(options: SetOptions) {
|
|
198
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
199
|
+
const argumentsTypes = [
|
|
200
|
+
'0x2::object::ID',
|
|
201
|
+
null
|
|
202
|
+
] satisfies (string | null)[];
|
|
203
|
+
const parameterNames = ["uid", "link"];
|
|
204
|
+
return (tx: Transaction) => tx.moveCall({
|
|
205
|
+
package: packageAddress,
|
|
206
|
+
module: 'platform_link',
|
|
207
|
+
function: 'set',
|
|
208
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
209
|
+
typeArguments: options.typeArguments
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
export interface GetArguments {
|
|
213
|
+
uid: RawTransactionArgument<string>;
|
|
214
|
+
}
|
|
215
|
+
export interface GetOptions {
|
|
216
|
+
package?: string;
|
|
217
|
+
arguments: GetArguments | [
|
|
218
|
+
uid: RawTransactionArgument<string>
|
|
219
|
+
];
|
|
220
|
+
typeArguments: [
|
|
221
|
+
string
|
|
222
|
+
];
|
|
223
|
+
}
|
|
224
|
+
/** The stored `PlatformLink<Data>`, or `none` if absent. */
|
|
225
|
+
export function get(options: GetOptions) {
|
|
226
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
227
|
+
const argumentsTypes = [
|
|
228
|
+
'0x2::object::ID'
|
|
229
|
+
] satisfies (string | null)[];
|
|
230
|
+
const parameterNames = ["uid"];
|
|
231
|
+
return (tx: Transaction) => tx.moveCall({
|
|
232
|
+
package: packageAddress,
|
|
233
|
+
module: 'platform_link',
|
|
234
|
+
function: 'get',
|
|
235
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
236
|
+
typeArguments: options.typeArguments
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
export interface BorrowArguments {
|
|
240
|
+
uid: RawTransactionArgument<string>;
|
|
241
|
+
}
|
|
242
|
+
export interface BorrowOptions {
|
|
243
|
+
package?: string;
|
|
244
|
+
arguments: BorrowArguments | [
|
|
245
|
+
uid: RawTransactionArgument<string>
|
|
246
|
+
];
|
|
247
|
+
typeArguments: [
|
|
248
|
+
string
|
|
249
|
+
];
|
|
250
|
+
}
|
|
251
|
+
/** Borrows the stored link. Aborts if none is stored. */
|
|
252
|
+
export function borrow(options: BorrowOptions) {
|
|
253
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
254
|
+
const argumentsTypes = [
|
|
255
|
+
'0x2::object::ID'
|
|
256
|
+
] satisfies (string | null)[];
|
|
257
|
+
const parameterNames = ["uid"];
|
|
258
|
+
return (tx: Transaction) => tx.moveCall({
|
|
259
|
+
package: packageAddress,
|
|
260
|
+
module: 'platform_link',
|
|
261
|
+
function: 'borrow',
|
|
262
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
263
|
+
typeArguments: options.typeArguments
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
export interface RemoveArguments {
|
|
267
|
+
uid: RawTransactionArgument<string>;
|
|
268
|
+
}
|
|
269
|
+
export interface RemoveOptions {
|
|
270
|
+
package?: string;
|
|
271
|
+
arguments: RemoveArguments | [
|
|
272
|
+
uid: RawTransactionArgument<string>
|
|
273
|
+
];
|
|
274
|
+
typeArguments: [
|
|
275
|
+
string
|
|
276
|
+
];
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Removes and returns the stored link. Aborts if none is stored. Emits
|
|
280
|
+
* `PlatformLinkRemovedEvent<Data>` for the removed payload.
|
|
281
|
+
*/
|
|
282
|
+
export function remove(options: RemoveOptions) {
|
|
283
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
284
|
+
const argumentsTypes = [
|
|
285
|
+
'0x2::object::ID'
|
|
286
|
+
] satisfies (string | null)[];
|
|
287
|
+
const parameterNames = ["uid"];
|
|
288
|
+
return (tx: Transaction) => tx.moveCall({
|
|
289
|
+
package: packageAddress,
|
|
290
|
+
module: 'platform_link',
|
|
291
|
+
function: 'remove',
|
|
292
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
293
|
+
typeArguments: options.typeArguments
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
export interface ClearArguments {
|
|
297
|
+
uid: RawTransactionArgument<string>;
|
|
298
|
+
}
|
|
299
|
+
export interface ClearOptions {
|
|
300
|
+
package?: string;
|
|
301
|
+
arguments: ClearArguments | [
|
|
302
|
+
uid: RawTransactionArgument<string>
|
|
303
|
+
];
|
|
304
|
+
typeArguments: [
|
|
305
|
+
string
|
|
306
|
+
];
|
|
307
|
+
}
|
|
308
|
+
/** Removes the stored link if present, discarding it. No-op if absent. */
|
|
309
|
+
export function clear(options: ClearOptions) {
|
|
310
|
+
const packageAddress = options.package ?? '@local-pkg/platform_link';
|
|
311
|
+
const argumentsTypes = [
|
|
312
|
+
'0x2::object::ID'
|
|
313
|
+
] satisfies (string | null)[];
|
|
314
|
+
const parameterNames = ["uid"];
|
|
315
|
+
return (tx: Transaction) => tx.moveCall({
|
|
316
|
+
package: packageAddress,
|
|
317
|
+
module: 'platform_link',
|
|
318
|
+
function: 'clear',
|
|
319
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
320
|
+
typeArguments: options.typeArguments
|
|
321
|
+
});
|
|
322
|
+
}
|