@misofm/sdk 0.9.0 → 0.10.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 +88 -56
- package/dist/client.d.ts +126 -18
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +210 -44
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts +205 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts.map +1 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js +184 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js.map +1 -0
- package/dist/contracts/composition_routed_stake/witness.d.ts +7 -0
- package/dist/contracts/composition_routed_stake/witness.d.ts.map +1 -0
- package/dist/contracts/composition_routed_stake/witness.js +9 -0
- package/dist/contracts/composition_routed_stake/witness.js.map +1 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +89 -28
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +84 -23
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
- package/dist/contracts/composition_royalty_pool/witness.d.ts +6 -0
- package/dist/contracts/composition_royalty_pool/witness.d.ts.map +1 -0
- package/dist/contracts/composition_royalty_pool/witness.js +8 -0
- package/dist/contracts/composition_royalty_pool/witness.js.map +1 -0
- package/dist/contracts/genre/genre.d.ts +96 -0
- package/dist/contracts/genre/genre.d.ts.map +1 -0
- package/dist/contracts/genre/genre.js +107 -0
- package/dist/contracts/genre/genre.js.map +1 -0
- package/dist/contracts/recording_advisory/recording_advisory.d.ts +194 -0
- package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -0
- package/dist/contracts/recording_advisory/recording_advisory.js +204 -0
- package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -0
- package/dist/contracts/recording_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/recording_royalty_pool/recording_royalty_pool.d.ts +90 -28
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +84 -23
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
- package/dist/contracts/recording_royalty_pool/witness.d.ts +6 -0
- package/dist/contracts/recording_royalty_pool/witness.d.ts.map +1 -0
- package/dist/contracts/recording_royalty_pool/witness.js +8 -0
- package/dist/contracts/recording_royalty_pool/witness.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_revenue_distributor/release_revenue_distributor.d.ts +106 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js +113 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js.map +1 -0
- package/dist/contracts/release_revenue_distributor/witness.d.ts +7 -0
- package/dist/contracts/release_revenue_distributor/witness.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor/witness.js +9 -0
- package/dist/contracts/release_revenue_distributor/witness.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/pool.d.ts +27 -17
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/pool.js +26 -17
- package/dist/contracts/royalty_pool/pool.js.map +1 -1
- package/dist/contracts/vault/deps/sui/bag.d.ts +35 -0
- package/dist/contracts/vault/deps/sui/bag.d.ts.map +1 -0
- package/dist/contracts/vault/deps/sui/bag.js +37 -0
- package/dist/contracts/vault/deps/sui/bag.js.map +1 -0
- package/dist/contracts/vault/deps/sui/borrow.d.ts +20 -0
- package/dist/contracts/vault/deps/sui/borrow.d.ts.map +1 -0
- package/dist/contracts/vault/deps/sui/borrow.js +21 -0
- package/dist/contracts/vault/deps/sui/borrow.js.map +1 -0
- package/dist/contracts/vault/vault.d.ts +276 -0
- package/dist/contracts/vault/vault.d.ts.map +1 -0
- package/dist/contracts/vault/vault.js +274 -0
- package/dist/contracts/vault/vault.js.map +1 -0
- package/dist/contracts.d.ts +14 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +16 -7
- package/dist/contracts.js.map +1 -1
- package/dist/cover.d.ts +17 -3
- package/dist/cover.d.ts.map +1 -1
- package/dist/cover.js +43 -20
- package/dist/cover.js.map +1 -1
- package/dist/credits.d.ts +31 -12
- package/dist/credits.d.ts.map +1 -1
- package/dist/credits.js +41 -25
- package/dist/credits.js.map +1 -1
- package/dist/deployments.d.ts +31 -57
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +5 -53
- package/dist/deployments.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/pressing.d.ts +8 -7
- package/dist/pressing.d.ts.map +1 -1
- package/dist/pressing.js +91 -32
- package/dist/pressing.js.map +1 -1
- package/dist/read/artist.js +3 -3
- package/dist/read/artist.js.map +1 -1
- package/dist/read/catalog.d.ts +14 -9
- package/dist/read/catalog.d.ts.map +1 -1
- package/dist/read/catalog.js +71 -37
- package/dist/read/catalog.js.map +1 -1
- package/dist/read/client.d.ts +4 -2
- package/dist/read/client.d.ts.map +1 -1
- package/dist/read/client.js +15 -4
- package/dist/read/client.js.map +1 -1
- package/dist/read/config.d.ts +14 -11
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +10 -37
- package/dist/read/config.js.map +1 -1
- package/dist/read/index.d.ts +2 -2
- package/dist/read/index.d.ts.map +1 -1
- package/dist/read/index.js +1 -1
- package/dist/read/index.js.map +1 -1
- package/dist/read/receipts.d.ts +24 -7
- package/dist/read/receipts.d.ts.map +1 -1
- package/dist/read/receipts.js +78 -25
- package/dist/read/receipts.js.map +1 -1
- package/dist/read/types.d.ts +43 -25
- package/dist/read/types.d.ts.map +1 -1
- package/dist/read/types.js +2 -2
- package/dist/read/types.js.map +1 -1
- package/dist/recording-extensions.d.ts +37 -0
- package/dist/recording-extensions.d.ts.map +1 -0
- package/dist/recording-extensions.js +61 -0
- package/dist/recording-extensions.js.map +1 -0
- package/dist/release-extensions.d.ts +92 -0
- package/dist/release-extensions.d.ts.map +1 -0
- package/dist/release-extensions.js +175 -0
- package/dist/release-extensions.js.map +1 -0
- package/dist/release-graph.d.ts +17 -26
- package/dist/release-graph.d.ts.map +1 -1
- package/dist/release-graph.js +55 -49
- package/dist/release-graph.js.map +1 -1
- package/dist/transactions.d.ts +43 -24
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +48 -27
- package/dist/transactions.js.map +1 -1
- package/dist/vault.d.ts +268 -0
- package/dist/vault.d.ts.map +1 -0
- package/dist/vault.js +389 -0
- package/dist/vault.js.map +1 -0
- package/package.json +17 -11
- package/src/client.ts +428 -61
- package/src/contracts/composition_routed_stake/composition_routed_stake.ts +346 -0
- package/src/contracts/composition_routed_stake/witness.ts +11 -0
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +151 -35
- package/src/contracts/composition_royalty_pool/witness.ts +7 -0
- package/src/contracts/genre/genre.ts +151 -0
- package/src/contracts/recording_advisory/recording_advisory.ts +315 -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/recording_royalty_pool/recording_royalty_pool.ts +152 -35
- package/src/contracts/recording_royalty_pool/witness.ts +7 -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_revenue_distributor/release_revenue_distributor.ts +178 -0
- package/src/contracts/release_revenue_distributor/witness.ts +11 -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/pool.ts +34 -24
- package/src/contracts/vault/deps/sui/bag.ts +39 -0
- package/src/contracts/vault/deps/sui/borrow.ts +25 -0
- package/src/contracts/vault/vault.ts +454 -0
- package/src/contracts.ts +17 -9
- package/src/cover.ts +62 -37
- package/src/credits.ts +64 -51
- package/src/deployments.ts +36 -97
- package/src/index.ts +11 -5
- package/src/pressing.ts +135 -39
- package/src/read/artist.ts +3 -3
- package/src/read/catalog.ts +99 -44
- package/src/read/client.ts +20 -4
- package/src/read/config.ts +23 -49
- package/src/read/index.ts +3 -1
- package/src/read/receipts.ts +103 -26
- package/src/read/types.ts +44 -27
- package/src/recording-extensions.ts +102 -0
- package/src/release-extensions.ts +286 -0
- package/src/release-graph.ts +68 -81
- package/src/transactions.ts +79 -53
- package/src/vault.ts +777 -0
- package/dist/contracts/miso_drop/drop.d.ts +0 -550
- package/dist/contracts/miso_drop/drop.d.ts.map +0 -1
- package/dist/contracts/miso_drop/drop.js +0 -523
- package/dist/contracts/miso_drop/drop.js.map +0 -1
- package/dist/contracts/release_registry/release_registry.d.ts +0 -114
- package/dist/contracts/release_registry/release_registry.d.ts.map +0 -1
- package/dist/contracts/release_registry/release_registry.js +0 -119
- package/dist/contracts/release_registry/release_registry.js.map +0 -1
- package/dist/drop.d.ts +0 -127
- package/dist/drop.d.ts.map +0 -1
- package/dist/drop.js +0 -202
- package/dist/drop.js.map +0 -1
- package/dist/extensions/royalty-pool.d.ts +0 -32
- package/dist/extensions/royalty-pool.d.ts.map +0 -1
- package/dist/extensions/royalty-pool.js +0 -33
- package/dist/extensions/royalty-pool.js.map +0 -1
- package/src/contracts/miso_drop/drop.ts +0 -798
- package/src/contracts/release_registry/release_registry.ts +0 -160
- package/src/drop.ts +0 -376
- package/src/extensions/royalty-pool.ts +0 -90
|
@@ -4,29 +4,87 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Vault-authorized royalty-pool business logic for Miso Recordings.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* transfers) or `redeem_and_deposit` (for funds-accumulator balances).
|
|
14
|
-
*
|
|
15
|
-
* All three entry points require `&RecordingAdminCap`, so timing of fold
|
|
16
|
-
* operations stays under admin control.
|
|
9
|
+
* The plugin temporarily leases the RecordingAdminCap from its Vault, uses it only
|
|
10
|
+
* to reach the matching Recording UID, and returns it before calling external pool
|
|
11
|
+
* logic. Pools remain derived from the Recording, not the Vault, so their
|
|
12
|
+
* canonical identity survives vault replacement.
|
|
17
13
|
*/
|
|
18
14
|
|
|
19
15
|
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
20
16
|
import { normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
17
|
+
export interface InstallArguments {
|
|
18
|
+
vault: RawTransactionArgument<string>;
|
|
19
|
+
vaultAdminCap: RawTransactionArgument<string>;
|
|
20
|
+
}
|
|
21
|
+
export interface InstallOptions {
|
|
22
|
+
package?: string;
|
|
23
|
+
arguments: InstallArguments | [
|
|
24
|
+
vault: RawTransactionArgument<string>,
|
|
25
|
+
vaultAdminCap: RawTransactionArgument<string>
|
|
26
|
+
];
|
|
27
|
+
typeArguments: [
|
|
28
|
+
string
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
/** Authorize this package on a Recording capability Vault. */
|
|
32
|
+
export function install(options: InstallOptions) {
|
|
33
|
+
const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
|
|
34
|
+
const argumentsTypes = [
|
|
35
|
+
null,
|
|
36
|
+
null
|
|
37
|
+
] satisfies (string | null)[];
|
|
38
|
+
const parameterNames = ["vault", "vaultAdminCap"];
|
|
39
|
+
return (tx: Transaction) => tx.moveCall({
|
|
40
|
+
package: packageAddress,
|
|
41
|
+
module: 'recording_royalty_pool',
|
|
42
|
+
function: 'install',
|
|
43
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
44
|
+
typeArguments: options.typeArguments
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export interface UninstallArguments {
|
|
48
|
+
vault: RawTransactionArgument<string>;
|
|
49
|
+
vaultAdminCap: RawTransactionArgument<string>;
|
|
50
|
+
}
|
|
51
|
+
export interface UninstallOptions {
|
|
52
|
+
package?: string;
|
|
53
|
+
arguments: UninstallArguments | [
|
|
54
|
+
vault: RawTransactionArgument<string>,
|
|
55
|
+
vaultAdminCap: RawTransactionArgument<string>
|
|
56
|
+
];
|
|
57
|
+
typeArguments: [
|
|
58
|
+
string
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
/** Revoke this package from a Recording capability Vault. */
|
|
62
|
+
export function uninstall(options: UninstallOptions) {
|
|
63
|
+
const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
|
|
64
|
+
const argumentsTypes = [
|
|
65
|
+
null,
|
|
66
|
+
null
|
|
67
|
+
] satisfies (string | null)[];
|
|
68
|
+
const parameterNames = ["vault", "vaultAdminCap"];
|
|
69
|
+
return (tx: Transaction) => tx.moveCall({
|
|
70
|
+
package: packageAddress,
|
|
71
|
+
module: 'recording_royalty_pool',
|
|
72
|
+
function: 'uninstall',
|
|
73
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
74
|
+
typeArguments: options.typeArguments
|
|
75
|
+
});
|
|
76
|
+
}
|
|
21
77
|
export interface InitializePoolArguments {
|
|
78
|
+
vault: RawTransactionArgument<string>;
|
|
22
79
|
recording: RawTransactionArgument<string>;
|
|
23
|
-
|
|
80
|
+
vaultAdminCap: RawTransactionArgument<string>;
|
|
24
81
|
}
|
|
25
82
|
export interface InitializePoolOptions {
|
|
26
83
|
package?: string;
|
|
27
84
|
arguments: InitializePoolArguments | [
|
|
85
|
+
vault: RawTransactionArgument<string>,
|
|
28
86
|
recording: RawTransactionArgument<string>,
|
|
29
|
-
|
|
87
|
+
vaultAdminCap: RawTransactionArgument<string>
|
|
30
88
|
];
|
|
31
89
|
typeArguments: [
|
|
32
90
|
string,
|
|
@@ -35,17 +93,20 @@ export interface InitializePoolOptions {
|
|
|
35
93
|
];
|
|
36
94
|
}
|
|
37
95
|
/**
|
|
38
|
-
* Create
|
|
39
|
-
*
|
|
40
|
-
*
|
|
96
|
+
* Create and share the canonical pool derived from this Recording.
|
|
97
|
+
*
|
|
98
|
+
* The matching VaultAdminCap chooses which Currency pools may be created. The
|
|
99
|
+
* result cannot be redirected: the pool ID is claimed from the Recording UID and
|
|
100
|
+
* is typed by both RecordingShare and Currency.
|
|
41
101
|
*/
|
|
42
102
|
export function initializePool(options: InitializePoolOptions) {
|
|
43
103
|
const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
|
|
44
104
|
const argumentsTypes = [
|
|
105
|
+
null,
|
|
45
106
|
null,
|
|
46
107
|
null
|
|
47
108
|
] satisfies (string | null)[];
|
|
48
|
-
const parameterNames = ["recording", "
|
|
109
|
+
const parameterNames = ["vault", "recording", "vaultAdminCap"];
|
|
49
110
|
return (tx: Transaction) => tx.moveCall({
|
|
50
111
|
package: packageAddress,
|
|
51
112
|
module: 'recording_royalty_pool',
|
|
@@ -55,18 +116,18 @@ export function initializePool(options: InitializePoolOptions) {
|
|
|
55
116
|
});
|
|
56
117
|
}
|
|
57
118
|
export interface ReceiveAndDepositArguments {
|
|
119
|
+
vault: RawTransactionArgument<string>;
|
|
58
120
|
recording: RawTransactionArgument<string>;
|
|
59
|
-
cap: RawTransactionArgument<string>;
|
|
60
|
-
coins: TransactionArgument;
|
|
61
121
|
pool: RawTransactionArgument<string>;
|
|
122
|
+
coins: TransactionArgument;
|
|
62
123
|
}
|
|
63
124
|
export interface ReceiveAndDepositOptions {
|
|
64
125
|
package?: string;
|
|
65
126
|
arguments: ReceiveAndDepositArguments | [
|
|
127
|
+
vault: RawTransactionArgument<string>,
|
|
66
128
|
recording: RawTransactionArgument<string>,
|
|
67
|
-
|
|
68
|
-
coins: TransactionArgument
|
|
69
|
-
pool: RawTransactionArgument<string>
|
|
129
|
+
pool: RawTransactionArgument<string>,
|
|
130
|
+
coins: TransactionArgument
|
|
70
131
|
];
|
|
71
132
|
typeArguments: [
|
|
72
133
|
string,
|
|
@@ -75,18 +136,19 @@ export interface ReceiveAndDepositOptions {
|
|
|
75
136
|
];
|
|
76
137
|
}
|
|
77
138
|
/**
|
|
78
|
-
* Receive
|
|
79
|
-
*
|
|
139
|
+
* Receive coins sent to the Recording and deposit them into its canonical pool.
|
|
140
|
+
* Anyone may crank this after the plugin is installed, but the funds can only
|
|
141
|
+
* reach the pool derived from this Recording.
|
|
80
142
|
*/
|
|
81
143
|
export function receiveAndDeposit(options: ReceiveAndDepositOptions) {
|
|
82
144
|
const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
|
|
83
145
|
const argumentsTypes = [
|
|
84
146
|
null,
|
|
85
147
|
null,
|
|
86
|
-
|
|
87
|
-
null
|
|
148
|
+
null,
|
|
149
|
+
'vector<null>'
|
|
88
150
|
] satisfies (string | null)[];
|
|
89
|
-
const parameterNames = ["
|
|
151
|
+
const parameterNames = ["vault", "recording", "pool", "coins"];
|
|
90
152
|
return (tx: Transaction) => tx.moveCall({
|
|
91
153
|
package: packageAddress,
|
|
92
154
|
module: 'recording_royalty_pool',
|
|
@@ -96,18 +158,18 @@ export function receiveAndDeposit(options: ReceiveAndDepositOptions) {
|
|
|
96
158
|
});
|
|
97
159
|
}
|
|
98
160
|
export interface RedeemAndDepositArguments {
|
|
161
|
+
vault: RawTransactionArgument<string>;
|
|
99
162
|
recording: RawTransactionArgument<string>;
|
|
100
|
-
cap: RawTransactionArgument<string>;
|
|
101
|
-
value: RawTransactionArgument<number | bigint>;
|
|
102
163
|
pool: RawTransactionArgument<string>;
|
|
164
|
+
value: RawTransactionArgument<number | bigint>;
|
|
103
165
|
}
|
|
104
166
|
export interface RedeemAndDepositOptions {
|
|
105
167
|
package?: string;
|
|
106
168
|
arguments: RedeemAndDepositArguments | [
|
|
169
|
+
vault: RawTransactionArgument<string>,
|
|
107
170
|
recording: RawTransactionArgument<string>,
|
|
108
|
-
|
|
109
|
-
value: RawTransactionArgument<number | bigint
|
|
110
|
-
pool: RawTransactionArgument<string>
|
|
171
|
+
pool: RawTransactionArgument<string>,
|
|
172
|
+
value: RawTransactionArgument<number | bigint>
|
|
111
173
|
];
|
|
112
174
|
typeArguments: [
|
|
113
175
|
string,
|
|
@@ -116,18 +178,18 @@ export interface RedeemAndDepositOptions {
|
|
|
116
178
|
];
|
|
117
179
|
}
|
|
118
180
|
/**
|
|
119
|
-
* Redeem
|
|
120
|
-
*
|
|
181
|
+
* Redeem funds accumulated at the Recording address and deposit them into its
|
|
182
|
+
* canonical pool. Anyone may crank this after installation.
|
|
121
183
|
*/
|
|
122
184
|
export function redeemAndDeposit(options: RedeemAndDepositOptions) {
|
|
123
185
|
const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
|
|
124
186
|
const argumentsTypes = [
|
|
125
187
|
null,
|
|
126
188
|
null,
|
|
127
|
-
|
|
128
|
-
|
|
189
|
+
null,
|
|
190
|
+
'u64'
|
|
129
191
|
] satisfies (string | null)[];
|
|
130
|
-
const parameterNames = ["
|
|
192
|
+
const parameterNames = ["vault", "recording", "pool", "value"];
|
|
131
193
|
return (tx: Transaction) => tx.moveCall({
|
|
132
194
|
package: packageAddress,
|
|
133
195
|
module: 'recording_royalty_pool',
|
|
@@ -135,4 +197,59 @@ export function redeemAndDeposit(options: RedeemAndDepositOptions) {
|
|
|
135
197
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
136
198
|
typeArguments: options.typeArguments
|
|
137
199
|
});
|
|
200
|
+
}
|
|
201
|
+
export interface IsInstalledArguments {
|
|
202
|
+
vault: RawTransactionArgument<string>;
|
|
203
|
+
}
|
|
204
|
+
export interface IsInstalledOptions {
|
|
205
|
+
package?: string;
|
|
206
|
+
arguments: IsInstalledArguments | [
|
|
207
|
+
vault: RawTransactionArgument<string>
|
|
208
|
+
];
|
|
209
|
+
typeArguments: [
|
|
210
|
+
string
|
|
211
|
+
];
|
|
212
|
+
}
|
|
213
|
+
export function isInstalled(options: IsInstalledOptions) {
|
|
214
|
+
const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
|
|
215
|
+
const argumentsTypes = [
|
|
216
|
+
null
|
|
217
|
+
] satisfies (string | null)[];
|
|
218
|
+
const parameterNames = ["vault"];
|
|
219
|
+
return (tx: Transaction) => tx.moveCall({
|
|
220
|
+
package: packageAddress,
|
|
221
|
+
module: 'recording_royalty_pool',
|
|
222
|
+
function: 'is_installed',
|
|
223
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
224
|
+
typeArguments: options.typeArguments
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
export interface PoolAddressArguments {
|
|
228
|
+
recording: RawTransactionArgument<string>;
|
|
229
|
+
}
|
|
230
|
+
export interface PoolAddressOptions {
|
|
231
|
+
package?: string;
|
|
232
|
+
arguments: PoolAddressArguments | [
|
|
233
|
+
recording: RawTransactionArgument<string>
|
|
234
|
+
];
|
|
235
|
+
typeArguments: [
|
|
236
|
+
string,
|
|
237
|
+
string,
|
|
238
|
+
string
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
/** The canonical pool address for this Recording, share type, and Currency. */
|
|
242
|
+
export function poolAddress(options: PoolAddressOptions) {
|
|
243
|
+
const packageAddress = options.package ?? '@local-pkg/recording_royalty_pool';
|
|
244
|
+
const argumentsTypes = [
|
|
245
|
+
null
|
|
246
|
+
] satisfies (string | null)[];
|
|
247
|
+
const parameterNames = ["recording"];
|
|
248
|
+
return (tx: Transaction) => tx.moveCall({
|
|
249
|
+
package: packageAddress,
|
|
250
|
+
module: 'recording_royalty_pool',
|
|
251
|
+
function: 'pool_address',
|
|
252
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
253
|
+
typeArguments: options.typeArguments
|
|
254
|
+
});
|
|
138
255
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveTuple } from '../utils/index.js';
|
|
5
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
+
const $moduleName = '@local-pkg/recording_royalty_pool::witness';
|
|
7
|
+
export const Witness = new MoveTuple({ name: `${$moduleName}::Witness`, fields: [bcs.bool()] });
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What a release says about itself — the paragraph that runs under the title,
|
|
8
|
+
* written by whoever holds the release's admin cap, and believed.
|
|
9
|
+
*
|
|
10
|
+
* A free string, deliberately. Nothing on-chain reads it and nothing derives from
|
|
11
|
+
* it: this is editorial prose, not a fact the protocol can check. The facts a
|
|
12
|
+
* release carries that _are_ checkable — its tracklist, its splits, its state —
|
|
13
|
+
* live on the core object, and the claims two releases have to agree about to be
|
|
14
|
+
* comparable (genre, credits, languages) each get their own typed extension so
|
|
15
|
+
* they can be queried rather than read. What is left over is what a person wants
|
|
16
|
+
* to say, and the only useful thing to do with it is store it and attribute it to
|
|
17
|
+
* the cap holder.
|
|
18
|
+
*
|
|
19
|
+
* One slot, not a set. A release has one thing to say about itself; per-track
|
|
20
|
+
* notes and per-language translations are different concerns and would be
|
|
21
|
+
* different extensions. Folding either in here would turn a paragraph into a
|
|
22
|
+
* schema, and a schema is exactly what prose is not.
|
|
23
|
+
*
|
|
24
|
+
* The 8 KB ceiling is storage hygiene, not an editorial opinion — a backstop
|
|
25
|
+
* against pathological bloat in a shared object, deliberately set well above any
|
|
26
|
+
* description anyone is expected to write. It is the most generous free-text bound
|
|
27
|
+
* in the stack, and that is the intended asymmetry: this package publishes
|
|
28
|
+
* immutable, so a ceiling that turns out to be too low can never be raised, while
|
|
29
|
+
* one that is too high costs only the gas of the writer who fills it. A
|
|
30
|
+
* description is also edited rarely, so the cost of rewriting the field in full
|
|
31
|
+
* lands on almost nobody.
|
|
32
|
+
*
|
|
33
|
+
* Genuinely long-form writing — an essay, a full set of liner notes — still
|
|
34
|
+
* belongs where the artwork goes, in a Walrus blob referenced by an extension.
|
|
35
|
+
* Nothing here stops someone using the whole 8 KB; the bound is a limit, not a
|
|
36
|
+
* recommendation.
|
|
37
|
+
*
|
|
38
|
+
* Attaching nothing and attaching a description are distinct states: absence means
|
|
39
|
+
* nobody has written one, which is why an empty string is rejected rather than
|
|
40
|
+
* stored. There is no such thing as an empty description.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
44
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
45
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
46
|
+
const $moduleName = '@local-pkg/release_description::release_description';
|
|
47
|
+
export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
|
|
48
|
+
export const DescriptionSetEvent = new MoveStruct({ name: `${$moduleName}::DescriptionSetEvent`, fields: {
|
|
49
|
+
release_id: bcs.Address,
|
|
50
|
+
description: bcs.string()
|
|
51
|
+
} });
|
|
52
|
+
export const DescriptionClearedEvent = new MoveStruct({ name: `${$moduleName}::DescriptionClearedEvent`, fields: {
|
|
53
|
+
release_id: bcs.Address
|
|
54
|
+
} });
|
|
55
|
+
export interface SetDescriptionArguments {
|
|
56
|
+
self: RawTransactionArgument<string>;
|
|
57
|
+
cap: RawTransactionArgument<string>;
|
|
58
|
+
description: RawTransactionArgument<string>;
|
|
59
|
+
}
|
|
60
|
+
export interface SetDescriptionOptions {
|
|
61
|
+
package?: string;
|
|
62
|
+
arguments: SetDescriptionArguments | [
|
|
63
|
+
self: RawTransactionArgument<string>,
|
|
64
|
+
cap: RawTransactionArgument<string>,
|
|
65
|
+
description: RawTransactionArgument<string>
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Sets (or replaces) what the release says about itself.
|
|
70
|
+
*
|
|
71
|
+
* Stored exactly as given — whitespace, line breaks and case included. It is the
|
|
72
|
+
* release's own words, and normalising them here would be the protocol editing
|
|
73
|
+
* prose it has already declined to interpret.
|
|
74
|
+
*/
|
|
75
|
+
export function setDescription(options: SetDescriptionOptions) {
|
|
76
|
+
const packageAddress = options.package ?? '@local-pkg/release_description';
|
|
77
|
+
const argumentsTypes = [
|
|
78
|
+
null,
|
|
79
|
+
null,
|
|
80
|
+
'0x1::string::String'
|
|
81
|
+
] satisfies (string | null)[];
|
|
82
|
+
const parameterNames = ["self", "cap", "description"];
|
|
83
|
+
return (tx: Transaction) => tx.moveCall({
|
|
84
|
+
package: packageAddress,
|
|
85
|
+
module: 'release_description',
|
|
86
|
+
function: 'set_description',
|
|
87
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export interface ClearDescriptionArguments {
|
|
91
|
+
self: RawTransactionArgument<string>;
|
|
92
|
+
cap: RawTransactionArgument<string>;
|
|
93
|
+
}
|
|
94
|
+
export interface ClearDescriptionOptions {
|
|
95
|
+
package?: string;
|
|
96
|
+
arguments: ClearDescriptionArguments | [
|
|
97
|
+
self: RawTransactionArgument<string>,
|
|
98
|
+
cap: RawTransactionArgument<string>
|
|
99
|
+
];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Removes the description, if any. Idempotent. Leaves the release having said
|
|
103
|
+
* nothing about itself, which is where every release starts.
|
|
104
|
+
*/
|
|
105
|
+
export function clearDescription(options: ClearDescriptionOptions) {
|
|
106
|
+
const packageAddress = options.package ?? '@local-pkg/release_description';
|
|
107
|
+
const argumentsTypes = [
|
|
108
|
+
null,
|
|
109
|
+
null
|
|
110
|
+
] satisfies (string | null)[];
|
|
111
|
+
const parameterNames = ["self", "cap"];
|
|
112
|
+
return (tx: Transaction) => tx.moveCall({
|
|
113
|
+
package: packageAddress,
|
|
114
|
+
module: 'release_description',
|
|
115
|
+
function: 'clear_description',
|
|
116
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
export interface HasDescriptionArguments {
|
|
120
|
+
self: RawTransactionArgument<string>;
|
|
121
|
+
}
|
|
122
|
+
export interface HasDescriptionOptions {
|
|
123
|
+
package?: string;
|
|
124
|
+
arguments: HasDescriptionArguments | [
|
|
125
|
+
self: RawTransactionArgument<string>
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
/** Whether a description is attached to this release. */
|
|
129
|
+
export function hasDescription(options: HasDescriptionOptions) {
|
|
130
|
+
const packageAddress = options.package ?? '@local-pkg/release_description';
|
|
131
|
+
const argumentsTypes = [
|
|
132
|
+
null
|
|
133
|
+
] satisfies (string | null)[];
|
|
134
|
+
const parameterNames = ["self"];
|
|
135
|
+
return (tx: Transaction) => tx.moveCall({
|
|
136
|
+
package: packageAddress,
|
|
137
|
+
module: 'release_description',
|
|
138
|
+
function: 'has_description',
|
|
139
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
export interface DescriptionArguments {
|
|
143
|
+
self: RawTransactionArgument<string>;
|
|
144
|
+
}
|
|
145
|
+
export interface DescriptionOptions {
|
|
146
|
+
package?: string;
|
|
147
|
+
arguments: DescriptionArguments | [
|
|
148
|
+
self: RawTransactionArgument<string>
|
|
149
|
+
];
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* What the release says about itself. Aborts if nothing is attached — absence is a
|
|
153
|
+
* distinct state and must not collapse into an empty string.
|
|
154
|
+
*/
|
|
155
|
+
export function description(options: DescriptionOptions) {
|
|
156
|
+
const packageAddress = options.package ?? '@local-pkg/release_description';
|
|
157
|
+
const argumentsTypes = [
|
|
158
|
+
null
|
|
159
|
+
] satisfies (string | null)[];
|
|
160
|
+
const parameterNames = ["self"];
|
|
161
|
+
return (tx: Transaction) => tx.moveCall({
|
|
162
|
+
package: packageAddress,
|
|
163
|
+
module: 'release_description',
|
|
164
|
+
function: 'description',
|
|
165
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
166
|
+
});
|
|
167
|
+
}
|