@misofm/platform 0.27.0 → 0.28.1
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/dist/Miso.js
ADDED
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { Config, Context, Effect, Layer } from "effect";
|
|
4
|
+
import { Musicos } from "@misofm/musicos";
|
|
5
|
+
import { Partyos } from "@misofm/partyos";
|
|
6
|
+
import { Sui, SuiGraphQL, } from "@unconfirmed/sui-effect";
|
|
7
|
+
import { Tx } from "@unconfirmed/sui-effect/tx";
|
|
8
|
+
import { getMisoPlatformDeployment, MISO_PLATFORM_DEPLOYMENTS, normalizeMisoPlatformDeployment, requireOperationsDeployment, requireRecordSalesDeployment, } from "./deployments.js";
|
|
9
|
+
import { MisoChainIdentifierMismatchError, MisoNetworkMismatchError, MisoPlatformDeploymentInvalidError, OperationsUnavailableError, RecordSalesUnavailableError, } from "./errors.js";
|
|
10
|
+
import { makeMisoParty } from "./party/client.js";
|
|
11
|
+
import { immutableSnapshot } from "./internal.js";
|
|
12
|
+
import { authorizeRecordShop, deriveListingId, derivePressingAdminCapId, derivePressingId, deriveRecordId, deriveSaleIds, getListing, getPressing, getRecord, getSale, openListing, openPressing, purchaseRecord, revokeRecordShop, setListingPrice, setListingState, } from "./pressing.js";
|
|
13
|
+
import { publishComposition, publishCompositionAndRecording, publishRecording, publishRelease, publishShareCurrency, initializeShareCurrency, } from "./transactions.js";
|
|
14
|
+
import { publishReleaseGraph } from "./release-graph.js";
|
|
15
|
+
import { setReleaseDescription, setReleaseDspLinks, setReleaseKind, } from "./release-extensions.js";
|
|
16
|
+
import { clearRecordingGenres, clearReleaseGenres, deriveGenreAddress, setRecordingGenres, setReleaseGenres, } from "./genre.js";
|
|
17
|
+
import { setRecordingStreamingTranscode, unsetRecordingStreamingTranscode, } from "./recording-extensions.js";
|
|
18
|
+
import { addReleaseCredit } from "./credits.js";
|
|
19
|
+
import { setReleaseCover, setReleaseTrackCover } from "./cover.js";
|
|
20
|
+
import * as vaultActions from "./vault.js";
|
|
21
|
+
import { createShareCurrency, initializeShareCurrencies, publishShareCurrencies } from "./share.js";
|
|
22
|
+
import { publishAtomicCatalog, parseAtomicPublicationResult } from "./publication.js";
|
|
23
|
+
import { platformEventParsers } from "./events.js";
|
|
24
|
+
import { configFromDeployment } from "./read/config.js";
|
|
25
|
+
import * as readCatalog from "./read/catalog.js";
|
|
26
|
+
import * as readArtist from "./read/artist.js";
|
|
27
|
+
import * as readGenres from "./read/genres.js";
|
|
28
|
+
import * as readWallet from "./read/wallet.js";
|
|
29
|
+
import * as readReceipts from "./read/receipts.js";
|
|
30
|
+
import * as readRoyalties from "./read/royalties.js";
|
|
31
|
+
import * as recordContract from "./contracts/record/record.js";
|
|
32
|
+
import * as pressingContract from "./contracts/record/pressing.js";
|
|
33
|
+
import * as listingContract from "./contracts/record_shop/listing.js";
|
|
34
|
+
import * as genreContract from "./contracts/genre/genre.js";
|
|
35
|
+
import * as releaseDescriptionContract from "./contracts/release_description/release_description.js";
|
|
36
|
+
import * as releaseDspLinkContract from "./contracts/release_dsp_link/release_dsp_link.js";
|
|
37
|
+
import * as releaseGenreContract from "./contracts/release_genre/release_genre.js";
|
|
38
|
+
import * as releaseKindContract from "./contracts/release_kind/release_kind.js";
|
|
39
|
+
import * as releaseRevenueDistributorContract from "./contracts/release_revenue_distributor/release_revenue_distributor.js";
|
|
40
|
+
import * as vaultContract from "./contracts/vault/vault.js";
|
|
41
|
+
import * as compositionRoyaltyPoolContract from "./contracts/composition_royalty_pool/composition_royalty_pool.js";
|
|
42
|
+
import * as recordingRoyaltyPoolContract from "./contracts/recording_royalty_pool/recording_royalty_pool.js";
|
|
43
|
+
import * as partyWalletContract from "./contracts/party_wallet/party_wallet.js";
|
|
44
|
+
import * as compositionRoutedStakeContract from "./contracts/composition_routed_stake/composition_routed_stake.js";
|
|
45
|
+
import * as compositionRoyaltyPoolPluginContract from "./contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js";
|
|
46
|
+
import * as recordingRoyaltyPoolPluginContract from "./contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js";
|
|
47
|
+
import * as releaseRevenueDistributorPluginContract from "./contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js";
|
|
48
|
+
import * as routedStakeContract from "./contracts/routed_stake/routed_stake.js";
|
|
49
|
+
import * as royaltyPoolContract from "./contracts/royalty_pool/pool.js";
|
|
50
|
+
import * as recordingAdvisoryContract from "./contracts/recording_advisory/recording_advisory.js";
|
|
51
|
+
import * as recordingLanguageContract from "./contracts/recording_language/recording_language.js";
|
|
52
|
+
import * as recordingMasterReferenceContract from "./contracts/recording_master_reference/recording_master_reference.js";
|
|
53
|
+
import * as recordingStreamingTranscodeContract from "./contracts/recording_streaming_transcode/recording_streaming_transcode.js";
|
|
54
|
+
import * as recordingGenreContract from "./contracts/recording_genre/recording_genre.js";
|
|
55
|
+
import * as coverArtContract from "./contracts/cover_art/cover_art.js";
|
|
56
|
+
import * as releaseCoverArtContract from "./contracts/release_cover_art/release_cover_art.js";
|
|
57
|
+
import * as releaseCreditsContract from "./contracts/release_credits/release_credits.js";
|
|
58
|
+
function bindModulePackage(mod, pkg, available) {
|
|
59
|
+
const out = {};
|
|
60
|
+
for (const key of available) {
|
|
61
|
+
const value = mod[key];
|
|
62
|
+
out[String(key)] = typeof value === "function" ? (options) => value({ ...options, package: pkg }) : value;
|
|
63
|
+
}
|
|
64
|
+
return out;
|
|
65
|
+
}
|
|
66
|
+
/** Every function-valued member of `surface` throws `guard()`'s error before running, when it throws. */
|
|
67
|
+
function gateAvailability(surface, guard) {
|
|
68
|
+
return new Proxy(surface, {
|
|
69
|
+
get(target, property, receiver) {
|
|
70
|
+
const value = Reflect.get(target, property, receiver);
|
|
71
|
+
if (typeof value !== "function")
|
|
72
|
+
return value;
|
|
73
|
+
return (...args) => {
|
|
74
|
+
guard();
|
|
75
|
+
return Reflect.apply(value, target, args);
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function requiredPackage(id, field, operation) {
|
|
81
|
+
if (!id)
|
|
82
|
+
throw new Error(`@misofm/platform: deployment.packages.${field} is required for ${operation}.`);
|
|
83
|
+
return id;
|
|
84
|
+
}
|
|
85
|
+
const make = (deployment) => Effect.gen(function* () {
|
|
86
|
+
const sui = yield* Sui;
|
|
87
|
+
// The exact-ledger check `MisoPlatformClient#ready()` used to perform at
|
|
88
|
+
// first use, moved to layer build (the issue's target shape: "a
|
|
89
|
+
// caller's first call builds the runtime; a mismatch rejects it with
|
|
90
|
+
// MisoChainIdentifierMismatchError instead of ready()").
|
|
91
|
+
if (sui.network !== deployment.network) {
|
|
92
|
+
return yield* new MisoNetworkMismatchError({ clientNetwork: sui.network, deploymentNetwork: deployment.network });
|
|
93
|
+
}
|
|
94
|
+
if (sui.chainId !== deployment.chainIdentifier) {
|
|
95
|
+
return yield* new MisoChainIdentifierMismatchError({ actual: sui.chainId, expected: deployment.chainIdentifier });
|
|
96
|
+
}
|
|
97
|
+
const protocol = yield* Musicos;
|
|
98
|
+
const partyos = yield* Partyos;
|
|
99
|
+
const graphql = yield* SuiGraphQL;
|
|
100
|
+
return assemble(sui, graphql, protocol, partyos, deployment);
|
|
101
|
+
});
|
|
102
|
+
/** `make`, without the exact-chain check — what {@link Miso.layerTest} builds over. */
|
|
103
|
+
const makeUnchecked = (deployment) => Effect.gen(function* () {
|
|
104
|
+
const sui = yield* Sui;
|
|
105
|
+
const protocol = yield* Musicos;
|
|
106
|
+
const partyos = yield* Partyos;
|
|
107
|
+
const graphql = yield* SuiGraphQL;
|
|
108
|
+
return { ...assemble(sui, graphql, protocol, partyos, deployment), chainId: sui.chainId };
|
|
109
|
+
});
|
|
110
|
+
/**
|
|
111
|
+
* Assembles the complete {@link MisoService} from the `Sui`/`SuiGraphQL` the
|
|
112
|
+
* layer already holds, the converted `protocol`/`party` services, and
|
|
113
|
+
* `deployment`. Every I/O member is `withSui`/`withEnv`-wrapped so `R` is
|
|
114
|
+
* empty; every synchronous member closes over `deployment` directly instead
|
|
115
|
+
* of a `#requireReady`-style gate — sui-effect's own `warm`/`$ready`
|
|
116
|
+
* mechanism (`docs/extensions.md` §7) is what governs "real before the first
|
|
117
|
+
* await" now, not a second, platform-specific readiness machine.
|
|
118
|
+
*/
|
|
119
|
+
function assemble(sui, graphql, protocol, partyosService, rawDeployment) {
|
|
120
|
+
// Recursively frozen snapshot taken at layer-build time, matching the
|
|
121
|
+
// predecessor `MisoPlatformClient`'s own guarantee ("later caller mutation
|
|
122
|
+
// cannot retarget an existing client") — a custom deployment object the
|
|
123
|
+
// caller keeps a reference to and mutates after `miso({ deployment })`
|
|
124
|
+
// must not reach back into an already-built `Miso` instance.
|
|
125
|
+
const deployment = immutableSnapshot(rawDeployment);
|
|
126
|
+
const withSui = (effect) => effect.pipe(Effect.provideService(Sui, sui));
|
|
127
|
+
/** `Sui` and `SuiGraphQL` both provided — safe even for a `Sui`-only effect (an unused service is simply not read). */
|
|
128
|
+
const withEnv = (effect) => effect.pipe(Effect.provideService(Sui, sui), Effect.provideService(SuiGraphQL, graphql));
|
|
129
|
+
const party = makeMisoParty(sui, partyosService, deployment.party);
|
|
130
|
+
// ── Sales binding (RecordSalesUnavailableError when unavailable) ─────────
|
|
131
|
+
const sales = () => requireRecordSalesDeployment(deployment.recordSales);
|
|
132
|
+
const salesOrFail = () => Effect.try({ try: sales, catch: (cause) => cause });
|
|
133
|
+
// ── Operations binding (OperationsUnavailableError when unavailable) ─────
|
|
134
|
+
const operations = () => requireOperationsDeployment(deployment.operations);
|
|
135
|
+
const availableOperations = () => (deployment.operations.status === "available" ? requireOperationsDeployment(deployment.operations) : undefined);
|
|
136
|
+
/** `operations`, as a typed Effect failure instead of a synchronous throw — mirrors `salesOrFail` above. */
|
|
137
|
+
const operationsOrFail = () => Effect.try({ try: operations, catch: (cause) => cause });
|
|
138
|
+
// ── Reads ─────────────────────────────────────────────────────────────
|
|
139
|
+
const misoGetPressing = (pressingId) => withSui(Effect.flatMap(salesOrFail(), (s) => getPressing(pressingId, s.recordPackageId)));
|
|
140
|
+
const misoGetListing = (listingId) => withSui(Effect.flatMap(salesOrFail(), (s) => getListing(listingId, s.recordShopPackageId)));
|
|
141
|
+
const misoGetRecord = (recordId) => withSui(Effect.flatMap(salesOrFail(), (s) => getRecord(recordId, s.recordPackageId)));
|
|
142
|
+
const misoGetSale = (p) => withSui(Effect.flatMap(salesOrFail(), (s) => getSale({ ...p, recordPackageId: s.recordPackageId, recordShopPackageId: s.recordShopPackageId })));
|
|
143
|
+
// ── Address math (`ids.*`, sync — throws RecordSalesUnavailableError/OperationsUnavailableError) ──
|
|
144
|
+
const ids = {
|
|
145
|
+
pressing: (releaseId, edition) => derivePressingId(releaseId, edition, sales().recordPackageId),
|
|
146
|
+
pressingAdminCap: (pressingId) => derivePressingAdminCapId(pressingId, sales().recordPackageId),
|
|
147
|
+
record: (pressingId, number) => deriveRecordId(pressingId, number, sales().recordPackageId),
|
|
148
|
+
listing: (pressingId, currencyType) => deriveListingId(pressingId, currencyType, sales().recordShopPackageId),
|
|
149
|
+
sale: (releaseId, edition, currencyType) => deriveSaleIds(releaseId, edition, currencyType, sales().recordPackageId, sales().recordShopPackageId),
|
|
150
|
+
vault: (capId, capType) => vaultActions.deriveVaultId({ vaultRegistryId: operations().vault.registryId, capId, capType, vaultPackageId: operations().vault.packageId }),
|
|
151
|
+
vaultAdminCap: (vaultId) => vaultActions.deriveVaultAdminCapId(vaultId, operations().vault.packageId),
|
|
152
|
+
genre: (canonicalName) => deriveGenreAddress(deployment.objects.genreRegistry, deployment.packages.genre, canonicalName),
|
|
153
|
+
};
|
|
154
|
+
// ── Transaction builders (`tx.*`, sync recipes) ──────────────────────────
|
|
155
|
+
const tx = {
|
|
156
|
+
purchaseRecord: (p) => purchaseRecord({ ...p, recordPackageId: sales().recordPackageId, recordShopPackageId: sales().recordShopPackageId }),
|
|
157
|
+
openPressing: (p) => openPressing({ ...p, recordPackageId: sales().recordPackageId, recordShopPackageId: sales().recordShopPackageId }),
|
|
158
|
+
openListing: (p) => openListing({ ...p, recordShopPackageId: sales().recordShopPackageId }),
|
|
159
|
+
authorizeRecordShop: (p) => authorizeRecordShop({ ...p, recordPackageId: sales().recordPackageId, recordShopPackageId: sales().recordShopPackageId }),
|
|
160
|
+
revokeRecordShop: (p) => revokeRecordShop({ ...p, recordPackageId: sales().recordPackageId, recordShopPackageId: sales().recordShopPackageId }),
|
|
161
|
+
setListingPrice: (p) => setListingPrice({ ...p, recordShopPackageId: sales().recordShopPackageId }),
|
|
162
|
+
setListingState: (p) => setListingState({ ...p, recordShopPackageId: sales().recordShopPackageId }),
|
|
163
|
+
publishShareCurrency,
|
|
164
|
+
initializeShareCurrency,
|
|
165
|
+
publishComposition: (p) => publishComposition({ ...p, misoPackageId: deployment.protocol.musicos, minatoPackageId: deployment.packages.minato }),
|
|
166
|
+
publishRecording: (p) => publishRecording({ ...p, misoPackageId: deployment.protocol.musicos, minatoPackageId: deployment.packages.minato }),
|
|
167
|
+
publishCompositionAndRecording: (p) => publishCompositionAndRecording({ ...p, misoPackageId: deployment.protocol.musicos, minatoPackageId: deployment.packages.minato }),
|
|
168
|
+
publishRelease: (p) => publishRelease({ ...p, misoPackageId: deployment.protocol.musicos, releaseRegistryId: deployment.objects.releaseRegistry }),
|
|
169
|
+
publishReleaseGraph: (p) => publishReleaseGraph({ ...p, misoPackageId: deployment.protocol.musicos, minatoPackageId: deployment.packages.minato }),
|
|
170
|
+
setReleaseKind: (p) => setReleaseKind({ ...p, releaseKindPackageId: deployment.packages.releaseKind }),
|
|
171
|
+
setReleaseDescription: (p) => setReleaseDescription({ ...p, releaseDescriptionPackageId: deployment.packages.releaseDescription }),
|
|
172
|
+
setReleaseGenres: (p) => setReleaseGenres({ ...p, releaseGenrePackageId: deployment.packages.releaseGenre }),
|
|
173
|
+
clearReleaseGenres: (p) => clearReleaseGenres({ ...p, releaseGenrePackageId: deployment.packages.releaseGenre }),
|
|
174
|
+
setReleaseDspLinks: (p) => setReleaseDspLinks({ ...p, releaseDspLinkPackageId: deployment.packages.releaseDspLink }),
|
|
175
|
+
addReleaseCredit: (p) => addReleaseCredit({ ...p, releaseCreditsPackageId: deployment.packages.releaseCredits, misoCreditPackageId: deployment.packages.credit }),
|
|
176
|
+
setReleaseCover: (p) => setReleaseCover({ ...p, coverArtPackageId: deployment.packages.coverArt, releaseCoverArtPackageId: deployment.packages.releaseCoverArt, oriPackageId: deployment.packages.ori }),
|
|
177
|
+
setReleaseTrackCover: (p) => setReleaseTrackCover({ ...p, coverArtPackageId: deployment.packages.coverArt, releaseCoverArtPackageId: deployment.packages.releaseCoverArt, oriPackageId: deployment.packages.ori }),
|
|
178
|
+
setRecordingStreamingTranscode: (p) => setRecordingStreamingTranscode({
|
|
179
|
+
...p,
|
|
180
|
+
recordingStreamingTranscodePackageId: requiredPackage(deployment.packages.recordingStreamingTranscode, "recordingStreamingTranscode", "setRecordingStreamingTranscode"),
|
|
181
|
+
oriPackageId: deployment.packages.ori,
|
|
182
|
+
}),
|
|
183
|
+
unsetRecordingStreamingTranscode: (p) => unsetRecordingStreamingTranscode({ ...p, recordingStreamingTranscodePackageId: requiredPackage(deployment.packages.recordingStreamingTranscode, "recordingStreamingTranscode", "unsetRecordingStreamingTranscode") }),
|
|
184
|
+
setRecordingGenres: (p) => setRecordingGenres({ ...p, recordingGenrePackageId: requiredPackage(deployment.packages.recordingGenre, "recordingGenre", "setRecordingGenres") }),
|
|
185
|
+
clearRecordingGenres: (p) => clearRecordingGenres({ ...p, recordingGenrePackageId: requiredPackage(deployment.packages.recordingGenre, "recordingGenre", "clearRecordingGenres") }),
|
|
186
|
+
};
|
|
187
|
+
// ── Generated call/bcs bindings ──────────────────────────────────────────
|
|
188
|
+
const availableSales = deployment.recordSales.status === "available" ? deployment.recordSales : undefined;
|
|
189
|
+
const ops = availableOperations();
|
|
190
|
+
const call = {
|
|
191
|
+
record: availableSales
|
|
192
|
+
? bindModulePackage(recordContract, availableSales.recordPackageId, [
|
|
193
|
+
"destroy", "releaseId", "pressingId", "edition", "number", "purchaseCurrency", "purchasePrice", "purchasedBy", "purchasedTimestampMs", "deriveAddress",
|
|
194
|
+
])
|
|
195
|
+
: undefined,
|
|
196
|
+
listing: availableSales
|
|
197
|
+
? bindModulePackage(listingContract, availableSales.recordShopPackageId, [
|
|
198
|
+
"fixed", "floor", "enabled", "disabled", "setState", "setPrice", "purchase", "deriveAddress", "releaseId", "pressingId", "pricing", "price", "state", "isEnabled", "isDisabled", "isFixed", "isFloor",
|
|
199
|
+
])
|
|
200
|
+
: undefined,
|
|
201
|
+
pressing: availableSales
|
|
202
|
+
? bindModulePackage(pressingContract, availableSales.recordPackageId, [
|
|
203
|
+
"authorizeDistributor", "revokeDistributor", "deriveAddress", "deriveAdminCapAddress", "releaseId", "edition", "supply", "maxSupply", "distributors", "isDistributorAuthorized", "pressingId",
|
|
204
|
+
])
|
|
205
|
+
: undefined,
|
|
206
|
+
genre: bindModulePackage(genreContract, deployment.packages.genre, ["deriveAddress"]),
|
|
207
|
+
releaseDescription: bindModulePackage(releaseDescriptionContract, deployment.packages.releaseDescription, ["setDescription", "clearDescription", "hasDescription"]),
|
|
208
|
+
releaseDspLink: bindModulePackage(releaseDspLinkContract, deployment.packages.releaseDspLink, [
|
|
209
|
+
"platform", "platformSpotify", "platformAppleMusic", "platformAmazonMusic", "platformBandcamp", "platformDeezer", "platformSoundcloud", "platformTidal", "platformYoutubeMusic",
|
|
210
|
+
"newSpotify", "newAppleMusicAlbum", "newAppleMusicTrack", "newAmazonMusicAlbum", "newAmazonMusicTrack", "newBandcamp", "newDeezer", "newSoundcloud", "newTidal", "newYoutubeMusic",
|
|
211
|
+
"setReleaseLink", "clearReleaseLink", "setTrackLink", "clearTrackLink", "clearTrackLinks", "hasReleaseLink",
|
|
212
|
+
]),
|
|
213
|
+
releaseGenre: bindModulePackage(releaseGenreContract, deployment.packages.releaseGenre, ["addGenre", "removeGenre", "clearGenres"]),
|
|
214
|
+
releaseKind: bindModulePackage(releaseKindContract, deployment.packages.releaseKind, ["setKind", "unsetKind", "hasKind"]),
|
|
215
|
+
releaseRevenueDistributor: ops
|
|
216
|
+
? bindModulePackage(releaseRevenueDistributorContract, ops.actions.releaseRevenueDistributor, ["redeemAndDistribute", "redeemAllAndDistribute", "receiveAndDistribute"])
|
|
217
|
+
: undefined,
|
|
218
|
+
releaseRevenueDistributorPlugin: ops
|
|
219
|
+
? bindModulePackage(releaseRevenueDistributorPluginContract, ops.plugins.releaseRevenueDistributor, ["install", "uninstall", "redeemAllAndDistribute", "receiveAndDistribute", "isInstalled"])
|
|
220
|
+
: undefined,
|
|
221
|
+
vault: ops
|
|
222
|
+
? bindModulePackage(vaultContract, ops.vault.packageId, ["share", "withdrawCap", "restoreCap", "derivedAddress", "capId", "isActive", "authorizedPlugins", "isPluginAuthorized"])
|
|
223
|
+
: undefined,
|
|
224
|
+
compositionRoyaltyPool: ops
|
|
225
|
+
? bindModulePackage(compositionRoyaltyPoolContract, ops.actions.compositionRoyaltyPool, ["newPool", "receiveAndDeposit", "redeemAndDeposit", "poolAddress"])
|
|
226
|
+
: undefined,
|
|
227
|
+
compositionRoyaltyPoolPlugin: ops
|
|
228
|
+
? bindModulePackage(compositionRoyaltyPoolPluginContract, ops.plugins.compositionRoyaltyPool, ["install", "uninstall", "receiveAndDeposit", "redeemAndDeposit", "isInstalled"])
|
|
229
|
+
: undefined,
|
|
230
|
+
recordingRoyaltyPool: ops
|
|
231
|
+
? bindModulePackage(recordingRoyaltyPoolContract, ops.actions.recordingRoyaltyPool, ["newPool", "receiveAndDeposit", "redeemAndDeposit", "poolAddress"])
|
|
232
|
+
: undefined,
|
|
233
|
+
recordingRoyaltyPoolPlugin: ops
|
|
234
|
+
? bindModulePackage(recordingRoyaltyPoolPluginContract, ops.plugins.recordingRoyaltyPool, ["install", "uninstall", "receiveAndDeposit", "redeemAndDeposit", "isInstalled"])
|
|
235
|
+
: undefined,
|
|
236
|
+
partyWallet: ops ? bindModulePackage(partyWalletContract, ops.actions.partyWallet, ["receive", "receiveBalance", "redeemBalance", "inboxAddress"]) : undefined,
|
|
237
|
+
compositionRoutedStake: ops
|
|
238
|
+
? bindModulePackage(compositionRoutedStakeContract, ops.actions.compositionRoutedStake, ["createStake", "register", "unregister", "unstake", "restake", "stakeAddress"])
|
|
239
|
+
: undefined,
|
|
240
|
+
routedStake: bindModulePackage(routedStakeContract, deployment.packages.routedStake, ["share", "register", "unregister", "sweep", "unstake", "restake", "derivedAddress"]),
|
|
241
|
+
royaltyPool: bindModulePackage(royaltyPoolContract, deployment.packages.royaltyPool, [
|
|
242
|
+
"share", "deposit", "settle", "recoverCoins", "registerStake", "unregisterStake", "claimRewards", "pendingRewards", "stakedShares", "cumulativeRewardPerShare", "carry", "cumulativeDeposits", "settledValue", "derivedAddress", "assertDerivedFrom",
|
|
243
|
+
]),
|
|
244
|
+
recordingAdvisory: bindModulePackage(recordingAdvisoryContract, deployment.packages.recordingAdvisory, ["explicit", "notExplicit", "cleaned", "setRating", "unsetRating", "hasRating", "isExplicit", "isNotExplicit", "isCleaned"]),
|
|
245
|
+
recordingLanguage: bindModulePackage(recordingLanguageContract, deployment.packages.recordingLanguage, ["setLanguages", "setInstrumental", "unsetLanguages", "hasLanguages", "isInstrumental"]),
|
|
246
|
+
recordingMasterReference: bindModulePackage(recordingMasterReferenceContract, deployment.packages.recordingMasterReference, ["setMasterReference", "unsetMasterReference", "hasMasterReference"]),
|
|
247
|
+
recordingStreamingTranscode: deployment.packages.recordingStreamingTranscode
|
|
248
|
+
? bindModulePackage(recordingStreamingTranscodeContract, deployment.packages.recordingStreamingTranscode, ["setStreamingTranscode", "unsetStreamingTranscode", "hasStreamingTranscode"])
|
|
249
|
+
: undefined,
|
|
250
|
+
recordingGenre: deployment.packages.recordingGenre ? bindModulePackage(recordingGenreContract, deployment.packages.recordingGenre, ["addGenre", "removeGenre", "clearGenres"]) : undefined,
|
|
251
|
+
coverArt: bindModulePackage(coverArtContract, deployment.packages.coverArt, []),
|
|
252
|
+
releaseCoverArt: bindModulePackage(releaseCoverArtContract, deployment.packages.releaseCoverArt, ["setCover", "unsetCover", "setTrackCover", "unsetTrackCover", "hasCoverArt"]),
|
|
253
|
+
releaseCredits: bindModulePackage(releaseCreditsContract, deployment.packages.releaseCredits, ["addCredit", "removeCredit", "hasCredits"]),
|
|
254
|
+
};
|
|
255
|
+
const bcs = {
|
|
256
|
+
Record: recordContract.Record,
|
|
257
|
+
Pressing: pressingContract.Pressing,
|
|
258
|
+
PressingAdminCap: pressingContract.PressingAdminCap,
|
|
259
|
+
Listing: listingContract.Listing,
|
|
260
|
+
Pricing: listingContract.Pricing,
|
|
261
|
+
ListingState: listingContract.State,
|
|
262
|
+
RecordCreatedEvent: recordContract.RecordCreatedEvent,
|
|
263
|
+
RecordDestroyedEvent: recordContract.RecordDestroyedEvent,
|
|
264
|
+
PressingCreatedEvent: pressingContract.PressingCreatedEvent,
|
|
265
|
+
DistributorAuthorizedEvent: pressingContract.DistributorAuthorizedEvent,
|
|
266
|
+
DistributorRevokedEvent: pressingContract.DistributorRevokedEvent,
|
|
267
|
+
RecordPurchasedEvent: pressingContract.RecordPurchasedEvent,
|
|
268
|
+
PressingSharedEvent: pressingContract.PressingSharedEvent,
|
|
269
|
+
PressingDistributorAuthorizedEvent: pressingContract.PressingDistributorAuthorizedEvent,
|
|
270
|
+
PressingDistributorRevokedEvent: pressingContract.PressingDistributorRevokedEvent,
|
|
271
|
+
ListingCreatedEvent: listingContract.ListingCreatedEvent,
|
|
272
|
+
ListingSharedEvent: listingContract.ListingSharedEvent,
|
|
273
|
+
ListingPriceChangedEvent: listingContract.ListingPriceChangedEvent,
|
|
274
|
+
ListingStateChangedEvent: listingContract.ListingStateChangedEvent,
|
|
275
|
+
RecordSoldEvent: listingContract.RecordSoldEvent,
|
|
276
|
+
VaultAdminCap: vaultContract.VaultAdminCap,
|
|
277
|
+
VaultRegistry: vaultContract.VaultRegistry,
|
|
278
|
+
VaultKey: vaultContract.VaultKey,
|
|
279
|
+
VaultAdminCapKey: vaultContract.VaultAdminCapKey,
|
|
280
|
+
VaultCreatedEvent: vaultContract.VaultCreatedEvent,
|
|
281
|
+
VaultRegistryCreatedEvent: vaultContract.VaultRegistryCreatedEvent,
|
|
282
|
+
VaultSharedEvent: vaultContract.VaultSharedEvent,
|
|
283
|
+
PluginAuthorizedEvent: vaultContract.PluginAuthorizedEvent,
|
|
284
|
+
PluginRevokedEvent: vaultContract.PluginRevokedEvent,
|
|
285
|
+
VaultCapabilityWithdrawnEvent: vaultContract.VaultCapabilityWithdrawnEvent,
|
|
286
|
+
VaultCapabilityRestoredEvent: vaultContract.VaultCapabilityRestoredEvent,
|
|
287
|
+
VaultCapabilityBorrowedByPluginEvent: vaultContract.VaultCapabilityBorrowedByPluginEvent,
|
|
288
|
+
VaultCapabilityBorrowedByAdminEvent: vaultContract.VaultCapabilityBorrowedByAdminEvent,
|
|
289
|
+
VaultCapabilityReturnedEvent: vaultContract.VaultCapabilityReturnedEvent,
|
|
290
|
+
PartyObjectReceivedEvent: partyWalletContract.ObjectReceivedEvent,
|
|
291
|
+
PartyCoinsReceivedEvent: partyWalletContract.CoinsReceivedEvent,
|
|
292
|
+
PartyFundsRedeemedEvent: partyWalletContract.FundsRedeemedEvent,
|
|
293
|
+
ReleaseTrackRevenueDistributedEvent: releaseRevenueDistributorContract.ReleaseTrackRevenueDistributedEvent,
|
|
294
|
+
ReleaseRevenueDistributedEvent: releaseRevenueDistributorContract.ReleaseRevenueDistributedEvent,
|
|
295
|
+
ReleaseCoinsReceivedEvent: releaseRevenueDistributorContract.ReleaseCoinsReceivedEvent,
|
|
296
|
+
ReleaseFundsRedeemedEvent: releaseRevenueDistributorContract.ReleaseFundsRedeemedEvent,
|
|
297
|
+
};
|
|
298
|
+
// ── Vault namespace: always present; every member throws/fails OperationsUnavailableError when unavailable ──
|
|
299
|
+
//
|
|
300
|
+
// `getVaultAdminCap`/`resolveReceivingCoins` are `Effect`-returning members,
|
|
301
|
+
// not synchronous PTB builders — `gateAvailability`'s Proxy calls its
|
|
302
|
+
// `guard()` synchronously, on every property access, before the wrapped
|
|
303
|
+
// function even runs, which is exactly right for a sync builder (the
|
|
304
|
+
// predecessor's own behaviour: throw before building) but wrong for an
|
|
305
|
+
// `Effect` member, which a Promise/Effect caller expects to REJECT/fail,
|
|
306
|
+
// never to throw synchronously out of merely calling it. So these two stay
|
|
307
|
+
// out of the Proxy and gate themselves through `operationsOrFail()`
|
|
308
|
+
// (mirroring `salesOrFail` above) composed into their own `Effect` chain —
|
|
309
|
+
// calling them always returns a value; only running it can fail (B2,
|
|
310
|
+
// misofm/sdks#35 verification).
|
|
311
|
+
const { getVaultAdminCap: _unusedGetVaultAdminCap, resolveReceivingCoins: _unusedResolveReceivingCoins, ...vaultActionsWithoutEffectMembers } = vaultActions;
|
|
312
|
+
const vault = {
|
|
313
|
+
...gateAvailability(vaultActionsWithoutEffectMembers, () => {
|
|
314
|
+
requireOperationsDeployment(deployment.operations);
|
|
315
|
+
}),
|
|
316
|
+
getVaultAdminCap: (vaultAdminCapId, capType) => withSui(Effect.flatMap(operationsOrFail(), (ops) => vaultActions.getVaultAdminCap(vaultAdminCapId, { vaultPackageId: ops.vault.packageId, capType }))),
|
|
317
|
+
resolveReceivingCoins: (coinIds) => withSui(Effect.flatMap(operationsOrFail(), () => vaultActions.resolveReceivingCoins(coinIds))),
|
|
318
|
+
};
|
|
319
|
+
// ── Submissions ───────────────────────────────────────────────────────────
|
|
320
|
+
const misoCreateShareCurrency = (params, opts) => withSui(createShareCurrency(params, opts));
|
|
321
|
+
const misoPublishShareCurrencies = (count, opts) => withSui(publishShareCurrencies(count, opts));
|
|
322
|
+
const misoInitializeShareCurrencies = (packageIds, metaOf, opts) => withSui(initializeShareCurrencies(packageIds, metaOf, opts));
|
|
323
|
+
const misoPublishCatalog = (params, opts) => {
|
|
324
|
+
const full = { ...params, deployment };
|
|
325
|
+
return withSui(Effect.map(Tx.run(publishAtomicCatalog(full), opts), (executed) => parseAtomicPublicationResult(full, executed)));
|
|
326
|
+
};
|
|
327
|
+
// ── `read.*`: the high-level views, config captured from this deployment ──
|
|
328
|
+
const readConfig = configFromDeployment(deployment);
|
|
329
|
+
const read = {
|
|
330
|
+
currencyInfo: readCatalog.currencyInfo,
|
|
331
|
+
primaryArtistNames: readCatalog.primaryArtistNames,
|
|
332
|
+
toTracks: readCatalog.toTracks,
|
|
333
|
+
getPressingView: (pressingId) => withEnv(readCatalog.getPressingView(pressingId, readConfig)),
|
|
334
|
+
getListingView: (pressingId, currencyType) => withEnv(readCatalog.getListingView(pressingId, currencyType, readConfig)),
|
|
335
|
+
readReleaseCover: (releaseId) => withEnv(readCatalog.readReleaseCover(releaseId, readConfig)),
|
|
336
|
+
getReleaseResources: (releaseId, include) => withEnv(readCatalog.getReleaseResources(releaseId, readConfig, include)),
|
|
337
|
+
getReleaseDetail: (releaseId, options) => withEnv(readCatalog.getReleaseDetail(releaseId, readConfig, options)),
|
|
338
|
+
getTrackCredits: (releaseId) => withEnv(readCatalog.getTrackCredits(releaseId, readConfig)),
|
|
339
|
+
getPressingDetail: (pressingId, options) => withEnv(readCatalog.getPressingDetail(pressingId, readConfig, options)),
|
|
340
|
+
getPressingSaleDetail: (pressingId, currencyType, options) => withEnv(readCatalog.getPressingSaleDetail(pressingId, currencyType, readConfig, options)),
|
|
341
|
+
getPressingPreview: (pressingId) => withEnv(readCatalog.getPressingPreview(pressingId, readConfig)),
|
|
342
|
+
getSaleDetail: (releaseId, edition, currencyType, options) => withEnv(readCatalog.getSaleDetail(releaseId, edition, currencyType, readConfig, options)),
|
|
343
|
+
getDiscoverShelf: () => withEnv(readCatalog.getDiscoverShelf(readConfig)),
|
|
344
|
+
getRecordAlbum: (recordId, options) => withEnv(readCatalog.getRecordAlbum(recordId, readConfig, options)),
|
|
345
|
+
partyAvatarUrl: (partyId) => readArtist.partyAvatarUrl(readConfig.apiBaseUrl, partyId),
|
|
346
|
+
getArtistProfile: (partyId, options) => withEnv(readArtist.getArtistProfile(partyId, readConfig, options)),
|
|
347
|
+
getPartySummaries: (ids) => withEnv(readArtist.getPartySummaries(ids, readConfig)),
|
|
348
|
+
resolveGenreNames: (genreIds) => withSui(readGenres.resolveGenreNames(genreIds)),
|
|
349
|
+
getBalance: (address, coinType) => withSui(readWallet.getBalance(address, readConfig, coinType)),
|
|
350
|
+
getOwnedParties: (owner) => withEnv(readWallet.getOwnedParties(owner, readConfig)),
|
|
351
|
+
getPendingMemberships: (owner) => withEnv(readWallet.getPendingMemberships(owner, readConfig)),
|
|
352
|
+
getOwnedRecords: (owner) => withEnv(readWallet.getOwnedRecords(owner, readConfig)),
|
|
353
|
+
getOwnedWorks: (owner) => withEnv(readWallet.getOwnedWorks(owner, readConfig)),
|
|
354
|
+
getWorkByCap: (capId) => withEnv(readWallet.getWorkByCap(capId, readConfig)),
|
|
355
|
+
ownsParty: (address, partyId) => withEnv(readWallet.ownsParty(address, partyId, readConfig)),
|
|
356
|
+
ownsRecord: (address, recordId) => withSui(readWallet.ownsRecord(address, recordId)),
|
|
357
|
+
isRecordSoldEventType: readReceipts.isRecordSoldEventType,
|
|
358
|
+
recordSoldCurrencyType: readReceipts.recordSoldCurrencyType,
|
|
359
|
+
findRecordSales: readReceipts.findRecordSales,
|
|
360
|
+
findRecordSale: readReceipts.findRecordSale,
|
|
361
|
+
breakdown: readReceipts.breakdown,
|
|
362
|
+
getPurchaseReceipts: (txDigest) => withEnv(readReceipts.getPurchaseReceipts(txDigest, readConfig)),
|
|
363
|
+
getPurchaseReceipt: (txDigest, recordId) => withEnv(readReceipts.getPurchaseReceipt(txDigest, recordId, readConfig)),
|
|
364
|
+
ROYALTY_CLAIMS_PAGE_LIMIT: readRoyalties.ROYALTY_CLAIMS_PAGE_LIMIT,
|
|
365
|
+
royaltyClaimedEventType: () => readRoyalties.royaltyClaimedEventType(readConfig),
|
|
366
|
+
listRoyaltyClaims: (address, options) => withEnv(readRoyalties.listRoyaltyClaims(address, readConfig, options)),
|
|
367
|
+
};
|
|
368
|
+
return {
|
|
369
|
+
deployment,
|
|
370
|
+
network: deployment.network,
|
|
371
|
+
chainId: deployment.chainIdentifier,
|
|
372
|
+
protocol,
|
|
373
|
+
party,
|
|
374
|
+
getPressing: misoGetPressing,
|
|
375
|
+
getListing: misoGetListing,
|
|
376
|
+
getRecord: misoGetRecord,
|
|
377
|
+
getSale: misoGetSale,
|
|
378
|
+
ids,
|
|
379
|
+
tx,
|
|
380
|
+
call,
|
|
381
|
+
bcs,
|
|
382
|
+
vault,
|
|
383
|
+
createShareCurrency: misoCreateShareCurrency,
|
|
384
|
+
publishShareCurrencies: misoPublishShareCurrencies,
|
|
385
|
+
initializeShareCurrencies: misoInitializeShareCurrencies,
|
|
386
|
+
publishCatalog: misoPublishCatalog,
|
|
387
|
+
read,
|
|
388
|
+
events: platformEventParsers,
|
|
389
|
+
/** @deprecated Warm-up compatibility member — see `docs/CONVERSION.md`; every member is already real once `warm`/`$ready()` resolved this runtime. */
|
|
390
|
+
ready: Effect.void,
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* The Miso platform service: `Pressing`/`Listing`/`Record` reads, PTB
|
|
395
|
+
* fragments, `vault`/`call`/`bcs`, the high-level `read.*` views, and the
|
|
396
|
+
* converted `protocol`/`party` object-model services, built on `Sui` and
|
|
397
|
+
* `SuiGraphQL`. Identifier `"@misofm/platform/Miso"`, never changes after
|
|
398
|
+
* publication.
|
|
399
|
+
*/
|
|
400
|
+
export class Miso extends Context.Service()("@misofm/platform/Miso") {
|
|
401
|
+
/**
|
|
402
|
+
* The live layer, bound to `deployment`. Composes `Musicos.layer` and
|
|
403
|
+
* `Partyos.layer` over the same `Sui` internally, so the requirement stays
|
|
404
|
+
* `Sui | SuiGraphQL` — never `Sui | SuiGraphQL | Musicos | Partyos` — for a
|
|
405
|
+
* consumer that only asked for `Miso`.
|
|
406
|
+
*
|
|
407
|
+
* Fails with: `MisoNetworkMismatchError`, `MisoChainIdentifierMismatchError`
|
|
408
|
+
* (the client's `sui.network`/`sui.chainId` do not match `deployment`),
|
|
409
|
+
* plus whatever `Musicos.layer`/`Partyos.layer` fail with for a structurally
|
|
410
|
+
* invalid `deployment.protocol`/`deployment.partyos` (should not happen for
|
|
411
|
+
* an already-`normalizeMisoPlatformDeployment`-validated deployment).
|
|
412
|
+
*/
|
|
413
|
+
static layer = (deployment) => Layer.effect(Miso, make(deployment)).pipe(Layer.provide(Musicos.layer({ deployment: deployment.protocol })), Layer.provide(Partyos.layer({ deployment: deployment.partyos })));
|
|
414
|
+
/**
|
|
415
|
+
* `layer`, over `Musicos`/`Partyos` and `Sui`/`SuiGraphQL` the caller
|
|
416
|
+
* already provides — the shape `docs/extensions.md` calls `layerNoDeps` for
|
|
417
|
+
* a service that composes other extensions, spelled out for testing or a
|
|
418
|
+
* caller assembling every layer itself.
|
|
419
|
+
*/
|
|
420
|
+
static layerNoDeps = (deployment) => Layer.effect(Miso, make(deployment));
|
|
421
|
+
/**
|
|
422
|
+
* `layer`, reading `MISO_NETWORK` from the environment to pick this
|
|
423
|
+
* release's bundled manifest; unset falls back to `sui.network`.
|
|
424
|
+
*
|
|
425
|
+
* Fails with: `ConfigError`, `MisoPlatformDeploymentInvalidError` (an
|
|
426
|
+
* unbundled `MISO_NETWORK`), plus everything {@link layer} fails with.
|
|
427
|
+
*/
|
|
428
|
+
static layerConfig = Layer.unwrap(Effect.gen(function* () {
|
|
429
|
+
const configuredNetwork = yield* Config.nonEmptyString("MISO_NETWORK").pipe(Config.option);
|
|
430
|
+
const network = configuredNetwork._tag === "Some" ? configuredNetwork.value : (yield* Sui).network;
|
|
431
|
+
const deployment = yield* Effect.try({
|
|
432
|
+
try: () => getMisoPlatformDeployment(network),
|
|
433
|
+
catch: (cause) => new MisoPlatformDeploymentInvalidError({ message: cause instanceof Error ? cause.message : String(cause) }),
|
|
434
|
+
});
|
|
435
|
+
return Miso.layer(deployment);
|
|
436
|
+
}));
|
|
437
|
+
/**
|
|
438
|
+
* The real service over a fixed manifest (the bundled testnet deployment
|
|
439
|
+
* unless `state.deployment` overrides it), skipping the exact-chain check
|
|
440
|
+
* `layer` performs — this is what lets a test provide any `Sui` fake
|
|
441
|
+
* without also faking a matching chain id. Compose with `layerExtensionTest`
|
|
442
|
+
* (or a merged `layerTest` for `Sui`) and a `SuiGraphQL` layer (e.g.
|
|
443
|
+
* `SuiGraphQL.layerUnavailable` when a test never reaches `read.*`/catalog
|
|
444
|
+
* GraphQL paths) from `sui-effect/testing`. Never fails.
|
|
445
|
+
*/
|
|
446
|
+
static layerTest = (state = {}) => {
|
|
447
|
+
const deployment = state.deployment ?? MISO_PLATFORM_DEPLOYMENTS.testnet;
|
|
448
|
+
return Layer.effect(Miso, makeUnchecked(deployment)).pipe(Layer.provide(Musicos.layerTest({ packageId: deployment.protocol.musicos })), Layer.provide(Partyos.layerTest(deployment.partyos)));
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
// `normalizeMisoPlatformDeployment` stays imported (not just re-exported) so
|
|
452
|
+
// a future `layerConfig` `MISO_DEPLOYMENT` JSON-path addition has it in scope
|
|
453
|
+
// without another import line to remember.
|
|
454
|
+
export { normalizeMisoPlatformDeployment };
|
|
455
|
+
//# sourceMappingURL=Miso.js.map
|
package/dist/Miso.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Miso.js","sourceRoot":"","sources":["../src/Miso.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AA2BtC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EAAE,OAAO,EAAsD,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAoD,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EACL,GAAG,EACH,UAAU,GASX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,EAAE,EAAiB,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EACL,yBAAyB,EACzB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,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;QACnG,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;YACnC,GAAG,EAAE,GAAG,EAAE,CAAC,yBAAyB,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,kCAAkC,CAAC,EAAE,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;SAC9H,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAChC,CAAC,CAAC,CACH,CAAC;IAEF;;;;;;;;OAQG;IACH,MAAM,CAAU,SAAS,GAAG,CAAC,KAAK,GAAqD,EAAE,EAA8C,EAAE;QACvI,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,yBAAyB,CAAC,OAAO,CAAC;QACzE,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CACvD,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAC5E,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CACrD,CAAC;IACJ,CAAC,CAAC;CACH;AAED,6EAA6E;AAC7E,8EAA8E;AAC9E,2CAA2C;AAC3C,OAAO,EAAE,+BAA+B,EAAE,CAAC"}
|
package/dist/auth.d.ts
CHANGED
|
@@ -30,7 +30,17 @@ export declare const MISO_AUTH_HEADERS: {
|
|
|
30
30
|
/** The byte-exact Sui personal message required for an authenticated API mutation. */
|
|
31
31
|
export declare function buildApiAuthorizationPayload(fields: ApiAuthorizationFields): string;
|
|
32
32
|
export declare function isValidAuthorizationTarget(method: string, path: string): boolean;
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Accept only fresh timestamps in one canonical spelling.
|
|
35
|
+
*
|
|
36
|
+
* A plain sync utility, not `Effect`-returning, so it takes `nowMs` as an
|
|
37
|
+
* explicit parameter rather than reading `Clock` itself — a caller outside
|
|
38
|
+
* an Effect program (client-side validation, say) can still use it standalone.
|
|
39
|
+
* `Date.now()` is only this parameter's fallback default for such a caller;
|
|
40
|
+
* `parseChallenge` below (the only in-package caller, and the one Effect
|
|
41
|
+
* needs to control for testing) always resolves `nowMs` from `Clock` first
|
|
42
|
+
* and passes it explicitly (C item, misofm/sdks#35 verification).
|
|
43
|
+
*/
|
|
34
44
|
export declare function parseFreshAuthorizationIssuedAt(input: unknown, nowMs?: number): string | null;
|
|
35
45
|
export interface RequestAuthorizationChallengeOptions {
|
|
36
46
|
apiUrl: string | URL;
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,MAAM,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEpE,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;A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AAoC;IAC7F,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED,gGAAgG;AAChG,eAAO,MAAM,0BAA0B;eAEN,sBAAsB;aAAW,OAAO;wBAqBvE,CAAC;AAEH,MAAM,WAAW,yBAA0B,SAAQ,WAAW;IAC5D,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,qBAAqB,CAAC;QAC9B,OAAO,CAAC,EAAE,WAAW,CAAC;KACvB,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAED,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,4GA+B7B,CAAC"}
|
package/dist/auth.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Miso Labs, Inc.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { isValidSuiAddress, normalizeSuiAddress } from "@mysten/sui/utils";
|
|
4
|
-
import { Effect } from "effect";
|
|
4
|
+
import { Clock, Effect } from "effect";
|
|
5
5
|
import { MisoAuthError } from "./errors.js";
|
|
6
6
|
export { MisoAuthError };
|
|
7
7
|
export const AUTHORIZATION_MAX_AGE_MS = 5 * 60 * 1_000;
|
|
@@ -29,7 +29,17 @@ export function isValidAuthorizationTarget(method, path) {
|
|
|
29
29
|
path.length <= 2_048 &&
|
|
30
30
|
!/[\r\n?#]/.test(path));
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Accept only fresh timestamps in one canonical spelling.
|
|
34
|
+
*
|
|
35
|
+
* A plain sync utility, not `Effect`-returning, so it takes `nowMs` as an
|
|
36
|
+
* explicit parameter rather than reading `Clock` itself — a caller outside
|
|
37
|
+
* an Effect program (client-side validation, say) can still use it standalone.
|
|
38
|
+
* `Date.now()` is only this parameter's fallback default for such a caller;
|
|
39
|
+
* `parseChallenge` below (the only in-package caller, and the one Effect
|
|
40
|
+
* needs to control for testing) always resolves `nowMs` from `Clock` first
|
|
41
|
+
* and passes it explicitly (C item, misofm/sdks#35 verification).
|
|
42
|
+
*/
|
|
33
43
|
export function parseFreshAuthorizationIssuedAt(input, nowMs = Date.now()) {
|
|
34
44
|
if (typeof input !== "string")
|
|
35
45
|
return null;
|
|
@@ -75,7 +85,10 @@ const parseChallenge = Effect.fn("parseChallenge")(function* (input, expected) {
|
|
|
75
85
|
reason: "The API returned an invalid authorization challenge.",
|
|
76
86
|
});
|
|
77
87
|
}
|
|
78
|
-
|
|
88
|
+
// `Clock`, not `Date.now()` — deterministic and `TestClock`-controllable
|
|
89
|
+
// (C item, misofm/sdks#35 verification); `expected.nowMs` still wins when
|
|
90
|
+
// a caller supplies one explicitly.
|
|
91
|
+
const nowMs = expected.nowMs ?? (yield* Clock.currentTimeMillis);
|
|
79
92
|
const issuedAt = parseFreshAuthorizationIssuedAt(body.issuedAt, nowMs);
|
|
80
93
|
const expiresAtMs = Date.parse(body.expiresAt);
|
|
81
94
|
const canonicalAddress = normalizeSuiAddress(body.address);
|