@misonetwork/sdk 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +210 -136
- package/dist/client.d.ts +1211 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +56 -19
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.d.ts +181 -0
- package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -0
- package/dist/contracts/composition_credits/composition_credits.js +109 -0
- package/dist/contracts/composition_credits/composition_credits.js.map +1 -0
- package/dist/contracts/composition_credits/composition_party_role.d.ts +119 -0
- package/dist/contracts/composition_credits/composition_party_role.d.ts.map +1 -0
- package/dist/contracts/composition_credits/composition_party_role.js +139 -0
- package/dist/contracts/composition_credits/composition_party_role.js.map +1 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/miso/composition.d.ts +1 -15
- package/dist/contracts/miso/composition.d.ts.map +1 -1
- package/dist/contracts/miso/composition.js +2 -17
- package/dist/contracts/miso/composition.js.map +1 -1
- package/dist/contracts/miso/deps/bps/bps.d.ts +1 -1
- package/dist/contracts/miso/deps/bps/bps.js +1 -1
- package/dist/contracts/miso/recording.d.ts +1 -16
- package/dist/contracts/miso/recording.d.ts.map +1 -1
- package/dist/contracts/miso/recording.js +1 -16
- package/dist/contracts/miso/recording.js.map +1 -1
- package/dist/contracts/miso/release.d.ts +61 -48
- package/dist/contracts/miso/release.d.ts.map +1 -1
- package/dist/contracts/miso/release.js +59 -46
- package/dist/contracts/miso/release.js.map +1 -1
- package/dist/contracts/miso/track.d.ts +2 -2
- package/dist/contracts/miso/track.js +2 -2
- package/dist/contracts/miso_party/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js +20 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/miso_party/party.d.ts +481 -0
- package/dist/contracts/miso_party/party.d.ts.map +1 -0
- package/dist/contracts/miso_party/party.js +527 -0
- package/dist/contracts/miso_party/party.js.map +1 -0
- package/dist/contracts/party_cta/party_cta.d.ts +120 -0
- package/dist/contracts/party_cta/party_cta.d.ts.map +1 -0
- package/dist/contracts/party_cta/party_cta.js +139 -0
- package/dist/contracts/party_cta/party_cta.js.map +1 -0
- package/dist/contracts/party_genre/party_genre.d.ts +117 -0
- package/dist/contracts/party_genre/party_genre.d.ts.map +1 -0
- package/dist/contracts/party_genre/party_genre.js +131 -0
- package/dist/contracts/party_genre/party_genre.js.map +1 -0
- package/dist/contracts/party_media/party_media.d.ts +86 -0
- package/dist/contracts/party_media/party_media.d.ts.map +1 -0
- package/dist/contracts/party_media/party_media.js +97 -0
- package/dist/contracts/party_media/party_media.js.map +1 -0
- package/dist/contracts/party_music/party_music.d.ts +209 -0
- package/dist/contracts/party_music/party_music.d.ts.map +1 -0
- package/dist/contracts/party_music/party_music.js +259 -0
- package/dist/contracts/party_music/party_music.js.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts +89 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.js +92 -0
- package/dist/contracts/party_platform_link/party_platform_link.js.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts +233 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.js +289 -0
- package/dist/contracts/party_pro_link/party_pro_link.js.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts +15 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js +17 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts +6 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js +8 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js.map +1 -0
- package/dist/contracts/party_profile/party_profile.d.ts +133 -0
- package/dist/contracts/party_profile/party_profile.d.ts.map +1 -0
- package/dist/contracts/party_profile/party_profile.js +153 -0
- package/dist/contracts/party_profile/party_profile.js.map +1 -0
- package/dist/contracts/party_roles/party_roles.d.ts +201 -0
- package/dist/contracts/party_roles/party_roles.d.ts.map +1 -0
- package/dist/contracts/party_roles/party_roles.js +237 -0
- package/dist/contracts/party_roles/party_roles.js.map +1 -0
- package/dist/contracts/party_social/party_social.d.ts +258 -0
- package/dist/contracts/party_social/party_social.d.ts.map +1 -0
- package/dist/contracts/party_social/party_social.js +320 -0
- package/dist/contracts/party_social/party_social.js.map +1 -0
- package/dist/contracts/party_tags/party_tags.d.ts +116 -0
- package/dist/contracts/party_tags/party_tags.d.ts.map +1 -0
- package/dist/contracts/party_tags/party_tags.js +130 -0
- package/dist/contracts/party_tags/party_tags.js.map +1 -0
- package/dist/contracts/recording_advisory/recording_advisory.d.ts +194 -0
- package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -0
- package/dist/contracts/recording_advisory/recording_advisory.js +204 -0
- package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.js +20 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/recording_credits/recording_credits.d.ts +2313 -0
- package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -0
- package/dist/contracts/recording_credits/recording_credits.js +270 -0
- package/dist/contracts/recording_credits/recording_credits.js.map +1 -0
- package/dist/contracts/recording_credits/recording_party_role.d.ts +1174 -0
- package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -0
- package/dist/contracts/recording_credits/recording_party_role.js +692 -0
- package/dist/contracts/recording_credits/recording_party_role.js.map +1 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +6 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +1 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.js +8 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.js.map +1 -0
- package/dist/contracts/recording_language/recording_language.d.ts +152 -0
- package/dist/contracts/recording_language/recording_language.d.ts.map +1 -0
- package/dist/contracts/recording_language/recording_language.js +149 -0
- package/dist/contracts/recording_language/recording_language.js.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +131 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.js +121 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/recording_preview/recording_preview.d.ts +104 -0
- package/dist/contracts/recording_preview/recording_preview.d.ts.map +1 -0
- package/dist/contracts/recording_preview/recording_preview.js +94 -0
- package/dist/contracts/recording_preview/recording_preview.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +52 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +37 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +46 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +21 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +33 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js +32 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -0
- package/dist/contracts/release_cover_art/release_cover_art.d.ts +300 -0
- package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/release_cover_art.js +168 -0
- package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/release_credits/release_credits.d.ts +142 -0
- package/dist/contracts/release_credits/release_credits.d.ts.map +1 -0
- package/dist/contracts/release_credits/release_credits.js +108 -0
- package/dist/contracts/release_credits/release_credits.js.map +1 -0
- package/dist/contracts/release_credits/release_party_role.d.ts +58 -0
- package/dist/contracts/release_credits/release_party_role.d.ts.map +1 -0
- package/dist/contracts/release_credits/release_party_role.js +66 -0
- package/dist/contracts/release_credits/release_party_role.js.map +1 -0
- package/dist/contracts/release_description/release_description.d.ts +112 -0
- package/dist/contracts/release_description/release_description.d.ts.map +1 -0
- package/dist/contracts/release_description/release_description.js +123 -0
- package/dist/contracts/release_description/release_description.js.map +1 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +644 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.js +556 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.d.ts +33 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.d.ts.map +1 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.js +32 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.js.map +1 -0
- package/dist/contracts/release_genre/release_genre.d.ts +193 -0
- package/dist/contracts/release_genre/release_genre.d.ts.map +1 -0
- package/dist/contracts/release_genre/release_genre.js +207 -0
- package/dist/contracts/release_genre/release_genre.js.map +1 -0
- package/dist/contracts/release_kind/release_kind.d.ts +98 -0
- package/dist/contracts/release_kind/release_kind.d.ts.map +1 -0
- package/dist/contracts/release_kind/release_kind.js +109 -0
- package/dist/contracts/release_kind/release_kind.js.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +54 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js +37 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -0
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/std/type_name.js +20 -0
- package/dist/contracts/routed_stake/deps/std/type_name.js.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts +13 -0
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/balance.js +15 -0
- package/dist/contracts/routed_stake/deps/sui/balance.js.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.js +28 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts +342 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.js +297 -0
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.js +20 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +13 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.js +15 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js +28 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/royalty_pool/pool.d.ts +380 -0
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/pool.js +373 -0
- package/dist/contracts/royalty_pool/pool.js.map +1 -0
- package/dist/contracts/royalty_pool/stake.d.ts +189 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/stake.js +183 -0
- package/dist/contracts/royalty_pool/stake.js.map +1 -0
- package/dist/contracts.d.ts +48 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +54 -8
- package/dist/contracts.js.map +1 -1
- package/dist/deployments.d.ts +46 -12
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +132 -11
- package/dist/deployments.js.map +1 -1
- package/dist/events.d.ts +1067 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +120 -0
- package/dist/events.js.map +1 -0
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +0 -4
- package/dist/execute.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/numeric.d.ts +5 -0
- package/dist/numeric.d.ts.map +1 -0
- package/dist/numeric.js +21 -0
- package/dist/numeric.js.map +1 -0
- package/dist/packages.d.ts +194 -0
- package/dist/packages.d.ts.map +1 -0
- package/dist/packages.js +214 -0
- package/dist/packages.js.map +1 -0
- package/dist/parsers.d.ts +5 -1
- package/dist/parsers.d.ts.map +1 -1
- package/dist/parsers.js +18 -2
- package/dist/parsers.js.map +1 -1
- package/dist/party/client.d.ts +233 -0
- package/dist/party/client.d.ts.map +1 -0
- package/dist/party/client.js +222 -0
- package/dist/party/client.js.map +1 -0
- package/dist/party/extensions/ctas.d.ts +19 -0
- package/dist/party/extensions/ctas.d.ts.map +1 -0
- package/dist/party/extensions/ctas.js +25 -0
- package/dist/party/extensions/ctas.js.map +1 -0
- package/dist/party/extensions/genres.d.ts +27 -0
- package/dist/party/extensions/genres.d.ts.map +1 -0
- package/dist/party/extensions/genres.js +31 -0
- package/dist/party/extensions/genres.js.map +1 -0
- package/dist/party/extensions/links.d.ts +65 -0
- package/dist/party/extensions/links.d.ts.map +1 -0
- package/dist/party/extensions/links.js +117 -0
- package/dist/party/extensions/links.js.map +1 -0
- package/dist/party/extensions/media.d.ts +36 -0
- package/dist/party/extensions/media.d.ts.map +1 -0
- package/dist/party/extensions/media.js +45 -0
- package/dist/party/extensions/media.js.map +1 -0
- package/dist/party/extensions/profile.d.ts +24 -0
- package/dist/party/extensions/profile.d.ts.map +1 -0
- package/dist/party/extensions/profile.js +48 -0
- package/dist/party/extensions/profile.js.map +1 -0
- package/dist/party/extensions/roles.d.ts +37 -0
- package/dist/party/extensions/roles.d.ts.map +1 -0
- package/dist/party/extensions/roles.js +46 -0
- package/dist/party/extensions/roles.js.map +1 -0
- package/dist/party/extensions/tags.d.ts +25 -0
- package/dist/party/extensions/tags.d.ts.map +1 -0
- package/dist/party/extensions/tags.js +25 -0
- package/dist/party/extensions/tags.js.map +1 -0
- package/dist/party/index.d.ts +12 -0
- package/dist/party/index.d.ts.map +1 -0
- package/dist/party/index.js +14 -0
- package/dist/party/index.js.map +1 -0
- package/dist/party/internal.d.ts +15 -0
- package/dist/party/internal.d.ts.map +1 -0
- package/dist/party/internal.js +103 -0
- package/dist/party/internal.js.map +1 -0
- package/dist/party/queries.d.ts +38 -0
- package/dist/party/queries.d.ts.map +1 -0
- package/dist/party/queries.js +232 -0
- package/dist/party/queries.js.map +1 -0
- package/dist/party/transactions.d.ts +74 -0
- package/dist/party/transactions.d.ts.map +1 -0
- package/dist/party/transactions.js +85 -0
- package/dist/party/transactions.js.map +1 -0
- package/dist/party/types.d.ts +54 -0
- package/dist/party/types.d.ts.map +1 -0
- package/dist/party/types.js +4 -0
- package/dist/party/types.js.map +1 -0
- package/dist/queries.d.ts +92 -0
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +132 -23
- package/dist/queries.js.map +1 -1
- package/dist/transactions.d.ts +96 -3
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +123 -11
- package/dist/transactions.js.map +1 -1
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/view.d.ts +6 -5
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +8 -2
- package/dist/view.js.map +1 -1
- package/package.json +18 -4
- package/src/client.ts +73 -23
- package/src/contracts/composition_credits/composition_credits.ts +169 -0
- package/src/contracts/composition_credits/composition_party_role.ts +189 -0
- package/src/contracts/composition_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/composition_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/miso/composition.ts +8 -35
- package/src/contracts/miso/deps/bps/bps.ts +3 -3
- package/src/contracts/miso/recording.ts +10 -38
- package/src/contracts/miso/release.ts +99 -86
- package/src/contracts/miso/track.ts +5 -5
- package/src/contracts/miso_party/deps/sui/vec_set.ts +21 -0
- package/src/contracts/miso_party/party.ts +797 -0
- package/src/contracts/party_cta/party_cta.ts +212 -0
- package/src/contracts/party_genre/party_genre.ts +199 -0
- package/src/contracts/party_media/party_media.ts +141 -0
- package/src/contracts/party_music/party_music.ts +405 -0
- package/src/contracts/party_platform_link/party_platform_link.ts +148 -0
- package/src/contracts/party_pro_link/party_pro_link.ts +453 -0
- package/src/contracts/party_profile/deps/country_code/country_code.ts +19 -0
- package/src/contracts/party_profile/deps/language_code/language_code.ts +7 -0
- package/src/contracts/party_profile/party_profile.ts +239 -0
- package/src/contracts/party_roles/party_roles.ts +363 -0
- package/src/contracts/party_social/party_social.ts +502 -0
- package/src/contracts/party_tags/party_tags.ts +198 -0
- package/src/contracts/recording_advisory/recording_advisory.ts +315 -0
- package/src/contracts/recording_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/recording_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/recording_credits/deps/sui/vec_set.ts +21 -0
- package/src/contracts/recording_credits/recording_credits.ts +458 -0
- package/src/contracts/recording_credits/recording_party_role.ts +1041 -0
- package/src/contracts/recording_language/deps/language_code/language_code.ts +7 -0
- package/src/contracts/recording_language/recording_language.ts +237 -0
- package/src/contracts/recording_master_reference/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/recording_master_reference/recording_master_reference.ts +181 -0
- package/src/contracts/recording_preview/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/recording_preview/recording_preview.ts +154 -0
- package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +36 -0
- package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +23 -0
- package/src/contracts/release_cover_art/deps/per_track/per_track.ts +36 -0
- package/src/contracts/release_cover_art/release_cover_art.ts +251 -0
- package/src/contracts/release_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/release_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/release_credits/release_credits.ts +156 -0
- package/src/contracts/release_credits/release_party_role.ts +87 -0
- package/src/contracts/release_description/release_description.ts +167 -0
- package/src/contracts/release_dsp_link/release_dsp_link.ts +813 -0
- package/src/contracts/release_genre/deps/per_track/per_track.ts +36 -0
- package/src/contracts/release_genre/release_genre.ts +314 -0
- package/src/contracts/release_kind/release_kind.ts +153 -0
- package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +39 -0
- package/src/contracts/routed_stake/deps/std/type_name.ts +22 -0
- package/src/contracts/routed_stake/deps/sui/balance.ts +17 -0
- package/src/contracts/routed_stake/deps/sui/vec_map.ts +33 -0
- package/src/contracts/routed_stake/routed_stake.ts +481 -0
- package/src/contracts/royalty_pool/deps/std/type_name.ts +22 -0
- package/src/contracts/royalty_pool/deps/sui/balance.ts +17 -0
- package/src/contracts/royalty_pool/deps/sui/vec_map.ts +33 -0
- package/src/contracts/royalty_pool/pool.ts +586 -0
- package/src/contracts/royalty_pool/stake.ts +291 -0
- package/src/contracts.ts +72 -6
- package/src/deployments.ts +175 -22
- package/src/events.ts +125 -0
- package/src/execute.ts +0 -4
- package/src/index.ts +8 -3
- package/src/internal.ts +0 -4
- package/src/numeric.ts +25 -0
- package/src/packages.ts +283 -0
- package/src/parsers.ts +32 -2
- package/src/party/client.ts +283 -0
- package/src/party/extensions/ctas.ts +46 -0
- package/src/party/extensions/genres.ts +62 -0
- package/src/party/extensions/links.ts +185 -0
- package/src/party/extensions/media.ts +72 -0
- package/src/party/extensions/profile.ts +81 -0
- package/src/party/extensions/roles.ts +94 -0
- package/src/party/extensions/tags.ts +54 -0
- package/src/party/index.ts +14 -0
- package/src/party/internal.ts +119 -0
- package/src/party/queries.ts +303 -0
- package/src/party/transactions.ts +167 -0
- package/src/party/types.ts +95 -0
- package/src/queries.ts +227 -25
- package/src/transactions.ts +254 -12
- package/src/types.ts +20 -0
- package/src/view.ts +12 -6
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Accumulator-based royalty distribution pool for the protocol's share tokens.
|
|
6
|
+
*
|
|
7
|
+
* A `RoyaltyPool<Share, Currency>` is a derived object of any UID-bearing parent.
|
|
8
|
+
* Its address is deterministically derived from `(parent_id, Share, Currency)` —
|
|
9
|
+
* at most one pool per triple, and the pool at that address is necessarily typed
|
|
10
|
+
* `RoyaltyPool<Share, Currency>` (the same type parameters produce the address and
|
|
11
|
+
* the object) and necessarily shared (the pool is key-only; `share` is its only
|
|
12
|
+
* consumer). The `Share` phantom identifies which share-token type can stake
|
|
13
|
+
* against the pool.
|
|
14
|
+
*
|
|
15
|
+
* Holders create a `Stake<Share>` (see `royalty_pool::stake`) and register it.
|
|
16
|
+
* Callers fund the pool by handing it a `Balance<Currency>` via `deposit`; the
|
|
17
|
+
* accumulator advances and claims pay out the per-stake proportional share since
|
|
18
|
+
* each stake's last claim.
|
|
19
|
+
*
|
|
20
|
+
* The pool is funded two ways, both committing the funds to share holders:
|
|
21
|
+
*
|
|
22
|
+
* - `deposit(balance)` from any caller holding `&mut` on the pool — e.g.
|
|
23
|
+
* `routed_stake::sweep`, which deposits a wrapped stake's claimed rewards into
|
|
24
|
+
* its parent's pool.
|
|
25
|
+
* - Delivery to the pool's derived address — pending `Coin<Currency>` transfers or
|
|
26
|
+
* address-balance credits (e.g. `release_revenue_distributor` settles each
|
|
27
|
+
* track's split there). The address is a pure function of
|
|
28
|
+
* `(parent_id, Share, Currency)`, so senders need the pool neither shared nor
|
|
29
|
+
* even created yet; a later `new` claims exactly that ID — and can only be the
|
|
30
|
+
* correctly-typed, shared pool. `receive_and_deposit` and `redeem_and_deposit`
|
|
31
|
+
* fold such funds into the accumulator, permissionlessly: anyone can complete
|
|
32
|
+
* the delivery. Both run through `deposit`, which aborts while no shares are
|
|
33
|
+
* staked — and the pool has no other withdrawal path — so funds at the pool's
|
|
34
|
+
* address wait, locked, until the pool exists and a stake registers.
|
|
35
|
+
*
|
|
36
|
+
* ### No activation delay (deliberate)
|
|
37
|
+
*
|
|
38
|
+
* Registration earns from the next deposit onward; there is no bonding or
|
|
39
|
+
* unbonding period (contrast Sui native staking's next-epoch activation). With the
|
|
40
|
+
* protocol's fixed-supply share token this is safe: a stake's take of any deposit
|
|
41
|
+
* is `v · s / S` with `S` (total registered) bounded by the share supply, so a
|
|
42
|
+
* continuously registered stake is guaranteed at least its pro-rata share of total
|
|
43
|
+
* supply on every deposit. Short-lived or just-in-time registrations can only
|
|
44
|
+
* compete for the _unregistered_ supply's drift — the designed incentive for being
|
|
45
|
+
* registered — never below any registered stake's floor.
|
|
46
|
+
*
|
|
47
|
+
* ### Precision
|
|
48
|
+
*
|
|
49
|
+
* The share token's shape is fixed at issuance by the protocol — exactly 10¹³ base
|
|
50
|
+
* units, 6 decimals, supply made immutable via `miso_share::share::initialize`
|
|
51
|
+
* (`make_supply_fixed`) — so `staked_shares ≤ 10¹³` objectively. A deposit of
|
|
52
|
+
* `value ≥ 1` base units therefore advances the accumulator by
|
|
53
|
+
* `value · PRECISION / staked_shares ≥ 10¹⁸ / 10¹³ = 10⁵`: the truncation-to-zero
|
|
54
|
+
* case that would permanently lock a deposit in the pool balance is impossible by
|
|
55
|
+
* construction, not by convention. Sub-base-unit claim residue (the remaining
|
|
56
|
+
* source of locked dust) is documented on `unregister_stake`.
|
|
57
|
+
*/
|
|
58
|
+
import { MoveStruct, MoveTuple, normalizeMoveArguments } from "../utils/index.js";
|
|
59
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
60
|
+
import {} from '@mysten/sui/transactions';
|
|
61
|
+
import * as balance_1 from "./deps/sui/balance.js";
|
|
62
|
+
const $moduleName = '@local-pkg/royalty_pool::pool';
|
|
63
|
+
export const RoyaltyPool = new MoveStruct({ name: `${$moduleName}::RoyaltyPool<phantom Share, phantom Currency>`, fields: {
|
|
64
|
+
id: bcs.Address,
|
|
65
|
+
balance: balance_1.Balance,
|
|
66
|
+
staked_shares: bcs.u64(),
|
|
67
|
+
cumulative_reward_per_share: bcs.u256(),
|
|
68
|
+
/**
|
|
69
|
+
* Lifetime sum of every deposited value, in currency base units. Read-only
|
|
70
|
+
* analytics — never decremented; not used by any on-chain logic.
|
|
71
|
+
*/
|
|
72
|
+
cumulative_deposits: bcs.u128()
|
|
73
|
+
} });
|
|
74
|
+
export const RoyaltyPoolKey = new MoveTuple({ name: `${$moduleName}::RoyaltyPoolKey<phantom Share, phantom Currency>`, fields: [bcs.bool()] });
|
|
75
|
+
export const RoyaltyPoolCreatedEvent = new MoveStruct({ name: `${$moduleName}::RoyaltyPoolCreatedEvent<phantom Share, phantom Currency>`, fields: {
|
|
76
|
+
pool_id: bcs.Address,
|
|
77
|
+
parent_id: bcs.Address
|
|
78
|
+
} });
|
|
79
|
+
export const RoyaltyDepositedEvent = new MoveStruct({ name: `${$moduleName}::RoyaltyDepositedEvent<phantom Share, phantom Currency>`, fields: {
|
|
80
|
+
pool_id: bcs.Address,
|
|
81
|
+
value: bcs.u64()
|
|
82
|
+
} });
|
|
83
|
+
export const StakeRegisteredEvent = new MoveStruct({ name: `${$moduleName}::StakeRegisteredEvent<phantom Share, phantom Currency>`, fields: {
|
|
84
|
+
pool_id: bcs.Address,
|
|
85
|
+
stake_id: bcs.Address,
|
|
86
|
+
staked_amount: bcs.u64()
|
|
87
|
+
} });
|
|
88
|
+
export const StakeUnregisteredEvent = new MoveStruct({ name: `${$moduleName}::StakeUnregisteredEvent<phantom Share, phantom Currency>`, fields: {
|
|
89
|
+
pool_id: bcs.Address,
|
|
90
|
+
stake_id: bcs.Address,
|
|
91
|
+
unstaked_amount: bcs.u64()
|
|
92
|
+
} });
|
|
93
|
+
export const RoyaltyClaimedEvent = new MoveStruct({ name: `${$moduleName}::RoyaltyClaimedEvent<phantom Share, phantom Currency>`, fields: {
|
|
94
|
+
pool_id: bcs.Address,
|
|
95
|
+
stake_id: bcs.Address,
|
|
96
|
+
reward_amount: bcs.u64()
|
|
97
|
+
} });
|
|
98
|
+
/**
|
|
99
|
+
* Construct a pool as a derived object of `parent`. The derivation key encodes
|
|
100
|
+
* both type parameters, so the pool's address is determined entirely by
|
|
101
|
+
* `(parent_id, Share, Currency)` — and therefore always names a pool of exactly
|
|
102
|
+
* this type (see `RoyaltyPoolKey`).
|
|
103
|
+
*
|
|
104
|
+
* Cap-gating happens at the parent: callers must obtain `&mut UID` via whatever
|
|
105
|
+
* cap-gated accessor the parent exposes.
|
|
106
|
+
*/
|
|
107
|
+
export function _new(options) {
|
|
108
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
109
|
+
const argumentsTypes = [
|
|
110
|
+
'0x2::object::ID'
|
|
111
|
+
];
|
|
112
|
+
const parameterNames = ["parent"];
|
|
113
|
+
return (tx) => tx.moveCall({
|
|
114
|
+
package: packageAddress,
|
|
115
|
+
module: 'pool',
|
|
116
|
+
function: 'new',
|
|
117
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
118
|
+
typeArguments: options.typeArguments
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/** Share the pool object so holders can register and claim against it. */
|
|
122
|
+
export function share(options) {
|
|
123
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
124
|
+
const argumentsTypes = [
|
|
125
|
+
null
|
|
126
|
+
];
|
|
127
|
+
const parameterNames = ["self"];
|
|
128
|
+
return (tx) => tx.moveCall({
|
|
129
|
+
package: packageAddress,
|
|
130
|
+
module: 'pool',
|
|
131
|
+
function: 'share',
|
|
132
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
133
|
+
typeArguments: options.typeArguments
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Fold a balance into the accumulator. Aborts on zero staked shares (the deposit
|
|
138
|
+
* would be unattributable) or zero value (no-op deposits are rejected to keep
|
|
139
|
+
* events meaningful).
|
|
140
|
+
*
|
|
141
|
+
* Callers obtain the `Balance<Currency>` however they like — typically by pulling
|
|
142
|
+
* from a parent's pending coins or funds accumulator (see e.g.
|
|
143
|
+
* `composition_royalty_distributor`).
|
|
144
|
+
*/
|
|
145
|
+
export function deposit(options) {
|
|
146
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
147
|
+
const argumentsTypes = [
|
|
148
|
+
null,
|
|
149
|
+
null
|
|
150
|
+
];
|
|
151
|
+
const parameterNames = ["self", "balance"];
|
|
152
|
+
return (tx) => tx.moveCall({
|
|
153
|
+
package: packageAddress,
|
|
154
|
+
module: 'pool',
|
|
155
|
+
function: 'deposit',
|
|
156
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
157
|
+
typeArguments: options.typeArguments
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Receive `Coin<Currency>` objects sent directly to this pool's address and fold
|
|
162
|
+
* them into the accumulator. Recovery path for funds delivered to the pool's
|
|
163
|
+
* address rather than via the canonical extension path.
|
|
164
|
+
*/
|
|
165
|
+
export function receiveAndDeposit(options) {
|
|
166
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
167
|
+
const argumentsTypes = [
|
|
168
|
+
null,
|
|
169
|
+
'vector<null>'
|
|
170
|
+
];
|
|
171
|
+
const parameterNames = ["self", "coins"];
|
|
172
|
+
return (tx) => tx.moveCall({
|
|
173
|
+
package: packageAddress,
|
|
174
|
+
module: 'pool',
|
|
175
|
+
function: 'receive_and_deposit',
|
|
176
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
177
|
+
typeArguments: options.typeArguments
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Redeem `value` base units from the pool's funds-accumulator and fold them into
|
|
182
|
+
* the accumulator. Recovery path for funds delivered via Sui's `send_funds`
|
|
183
|
+
* mechanism rather than via the canonical extension path.
|
|
184
|
+
*/
|
|
185
|
+
export function redeemAndDeposit(options) {
|
|
186
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
187
|
+
const argumentsTypes = [
|
|
188
|
+
null,
|
|
189
|
+
'u64'
|
|
190
|
+
];
|
|
191
|
+
const parameterNames = ["self", "value"];
|
|
192
|
+
return (tx) => tx.moveCall({
|
|
193
|
+
package: packageAddress,
|
|
194
|
+
module: 'pool',
|
|
195
|
+
function: 'redeem_and_deposit',
|
|
196
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
197
|
+
typeArguments: options.typeArguments
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Register a stake with the pool. Records the stake's entry index so future
|
|
202
|
+
* deposits accrue to it proportionally.
|
|
203
|
+
*
|
|
204
|
+
* Aborts if the stake is already registered with a pool of the same Currency.
|
|
205
|
+
*/
|
|
206
|
+
export function registerStake(options) {
|
|
207
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
208
|
+
const argumentsTypes = [
|
|
209
|
+
null,
|
|
210
|
+
null
|
|
211
|
+
];
|
|
212
|
+
const parameterNames = ["self", "stake"];
|
|
213
|
+
return (tx) => tx.moveCall({
|
|
214
|
+
package: packageAddress,
|
|
215
|
+
module: 'pool',
|
|
216
|
+
function: 'register_stake',
|
|
217
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
218
|
+
typeArguments: options.typeArguments
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Unregister a stake from the pool. All claimable rewards must be drained first —
|
|
223
|
+
* i.e., a final `claim_rewards` call must yield 0. Sub-base-unit residue in
|
|
224
|
+
* `last_claim_index` (left by the consumed-index advance when a reward truncated
|
|
225
|
+
* to 0) does NOT block unregister, since that residue could never be claimed as a
|
|
226
|
+
* whole base unit anyway. Forfeiting it on exit is the deliberate semantics.
|
|
227
|
+
*/
|
|
228
|
+
export function unregisterStake(options) {
|
|
229
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
230
|
+
const argumentsTypes = [
|
|
231
|
+
null,
|
|
232
|
+
null
|
|
233
|
+
];
|
|
234
|
+
const parameterNames = ["self", "stake"];
|
|
235
|
+
return (tx) => tx.moveCall({
|
|
236
|
+
package: packageAddress,
|
|
237
|
+
module: 'pool',
|
|
238
|
+
function: 'unregister_stake',
|
|
239
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
240
|
+
typeArguments: options.typeArguments
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Claim accrued rewards for a registered stake. Advances the stake's
|
|
245
|
+
* `last_claim_index` to the pool's current accumulator.
|
|
246
|
+
*/
|
|
247
|
+
export function claimRewards(options) {
|
|
248
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
249
|
+
const argumentsTypes = [
|
|
250
|
+
null,
|
|
251
|
+
null
|
|
252
|
+
];
|
|
253
|
+
const parameterNames = ["self", "stake"];
|
|
254
|
+
return (tx) => tx.moveCall({
|
|
255
|
+
package: packageAddress,
|
|
256
|
+
module: 'pool',
|
|
257
|
+
function: 'claim_rewards',
|
|
258
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
259
|
+
typeArguments: options.typeArguments
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Compute pending rewards for a stake without claiming. Returns 0 if the stake is
|
|
264
|
+
* not registered with this pool.
|
|
265
|
+
*/
|
|
266
|
+
export function pendingRewards(options) {
|
|
267
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
268
|
+
const argumentsTypes = [
|
|
269
|
+
null,
|
|
270
|
+
null
|
|
271
|
+
];
|
|
272
|
+
const parameterNames = ["self", "stake"];
|
|
273
|
+
return (tx) => tx.moveCall({
|
|
274
|
+
package: packageAddress,
|
|
275
|
+
module: 'pool',
|
|
276
|
+
function: 'pending_rewards',
|
|
277
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
278
|
+
typeArguments: options.typeArguments
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
export function balance(options) {
|
|
282
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
283
|
+
const argumentsTypes = [
|
|
284
|
+
null
|
|
285
|
+
];
|
|
286
|
+
const parameterNames = ["self"];
|
|
287
|
+
return (tx) => tx.moveCall({
|
|
288
|
+
package: packageAddress,
|
|
289
|
+
module: 'pool',
|
|
290
|
+
function: 'balance',
|
|
291
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
292
|
+
typeArguments: options.typeArguments
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
export function stakedShares(options) {
|
|
296
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
297
|
+
const argumentsTypes = [
|
|
298
|
+
null
|
|
299
|
+
];
|
|
300
|
+
const parameterNames = ["self"];
|
|
301
|
+
return (tx) => tx.moveCall({
|
|
302
|
+
package: packageAddress,
|
|
303
|
+
module: 'pool',
|
|
304
|
+
function: 'staked_shares',
|
|
305
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
306
|
+
typeArguments: options.typeArguments
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
export function cumulativeRewardPerShare(options) {
|
|
310
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
311
|
+
const argumentsTypes = [
|
|
312
|
+
null
|
|
313
|
+
];
|
|
314
|
+
const parameterNames = ["self"];
|
|
315
|
+
return (tx) => tx.moveCall({
|
|
316
|
+
package: packageAddress,
|
|
317
|
+
module: 'pool',
|
|
318
|
+
function: 'cumulative_reward_per_share',
|
|
319
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
320
|
+
typeArguments: options.typeArguments
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
/** Lifetime sum of all deposits, in currency base units. Strictly monotonic. */
|
|
324
|
+
export function cumulativeDeposits(options) {
|
|
325
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
326
|
+
const argumentsTypes = [
|
|
327
|
+
null
|
|
328
|
+
];
|
|
329
|
+
const parameterNames = ["self"];
|
|
330
|
+
return (tx) => tx.moveCall({
|
|
331
|
+
package: packageAddress,
|
|
332
|
+
module: 'pool',
|
|
333
|
+
function: 'cumulative_deposits',
|
|
334
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
335
|
+
typeArguments: options.typeArguments
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Compute the deterministic address of a pool given its parent ID and `Currency`
|
|
340
|
+
* type parameter. Useful for off-chain derivation and for cross-module checks that
|
|
341
|
+
* the pool was minted from the expected parent.
|
|
342
|
+
*/
|
|
343
|
+
export function derivedAddress(options) {
|
|
344
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
345
|
+
const argumentsTypes = [
|
|
346
|
+
'0x2::object::ID'
|
|
347
|
+
];
|
|
348
|
+
const parameterNames = ["parentId"];
|
|
349
|
+
return (tx) => tx.moveCall({
|
|
350
|
+
package: packageAddress,
|
|
351
|
+
module: 'pool',
|
|
352
|
+
function: 'derived_address',
|
|
353
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
354
|
+
typeArguments: options.typeArguments
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/** Read-only verification that the pool was derived from the given parent ID. */
|
|
358
|
+
export function assertDerivedFrom(options) {
|
|
359
|
+
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
360
|
+
const argumentsTypes = [
|
|
361
|
+
null,
|
|
362
|
+
'0x2::object::ID'
|
|
363
|
+
];
|
|
364
|
+
const parameterNames = ["self", "parentId"];
|
|
365
|
+
return (tx) => tx.moveCall({
|
|
366
|
+
package: packageAddress,
|
|
367
|
+
module: 'pool',
|
|
368
|
+
function: 'assert_derived_from',
|
|
369
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
370
|
+
typeArguments: options.typeArguments
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
//# sourceMappingURL=pool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../../../src/contracts/royalty_pool/pool.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,MAAM,WAAW,GAAG,+BAA+B,CAAC;AACpD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,gDAAgD,EAAE,MAAM,EAAE;QAClH,EAAE,EAAE,GAAG,CAAC,OAAO;QACf,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,aAAa,EAAE,GAAG,CAAC,GAAG,EAAE;QACxB,2BAA2B,EAAE,GAAG,CAAC,IAAI,EAAE;QACvC;;;WAGG;QACH,mBAAmB,EAAE,GAAG,CAAC,IAAI,EAAE;KAClC,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,mDAAmD,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAC/I,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,4DAA4D,EAAE,MAAM,EAAE;QAC1I,OAAO,EAAE,GAAG,C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C,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;QACpF,aAAa,EAAE,OAAO,CAAC,aAAa;KACvC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A position holding share tokens registered against a `RoyaltyPool`.
|
|
6
|
+
*
|
|
7
|
+
* Stakes are owned objects with an immutable balance — to increase a holder's
|
|
8
|
+
* total staked amount, mint additional Stake objects rather than modify an
|
|
9
|
+
* existing one. This mirrors Sui's native staking model.
|
|
10
|
+
*
|
|
11
|
+
* Each stake tracks the royalty pools it is currently registered with via an
|
|
12
|
+
* inline `VecMap<TypeName, Registration>`, keyed by the pool's `Currency`
|
|
13
|
+
* `TypeName`. The stake cannot be destroyed while any registrations remain. Pool
|
|
14
|
+
* registrations are mutated by `royalty_pool::pool` through the package-private
|
|
15
|
+
* accessors below.
|
|
16
|
+
*/
|
|
17
|
+
import { MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
18
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
19
|
+
export declare const Registration: MoveStruct<{
|
|
20
|
+
pool_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
21
|
+
last_claim_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
22
|
+
}, "@local-pkg/royalty_pool::stake::Registration">;
|
|
23
|
+
export declare const Stake: MoveStruct<{
|
|
24
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
25
|
+
/** The staked balance. Immutable after creation. */
|
|
26
|
+
balance: MoveStruct<{
|
|
27
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
28
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
29
|
+
/**
|
|
30
|
+
* Active royalty-pool registrations, keyed by `Currency` `TypeName`. Must be empty
|
|
31
|
+
* to destroy.
|
|
32
|
+
*/
|
|
33
|
+
registrations: MoveStruct<{
|
|
34
|
+
contents: import("@mysten/sui/bcs").BcsType<{
|
|
35
|
+
key: {
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
value: {
|
|
39
|
+
pool_id: string;
|
|
40
|
+
last_claim_index: string;
|
|
41
|
+
};
|
|
42
|
+
}[], Iterable<{
|
|
43
|
+
key: {
|
|
44
|
+
name: string;
|
|
45
|
+
};
|
|
46
|
+
value: {
|
|
47
|
+
pool_id: string | Uint8Array<ArrayBufferLike>;
|
|
48
|
+
last_claim_index: string | number | bigint;
|
|
49
|
+
};
|
|
50
|
+
}> & {
|
|
51
|
+
length: number;
|
|
52
|
+
}, string>;
|
|
53
|
+
}, "0x2::vec_map::VecMap<std::type_name::TypeName, @local-pkg/royalty_pool::stake::Registration>">;
|
|
54
|
+
}, "@local-pkg/royalty_pool::stake::Stake<phantom Share>">;
|
|
55
|
+
export declare const StakeCreatedEvent: MoveStruct<{
|
|
56
|
+
stake_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
57
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
58
|
+
}, "@local-pkg/royalty_pool::stake::StakeCreatedEvent<phantom Share>">;
|
|
59
|
+
export declare const StakeDestroyedEvent: MoveStruct<{
|
|
60
|
+
stake_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
61
|
+
amount: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
62
|
+
}, "@local-pkg/royalty_pool::stake::StakeDestroyedEvent<phantom Share>">;
|
|
63
|
+
export interface NewArguments {
|
|
64
|
+
balance: TransactionArgument;
|
|
65
|
+
}
|
|
66
|
+
export interface NewOptions {
|
|
67
|
+
package?: string;
|
|
68
|
+
arguments: NewArguments | [
|
|
69
|
+
balance: TransactionArgument
|
|
70
|
+
];
|
|
71
|
+
typeArguments: [
|
|
72
|
+
string
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Create a new stake with the given balance.
|
|
77
|
+
*
|
|
78
|
+
* Aborts if `balance` is zero.
|
|
79
|
+
*/
|
|
80
|
+
export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
81
|
+
export interface DestroyArguments {
|
|
82
|
+
stake: RawTransactionArgument<string>;
|
|
83
|
+
}
|
|
84
|
+
export interface DestroyOptions {
|
|
85
|
+
package?: string;
|
|
86
|
+
arguments: DestroyArguments | [
|
|
87
|
+
stake: RawTransactionArgument<string>
|
|
88
|
+
];
|
|
89
|
+
typeArguments: [
|
|
90
|
+
string
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Destroy a stake and reclaim its balance.
|
|
95
|
+
*
|
|
96
|
+
* Aborts if the stake is still registered with any royalty pools.
|
|
97
|
+
*/
|
|
98
|
+
export declare function destroy(options: DestroyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
99
|
+
export interface BalanceArguments {
|
|
100
|
+
self: RawTransactionArgument<string>;
|
|
101
|
+
}
|
|
102
|
+
export interface BalanceOptions {
|
|
103
|
+
package?: string;
|
|
104
|
+
arguments: BalanceArguments | [
|
|
105
|
+
self: RawTransactionArgument<string>
|
|
106
|
+
];
|
|
107
|
+
typeArguments: [
|
|
108
|
+
string
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
export declare function balance(options: BalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
112
|
+
export interface ValueArguments {
|
|
113
|
+
self: RawTransactionArgument<string>;
|
|
114
|
+
}
|
|
115
|
+
export interface ValueOptions {
|
|
116
|
+
package?: string;
|
|
117
|
+
arguments: ValueArguments | [
|
|
118
|
+
self: RawTransactionArgument<string>
|
|
119
|
+
];
|
|
120
|
+
typeArguments: [
|
|
121
|
+
string
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
export declare function value(options: ValueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
125
|
+
export interface RegistrationCountArguments {
|
|
126
|
+
self: RawTransactionArgument<string>;
|
|
127
|
+
}
|
|
128
|
+
export interface RegistrationCountOptions {
|
|
129
|
+
package?: string;
|
|
130
|
+
arguments: RegistrationCountArguments | [
|
|
131
|
+
self: RawTransactionArgument<string>
|
|
132
|
+
];
|
|
133
|
+
typeArguments: [
|
|
134
|
+
string
|
|
135
|
+
];
|
|
136
|
+
}
|
|
137
|
+
/** Number of royalty pools this stake is currently registered with. */
|
|
138
|
+
export declare function registrationCount(options: RegistrationCountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
139
|
+
export interface HasRegistrationArguments {
|
|
140
|
+
self: RawTransactionArgument<string>;
|
|
141
|
+
currency: TransactionArgument;
|
|
142
|
+
}
|
|
143
|
+
export interface HasRegistrationOptions {
|
|
144
|
+
package?: string;
|
|
145
|
+
arguments: HasRegistrationArguments | [
|
|
146
|
+
self: RawTransactionArgument<string>,
|
|
147
|
+
currency: TransactionArgument
|
|
148
|
+
];
|
|
149
|
+
typeArguments: [
|
|
150
|
+
string
|
|
151
|
+
];
|
|
152
|
+
}
|
|
153
|
+
export declare function hasRegistration(options: HasRegistrationOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
154
|
+
export interface GetRegistrationArguments {
|
|
155
|
+
self: RawTransactionArgument<string>;
|
|
156
|
+
currency: TransactionArgument;
|
|
157
|
+
}
|
|
158
|
+
export interface GetRegistrationOptions {
|
|
159
|
+
package?: string;
|
|
160
|
+
arguments: GetRegistrationArguments | [
|
|
161
|
+
self: RawTransactionArgument<string>,
|
|
162
|
+
currency: TransactionArgument
|
|
163
|
+
];
|
|
164
|
+
typeArguments: [
|
|
165
|
+
string
|
|
166
|
+
];
|
|
167
|
+
}
|
|
168
|
+
export declare function getRegistration(options: GetRegistrationOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
169
|
+
export interface RegistrationPoolIdArguments {
|
|
170
|
+
r: TransactionArgument;
|
|
171
|
+
}
|
|
172
|
+
export interface RegistrationPoolIdOptions {
|
|
173
|
+
package?: string;
|
|
174
|
+
arguments: RegistrationPoolIdArguments | [
|
|
175
|
+
r: TransactionArgument
|
|
176
|
+
];
|
|
177
|
+
}
|
|
178
|
+
export declare function registrationPoolId(options: RegistrationPoolIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
179
|
+
export interface RegistrationLastClaimIndexArguments {
|
|
180
|
+
r: TransactionArgument;
|
|
181
|
+
}
|
|
182
|
+
export interface RegistrationLastClaimIndexOptions {
|
|
183
|
+
package?: string;
|
|
184
|
+
arguments: RegistrationLastClaimIndexArguments | [
|
|
185
|
+
r: TransactionArgument
|
|
186
|
+
];
|
|
187
|
+
}
|
|
188
|
+
export declare function registrationLastClaimIndex(options: RegistrationLastClaimIndexOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
189
|
+
//# sourceMappingURL=stake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stake.d.ts","sourceRoot":"","sources":["../../../src/contracts/royalty_pool/stake.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEpG,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAKtF,eAAO,MAAM,YAAY;;;kDAGjB,CAAC;AACT,eAAO,MAAM,KAAK;;IAEV,oDAAoD;;;;IAEpD;;;OAGG;;;;;;;;;;;;;;;;;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