@misonetwork/sdk 0.6.0 → 0.8.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 +181 -124
- package/dist/client.d.ts +1229 -15
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +43 -21
- 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 +17 -39
- package/dist/contracts/miso/composition.d.ts.map +1 -1
- package/dist/contracts/miso/composition.js +18 -39
- 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 +44 -19
- package/dist/contracts/miso/recording.d.ts.map +1 -1
- package/dist/contracts/miso/recording.js +46 -20
- package/dist/contracts/miso/recording.js.map +1 -1
- package/dist/contracts/miso/release.d.ts +63 -37
- package/dist/contracts/miso/release.d.ts.map +1 -1
- package/dist/contracts/miso/release.js +65 -38
- package/dist/contracts/miso/release.js.map +1 -1
- package/dist/contracts/miso/track.d.ts +41 -10
- package/dist/contracts/miso/track.d.ts.map +1 -1
- package/dist/contracts/miso/track.js +44 -10
- package/dist/contracts/miso/track.js.map +1 -1
- 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/release_snapshot_bundle/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +91 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +1 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +91 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.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 +356 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.js +311 -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 +394 -0
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/pool.js +387 -0
- package/dist/contracts/royalty_pool/pool.js.map +1 -0
- package/dist/contracts/royalty_pool/stake.d.ts +202 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/stake.js +197 -0
- package/dist/contracts/royalty_pool/stake.js.map +1 -0
- package/dist/contracts.d.ts +37 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +42 -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 +119 -11
- package/dist/deployments.js.map +1 -1
- package/dist/events.d.ts +1081 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +124 -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 +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -0
- 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 +159 -0
- package/dist/packages.d.ts.map +1 -0
- package/dist/packages.js +179 -0
- package/dist/packages.js.map +1 -0
- package/dist/parsers.d.ts +5 -2
- package/dist/parsers.d.ts.map +1 -1
- package/dist/parsers.js +19 -7
- package/dist/parsers.js.map +1 -1
- 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 -12
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +124 -14
- package/dist/transactions.js.map +1 -1
- package/dist/types.d.ts +35 -8
- 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 +14 -4
- package/src/client.ts +57 -25
- 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 +24 -61
- package/src/contracts/miso/deps/bps/bps.ts +3 -3
- package/src/contracts/miso/recording.ts +69 -32
- package/src/contracts/miso/release.ts +103 -67
- package/src/contracts/miso/track.ts +56 -13
- 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/release_snapshot_bundle/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +124 -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 +508 -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 +613 -0
- package/src/contracts/royalty_pool/stake.ts +317 -0
- package/src/contracts.ts +59 -6
- package/src/deployments.ts +160 -22
- package/src/events.ts +129 -0
- package/src/execute.ts +0 -4
- package/src/index.ts +6 -3
- package/src/internal.ts +2 -4
- package/src/numeric.ts +25 -0
- package/src/packages.ts +251 -0
- package/src/parsers.ts +32 -11
- package/src/queries.ts +227 -25
- package/src/transactions.ts +255 -23
- package/src/types.ts +37 -9
- package/src/view.ts +12 -6
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveEnum, MoveStruct, MoveTuple } from '../../../utils/index.ts';
|
|
5
|
+
/**
|
|
6
|
+
* Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
|
|
7
|
+
* Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
|
|
8
|
+
* blob and can never be the direct product of an encryption.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Confidentiality: MoveEnum<{
|
|
11
|
+
/** The blob is stored in the clear. */
|
|
12
|
+
Unencrypted: null;
|
|
13
|
+
/**
|
|
14
|
+
* The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
|
|
15
|
+
* — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
|
|
16
|
+
* itself a Seal `EncryptedObject`, which already carries the decryption-policy
|
|
17
|
+
* package id, so no separate policy field is stored here. Decryption is gated by
|
|
18
|
+
* that policy package's `seal_approve`, not by this library.
|
|
19
|
+
*/
|
|
20
|
+
Encrypted: MoveStruct<{
|
|
21
|
+
dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
22
|
+
length: number;
|
|
23
|
+
}, string>;
|
|
24
|
+
}, "Confidentiality.Encrypted">;
|
|
25
|
+
}, "ori::walrus_data::Confidentiality">;
|
|
26
|
+
/** Represents either a standalone Walrus blob or a patch within a quilt. */
|
|
27
|
+
export declare const WalrusData: MoveEnum<{
|
|
28
|
+
/** A standalone Walrus blob. Fields: blob_id, confidentiality. */
|
|
29
|
+
Blob: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, MoveEnum<{
|
|
30
|
+
/** The blob is stored in the clear. */
|
|
31
|
+
Unencrypted: null;
|
|
32
|
+
/**
|
|
33
|
+
* The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
|
|
34
|
+
* — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
|
|
35
|
+
* itself a Seal `EncryptedObject`, which already carries the decryption-policy
|
|
36
|
+
* package id, so no separate policy field is stored here. Decryption is gated by
|
|
37
|
+
* that policy package's `seal_approve`, not by this library.
|
|
38
|
+
*/
|
|
39
|
+
Encrypted: MoveStruct<{
|
|
40
|
+
dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
41
|
+
length: number;
|
|
42
|
+
}, string>;
|
|
43
|
+
}, "Confidentiality.Encrypted">;
|
|
44
|
+
}, "ori::walrus_data::Confidentiality">], "WalrusData.Blob">;
|
|
45
|
+
/**
|
|
46
|
+
* A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
|
|
47
|
+
* end_index. Always a plaintext reference into a (possibly separately encrypted)
|
|
48
|
+
* quilt blob.
|
|
49
|
+
*/
|
|
50
|
+
QuiltPatch: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("@mysten/sui/bcs").BcsType<number, number, "u8">, import("@mysten/sui/bcs").BcsType<number, number, "u16">, import("@mysten/sui/bcs").BcsType<number, number, "u16">], "WalrusData.QuiltPatch">;
|
|
51
|
+
}, "ori::walrus_data::WalrusData">;
|
|
52
|
+
//# sourceMappingURL=walrus_data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walrus_data.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAG1E;;;;GAIG;AACH,eAAO,MAAM,eAAe;IACpB,uCAAuC;;IAEvC;;;;;;OAMG;;;;;;uCAIH,CAAC;AACT,4EAA4E;AAC5E,eAAO,MAAM,UAAU;IACf,kEAAkE;;QAflE,uCAAuC;;QAEvC;;;;;;WAMG;;;;;;;IASH;;;;OAIG;;kCAEH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveEnum, MoveStruct, MoveTuple } from "../../../utils/index.js";
|
|
5
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
+
const $moduleName = 'ori::walrus_data';
|
|
7
|
+
/**
|
|
8
|
+
* Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
|
|
9
|
+
* Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
|
|
10
|
+
* blob and can never be the direct product of an encryption.
|
|
11
|
+
*/
|
|
12
|
+
export const Confidentiality = new MoveEnum({ name: `${$moduleName}::Confidentiality`, fields: {
|
|
13
|
+
/** The blob is stored in the clear. */
|
|
14
|
+
Unencrypted: null,
|
|
15
|
+
/**
|
|
16
|
+
* The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
|
|
17
|
+
* — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
|
|
18
|
+
* itself a Seal `EncryptedObject`, which already carries the decryption-policy
|
|
19
|
+
* package id, so no separate policy field is stored here. Decryption is gated by
|
|
20
|
+
* that policy package's `seal_approve`, not by this library.
|
|
21
|
+
*/
|
|
22
|
+
Encrypted: new MoveStruct({ name: `Confidentiality.Encrypted`, fields: {
|
|
23
|
+
dek: bcs.vector(bcs.u8())
|
|
24
|
+
} })
|
|
25
|
+
} });
|
|
26
|
+
/** Represents either a standalone Walrus blob or a patch within a quilt. */
|
|
27
|
+
export const WalrusData = new MoveEnum({ name: `${$moduleName}::WalrusData`, fields: {
|
|
28
|
+
/** A standalone Walrus blob. Fields: blob_id, confidentiality. */
|
|
29
|
+
Blob: new MoveTuple({ name: `WalrusData.Blob`, fields: [bcs.u256(), Confidentiality] }),
|
|
30
|
+
/**
|
|
31
|
+
* A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
|
|
32
|
+
* end_index. Always a plaintext reference into a (possibly separately encrypted)
|
|
33
|
+
* quilt blob.
|
|
34
|
+
*/
|
|
35
|
+
QuiltPatch: new MoveTuple({ name: `WalrusData.QuiltPatch`, fields: [bcs.u256(), bcs.u8(), bcs.u16(), bcs.u16()] })
|
|
36
|
+
} });
|
|
37
|
+
//# sourceMappingURL=walrus_data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walrus_data.js","sourceRoot":"","sources":["../../../../../src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,mBAAmB,EAAE,MAAM,EAAE;QACvF,uCAAuC;QACvC,WAAW,EAAE,IAAI;QACjB;;;;;;WAMG;QACH,SAAS,EAAE,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE;gBAC/D,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;aAC5B,EAAE,CAAC;KACX,EAAE,CAAC,CAAC;AACT,4EAA4E;AAC5E,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,cAAc,EAAE,MAAM,EAAE;QAC7E,kEAAkE;QAClE,IAAI,EAAE,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC;QACvF;;;;WAIG;QACH,UAAU,EAAE,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;KACrH,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* The on-chain pointer to a release's snapshot bundle: which Walrus quilt is this
|
|
6
|
+
* release's bundle.
|
|
7
|
+
*
|
|
8
|
+
* A snapshot bundle is curated bonus material a buyer gets access to — one Walrus
|
|
9
|
+
* quilt, assembled after the fact. The quilt is self-describing: its plaintext
|
|
10
|
+
* `manifest.json` patch carries all the metadata, its media patches are
|
|
11
|
+
* chunk-encrypted under one AES envelope key, and that key travels Seal-wrapped
|
|
12
|
+
* inside the quilt as its `key.seal` patch. This package therefore stores none of
|
|
13
|
+
* that — no ciphertext, no metadata, no access policy (unlocking by holding a
|
|
14
|
+
* Record is `miso_record_acl`'s concern, in miso-record-extensions). The stored
|
|
15
|
+
* value is the quilt's `WalrusData` blob reference, and nothing else.
|
|
16
|
+
*
|
|
17
|
+
* The slot is write-once: `set_snapshot_bundle` aborts with `EBundleAlreadySet` if
|
|
18
|
+
* a bundle is already set, and there is NO unset, NO remove, and NO replace
|
|
19
|
+
* function. That absence is a product guarantee: the bundle a buyer's Record
|
|
20
|
+
* points at can never be swapped out from under them. More content later means a
|
|
21
|
+
* new Release.
|
|
22
|
+
*/
|
|
23
|
+
import { MoveTuple, MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
24
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
25
|
+
export declare const ExtensionKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/release_snapshot_bundle::release_snapshot_bundle::ExtensionKey">;
|
|
26
|
+
export declare const SnapshotBundleSetEvent: MoveStruct<{
|
|
27
|
+
release_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
28
|
+
bundle: import("../utils/index.ts").MoveEnum<{
|
|
29
|
+
Blob: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("../utils/index.ts").MoveEnum<{
|
|
30
|
+
Unencrypted: null;
|
|
31
|
+
Encrypted: MoveStruct<{
|
|
32
|
+
dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
|
|
33
|
+
length: number;
|
|
34
|
+
}, string>;
|
|
35
|
+
}, "Confidentiality.Encrypted">;
|
|
36
|
+
}, "ori::walrus_data::Confidentiality">], "WalrusData.Blob">;
|
|
37
|
+
QuiltPatch: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("@mysten/sui/bcs").BcsType<number, number, "u8">, import("@mysten/sui/bcs").BcsType<number, number, "u16">, import("@mysten/sui/bcs").BcsType<number, number, "u16">], "WalrusData.QuiltPatch">;
|
|
38
|
+
}, "ori::walrus_data::WalrusData">;
|
|
39
|
+
}, "@local-pkg/release_snapshot_bundle::release_snapshot_bundle::SnapshotBundleSetEvent">;
|
|
40
|
+
export interface SetSnapshotBundleArguments {
|
|
41
|
+
self: RawTransactionArgument<string>;
|
|
42
|
+
cap: RawTransactionArgument<string>;
|
|
43
|
+
bundle: TransactionArgument;
|
|
44
|
+
}
|
|
45
|
+
export interface SetSnapshotBundleOptions {
|
|
46
|
+
package?: string;
|
|
47
|
+
arguments: SetSnapshotBundleArguments | [
|
|
48
|
+
self: RawTransactionArgument<string>,
|
|
49
|
+
cap: RawTransactionArgument<string>,
|
|
50
|
+
bundle: TransactionArgument
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Sets the release's snapshot bundle — once. Aborts with `EBundleAlreadySet` if a
|
|
55
|
+
* bundle is already set; there is no way to unset or replace it.
|
|
56
|
+
*
|
|
57
|
+
* The reference must be a plaintext standalone blob. A quilt patch is a slice of
|
|
58
|
+
* some other quilt, not the bundle's own quilt blob. And the outer quilt blob is
|
|
59
|
+
* plaintext by design: its `manifest.json` patch must be readable, encryption is
|
|
60
|
+
* per-patch inside the quilt, and the Seal-wrapped envelope key travels as the
|
|
61
|
+
* quilt's `key.seal` patch — so an encrypted outer reference is structurally
|
|
62
|
+
* wrong. With no replace function either mistake would be permanent, which is why
|
|
63
|
+
* both checks live on-chain rather than in the client.
|
|
64
|
+
*/
|
|
65
|
+
export declare function setSnapshotBundle(options: SetSnapshotBundleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
66
|
+
export interface HasSnapshotBundleArguments {
|
|
67
|
+
self: RawTransactionArgument<string>;
|
|
68
|
+
}
|
|
69
|
+
export interface HasSnapshotBundleOptions {
|
|
70
|
+
package?: string;
|
|
71
|
+
arguments: HasSnapshotBundleArguments | [
|
|
72
|
+
self: RawTransactionArgument<string>
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
/** Returns whether a snapshot bundle is set on this release. */
|
|
76
|
+
export declare function hasSnapshotBundle(options: HasSnapshotBundleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
77
|
+
export interface SnapshotBundleArguments {
|
|
78
|
+
self: RawTransactionArgument<string>;
|
|
79
|
+
}
|
|
80
|
+
export interface SnapshotBundleOptions {
|
|
81
|
+
package?: string;
|
|
82
|
+
arguments: SnapshotBundleArguments | [
|
|
83
|
+
self: RawTransactionArgument<string>
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The release's snapshot bundle reference. Aborts with `ENoSnapshotBundle` if none
|
|
88
|
+
* is set.
|
|
89
|
+
*/
|
|
90
|
+
export declare function snapshotBundle(options: SnapshotBundleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
91
|
+
//# sourceMappingURL=release_snapshot_bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release_snapshot_bundle.d.ts","sourceRoot":"","sources":["../../../src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE/G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF,eAAO,MAAM,YAAY,gKAAgF,CAAC;AAC1G,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;yFAG3B,CAAC;AACT,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,mBAAmB,CAAC;CAC/B;AACD,MAAM,WAAW,wBAAwB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,0BAA0B,GAAG;QACpC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACpC,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACnC,MAAM,EAAE,mBAAmB;KAC9B,CAAC;CACL;AACD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,IAQvD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,wBAAwB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,0BAA0B,GAAG;QACpC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD,gEAAgE;AAChE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,IAMvD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,qBAAqB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,uBAAuB,GAAG;QACjC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,IAMjD,IAAI,WAAW,0DAM1B"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* The on-chain pointer to a release's snapshot bundle: which Walrus quilt is this
|
|
6
|
+
* release's bundle.
|
|
7
|
+
*
|
|
8
|
+
* A snapshot bundle is curated bonus material a buyer gets access to — one Walrus
|
|
9
|
+
* quilt, assembled after the fact. The quilt is self-describing: its plaintext
|
|
10
|
+
* `manifest.json` patch carries all the metadata, its media patches are
|
|
11
|
+
* chunk-encrypted under one AES envelope key, and that key travels Seal-wrapped
|
|
12
|
+
* inside the quilt as its `key.seal` patch. This package therefore stores none of
|
|
13
|
+
* that — no ciphertext, no metadata, no access policy (unlocking by holding a
|
|
14
|
+
* Record is `miso_record_acl`'s concern, in miso-record-extensions). The stored
|
|
15
|
+
* value is the quilt's `WalrusData` blob reference, and nothing else.
|
|
16
|
+
*
|
|
17
|
+
* The slot is write-once: `set_snapshot_bundle` aborts with `EBundleAlreadySet` if
|
|
18
|
+
* a bundle is already set, and there is NO unset, NO remove, and NO replace
|
|
19
|
+
* function. That absence is a product guarantee: the bundle a buyer's Record
|
|
20
|
+
* points at can never be swapped out from under them. More content later means a
|
|
21
|
+
* new Release.
|
|
22
|
+
*/
|
|
23
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
24
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
25
|
+
import {} from '@mysten/sui/transactions';
|
|
26
|
+
import * as walrus_data from "./deps/ori/walrus_data.js";
|
|
27
|
+
const $moduleName = '@local-pkg/release_snapshot_bundle::release_snapshot_bundle';
|
|
28
|
+
export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
|
|
29
|
+
export const SnapshotBundleSetEvent = new MoveStruct({ name: `${$moduleName}::SnapshotBundleSetEvent`, fields: {
|
|
30
|
+
release_id: bcs.Address,
|
|
31
|
+
bundle: walrus_data.WalrusData
|
|
32
|
+
} });
|
|
33
|
+
/**
|
|
34
|
+
* Sets the release's snapshot bundle — once. Aborts with `EBundleAlreadySet` if a
|
|
35
|
+
* bundle is already set; there is no way to unset or replace it.
|
|
36
|
+
*
|
|
37
|
+
* The reference must be a plaintext standalone blob. A quilt patch is a slice of
|
|
38
|
+
* some other quilt, not the bundle's own quilt blob. And the outer quilt blob is
|
|
39
|
+
* plaintext by design: its `manifest.json` patch must be readable, encryption is
|
|
40
|
+
* per-patch inside the quilt, and the Seal-wrapped envelope key travels as the
|
|
41
|
+
* quilt's `key.seal` patch — so an encrypted outer reference is structurally
|
|
42
|
+
* wrong. With no replace function either mistake would be permanent, which is why
|
|
43
|
+
* both checks live on-chain rather than in the client.
|
|
44
|
+
*/
|
|
45
|
+
export function setSnapshotBundle(options) {
|
|
46
|
+
const packageAddress = options.package ?? '@local-pkg/release_snapshot_bundle';
|
|
47
|
+
const argumentsTypes = [
|
|
48
|
+
null,
|
|
49
|
+
null,
|
|
50
|
+
null
|
|
51
|
+
];
|
|
52
|
+
const parameterNames = ["self", "cap", "bundle"];
|
|
53
|
+
return (tx) => tx.moveCall({
|
|
54
|
+
package: packageAddress,
|
|
55
|
+
module: 'release_snapshot_bundle',
|
|
56
|
+
function: 'set_snapshot_bundle',
|
|
57
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/** Returns whether a snapshot bundle is set on this release. */
|
|
61
|
+
export function hasSnapshotBundle(options) {
|
|
62
|
+
const packageAddress = options.package ?? '@local-pkg/release_snapshot_bundle';
|
|
63
|
+
const argumentsTypes = [
|
|
64
|
+
null
|
|
65
|
+
];
|
|
66
|
+
const parameterNames = ["self"];
|
|
67
|
+
return (tx) => tx.moveCall({
|
|
68
|
+
package: packageAddress,
|
|
69
|
+
module: 'release_snapshot_bundle',
|
|
70
|
+
function: 'has_snapshot_bundle',
|
|
71
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The release's snapshot bundle reference. Aborts with `ENoSnapshotBundle` if none
|
|
76
|
+
* is set.
|
|
77
|
+
*/
|
|
78
|
+
export function snapshotBundle(options) {
|
|
79
|
+
const packageAddress = options.package ?? '@local-pkg/release_snapshot_bundle';
|
|
80
|
+
const argumentsTypes = [
|
|
81
|
+
null
|
|
82
|
+
];
|
|
83
|
+
const parameterNames = ["self"];
|
|
84
|
+
return (tx) => tx.moveCall({
|
|
85
|
+
package: packageAddress,
|
|
86
|
+
module: 'release_snapshot_bundle',
|
|
87
|
+
function: 'snapshot_bundle',
|
|
88
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=release_snapshot_bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release_snapshot_bundle.js","sourceRoot":"","sources":["../../../src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,MAAM,WAAW,GAAG,6DAA6D,CAAC;AAClF,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,gBAAgB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,0BAA0B,EAAE,MAAM,EAAE;QACvG,UAAU,EAAE,GAAG,CAAC,OAAO;QACvB,MAAM,EAAE,WAAW,CAAC,UAAU;KACjC,EAAE,CAAC,CAAC;AAcT;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;IAC/E,MAAM,cAAc,GAAG;QACnB,IAAI;QACJ,IAAI;QACJ,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACjD,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,yBAAyB;QACjC,QAAQ,EAAE,qBAAqB;QAC/B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;IAC/E,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,yBAAyB;QACjC,QAAQ,EAAE,qBAAqB;QAC/B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAA8B;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;IAC/E,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,yBAAyB;QACjC,QAAQ,EAAE,iBAAiB;QAC3B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A position holding share tokens registered against a `RoyaltyPool`.
|
|
6
|
+
*
|
|
7
|
+
* Stakes are owned objects with an immutable balance — to increase a holder's
|
|
8
|
+
* total staked amount, mint additional Stake objects rather than modify an
|
|
9
|
+
* existing one. This mirrors Sui's native staking model.
|
|
10
|
+
*
|
|
11
|
+
* Each stake tracks the royalty pools it is currently registered with via an
|
|
12
|
+
* inline `VecMap<TypeName, Registration>`, keyed by the pool's `Currency`
|
|
13
|
+
* `TypeName`. The stake cannot be destroyed while any registrations remain. Pool
|
|
14
|
+
* registrations are mutated by `royalty_pool::pool` through the package-private
|
|
15
|
+
* accessors below.
|
|
16
|
+
*/
|
|
17
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
18
|
+
export declare const Registration: MoveStruct<{
|
|
19
|
+
pool_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
20
|
+
last_claim_index: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
21
|
+
}, "royalty_pool::stake::Registration">;
|
|
22
|
+
export declare const Stake: MoveStruct<{
|
|
23
|
+
id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
24
|
+
/** The staked balance. Immutable after creation. */
|
|
25
|
+
balance: MoveStruct<{
|
|
26
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
27
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
28
|
+
/**
|
|
29
|
+
* Active royalty-pool registrations, keyed by `Currency` `TypeName`. Must be empty
|
|
30
|
+
* to destroy.
|
|
31
|
+
*/
|
|
32
|
+
registrations: MoveStruct<{
|
|
33
|
+
contents: import("@mysten/sui/bcs").BcsType<{
|
|
34
|
+
key: {
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
37
|
+
value: {
|
|
38
|
+
pool_id: string;
|
|
39
|
+
last_claim_index: string;
|
|
40
|
+
};
|
|
41
|
+
}[], Iterable<{
|
|
42
|
+
key: {
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
value: {
|
|
46
|
+
pool_id: string | Uint8Array<ArrayBufferLike>;
|
|
47
|
+
last_claim_index: string | number | bigint;
|
|
48
|
+
};
|
|
49
|
+
}> & {
|
|
50
|
+
length: number;
|
|
51
|
+
}, string>;
|
|
52
|
+
}, "0x2::vec_map::VecMap<std::type_name::TypeName, royalty_pool::stake::Registration>">;
|
|
53
|
+
}, "royalty_pool::stake::Stake<phantom Share>">;
|
|
54
|
+
//# sourceMappingURL=stake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stake.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/royalty_pool/stake.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD,eAAO,MAAM,YAAY;;;uCAGjB,CAAC;AACT,eAAO,MAAM,KAAK;;IAEV,oDAAoD;;;;IAEpD;;;OAGG;;;;;;;;;;;;;;;;;;;;;;+CAEH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A position holding share tokens registered against a `RoyaltyPool`.
|
|
6
|
+
*
|
|
7
|
+
* Stakes are owned objects with an immutable balance — to increase a holder's
|
|
8
|
+
* total staked amount, mint additional Stake objects rather than modify an
|
|
9
|
+
* existing one. This mirrors Sui's native staking model.
|
|
10
|
+
*
|
|
11
|
+
* Each stake tracks the royalty pools it is currently registered with via an
|
|
12
|
+
* inline `VecMap<TypeName, Registration>`, keyed by the pool's `Currency`
|
|
13
|
+
* `TypeName`. The stake cannot be destroyed while any registrations remain. Pool
|
|
14
|
+
* registrations are mutated by `royalty_pool::pool` through the package-private
|
|
15
|
+
* accessors below.
|
|
16
|
+
*/
|
|
17
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
18
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
19
|
+
import * as balance from "../sui/balance.js";
|
|
20
|
+
import * as vec_map from "../sui/vec_map.js";
|
|
21
|
+
import * as type_name from "../std/type_name.js";
|
|
22
|
+
const $moduleName = 'royalty_pool::stake';
|
|
23
|
+
export const Registration = new MoveStruct({ name: `${$moduleName}::Registration`, fields: {
|
|
24
|
+
pool_id: bcs.Address,
|
|
25
|
+
last_claim_index: bcs.u256()
|
|
26
|
+
} });
|
|
27
|
+
export const Stake = new MoveStruct({ name: `${$moduleName}::Stake<phantom Share>`, fields: {
|
|
28
|
+
id: bcs.Address,
|
|
29
|
+
/** The staked balance. Immutable after creation. */
|
|
30
|
+
balance: balance.Balance,
|
|
31
|
+
/**
|
|
32
|
+
* Active royalty-pool registrations, keyed by `Currency` `TypeName`. Must be empty
|
|
33
|
+
* to destroy.
|
|
34
|
+
*/
|
|
35
|
+
registrations: vec_map.VecMap(type_name.TypeName, Registration)
|
|
36
|
+
} });
|
|
37
|
+
//# sourceMappingURL=stake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stake.js","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/royalty_pool/stake.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAC;AACjD,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,gBAAgB,EAAE,MAAM,EAAE;QACnF,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,gBAAgB,EAAE,GAAG,CAAC,IAAI,EAAE;KAC/B,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,wBAAwB,EAAE,MAAM,EAAE;QACpF,EAAE,EAAE,GAAG,CAAC,OAAO;QACf,oDAAoD;QACpD,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB;;;WAGG;QACH,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;KAClE,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
6
|
+
export declare const TypeName: MoveStruct<{
|
|
7
|
+
/**
|
|
8
|
+
* String representation of the type. All types are represented using their source
|
|
9
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
10
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
11
|
+
* `00000000000000000000000000000001::string::String` or
|
|
12
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
13
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
14
|
+
* 32 depending on the Move platform)
|
|
15
|
+
*/
|
|
16
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
17
|
+
}, "std::type_name::TypeName">;
|
|
18
|
+
//# sourceMappingURL=type_name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type_name.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/std/type_name.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE,0EAA0E;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,eAAO,MAAM,QAAQ;IACb;;;;;;;;SAQK;;8BAEL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
6
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
7
|
+
const $moduleName = 'std::type_name';
|
|
8
|
+
export const TypeName = new MoveStruct({ name: `${$moduleName}::TypeName`, fields: {
|
|
9
|
+
/**
|
|
10
|
+
* String representation of the type. All types are represented using their source
|
|
11
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
12
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
13
|
+
* `00000000000000000000000000000001::string::String` or
|
|
14
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
15
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
16
|
+
* 32 depending on the Move platform)
|
|
17
|
+
*/
|
|
18
|
+
name: bcs.string()
|
|
19
|
+
} });
|
|
20
|
+
//# sourceMappingURL=type_name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type_name.js","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/std/type_name.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE,0EAA0E;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,EAAE,MAAM,EAAE;QAC3E;;;;;;;;aAQK;QACL,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE;KACrB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
6
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
7
|
+
* and `Balance`s.
|
|
8
|
+
*/
|
|
9
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
10
|
+
export declare const Balance: MoveStruct<{
|
|
11
|
+
value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
12
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
13
|
+
//# sourceMappingURL=balance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/sui/balance.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,eAAO,MAAM,OAAO;;sCAEZ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
6
|
+
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
7
|
+
* and `Balance`s.
|
|
8
|
+
*/
|
|
9
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
10
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
11
|
+
const $moduleName = '0x2::balance';
|
|
12
|
+
export const Balance = new MoveStruct({ name: `${$moduleName}::Balance<phantom T>`, fields: {
|
|
13
|
+
value: bcs.u64()
|
|
14
|
+
} });
|
|
15
|
+
//# sourceMappingURL=balance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balance.js","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/sui/balance.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,sBAAsB,EAAE,MAAM,EAAE;QACpF,KAAK,EAAE,GAAG,CAAC,GAAG,EAAE;KACnB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { type BcsType } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.ts';
|
|
6
|
+
/** An entry in the map */
|
|
7
|
+
export declare function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
8
|
+
K,
|
|
9
|
+
V
|
|
10
|
+
]): MoveStruct<{
|
|
11
|
+
key: K;
|
|
12
|
+
value: V;
|
|
13
|
+
}, `0x2::vec_map::Entry<${K["name"]}, ${V["name"]}>`>;
|
|
14
|
+
/**
|
|
15
|
+
* A map data structure backed by a vector. The map is guaranteed not to contain
|
|
16
|
+
* duplicate keys, but entries are _not_ sorted by key--entries are included in
|
|
17
|
+
* insertion order. All operations are O(N) in the size of the map--the intention
|
|
18
|
+
* of this data structure is only to provide the convenience of programming against
|
|
19
|
+
* a map API. Large maps should use handwritten parent/child relationships instead.
|
|
20
|
+
* Maps that need sorted iteration rather than insertion order iteration should
|
|
21
|
+
* also be handwritten.
|
|
22
|
+
*/
|
|
23
|
+
export declare function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
24
|
+
K,
|
|
25
|
+
V
|
|
26
|
+
]): MoveStruct<{
|
|
27
|
+
contents: BcsType<{
|
|
28
|
+
key: K extends BcsType<infer U, any, string> ? U : never;
|
|
29
|
+
value: V extends BcsType<infer U, any, string> ? U : never;
|
|
30
|
+
}[], Iterable<{
|
|
31
|
+
key: K extends BcsType<any, infer U_1, string> ? U_1 : never;
|
|
32
|
+
value: V extends BcsType<any, infer U_1, string> ? U_1 : never;
|
|
33
|
+
}> & {
|
|
34
|
+
length: number;
|
|
35
|
+
}, string>;
|
|
36
|
+
}, `0x2::vec_map::VecMap<${K["name"]}, ${V["name"]}>`>;
|
|
37
|
+
//# sourceMappingURL=vec_map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vec_map.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/sui/vec_map.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,KAAK,OAAO,EAAO,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,0BAA0B;AAC1B,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE;IACrF,CAAC;IACD,CAAC;CACJ;;;sDAKA;AACD;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE;IACtF,CAAC;IACD,CAAC;CACJ;;;;;;;;;;uDAIA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
5
|
+
import { MoveStruct } from "../../../utils/index.js";
|
|
6
|
+
const $moduleName = '0x2::vec_map';
|
|
7
|
+
/** An entry in the map */
|
|
8
|
+
export function Entry(...typeParameters) {
|
|
9
|
+
return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name}, ${typeParameters[1].name}>`, fields: {
|
|
10
|
+
key: typeParameters[0],
|
|
11
|
+
value: typeParameters[1]
|
|
12
|
+
} });
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A map data structure backed by a vector. The map is guaranteed not to contain
|
|
16
|
+
* duplicate keys, but entries are _not_ sorted by key--entries are included in
|
|
17
|
+
* insertion order. All operations are O(N) in the size of the map--the intention
|
|
18
|
+
* of this data structure is only to provide the convenience of programming against
|
|
19
|
+
* a map API. Large maps should use handwritten parent/child relationships instead.
|
|
20
|
+
* Maps that need sorted iteration rather than insertion order iteration should
|
|
21
|
+
* also be handwritten.
|
|
22
|
+
*/
|
|
23
|
+
export function VecMap(...typeParameters) {
|
|
24
|
+
return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name}, ${typeParameters[1].name}>`, fields: {
|
|
25
|
+
contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
|
|
26
|
+
} });
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=vec_map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vec_map.js","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/sui/vec_map.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAgB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,0BAA0B;AAC1B,MAAM,UAAU,KAAK,CAAiD,GAAG,cAGxE;IACG,OAAO,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,WAAW,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,GAAG,EAAE,MAAM,EAAE;YACvI,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;YACtB,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;SAC3B,EAAE,CAAC,CAAC;AACb,CAAC;AACD;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CAAiD,GAAG,cAGzE;IACG,OAAO,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,GAAG,EAAE,MAAM,EAAE;YACxI,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;SACpE,EAAE,CAAC,CAAC;AACb,CAAC"}
|