@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
package/README.md
CHANGED
|
@@ -7,6 +7,16 @@ copies; fail-closed Vault custody, raw Actions, and safe crank plugins; and
|
|
|
7
7
|
every first-party extension and generic royalty primitive built on top of the
|
|
8
8
|
`@misofm/musicos` object model and the `@misofm/partyos` Party identity model.
|
|
9
9
|
|
|
10
|
+
`@misofm/platform` is a [sui-effect](https://github.com/unconfirmedlabs/sui-effect)
|
|
11
|
+
extension: one `Context.Service` (`Miso`), built on `sui-effect`'s `Sui`,
|
|
12
|
+
`SuiGraphQL`, and `Tx`, composed over the converted `Musicos`/`Partyos`
|
|
13
|
+
services, whose members are `Effect`s with closed error unions, whose writes
|
|
14
|
+
are PTB fragments (`Recipe`s) a consumer composes and submits once, and whose
|
|
15
|
+
Promise face is derived — never hand-written — by `SuiExtension.fromService`.
|
|
16
|
+
See `node_modules/@unconfirmed/sui-effect/docs/extensions.md` for the contract every
|
|
17
|
+
extension in this codebase follows, and ["Migrating from 0.27"](#migrating-from-027)
|
|
18
|
+
below if you're coming from the hand-written `MisoPlatformClient`.
|
|
19
|
+
|
|
10
20
|
## The boundary rule
|
|
11
21
|
|
|
12
22
|
> `@misofm/musicos` is the object model. Everything Miso offers on top of it is
|
|
@@ -42,22 +52,27 @@ address-owned admin caps explicitly; it never silently treats a legacy cap as a
|
|
|
42
52
|
vaulted one. New Vault IDs are derived from the shared `VaultRegistry`, the raw
|
|
43
53
|
cap ID, and its type; each VaultAdminCap ID is then derived from its Vault.
|
|
44
54
|
|
|
45
|
-
This package depends on `@misofm/musicos`
|
|
46
|
-
`
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
This package depends on `@misofm/musicos` and `@misofm/partyos` directly and
|
|
56
|
+
composes their converted `Musicos`/`Partyos` services internally, so
|
|
57
|
+
`Miso.layer`'s requirement channel stays `Sui | SuiGraphQL` — never
|
|
58
|
+
`Sui | SuiGraphQL | Musicos | Partyos` — for a consumer that only asked for
|
|
59
|
+
`Miso`. Writes still compose in one PTB (the transaction-fragment pattern from
|
|
60
|
+
the [Sui SDK building guide](https://sdk.mystenlabs.com/sui/sdk-building)),
|
|
61
|
+
just crossing a package boundary.
|
|
62
|
+
|
|
63
|
+
## Install
|
|
51
64
|
|
|
52
65
|
```sh
|
|
53
|
-
bun add @misofm/platform
|
|
66
|
+
bun add @misofm/platform @unconfirmed/sui-effect effect @mysten/sui @mysten/bcs
|
|
54
67
|
```
|
|
55
68
|
|
|
56
|
-
`@
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
Peer dependencies: `@unconfirmed/sui-effect@^0.1.0`, `effect@>=4.0.0-rc.112 <4.1`,
|
|
70
|
+
`@mysten/sui@^2.28`, `@mysten/bcs@^2.1.1`. `@misofm/musicos` and
|
|
71
|
+
`@misofm/partyos` resolve transitively through this package, so applications
|
|
72
|
+
get exactly one object-model SDK, one Party-identity SDK, and one compatible
|
|
73
|
+
deployment map without installing either themselves. A custom deployment is
|
|
74
|
+
recursively frozen at `Miso.layer` build, without freezing the caller's
|
|
75
|
+
original object, so later caller mutation cannot retarget an existing client.
|
|
61
76
|
|
|
62
77
|
### Engine sessions
|
|
63
78
|
|
|
@@ -95,53 +110,72 @@ singletons.
|
|
|
95
110
|
|
|
96
111
|
## Usage
|
|
97
112
|
|
|
98
|
-
|
|
99
|
-
([SDK building guidelines](https://sdk.mystenlabs.com/sui/sdk-building)):
|
|
100
|
-
|
|
101
|
-
Every method that performs I/O — a chain read, a signed execution — returns an
|
|
102
|
-
`Effect.Effect<A, E>` (`R = never`: the client already provided `SuiClient`
|
|
103
|
-
internally). Run a program with `Effect.runPromise` (or compose it further
|
|
104
|
-
with other Effects) at your own boundary; PTB builders (`tx.*`) stay plain
|
|
105
|
-
synchronous functions.
|
|
113
|
+
### Effect
|
|
106
114
|
|
|
107
115
|
```ts
|
|
108
116
|
import { Effect } from "effect";
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
117
|
+
import { Sui, SuiCore, SuiGraphQL } from "@unconfirmed/sui-effect";
|
|
118
|
+
import { ObjectId } from "@unconfirmed/sui-effect";
|
|
119
|
+
import { Miso } from "@misofm/platform";
|
|
120
|
+
import { getMisoPlatformDeployment } from "@misofm/platform/deployments";
|
|
112
121
|
|
|
113
|
-
const
|
|
114
|
-
miso({ deployment: verifiedDeployment }),
|
|
115
|
-
);
|
|
122
|
+
const deployment = getMisoPlatformDeployment("testnet");
|
|
116
123
|
|
|
117
124
|
const program = Effect.gen(function* () {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
// Party identity comes from @misofm/partyos; platform adds the extensions.
|
|
125
|
-
// client.miso.party is a PartyPlatformClient wrapping a PartyosClient (core
|
|
126
|
-
// reads/builders delegate straight through) bound to this deployment's
|
|
127
|
-
// `partyos` (core) and `party` (extensions) sections — also importable
|
|
128
|
-
// standalone from `@misofm/platform/party`.
|
|
129
|
-
const party = yield* client.miso.party.getPartyById(partyId);
|
|
125
|
+
const miso = yield* Miso;
|
|
126
|
+
|
|
127
|
+
// The permissionless object-model and Party surfaces are part of the same service.
|
|
128
|
+
// Ids are branded: brand a trusted string with ObjectId.make, decode untrusted input.
|
|
129
|
+
const release = yield* miso.protocol.getReleaseById(ObjectId.make(releaseId));
|
|
130
|
+
const party = yield* miso.party.getPartyById(ObjectId.make(partyId));
|
|
130
131
|
|
|
131
132
|
// Read: run + one currency's offer, one round trip, no registry lookup.
|
|
132
|
-
const { pressing, listing } = yield*
|
|
133
|
-
releaseId,
|
|
134
|
-
edition,
|
|
135
|
-
currencyType: USD_COIN_TYPE,
|
|
136
|
-
});
|
|
133
|
+
const { pressing, listing } = yield* miso.getSale({ releaseId, edition, currencyType: USD_COIN_TYPE });
|
|
137
134
|
|
|
138
135
|
return { release, party, pressing, listing };
|
|
139
136
|
});
|
|
140
137
|
|
|
141
|
-
const { pressing, listing } = await
|
|
138
|
+
const { release, party, pressing, listing } = await program.pipe(
|
|
139
|
+
Effect.provide(Miso.layer(deployment)),
|
|
140
|
+
Effect.provide(Sui.layerNoDeps),
|
|
141
|
+
Effect.provide(SuiCore.layerGrpc({ network: "testnet", baseUrl: "https://..." })),
|
|
142
|
+
Effect.provide(SuiGraphQL.layerConfig), // or SuiGraphQL.layerUnavailable with no endpoint
|
|
143
|
+
Effect.runPromise,
|
|
144
|
+
);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Inside a `Script` or an existing `sui-effect`-based program, just `yield* Miso`
|
|
148
|
+
after providing `Miso.layer(deployment)` (or `layerConfig`) over the `Sui | SuiGraphQL`
|
|
149
|
+
your program already has.
|
|
142
150
|
|
|
143
|
-
|
|
144
|
-
|
|
151
|
+
A read that can fail closed (a missing release, an unavailable Record sales
|
|
152
|
+
deployment) fails with one of this SDK's tagged errors — see
|
|
153
|
+
[Errors](#errors) — so recover with `Effect.catchTag`/`Effect.catchTags`
|
|
154
|
+
instead of inspecting a thrown message:
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
const releaseOrNull = miso.protocol
|
|
158
|
+
.getReleaseById(ObjectId.make(releaseId))
|
|
159
|
+
.pipe(Effect.catchTag("ObjectNotFound", () => Effect.succeed(null)));
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Promise
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
import { SuiGrpcClient } from "@mysten/sui/grpc";
|
|
166
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
167
|
+
import { miso } from "@misofm/platform/client";
|
|
168
|
+
|
|
169
|
+
const client = new SuiGrpcClient({ network: "testnet", baseUrl }).$extend(miso());
|
|
170
|
+
|
|
171
|
+
// The face keeps a member's argument types, and every namespace is nested:
|
|
172
|
+
// client.miso.protocol.*, client.miso.party.*, client.miso.read.*.
|
|
173
|
+
const release = await client.miso.protocol.getReleaseById(ObjectId.make(releaseId));
|
|
174
|
+
const party = await client.miso.party.getPartyById(ObjectId.make(partyId));
|
|
175
|
+
const { pressing, listing } = await client.miso.getSale({ releaseId, edition, currencyType: USD_COIN_TYPE });
|
|
176
|
+
|
|
177
|
+
// Write: a Recipe, so it composes with protocol/party calls in the same PTB.
|
|
178
|
+
// `tx` builders never touch the network — no Effect, no Promise involved.
|
|
145
179
|
const tx = new Transaction();
|
|
146
180
|
tx.add(
|
|
147
181
|
client.miso.tx.purchaseRecord({
|
|
@@ -153,61 +187,68 @@ tx.add(
|
|
|
153
187
|
recipient: buyer,
|
|
154
188
|
}),
|
|
155
189
|
);
|
|
156
|
-
```
|
|
157
190
|
|
|
158
|
-
|
|
159
|
-
fails with one of this SDK's tagged errors — see [Errors](#errors) — so
|
|
160
|
-
recover with `Effect.catchTag`/`Effect.catchTags` instead of inspecting a
|
|
161
|
-
thrown message:
|
|
162
|
-
|
|
163
|
-
```ts
|
|
164
|
-
const releaseOrNull = client.miso.protocol!
|
|
165
|
-
.getReleaseById(releaseId)
|
|
166
|
-
.pipe(Effect.catchTag("ObjectNotFoundError", () => Effect.succeed(null)));
|
|
191
|
+
await client.miso.dispose();
|
|
167
192
|
```
|
|
168
193
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
194
|
+
`miso()` registers **warm** — `tx`/`ids`/`call`/`bcs`/`vault`/`deployment` are
|
|
195
|
+
synchronous members a consumer reads the moment it registers, and `Miso.layer`
|
|
196
|
+
touches no network at build for a client on `mainnet` or `testnet` (their
|
|
197
|
+
chain identifiers are in sui-effect's built-in table). On `devnet`,
|
|
198
|
+
`localnet`, or a custom network, `warm` needs a chain identifier from
|
|
199
|
+
somewhere: pass `chainId` explicitly, **or** pass a `deployment` whose own
|
|
200
|
+
`chainIdentifier` names it (`options.chainId ?? options.deployment?.chainIdentifier`)
|
|
201
|
+
— a custom deployment for your own network is enough on its own, nothing
|
|
202
|
+
else to repeat. Without either, `client.$extend(miso())` throws
|
|
203
|
+
synchronously, naming the network. **A network/deployment mismatch also
|
|
204
|
+
throws synchronously here** (warm builds the layer inside `register`,
|
|
205
|
+
so `Miso.layer`'s own `MisoNetworkMismatchError`/`MisoChainIdentifierMismatchError`
|
|
206
|
+
surface immediately rather than on first call) — register lazily
|
|
207
|
+
(`SuiExtension.fromService(Miso, { name: "miso", layer: Miso.layer(deployment) })`,
|
|
208
|
+
no `warm`) if you want that check deferred to the first call instead, and
|
|
209
|
+
`await client.miso.$ready()` once before reading a synchronous member.
|
|
210
|
+
`miso()` on a network with no bundled manifest and no explicit `deployment`
|
|
211
|
+
rejects typed (`MisoPlatformDeploymentInvalidError`), not with an unhandled
|
|
212
|
+
defect.
|
|
213
|
+
|
|
214
|
+
`dispose()` is not final: it releases the runtime the registration built, but
|
|
215
|
+
the registration itself is unchanged. Because `miso()` registers `warm`, the
|
|
216
|
+
next use after `dispose()` re-runs the warm build synchronously (since
|
|
217
|
+
`@unconfirmed/sui-effect` 0.1.1), so a synchronous member read straight after
|
|
218
|
+
`dispose()` is real again. Only a lazy, non-`warm` registration goes cold and
|
|
219
|
+
throws `ExtensionNotReady` on a synchronous read until an `Effect` member is
|
|
220
|
+
awaited or `$ready()` runs. Dispose when the consumer is actually done, not
|
|
221
|
+
between calls.
|
|
222
|
+
|
|
223
|
+
Verified package and singleton IDs are bundled in
|
|
224
|
+
`MISO_PLATFORM_DEPLOYMENTS.testnet`. `miso()`/`Miso.layer` select that
|
|
225
|
+
verified map from the client's network by default; pass an explicit
|
|
226
|
+
`deployment` for a custom or unbundled network. The bundled Testnet
|
|
227
|
+
deployment includes both verified immutable sales package IDs; custom
|
|
228
|
+
deployments can still mark sales unavailable explicitly, and every sales
|
|
229
|
+
builder/reader fails closed (typed `RecordSalesUnavailableError`) whenever
|
|
230
|
+
either package is unavailable.
|
|
172
231
|
|
|
173
|
-
Holding the ids yourself? The bare APIs take
|
|
174
|
-
`recordShopPackageId` explicitly
|
|
232
|
+
Holding the ids yourself, outside the service? The bare APIs take
|
|
233
|
+
`recordPackageId`/`recordShopPackageId` explicitly and need only `Sui`:
|
|
175
234
|
|
|
176
235
|
```ts
|
|
177
236
|
import { purchaseRecord, getSale } from "@misofm/platform/pressing";
|
|
178
237
|
```
|
|
179
238
|
|
|
180
|
-
Verified package and singleton IDs are bundled in
|
|
181
|
-
`MISO_PLATFORM_DEPLOYMENTS.testnet`. Calling `miso()` selects that verified map
|
|
182
|
-
from the Sui client's network. Unbundled and custom networks still fail closed
|
|
183
|
-
unless the caller passes one complete deployment through `miso({ deployment })`.
|
|
184
|
-
|
|
185
|
-
The deprecated `misoPlatform(config)` constructor remains for callers that
|
|
186
|
-
supply flat package ids instead of a complete deployment; it registers at
|
|
187
|
-
`client.misoPlatform` instead of `client.miso` and requires the same
|
|
188
|
-
`await client.misoPlatform.ready()` gate before use. Prefer zero-config
|
|
189
|
-
`miso()` for new integrations.
|
|
190
|
-
|
|
191
239
|
### Party and the generated contract tree
|
|
192
240
|
|
|
193
241
|
Party identity (the `Party` object, `PartyAdminCap`, group membership) is
|
|
194
242
|
owned by `@misofm/partyos`; this package only owns the extensions attached to
|
|
195
|
-
it. `
|
|
196
|
-
(`getPartyById`, `getMemberships`, …)
|
|
197
|
-
|
|
198
|
-
|
|
243
|
+
it. `miso.party` (`MisoPartyService`) delegates every core method
|
|
244
|
+
(`getPartyById`, `getMemberships`, …) straight to the converted `Partyos`
|
|
245
|
+
service, and merges in this package's own party EXTENSION reads and 25 `tx`
|
|
246
|
+
fragments (9 from `Partyos.tx`, 16 first-party). It is assembled from `Sui`
|
|
247
|
+
and `Partyos` — never constructed directly by a consumer; get it from
|
|
248
|
+
`Miso`/`client.miso`:
|
|
199
249
|
|
|
200
250
|
```ts
|
|
201
|
-
|
|
202
|
-
import { PartyosClient } from "@misofm/partyos";
|
|
203
|
-
import { PartyPlatformClient } from "@misofm/platform/party";
|
|
204
|
-
|
|
205
|
-
const core = new PartyosClient(client, verifiedDeployment.partyos);
|
|
206
|
-
const party = new PartyPlatformClient(client, core, verifiedDeployment.party);
|
|
207
|
-
|
|
208
|
-
// Every read method returns Effect<A, E> (R = never) — the class already
|
|
209
|
-
// carries the ClientWithCoreApi it was constructed with.
|
|
210
|
-
const profile = await Effect.runPromise(party.getProfile(partyId)); // Option<Profile>
|
|
251
|
+
const profile = await client.miso.party.getProfile(partyId); // Option<Profile>
|
|
211
252
|
```
|
|
212
253
|
|
|
213
254
|
Every generated Move package on this side of the boundary — the Party
|
|
@@ -231,13 +272,13 @@ Workers, and servers. Miso's HTTP API is a thin validated and cached transport o
|
|
|
231
272
|
this same surface, not a separate domain implementation.
|
|
232
273
|
|
|
233
274
|
Every read here takes the resolved `MisoConfig` (package ids, not a transport)
|
|
234
|
-
and declares `
|
|
235
|
-
still bundles the transport, config, and
|
|
236
|
-
|
|
275
|
+
and declares `Sui`/`SuiGraphQL` in its Requirements — `createMisoClient`
|
|
276
|
+
(`read/client.ts`) still bundles the transport, config, and the `client.miso`
|
|
277
|
+
Promise face the way it always bundled a transport; provide its `layer`
|
|
278
|
+
(`Miso | Sui | SuiCore | SuiGraphQL`) once, at the boundary:
|
|
237
279
|
|
|
238
280
|
```ts
|
|
239
|
-
import { Effect
|
|
240
|
-
import { SuiClient, SuiGraphQL } from "@misofm/effect";
|
|
281
|
+
import { Effect } from "effect";
|
|
241
282
|
import {
|
|
242
283
|
createMisoClient,
|
|
243
284
|
getDiscoverShelf,
|
|
@@ -245,8 +286,7 @@ import {
|
|
|
245
286
|
getOwnedRecords,
|
|
246
287
|
} from "@misofm/platform/read";
|
|
247
288
|
|
|
248
|
-
const miso = createMisoClient({
|
|
249
|
-
const layer = Layer.mergeAll(SuiClient.layer(miso.sui), SuiGraphQL.layer(miso.graphqlRaw));
|
|
289
|
+
const miso = createMisoClient({ network: "testnet" });
|
|
250
290
|
|
|
251
291
|
const program = Effect.gen(function* () {
|
|
252
292
|
const discover = yield* getDiscoverShelf(miso.config);
|
|
@@ -255,7 +295,12 @@ const program = Effect.gen(function* () {
|
|
|
255
295
|
return { discover, release, library };
|
|
256
296
|
});
|
|
257
297
|
|
|
258
|
-
const { discover, release, library } = await Effect.runPromise(program.pipe(Effect.provide(layer)));
|
|
298
|
+
const { discover, release, library } = await Effect.runPromise(program.pipe(Effect.provide(miso.layer)));
|
|
299
|
+
|
|
300
|
+
// Or skip the standalone `read/*` functions and reach for the bound Miso
|
|
301
|
+
// service/Promise face directly — `miso.client.miso.read.*` is the same
|
|
302
|
+
// views, config already captured:
|
|
303
|
+
const sameDiscover = await miso.client.miso.read.getDiscoverShelf();
|
|
259
304
|
```
|
|
260
305
|
|
|
261
306
|
The package root also exposes the same functions under the `read` namespace:
|
|
@@ -263,10 +308,8 @@ The package root also exposes the same functions under the `read` namespace:
|
|
|
263
308
|
```ts
|
|
264
309
|
import { read } from "@misofm/platform";
|
|
265
310
|
|
|
266
|
-
const miso = read.createMisoClient({
|
|
267
|
-
const artist = await Effect.runPromise(
|
|
268
|
-
read.getArtistProfile(partyId, miso.config).pipe(Effect.provide(SuiClient.layer(miso.sui))),
|
|
269
|
-
);
|
|
311
|
+
const miso = read.createMisoClient({ network: "testnet" });
|
|
312
|
+
const artist = await Effect.runPromise(read.getArtistProfile(partyId, miso.config).pipe(Effect.provide(miso.layer)));
|
|
270
313
|
```
|
|
271
314
|
|
|
272
315
|
### Authenticated platform mutations
|
|
@@ -343,17 +386,15 @@ back its by-value parts (the object, its admin cap, its freshly-minted share
|
|
|
343
386
|
supplies the opinionated finish on top:
|
|
344
387
|
|
|
345
388
|
```ts
|
|
346
|
-
import { miso } from "@misofm/platform";
|
|
389
|
+
import { miso } from "@misofm/platform/client";
|
|
347
390
|
|
|
348
|
-
const client = new SuiGrpcClient({ network: "testnet", baseUrl }).$extend(
|
|
349
|
-
miso({ deployment: verifiedDeployment }),
|
|
350
|
-
);
|
|
391
|
+
const client = new SuiGrpcClient({ network: "testnet", baseUrl }).$extend(miso());
|
|
351
392
|
|
|
352
393
|
// Mints the composition's share supply, disperses it to shareRecipients as
|
|
353
394
|
// address balances, publishes (shares) the composition, and transfers the
|
|
354
395
|
// CompositionAdminCap to adminAddress — createComposition → finalizeComposition
|
|
355
|
-
// in one PTB.
|
|
356
|
-
const
|
|
396
|
+
// in one PTB. A Recipe, not a Promise: apply it to a Transaction, or tx.add() it.
|
|
397
|
+
const recipe = client.miso.tx.publishComposition({
|
|
357
398
|
title: "Song Title",
|
|
358
399
|
royaltyRateBps: 1000,
|
|
359
400
|
shareType: "0x...::share::Share",
|
|
@@ -370,10 +411,6 @@ see `@misofm/musicos`'s README for why the ordering is load-bearing).
|
|
|
370
411
|
The protocol, immutable Record and Record Shop packages, minato, and core
|
|
371
412
|
`ReleaseRegistry` address all come from the deployment selected by the Sui
|
|
372
413
|
client's network. Record sales have no Record Registry or Settings singleton.
|
|
373
|
-
The deprecated `misoPlatform()` constructor still accepts those values manually
|
|
374
|
-
for compatibility with existing integrations. It must also receive the exact
|
|
375
|
-
`network` and `chainIdentifier`; call `await client.misoPlatform.ready()` before
|
|
376
|
-
accessing its client-bound protocol or platform surfaces.
|
|
377
414
|
|
|
378
415
|
For custom PTBs, the bare primitives (`disperseShares`, `finalizeComposition`,
|
|
379
416
|
`finalizeRecording`) and the whole-graph orchestrator are exported standalone:
|
|
@@ -383,7 +420,7 @@ import { publishReleaseGraph } from "@misofm/platform";
|
|
|
383
420
|
|
|
384
421
|
// Every composition and recording, optional royalty pools, tracks, and
|
|
385
422
|
// the release — with the release id derived ON-CHAIN — in one atomic PTB.
|
|
386
|
-
const
|
|
423
|
+
const recipe = publishReleaseGraph({
|
|
387
424
|
compositions: [
|
|
388
425
|
{
|
|
389
426
|
shareType,
|
|
@@ -463,15 +500,9 @@ Recording creator remainder; lower-level routed-stake builders remain
|
|
|
463
500
|
available for the Move layer's 100% composition-cut case.
|
|
464
501
|
|
|
465
502
|
```ts
|
|
466
|
-
import {
|
|
467
|
-
import {
|
|
468
|
-
assertAtomicPublicationBounds,
|
|
469
|
-
parseAtomicPublicationResult,
|
|
470
|
-
publishAtomicCatalog,
|
|
471
|
-
} from "@misofm/platform/publication";
|
|
503
|
+
import { assertAtomicPublicationBounds } from "@misofm/platform/publication";
|
|
472
504
|
|
|
473
505
|
const publication = {
|
|
474
|
-
deployment,
|
|
475
506
|
parties,
|
|
476
507
|
compositions, // includes initialized share Currency + TreasuryCap ids
|
|
477
508
|
recordings,
|
|
@@ -480,13 +511,15 @@ const publication = {
|
|
|
480
511
|
};
|
|
481
512
|
|
|
482
513
|
// Pure local assembly: fail before publishing any share package if the final
|
|
483
|
-
// PTB exceeds the SDK's command/input safety limits or has an invalid graph
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
)
|
|
489
|
-
|
|
514
|
+
// PTB exceeds the SDK's command/input safety limits or has an invalid graph
|
|
515
|
+
// (deployment is added by publishCatalog itself, below).
|
|
516
|
+
assertAtomicPublicationBounds({ ...publication, deployment: client.miso.deployment });
|
|
517
|
+
|
|
518
|
+
// One Tx.run, submitted exactly once — no executor. `publishAtomicCatalog`
|
|
519
|
+
// (the fragment) and `parseAtomicPublicationResult` (now `Executed`-shaped)
|
|
520
|
+
// remain exported standalone from `@misofm/platform/publication` for a
|
|
521
|
+
// caller composing this PTB with other fragments before running it.
|
|
522
|
+
const result = await client.miso.publishCatalog(publication, { signer });
|
|
490
523
|
```
|
|
491
524
|
|
|
492
525
|
Fresh raw PartyAdminCap, CompositionAdminCap, RecordingAdminCap, and
|
|
@@ -499,9 +532,10 @@ callers retain explicit control over those lifecycle steps. Plugin witness
|
|
|
499
532
|
construction remains inside the SDK bindings.
|
|
500
533
|
|
|
501
534
|
Share packages necessarily precede this stage: publish at most five per PTB,
|
|
502
|
-
then initialize their currencies, then submit the atomic catalog PTB
|
|
503
|
-
|
|
504
|
-
|
|
535
|
+
then initialize their currencies, then submit the atomic catalog PTB — see
|
|
536
|
+
"Share Currency Provisioning" below. `Tx.run` holds one sender lock per
|
|
537
|
+
address, so batches serialize under one signer rather than running
|
|
538
|
+
concurrently through an executor (the accepted 0.28 behaviour change).
|
|
505
539
|
|
|
506
540
|
### Share Currency Provisioning (`share.ts`)
|
|
507
541
|
|
|
@@ -513,34 +547,30 @@ Publish and initialize are necessarily two transactions:
|
|
|
513
547
|
```ts
|
|
514
548
|
import { Effect } from "effect";
|
|
515
549
|
|
|
516
|
-
// Sequential (one currency, two
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
550
|
+
// Sequential (one currency, two Tx.run's — a moveCall target needs the
|
|
551
|
+
// package's id, and a package published in the same PTB has none until it
|
|
552
|
+
// executes):
|
|
553
|
+
const currency = await client.miso.createShareCurrency({ name: "Song Shares", description: "…" }, { signer });
|
|
554
|
+
// → { packageId, currencyId, shareType, treasuryCapId, gasUsed: bigint }
|
|
555
|
+
|
|
556
|
+
// Batched (many currencies). Both hold one sender lock per Tx.run — what a
|
|
557
|
+
// ParallelTransactionExecutor ran concurrently now serializes per batch
|
|
558
|
+
// under that lock, the accepted 0.28 behaviour change.
|
|
559
|
+
const { packageIds } = await client.miso.publishShareCurrencies(10, { signer });
|
|
560
|
+
const { currencies } = await client.miso.initializeShareCurrencies(
|
|
561
|
+
packageIds,
|
|
562
|
+
(pkg) => ({ name: "…", description: "…" }),
|
|
563
|
+
{ signer, onBatch: (batch, gasUsed) => Effect.sync(() => console.log(`initialized ${batch.length} currencies, ${gasUsed} MIST`)) },
|
|
522
564
|
);
|
|
523
|
-
// → { packageId, currencyId, shareType, treasuryCapId, gasUsed }
|
|
524
|
-
|
|
525
|
-
// Batched (many currencies, via a ParallelTransactionExecutor). Both submit
|
|
526
|
-
// exclusively through the executor (R = never), unlike `createShareCurrency`
|
|
527
|
-
// above, which needs `SuiClient` for its sequential `execThunks` calls.
|
|
528
|
-
import { publishShareCurrencies, initializeShareCurrencies } from "@misofm/platform";
|
|
529
|
-
|
|
530
|
-
const program = Effect.gen(function* () {
|
|
531
|
-
const { packageIds } = yield* publishShareCurrencies(executor, initializerAddress, 10);
|
|
532
|
-
return yield* initializeShareCurrencies(executor, signerAddress, packageIds, (pkg) => ({
|
|
533
|
-
name: "…",
|
|
534
|
-
description: "…",
|
|
535
|
-
}));
|
|
536
|
-
});
|
|
537
|
-
const { currencies } = await Effect.runPromise(program);
|
|
538
565
|
```
|
|
539
566
|
|
|
540
|
-
`
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
567
|
+
`Tx.run(recipe, { signer })` is what every submit-on-behalf member here
|
|
568
|
+
builds on — journal, sender lock, epoch expiration, and reconcile apply, so a
|
|
569
|
+
stuck submission is a typed `SubmissionUnknown` carrying the signed bytes, not
|
|
570
|
+
a silent hang. `onBatch` (an `Effect`, run inline before the next batch)
|
|
571
|
+
reports each succeeded batch as it lands, so a caller can persist progress
|
|
572
|
+
before the whole call settles — if a later batch fails, the ones already
|
|
573
|
+
reported through `onBatch` do not need re-initializing.
|
|
544
574
|
|
|
545
575
|
## Extensions
|
|
546
576
|
|
|
@@ -670,30 +700,67 @@ take exact object references and construct the required
|
|
|
670
700
|
|
|
671
701
|
The bundled Testnet deployment sets `operations.status` to `"available"` with
|
|
672
702
|
one canonical Vault package and registry, five distinct raw Action packages,
|
|
673
|
-
and three distinct suffixed plugin packages. Zero-config Testnet clients
|
|
674
|
-
that complete verified surface
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
703
|
+
and three distinct suffixed plugin packages. Zero-config Testnet clients
|
|
704
|
+
expose that complete verified surface at `client.miso.vault` — always an
|
|
705
|
+
object; each member throws `OperationsUnavailableError` when a deployment's
|
|
706
|
+
`operations.status` is `"unavailable"`, instead of the namespace itself being
|
|
707
|
+
`undefined`. Custom deployments remain fail-closed unless they provide the
|
|
708
|
+
same atomic identity set. Structural validation checks canonical,
|
|
709
|
+
pairwise-distinct IDs; callers remain responsible for the provenance and
|
|
710
|
+
compatibility of arbitrary custom IDs. The bundled map is recursively frozen
|
|
711
|
+
from one verified immutable admin export.
|
|
679
712
|
|
|
680
713
|
### Migrating from 0.16
|
|
681
714
|
|
|
682
715
|
Version 0.17 is a breaking deployment-safety release. Replace flat Vault,
|
|
683
716
|
Action, and plugin package fields with the discriminated `operations` union.
|
|
684
|
-
After client
|
|
685
|
-
registration, call `await client.miso.ready()` before using synchronous
|
|
686
|
-
`client.miso.tx`, `ids`, `call`, `vault`, or `party` surfaces. Platform reads
|
|
687
|
-
and SDK execution helpers await the same memoized readiness check themselves.
|
|
688
|
-
Standalone builders remain pure for offline composition, so their caller is
|
|
689
|
-
responsible for completing this exact-chain validation lifecycle before
|
|
690
|
-
execution.
|
|
691
717
|
|
|
692
718
|
The Release revenue plugin crank is now fixed: call
|
|
693
719
|
`redeemAllAndDistribute(vault, release, accumulatorRoot)` with no amount. The
|
|
694
720
|
explicit-amount `redeemAndDistribute` Action remains available only for raw
|
|
695
721
|
admin-cap composition.
|
|
696
722
|
|
|
723
|
+
### Migrating from 0.27
|
|
724
|
+
|
|
725
|
+
0.28 replaces the hand-written `MisoPlatformClient` class and its
|
|
726
|
+
`@misofm/effect` foundation with the sui-effect extension this README
|
|
727
|
+
describes throughout. See sui-effect's own
|
|
728
|
+
["Migrating from `@misofm/effect`"](https://github.com/unconfirmedlabs/sui-effect/blob/main/docs/extensions.md)
|
|
729
|
+
table for the mechanical Sui-primitive renames (`getObjectContent` →
|
|
730
|
+
`sui.getObject`, `SuiRpcError` → `TransportError`, …); this section is only
|
|
731
|
+
what changed in THIS package's own surface.
|
|
732
|
+
|
|
733
|
+
**Moved onto `Miso`** (`client.miso.*`, unchanged names): `getPressing`/
|
|
734
|
+
`getListing`/`getRecord`/`getSale`, `ids.*`, `tx.*`, `call`/`bcs`, `vault`,
|
|
735
|
+
`createShareCurrency`/`publishShareCurrencies`/`initializeShareCurrencies`,
|
|
736
|
+
`protocol`, `party`. All were methods/getters on the `MisoPlatformClient`
|
|
737
|
+
instance before; they are `Miso` service members now, still reachable the
|
|
738
|
+
same way through `client.miso` after `$extend(miso())`.
|
|
739
|
+
|
|
740
|
+
**Removed:**
|
|
741
|
+
|
|
742
|
+
| Before | After |
|
|
743
|
+
| --- | --- |
|
|
744
|
+
| `MisoPlatformClient`, `misoPlatform(config)`, `MisoPlatformConfig` | deleted; `Miso` + `miso()` (`SuiExtension.fromService`) |
|
|
745
|
+
| `PartyPlatformClient`, `new PartyosClient(client, ...)` | deleted; `client.miso.party` (`MisoPartyService`), assembled internally |
|
|
746
|
+
| `await client.miso.ready()` | kept, deprecated: does no work now (`Miso.layer`'s exact-chain check runs at layer build, not first use) — see `docs/CONVERSION.md` |
|
|
747
|
+
| `client.miso.validateChainIdentifier()` | deleted; `MisoChainIdentifierMismatchError` surfaces from `Miso.layer` build instead |
|
|
748
|
+
| `MisoClientNotReadyError` | deleted — no more platform-specific readiness gate; sui-effect's own `ExtensionNotReady` covers a synchronous member read before `warm`/`$ready()` |
|
|
749
|
+
| `client.miso.vault` returning `undefined` when unavailable | always an object; every member throws `OperationsUnavailableError` — test `deployment.operations.status`, not `if (client.miso.vault)` |
|
|
750
|
+
| `TxThunk` | `Recipe` (`export type TxThunk = Recipe` kept, one minor, deprecated) |
|
|
751
|
+
| `executeViaExecutor(executor, ...thunks)`, `@misofm/platform/execute` | deleted; `Tx.run(recipe, { signer })` — one submission under the sender lock, journal, epoch expiration, reconcile; no executor |
|
|
752
|
+
| `createShareCurrency(signer, params)` | `client.miso.createShareCurrency(params, { signer })` — `signer` is a sui-effect `Signer` (`Signer.fromKeypair`/`Signer.fromSdkSigner`); `gasUsed` is `bigint` |
|
|
753
|
+
| `publishShareCurrencies(executor, initializerAddress, count)`, `initializeShareCurrencies(executor, signerAddress, ids, metaOf)` | `client.miso.publishShareCurrencies(count, { signer })`, `client.miso.initializeShareCurrencies(ids, metaOf, { signer, onBatch? })` — batches serialize under one sender lock instead of running concurrently through an executor |
|
|
754
|
+
| `parseAtomicPublicationResult(p, result: PlatformExecResult)` | `(p, executed: Executed)` — `allCreatedByType`/`createdByExactType` are now `Executed.created(type)`/`createdWhere(pred)`; `gasUsed` is `bigint`; `digest` is a branded `Digest` |
|
|
755
|
+
| `getPressing`/`getListing`/`getRecord`/`getSale` failing `ObjectTypeMismatchError \| BcsDecodeError \| SuiRpcError` | `DecodeError \| ObjectUnavailable \| TransportError` (plus `RecordSalesUnavailableError` when this deployment has no Record sales) — one decode error, not-found stays `null` |
|
|
756
|
+
| `getSale`/batch reads on `getObjectsContent` (silently drops errored ids) | `sui.getObjects`, a `Result` per id — each read decides per item: `getSale` fails the whole read on a genuine `ObjectUnavailable`; a soft read like `resolveGenreNames` skips it |
|
|
757
|
+
| `getBalance` returning decimal strings | `Balance` with `bigint`; `read/*` JSON-safe views still return strings — only the low tier changed |
|
|
758
|
+
| `SuiGraphQL` from `@misofm/effect` | `SuiGraphQL` from `@unconfirmed/sui-effect` (`GraphQLUnavailableError` → `GraphQLUnavailable`; `SuiRpcError { operation }` → `TransportError { method }`) |
|
|
759
|
+
| a `chainIdentifier`-less registration on `devnet`/`localnet`/a custom network | `miso({ chainId })` required, or registration throws synchronously (warm) naming the network |
|
|
760
|
+
|
|
761
|
+
`@misofm/effect` is gone from `dependencies`; `@mysten/sui`, `effect`, and
|
|
762
|
+
`@unconfirmed/sui-effect` are peers instead.
|
|
763
|
+
|
|
697
764
|
### Extension types
|
|
698
765
|
|
|
699
766
|
```ts
|
|
@@ -718,37 +785,36 @@ carry an optional `RecordingRoleLevel` (`Producer`, `Vocalist`, `Engineer`,
|
|
|
718
785
|
|
|
719
786
|
## Errors
|
|
720
787
|
|
|
721
|
-
Every typed failure is a `Schema.TaggedError`
|
|
788
|
+
Every typed failure is a `Schema.TaggedError` and declares `outcome: "applied"
|
|
789
|
+
| "not_applied" | "unknown"` (`SuiError.outcome`/`Script.exitCode` read it),
|
|
722
790
|
recoverable with `Effect.catchTag`/`Effect.catchTags` instead of message
|
|
723
|
-
sniffing.
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
`
|
|
728
|
-
|
|
791
|
+
sniffing. sui-effect's own taxonomy (`DecodeError`, `TransportError`,
|
|
792
|
+
`ObjectNotFound`/`ObjectDeleted`/`ObjectUnavailable`, `GraphQLUnavailable`,
|
|
793
|
+
`ExecutionFailed`, and the `Tx.run` union: `BuildError`, `SimulationFailed`,
|
|
794
|
+
`PolicyDenied`, `SigningError`, `NotApplied`, `SubmissionUnknown`,
|
|
795
|
+
`JournalError`, `UnexpectedEffects`) is re-exported from `@unconfirmed/sui-effect` so this
|
|
796
|
+
is the only import a consumer needs:
|
|
729
797
|
|
|
730
798
|
```ts
|
|
731
799
|
import {
|
|
732
|
-
|
|
800
|
+
ObjectNotFound,
|
|
733
801
|
ReleaseNotFoundError,
|
|
734
802
|
RecordSalesUnavailableError,
|
|
735
803
|
OperationsUnavailableError,
|
|
736
804
|
MisoChainIdentifierMismatchError,
|
|
737
|
-
MisoClientNotReadyError,
|
|
738
805
|
MisoNetworkMismatchError,
|
|
739
806
|
} from "@misofm/platform/errors";
|
|
740
807
|
```
|
|
741
808
|
|
|
742
|
-
Platform-specific tags:
|
|
809
|
+
Platform-specific tags, all `outcome: "not_applied"` (nothing was submitted):
|
|
743
810
|
|
|
744
811
|
| Error | Fields | Raised by |
|
|
745
812
|
| --- | --- | --- |
|
|
746
|
-
| `RecordSalesUnavailableError` | `reason` | `requireRecordSalesDeployment`,
|
|
747
|
-
| `OperationsUnavailableError` | `reason` | `requireOperationsDeployment`, `client.miso.vault
|
|
748
|
-
| `MisoPlatformDeploymentInvalidError` | `message` | `assertMisoPlatformDeployment` / `normalizeMisoPlatformDeployment` |
|
|
749
|
-
| `MisoNetworkMismatchError` | `clientNetwork`, `deploymentNetwork` | `miso()
|
|
750
|
-
| `MisoChainIdentifierMismatchError` | `actual`, `expected` | `
|
|
751
|
-
| `MisoClientNotReadyError` | `operation` | synchronous client-bound surfaces (`tx`, `ids`, `call`, `vault`, `party`, `protocol`) used before `ready()` |
|
|
813
|
+
| `RecordSalesUnavailableError` | `reason` | `requireRecordSalesDeployment`, `getPressing`/`getListing`/`getRecord`/`getSale`, `ids.*`/`tx.*` sales members on a legacy or unconfigured deployment |
|
|
814
|
+
| `OperationsUnavailableError` | `reason` | `requireOperationsDeployment`, every `client.miso.vault` member, `ids.vault`/`ids.vaultAdminCap` |
|
|
815
|
+
| `MisoPlatformDeploymentInvalidError` | `message` | `assertMisoPlatformDeployment` / `normalizeMisoPlatformDeployment` / `Miso.layerConfig` on an unbundled `MISO_NETWORK` |
|
|
816
|
+
| `MisoNetworkMismatchError` | `clientNetwork`, `deploymentNetwork` | `Miso.layer` build — synchronously at `$extend(miso())` under a `warm` registration (mainnet/testnet), or rejecting the first call for a lazy one |
|
|
817
|
+
| `MisoChainIdentifierMismatchError` | `actual`, `expected` | `Miso.layer` build, same timing as `MisoNetworkMismatchError` above — the exact-ledger check the predecessor's `ready()` used to perform at first use |
|
|
752
818
|
| `MalformedRecordSoldEventError` | `digest?`, `reason?` | `findRecordSales`/`getPurchaseReceipt(s)` on a malformed `RecordSoldEvent` |
|
|
753
819
|
| `MisoAuthError` | `code`, `reason`, `status?`, `cause?` | `@misofm/platform/auth` (`requestAuthorizationChallenge`, `authenticatedFetch`, …) |
|
|
754
820
|
| `ReleaseNotFoundError` | `releaseId` | `@misofm/platform/read` (`getReleaseResources`, `getReleaseDetail`, …) — the typed replacement for the api read service's old `isMissingRelease` message bridge |
|
|
@@ -759,12 +825,12 @@ Platform-specific tags:
|
|
|
759
825
|
```ts
|
|
760
826
|
import { Effect } from "effect";
|
|
761
827
|
|
|
762
|
-
const release =
|
|
828
|
+
const release = miso.protocol
|
|
763
829
|
.getReleaseById(releaseId)
|
|
764
830
|
.pipe(
|
|
765
831
|
Effect.catchTags({
|
|
766
|
-
|
|
767
|
-
|
|
832
|
+
ObjectNotFound: () => Effect.succeed(null),
|
|
833
|
+
TransportError: (e) => Effect.die(e), // transport failure: not recoverable here
|
|
768
834
|
}),
|
|
769
835
|
);
|
|
770
836
|
```
|
|
@@ -773,28 +839,28 @@ const release = client.miso.protocol!
|
|
|
773
839
|
|
|
774
840
|
```
|
|
775
841
|
src/
|
|
842
|
+
Miso.ts the Miso service: MisoService assembly (reads, ids/tx/call/bcs/vault, read.*, events), layer/layerConfig/layerTest
|
|
843
|
+
client.ts miso(): the SuiExtension.fromService registration (client.miso.*); MisoClient/MisoOptions
|
|
776
844
|
deployments.ts fail-closed deployment schema (MisoPlatformDeployment, PartyExtensionsDeployment) and address injection point
|
|
777
|
-
client.ts the full client.miso facade; object-model core lives at client.miso.protocol, Party at client.miso.party
|
|
778
845
|
packages.ts MisoPlatformPackageBindings: extensions/primitives/party generated calls bound to one deployment
|
|
779
|
-
events.ts platformEventParsers:
|
|
846
|
+
events.ts platformEventParsers: work/Party extensions, Actions, products, plugins, and primitive event decoders
|
|
780
847
|
royalty.ts generic royalty-pool / stake / routed-stake derive helpers and PTB builders
|
|
781
|
-
pressing.ts
|
|
848
|
+
pressing.ts standalone: builders, readers, and the id derivations (Sui-based reads; Miso.tx/getPressing etc. bind these)
|
|
782
849
|
queries.ts shared read plumbing (isNotFound, re-exported from @misofm/musicos)
|
|
783
|
-
transactions.ts the TxThunk contract + the opinionated publish flow (disperse/finalize/publish*)
|
|
850
|
+
transactions.ts the Recipe (TxThunk) contract + the opinionated publish flow (disperse/finalize/publish*)
|
|
784
851
|
release-graph.ts whole release graph in one PTB (publishReleaseGraph)
|
|
785
|
-
publication.ts atomic catalog publication (publishAtomicCatalog)
|
|
786
|
-
share.ts share-currency provisioning (createShareCurrency, batched variants)
|
|
852
|
+
publication.ts atomic catalog publication (publishAtomicCatalog, parseAtomicPublicationResult); Miso.publishCatalog wraps it in Tx.run
|
|
853
|
+
share.ts share-currency provisioning on Tx.run (createShareCurrency, batched variants); Miso.createShareCurrency etc. bind these to Sui
|
|
787
854
|
share-template.ts embedded `share` package bytecode
|
|
788
855
|
credits.ts EXTENSION: contributor credits + the three role vocabularies
|
|
789
856
|
cover.ts EXTENSION: release cover art (Walrus blob via ori)
|
|
790
857
|
genre.ts EXTENSION: release/recording genre vocabulary
|
|
791
858
|
release-extensions.ts EXTENSION: release kind, description, DSP links
|
|
792
859
|
recording-extensions.ts EXTENSION: recording advisory, language, master reference, streaming transcode
|
|
793
|
-
party/ Party EXTENSIONS: profile, media, roles, tags, genres, CTAs, links (
|
|
794
|
-
read/ high-level catalog, artist, wallet, and receipt views
|
|
795
|
-
vault.ts Vault authority, plugin, event, and receiving-coin builders
|
|
796
|
-
|
|
797
|
-
internal.ts private helpers (the 0x1::option moveCall targets) — NOT exported
|
|
860
|
+
party/ Party EXTENSIONS: profile, media, roles, tags, genres, CTAs, links (party/client.ts's makeMisoParty assembles MisoPartyService over the converted Partyos) — also `@misofm/platform/party`
|
|
861
|
+
read/ high-level catalog, artist, wallet, and receipt views (config.ts, client.ts's createMisoClient); Miso.read.* binds these to one deployment
|
|
862
|
+
vault.ts Vault authority, plugin, event, and receiving-coin builders; Miso.vault gates these with OperationsUnavailableError
|
|
863
|
+
internal.ts private helpers (the 0x1::option moveCall targets, immutableSnapshot) — NOT exported
|
|
798
864
|
contracts.ts barrel re-exporting the curated generated bindings as `contracts`
|
|
799
865
|
contracts/ GENERATED — do not edit by hand; also reachable raw via `@misofm/platform/contracts/*`
|
|
800
866
|
```
|
|
@@ -811,7 +877,7 @@ bun run codegen # reads sui-codegen.config.ts → src/contracts/
|
|
|
811
877
|
This package's generated tree (`src/contracts/`) covers every Move package this
|
|
812
878
|
side of the boundary rule — the ten `party_*` extensions plus `party_wallet`,
|
|
813
879
|
work extensions, generic royalty/routed-stake primitives, Record and Record
|
|
814
|
-
Shop, Vault, and every Action/plugin package. The Party core (`partyos`)
|
|
880
|
+
Shop, Vault, generic `share`, `miso_pay`, and `platform_link` primitives, and every Action/plugin package. The Party core (`partyos`)
|
|
815
881
|
generates into `@misofm/partyos`, and the object-model core
|
|
816
882
|
(composition/recording/release/track) generates into `@misofm/musicos`;
|
|
817
883
|
this package depends on both for those bindings — adding either core here to
|
|
@@ -834,15 +900,13 @@ only from that copy, avoiding writes to a developer's live source tree.
|
|
|
834
900
|
|
|
835
901
|
`@misofm/musicos` and `@misofm/partyos` are regular runtime dependencies of
|
|
836
902
|
this package (workspace dependencies in this monorepo, resolved to published
|
|
837
|
-
version ranges on publish), not peers.
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
reads, generated calls, package bindings, and Party APIs (core and
|
|
845
|
-
extensions alike) cannot be obtained before the readiness gate.
|
|
903
|
+
version ranges on publish), not peers. `Miso.layer` composes their own
|
|
904
|
+
`Musicos.layer`/`Partyos.layer` internally (`Layer.provide`d inside `Miso`'s
|
|
905
|
+
own layer), so `client.miso.protocol` (the converted `Musicos` service) and
|
|
906
|
+
`client.miso.party` (`MisoPartyService`, `Partyos` core plus this package's
|
|
907
|
+
own party extensions) are always present — no readiness gate, no `!`
|
|
908
|
+
non-null assertion needed on either. `Miso`'s own requirement channel stays
|
|
909
|
+
`Sui | SuiGraphQL`, never `Sui | SuiGraphQL | Musicos | Partyos`.
|
|
846
910
|
|
|
847
911
|
`@mysten/sui` itself stays a peer dependency here, so an application resolves
|
|
848
912
|
exactly one Sui SDK across all three packages regardless of which
|
|
@@ -854,3 +918,44 @@ bun add @misofm/platform
|
|
|
854
918
|
|
|
855
919
|
`@misofm/musicos` resolves automatically as a transitive dependency; there is
|
|
856
920
|
no separate install step and no peer version for consumers to reconcile.
|
|
921
|
+
|
|
922
|
+
## Testing
|
|
923
|
+
|
|
924
|
+
Tests run on `@unconfirmed/sui-effect/testing`'s in-memory fake — no network, no real
|
|
925
|
+
signer. `layerTest(script)` (from `@unconfirmed/sui-effect/testing`) provides `Sui`/
|
|
926
|
+
`SuiCore`/`SuiCoreFake` for `Effect`-level tests against `Miso.layer`/
|
|
927
|
+
`layerTest`; a `$extend`-level test builds `SuiCoreFake.layer(script)` and
|
|
928
|
+
calls `fake.client.$extend(miso({ deployment }))` directly, exactly the way a
|
|
929
|
+
consumer writes it:
|
|
930
|
+
|
|
931
|
+
```ts
|
|
932
|
+
import { Effect } from "effect";
|
|
933
|
+
import { SuiCoreFake } from "@unconfirmed/sui-effect/testing";
|
|
934
|
+
import { miso } from "@misofm/platform/client";
|
|
935
|
+
|
|
936
|
+
const fake = await Effect.runPromise(
|
|
937
|
+
Effect.provide(SuiCoreFake, SuiCoreFake.layer({ network: "testnet", chainId, objects: [...] })),
|
|
938
|
+
);
|
|
939
|
+
const client = fake.client.$extend(miso({ deployment: testDeployment }));
|
|
940
|
+
|
|
941
|
+
const pressing = await client.miso.getPressing(pressingId);
|
|
942
|
+
await client.miso.dispose();
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
`FakeOutcome.succeed(...)`/`FakeOutcome.failWith(...)`/`FakeOutcome.transportError(...)`
|
|
946
|
+
script `Tx.run`'s `execute`; `TestClock` (from `effect/testing`) plus
|
|
947
|
+
`Journal.layerMemory` (from `@unconfirmed/sui-effect/tx`) drive a submission through a
|
|
948
|
+
resubmit/reconcile schedule without waiting on real time (see
|
|
949
|
+
`tests/share.test.ts`'s `initializeShareCurrencies` retry case). `Miso.layer`/
|
|
950
|
+
`layerTest` need `SuiGraphQL` too now that `read.*` joins the service — compose
|
|
951
|
+
`SuiGraphQL.layerUnavailable` (a test that never reaches a GraphQL-backed
|
|
952
|
+
member) or `SuiGraphQL.layer(stubbedClient)` alongside `layerTest`/
|
|
953
|
+
`SuiCoreFake.layer` the same way `@misofm/musicos`'s own GraphQL tests do.
|
|
954
|
+
|
|
955
|
+
`tests/deployments.test.ts` covers the pure `deployments.ts` validators
|
|
956
|
+
(`requireRecordSalesDeployment`/`requireOperationsDeployment`, the frozen
|
|
957
|
+
bundled manifest); `tests/client.test.ts` is only the derived facade
|
|
958
|
+
(registration, nested namespaces, a fragment composed with a sibling
|
|
959
|
+
fragment, a submit-on-behalf member, rejection identity, the
|
|
960
|
+
network-mismatch path); `tests/Miso.test.ts` is the service at the `Effect`
|
|
961
|
+
level (the exact-chain check, `layerConfig`, `layerTest`).
|