@misofm/sdk 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -34
- package/dist/client.d.ts +72 -24
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +229 -84
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.d.ts +10 -10
- package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -1
- package/dist/contracts/composition_credits/composition_credits.js.map +1 -1
- package/dist/contracts/composition_credits/composition_party_role.d.ts +1 -1
- package/dist/contracts/composition_credits/composition_party_role.d.ts.map +1 -1
- package/dist/contracts/composition_credits/composition_party_role.js.map +1 -1
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +1 -1
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +1 -1
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +1 -1
- package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts +29 -93
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js +19 -79
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +15 -99
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +12 -94
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts +90 -0
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.d.ts.map +1 -0
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js +85 -0
- package/dist/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.js.map +1 -0
- package/dist/contracts/{party_wallet → composition_royalty_pool_plugin}/witness.d.ts +1 -1
- package/dist/contracts/composition_royalty_pool_plugin/witness.d.ts.map +1 -0
- package/dist/contracts/{recording_royalty_pool → composition_royalty_pool_plugin}/witness.js +1 -1
- package/dist/contracts/composition_royalty_pool_plugin/witness.js.map +1 -0
- package/dist/contracts/cover_art/cover_art.d.ts +4 -4
- package/dist/contracts/cover_art/cover_art.d.ts.map +1 -1
- package/dist/contracts/cover_art/cover_art.js.map +1 -1
- package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts +4 -4
- package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts.map +1 -1
- package/dist/contracts/cover_art/deps/ori/walrus_data.js.map +1 -1
- package/dist/contracts/genre/genre.d.ts +6 -6
- package/dist/contracts/genre/genre.d.ts.map +1 -1
- package/dist/contracts/genre/genre.js.map +1 -1
- package/dist/contracts/miso_record/deps/std/type_name.d.ts +1 -1
- package/dist/contracts/miso_record/deps/std/type_name.d.ts.map +1 -1
- package/dist/contracts/miso_record/deps/std/type_name.js.map +1 -1
- package/dist/contracts/miso_record/deps/sui/vec_set.d.ts.map +1 -1
- package/dist/contracts/miso_record/deps/sui/vec_set.js.map +1 -1
- package/dist/contracts/miso_record/pressing.d.ts.map +1 -1
- package/dist/contracts/miso_record/pressing.js.map +1 -1
- package/dist/contracts/miso_record/record.d.ts +17 -17
- package/dist/contracts/miso_record/record.d.ts.map +1 -1
- package/dist/contracts/miso_record/record.js.map +1 -1
- package/dist/contracts/miso_record_shop/deps/std/type_name.d.ts +1 -1
- package/dist/contracts/miso_record_shop/deps/std/type_name.d.ts.map +1 -1
- package/dist/contracts/miso_record_shop/deps/std/type_name.js.map +1 -1
- package/dist/contracts/miso_record_shop/listing.d.ts +29 -29
- package/dist/contracts/miso_record_shop/listing.d.ts.map +1 -1
- package/dist/contracts/miso_record_shop/listing.js.map +1 -1
- package/dist/contracts/miso_record_shop/witness.d.ts +1 -1
- package/dist/contracts/miso_record_shop/witness.d.ts.map +1 -1
- package/dist/contracts/miso_record_shop/witness.js.map +1 -1
- package/dist/contracts/party_wallet/party_wallet.d.ts +41 -168
- package/dist/contracts/party_wallet/party_wallet.d.ts.map +1 -1
- package/dist/contracts/party_wallet/party_wallet.js +27 -152
- package/dist/contracts/party_wallet/party_wallet.js.map +1 -1
- package/dist/contracts/recording_advisory/recording_advisory.d.ts +3 -3
- package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -1
- package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -1
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -1
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -1
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -1
- package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -1
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -1
- package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -1
- package/dist/contracts/recording_credits/recording_credits.d.ts +20 -20
- package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -1
- package/dist/contracts/recording_credits/recording_credits.js.map +1 -1
- package/dist/contracts/recording_credits/recording_party_role.d.ts +30 -30
- package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -1
- package/dist/contracts/recording_credits/recording_party_role.js.map +1 -1
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +1 -1
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +1 -1
- package/dist/contracts/recording_language/deps/language_code/language_code.js.map +1 -1
- package/dist/contracts/recording_language/recording_language.d.ts +4 -4
- package/dist/contracts/recording_language/recording_language.d.ts.map +1 -1
- package/dist/contracts/recording_language/recording_language.js.map +1 -1
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts +4 -4
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts.map +1 -1
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js.map +1 -1
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +6 -6
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -1
- package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -1
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts +4 -4
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts.map +1 -1
- package/dist/contracts/recording_preview/deps/ori/walrus_data.js.map +1 -1
- package/dist/contracts/recording_preview/recording_preview.d.ts +6 -6
- package/dist/contracts/recording_preview/recording_preview.d.ts.map +1 -1
- package/dist/contracts/recording_preview/recording_preview.js.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +14 -100
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +11 -94
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts +92 -0
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.d.ts.map +1 -0
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js +85 -0
- package/dist/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.js.map +1 -0
- package/dist/contracts/{composition_royalty_pool → recording_royalty_pool_plugin}/witness.d.ts +1 -1
- package/dist/contracts/recording_royalty_pool_plugin/witness.d.ts.map +1 -0
- package/dist/contracts/{party_wallet → recording_royalty_pool_plugin}/witness.js +1 -1
- package/dist/contracts/recording_royalty_pool_plugin/witness.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/{0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78 → 0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a}/walrus_data.d.ts +7 -7
- package/dist/contracts/release_cover_art/deps/{0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78 → 0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a}/walrus_data.d.ts.map +1 -1
- package/dist/contracts/release_cover_art/deps/{0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78 → 0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a}/walrus_data.js +1 -1
- package/dist/contracts/release_cover_art/deps/{0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78 → 0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a}/walrus_data.js.map +1 -1
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +7 -7
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -1
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +1 -1
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -1
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -1
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -1
- package/dist/contracts/release_cover_art/release_cover_art.d.ts +23 -23
- package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -1
- package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -1
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -1
- package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -1
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -1
- package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -1
- package/dist/contracts/release_credits/release_credits.d.ts +10 -10
- package/dist/contracts/release_credits/release_credits.d.ts.map +1 -1
- package/dist/contracts/release_credits/release_credits.js.map +1 -1
- package/dist/contracts/release_description/release_description.d.ts +4 -4
- package/dist/contracts/release_description/release_description.d.ts.map +1 -1
- package/dist/contracts/release_description/release_description.js.map +1 -1
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +41 -42
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -1
- package/dist/contracts/release_dsp_link/release_dsp_link.js +4 -5
- package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -1
- package/dist/contracts/release_genre/deps/per_track/per_track.d.ts.map +1 -1
- package/dist/contracts/release_genre/deps/per_track/per_track.js.map +1 -1
- package/dist/contracts/release_genre/release_genre.d.ts +15 -15
- package/dist/contracts/release_genre/release_genre.d.ts.map +1 -1
- package/dist/contracts/release_genre/release_genre.js.map +1 -1
- package/dist/contracts/release_kind/release_kind.d.ts +4 -4
- package/dist/contracts/release_kind/release_kind.d.ts.map +1 -1
- package/dist/contracts/release_kind/release_kind.js.map +1 -1
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts +46 -59
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts.map +1 -1
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js +27 -48
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js.map +1 -1
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts +75 -0
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js +80 -0
- package/dist/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.js.map +1 -0
- package/dist/contracts/{recording_royalty_pool → release_revenue_distributor_plugin}/witness.d.ts +1 -1
- package/dist/contracts/release_revenue_distributor_plugin/witness.d.ts.map +1 -0
- package/dist/contracts/{composition_royalty_pool → release_revenue_distributor_plugin}/witness.js +1 -1
- package/dist/contracts/release_revenue_distributor_plugin/witness.js.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +5 -5
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -1
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -1
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts +1 -1
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts.map +1 -1
- package/dist/contracts/routed_stake/deps/std/type_name.js.map +1 -1
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts +1 -1
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts.map +1 -1
- package/dist/contracts/routed_stake/deps/sui/balance.js.map +1 -1
- package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts.map +1 -1
- package/dist/contracts/routed_stake/deps/sui/vec_map.js.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.d.ts +15 -15
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -1
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +1 -1
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -1
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +1 -1
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -1
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -1
- package/dist/contracts/royalty_pool/pool.d.ts +19 -19
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/pool.js.map +1 -1
- package/dist/contracts/royalty_pool/stake.d.ts +9 -9
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/stake.js.map +1 -1
- package/dist/contracts/vault/deps/sui/bag.d.ts +2 -2
- package/dist/contracts/vault/deps/sui/bag.d.ts.map +1 -1
- package/dist/contracts/vault/deps/sui/bag.js.map +1 -1
- package/dist/contracts/vault/deps/sui/borrow.d.ts.map +1 -1
- package/dist/contracts/vault/deps/sui/borrow.js.map +1 -1
- package/dist/contracts/vault/vault.d.ts +19 -93
- package/dist/contracts/vault/vault.d.ts.map +1 -1
- package/dist/contracts/vault/vault.js +16 -95
- package/dist/contracts/vault/vault.js.map +1 -1
- package/dist/contracts.d.ts +3 -0
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +4 -1
- package/dist/contracts.js.map +1 -1
- package/dist/deployments.d.ts +125 -79
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +111 -35
- package/dist/deployments.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +9 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +23 -0
- package/dist/internal.js.map +1 -1
- package/dist/publication.d.ts +1 -4
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +79 -60
- package/dist/publication.js.map +1 -1
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +9 -1
- package/dist/read/config.js.map +1 -1
- package/dist/vault.d.ts +42 -38
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +96 -169
- package/dist/vault.js.map +1 -1
- package/package.json +13 -10
- package/src/client.ts +291 -107
- package/src/contracts/composition_credits/composition_credits.ts +3 -2
- package/src/contracts/composition_credits/composition_party_role.ts +5 -4
- package/src/contracts/composition_credits/deps/miso_credit/credit.ts +1 -0
- package/src/contracts/composition_credits/deps/sui/vec_map.ts +1 -0
- package/src/contracts/composition_routed_stake/composition_routed_stake.ts +36 -146
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +20 -161
- package/src/contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.ts +165 -0
- package/src/contracts/{recording_royalty_pool → composition_royalty_pool_plugin}/witness.ts +2 -1
- package/src/contracts/cover_art/cover_art.ts +2 -1
- package/src/contracts/cover_art/deps/ori/walrus_data.ts +1 -0
- package/src/contracts/genre/genre.ts +3 -2
- package/src/contracts/miso_record/deps/std/type_name.ts +1 -0
- package/src/contracts/miso_record/deps/sui/vec_set.ts +1 -0
- package/src/contracts/miso_record/pressing.ts +1 -0
- package/src/contracts/miso_record/record.ts +1 -0
- package/src/contracts/miso_record_shop/deps/std/type_name.ts +1 -0
- package/src/contracts/miso_record_shop/listing.ts +1 -0
- package/src/contracts/miso_record_shop/witness.ts +1 -0
- package/src/contracts/party_wallet/party_wallet.ts +41 -256
- package/src/contracts/recording_advisory/recording_advisory.ts +4 -3
- package/src/contracts/recording_credits/deps/miso_credit/credit.ts +1 -0
- package/src/contracts/recording_credits/deps/sui/vec_map.ts +1 -0
- package/src/contracts/recording_credits/deps/sui/vec_set.ts +1 -0
- package/src/contracts/recording_credits/recording_credits.ts +3 -2
- package/src/contracts/recording_credits/recording_party_role.ts +5 -4
- package/src/contracts/recording_language/deps/language_code/language_code.ts +1 -0
- package/src/contracts/recording_language/recording_language.ts +5 -4
- package/src/contracts/recording_master_reference/deps/ori/walrus_data.ts +1 -0
- package/src/contracts/recording_master_reference/recording_master_reference.ts +6 -5
- package/src/contracts/recording_preview/deps/ori/walrus_data.ts +1 -0
- package/src/contracts/recording_preview/recording_preview.ts +2 -1
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +19 -162
- package/src/contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.ts +167 -0
- package/src/contracts/{party_wallet → recording_royalty_pool_plugin}/witness.ts +2 -1
- package/src/contracts/release_cover_art/deps/{0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78 → 0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a}/walrus_data.ts +2 -1
- package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +3 -2
- package/src/contracts/release_cover_art/deps/per_track/per_track.ts +3 -2
- package/src/contracts/release_cover_art/release_cover_art.ts +2 -1
- package/src/contracts/release_credits/deps/miso_credit/credit.ts +1 -0
- package/src/contracts/release_credits/deps/sui/vec_map.ts +1 -0
- package/src/contracts/release_credits/release_credits.ts +4 -3
- package/src/contracts/release_credits/release_party_role.ts +4 -4
- package/src/contracts/release_description/release_description.ts +6 -5
- package/src/contracts/release_dsp_link/release_dsp_link.ts +8 -8
- package/src/contracts/release_genre/deps/per_track/per_track.ts +3 -2
- package/src/contracts/release_genre/release_genre.ts +4 -3
- package/src/contracts/release_kind/release_kind.ts +5 -4
- package/src/contracts/release_revenue_distributor/release_revenue_distributor.ts +50 -85
- package/src/contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.ts +145 -0
- package/src/contracts/{composition_royalty_pool → release_revenue_distributor_plugin}/witness.ts +2 -1
- package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +1 -0
- package/src/contracts/routed_stake/deps/std/type_name.ts +1 -0
- package/src/contracts/routed_stake/deps/sui/balance.ts +1 -0
- package/src/contracts/routed_stake/deps/sui/vec_map.ts +1 -0
- package/src/contracts/routed_stake/routed_stake.ts +4 -3
- package/src/contracts/royalty_pool/deps/std/type_name.ts +1 -0
- package/src/contracts/royalty_pool/deps/sui/balance.ts +1 -0
- package/src/contracts/royalty_pool/deps/sui/vec_map.ts +1 -0
- package/src/contracts/royalty_pool/pool.ts +1 -0
- package/src/contracts/royalty_pool/stake.ts +1 -0
- package/src/contracts/vault/deps/sui/bag.ts +3 -2
- package/src/contracts/vault/deps/sui/borrow.ts +2 -1
- package/src/contracts/vault/vault.ts +27 -152
- package/src/contracts.ts +4 -1
- package/src/deployments.ts +185 -60
- package/src/index.ts +3 -0
- package/src/internal.ts +27 -0
- package/src/publication.ts +87 -69
- package/src/read/config.ts +12 -1
- package/src/vault.ts +150 -256
- package/dist/contracts/composition_routed_stake/witness.d.ts +0 -7
- package/dist/contracts/composition_routed_stake/witness.d.ts.map +0 -1
- package/dist/contracts/composition_routed_stake/witness.js +0 -9
- package/dist/contracts/composition_routed_stake/witness.js.map +0 -1
- package/dist/contracts/composition_royalty_pool/witness.d.ts.map +0 -1
- package/dist/contracts/composition_royalty_pool/witness.js.map +0 -1
- package/dist/contracts/party_wallet/witness.d.ts.map +0 -1
- package/dist/contracts/party_wallet/witness.js.map +0 -1
- package/dist/contracts/recording_royalty_pool/witness.d.ts.map +0 -1
- package/dist/contracts/recording_royalty_pool/witness.js.map +0 -1
- package/dist/contracts/release_revenue_distributor/witness.d.ts +0 -7
- package/dist/contracts/release_revenue_distributor/witness.d.ts.map +0 -1
- package/dist/contracts/release_revenue_distributor/witness.js +0 -9
- package/dist/contracts/release_revenue_distributor/witness.js.map +0 -1
- package/src/contracts/composition_routed_stake/witness.ts +0 -11
- package/src/contracts/release_revenue_distributor/witness.ts +0 -11
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A simple library that enables hot-potato-locked borrow mechanics.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* With Programmable transactions, it is possible to borrow a value within a
|
|
10
10
|
* transaction, use it and put back in the end. Hot-potato `Borrow` makes sure the
|
|
11
11
|
* object is returned and was not swapped for another one.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
15
|
+
import type {} from "@mysten/bcs";
|
|
15
16
|
import { MoveStruct } from '../../../utils/index.js';
|
|
16
17
|
const $moduleName = '0x2::borrow';
|
|
17
18
|
/** An object wrapping a `T` and providing the borrow API. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Generic capability custody and plugin authorization.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* `Vault<Cap>` is a permanent, deterministically addressed shell that can hold one
|
|
10
10
|
* exact capability in a Sui `Referent`. An authorized plugin receives the whole
|
|
11
11
|
* capability temporarily, paired with a hot-potato `Borrow` receipt that forces
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { MoveStruct, MoveTuple, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
18
18
|
import { bcs, type BcsType } from '@mysten/sui/bcs';
|
|
19
|
+
import type {} from "@mysten/bcs";
|
|
19
20
|
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
20
21
|
import * as borrow from './deps/sui/borrow.js';
|
|
21
22
|
import * as bag from './deps/sui/bag.js';
|
|
@@ -48,14 +49,9 @@ export const VaultAdminCap = new MoveStruct({ name: `${$moduleName}::VaultAdminC
|
|
|
48
49
|
export const VaultKey = new MoveTuple({ name: `${$moduleName}::VaultKey<phantom Cap>`, fields: [bcs.Address] });
|
|
49
50
|
export const VaultAdminCapKey = new MoveTuple({ name: `${$moduleName}::VaultAdminCapKey`, fields: [bcs.bool()] });
|
|
50
51
|
export const AuthorizedPluginKey = new MoveTuple({ name: `${$moduleName}::AuthorizedPluginKey<phantom Witness>`, fields: [bcs.bool()] });
|
|
51
|
-
export const VaultRegistryCreatedEvent = new MoveStruct({ name: `${$moduleName}::VaultRegistryCreatedEvent`, fields: {
|
|
52
|
-
registry_id: bcs.Address
|
|
53
|
-
} });
|
|
54
52
|
export const VaultCreatedEvent = new MoveStruct({ name: `${$moduleName}::VaultCreatedEvent<phantom Cap>`, fields: {
|
|
55
53
|
vault_id: bcs.Address,
|
|
56
|
-
|
|
57
|
-
cap_id: bcs.Address,
|
|
58
|
-
authorized_plugins_id: bcs.Address
|
|
54
|
+
cap_id: bcs.Address
|
|
59
55
|
} });
|
|
60
56
|
export const PluginAuthorizedEvent = new MoveStruct({ name: `${$moduleName}::PluginAuthorizedEvent<phantom Cap, phantom Witness>`, fields: {
|
|
61
57
|
vault_id: bcs.Address
|
|
@@ -64,12 +60,10 @@ export const PluginRevokedEvent = new MoveStruct({ name: `${$moduleName}::Plugin
|
|
|
64
60
|
vault_id: bcs.Address
|
|
65
61
|
} });
|
|
66
62
|
export const VaultCapabilityWithdrawnEvent = new MoveStruct({ name: `${$moduleName}::VaultCapabilityWithdrawnEvent<phantom Cap>`, fields: {
|
|
67
|
-
vault_id: bcs.Address
|
|
68
|
-
cap_id: bcs.Address
|
|
63
|
+
vault_id: bcs.Address
|
|
69
64
|
} });
|
|
70
65
|
export const VaultCapabilityRestoredEvent = new MoveStruct({ name: `${$moduleName}::VaultCapabilityRestoredEvent<phantom Cap>`, fields: {
|
|
71
|
-
vault_id: bcs.Address
|
|
72
|
-
cap_id: bcs.Address
|
|
66
|
+
vault_id: bcs.Address
|
|
73
67
|
} });
|
|
74
68
|
export interface NewArguments<Cap extends BcsType<any>> {
|
|
75
69
|
registry: RawTransactionArgument<string>;
|
|
@@ -131,39 +125,6 @@ export function share(options: ShareOptions) {
|
|
|
131
125
|
typeArguments: options.typeArguments
|
|
132
126
|
});
|
|
133
127
|
}
|
|
134
|
-
export interface TransferAdminCapArguments {
|
|
135
|
-
adminCap: RawTransactionArgument<string>;
|
|
136
|
-
recipient: RawTransactionArgument<string>;
|
|
137
|
-
}
|
|
138
|
-
export interface TransferAdminCapOptions {
|
|
139
|
-
package?: string;
|
|
140
|
-
arguments: TransferAdminCapArguments | [
|
|
141
|
-
adminCap: RawTransactionArgument<string>,
|
|
142
|
-
recipient: RawTransactionArgument<string>
|
|
143
|
-
];
|
|
144
|
-
typeArguments: [
|
|
145
|
-
string
|
|
146
|
-
];
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Transfer exclusive administration without exposing public freeze, share, or
|
|
150
|
-
* wrapping operations for the VaultAdminCap.
|
|
151
|
-
*/
|
|
152
|
-
export function transferAdminCap(options: TransferAdminCapOptions) {
|
|
153
|
-
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
154
|
-
const argumentsTypes = [
|
|
155
|
-
null,
|
|
156
|
-
'address'
|
|
157
|
-
] satisfies (string | null)[];
|
|
158
|
-
const parameterNames = ["adminCap", "recipient"];
|
|
159
|
-
return (tx: Transaction) => tx.moveCall({
|
|
160
|
-
package: packageAddress,
|
|
161
|
-
module: 'vault',
|
|
162
|
-
function: 'transfer_admin_cap',
|
|
163
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
164
|
-
typeArguments: options.typeArguments
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
128
|
export interface WithdrawCapArguments {
|
|
168
129
|
self: RawTransactionArgument<string>;
|
|
169
130
|
adminCap: RawTransactionArgument<string>;
|
|
@@ -250,12 +211,7 @@ export interface AuthorizePluginOptions<Witness extends BcsType<any>> {
|
|
|
250
211
|
string
|
|
251
212
|
];
|
|
252
213
|
}
|
|
253
|
-
/**
|
|
254
|
-
* Authorize the package identified by its canonical `witness::Witness` type.
|
|
255
|
-
*
|
|
256
|
-
* The witness is consumed here. A plugin should construct it with a package-only
|
|
257
|
-
* `witness::new()` function.
|
|
258
|
-
*/
|
|
214
|
+
/** Authorize the plugin identified by this witness type. */
|
|
259
215
|
export function authorizePlugin<Witness extends BcsType<any>>(options: AuthorizePluginOptions<Witness>) {
|
|
260
216
|
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
261
217
|
const argumentsTypes = [
|
|
@@ -322,8 +278,7 @@ export interface BorrowAsPluginOptions<Witness extends BcsType<any>> {
|
|
|
322
278
|
* Temporarily lend the full custodied capability to an authorized plugin.
|
|
323
279
|
*
|
|
324
280
|
* `Borrow` has no abilities, so the exact capability must be returned through
|
|
325
|
-
* `put_back` in this transaction.
|
|
326
|
-
* non-generic `0xpkg::witness::Witness` shape or is not authorized on this Vault.
|
|
281
|
+
* `put_back` in this transaction.
|
|
327
282
|
*/
|
|
328
283
|
export function borrowAsPlugin<Witness extends BcsType<any>>(options: BorrowAsPluginOptions<Witness>) {
|
|
329
284
|
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
@@ -408,13 +363,13 @@ export function putBack<Cap extends BcsType<any>>(options: PutBackOptions<Cap>)
|
|
|
408
363
|
typeArguments: options.typeArguments
|
|
409
364
|
});
|
|
410
365
|
}
|
|
411
|
-
export interface
|
|
366
|
+
export interface DerivedAddressArguments {
|
|
412
367
|
registry: RawTransactionArgument<string>;
|
|
413
368
|
capId: RawTransactionArgument<string>;
|
|
414
369
|
}
|
|
415
|
-
export interface
|
|
370
|
+
export interface DerivedAddressOptions {
|
|
416
371
|
package?: string;
|
|
417
|
-
arguments:
|
|
372
|
+
arguments: DerivedAddressArguments | [
|
|
418
373
|
registry: RawTransactionArgument<string>,
|
|
419
374
|
capId: RawTransactionArgument<string>
|
|
420
375
|
];
|
|
@@ -423,7 +378,7 @@ export interface VaultAddressOptions {
|
|
|
423
378
|
];
|
|
424
379
|
}
|
|
425
380
|
/** Derive the canonical Vault address for `cap_id` in this registry. */
|
|
426
|
-
export function
|
|
381
|
+
export function derivedAddress(options: DerivedAddressOptions) {
|
|
427
382
|
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
428
383
|
const argumentsTypes = [
|
|
429
384
|
null,
|
|
@@ -433,56 +388,7 @@ export function vaultAddress(options: VaultAddressOptions) {
|
|
|
433
388
|
return (tx: Transaction) => tx.moveCall({
|
|
434
389
|
package: packageAddress,
|
|
435
390
|
module: 'vault',
|
|
436
|
-
function: '
|
|
437
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
438
|
-
typeArguments: options.typeArguments
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
export interface VaultAdminCapAddressArguments {
|
|
442
|
-
vaultId: RawTransactionArgument<string>;
|
|
443
|
-
}
|
|
444
|
-
export interface VaultAdminCapAddressOptions {
|
|
445
|
-
package?: string;
|
|
446
|
-
arguments: VaultAdminCapAddressArguments | [
|
|
447
|
-
vaultId: RawTransactionArgument<string>
|
|
448
|
-
];
|
|
449
|
-
}
|
|
450
|
-
/** Derive the canonical VaultAdminCap address for a Vault ID. */
|
|
451
|
-
export function vaultAdminCapAddress(options: VaultAdminCapAddressOptions) {
|
|
452
|
-
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
453
|
-
const argumentsTypes = [
|
|
454
|
-
'0x2::object::ID'
|
|
455
|
-
] satisfies (string | null)[];
|
|
456
|
-
const parameterNames = ["vaultId"];
|
|
457
|
-
return (tx: Transaction) => tx.moveCall({
|
|
458
|
-
package: packageAddress,
|
|
459
|
-
module: 'vault',
|
|
460
|
-
function: 'vault_admin_cap_address',
|
|
461
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
export interface VaultIdArguments {
|
|
465
|
-
self: RawTransactionArgument<string>;
|
|
466
|
-
}
|
|
467
|
-
export interface VaultIdOptions {
|
|
468
|
-
package?: string;
|
|
469
|
-
arguments: VaultIdArguments | [
|
|
470
|
-
self: RawTransactionArgument<string>
|
|
471
|
-
];
|
|
472
|
-
typeArguments: [
|
|
473
|
-
string
|
|
474
|
-
];
|
|
475
|
-
}
|
|
476
|
-
export function vaultId(options: VaultIdOptions) {
|
|
477
|
-
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
478
|
-
const argumentsTypes = [
|
|
479
|
-
null
|
|
480
|
-
] satisfies (string | null)[];
|
|
481
|
-
const parameterNames = ["self"];
|
|
482
|
-
return (tx: Transaction) => tx.moveCall({
|
|
483
|
-
package: packageAddress,
|
|
484
|
-
module: 'vault',
|
|
485
|
-
function: 'vault_id',
|
|
391
|
+
function: 'derived_address',
|
|
486
392
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
487
393
|
typeArguments: options.typeArguments
|
|
488
394
|
});
|
|
@@ -514,12 +420,12 @@ export function capId(options: CapIdOptions) {
|
|
|
514
420
|
typeArguments: options.typeArguments
|
|
515
421
|
});
|
|
516
422
|
}
|
|
517
|
-
export interface
|
|
423
|
+
export interface IsActiveArguments {
|
|
518
424
|
self: RawTransactionArgument<string>;
|
|
519
425
|
}
|
|
520
|
-
export interface
|
|
426
|
+
export interface IsActiveOptions {
|
|
521
427
|
package?: string;
|
|
522
|
-
arguments:
|
|
428
|
+
arguments: IsActiveArguments | [
|
|
523
429
|
self: RawTransactionArgument<string>
|
|
524
430
|
];
|
|
525
431
|
typeArguments: [
|
|
@@ -527,39 +433,12 @@ export interface IsOccupiedOptions {
|
|
|
527
433
|
];
|
|
528
434
|
}
|
|
529
435
|
/**
|
|
530
|
-
* Whether
|
|
436
|
+
* Whether this Vault is active.
|
|
531
437
|
*
|
|
532
|
-
*
|
|
533
|
-
* transaction-local lease even though
|
|
438
|
+
* An active Vault has an outer Referent. It remains active during a
|
|
439
|
+
* transaction-local lease even though that Referent is temporarily empty.
|
|
534
440
|
*/
|
|
535
|
-
export function
|
|
536
|
-
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
537
|
-
const argumentsTypes = [
|
|
538
|
-
null
|
|
539
|
-
] satisfies (string | null)[];
|
|
540
|
-
const parameterNames = ["self"];
|
|
541
|
-
return (tx: Transaction) => tx.moveCall({
|
|
542
|
-
package: packageAddress,
|
|
543
|
-
module: 'vault',
|
|
544
|
-
function: 'is_occupied',
|
|
545
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
546
|
-
typeArguments: options.typeArguments
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
export interface AuthorizedPluginsIdArguments {
|
|
550
|
-
self: RawTransactionArgument<string>;
|
|
551
|
-
}
|
|
552
|
-
export interface AuthorizedPluginsIdOptions {
|
|
553
|
-
package?: string;
|
|
554
|
-
arguments: AuthorizedPluginsIdArguments | [
|
|
555
|
-
self: RawTransactionArgument<string>
|
|
556
|
-
];
|
|
557
|
-
typeArguments: [
|
|
558
|
-
string
|
|
559
|
-
];
|
|
560
|
-
}
|
|
561
|
-
/** The ID under which `AuthorizedPluginKey` records are dynamic fields. */
|
|
562
|
-
export function authorizedPluginsId(options: AuthorizedPluginsIdOptions) {
|
|
441
|
+
export function isActive(options: IsActiveOptions) {
|
|
563
442
|
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
564
443
|
const argumentsTypes = [
|
|
565
444
|
null
|
|
@@ -568,24 +447,25 @@ export function authorizedPluginsId(options: AuthorizedPluginsIdOptions) {
|
|
|
568
447
|
return (tx: Transaction) => tx.moveCall({
|
|
569
448
|
package: packageAddress,
|
|
570
449
|
module: 'vault',
|
|
571
|
-
function: '
|
|
450
|
+
function: 'is_active',
|
|
572
451
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
573
452
|
typeArguments: options.typeArguments
|
|
574
453
|
});
|
|
575
454
|
}
|
|
576
|
-
export interface
|
|
455
|
+
export interface AuthorizedPluginsArguments {
|
|
577
456
|
self: RawTransactionArgument<string>;
|
|
578
457
|
}
|
|
579
|
-
export interface
|
|
458
|
+
export interface AuthorizedPluginsOptions {
|
|
580
459
|
package?: string;
|
|
581
|
-
arguments:
|
|
460
|
+
arguments: AuthorizedPluginsArguments | [
|
|
582
461
|
self: RawTransactionArgument<string>
|
|
583
462
|
];
|
|
584
463
|
typeArguments: [
|
|
585
464
|
string
|
|
586
465
|
];
|
|
587
466
|
}
|
|
588
|
-
|
|
467
|
+
/** The immutable Bag containing typed plugin-authorization records. */
|
|
468
|
+
export function authorizedPlugins(options: AuthorizedPluginsOptions) {
|
|
589
469
|
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
590
470
|
const argumentsTypes = [
|
|
591
471
|
null
|
|
@@ -594,7 +474,7 @@ export function authorizedPluginCount(options: AuthorizedPluginCountOptions) {
|
|
|
594
474
|
return (tx: Transaction) => tx.moveCall({
|
|
595
475
|
package: packageAddress,
|
|
596
476
|
module: 'vault',
|
|
597
|
-
function: '
|
|
477
|
+
function: 'authorized_plugins',
|
|
598
478
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
599
479
|
typeArguments: options.typeArguments
|
|
600
480
|
});
|
|
@@ -612,12 +492,7 @@ export interface IsPluginAuthorizedOptions {
|
|
|
612
492
|
string
|
|
613
493
|
];
|
|
614
494
|
}
|
|
615
|
-
/**
|
|
616
|
-
* Returns whether this witness type has an authorization record.
|
|
617
|
-
*
|
|
618
|
-
* This deliberately does not validate the witness shape: arbitrary types simply
|
|
619
|
-
* report false, while `authorize_plugin` is the only way to add one.
|
|
620
|
-
*/
|
|
495
|
+
/** Returns whether this witness type has an authorization record. */
|
|
621
496
|
export function isPluginAuthorized(options: IsPluginAuthorizedOptions) {
|
|
622
497
|
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
623
498
|
const argumentsTypes = [
|
package/src/contracts.ts
CHANGED
|
@@ -15,7 +15,7 @@ export * as record from "./contracts/miso_record/record.ts";
|
|
|
15
15
|
export * as pressing from "./contracts/miso_record/pressing.ts";
|
|
16
16
|
export * as listing from "./contracts/miso_record_shop/listing.ts";
|
|
17
17
|
|
|
18
|
-
// Generic royalty-pool primitive
|
|
18
|
+
// Generic royalty-pool primitive, raw-cap Actions, and the three safe crank plugins.
|
|
19
19
|
export * as royaltyPool from "./contracts/royalty_pool/pool.ts";
|
|
20
20
|
export * as royaltyPoolStake from "./contracts/royalty_pool/stake.ts";
|
|
21
21
|
export * as vault from "./contracts/vault/vault.ts";
|
|
@@ -24,6 +24,9 @@ export * as recordingRoyaltyPool from "./contracts/recording_royalty_pool/record
|
|
|
24
24
|
export * as partyWallet from "./contracts/party_wallet/party_wallet.ts";
|
|
25
25
|
export * as routedStake from "./contracts/routed_stake/routed_stake.ts";
|
|
26
26
|
export * as compositionRoutedStake from "./contracts/composition_routed_stake/composition_routed_stake.ts";
|
|
27
|
+
export * as compositionRoyaltyPoolPlugin from "./contracts/composition_royalty_pool_plugin/composition_royalty_pool_plugin.ts";
|
|
28
|
+
export * as recordingRoyaltyPoolPlugin from "./contracts/recording_royalty_pool_plugin/recording_royalty_pool_plugin.ts";
|
|
29
|
+
export * as releaseRevenueDistributorPlugin from "./contracts/release_revenue_distributor_plugin/release_revenue_distributor_plugin.ts";
|
|
27
30
|
|
|
28
31
|
// Cover art (the CoverArt value type + the release attachment extension).
|
|
29
32
|
export * as coverArt from "./contracts/cover_art/cover_art.ts";
|
package/src/deployments.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import type { MisoDeployment, MisoNetwork } from "@misonetwork/sdk/deployments";
|
|
5
5
|
import { MISO_DEPLOYMENTS } from "@misonetwork/sdk/deployments";
|
|
6
6
|
import { normalizeSuiObjectId } from "@mysten/sui/utils";
|
|
7
|
+
import { immutableSnapshot } from "./internal.ts";
|
|
7
8
|
|
|
8
9
|
/** Primary Record sales are unavailable on legacy deployments until both new
|
|
9
10
|
* immutable packages have been freshly published and verified. */
|
|
@@ -61,6 +62,125 @@ export function requireRecordSalesDeployment(
|
|
|
61
62
|
return deployment;
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
/** Vault custody and the exact Action/plugin ABI deployed alongside it. */
|
|
66
|
+
export type OperationsDeployment =
|
|
67
|
+
| {
|
|
68
|
+
readonly status: "unavailable";
|
|
69
|
+
readonly reason: string;
|
|
70
|
+
/** Historical identities are metadata only and are never executable ABIs. */
|
|
71
|
+
readonly legacy?: {
|
|
72
|
+
readonly vaultPackageId?: string;
|
|
73
|
+
readonly vaultRegistryId?: string;
|
|
74
|
+
readonly packageIds?: Readonly<Record<string, string>>;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
| {
|
|
78
|
+
readonly status: "available";
|
|
79
|
+
readonly vault: {
|
|
80
|
+
readonly packageId: string;
|
|
81
|
+
readonly registryId: string;
|
|
82
|
+
};
|
|
83
|
+
readonly actions: {
|
|
84
|
+
readonly compositionRoyaltyPool: string;
|
|
85
|
+
readonly recordingRoyaltyPool: string;
|
|
86
|
+
readonly partyWallet: string;
|
|
87
|
+
readonly compositionRoutedStake: string;
|
|
88
|
+
readonly releaseRevenueDistributor: string;
|
|
89
|
+
};
|
|
90
|
+
readonly plugins: {
|
|
91
|
+
readonly compositionRoyaltyPool: string;
|
|
92
|
+
readonly recordingRoyaltyPool: string;
|
|
93
|
+
readonly releaseRevenueDistributor: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export class OperationsUnavailableError extends Error {
|
|
98
|
+
override readonly name = "OperationsUnavailableError";
|
|
99
|
+
constructor(readonly reason: string) {
|
|
100
|
+
super(`@misofm/sdk: Vault operations are unavailable: ${reason}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type AvailableOperationsDeployment = Extract<
|
|
105
|
+
OperationsDeployment,
|
|
106
|
+
{ status: "available" }
|
|
107
|
+
>;
|
|
108
|
+
|
|
109
|
+
function canonicalObjectId(value: unknown): value is string {
|
|
110
|
+
if (typeof value !== "string" || !/^0x[0-9a-f]{64}$/.test(value)) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
return normalizeSuiObjectId(value) === value;
|
|
115
|
+
} catch {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Require one complete, non-aliased operations deployment.
|
|
122
|
+
*
|
|
123
|
+
* This validates only a complete canonical, pairwise-distinct structural set.
|
|
124
|
+
* It cannot establish provenance for arbitrary caller-supplied custom IDs; the
|
|
125
|
+
* caller owns that provenance. The bundled frozen map below is generated from
|
|
126
|
+
* one verified immutable admin export.
|
|
127
|
+
*/
|
|
128
|
+
export function requireOperationsDeployment(
|
|
129
|
+
deployment: OperationsDeployment | undefined,
|
|
130
|
+
): AvailableOperationsDeployment {
|
|
131
|
+
if (!deployment || deployment.status !== "available") {
|
|
132
|
+
throw new OperationsUnavailableError(
|
|
133
|
+
deployment?.reason ?? "no Vault operations deployment was configured",
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const candidate = deployment as Partial<AvailableOperationsDeployment>;
|
|
138
|
+
const vault = candidate.vault as
|
|
139
|
+
| Partial<AvailableOperationsDeployment["vault"]>
|
|
140
|
+
| undefined;
|
|
141
|
+
const actions = candidate.actions as
|
|
142
|
+
| Partial<AvailableOperationsDeployment["actions"]>
|
|
143
|
+
| undefined;
|
|
144
|
+
const plugins = candidate.plugins as
|
|
145
|
+
| Partial<AvailableOperationsDeployment["plugins"]>
|
|
146
|
+
| undefined;
|
|
147
|
+
const packageEntries = [
|
|
148
|
+
["vault.packageId", vault?.packageId],
|
|
149
|
+
["actions.compositionRoyaltyPool", actions?.compositionRoyaltyPool],
|
|
150
|
+
["actions.recordingRoyaltyPool", actions?.recordingRoyaltyPool],
|
|
151
|
+
["actions.partyWallet", actions?.partyWallet],
|
|
152
|
+
["actions.compositionRoutedStake", actions?.compositionRoutedStake],
|
|
153
|
+
["actions.releaseRevenueDistributor", actions?.releaseRevenueDistributor],
|
|
154
|
+
["plugins.compositionRoyaltyPool", plugins?.compositionRoyaltyPool],
|
|
155
|
+
["plugins.recordingRoyaltyPool", plugins?.recordingRoyaltyPool],
|
|
156
|
+
["plugins.releaseRevenueDistributor", plugins?.releaseRevenueDistributor],
|
|
157
|
+
] as const;
|
|
158
|
+
|
|
159
|
+
for (const [field, id] of packageEntries) {
|
|
160
|
+
if (!canonicalObjectId(id)) {
|
|
161
|
+
throw new OperationsUnavailableError(
|
|
162
|
+
`${field} must be a canonical 32-byte Sui package ID`,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (!canonicalObjectId(vault?.registryId)) {
|
|
167
|
+
throw new OperationsUnavailableError(
|
|
168
|
+
"vault.registryId must be a canonical 32-byte Sui object ID",
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const identities = [
|
|
173
|
+
...packageEntries.map(([, id]) => id as string),
|
|
174
|
+
vault.registryId,
|
|
175
|
+
];
|
|
176
|
+
if (new Set(identities).size !== identities.length) {
|
|
177
|
+
throw new OperationsUnavailableError(
|
|
178
|
+
"the Vault registry object and all nine package IDs must be distinct",
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
return deployment;
|
|
182
|
+
}
|
|
183
|
+
|
|
64
184
|
/** Complete on-chain identity used by the Miso platform SDK on one network. */
|
|
65
185
|
export interface MisoPlatformDeployment {
|
|
66
186
|
/** Network name this immutable deployment set belongs to. */
|
|
@@ -70,6 +190,8 @@ export interface MisoPlatformDeployment {
|
|
|
70
190
|
/** The complete protocol and Party deployment this platform build targets. */
|
|
71
191
|
readonly protocol: MisoDeployment;
|
|
72
192
|
readonly recordSales: RecordSalesDeployment;
|
|
193
|
+
/** Fail-closed, structurally complete Vault/Action/plugin identity set. */
|
|
194
|
+
readonly operations: OperationsDeployment;
|
|
73
195
|
readonly packages: {
|
|
74
196
|
readonly minato: string;
|
|
75
197
|
readonly credit: string;
|
|
@@ -78,18 +200,8 @@ export interface MisoPlatformDeployment {
|
|
|
78
200
|
readonly releaseCredits: string;
|
|
79
201
|
/** Base royalty-pool value library. */
|
|
80
202
|
readonly royaltyPool: string;
|
|
81
|
-
/**
|
|
82
|
-
readonly vault: string;
|
|
83
|
-
/** Vault plugin that creates and cranks Composition royalty pools. */
|
|
84
|
-
readonly vaultCompositionRoyaltyPoolPlugin: string;
|
|
85
|
-
/** Vault plugin that creates and cranks Recording royalty pools. */
|
|
86
|
-
readonly vaultRecordingRoyaltyPoolPlugin: string;
|
|
87
|
-
/** Vault plugin that manages a Party's royalty-bearing wallet. */
|
|
88
|
-
readonly vaultPartyWalletPlugin: string;
|
|
89
|
-
/** Generic stake wrapper used by the composition routed-stake plugin. */
|
|
203
|
+
/** Generic stake wrapper used by composition routed-stake operations. */
|
|
90
204
|
readonly routedStake: string;
|
|
91
|
-
/** Vault plugin for Composition-owned Recording-share staking. */
|
|
92
|
-
readonly vaultCompositionRoutedStakePlugin: string;
|
|
93
205
|
/** Cover-art value type used by the release cover extension. */
|
|
94
206
|
readonly coverArt: string;
|
|
95
207
|
readonly releaseCoverArt: string;
|
|
@@ -99,8 +211,6 @@ export interface MisoPlatformDeployment {
|
|
|
99
211
|
readonly releaseDspLink: string;
|
|
100
212
|
readonly releaseGenre: string;
|
|
101
213
|
readonly releaseKind: string;
|
|
102
|
-
/** Vault plugin that routes Release revenue into Recording addresses. */
|
|
103
|
-
readonly vaultReleaseRevenueDistributorPlugin: string;
|
|
104
214
|
readonly recordingAdvisory: string;
|
|
105
215
|
readonly recordingLanguage: string;
|
|
106
216
|
readonly recordingMasterReference: string;
|
|
@@ -114,8 +224,6 @@ export interface MisoPlatformDeployment {
|
|
|
114
224
|
};
|
|
115
225
|
readonly objects: {
|
|
116
226
|
readonly releaseRegistry: string;
|
|
117
|
-
/** Shared parent used to derive canonical Vault object ids. */
|
|
118
|
-
readonly vaultRegistry: string;
|
|
119
227
|
/** Shared parent used to derive canonical Genre object ids. */
|
|
120
228
|
readonly genreRegistry: string;
|
|
121
229
|
/** Frozen namespace object embedded in Recording-session Seal identities. */
|
|
@@ -132,86 +240,103 @@ export interface MisoPlatformDeployment {
|
|
|
132
240
|
* IDs come only from verified immutable deployment output.
|
|
133
241
|
* Consumers may still pass an explicit complete deployment for custom networks.
|
|
134
242
|
*/
|
|
135
|
-
export const MISO_PLATFORM_DEPLOYMENTS = {
|
|
243
|
+
export const MISO_PLATFORM_DEPLOYMENTS = immutableSnapshot({
|
|
136
244
|
testnet: {
|
|
137
245
|
network: "testnet",
|
|
138
246
|
chainIdentifier: "69WiPg3DAQiwdxfncX6wYQ2siKwAe6L9BZthQea3JNMD",
|
|
139
247
|
protocol: MISO_DEPLOYMENTS.testnet,
|
|
140
248
|
recordSales: {
|
|
141
|
-
status: "
|
|
142
|
-
|
|
143
|
-
"
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
249
|
+
status: "available",
|
|
250
|
+
recordPackageId:
|
|
251
|
+
"0x75e5fa520c39322e0526ff56a495f9a2a88d097e2df7902d94e58a9a12831e76",
|
|
252
|
+
recordShopPackageId:
|
|
253
|
+
"0x2b97df3773040bb2cffd8c329bfd57f05f1fd2defb6ab156050ba1ae540d5d2a",
|
|
254
|
+
},
|
|
255
|
+
operations: {
|
|
256
|
+
status: "available",
|
|
257
|
+
vault: {
|
|
258
|
+
packageId:
|
|
259
|
+
"0xaed1aa729452c77f4c62882b73317851d628c30af55355c81eb1c93d3d3276ac",
|
|
260
|
+
registryId:
|
|
261
|
+
"0x5de3c379a15e4609260a94ace3d186cc466366fc6aebafe5663c016057b6a2d6",
|
|
262
|
+
},
|
|
263
|
+
actions: {
|
|
264
|
+
compositionRoyaltyPool:
|
|
265
|
+
"0x46b9b193255f28ec5190e8cd37ae85397c9110266da73a4a7a94fcb6e990155b",
|
|
266
|
+
recordingRoyaltyPool:
|
|
267
|
+
"0x78964bdc2dd7fad943633542edf5a1c9be38b1d2d25de1cc6cca64757c7d037a",
|
|
268
|
+
partyWallet:
|
|
269
|
+
"0x934f15715f725e3eed2acaeda5c717b6641dce4bb88b7670db26249cb6646728",
|
|
270
|
+
compositionRoutedStake:
|
|
271
|
+
"0xb1539001eaf32350d7044acb03092dcbd5a366e708d959aece0cca683f7f57fc",
|
|
272
|
+
releaseRevenueDistributor:
|
|
273
|
+
"0xd19dde6c20fa41092c9645e8300284cf1a268ab5ed3b3c7a2a12593672203b45",
|
|
274
|
+
},
|
|
275
|
+
plugins: {
|
|
276
|
+
compositionRoyaltyPool:
|
|
277
|
+
"0xad3525b86fad3f2aaaa3fdf0430d690efba249e378b1b89ed8180ecbc5d89392",
|
|
278
|
+
recordingRoyaltyPool:
|
|
279
|
+
"0x2adfc809152c5c8cf07f0e466d881b62d48c7da3ae2e787c0471deb867a6a385",
|
|
280
|
+
releaseRevenueDistributor:
|
|
281
|
+
"0x4f1da8c04ec53749f6cf6e8d2d48701fd72654078240050e20e41dc774f93d46",
|
|
149
282
|
},
|
|
150
283
|
},
|
|
151
284
|
packages: {
|
|
152
285
|
minato:
|
|
153
|
-
"
|
|
286
|
+
"0xcdf58ed7e4580118a6a3f2a8077abffe633c551b2f19e95ce01685d42f90b8d9",
|
|
154
287
|
credit:
|
|
155
|
-
"
|
|
288
|
+
"0xc5a82310ce313af8f0ec18a4e564af11971b360db9e2ae686fef86fb2297a9a9",
|
|
156
289
|
compositionCredits:
|
|
157
|
-
"
|
|
290
|
+
"0xc58ac5d69740866f6514f68f2e9c86b1d069d819ad0bcf5384b6aaa66e0fbf53",
|
|
158
291
|
recordingCredits:
|
|
159
|
-
"
|
|
292
|
+
"0x7bafa653854f0820d911b8f6aa0aac3b131163c254b0021330881b77206d4d79",
|
|
160
293
|
releaseCredits:
|
|
161
|
-
"
|
|
294
|
+
"0x47ccd23c669b023b8678193e7748235916e16e737fdd8ba48b131ded29c76a00",
|
|
162
295
|
royaltyPool:
|
|
163
|
-
"
|
|
164
|
-
vault:
|
|
165
|
-
"0xfe396139d500e4381adefea72da2e0157c54ee5c38cc8bdcbc4edd551d043230",
|
|
166
|
-
vaultCompositionRoyaltyPoolPlugin:
|
|
167
|
-
"0xbfd9b6c9d3e5635c0beb5472b45566b92f509ed67ae4a661bf928c359f3b438f",
|
|
168
|
-
vaultRecordingRoyaltyPoolPlugin:
|
|
169
|
-
"0x1643c188790a7e756310ce779b279159356a9bf7fe8237edf1e5b24a15422615",
|
|
170
|
-
vaultPartyWalletPlugin:
|
|
171
|
-
"0x0d869fe4291fec02821aed40c38349bac8547f0c690316f2a1a2273ac1f317ed",
|
|
296
|
+
"0xecaa5a29cf8e110face3b80f0e4a5554e8c80edd8eda0983ed2f8015367eecca",
|
|
172
297
|
routedStake:
|
|
173
|
-
"
|
|
174
|
-
vaultCompositionRoutedStakePlugin:
|
|
175
|
-
"0xf86994ebd0dabecda1b14efc02a2e71b3219a7c043841ad8097dc3683bd088dd",
|
|
298
|
+
"0x30ed387d3fea69579ddb34d011fa6e1416580bfb3ee6587aabf103fb0d17bced",
|
|
176
299
|
coverArt:
|
|
177
|
-
"
|
|
300
|
+
"0x2b811f82d33cf6a9448adb11a598f6b04c14970cfc8e2982cde1d468e8e7d4a4",
|
|
178
301
|
releaseCoverArt:
|
|
179
|
-
"
|
|
302
|
+
"0x4f0a8736685f6b1ddbcd0bddcd7aae2d072aa3d4043efc0ad4042a7786068999",
|
|
180
303
|
genre:
|
|
181
|
-
"
|
|
304
|
+
"0x01e58dbc76c15c9ac137dabac1823ebd6ef81efd563c5121000bc11c51a47cc7",
|
|
182
305
|
releaseDescription:
|
|
183
|
-
"
|
|
306
|
+
"0x50f5acf7c0c05cdc7656072fd1bfc5ee76d02beabeae090103734b2d75118fa3",
|
|
184
307
|
releaseDspLink:
|
|
185
|
-
"
|
|
308
|
+
"0x9ca9ad8cab49c4897cd3cb89628b771ee4f10831ddc273036837751a5339d02a",
|
|
186
309
|
releaseGenre:
|
|
187
|
-
"
|
|
310
|
+
"0xfb73b04be2f72704ec5e6a1035bfab108e5ee2a72e72c0505f999291e23219bd",
|
|
188
311
|
releaseKind:
|
|
189
|
-
"
|
|
190
|
-
vaultReleaseRevenueDistributorPlugin:
|
|
191
|
-
"0x2172dc326fbf226b6cf6eed610f217fb0ff2682d1938e8089f4d6ce21a4999b5",
|
|
312
|
+
"0xfb2e5790f0577aca3ac8ddd672c4c58ef1e49ef1c3dfe14fb9676aaabf769169",
|
|
192
313
|
recordingAdvisory:
|
|
193
|
-
"
|
|
314
|
+
"0x23abf3f248466c08edc3349b202d6e809064c0e52098ff290cef1fdc51d5942e",
|
|
194
315
|
recordingLanguage:
|
|
195
|
-
"
|
|
316
|
+
"0xb3e1c578638a79acc7ab573c994206047ad8ef76893f9c5c987887c5b10a5c68",
|
|
196
317
|
recordingMasterReference:
|
|
197
|
-
"
|
|
318
|
+
"0x92a752854b80a6103721743125ee48223b577a023fe360e25d3aa695462a6d15",
|
|
319
|
+
recordingEngineSession:
|
|
320
|
+
"0xdd8f817a221e2acd5a4e6f34d0192d8e0dbddeb76c2dff2fdc82991cb4feb6c6",
|
|
321
|
+
recordSealPolicy:
|
|
322
|
+
"0xfa22d0678eaec39ad36b74c2c5439d574292e8fb19a9a15272733267499d5351",
|
|
198
323
|
recordingPreview:
|
|
199
|
-
"
|
|
200
|
-
ori: "
|
|
324
|
+
"0x2be8405f6b77a30d6942cb240c0d804d608ef761395e6f861b71d9ae3c98f997",
|
|
325
|
+
ori: "0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a",
|
|
201
326
|
},
|
|
202
327
|
objects: {
|
|
203
328
|
releaseRegistry:
|
|
204
|
-
"
|
|
205
|
-
vaultRegistry:
|
|
206
|
-
"0xee17744a0c6f71bbde98d0c2b4cab58929000fd2f65e28a4676164d34758584b",
|
|
329
|
+
"0x452c9904677a1bbf92d4e07d86d2c3eb038c47595b0e17a23756f03887eb2a2a",
|
|
207
330
|
genreRegistry:
|
|
208
|
-
"
|
|
331
|
+
"0xda4cc070da1a71d43387973027a7230587a1b9c829d37c2af4a3adbc15fdb8a8",
|
|
332
|
+
recordGate:
|
|
333
|
+
"0x8fd51c8b31bb6012fb03d2be39ed7b9f0f581329b6b338c60c209110cc659f31",
|
|
209
334
|
},
|
|
210
335
|
legacy: {
|
|
211
336
|
releaseCoverArtPackages: [],
|
|
212
337
|
},
|
|
213
338
|
},
|
|
214
|
-
} as const satisfies Partial<Record<MisoNetwork, MisoPlatformDeployment>>;
|
|
339
|
+
} as const) satisfies Partial<Record<MisoNetwork, MisoPlatformDeployment>>;
|
|
215
340
|
|
|
216
341
|
/** Resolve a bundled platform deployment, failing closed when it is unavailable. */
|
|
217
342
|
export function getMisoPlatformDeployment(
|