@misofm/platform 0.0.0 → 0.18.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/LICENSE +201 -0
- package/README.md +686 -3
- package/dist/auth.d.ts +73 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +193 -0
- package/dist/auth.js.map +1 -0
- package/dist/catalog.d.ts +48 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +92 -0
- package/dist/catalog.js.map +1 -0
- package/dist/client.d.ts +462 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +788 -0
- package/dist/client.js.map +1 -0
- package/dist/contracts.d.ts +34 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +49 -0
- package/dist/contracts.js.map +1 -0
- package/dist/cover.d.ts +69 -0
- package/dist/cover.d.ts.map +1 -0
- package/dist/cover.js +132 -0
- package/dist/cover.js.map +1 -0
- package/dist/credits.d.ts +200 -0
- package/dist/credits.d.ts.map +1 -0
- package/dist/credits.js +465 -0
- package/dist/credits.js.map +1 -0
- package/dist/deployments.d.ts +224 -0
- package/dist/deployments.d.ts.map +1 -0
- package/dist/deployments.js +177 -0
- package/dist/deployments.js.map +1 -0
- package/dist/execute.d.ts +30 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +31 -0
- package/dist/execute.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +13 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +41 -0
- package/dist/internal.js.map +1 -0
- package/dist/mix.d.ts +144 -0
- package/dist/mix.d.ts.map +1 -0
- package/dist/mix.js +656 -0
- package/dist/mix.js.map +1 -0
- package/dist/pressing.d.ts +137 -0
- package/dist/pressing.d.ts.map +1 -0
- package/dist/pressing.js +390 -0
- package/dist/pressing.js.map +1 -0
- package/dist/publication.d.ts +216 -0
- package/dist/publication.d.ts.map +1 -0
- package/dist/publication.js +872 -0
- package/dist/publication.js.map +1 -0
- package/dist/queries.d.ts +2 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +8 -0
- package/dist/queries.js.map +1 -0
- package/dist/read/artist.d.ts +18 -0
- package/dist/read/artist.d.ts.map +1 -0
- package/dist/read/artist.js +86 -0
- package/dist/read/artist.js.map +1 -0
- package/dist/read/catalog.d.ts +93 -0
- package/dist/read/catalog.d.ts.map +1 -0
- package/dist/read/catalog.js +441 -0
- package/dist/read/catalog.js.map +1 -0
- package/dist/read/client.d.ts +37 -0
- package/dist/read/client.d.ts.map +1 -0
- package/dist/read/client.js +50 -0
- package/dist/read/client.js.map +1 -0
- package/dist/read/config.d.ts +68 -0
- package/dist/read/config.d.ts.map +1 -0
- package/dist/read/config.js +63 -0
- package/dist/read/config.js.map +1 -0
- package/dist/read/genres.d.ts +7 -0
- package/dist/read/genres.d.ts.map +1 -0
- package/dist/read/genres.js +38 -0
- package/dist/read/genres.js.map +1 -0
- package/dist/read/index.d.ts +14 -0
- package/dist/read/index.d.ts.map +1 -0
- package/dist/read/index.js +23 -0
- package/dist/read/index.js.map +1 -0
- package/dist/read/internal/scalars.d.ts +23 -0
- package/dist/read/internal/scalars.d.ts.map +1 -0
- package/dist/read/internal/scalars.js +57 -0
- package/dist/read/internal/scalars.js.map +1 -0
- package/dist/read/internal/walrus.d.ts +6 -0
- package/dist/read/internal/walrus.d.ts.map +1 -0
- package/dist/read/internal/walrus.js +29 -0
- package/dist/read/internal/walrus.js.map +1 -0
- package/dist/read/receipts.d.ts +41 -0
- package/dist/read/receipts.d.ts.map +1 -0
- package/dist/read/receipts.js +398 -0
- package/dist/read/receipts.js.map +1 -0
- package/dist/read/types.d.ts +328 -0
- package/dist/read/types.d.ts.map +1 -0
- package/dist/read/types.js +21 -0
- package/dist/read/types.js.map +1 -0
- package/dist/read/wallet.d.ts +74 -0
- package/dist/read/wallet.d.ts.map +1 -0
- package/dist/read/wallet.js +578 -0
- package/dist/read/wallet.js.map +1 -0
- package/dist/read/works.d.ts +29 -0
- package/dist/read/works.d.ts.map +1 -0
- package/dist/read/works.js +191 -0
- package/dist/read/works.js.map +1 -0
- package/dist/recording-extensions.d.ts +62 -0
- package/dist/recording-extensions.d.ts.map +1 -0
- package/dist/recording-extensions.js +159 -0
- package/dist/recording-extensions.js.map +1 -0
- package/dist/release-extensions.d.ts +93 -0
- package/dist/release-extensions.d.ts.map +1 -0
- package/dist/release-extensions.js +190 -0
- package/dist/release-extensions.js.map +1 -0
- package/dist/release-graph.d.ts +65 -0
- package/dist/release-graph.d.ts.map +1 -0
- package/dist/release-graph.js +136 -0
- package/dist/release-graph.js.map +1 -0
- package/dist/share-template.d.ts +3 -0
- package/dist/share-template.d.ts.map +1 -0
- package/dist/share-template.js +46 -0
- package/dist/share-template.js.map +1 -0
- package/dist/share.d.ts +67 -0
- package/dist/share.d.ts.map +1 -0
- package/dist/share.js +157 -0
- package/dist/share.js.map +1 -0
- package/dist/transactions.d.ts +216 -0
- package/dist/transactions.d.ts.map +1 -0
- package/dist/transactions.js +314 -0
- package/dist/transactions.js.map +1 -0
- package/dist/vault.d.ts +364 -0
- package/dist/vault.d.ts.map +1 -0
- package/dist/vault.js +507 -0
- package/dist/vault.js.map +1 -0
- package/package.json +145 -5
- package/src/auth.ts +275 -0
- package/src/catalog.ts +189 -0
- package/src/client.ts +1320 -0
- package/src/contracts.ts +54 -0
- package/src/cover.ts +240 -0
- package/src/credits.ts +906 -0
- package/src/deployments.ts +357 -0
- package/src/execute.ts +52 -0
- package/src/index.ts +69 -0
- package/src/internal.ts +46 -0
- package/src/mix.ts +910 -0
- package/src/pressing.ts +705 -0
- package/src/publication.ts +1214 -0
- package/src/queries.ts +9 -0
- package/src/read/artist.ts +118 -0
- package/src/read/catalog.ts +668 -0
- package/src/read/client.ts +87 -0
- package/src/read/config.ts +138 -0
- package/src/read/genres.ts +37 -0
- package/src/read/index.ts +85 -0
- package/src/read/internal/scalars.ts +59 -0
- package/src/read/internal/walrus.ts +42 -0
- package/src/read/receipts.ts +476 -0
- package/src/read/types.ts +415 -0
- package/src/read/wallet.ts +687 -0
- package/src/read/works.ts +297 -0
- package/src/recording-extensions.ts +256 -0
- package/src/release-extensions.ts +311 -0
- package/src/release-graph.ts +219 -0
- package/src/share-template.ts +55 -0
- package/src/share.ts +261 -0
- package/src/transactions.ts +542 -0
- package/src/vault.ts +1009 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import type { MisoDeployment, MisoNetwork } from "@misofm/protocol/deployments";
|
|
2
|
+
/** Primary Record sales are unavailable on legacy deployments until both new
|
|
3
|
+
* immutable packages have been freshly published and verified. */
|
|
4
|
+
export type RecordSalesDeployment = {
|
|
5
|
+
readonly status: "unavailable";
|
|
6
|
+
readonly reason: string;
|
|
7
|
+
readonly legacy?: {
|
|
8
|
+
readonly recordPackageId: string;
|
|
9
|
+
readonly pressingPackageId: string;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
readonly status: "available";
|
|
13
|
+
readonly recordPackageId: string;
|
|
14
|
+
readonly recordShopPackageId: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class RecordSalesUnavailableError extends Error {
|
|
17
|
+
readonly reason: string;
|
|
18
|
+
readonly name = "RecordSalesUnavailableError";
|
|
19
|
+
constructor(reason: string);
|
|
20
|
+
}
|
|
21
|
+
export declare function requireRecordSalesDeployment(deployment: RecordSalesDeployment | undefined): Extract<RecordSalesDeployment, {
|
|
22
|
+
status: "available";
|
|
23
|
+
}>;
|
|
24
|
+
/** Vault custody and the exact Action/plugin ABI deployed alongside it. */
|
|
25
|
+
export type OperationsDeployment = {
|
|
26
|
+
readonly status: "unavailable";
|
|
27
|
+
readonly reason: string;
|
|
28
|
+
/** Historical identities are metadata only and are never executable ABIs. */
|
|
29
|
+
readonly legacy?: {
|
|
30
|
+
readonly vaultPackageId?: string;
|
|
31
|
+
readonly vaultRegistryId?: string;
|
|
32
|
+
readonly packageIds?: Readonly<Record<string, string>>;
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
readonly status: "available";
|
|
36
|
+
readonly vault: {
|
|
37
|
+
readonly packageId: string;
|
|
38
|
+
readonly registryId: string;
|
|
39
|
+
};
|
|
40
|
+
readonly actions: {
|
|
41
|
+
readonly compositionRoyaltyPool: string;
|
|
42
|
+
readonly recordingRoyaltyPool: string;
|
|
43
|
+
readonly partyWallet: string;
|
|
44
|
+
readonly compositionRoutedStake: string;
|
|
45
|
+
readonly releaseRevenueDistributor: string;
|
|
46
|
+
};
|
|
47
|
+
readonly plugins: {
|
|
48
|
+
readonly compositionRoyaltyPool: string;
|
|
49
|
+
readonly recordingRoyaltyPool: string;
|
|
50
|
+
readonly releaseRevenueDistributor: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export declare class OperationsUnavailableError extends Error {
|
|
54
|
+
readonly reason: string;
|
|
55
|
+
readonly name = "OperationsUnavailableError";
|
|
56
|
+
constructor(reason: string);
|
|
57
|
+
}
|
|
58
|
+
export type AvailableOperationsDeployment = Extract<OperationsDeployment, {
|
|
59
|
+
status: "available";
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Require one complete, non-aliased operations deployment.
|
|
63
|
+
*
|
|
64
|
+
* This validates only a complete canonical, pairwise-distinct structural set.
|
|
65
|
+
* It cannot establish provenance for arbitrary caller-supplied custom IDs; the
|
|
66
|
+
* caller owns that provenance. The bundled frozen map below is generated from
|
|
67
|
+
* one verified immutable admin export.
|
|
68
|
+
*/
|
|
69
|
+
export declare function requireOperationsDeployment(deployment: OperationsDeployment | undefined): AvailableOperationsDeployment;
|
|
70
|
+
/** Complete on-chain identity used by the Miso platform SDK on one network. */
|
|
71
|
+
export interface MisoPlatformDeployment {
|
|
72
|
+
/** Network name this immutable deployment set belongs to. */
|
|
73
|
+
readonly network: MisoNetwork;
|
|
74
|
+
/** Full ledger genesis digest used to reject a mislabeled RPC endpoint. */
|
|
75
|
+
readonly chainIdentifier: string;
|
|
76
|
+
/** The complete protocol and Party deployment this platform build targets. */
|
|
77
|
+
readonly protocol: MisoDeployment;
|
|
78
|
+
readonly recordSales: RecordSalesDeployment;
|
|
79
|
+
/** Fail-closed, structurally complete Vault/Action/plugin identity set. */
|
|
80
|
+
readonly operations: OperationsDeployment;
|
|
81
|
+
readonly packages: {
|
|
82
|
+
readonly minato: string;
|
|
83
|
+
readonly credit: string;
|
|
84
|
+
readonly compositionCredits: string;
|
|
85
|
+
readonly recordingCredits: string;
|
|
86
|
+
readonly releaseCredits: string;
|
|
87
|
+
/** Base royalty-pool value library. */
|
|
88
|
+
readonly royaltyPool: string;
|
|
89
|
+
/** Generic stake wrapper used by composition routed-stake operations. */
|
|
90
|
+
readonly routedStake: string;
|
|
91
|
+
/** Cover-art value type used by the release cover extension. */
|
|
92
|
+
readonly coverArt: string;
|
|
93
|
+
readonly releaseCoverArt: string;
|
|
94
|
+
/** Curated Genre vocabulary package used by release_genre. */
|
|
95
|
+
readonly genre: string;
|
|
96
|
+
readonly releaseDescription: string;
|
|
97
|
+
readonly releaseDspLink: string;
|
|
98
|
+
readonly releaseGenre: string;
|
|
99
|
+
readonly releaseKind: string;
|
|
100
|
+
readonly recordingAdvisory: string;
|
|
101
|
+
readonly recordingLanguage: string;
|
|
102
|
+
readonly recordingMasterReference: string;
|
|
103
|
+
/** Complete Walrus Quilt containing the Recording's streaming transcodes. */
|
|
104
|
+
readonly recordingStreamingTranscode?: string;
|
|
105
|
+
/** Canonical plaintext session pointer extension; absent before publication. */
|
|
106
|
+
readonly recordingEngineSession?: string;
|
|
107
|
+
/** Original immutable Record-gated Seal policy; absent before publication. */
|
|
108
|
+
readonly recordSealPolicy?: string;
|
|
109
|
+
readonly recordingPreview: string;
|
|
110
|
+
/** External `ori::walrus_data::WalrusData` dependency used by cover art. */
|
|
111
|
+
readonly ori: string;
|
|
112
|
+
};
|
|
113
|
+
readonly objects: {
|
|
114
|
+
readonly releaseRegistry: string;
|
|
115
|
+
/** Shared parent used to derive canonical Genre object ids. */
|
|
116
|
+
readonly genreRegistry: string;
|
|
117
|
+
/** Frozen namespace object embedded in Recording-session Seal identities. */
|
|
118
|
+
readonly recordGate?: string;
|
|
119
|
+
};
|
|
120
|
+
readonly legacy: {
|
|
121
|
+
readonly releaseCoverArtPackages: readonly string[];
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Platform deployments bundled with this SDK release.
|
|
126
|
+
*
|
|
127
|
+
* IDs come only from verified immutable deployment output.
|
|
128
|
+
* Consumers may still pass an explicit complete deployment for custom networks.
|
|
129
|
+
*/
|
|
130
|
+
export declare const MISO_PLATFORM_DEPLOYMENTS: {
|
|
131
|
+
readonly testnet: {
|
|
132
|
+
readonly network: "testnet";
|
|
133
|
+
readonly chainIdentifier: "69WiPg3DAQiwdxfncX6wYQ2siKwAe6L9BZthQea3JNMD";
|
|
134
|
+
readonly protocol: Readonly<{
|
|
135
|
+
readonly miso: "0xd3135400c8852a5c276c489bda3ebc97acb9cb440f415d05a4db5062f5592e7b";
|
|
136
|
+
readonly compositionCredits: "0xc58ac5d69740866f6514f68f2e9c86b1d069d819ad0bcf5384b6aaa66e0fbf53";
|
|
137
|
+
readonly recordingAdvisory: "0x23abf3f248466c08edc3349b202d6e809064c0e52098ff290cef1fdc51d5942e";
|
|
138
|
+
readonly recordingCredits: "0x7bafa653854f0820d911b8f6aa0aac3b131163c254b0021330881b77206d4d79";
|
|
139
|
+
readonly recordingLanguage: "0xb3e1c578638a79acc7ab573c994206047ad8ef76893f9c5c987887c5b10a5c68";
|
|
140
|
+
readonly recordingMasterReference: "0x92a752854b80a6103721743125ee48223b577a023fe360e25d3aa695462a6d15";
|
|
141
|
+
readonly recordingPreview: "0x2be8405f6b77a30d6942cb240c0d804d608ef761395e6f861b71d9ae3c98f997";
|
|
142
|
+
readonly releaseCoverArt: "0x4f0a8736685f6b1ddbcd0bddcd7aae2d072aa3d4043efc0ad4042a7786068999";
|
|
143
|
+
readonly releaseCredits: "0x47ccd23c669b023b8678193e7748235916e16e737fdd8ba48b131ded29c76a00";
|
|
144
|
+
readonly releaseDescription: "0x50f5acf7c0c05cdc7656072fd1bfc5ee76d02beabeae090103734b2d75118fa3";
|
|
145
|
+
readonly releaseDspLink: "0x9ca9ad8cab49c4897cd3cb89628b771ee4f10831ddc273036837751a5339d02a";
|
|
146
|
+
readonly releaseGenre: "0xfb73b04be2f72704ec5e6a1035bfab108e5ee2a72e72c0505f999291e23219bd";
|
|
147
|
+
readonly releaseKind: "0xfb2e5790f0577aca3ac8ddd672c4c58ef1e49ef1c3dfe14fb9676aaabf769169";
|
|
148
|
+
readonly royaltyPool: "0xecaa5a29cf8e110face3b80f0e4a5554e8c80edd8eda0983ed2f8015367eecca";
|
|
149
|
+
readonly routedStake: "0x30ed387d3fea69579ddb34d011fa6e1416580bfb3ee6587aabf103fb0d17bced";
|
|
150
|
+
readonly misoParty: "0xd665048a47aa6a75be2d8005bf7d4fa7b0decfb9eea3bd80704a07bc423477f5";
|
|
151
|
+
readonly partyCta: "0x0c0456395d9c5d45b5db64388a61f6ea55e876b892079ba75afe80265b6b9421";
|
|
152
|
+
readonly partyGenre: "0x692886e74a7059ac8b41cbb10d79e0b64a131199764febd5cc5ff130a5d7c0fa";
|
|
153
|
+
readonly partyMedia: "0x24723643ac0631b5fa2c7fce05201c535856f9c738ccf244a2ee1ef0f3d352a7";
|
|
154
|
+
readonly partyMusic: "0x59feb686f0c62fb2d3f37ffa4893a237f3aec3833c2103c9b5f9c33af8afc807";
|
|
155
|
+
readonly partyPlatformLink: "0x0993d48b20590e3528c2c28216d2dbb528ecc4faa255711dd6df822cb390871a";
|
|
156
|
+
readonly partyProLink: "0xc2adf0cd2f0e0a9c824cff18d09f6258d41d7131e626b1fe568150f036b96974";
|
|
157
|
+
readonly partyProfile: "0xcbc13c97422863c3db41a832f4f00616f29f1d5faef02c924d01b85b5878e8a4";
|
|
158
|
+
readonly partyRoles: "0xbc32130038e2b7e0e703cb0b2b0f8927047855e832791343495d07acf6eae724";
|
|
159
|
+
readonly partySocial: "0x267ac643ab38c5b185fd566c0c90a4bbdfedb3b81a8643f2cd1385270782bd45";
|
|
160
|
+
readonly partyTags: "0x7c12c2837c2949ae56b61047ca74563421de4aaaf8cb8ffa8006a2428779ae4a";
|
|
161
|
+
readonly countryCode: "0x69fb214a74d5253971a45b2d07f83f13ae96992dd38198d7bacb21e1f5fb5f81";
|
|
162
|
+
readonly languageCode: "0xac318126565a2fab608984a091b3582ba9cda6c32232f567eef50277c5042c36";
|
|
163
|
+
readonly genre: "0x01e58dbc76c15c9ac137dabac1823ebd6ef81efd563c5121000bc11c51a47cc7";
|
|
164
|
+
}>;
|
|
165
|
+
readonly recordSales: {
|
|
166
|
+
readonly status: "available";
|
|
167
|
+
readonly recordPackageId: "0x75e5fa520c39322e0526ff56a495f9a2a88d097e2df7902d94e58a9a12831e76";
|
|
168
|
+
readonly recordShopPackageId: "0x2b97df3773040bb2cffd8c329bfd57f05f1fd2defb6ab156050ba1ae540d5d2a";
|
|
169
|
+
};
|
|
170
|
+
readonly operations: {
|
|
171
|
+
readonly status: "available";
|
|
172
|
+
readonly vault: {
|
|
173
|
+
readonly packageId: "0xaed1aa729452c77f4c62882b73317851d628c30af55355c81eb1c93d3d3276ac";
|
|
174
|
+
readonly registryId: "0x5de3c379a15e4609260a94ace3d186cc466366fc6aebafe5663c016057b6a2d6";
|
|
175
|
+
};
|
|
176
|
+
readonly actions: {
|
|
177
|
+
readonly compositionRoyaltyPool: "0x46b9b193255f28ec5190e8cd37ae85397c9110266da73a4a7a94fcb6e990155b";
|
|
178
|
+
readonly recordingRoyaltyPool: "0x78964bdc2dd7fad943633542edf5a1c9be38b1d2d25de1cc6cca64757c7d037a";
|
|
179
|
+
readonly partyWallet: "0x934f15715f725e3eed2acaeda5c717b6641dce4bb88b7670db26249cb6646728";
|
|
180
|
+
readonly compositionRoutedStake: "0xb1539001eaf32350d7044acb03092dcbd5a366e708d959aece0cca683f7f57fc";
|
|
181
|
+
readonly releaseRevenueDistributor: "0xd19dde6c20fa41092c9645e8300284cf1a268ab5ed3b3c7a2a12593672203b45";
|
|
182
|
+
};
|
|
183
|
+
readonly plugins: {
|
|
184
|
+
readonly compositionRoyaltyPool: "0xad3525b86fad3f2aaaa3fdf0430d690efba249e378b1b89ed8180ecbc5d89392";
|
|
185
|
+
readonly recordingRoyaltyPool: "0x2adfc809152c5c8cf07f0e466d881b62d48c7da3ae2e787c0471deb867a6a385";
|
|
186
|
+
readonly releaseRevenueDistributor: "0x4f1da8c04ec53749f6cf6e8d2d48701fd72654078240050e20e41dc774f93d46";
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
readonly packages: {
|
|
190
|
+
readonly minato: "0xcdf58ed7e4580118a6a3f2a8077abffe633c551b2f19e95ce01685d42f90b8d9";
|
|
191
|
+
readonly credit: "0xc5a82310ce313af8f0ec18a4e564af11971b360db9e2ae686fef86fb2297a9a9";
|
|
192
|
+
readonly compositionCredits: "0xc58ac5d69740866f6514f68f2e9c86b1d069d819ad0bcf5384b6aaa66e0fbf53";
|
|
193
|
+
readonly recordingCredits: "0x7bafa653854f0820d911b8f6aa0aac3b131163c254b0021330881b77206d4d79";
|
|
194
|
+
readonly releaseCredits: "0x47ccd23c669b023b8678193e7748235916e16e737fdd8ba48b131ded29c76a00";
|
|
195
|
+
readonly royaltyPool: "0xecaa5a29cf8e110face3b80f0e4a5554e8c80edd8eda0983ed2f8015367eecca";
|
|
196
|
+
readonly routedStake: "0x30ed387d3fea69579ddb34d011fa6e1416580bfb3ee6587aabf103fb0d17bced";
|
|
197
|
+
readonly coverArt: "0x2b811f82d33cf6a9448adb11a598f6b04c14970cfc8e2982cde1d468e8e7d4a4";
|
|
198
|
+
readonly releaseCoverArt: "0x4f0a8736685f6b1ddbcd0bddcd7aae2d072aa3d4043efc0ad4042a7786068999";
|
|
199
|
+
readonly genre: "0x01e58dbc76c15c9ac137dabac1823ebd6ef81efd563c5121000bc11c51a47cc7";
|
|
200
|
+
readonly releaseDescription: "0x50f5acf7c0c05cdc7656072fd1bfc5ee76d02beabeae090103734b2d75118fa3";
|
|
201
|
+
readonly releaseDspLink: "0x9ca9ad8cab49c4897cd3cb89628b771ee4f10831ddc273036837751a5339d02a";
|
|
202
|
+
readonly releaseGenre: "0xfb73b04be2f72704ec5e6a1035bfab108e5ee2a72e72c0505f999291e23219bd";
|
|
203
|
+
readonly releaseKind: "0xfb2e5790f0577aca3ac8ddd672c4c58ef1e49ef1c3dfe14fb9676aaabf769169";
|
|
204
|
+
readonly recordingAdvisory: "0x23abf3f248466c08edc3349b202d6e809064c0e52098ff290cef1fdc51d5942e";
|
|
205
|
+
readonly recordingLanguage: "0xb3e1c578638a79acc7ab573c994206047ad8ef76893f9c5c987887c5b10a5c68";
|
|
206
|
+
readonly recordingMasterReference: "0x92a752854b80a6103721743125ee48223b577a023fe360e25d3aa695462a6d15";
|
|
207
|
+
readonly recordingEngineSession: "0xdd8f817a221e2acd5a4e6f34d0192d8e0dbddeb76c2dff2fdc82991cb4feb6c6";
|
|
208
|
+
readonly recordSealPolicy: "0xfa22d0678eaec39ad36b74c2c5439d574292e8fb19a9a15272733267499d5351";
|
|
209
|
+
readonly recordingPreview: "0x2be8405f6b77a30d6942cb240c0d804d608ef761395e6f861b71d9ae3c98f997";
|
|
210
|
+
readonly ori: "0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a";
|
|
211
|
+
};
|
|
212
|
+
readonly objects: {
|
|
213
|
+
readonly releaseRegistry: "0x452c9904677a1bbf92d4e07d86d2c3eb038c47595b0e17a23756f03887eb2a2a";
|
|
214
|
+
readonly genreRegistry: "0xda4cc070da1a71d43387973027a7230587a1b9c829d37c2af4a3adbc15fdb8a8";
|
|
215
|
+
readonly recordGate: "0x8fd51c8b31bb6012fb03d2be39ed7b9f0f581329b6b338c60c209110cc659f31";
|
|
216
|
+
};
|
|
217
|
+
readonly legacy: {
|
|
218
|
+
readonly releaseCoverArtPackages: readonly [];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
/** Resolve a bundled platform deployment, failing closed when it is unavailable. */
|
|
223
|
+
export declare function getMisoPlatformDeployment(network: string): MisoPlatformDeployment;
|
|
224
|
+
//# sourceMappingURL=deployments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAKhF;kEACkE;AAClE,MAAM,MAAM,qBAAqB,GAC7B;IACE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;QACjC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;KACpC,CAAC;CACH,GACD;IACE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC,CAAC;AAEN,qBAAa,2BAA4B,SAAQ,KAAK;IAExC,QAAQ,CAAC,MAAM,EAAE,MAAM;IADnC,SAAkB,IAAI,iCAAiC;IACvD,YAAqB,MAAM,EAAE,MAAM,EAElC;CACF;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,qBAAqB,GAAG,SAAS,GAC5C,OAAO,CAAC,qBAAqB,EAAE;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,CAAC,CA4BzD;AAED,2EAA2E;AAC3E,MAAM,MAAM,oBAAoB,GAC5B;IACE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAA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;;iBAG1E,QAAQ;qBACN,MAAM,EACJ,oEAAoE;qBACtE,MAAM,EACJ,oEAAoE;qBACtE,kBAAkB,EAChB,oEAAoE;qBACtE,gBAAgB,EACd,oEAAoE;qBACtE,cAAc,EACZ,oEAAoE;qBACtE,WAAW,EACT,oEAAoE;qBACtE,WAAW,EACT,oEAAoE;qBACtE,QAAQ,EACN,oEAAoE;qBACtE,eAAe,EACb,oEAAoE;qBACtE,KAAK,EACH,oEAAoE;qBACtE,kBAAkB,EAChB,oEAAoE;qBACtE,cAAc,EACZ,oEAAoE;qBACtE,YAAY,EACV,oEAAoE;qBACtE,WAAW,EACT,oEAAoE;qBACtE,iBAAiB,EACf,oEAAoE;qBACtE,iBAAiB,EACf,oEAAoE;qBACtE,wBAAwB,EACtB,oEAAoE;qBACtE,sBAAsB,EACpB,oEAAoE;qBACtE,gBAAgB,EACd,oEAAoE;qBACtE,gBAAgB,EACd,oEAAoE;qBACtE,GAAG,EAAE,oEAAoE;;iBAE3E,OAAO;qBACL,eAAe,EACb,oEAAoE;qBACtE,aAAa,EACX,oEAAoE;qBACtE,UAAU,EACR,oEAAoE;;iBAExE,MAAM;qBACJ,uBAAuB;;;CAG6C,CAAC;AAE3E,oFAAoF;AACpF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,GACd,sBAAsB,CAWxB"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { MISO_DEPLOYMENTS } from "@misofm/protocol/deployments";
|
|
4
|
+
import { normalizeSuiObjectId } from "@mysten/sui/utils";
|
|
5
|
+
import { immutableSnapshot } from "./internal.js";
|
|
6
|
+
export class RecordSalesUnavailableError extends Error {
|
|
7
|
+
reason;
|
|
8
|
+
name = "RecordSalesUnavailableError";
|
|
9
|
+
constructor(reason) {
|
|
10
|
+
super(`@misofm/platform: Record sales are unavailable: ${reason}`);
|
|
11
|
+
this.reason = reason;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function requireRecordSalesDeployment(deployment) {
|
|
15
|
+
if (!deployment || deployment.status === "unavailable") {
|
|
16
|
+
throw new RecordSalesUnavailableError(deployment?.reason ?? "no Record sales deployment was configured");
|
|
17
|
+
}
|
|
18
|
+
const canonicalPackageId = (value) => {
|
|
19
|
+
if (!/^0x[0-9a-f]{64}$/.test(value))
|
|
20
|
+
return false;
|
|
21
|
+
try {
|
|
22
|
+
return normalizeSuiObjectId(value) === value;
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
if (!canonicalPackageId(deployment.recordPackageId) ||
|
|
29
|
+
!canonicalPackageId(deployment.recordShopPackageId)) {
|
|
30
|
+
throw new RecordSalesUnavailableError("Record and Record Shop package IDs must be canonical 32-byte Sui object IDs");
|
|
31
|
+
}
|
|
32
|
+
if (deployment.recordPackageId === deployment.recordShopPackageId) {
|
|
33
|
+
throw new RecordSalesUnavailableError("Record and Record Shop package IDs must be distinct");
|
|
34
|
+
}
|
|
35
|
+
return deployment;
|
|
36
|
+
}
|
|
37
|
+
export class OperationsUnavailableError extends Error {
|
|
38
|
+
reason;
|
|
39
|
+
name = "OperationsUnavailableError";
|
|
40
|
+
constructor(reason) {
|
|
41
|
+
super(`@misofm/platform: Vault operations are unavailable: ${reason}`);
|
|
42
|
+
this.reason = reason;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function canonicalObjectId(value) {
|
|
46
|
+
if (typeof value !== "string" || !/^0x[0-9a-f]{64}$/.test(value)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
return normalizeSuiObjectId(value) === value;
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Require one complete, non-aliased operations deployment.
|
|
58
|
+
*
|
|
59
|
+
* This validates only a complete canonical, pairwise-distinct structural set.
|
|
60
|
+
* It cannot establish provenance for arbitrary caller-supplied custom IDs; the
|
|
61
|
+
* caller owns that provenance. The bundled frozen map below is generated from
|
|
62
|
+
* one verified immutable admin export.
|
|
63
|
+
*/
|
|
64
|
+
export function requireOperationsDeployment(deployment) {
|
|
65
|
+
if (!deployment || deployment.status !== "available") {
|
|
66
|
+
throw new OperationsUnavailableError(deployment?.reason ?? "no Vault operations deployment was configured");
|
|
67
|
+
}
|
|
68
|
+
const candidate = deployment;
|
|
69
|
+
const vault = candidate.vault;
|
|
70
|
+
const actions = candidate.actions;
|
|
71
|
+
const plugins = candidate.plugins;
|
|
72
|
+
const packageEntries = [
|
|
73
|
+
["vault.packageId", vault?.packageId],
|
|
74
|
+
["actions.compositionRoyaltyPool", actions?.compositionRoyaltyPool],
|
|
75
|
+
["actions.recordingRoyaltyPool", actions?.recordingRoyaltyPool],
|
|
76
|
+
["actions.partyWallet", actions?.partyWallet],
|
|
77
|
+
["actions.compositionRoutedStake", actions?.compositionRoutedStake],
|
|
78
|
+
["actions.releaseRevenueDistributor", actions?.releaseRevenueDistributor],
|
|
79
|
+
["plugins.compositionRoyaltyPool", plugins?.compositionRoyaltyPool],
|
|
80
|
+
["plugins.recordingRoyaltyPool", plugins?.recordingRoyaltyPool],
|
|
81
|
+
["plugins.releaseRevenueDistributor", plugins?.releaseRevenueDistributor],
|
|
82
|
+
];
|
|
83
|
+
for (const [field, id] of packageEntries) {
|
|
84
|
+
if (!canonicalObjectId(id)) {
|
|
85
|
+
throw new OperationsUnavailableError(`${field} must be a canonical 32-byte Sui package ID`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (!canonicalObjectId(vault?.registryId)) {
|
|
89
|
+
throw new OperationsUnavailableError("vault.registryId must be a canonical 32-byte Sui object ID");
|
|
90
|
+
}
|
|
91
|
+
const identities = [
|
|
92
|
+
...packageEntries.map(([, id]) => id),
|
|
93
|
+
vault.registryId,
|
|
94
|
+
];
|
|
95
|
+
if (new Set(identities).size !== identities.length) {
|
|
96
|
+
throw new OperationsUnavailableError("the Vault registry object and all nine package IDs must be distinct");
|
|
97
|
+
}
|
|
98
|
+
return deployment;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Platform deployments bundled with this SDK release.
|
|
102
|
+
*
|
|
103
|
+
* IDs come only from verified immutable deployment output.
|
|
104
|
+
* Consumers may still pass an explicit complete deployment for custom networks.
|
|
105
|
+
*/
|
|
106
|
+
export const MISO_PLATFORM_DEPLOYMENTS = immutableSnapshot({
|
|
107
|
+
testnet: {
|
|
108
|
+
network: "testnet",
|
|
109
|
+
chainIdentifier: "69WiPg3DAQiwdxfncX6wYQ2siKwAe6L9BZthQea3JNMD",
|
|
110
|
+
protocol: MISO_DEPLOYMENTS.testnet,
|
|
111
|
+
recordSales: {
|
|
112
|
+
status: "available",
|
|
113
|
+
recordPackageId: "0x75e5fa520c39322e0526ff56a495f9a2a88d097e2df7902d94e58a9a12831e76",
|
|
114
|
+
recordShopPackageId: "0x2b97df3773040bb2cffd8c329bfd57f05f1fd2defb6ab156050ba1ae540d5d2a",
|
|
115
|
+
},
|
|
116
|
+
operations: {
|
|
117
|
+
status: "available",
|
|
118
|
+
vault: {
|
|
119
|
+
packageId: "0xaed1aa729452c77f4c62882b73317851d628c30af55355c81eb1c93d3d3276ac",
|
|
120
|
+
registryId: "0x5de3c379a15e4609260a94ace3d186cc466366fc6aebafe5663c016057b6a2d6",
|
|
121
|
+
},
|
|
122
|
+
actions: {
|
|
123
|
+
compositionRoyaltyPool: "0x46b9b193255f28ec5190e8cd37ae85397c9110266da73a4a7a94fcb6e990155b",
|
|
124
|
+
recordingRoyaltyPool: "0x78964bdc2dd7fad943633542edf5a1c9be38b1d2d25de1cc6cca64757c7d037a",
|
|
125
|
+
partyWallet: "0x934f15715f725e3eed2acaeda5c717b6641dce4bb88b7670db26249cb6646728",
|
|
126
|
+
compositionRoutedStake: "0xb1539001eaf32350d7044acb03092dcbd5a366e708d959aece0cca683f7f57fc",
|
|
127
|
+
releaseRevenueDistributor: "0xd19dde6c20fa41092c9645e8300284cf1a268ab5ed3b3c7a2a12593672203b45",
|
|
128
|
+
},
|
|
129
|
+
plugins: {
|
|
130
|
+
compositionRoyaltyPool: "0xad3525b86fad3f2aaaa3fdf0430d690efba249e378b1b89ed8180ecbc5d89392",
|
|
131
|
+
recordingRoyaltyPool: "0x2adfc809152c5c8cf07f0e466d881b62d48c7da3ae2e787c0471deb867a6a385",
|
|
132
|
+
releaseRevenueDistributor: "0x4f1da8c04ec53749f6cf6e8d2d48701fd72654078240050e20e41dc774f93d46",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
packages: {
|
|
136
|
+
minato: "0xcdf58ed7e4580118a6a3f2a8077abffe633c551b2f19e95ce01685d42f90b8d9",
|
|
137
|
+
credit: "0xc5a82310ce313af8f0ec18a4e564af11971b360db9e2ae686fef86fb2297a9a9",
|
|
138
|
+
compositionCredits: "0xc58ac5d69740866f6514f68f2e9c86b1d069d819ad0bcf5384b6aaa66e0fbf53",
|
|
139
|
+
recordingCredits: "0x7bafa653854f0820d911b8f6aa0aac3b131163c254b0021330881b77206d4d79",
|
|
140
|
+
releaseCredits: "0x47ccd23c669b023b8678193e7748235916e16e737fdd8ba48b131ded29c76a00",
|
|
141
|
+
royaltyPool: "0xecaa5a29cf8e110face3b80f0e4a5554e8c80edd8eda0983ed2f8015367eecca",
|
|
142
|
+
routedStake: "0x30ed387d3fea69579ddb34d011fa6e1416580bfb3ee6587aabf103fb0d17bced",
|
|
143
|
+
coverArt: "0x2b811f82d33cf6a9448adb11a598f6b04c14970cfc8e2982cde1d468e8e7d4a4",
|
|
144
|
+
releaseCoverArt: "0x4f0a8736685f6b1ddbcd0bddcd7aae2d072aa3d4043efc0ad4042a7786068999",
|
|
145
|
+
genre: "0x01e58dbc76c15c9ac137dabac1823ebd6ef81efd563c5121000bc11c51a47cc7",
|
|
146
|
+
releaseDescription: "0x50f5acf7c0c05cdc7656072fd1bfc5ee76d02beabeae090103734b2d75118fa3",
|
|
147
|
+
releaseDspLink: "0x9ca9ad8cab49c4897cd3cb89628b771ee4f10831ddc273036837751a5339d02a",
|
|
148
|
+
releaseGenre: "0xfb73b04be2f72704ec5e6a1035bfab108e5ee2a72e72c0505f999291e23219bd",
|
|
149
|
+
releaseKind: "0xfb2e5790f0577aca3ac8ddd672c4c58ef1e49ef1c3dfe14fb9676aaabf769169",
|
|
150
|
+
recordingAdvisory: "0x23abf3f248466c08edc3349b202d6e809064c0e52098ff290cef1fdc51d5942e",
|
|
151
|
+
recordingLanguage: "0xb3e1c578638a79acc7ab573c994206047ad8ef76893f9c5c987887c5b10a5c68",
|
|
152
|
+
recordingMasterReference: "0x92a752854b80a6103721743125ee48223b577a023fe360e25d3aa695462a6d15",
|
|
153
|
+
recordingEngineSession: "0xdd8f817a221e2acd5a4e6f34d0192d8e0dbddeb76c2dff2fdc82991cb4feb6c6",
|
|
154
|
+
recordSealPolicy: "0xfa22d0678eaec39ad36b74c2c5439d574292e8fb19a9a15272733267499d5351",
|
|
155
|
+
recordingPreview: "0x2be8405f6b77a30d6942cb240c0d804d608ef761395e6f861b71d9ae3c98f997",
|
|
156
|
+
ori: "0xf35cf353a62cef01084b51a9cf3da4c64c8724685ad1862f2f8284b71bd26c1a",
|
|
157
|
+
},
|
|
158
|
+
objects: {
|
|
159
|
+
releaseRegistry: "0x452c9904677a1bbf92d4e07d86d2c3eb038c47595b0e17a23756f03887eb2a2a",
|
|
160
|
+
genreRegistry: "0xda4cc070da1a71d43387973027a7230587a1b9c829d37c2af4a3adbc15fdb8a8",
|
|
161
|
+
recordGate: "0x8fd51c8b31bb6012fb03d2be39ed7b9f0f581329b6b338c60c209110cc659f31",
|
|
162
|
+
},
|
|
163
|
+
legacy: {
|
|
164
|
+
releaseCoverArtPackages: [],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
/** Resolve a bundled platform deployment, failing closed when it is unavailable. */
|
|
169
|
+
export function getMisoPlatformDeployment(network) {
|
|
170
|
+
const deployment = MISO_PLATFORM_DEPLOYMENTS[network];
|
|
171
|
+
if (!deployment) {
|
|
172
|
+
throw new Error(`@misofm/platform: no bundled Miso platform deployment for network "${network}". ` +
|
|
173
|
+
"Pass an explicit deployment to miso() for custom networks.");
|
|
174
|
+
}
|
|
175
|
+
return deployment;
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=deployments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAmBlD,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAE/B,MAAM;IADT,IAAI,GAAG,6BAA6B,CAAC;IACvD,YAAqB,MAAc;QACjC,KAAK,CAAC,mDAAmD,MAAM,EAAE,CAAC,CAAC;sBADhD,MAAM;IAE3B,CAAC;CACF;AAED,MAAM,UAAU,4BAA4B,CAC1C,UAA6C;IAE7C,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;QACvD,MAAM,IAAI,2BAA2B,CACnC,UAAU,EAAE,MAAM,IAAI,2CAA2C,CAClE,CAAC;IACJ,CAAC;IACD,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAW,EAAE;QACpD,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAClD,IAAI,CAAC;YACH,OAAO,oBAAoB,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO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d,oEAAoE;YACtE,gBAAgB,EACd,oEAAoE;YACtE,GAAG,EAAE,oEAAoE;SAC1E;QACD,OAAO,EAAE;YACP,eAAe,EACb,oEAAoE;YACtE,aAAa,EACX,oEAAoE;YACtE,UAAU,EACR,oEAAoE;SACvE;QACD,MAAM,EAAE;YACN,uBAAuB,EAAE,EAAE;SAC5B;KACF;CACO,CAAgE,CAAC;AAE3E,oFAAoF;AACpF,MAAM,UAAU,yBAAyB,CACvC,OAAe;IAEf,MAAM,UAAU,GACd,yBACD,CAAC,OAAO,CAAC,CAAC;IACX,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,sEAAsE,OAAO,KAAK;YAChF,4DAA4D,CAC/D,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ParallelTransactionExecutor } from "@mysten/sui/transactions";
|
|
2
|
+
import type { SuiClientTypes } from "@mysten/sui/client";
|
|
3
|
+
import { type ExecResult } from "@misofm/protocol";
|
|
4
|
+
import type { TxThunk } from "./transactions.ts";
|
|
5
|
+
export * from "@misofm/protocol/execute";
|
|
6
|
+
/** Publication execution also needs lifecycle events to associate same-typed
|
|
7
|
+
* objects (notably several new Parties and Vaults) with their manifest refs. */
|
|
8
|
+
export declare const PLATFORM_FULL_INCLUDE: {
|
|
9
|
+
readonly effects: true;
|
|
10
|
+
readonly objectTypes: true;
|
|
11
|
+
readonly balanceChanges: true;
|
|
12
|
+
readonly events: true;
|
|
13
|
+
};
|
|
14
|
+
export interface PlatformExecResult extends ExecResult {
|
|
15
|
+
events: SuiClientTypes.Event[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Builds a transaction from thunks and executes it through the parallel executor,
|
|
19
|
+
* exactly ONCE.
|
|
20
|
+
*
|
|
21
|
+
* These PTBs are typically non-idempotent (publish a package, initialize a
|
|
22
|
+
* currency, consume a TreasuryCap). A thrown transport error is ambiguous — the tx
|
|
23
|
+
* may already have committed — so blindly rebuilding and re-submitting would risk
|
|
24
|
+
* double-execution or a guaranteed abort against already-consumed inputs. We
|
|
25
|
+
* therefore do NOT auto-retry: any error propagates and recovery is the caller's
|
|
26
|
+
* job (e.g. a resumable checkpoint that reconciles against on-chain state). A Move
|
|
27
|
+
* abort RESOLVES as a `FailedTransaction`, so `toExecResult` surfaces it too.
|
|
28
|
+
*/
|
|
29
|
+
export declare function executeViaExecutor(executor: ParallelTransactionExecutor, ...thunks: TxThunk[]): Promise<PlatformExecResult>;
|
|
30
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKjD,cAAc,0BAA0B,CAAC;AAEzC;gFACgF;AAChF,eAAO,MAAM,qBAAqB;;;;;CAA6C,CAAC;AAGhF,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,MAAM,EAAE,cAAc,CAAC,KAAK,EAAE,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,2BAA2B,EACrC,GAAG,MAAM,EAAE,OAAO,EAAE,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAO7B"}
|
package/dist/execute.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { buildTx, toExecResult, FULL_INCLUDE } from "@misofm/protocol";
|
|
4
|
+
// Consumers of the platform SDK should not need a second direct dependency on
|
|
5
|
+
// the protocol SDK just to execute a composed PTB. Keep the generic execution
|
|
6
|
+
// surface available through this platform-layer entry point as well.
|
|
7
|
+
export * from "@misofm/protocol/execute";
|
|
8
|
+
/** Publication execution also needs lifecycle events to associate same-typed
|
|
9
|
+
* objects (notably several new Parties and Vaults) with their manifest refs. */
|
|
10
|
+
export const PLATFORM_FULL_INCLUDE = { ...FULL_INCLUDE, events: true };
|
|
11
|
+
/**
|
|
12
|
+
* Builds a transaction from thunks and executes it through the parallel executor,
|
|
13
|
+
* exactly ONCE.
|
|
14
|
+
*
|
|
15
|
+
* These PTBs are typically non-idempotent (publish a package, initialize a
|
|
16
|
+
* currency, consume a TreasuryCap). A thrown transport error is ambiguous — the tx
|
|
17
|
+
* may already have committed — so blindly rebuilding and re-submitting would risk
|
|
18
|
+
* double-execution or a guaranteed abort against already-consumed inputs. We
|
|
19
|
+
* therefore do NOT auto-retry: any error propagates and recovery is the caller's
|
|
20
|
+
* job (e.g. a resumable checkpoint that reconciles against on-chain state). A Move
|
|
21
|
+
* abort RESOLVES as a `FailedTransaction`, so `toExecResult` surfaces it too.
|
|
22
|
+
*/
|
|
23
|
+
export async function executeViaExecutor(executor, ...thunks) {
|
|
24
|
+
const tx = await buildTx(...thunks);
|
|
25
|
+
const res = await executor.executeTransaction(tx, PLATFORM_FULL_INCLUDE);
|
|
26
|
+
const base = toExecResult(res);
|
|
27
|
+
if (res.$kind !== "Transaction")
|
|
28
|
+
throw new Error("unreachable: toExecResult accepted a failed transaction");
|
|
29
|
+
return { ...base, events: res.Transaction.events ?? [] };
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAWtC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;AAGxF,8EAA8E;AAC9E,8EAA8E;AAC9E,qEAAqE;AACrE,cAAc,0BAA0B,CAAC;AAEzC;gFACgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,YAAY,EAAE,MAAM,EAAE,IAAI,EAAW,CAAC;AAOhF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,QAAqC,EACrC,GAAG,MAAiB;IAEpB,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;IACpC,MAAM,GAAG,GACP,MAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE,qBAAqB,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,GAAG,CAAC,KAAK,KAAK,aAAa;QAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC5G,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;AAC3D,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { miso, misoPlatform, MisoChainIdentifierMismatchError, MisoClientNotReadyError, MisoClient, MisoNetworkMismatchError, MisoPlatformClient, } from "./client.ts";
|
|
2
|
+
export type { ConfiguredReleaseGraphParams, MisoOptions, MisoPlatformConfig, } from "./client.ts";
|
|
3
|
+
export * from "./deployments.ts";
|
|
4
|
+
export * from "./pressing.ts";
|
|
5
|
+
export * from "./transactions.ts";
|
|
6
|
+
export * from "./execute.ts";
|
|
7
|
+
export * from "./share.ts";
|
|
8
|
+
export * from "./share-template.ts";
|
|
9
|
+
export * from "./release-graph.ts";
|
|
10
|
+
export * from "./publication.ts";
|
|
11
|
+
export * from "./catalog.ts";
|
|
12
|
+
export * from "./mix.ts";
|
|
13
|
+
export * as read from "./read/index.ts";
|
|
14
|
+
export * from "./credits.ts";
|
|
15
|
+
export * from "./cover.ts";
|
|
16
|
+
export * from "./release-extensions.ts";
|
|
17
|
+
export * from "./recording-extensions.ts";
|
|
18
|
+
export * from "./mix.ts";
|
|
19
|
+
export * from "./vault.ts";
|
|
20
|
+
export * as contracts from "./contracts.ts";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA4BA,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,gCAAgC,EAChC,uBAAuB,EACvB,UAAU,EACV,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAKzB,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// `@misofm/platform` — the PLATFORM layer.
|
|
4
|
+
//
|
|
5
|
+
// Miso's own product sits on top of the permissionless protocol, and the two
|
|
6
|
+
// ship as separate packages because they have different promises:
|
|
7
|
+
//
|
|
8
|
+
// @misofm/protocol PROTOCOL — Composition, Recording, Release. The open layer
|
|
9
|
+
// anyone can build on, and nobody needs Miso's permission to use.
|
|
10
|
+
// @misofm/platform PLATFORM — Pressing, Listing, Record, and the first-party
|
|
11
|
+
// EXTENSIONS. How MISO sells copies of a release, and the
|
|
12
|
+
// opinions it attaches to a work along the way.
|
|
13
|
+
//
|
|
14
|
+
// A release is protocol. Pressing a record off it and selling that record is
|
|
15
|
+
// platform. Keeping the split at the package boundary is what stops the protocol
|
|
16
|
+
// from quietly growing a storefront. Core `release::new` uses its shared
|
|
17
|
+
// `ReleaseRegistry` as the PTB-callable derivation parent.
|
|
18
|
+
//
|
|
19
|
+
// Extensions live on this side of the line for the same reason. An extension is
|
|
20
|
+
// not part of what a Composition or Recording IS — it is a choice Miso makes
|
|
21
|
+
// about how to describe one (who gets credited and in what vocabulary, what the
|
|
22
|
+
// cover looks like, whether royalties accumulate in a pool). The protocol gives
|
|
23
|
+
// extensions a `&mut UID` hook and stops there; every opinion about what to hang
|
|
24
|
+
// off it is business logic, and business logic ships from the platform package.
|
|
25
|
+
// The recommended entry point is the client extension (see ./client.ts); the bare
|
|
26
|
+
// builders and readers stay exported for callers that hold ids themselves.
|
|
27
|
+
export { miso, misoPlatform, MisoChainIdentifierMismatchError, MisoClientNotReadyError, MisoClient, MisoNetworkMismatchError, MisoPlatformClient, } from "./client.js";
|
|
28
|
+
export * from "./deployments.js";
|
|
29
|
+
export * from "./pressing.js";
|
|
30
|
+
export * from "./transactions.js";
|
|
31
|
+
export * from "./execute.js";
|
|
32
|
+
export * from "./share.js";
|
|
33
|
+
export * from "./share-template.js";
|
|
34
|
+
export * from "./release-graph.js";
|
|
35
|
+
export * from "./publication.js";
|
|
36
|
+
export * from "./catalog.js";
|
|
37
|
+
export * from "./mix.js";
|
|
38
|
+
// High-level, JSON-safe platform projections used directly by clients and by
|
|
39
|
+
// the thin HTTP read service. Namespaced because these composed view types are
|
|
40
|
+
// intentionally distinct from the lower-level contract views above.
|
|
41
|
+
export * as read from "./read/index.js";
|
|
42
|
+
// First-party extensions — attached to a protocol work via its cap-gated
|
|
43
|
+
// `uid_mut` hook.
|
|
44
|
+
export * from "./credits.js";
|
|
45
|
+
export * from "./cover.js";
|
|
46
|
+
export * from "./release-extensions.js";
|
|
47
|
+
export * from "./recording-extensions.js";
|
|
48
|
+
export * from "./mix.js";
|
|
49
|
+
export * from "./vault.js";
|
|
50
|
+
// Generated, ABI-bound bindings (BCS structs + type-safe Move calls).
|
|
51
|
+
export * as contracts from "./contracts.js";
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,2CAA2C;AAC3C,EAAE;AACF,6EAA6E;AAC7E,kEAAkE;AAClE,EAAE;AACF,iFAAiF;AACjF,sFAAsF;AACtF,gFAAgF;AAChF,8EAA8E;AAC9E,oEAAoE;AACpE,EAAE;AACF,6EAA6E;AAC7E,iFAAiF;AACjF,yEAAyE;AACzE,2DAA2D;AAC3D,EAAE;AACF,gFAAgF;AAChF,6EAA6E;AAC7E,gFAAgF;AAChF,gFAAgF;AAChF,iFAAiF;AACjF,gFAAgF;AAEhF,kFAAkF;AAClF,2EAA2E;AAC3E,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,gCAAgC,EAChC,uBAAuB,EACvB,UAAU,EACV,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAMrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAEzB,6EAA6E;AAC7E,+EAA+E;AAC/E,oEAAoE;AACpE,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,yEAAyE;AACzE,kBAAkB;AAClB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAE3B,sEAAsE;AACtE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** `0x1::option::none` / `0x1::option::some` moveCall targets. */
|
|
2
|
+
export declare const OPTION_NONE = "0x1::option::none";
|
|
3
|
+
export declare const OPTION_SOME = "0x1::option::some";
|
|
4
|
+
/**
|
|
5
|
+
* Clone arrays and plain records recursively, then freeze the clone.
|
|
6
|
+
*
|
|
7
|
+
* Registration inputs are data-only configuration records. Snapshotting them
|
|
8
|
+
* prevents later caller mutation without freezing or otherwise taking
|
|
9
|
+
* ownership of the caller's original objects. Non-plain objects are preserved
|
|
10
|
+
* by reference so this helper never attempts to clone SDK clients or signers.
|
|
11
|
+
*/
|
|
12
|
+
export declare function immutableSnapshot<T>(value: T): T;
|
|
13
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAgBA,kEAAkE;AAClE,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAC/C,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAiBhD"}
|
package/dist/internal.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// Internal shared helpers (deliberately NOT exported from the package root).
|
|
4
|
+
//
|
|
5
|
+
// PTB building blocks — the `0x1::option` move-call targets used when a generated
|
|
6
|
+
// call needs an `Option` argument built inline. Consumed by `./cover` and
|
|
7
|
+
// `./credits`.
|
|
8
|
+
//
|
|
9
|
+
// These came over from `@misonetwork/sdk`'s own private `internal.ts` when the
|
|
10
|
+
// extension surface moved here. They were NOT promoted to that package's public
|
|
11
|
+
// API to make them reachable: they are two literal Move function targets from the
|
|
12
|
+
// standard library, so re-deriving them costs nothing, whereas exporting them
|
|
13
|
+
// would widen the protocol SDK's public surface — and therefore its compatibility
|
|
14
|
+
// promise — for no benefit.
|
|
15
|
+
/** `0x1::option::none` / `0x1::option::some` moveCall targets. */
|
|
16
|
+
export const OPTION_NONE = "0x1::option::none";
|
|
17
|
+
export const OPTION_SOME = "0x1::option::some";
|
|
18
|
+
/**
|
|
19
|
+
* Clone arrays and plain records recursively, then freeze the clone.
|
|
20
|
+
*
|
|
21
|
+
* Registration inputs are data-only configuration records. Snapshotting them
|
|
22
|
+
* prevents later caller mutation without freezing or otherwise taking
|
|
23
|
+
* ownership of the caller's original objects. Non-plain objects are preserved
|
|
24
|
+
* by reference so this helper never attempts to clone SDK clients or signers.
|
|
25
|
+
*/
|
|
26
|
+
export function immutableSnapshot(value) {
|
|
27
|
+
if (Array.isArray(value)) {
|
|
28
|
+
return Object.freeze(value.map((item) => immutableSnapshot(item)));
|
|
29
|
+
}
|
|
30
|
+
if (value && typeof value === "object") {
|
|
31
|
+
const prototype = Object.getPrototypeOf(value);
|
|
32
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
33
|
+
return value;
|
|
34
|
+
return Object.freeze(Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
35
|
+
key,
|
|
36
|
+
immutableSnapshot(item),
|
|
37
|
+
])));
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=internal.js.map
|