@misonetwork/sdk 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -38
- package/dist/client.d.ts +3 -17
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +18 -3
- package/dist/client.js.map +1 -1
- package/dist/contracts/miso/composition.d.ts +0 -14
- package/dist/contracts/miso/composition.d.ts.map +1 -1
- package/dist/contracts/miso/composition.js +0 -15
- package/dist/contracts/miso/composition.js.map +1 -1
- package/dist/contracts/miso/recording.d.ts +0 -15
- package/dist/contracts/miso/recording.d.ts.map +1 -1
- package/dist/contracts/miso/recording.js +0 -15
- package/dist/contracts/miso/recording.js.map +1 -1
- package/dist/contracts/miso/release.d.ts +0 -11
- package/dist/contracts/miso/release.d.ts.map +1 -1
- package/dist/contracts/miso/release.js +0 -14
- package/dist/contracts/miso/release.js.map +1 -1
- package/dist/contracts/miso_party/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js +20 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/miso_party/party.d.ts +481 -0
- package/dist/contracts/miso_party/party.d.ts.map +1 -0
- package/dist/contracts/miso_party/party.js +527 -0
- package/dist/contracts/miso_party/party.js.map +1 -0
- package/dist/contracts/party_cta/party_cta.d.ts +120 -0
- package/dist/contracts/party_cta/party_cta.d.ts.map +1 -0
- package/dist/contracts/party_cta/party_cta.js +139 -0
- package/dist/contracts/party_cta/party_cta.js.map +1 -0
- package/dist/contracts/party_genre/party_genre.d.ts +117 -0
- package/dist/contracts/party_genre/party_genre.d.ts.map +1 -0
- package/dist/contracts/party_genre/party_genre.js +131 -0
- package/dist/contracts/party_genre/party_genre.js.map +1 -0
- package/dist/contracts/party_media/party_media.d.ts +86 -0
- package/dist/contracts/party_media/party_media.d.ts.map +1 -0
- package/dist/contracts/party_media/party_media.js +97 -0
- package/dist/contracts/party_media/party_media.js.map +1 -0
- package/dist/contracts/party_music/party_music.d.ts +209 -0
- package/dist/contracts/party_music/party_music.d.ts.map +1 -0
- package/dist/contracts/party_music/party_music.js +259 -0
- package/dist/contracts/party_music/party_music.js.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts +89 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.js +92 -0
- package/dist/contracts/party_platform_link/party_platform_link.js.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts +233 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.js +289 -0
- package/dist/contracts/party_pro_link/party_pro_link.js.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts +15 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js +17 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts +6 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js +8 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js.map +1 -0
- package/dist/contracts/party_profile/party_profile.d.ts +133 -0
- package/dist/contracts/party_profile/party_profile.d.ts.map +1 -0
- package/dist/contracts/party_profile/party_profile.js +153 -0
- package/dist/contracts/party_profile/party_profile.js.map +1 -0
- package/dist/contracts/party_roles/party_roles.d.ts +201 -0
- package/dist/contracts/party_roles/party_roles.d.ts.map +1 -0
- package/dist/contracts/party_roles/party_roles.js +237 -0
- package/dist/contracts/party_roles/party_roles.js.map +1 -0
- package/dist/contracts/party_social/party_social.d.ts +258 -0
- package/dist/contracts/party_social/party_social.d.ts.map +1 -0
- package/dist/contracts/party_social/party_social.js +320 -0
- package/dist/contracts/party_social/party_social.js.map +1 -0
- package/dist/contracts/party_tags/party_tags.d.ts +116 -0
- package/dist/contracts/party_tags/party_tags.d.ts.map +1 -0
- package/dist/contracts/party_tags/party_tags.js +130 -0
- package/dist/contracts/party_tags/party_tags.js.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts +0 -14
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.js +0 -14
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -1
- package/dist/contracts/royalty_pool/pool.d.ts +0 -14
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/pool.js +0 -14
- package/dist/contracts/royalty_pool/pool.js.map +1 -1
- package/dist/contracts/royalty_pool/stake.d.ts +6 -13
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/stake.js +6 -14
- package/dist/contracts/royalty_pool/stake.js.map +1 -1
- package/dist/contracts.d.ts +13 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +14 -2
- package/dist/contracts.js.map +1 -1
- package/dist/deployments.d.ts +73 -14
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +53 -13
- package/dist/deployments.js.map +1 -1
- package/dist/events.d.ts +0 -14
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +0 -4
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/packages.d.ts +39 -4
- package/dist/packages.d.ts.map +1 -1
- package/dist/packages.js +39 -4
- package/dist/packages.js.map +1 -1
- package/dist/party/client.d.ts +233 -0
- package/dist/party/client.d.ts.map +1 -0
- package/dist/party/client.js +222 -0
- package/dist/party/client.js.map +1 -0
- package/dist/party/extensions/ctas.d.ts +19 -0
- package/dist/party/extensions/ctas.d.ts.map +1 -0
- package/dist/party/extensions/ctas.js +25 -0
- package/dist/party/extensions/ctas.js.map +1 -0
- package/dist/party/extensions/genres.d.ts +27 -0
- package/dist/party/extensions/genres.d.ts.map +1 -0
- package/dist/party/extensions/genres.js +31 -0
- package/dist/party/extensions/genres.js.map +1 -0
- package/dist/party/extensions/links.d.ts +65 -0
- package/dist/party/extensions/links.d.ts.map +1 -0
- package/dist/party/extensions/links.js +117 -0
- package/dist/party/extensions/links.js.map +1 -0
- package/dist/party/extensions/media.d.ts +36 -0
- package/dist/party/extensions/media.d.ts.map +1 -0
- package/dist/party/extensions/media.js +45 -0
- package/dist/party/extensions/media.js.map +1 -0
- package/dist/party/extensions/profile.d.ts +24 -0
- package/dist/party/extensions/profile.d.ts.map +1 -0
- package/dist/party/extensions/profile.js +48 -0
- package/dist/party/extensions/profile.js.map +1 -0
- package/dist/party/extensions/roles.d.ts +37 -0
- package/dist/party/extensions/roles.d.ts.map +1 -0
- package/dist/party/extensions/roles.js +46 -0
- package/dist/party/extensions/roles.js.map +1 -0
- package/dist/party/extensions/tags.d.ts +25 -0
- package/dist/party/extensions/tags.d.ts.map +1 -0
- package/dist/party/extensions/tags.js +25 -0
- package/dist/party/extensions/tags.js.map +1 -0
- package/dist/party/index.d.ts +12 -0
- package/dist/party/index.d.ts.map +1 -0
- package/dist/party/index.js +14 -0
- package/dist/party/index.js.map +1 -0
- package/dist/party/internal.d.ts +15 -0
- package/dist/party/internal.d.ts.map +1 -0
- package/dist/party/internal.js +103 -0
- package/dist/party/internal.js.map +1 -0
- package/dist/party/queries.d.ts +38 -0
- package/dist/party/queries.d.ts.map +1 -0
- package/dist/party/queries.js +232 -0
- package/dist/party/queries.js.map +1 -0
- package/dist/party/transactions.d.ts +74 -0
- package/dist/party/transactions.d.ts.map +1 -0
- package/dist/party/transactions.js +85 -0
- package/dist/party/transactions.js.map +1 -0
- package/dist/party/types.d.ts +54 -0
- package/dist/party/types.d.ts.map +1 -0
- package/dist/party/types.js +4 -0
- package/dist/party/types.js.map +1 -0
- package/package.json +6 -2
- package/src/client.ts +21 -3
- package/src/contracts/miso/composition.ts +0 -27
- package/src/contracts/miso/recording.ts +0 -28
- package/src/contracts/miso/release.ts +0 -23
- package/src/contracts/miso_party/deps/sui/vec_set.ts +21 -0
- package/src/contracts/miso_party/party.ts +797 -0
- package/src/contracts/party_cta/party_cta.ts +212 -0
- package/src/contracts/party_genre/party_genre.ts +199 -0
- package/src/contracts/party_media/party_media.ts +141 -0
- package/src/contracts/party_music/party_music.ts +405 -0
- package/src/contracts/party_platform_link/party_platform_link.ts +148 -0
- package/src/contracts/party_pro_link/party_pro_link.ts +453 -0
- package/src/contracts/party_profile/deps/country_code/country_code.ts +19 -0
- package/src/contracts/party_profile/deps/language_code/language_code.ts +7 -0
- package/src/contracts/party_profile/party_profile.ts +239 -0
- package/src/contracts/party_roles/party_roles.ts +363 -0
- package/src/contracts/party_social/party_social.ts +502 -0
- package/src/contracts/party_tags/party_tags.ts +198 -0
- package/src/contracts/routed_stake/routed_stake.ts +0 -27
- package/src/contracts/royalty_pool/pool.ts +0 -27
- package/src/contracts/royalty_pool/stake.ts +6 -26
- package/src/contracts.ts +15 -2
- package/src/deployments.ts +56 -14
- package/src/events.ts +0 -4
- package/src/index.ts +2 -0
- package/src/packages.ts +40 -8
- package/src/party/client.ts +283 -0
- package/src/party/extensions/ctas.ts +46 -0
- package/src/party/extensions/genres.ts +62 -0
- package/src/party/extensions/links.ts +185 -0
- package/src/party/extensions/media.ts +72 -0
- package/src/party/extensions/profile.ts +81 -0
- package/src/party/extensions/roles.ts +94 -0
- package/src/party/extensions/tags.ts +54 -0
- package/src/party/index.ts +14 -0
- package/src/party/internal.ts +119 -0
- package/src/party/queries.ts +303 -0
- package/src/party/transactions.ts +167 -0
- package/src/party/types.ts +95 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts +0 -52
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +0 -1
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +0 -37
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +0 -1
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +0 -91
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +0 -1
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +0 -91
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js.map +0 -1
- package/src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts +0 -36
- package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +0 -124
|
@@ -332,33 +332,6 @@ export function sweep(options: SweepOptions) {
|
|
|
332
332
|
typeArguments: options.typeArguments
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
|
-
export interface IdArguments {
|
|
336
|
-
self: RawTransactionArgument<string>;
|
|
337
|
-
}
|
|
338
|
-
export interface IdOptions {
|
|
339
|
-
package?: string;
|
|
340
|
-
arguments: IdArguments | [
|
|
341
|
-
self: RawTransactionArgument<string>
|
|
342
|
-
];
|
|
343
|
-
typeArguments: [
|
|
344
|
-
string,
|
|
345
|
-
string
|
|
346
|
-
];
|
|
347
|
-
}
|
|
348
|
-
export function id(options: IdOptions) {
|
|
349
|
-
const packageAddress = options.package ?? '@local-pkg/routed_stake';
|
|
350
|
-
const argumentsTypes = [
|
|
351
|
-
null
|
|
352
|
-
] satisfies (string | null)[];
|
|
353
|
-
const parameterNames = ["self"];
|
|
354
|
-
return (tx: Transaction) => tx.moveCall({
|
|
355
|
-
package: packageAddress,
|
|
356
|
-
module: 'routed_stake',
|
|
357
|
-
function: 'id',
|
|
358
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
359
|
-
typeArguments: options.typeArguments
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
335
|
export interface HasStakeArguments {
|
|
363
336
|
self: RawTransactionArgument<string>;
|
|
364
337
|
}
|
|
@@ -412,33 +412,6 @@ export function pendingRewards(options: PendingRewardsOptions) {
|
|
|
412
412
|
typeArguments: options.typeArguments
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
|
-
export interface IdArguments {
|
|
416
|
-
self: RawTransactionArgument<string>;
|
|
417
|
-
}
|
|
418
|
-
export interface IdOptions {
|
|
419
|
-
package?: string;
|
|
420
|
-
arguments: IdArguments | [
|
|
421
|
-
self: RawTransactionArgument<string>
|
|
422
|
-
];
|
|
423
|
-
typeArguments: [
|
|
424
|
-
string,
|
|
425
|
-
string
|
|
426
|
-
];
|
|
427
|
-
}
|
|
428
|
-
export function id(options: IdOptions) {
|
|
429
|
-
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
430
|
-
const argumentsTypes = [
|
|
431
|
-
null
|
|
432
|
-
] satisfies (string | null)[];
|
|
433
|
-
const parameterNames = ["self"];
|
|
434
|
-
return (tx: Transaction) => tx.moveCall({
|
|
435
|
-
package: packageAddress,
|
|
436
|
-
module: 'pool',
|
|
437
|
-
function: 'id',
|
|
438
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
439
|
-
typeArguments: options.typeArguments
|
|
440
|
-
});
|
|
441
|
-
}
|
|
442
415
|
export interface BalanceArguments {
|
|
443
416
|
self: RawTransactionArgument<string>;
|
|
444
417
|
}
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* `TypeName`. The stake cannot be destroyed while any registrations remain. Pool
|
|
16
16
|
* registrations are mutated by `royalty_pool::pool` through the package-private
|
|
17
17
|
* accessors below.
|
|
18
|
+
*
|
|
19
|
+
* Custody warning: `pool::claim_rewards` pays accrued rewards to the _caller_, and
|
|
20
|
+
* `Stake` is `key + store` — a bare shared stake (or one wrapped in a shared
|
|
21
|
+
* object that hands out `&mut`) is drainable by anyone. Stakes must stay
|
|
22
|
+
* address-owned, or wrapped by a contract that pins the reward route (e.g.
|
|
23
|
+
* `routed_stake`); the pool cannot enforce this itself.
|
|
18
24
|
*/
|
|
19
25
|
|
|
20
26
|
import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.ts';
|
|
@@ -108,32 +114,6 @@ export function destroy(options: DestroyOptions) {
|
|
|
108
114
|
typeArguments: options.typeArguments
|
|
109
115
|
});
|
|
110
116
|
}
|
|
111
|
-
export interface IdArguments {
|
|
112
|
-
self: RawTransactionArgument<string>;
|
|
113
|
-
}
|
|
114
|
-
export interface IdOptions {
|
|
115
|
-
package?: string;
|
|
116
|
-
arguments: IdArguments | [
|
|
117
|
-
self: RawTransactionArgument<string>
|
|
118
|
-
];
|
|
119
|
-
typeArguments: [
|
|
120
|
-
string
|
|
121
|
-
];
|
|
122
|
-
}
|
|
123
|
-
export function id(options: IdOptions) {
|
|
124
|
-
const packageAddress = options.package ?? '@local-pkg/royalty_pool';
|
|
125
|
-
const argumentsTypes = [
|
|
126
|
-
null
|
|
127
|
-
] satisfies (string | null)[];
|
|
128
|
-
const parameterNames = ["self"];
|
|
129
|
-
return (tx: Transaction) => tx.moveCall({
|
|
130
|
-
package: packageAddress,
|
|
131
|
-
module: 'stake',
|
|
132
|
-
function: 'id',
|
|
133
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
134
|
-
typeArguments: options.typeArguments
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
117
|
export interface BalanceArguments {
|
|
138
118
|
self: RawTransactionArgument<string>;
|
|
139
119
|
}
|
package/src/contracts.ts
CHANGED
|
@@ -28,10 +28,11 @@ import * as rawRecordingPreview from "./contracts/recording_preview/recording_pr
|
|
|
28
28
|
import * as rawReleaseCoverArt from "./contracts/release_cover_art/release_cover_art.ts";
|
|
29
29
|
import * as rawReleaseCredits from "./contracts/release_credits/release_credits.ts";
|
|
30
30
|
import * as rawReleaseDescription from "./contracts/release_description/release_description.ts";
|
|
31
|
-
import * as rawReleaseSnapshotBundle from "./contracts/release_snapshot_bundle/release_snapshot_bundle.ts";
|
|
32
31
|
import * as rawRoyaltyPool from "./contracts/royalty_pool/pool.ts";
|
|
33
32
|
import * as rawRoyaltyStake from "./contracts/royalty_pool/stake.ts";
|
|
34
33
|
import * as rawRoutedStake from "./contracts/routed_stake/routed_stake.ts";
|
|
34
|
+
import * as rawParty from "./contracts/miso_party/party.ts";
|
|
35
|
+
import * as rawPartyProfile from "./contracts/party_profile/party_profile.ts";
|
|
35
36
|
|
|
36
37
|
// Protocol core (BCS codecs remain available; PTB-inaccessible references do not).
|
|
37
38
|
export const composition = withoutUnsafeCalls(rawComposition, ["title", "uid", "uidMut"] as const);
|
|
@@ -55,7 +56,6 @@ export const releaseDescription = withoutUnsafeCalls(rawReleaseDescription, ["de
|
|
|
55
56
|
export * as releaseDspLink from "./contracts/release_dsp_link/release_dsp_link.ts";
|
|
56
57
|
export * as releaseGenre from "./contracts/release_genre/release_genre.ts";
|
|
57
58
|
export * as releaseKind from "./contracts/release_kind/release_kind.ts";
|
|
58
|
-
export const releaseSnapshotBundle = withoutUnsafeCalls(rawReleaseSnapshotBundle, ["snapshotBundle"] as const);
|
|
59
59
|
|
|
60
60
|
// First-party generic primitives.
|
|
61
61
|
export const royaltyPool = withoutUnsafeCalls(rawRoyaltyPool, ["balance", "_new"] as const);
|
|
@@ -64,3 +64,16 @@ export const routedStake = withoutUnsafeCalls(
|
|
|
64
64
|
rawRoutedStake,
|
|
65
65
|
["stake", "_new", "register", "unregister", "unstake", "restake"] as const,
|
|
66
66
|
);
|
|
67
|
+
|
|
68
|
+
// Party core and extensions.
|
|
69
|
+
export const party = withoutUnsafeCalls(rawParty, ["groupMembers", "uid", "uidMut"] as const);
|
|
70
|
+
export * as partyCta from "./contracts/party_cta/party_cta.ts";
|
|
71
|
+
export * as partyGenre from "./contracts/party_genre/party_genre.ts";
|
|
72
|
+
export * as partyMedia from "./contracts/party_media/party_media.ts";
|
|
73
|
+
export * as partyMusic from "./contracts/party_music/party_music.ts";
|
|
74
|
+
export * as partyPlatformLink from "./contracts/party_platform_link/party_platform_link.ts";
|
|
75
|
+
export * as partyProLink from "./contracts/party_pro_link/party_pro_link.ts";
|
|
76
|
+
export const partyProfile = withoutUnsafeCalls(rawPartyProfile, ["profile"] as const);
|
|
77
|
+
export * as partyRoles from "./contracts/party_roles/party_roles.ts";
|
|
78
|
+
export * as partySocial from "./contracts/party_social/party_social.ts";
|
|
79
|
+
export * as partyTags from "./contracts/party_tags/party_tags.ts";
|
package/src/deployments.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
import { normalizeSuiAddress } from "@mysten/sui/utils";
|
|
5
5
|
|
|
6
|
-
/** Sui networks for which this SDK may
|
|
6
|
+
/** Sui networks for which this SDK may bundle a verified deployment. */
|
|
7
7
|
export type MisoNetwork = "mainnet" | "testnet";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Every independently published package
|
|
10
|
+
* Every independently published package required by this SDK surface.
|
|
11
11
|
*
|
|
12
12
|
* These names are stable deployment-manifest keys, not Move module names. Their
|
|
13
13
|
* values are never inferred from source labels or a previous publish.
|
|
@@ -26,9 +26,22 @@ const CANONICAL_MISO_PACKAGE_NAMES = [
|
|
|
26
26
|
"releaseDspLink",
|
|
27
27
|
"releaseGenre",
|
|
28
28
|
"releaseKind",
|
|
29
|
-
"releaseSnapshotBundle",
|
|
30
29
|
"royaltyPool",
|
|
31
30
|
"routedStake",
|
|
31
|
+
"misoParty",
|
|
32
|
+
"partyCta",
|
|
33
|
+
"partyGenre",
|
|
34
|
+
"partyMedia",
|
|
35
|
+
"partyMusic",
|
|
36
|
+
"partyPlatformLink",
|
|
37
|
+
"partyProLink",
|
|
38
|
+
"partyProfile",
|
|
39
|
+
"partyRoles",
|
|
40
|
+
"partySocial",
|
|
41
|
+
"partyTags",
|
|
42
|
+
"countryCode",
|
|
43
|
+
"languageCode",
|
|
44
|
+
"genre",
|
|
32
45
|
] as const;
|
|
33
46
|
|
|
34
47
|
/** Public immutable copy; validation always uses the private canonical tuple. */
|
|
@@ -79,23 +92,50 @@ export function normalizeMisoProtocolDeployment(
|
|
|
79
92
|
return Object.freeze({ packageId });
|
|
80
93
|
}
|
|
81
94
|
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
/** Verified immutable deployments bundled with this SDK release. */
|
|
96
|
+
export const MISO_DEPLOYMENTS = {
|
|
97
|
+
testnet: {
|
|
98
|
+
miso: "0x5788d67e76b7e6de85ba335731a068ef7cbac7b17504577f293d41c5ba3d1ff0",
|
|
99
|
+
compositionCredits: "0x8b376967e9c32169727ec5341890f28c66d8577d7bfcecb83aa78aec3e84dce5",
|
|
100
|
+
recordingAdvisory: "0x28e0e72c5b892fc888a9007afa59ebe04ed8e47f12632ddb42cd685d09c4af2e",
|
|
101
|
+
recordingCredits: "0x7096a47b0ba12063c037d6d417bffade758665a3f313574c8ba218823cfb159a",
|
|
102
|
+
recordingLanguage: "0x4b284a9435cf4f48e3785e4485d16be2fcbcef5beaa2b44b6556d9c1028e2c0d",
|
|
103
|
+
recordingMasterReference: "0x2b06ab58f2d5a915b42fc5879d52241fc72e804b3da782fa752b2d2f242170c0",
|
|
104
|
+
recordingPreview: "0x449aafe29707adf249df7e90355ecb19d939ea77d9e19fd3e2fdb220e73e74f0",
|
|
105
|
+
releaseCoverArt: "0x649b18f2bb3d94f6a611a8e4ad3a29dcf8b7bba3f684056d60897a8a5e835106",
|
|
106
|
+
releaseCredits: "0xbe293700ef758c95b69838df6cfa8377b9cad1dd59cbf933974f68b1766d87b5",
|
|
107
|
+
releaseDescription: "0x3e26e4c4c5b3f51070d6d7bb1527eaa304f34ae5dfde078661e180e7594d6d28",
|
|
108
|
+
releaseDspLink: "0xd9f9e7240c397a82e4af1ecb9ec75b29a91ef4084127eabcf22fbf24e72cab2f",
|
|
109
|
+
releaseGenre: "0xc1012f9768f178ca908ef4a6cfd150ad33baaa3587dc2154ea9852858243cd57",
|
|
110
|
+
releaseKind: "0x3e74c960d9446ae2ebf228456ddc1b099d2090501c9cbcd284a999aa2e774e12",
|
|
111
|
+
royaltyPool: "0xbeddbcfc2c42ed1bcaa74dc241957621b48241451e10af136c20cdc7df8266b8",
|
|
112
|
+
routedStake: "0x7a55b1841043efea865d65a6601e057400a79a0aa7bb11e781a25dbe622cbe5f",
|
|
113
|
+
misoParty: "0xb0a16174ef4b24a744619d4a84dd7425150a3c6f0191752f19cb743708a5c542",
|
|
114
|
+
partyCta: "0xf385934b1291d262048712c09f6ed1745487f4795e2d87be9c7520a72c0fbde3",
|
|
115
|
+
partyGenre: "0xdd31b28d31632c9d7617f2daca5a43b5d6b105c67b26d1e48eb74532ece16935",
|
|
116
|
+
partyMedia: "0x149794c510c84fa40042a9d064efac710ba89fa9607fe6342dc7091120b8f6a7",
|
|
117
|
+
partyMusic: "0x491706bec2d57bbd3e1cda822d3228306f80360c0a965fc3b9293f0f24d33638",
|
|
118
|
+
partyPlatformLink: "0xb1b555e8f02ed32e49fcd13defe0e03755679fd665a5c348f02eb407ebb15b85",
|
|
119
|
+
partyProLink: "0x0be57adad52ba72d9697526fb5d9330ebd3e44868f869836fc981b8df23e8519",
|
|
120
|
+
partyProfile: "0xe01228bbcd4d9bcd4546ca47f50733efdd47c093eeab2a63b2c08092a455a48f",
|
|
121
|
+
partyRoles: "0xd033233515398f1352434d5d469204949b80f1b018050ed085f5b3baf5a551b1",
|
|
122
|
+
partySocial: "0x23e8eebf229d4284297964f3b9ceab1574da515260afad22da7a113d14fec952",
|
|
123
|
+
partyTags: "0x1807589b09b4048aca2b52fd7dbd19bd90c3a1b00b2e7af928346aae295721c9",
|
|
124
|
+
countryCode: "0x6c3a53f228ccd089825d0fb5ee1f0465a4b7a438bc1b1735b4e2f01df8d056e9",
|
|
125
|
+
languageCode: "0xa18b786807cfc45488691f93aa647800b77cf9993e420d110afd7024c5b15948",
|
|
126
|
+
genre: "0x978d5f67a4fdc3eb688ed3aeb23c6c3c37ae44e358fb709001e6ab21e6f19f34",
|
|
127
|
+
},
|
|
128
|
+
} as const satisfies Partial<
|
|
89
129
|
Record<MisoNetwork, MisoDeployment>
|
|
90
130
|
>;
|
|
91
131
|
|
|
92
132
|
/**
|
|
93
|
-
* @deprecated Use `MISO_DEPLOYMENTS`. This
|
|
94
|
-
*
|
|
133
|
+
* @deprecated Use `MISO_DEPLOYMENTS`. This alias preserves source compatibility
|
|
134
|
+
* for callers that still use the former protocol-only constant name.
|
|
95
135
|
*/
|
|
96
136
|
export const MISO_PROTOCOL_DEPLOYMENTS = MISO_DEPLOYMENTS;
|
|
97
137
|
|
|
98
|
-
/** Resolve a verified full manifest, failing closed
|
|
138
|
+
/** Resolve a verified full manifest, failing closed for unbundled networks. */
|
|
99
139
|
export function getMisoDeployment(network: string): MisoDeployment {
|
|
100
140
|
const deployment = (
|
|
101
141
|
MISO_DEPLOYMENTS as Partial<Record<string, MisoDeployment>>
|
|
@@ -131,7 +171,9 @@ export function assertMisoDeployment(
|
|
|
131
171
|
deployment: unknown,
|
|
132
172
|
): asserts deployment is MisoDeployment {
|
|
133
173
|
if (!deployment || typeof deployment !== "object" || Array.isArray(deployment)) {
|
|
134
|
-
throw new Error(
|
|
174
|
+
throw new Error(
|
|
175
|
+
`@misonetwork/sdk: deployment must be an object with exactly ${CANONICAL_MISO_PACKAGE_NAMES.length} Miso package IDs.`,
|
|
176
|
+
);
|
|
135
177
|
}
|
|
136
178
|
const entries = deployment as Record<string, unknown>;
|
|
137
179
|
const keys = Object.keys(entries);
|
package/src/events.ts
CHANGED
|
@@ -20,7 +20,6 @@ import * as releaseDescription from "./contracts/release_description/release_des
|
|
|
20
20
|
import * as releaseDspLink from "./contracts/release_dsp_link/release_dsp_link.ts";
|
|
21
21
|
import * as releaseGenre from "./contracts/release_genre/release_genre.ts";
|
|
22
22
|
import * as releaseKind from "./contracts/release_kind/release_kind.ts";
|
|
23
|
-
import * as releaseSnapshotBundle from "./contracts/release_snapshot_bundle/release_snapshot_bundle.ts";
|
|
24
23
|
import * as release from "./contracts/miso/release.ts";
|
|
25
24
|
import * as royaltyPool from "./contracts/royalty_pool/pool.ts";
|
|
26
25
|
import * as royaltyStake from "./contracts/royalty_pool/stake.ts";
|
|
@@ -105,9 +104,6 @@ export const eventParsers = {
|
|
|
105
104
|
kindSet: decoder(releaseKind.KindSetEvent),
|
|
106
105
|
kindUnset: decoder(releaseKind.KindUnsetEvent),
|
|
107
106
|
},
|
|
108
|
-
releaseSnapshotBundle: {
|
|
109
|
-
bundleSet: decoder(releaseSnapshotBundle.SnapshotBundleSetEvent),
|
|
110
|
-
},
|
|
111
107
|
},
|
|
112
108
|
primitives: {
|
|
113
109
|
royaltyPool: {
|
package/src/index.ts
CHANGED
|
@@ -15,6 +15,8 @@ export * from "./view.ts";
|
|
|
15
15
|
export * from "./client.ts";
|
|
16
16
|
export * from "./deployments.ts";
|
|
17
17
|
export * from "./packages.ts";
|
|
18
|
+
export * as party from "./party/index.ts";
|
|
19
|
+
export type { PartyProtocolClient } from "./party/client.ts";
|
|
18
20
|
|
|
19
21
|
// Generated, ABI-bound bindings (BCS structs + type-safe Move calls).
|
|
20
22
|
export * as contracts from "./contracts.ts";
|
package/src/packages.ts
CHANGED
|
@@ -31,12 +31,23 @@ import * as releaseDescription from "./contracts/release_description/release_des
|
|
|
31
31
|
import * as releaseDspLink from "./contracts/release_dsp_link/release_dsp_link.ts";
|
|
32
32
|
import * as releaseGenre from "./contracts/release_genre/release_genre.ts";
|
|
33
33
|
import * as releaseKind from "./contracts/release_kind/release_kind.ts";
|
|
34
|
-
import * as releaseSnapshotBundle from "./contracts/release_snapshot_bundle/release_snapshot_bundle.ts";
|
|
35
34
|
|
|
36
35
|
import * as royaltyPool from "./contracts/royalty_pool/pool.ts";
|
|
37
36
|
import * as royaltyStake from "./contracts/royalty_pool/stake.ts";
|
|
38
37
|
import * as routedStake from "./contracts/routed_stake/routed_stake.ts";
|
|
39
38
|
|
|
39
|
+
import * as party from "./contracts/miso_party/party.ts";
|
|
40
|
+
import * as partyCta from "./contracts/party_cta/party_cta.ts";
|
|
41
|
+
import * as partyGenre from "./contracts/party_genre/party_genre.ts";
|
|
42
|
+
import * as partyMedia from "./contracts/party_media/party_media.ts";
|
|
43
|
+
import * as partyMusic from "./contracts/party_music/party_music.ts";
|
|
44
|
+
import * as partyPlatformLink from "./contracts/party_platform_link/party_platform_link.ts";
|
|
45
|
+
import * as partyProLink from "./contracts/party_pro_link/party_pro_link.ts";
|
|
46
|
+
import * as partyProfile from "./contracts/party_profile/party_profile.ts";
|
|
47
|
+
import * as partyRoles from "./contracts/party_roles/party_roles.ts";
|
|
48
|
+
import * as partySocial from "./contracts/party_social/party_social.ts";
|
|
49
|
+
import * as partyTags from "./contracts/party_tags/party_tags.ts";
|
|
50
|
+
|
|
40
51
|
type BoundMoveFunction<F> = F extends (options: infer Options) => infer Result
|
|
41
52
|
? Options extends { package?: unknown }
|
|
42
53
|
? (options: Omit<Options, "package">) => Result
|
|
@@ -97,7 +108,6 @@ export const REF_RETURNING_CALLS = {
|
|
|
97
108
|
releaseCoverArt: ["cover"],
|
|
98
109
|
releaseCredits: ["credits"],
|
|
99
110
|
releaseDescription: ["description"],
|
|
100
|
-
releaseSnapshotBundle: ["snapshotBundle"],
|
|
101
111
|
// `new` is emitted as `_new`; its `&mut UID` parent credential cannot be
|
|
102
112
|
// constructed by a caller-side PTB, so only authority-package code may use it.
|
|
103
113
|
royaltyPool: ["balance", "_new"],
|
|
@@ -106,6 +116,8 @@ export const REF_RETURNING_CALLS = {
|
|
|
106
116
|
// caller-provided PTB input. Only `share`, `sweep`, scalar reads and derives
|
|
107
117
|
// remain usable at this layer.
|
|
108
118
|
routedStake: ["stake", "_new", "register", "unregister", "unstake", "restake"],
|
|
119
|
+
party: ["groupMembers", "uid", "uidMut"],
|
|
120
|
+
partyProfile: ["profile"],
|
|
109
121
|
} as const;
|
|
110
122
|
|
|
111
123
|
/**
|
|
@@ -188,11 +200,6 @@ export class MisoPackageBindings {
|
|
|
188
200
|
releaseDspLink: bindModulePackage(releaseDspLink, d.releaseDspLink),
|
|
189
201
|
releaseGenre: bindModulePackage(releaseGenre, d.releaseGenre),
|
|
190
202
|
releaseKind: bindModulePackage(releaseKind, d.releaseKind),
|
|
191
|
-
releaseSnapshotBundle: bindModulePackage(
|
|
192
|
-
releaseSnapshotBundle,
|
|
193
|
-
d.releaseSnapshotBundle,
|
|
194
|
-
REF_RETURNING_CALLS.releaseSnapshotBundle,
|
|
195
|
-
),
|
|
196
203
|
},
|
|
197
204
|
primitives: {
|
|
198
205
|
royaltyPool: {
|
|
@@ -201,6 +208,19 @@ export class MisoPackageBindings {
|
|
|
201
208
|
},
|
|
202
209
|
routedStake: bindModulePackage(routedStake, d.routedStake, REF_RETURNING_CALLS.routedStake),
|
|
203
210
|
},
|
|
211
|
+
party: {
|
|
212
|
+
core: bindModulePackage(party, d.misoParty, REF_RETURNING_CALLS.party),
|
|
213
|
+
cta: bindModulePackage(partyCta, d.partyCta),
|
|
214
|
+
genre: bindModulePackage(partyGenre, d.partyGenre),
|
|
215
|
+
media: bindModulePackage(partyMedia, d.partyMedia),
|
|
216
|
+
music: bindModulePackage(partyMusic, d.partyMusic),
|
|
217
|
+
platformLink: bindModulePackage(partyPlatformLink, d.partyPlatformLink),
|
|
218
|
+
proLink: bindModulePackage(partyProLink, d.partyProLink),
|
|
219
|
+
profile: bindModulePackage(partyProfile, d.partyProfile, REF_RETURNING_CALLS.partyProfile),
|
|
220
|
+
roles: bindModulePackage(partyRoles, d.partyRoles),
|
|
221
|
+
social: bindModulePackage(partySocial, d.partySocial),
|
|
222
|
+
tags: bindModulePackage(partyTags, d.partyTags),
|
|
223
|
+
},
|
|
204
224
|
};
|
|
205
225
|
}
|
|
206
226
|
|
|
@@ -235,12 +255,24 @@ export class MisoPackageBindings {
|
|
|
235
255
|
releaseDspLink: codecsOnly(releaseDspLink),
|
|
236
256
|
releaseGenre: codecsOnly(releaseGenre),
|
|
237
257
|
releaseKind: codecsOnly(releaseKind),
|
|
238
|
-
releaseSnapshotBundle: codecsOnly(releaseSnapshotBundle),
|
|
239
258
|
},
|
|
240
259
|
primitives: {
|
|
241
260
|
royaltyPool: { pool: codecsOnly(royaltyPool), stake: codecsOnly(royaltyStake) },
|
|
242
261
|
routedStake: codecsOnly(routedStake),
|
|
243
262
|
},
|
|
263
|
+
party: {
|
|
264
|
+
core: codecsOnly(party),
|
|
265
|
+
cta: codecsOnly(partyCta),
|
|
266
|
+
genre: codecsOnly(partyGenre),
|
|
267
|
+
media: codecsOnly(partyMedia),
|
|
268
|
+
music: codecsOnly(partyMusic),
|
|
269
|
+
platformLink: codecsOnly(partyPlatformLink),
|
|
270
|
+
proLink: codecsOnly(partyProLink),
|
|
271
|
+
profile: codecsOnly(partyProfile),
|
|
272
|
+
roles: codecsOnly(partyRoles),
|
|
273
|
+
social: codecsOnly(partySocial),
|
|
274
|
+
tags: codecsOnly(partyTags),
|
|
275
|
+
},
|
|
244
276
|
};
|
|
245
277
|
}
|
|
246
278
|
}
|