@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,481 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A stake whose rewards are irrevocably routed to its parent's royalty pool.
|
|
8
|
+
*
|
|
9
|
+
* A `RoutedStake<StakeShare, PoolShare>` is a derived object of any UID-bearing
|
|
10
|
+
* parent (same pattern as `RoyaltyPool`). It wraps a `Stake<StakeShare>` — shares
|
|
11
|
+
* of some other asset that the parent owns — and commits the rewards that stake
|
|
12
|
+
* earns to the parent's own `RoyaltyPool<PoolShare, Currency>`: `sweep` is the
|
|
13
|
+
* only reachable claim path, and it deposits straight into the pool derived from
|
|
14
|
+
* the same parent. The wrapper exists precisely so the raw `Stake` is never
|
|
15
|
+
* exposed — a bare shared `Stake` would let any caller claim its rewards and keep
|
|
16
|
+
* them.
|
|
17
|
+
*
|
|
18
|
+
* Because the route is fixed, the wrapper is safe to share: `sweep` is
|
|
19
|
+
* permissionless, and it does not matter who calls it, since the money can only go
|
|
20
|
+
* one place. Lifecycle operations (`register`, `unregister`, `unstake`, `restake`)
|
|
21
|
+
* instead require the parent's `&mut UID` as the credential — cap-gating happens
|
|
22
|
+
* at the parent, exactly as with `RoyaltyPool` creation. `register`/`unregister`
|
|
23
|
+
* are gated because a stake registers at most once per `Currency`: a
|
|
24
|
+
* permissionless register could grief by binding the stake to a garbage same-typed
|
|
25
|
+
* pool, permanently blocking the real one for that currency.
|
|
26
|
+
*
|
|
27
|
+
* The derivation key encodes only `StakeShare` — at most one routed stake per
|
|
28
|
+
* `(parent, StakeShare)` pair, whatever `PoolShare` it used (the same
|
|
29
|
+
* burned-by-first-claim consequence as `RoyaltyPoolKey`; the parent's cap-gated
|
|
30
|
+
* extension is expected to pin `PoolShare` to the parent's own share type). For
|
|
31
|
+
* the same reason the wrapper is never deleted: `unstake` empties it and `restake`
|
|
32
|
+
* refills it, so the one derived address per pair stays usable forever.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import { MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
36
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
37
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
38
|
+
import * as stake_1 from './deps/royalty_pool/stake.ts';
|
|
39
|
+
const $moduleName = '@local-pkg/routed_stake::routed_stake';
|
|
40
|
+
export const RoutedStake = new MoveStruct({ name: `${$moduleName}::RoutedStake<phantom StakeShare, phantom PoolShare>`, fields: {
|
|
41
|
+
id: bcs.Address,
|
|
42
|
+
/**
|
|
43
|
+
* The wrapped position. `None` between `unstake` and `restake`; the wrapper itself
|
|
44
|
+
* persists because its derived address can never be re-claimed.
|
|
45
|
+
*/
|
|
46
|
+
stake: bcs.option(stake_1.Stake)
|
|
47
|
+
} });
|
|
48
|
+
export const RoutedStakeKey = new MoveTuple({ name: `${$moduleName}::RoutedStakeKey<phantom StakeShare>`, fields: [bcs.bool()] });
|
|
49
|
+
export const RoutedStakeCreatedEvent = new MoveStruct({ name: `${$moduleName}::RoutedStakeCreatedEvent<phantom StakeShare, phantom PoolShare>`, fields: {
|
|
50
|
+
routed_stake_id: bcs.Address,
|
|
51
|
+
parent_id: bcs.Address,
|
|
52
|
+
staked_value: bcs.u64()
|
|
53
|
+
} });
|
|
54
|
+
export const RoutedStakeSweptEvent = new MoveStruct({ name: `${$moduleName}::RoutedStakeSweptEvent<phantom StakeShare, phantom PoolShare, phantom Currency>`, fields: {
|
|
55
|
+
routed_stake_id: bcs.Address,
|
|
56
|
+
parent_id: bcs.Address,
|
|
57
|
+
value: bcs.u64()
|
|
58
|
+
} });
|
|
59
|
+
export const RoutedStakeUnstakedEvent = new MoveStruct({ name: `${$moduleName}::RoutedStakeUnstakedEvent<phantom StakeShare, phantom PoolShare>`, fields: {
|
|
60
|
+
routed_stake_id: bcs.Address,
|
|
61
|
+
parent_id: bcs.Address,
|
|
62
|
+
unstaked_value: bcs.u64()
|
|
63
|
+
} });
|
|
64
|
+
export const RoutedStakeRestakedEvent = new MoveStruct({ name: `${$moduleName}::RoutedStakeRestakedEvent<phantom StakeShare, phantom PoolShare>`, fields: {
|
|
65
|
+
routed_stake_id: bcs.Address,
|
|
66
|
+
parent_id: bcs.Address,
|
|
67
|
+
staked_value: bcs.u64()
|
|
68
|
+
} });
|
|
69
|
+
export interface NewArguments {
|
|
70
|
+
parent: RawTransactionArgument<string>;
|
|
71
|
+
balance: TransactionArgument;
|
|
72
|
+
}
|
|
73
|
+
export interface NewOptions {
|
|
74
|
+
package?: string;
|
|
75
|
+
arguments: NewArguments | [
|
|
76
|
+
parent: RawTransactionArgument<string>,
|
|
77
|
+
balance: TransactionArgument
|
|
78
|
+
];
|
|
79
|
+
typeArguments: [
|
|
80
|
+
string,
|
|
81
|
+
string
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Construct a routed stake as a derived object of `parent`, wrapping `balance` as
|
|
86
|
+
* its staked position. Aborts (in `stake::new`) on a zero balance, and (in
|
|
87
|
+
* `derived_object::claim`) if the `(parent, StakeShare)` address was already
|
|
88
|
+
* claimed.
|
|
89
|
+
*
|
|
90
|
+
* Cap-gating happens at the parent: callers must obtain `&mut UID` via whatever
|
|
91
|
+
* cap-gated accessor the parent exposes.
|
|
92
|
+
*/
|
|
93
|
+
export function _new(options: NewOptions) {
|
|
94
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
95
|
+
const argumentsTypes = [
|
|
96
|
+
'0x2::object::ID',
|
|
97
|
+
null
|
|
98
|
+
] satisfies (string | null)[];
|
|
99
|
+
const parameterNames = ["parent", "balance"];
|
|
100
|
+
return (tx: Transaction) => tx.moveCall({
|
|
101
|
+
package: packageAddress,
|
|
102
|
+
module: 'routed_stake',
|
|
103
|
+
function: 'new',
|
|
104
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
105
|
+
typeArguments: options.typeArguments
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export interface ShareArguments {
|
|
109
|
+
self: RawTransactionArgument<string>;
|
|
110
|
+
}
|
|
111
|
+
export interface ShareOptions {
|
|
112
|
+
package?: string;
|
|
113
|
+
arguments: ShareArguments | [
|
|
114
|
+
self: RawTransactionArgument<string>
|
|
115
|
+
];
|
|
116
|
+
typeArguments: [
|
|
117
|
+
string,
|
|
118
|
+
string
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
/** Share the routed stake so anyone can `sweep` it. */
|
|
122
|
+
export function share(options: ShareOptions) {
|
|
123
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
124
|
+
const argumentsTypes = [
|
|
125
|
+
null
|
|
126
|
+
] satisfies (string | null)[];
|
|
127
|
+
const parameterNames = ["self"];
|
|
128
|
+
return (tx: Transaction) => tx.moveCall({
|
|
129
|
+
package: packageAddress,
|
|
130
|
+
module: 'routed_stake',
|
|
131
|
+
function: 'share',
|
|
132
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
133
|
+
typeArguments: options.typeArguments
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
export interface RegisterArguments {
|
|
137
|
+
self: RawTransactionArgument<string>;
|
|
138
|
+
parent: RawTransactionArgument<string>;
|
|
139
|
+
stakePool: RawTransactionArgument<string>;
|
|
140
|
+
}
|
|
141
|
+
export interface RegisterOptions {
|
|
142
|
+
package?: string;
|
|
143
|
+
arguments: RegisterArguments | [
|
|
144
|
+
self: RawTransactionArgument<string>,
|
|
145
|
+
parent: RawTransactionArgument<string>,
|
|
146
|
+
stakePool: RawTransactionArgument<string>
|
|
147
|
+
];
|
|
148
|
+
typeArguments: [
|
|
149
|
+
string,
|
|
150
|
+
string,
|
|
151
|
+
string
|
|
152
|
+
];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Register the wrapped stake with the pool it earns from, so future deposits
|
|
156
|
+
* accrue to it. Which same-typed pool is the _correct_ one is the caller's concern
|
|
157
|
+
* — the parent's extension is expected to pin it (e.g. by derivation from the
|
|
158
|
+
* asset object) before delegating here.
|
|
159
|
+
*/
|
|
160
|
+
export function register(options: RegisterOptions) {
|
|
161
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
162
|
+
const argumentsTypes = [
|
|
163
|
+
null,
|
|
164
|
+
'0x2::object::ID',
|
|
165
|
+
null
|
|
166
|
+
] satisfies (string | null)[];
|
|
167
|
+
const parameterNames = ["self", "parent", "stakePool"];
|
|
168
|
+
return (tx: Transaction) => tx.moveCall({
|
|
169
|
+
package: packageAddress,
|
|
170
|
+
module: 'routed_stake',
|
|
171
|
+
function: 'register',
|
|
172
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
173
|
+
typeArguments: options.typeArguments
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
export interface UnregisterArguments {
|
|
177
|
+
self: RawTransactionArgument<string>;
|
|
178
|
+
parent: RawTransactionArgument<string>;
|
|
179
|
+
stakePool: RawTransactionArgument<string>;
|
|
180
|
+
}
|
|
181
|
+
export interface UnregisterOptions {
|
|
182
|
+
package?: string;
|
|
183
|
+
arguments: UnregisterArguments | [
|
|
184
|
+
self: RawTransactionArgument<string>,
|
|
185
|
+
parent: RawTransactionArgument<string>,
|
|
186
|
+
stakePool: RawTransactionArgument<string>
|
|
187
|
+
];
|
|
188
|
+
typeArguments: [
|
|
189
|
+
string,
|
|
190
|
+
string,
|
|
191
|
+
string
|
|
192
|
+
];
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Unregister the wrapped stake from a pool it earns from. The pool requires
|
|
196
|
+
* claimable rewards to be drained to zero first — i.e. a final `sweep` — so
|
|
197
|
+
* accrued rewards provably reach the parent's pool before the position can move.
|
|
198
|
+
*/
|
|
199
|
+
export function unregister(options: UnregisterOptions) {
|
|
200
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
201
|
+
const argumentsTypes = [
|
|
202
|
+
null,
|
|
203
|
+
'0x2::object::ID',
|
|
204
|
+
null
|
|
205
|
+
] satisfies (string | null)[];
|
|
206
|
+
const parameterNames = ["self", "parent", "stakePool"];
|
|
207
|
+
return (tx: Transaction) => tx.moveCall({
|
|
208
|
+
package: packageAddress,
|
|
209
|
+
module: 'routed_stake',
|
|
210
|
+
function: 'unregister',
|
|
211
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
212
|
+
typeArguments: options.typeArguments
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
export interface UnstakeArguments {
|
|
216
|
+
self: RawTransactionArgument<string>;
|
|
217
|
+
parent: RawTransactionArgument<string>;
|
|
218
|
+
}
|
|
219
|
+
export interface UnstakeOptions {
|
|
220
|
+
package?: string;
|
|
221
|
+
arguments: UnstakeArguments | [
|
|
222
|
+
self: RawTransactionArgument<string>,
|
|
223
|
+
parent: RawTransactionArgument<string>
|
|
224
|
+
];
|
|
225
|
+
typeArguments: [
|
|
226
|
+
string,
|
|
227
|
+
string
|
|
228
|
+
];
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Remove the staked position and return its principal. Aborts (in
|
|
232
|
+
* `stake::destroy`) while any pool registrations remain. The emptied wrapper
|
|
233
|
+
* persists — its derived address is burned forever, so deleting it would
|
|
234
|
+
* permanently destroy the parent's ability to route-stake this share type;
|
|
235
|
+
* `restake` refills it instead.
|
|
236
|
+
*/
|
|
237
|
+
export function unstake(options: UnstakeOptions) {
|
|
238
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
239
|
+
const argumentsTypes = [
|
|
240
|
+
null,
|
|
241
|
+
'0x2::object::ID'
|
|
242
|
+
] satisfies (string | null)[];
|
|
243
|
+
const parameterNames = ["self", "parent"];
|
|
244
|
+
return (tx: Transaction) => tx.moveCall({
|
|
245
|
+
package: packageAddress,
|
|
246
|
+
module: 'routed_stake',
|
|
247
|
+
function: 'unstake',
|
|
248
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
249
|
+
typeArguments: options.typeArguments
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
export interface RestakeArguments {
|
|
253
|
+
self: RawTransactionArgument<string>;
|
|
254
|
+
parent: RawTransactionArgument<string>;
|
|
255
|
+
balance: TransactionArgument;
|
|
256
|
+
}
|
|
257
|
+
export interface RestakeOptions {
|
|
258
|
+
package?: string;
|
|
259
|
+
arguments: RestakeArguments | [
|
|
260
|
+
self: RawTransactionArgument<string>,
|
|
261
|
+
parent: RawTransactionArgument<string>,
|
|
262
|
+
balance: TransactionArgument
|
|
263
|
+
];
|
|
264
|
+
typeArguments: [
|
|
265
|
+
string,
|
|
266
|
+
string
|
|
267
|
+
];
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Refill an emptied wrapper with a new staked position. Aborts if a position is
|
|
271
|
+
* already present.
|
|
272
|
+
*/
|
|
273
|
+
export function restake(options: RestakeOptions) {
|
|
274
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
275
|
+
const argumentsTypes = [
|
|
276
|
+
null,
|
|
277
|
+
'0x2::object::ID',
|
|
278
|
+
null
|
|
279
|
+
] satisfies (string | null)[];
|
|
280
|
+
const parameterNames = ["self", "parent", "balance"];
|
|
281
|
+
return (tx: Transaction) => tx.moveCall({
|
|
282
|
+
package: packageAddress,
|
|
283
|
+
module: 'routed_stake',
|
|
284
|
+
function: 'restake',
|
|
285
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
286
|
+
typeArguments: options.typeArguments
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
export interface SweepArguments {
|
|
290
|
+
self: RawTransactionArgument<string>;
|
|
291
|
+
stakePool: RawTransactionArgument<string>;
|
|
292
|
+
routedPool: RawTransactionArgument<string>;
|
|
293
|
+
parentId: RawTransactionArgument<string>;
|
|
294
|
+
}
|
|
295
|
+
export interface SweepOptions {
|
|
296
|
+
package?: string;
|
|
297
|
+
arguments: SweepArguments | [
|
|
298
|
+
self: RawTransactionArgument<string>,
|
|
299
|
+
stakePool: RawTransactionArgument<string>,
|
|
300
|
+
routedPool: RawTransactionArgument<string>,
|
|
301
|
+
parentId: RawTransactionArgument<string>
|
|
302
|
+
];
|
|
303
|
+
typeArguments: [
|
|
304
|
+
string,
|
|
305
|
+
string,
|
|
306
|
+
string
|
|
307
|
+
];
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Claim the wrapped stake's accrued rewards from `stake_pool` and deposit them
|
|
311
|
+
* into `routed_pool` — the parent's own pool. Permissionless: the caller supplies
|
|
312
|
+
* `parent_id`, but cannot lie, because both the wrapper's own address and
|
|
313
|
+
* `routed_pool`'s address must derive from it. A zero reward is a no-op (no
|
|
314
|
+
* event), so the call composes safely into batch PTBs; a positive reward aborts
|
|
315
|
+
* (in `royalty_pool::pool`) if `routed_pool` has no registered stakes — the reward
|
|
316
|
+
* stays claimable here until it does.
|
|
317
|
+
*/
|
|
318
|
+
export function sweep(options: SweepOptions) {
|
|
319
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
320
|
+
const argumentsTypes = [
|
|
321
|
+
null,
|
|
322
|
+
null,
|
|
323
|
+
null,
|
|
324
|
+
'0x2::object::ID'
|
|
325
|
+
] satisfies (string | null)[];
|
|
326
|
+
const parameterNames = ["self", "stakePool", "routedPool", "parentId"];
|
|
327
|
+
return (tx: Transaction) => tx.moveCall({
|
|
328
|
+
package: packageAddress,
|
|
329
|
+
module: 'routed_stake',
|
|
330
|
+
function: 'sweep',
|
|
331
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
332
|
+
typeArguments: options.typeArguments
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
export interface HasStakeArguments {
|
|
336
|
+
self: RawTransactionArgument<string>;
|
|
337
|
+
}
|
|
338
|
+
export interface HasStakeOptions {
|
|
339
|
+
package?: string;
|
|
340
|
+
arguments: HasStakeArguments | [
|
|
341
|
+
self: RawTransactionArgument<string>
|
|
342
|
+
];
|
|
343
|
+
typeArguments: [
|
|
344
|
+
string,
|
|
345
|
+
string
|
|
346
|
+
];
|
|
347
|
+
}
|
|
348
|
+
export function hasStake(options: HasStakeOptions) {
|
|
349
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
350
|
+
const argumentsTypes = [
|
|
351
|
+
null
|
|
352
|
+
] satisfies (string | null)[];
|
|
353
|
+
const parameterNames = ["self"];
|
|
354
|
+
return (tx: Transaction) => tx.moveCall({
|
|
355
|
+
package: packageAddress,
|
|
356
|
+
module: 'routed_stake',
|
|
357
|
+
function: 'has_stake',
|
|
358
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
359
|
+
typeArguments: options.typeArguments
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
export interface ValueArguments {
|
|
363
|
+
self: RawTransactionArgument<string>;
|
|
364
|
+
}
|
|
365
|
+
export interface ValueOptions {
|
|
366
|
+
package?: string;
|
|
367
|
+
arguments: ValueArguments | [
|
|
368
|
+
self: RawTransactionArgument<string>
|
|
369
|
+
];
|
|
370
|
+
typeArguments: [
|
|
371
|
+
string,
|
|
372
|
+
string
|
|
373
|
+
];
|
|
374
|
+
}
|
|
375
|
+
/** Staked principal, or 0 while the wrapper is empty. */
|
|
376
|
+
export function value(options: ValueOptions) {
|
|
377
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
378
|
+
const argumentsTypes = [
|
|
379
|
+
null
|
|
380
|
+
] satisfies (string | null)[];
|
|
381
|
+
const parameterNames = ["self"];
|
|
382
|
+
return (tx: Transaction) => tx.moveCall({
|
|
383
|
+
package: packageAddress,
|
|
384
|
+
module: 'routed_stake',
|
|
385
|
+
function: 'value',
|
|
386
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
387
|
+
typeArguments: options.typeArguments
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
export interface StakeArguments {
|
|
391
|
+
self: RawTransactionArgument<string>;
|
|
392
|
+
}
|
|
393
|
+
export interface StakeOptions {
|
|
394
|
+
package?: string;
|
|
395
|
+
arguments: StakeArguments | [
|
|
396
|
+
self: RawTransactionArgument<string>
|
|
397
|
+
];
|
|
398
|
+
typeArguments: [
|
|
399
|
+
string,
|
|
400
|
+
string
|
|
401
|
+
];
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Read-only access to the wrapped stake, e.g. for `pool::pending_rewards`. Aborts
|
|
405
|
+
* while the wrapper is empty (`has_stake` to guard).
|
|
406
|
+
*/
|
|
407
|
+
export function stake(options: StakeOptions) {
|
|
408
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
409
|
+
const argumentsTypes = [
|
|
410
|
+
null
|
|
411
|
+
] satisfies (string | null)[];
|
|
412
|
+
const parameterNames = ["self"];
|
|
413
|
+
return (tx: Transaction) => tx.moveCall({
|
|
414
|
+
package: packageAddress,
|
|
415
|
+
module: 'routed_stake',
|
|
416
|
+
function: 'stake',
|
|
417
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
418
|
+
typeArguments: options.typeArguments
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
export interface DerivedAddressArguments {
|
|
422
|
+
parentId: RawTransactionArgument<string>;
|
|
423
|
+
}
|
|
424
|
+
export interface DerivedAddressOptions {
|
|
425
|
+
package?: string;
|
|
426
|
+
arguments: DerivedAddressArguments | [
|
|
427
|
+
parentId: RawTransactionArgument<string>
|
|
428
|
+
];
|
|
429
|
+
typeArguments: [
|
|
430
|
+
string
|
|
431
|
+
];
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Compute the deterministic address of a routed stake given its parent ID and
|
|
435
|
+
* `StakeShare` type parameter.
|
|
436
|
+
*/
|
|
437
|
+
export function derivedAddress(options: DerivedAddressOptions) {
|
|
438
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
439
|
+
const argumentsTypes = [
|
|
440
|
+
'0x2::object::ID'
|
|
441
|
+
] satisfies (string | null)[];
|
|
442
|
+
const parameterNames = ["parentId"];
|
|
443
|
+
return (tx: Transaction) => tx.moveCall({
|
|
444
|
+
package: packageAddress,
|
|
445
|
+
module: 'routed_stake',
|
|
446
|
+
function: 'derived_address',
|
|
447
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
448
|
+
typeArguments: options.typeArguments
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
export interface AssertDerivedFromArguments {
|
|
452
|
+
self: RawTransactionArgument<string>;
|
|
453
|
+
parentId: RawTransactionArgument<string>;
|
|
454
|
+
}
|
|
455
|
+
export interface AssertDerivedFromOptions {
|
|
456
|
+
package?: string;
|
|
457
|
+
arguments: AssertDerivedFromArguments | [
|
|
458
|
+
self: RawTransactionArgument<string>,
|
|
459
|
+
parentId: RawTransactionArgument<string>
|
|
460
|
+
];
|
|
461
|
+
typeArguments: [
|
|
462
|
+
string,
|
|
463
|
+
string
|
|
464
|
+
];
|
|
465
|
+
}
|
|
466
|
+
/** Verify the routed stake was derived from the given parent ID. */
|
|
467
|
+
export function assertDerivedFrom(options: AssertDerivedFromOptions) {
|
|
468
|
+
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
469
|
+
const argumentsTypes = [
|
|
470
|
+
null,
|
|
471
|
+
'0x2::object::ID'
|
|
472
|
+
] satisfies (string | null)[];
|
|
473
|
+
const parameterNames = ["self", "parentId"];
|
|
474
|
+
return (tx: Transaction) => tx.moveCall({
|
|
475
|
+
package: packageAddress,
|
|
476
|
+
module: 'routed_stake',
|
|
477
|
+
function: 'assert_derived_from',
|
|
478
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
479
|
+
typeArguments: options.typeArguments
|
|
480
|
+
});
|
|
481
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
7
|
+
|
|
8
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
9
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
10
|
+
const $moduleName = 'std::type_name';
|
|
11
|
+
export const TypeName = new MoveStruct({ name: `${$moduleName}::TypeName`, fields: {
|
|
12
|
+
/**
|
|
13
|
+
* String representation of the type. All types are represented using their source
|
|
14
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
15
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
16
|
+
* `00000000000000000000000000000001::string::String` or
|
|
17
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
18
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
19
|
+
* 32 depending on the Move platform)
|
|
20
|
+
*/
|
|
21
|
+
name: bcs.string()
|
|
22
|
+
} });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
8
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
9
|
+
* and `Balance`s.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
13
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
14
|
+
const $moduleName = '0x2::balance';
|
|
15
|
+
export const Balance = new MoveStruct({ name: `${$moduleName}::Balance<phantom T>`, fields: {
|
|
16
|
+
value: bcs.u64()
|
|
17
|
+
} });
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
6
|
+
const $moduleName = '0x2::vec_map';
|
|
7
|
+
/** An entry in the map */
|
|
8
|
+
export function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
9
|
+
K,
|
|
10
|
+
V
|
|
11
|
+
]) {
|
|
12
|
+
return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
|
|
13
|
+
key: typeParameters[0],
|
|
14
|
+
value: typeParameters[1]
|
|
15
|
+
} });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A map data structure backed by a vector. The map is guaranteed not to contain
|
|
19
|
+
* duplicate keys, but entries are _not_ sorted by key--entries are included in
|
|
20
|
+
* insertion order. All operations are O(N) in the size of the map--the intention
|
|
21
|
+
* of this data structure is only to provide the convenience of programming against
|
|
22
|
+
* a map API. Large maps should use handwritten parent/child relationships instead.
|
|
23
|
+
* Maps that need sorted iteration rather than insertion order iteration should
|
|
24
|
+
* also be handwritten.
|
|
25
|
+
*/
|
|
26
|
+
export function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
27
|
+
K,
|
|
28
|
+
V
|
|
29
|
+
]) {
|
|
30
|
+
return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
|
|
31
|
+
contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
|
|
32
|
+
} });
|
|
33
|
+
}
|