@misofm/sdk 0.15.11 → 0.16.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 +145 -53
- package/dist/client.d.ts +156 -48
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +289 -48
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +11 -11
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +9 -9
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
- package/dist/contracts/miso_record/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/miso_record/deps/std/type_name.js.map +1 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.js +20 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/miso_record/pressing.d.ts +327 -0
- package/dist/contracts/miso_record/pressing.d.ts.map +1 -0
- package/dist/contracts/miso_record/pressing.js +345 -0
- package/dist/contracts/miso_record/pressing.js.map +1 -0
- package/dist/contracts/miso_record/record.d.ts +190 -0
- package/dist/contracts/miso_record/record.d.ts.map +1 -0
- package/dist/contracts/miso_record/record.js +226 -0
- package/dist/contracts/miso_record/record.js.map +1 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.js +20 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.js.map +1 -0
- package/dist/contracts/miso_record_shop/listing.d.ts +387 -0
- package/dist/contracts/miso_record_shop/listing.d.ts.map +1 -0
- package/dist/contracts/miso_record_shop/listing.js +380 -0
- package/dist/contracts/miso_record_shop/listing.js.map +1 -0
- package/dist/contracts/miso_record_shop/witness.d.ts +7 -0
- package/dist/contracts/miso_record_shop/witness.d.ts.map +1 -0
- package/dist/contracts/miso_record_shop/witness.js +9 -0
- package/dist/contracts/miso_record_shop/witness.js.map +1 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +10 -12
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +8 -10
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
- package/dist/contracts.d.ts +3 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +5 -4
- package/dist/contracts.js.map +1 -1
- package/dist/deployments.d.ts +37 -4
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +40 -2
- package/dist/deployments.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- 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 +72 -156
- package/dist/pressing.d.ts.map +1 -1
- package/dist/pressing.js +269 -261
- package/dist/pressing.js.map +1 -1
- package/dist/publication.d.ts +5 -2
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +57 -32
- package/dist/publication.js.map +1 -1
- package/dist/read/catalog.d.ts +8 -5
- package/dist/read/catalog.d.ts.map +1 -1
- package/dist/read/catalog.js +47 -35
- package/dist/read/catalog.js.map +1 -1
- package/dist/read/config.d.ts +6 -4
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +1 -2
- package/dist/read/config.js.map +1 -1
- package/dist/read/index.d.ts +1 -1
- 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/internal/scalars.d.ts.map +1 -1
- package/dist/read/internal/scalars.js +4 -3
- package/dist/read/internal/scalars.js.map +1 -1
- package/dist/read/internal/walrus.d.ts.map +1 -1
- package/dist/read/internal/walrus.js +2 -1
- package/dist/read/internal/walrus.js.map +1 -1
- package/dist/read/receipts.d.ts +21 -12
- package/dist/read/receipts.d.ts.map +1 -1
- package/dist/read/receipts.js +159 -56
- package/dist/read/receipts.js.map +1 -1
- package/dist/read/types.d.ts +34 -24
- package/dist/read/types.d.ts.map +1 -1
- package/dist/read/wallet.d.ts.map +1 -1
- package/dist/read/wallet.js +31 -46
- package/dist/read/wallet.js.map +1 -1
- package/dist/vault.d.ts +40 -11
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +94 -22
- package/dist/vault.js.map +1 -1
- package/package.json +10 -3
- package/src/client.ts +386 -72
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +15 -15
- package/src/contracts/miso_record/deps/sui/vec_set.ts +21 -0
- package/src/contracts/miso_record/pressing.ts +522 -0
- package/src/contracts/miso_record/record.ts +338 -0
- package/src/contracts/miso_record_shop/deps/std/type_name.ts +22 -0
- package/src/contracts/miso_record_shop/listing.ts +602 -0
- package/src/contracts/miso_record_shop/witness.ts +11 -0
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +14 -16
- package/src/contracts.ts +5 -4
- package/src/deployments.ts +131 -38
- package/src/index.ts +2 -0
- package/src/mix.ts +910 -0
- package/src/pressing.ts +428 -423
- package/src/publication.ts +62 -33
- package/src/read/catalog.ts +49 -34
- package/src/read/config.ts +7 -7
- package/src/read/index.ts +9 -1
- package/src/read/internal/scalars.ts +4 -2
- package/src/read/internal/walrus.ts +2 -1
- package/src/read/receipts.ts +181 -66
- package/src/read/types.ts +35 -22
- package/src/read/wallet.ts +29 -50
- package/src/vault.ts +142 -32
- package/dist/contracts/miso_pressing/certificate.d.ts +0 -89
- package/dist/contracts/miso_pressing/certificate.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/certificate.js +0 -108
- package/dist/contracts/miso_pressing/certificate.js.map +0 -1
- package/dist/contracts/miso_pressing/deps/std/type_name.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/deps/std/type_name.js.map +0 -1
- package/dist/contracts/miso_pressing/listing.d.ts +0 -434
- package/dist/contracts/miso_pressing/listing.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/listing.js +0 -401
- package/dist/contracts/miso_pressing/listing.js.map +0 -1
- package/dist/contracts/miso_pressing/pressing.d.ts +0 -334
- package/dist/contracts/miso_pressing/pressing.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/pressing.js +0 -298
- package/dist/contracts/miso_pressing/pressing.js.map +0 -1
- package/src/contracts/miso_pressing/certificate.ts +0 -164
- package/src/contracts/miso_pressing/listing.ts +0 -592
- package/src/contracts/miso_pressing/pressing.ts +0 -399
- /package/dist/contracts/{miso_pressing → miso_record}/deps/std/type_name.d.ts +0 -0
- /package/dist/contracts/{miso_pressing → miso_record}/deps/std/type_name.js +0 -0
- /package/src/contracts/{miso_pressing → miso_record}/deps/std/type_name.ts +0 -0
package/README.md
CHANGED
|
@@ -10,13 +10,13 @@ protocol and data-extension primitives.
|
|
|
10
10
|
Miso ships two SDK families, and the npm scope tells you which promise you are
|
|
11
11
|
holding:
|
|
12
12
|
|
|
13
|
-
| Scope
|
|
14
|
-
|
|
|
13
|
+
| Scope | Layer | Owns |
|
|
14
|
+
| ---------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
15
|
| `@misonetwork/*` | **Protocol** | Composition, Recording, Release, Party identity; metadata/data extensions; utilities; generic royalty-pool and routed-stake primitives |
|
|
16
|
-
| `@misofm/*`
|
|
16
|
+
| `@misofm/*` | **Platform** | Pressing, Listing, Record, and Vault plugins that apply Miso business logic to custodied protocol admin caps |
|
|
17
17
|
|
|
18
18
|
A release is protocol. Pressing a record off that release and selling it is
|
|
19
|
-
platform. So is deciding
|
|
19
|
+
platform. So is deciding _what to do_ with a freshly-minted work's share
|
|
20
20
|
supply — the protocol only knows how to mint one. Keeping the boundary at the
|
|
21
21
|
package line is what stops the open protocol from quietly growing a
|
|
22
22
|
storefront (or an opinion about tokenomics).
|
|
@@ -40,30 +40,44 @@ Install both SDKs at the application boundary; the platform package intentionall
|
|
|
40
40
|
does not carry its own protocol SDK copy:
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
bun add @misofm/sdk@^0.
|
|
43
|
+
bun add @misofm/sdk@^0.16.0 @misonetwork/sdk@^0.10.0
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Both SDKs are consumed from npm. The platform package keeps
|
|
47
47
|
`@misonetwork/sdk` as a peer so applications resolve exactly one protocol SDK
|
|
48
48
|
and one compatible deployment map.
|
|
49
49
|
|
|
50
|
+
### Canonical Record-gated sessions
|
|
51
|
+
|
|
52
|
+
`@misofm/sdk/mix` defines the complete protected-playback wire contract. A
|
|
53
|
+
Record resolves its immutable Release track to a Recording, then derives that
|
|
54
|
+
Recording's `recording_engine_session::ExtensionKey` dynamic field directly.
|
|
55
|
+
The field names one plaintext Walrus `miso.engine-session/1` document containing
|
|
56
|
+
the encrypted stem blob IDs and one Seal-wrapped 32-byte session key. No event
|
|
57
|
+
scan, indexer-maintained relationship, or second encrypted manifest is needed.
|
|
58
|
+
|
|
59
|
+
The same entry point exposes exact identity encoding, strict canonical-session
|
|
60
|
+
parsing, Seal-envelope inspection, and explicit attach/replace/unset PTB
|
|
61
|
+
builders. Applications must pin the Record, policy, gate, and engine-session
|
|
62
|
+
package IDs from one verified deployment.
|
|
63
|
+
|
|
50
64
|
## The model
|
|
51
65
|
|
|
52
|
-
A release
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
nothing else.
|
|
66
|
+
A release may have one `Pressing` per positive `u16` edition. Each Pressing owns its
|
|
67
|
+
independent `u32` Record-number sequence, current supply, optional immutable `u32`
|
|
68
|
+
maximum supply, and authorized distributor witness types.
|
|
56
69
|
|
|
57
70
|
Selling in a currency is a `Listing<Currency>`, one per currency, permanent, edited in
|
|
58
|
-
place rather than replaced.
|
|
59
|
-
|
|
71
|
+
place rather than replaced. The Listing's enabled/disabled state is the sale switch;
|
|
72
|
+
the Pressing has no schedule state.
|
|
60
73
|
|
|
61
74
|
**Everything is address math.** The pressing's UID derives off its release's, each
|
|
62
75
|
listing's off the pressing's. The protocol's canonical `ReleaseRegistry` creates the
|
|
63
|
-
release; there is no
|
|
64
|
-
"where is it" is answered offline
|
|
65
|
-
|
|
66
|
-
|
|
76
|
+
release; there is no _pressing_ registry or mutable lookup pointer to follow, so
|
|
77
|
+
"where is it" is answered offline. A Pressing derives from `(release, edition)`, a
|
|
78
|
+
Record from `(pressing, number)`, and a `Listing<Currency>` from its Pressing under
|
|
79
|
+
the separate immutable Record Shop package. There are no Record Registry or Settings
|
|
80
|
+
singletons.
|
|
67
81
|
|
|
68
82
|
## Usage
|
|
69
83
|
|
|
@@ -86,29 +100,37 @@ const party = await client.miso.party.getPartyById(partyId);
|
|
|
86
100
|
// Read: run + one currency's offer, one round trip, no registry lookup.
|
|
87
101
|
const { pressing, listing } = await client.miso.getSale({
|
|
88
102
|
releaseId,
|
|
103
|
+
edition,
|
|
89
104
|
currencyType: USD_COIN_TYPE,
|
|
90
105
|
});
|
|
91
106
|
|
|
92
107
|
// Write: a thunk, so it composes with protocol calls in the same PTB.
|
|
93
108
|
const tx = new Transaction();
|
|
94
109
|
tx.add(
|
|
95
|
-
client.miso.tx.
|
|
110
|
+
client.miso.tx.purchaseRecord({
|
|
96
111
|
releaseId,
|
|
112
|
+
edition,
|
|
97
113
|
currencyType: USD_COIN_TYPE,
|
|
98
|
-
|
|
114
|
+
paymentAmount: listing.pricing.amount,
|
|
115
|
+
expectedPricing: listing.pricing,
|
|
99
116
|
recipient: buyer,
|
|
100
117
|
}),
|
|
101
118
|
);
|
|
102
119
|
```
|
|
103
120
|
|
|
104
|
-
|
|
105
|
-
|
|
121
|
+
The deployment records sales as either explicitly unavailable (legacy) or available
|
|
122
|
+
with both verified immutable package IDs. New sales builders and readers fail closed
|
|
123
|
+
when either package is unavailable.
|
|
124
|
+
|
|
125
|
+
Holding the ids yourself? The bare APIs take `recordPackageId` and/or
|
|
126
|
+
`recordShopPackageId` explicitly:
|
|
106
127
|
|
|
107
128
|
```ts
|
|
108
|
-
import {
|
|
129
|
+
import { purchaseRecord, getSale } from "@misofm/sdk/pressing";
|
|
109
130
|
```
|
|
110
131
|
|
|
111
|
-
|
|
132
|
+
Verified package IDs are bundled only after immutable publication. Legacy Testnet
|
|
133
|
+
identities remain labeled unavailable and are never reused as the new packages.
|
|
112
134
|
`MISO_PLATFORM_DEPLOYMENTS.testnet`. Calling `miso()` selects that verified map
|
|
113
135
|
from the Sui client's network. Unbundled and custom networks still fail closed
|
|
114
136
|
unless the caller passes one complete deployment through `miso({ deployment })`.
|
|
@@ -177,7 +199,7 @@ address, and the exact authorized route on every protected request.
|
|
|
177
199
|
|
|
178
200
|
### Payment
|
|
179
201
|
|
|
180
|
-
`listing::
|
|
202
|
+
`listing::purchase` takes a bare `Balance<Currency>`, and `purchaseRecord` sources it with
|
|
181
203
|
`tx.balance()` — which draws from the buyer's **address balance** first and falls back
|
|
182
204
|
to coin objects only if it must. When the address balance covers the price, that is a
|
|
183
205
|
single `balance::redeem_funds` and **no coin object is minted, touched, or destroyed**,
|
|
@@ -187,17 +209,24 @@ Never hand-pick coin objects for a payment. That road shows a buyer their $1,000
|
|
|
187
209
|
then refuses to spend a cent of it, because a coin listing cannot see money that lives
|
|
188
210
|
in the address balance.
|
|
189
211
|
|
|
190
|
-
Purchases
|
|
191
|
-
|
|
192
|
-
|
|
212
|
+
Purchases always set `useGasCoin: false`: the gas coin may belong to a sponsor. Buyers
|
|
213
|
+
also pass the exact expected `Fixed` or `Floor` pricing variant and value, protecting
|
|
214
|
+
them from stale pricing-mode changes as well as amount changes.
|
|
215
|
+
|
|
216
|
+
### Vault fund settlement
|
|
193
217
|
|
|
194
|
-
|
|
218
|
+
`settleAndDistributeReleaseRevenue`, `settleCompositionRoyaltyPool`, and
|
|
219
|
+
`settleRecordingRoyaltyPool` read the amount from the framework's
|
|
220
|
+
`balance::settled_funds_value` and pass that command result directly to the
|
|
221
|
+
plugin's exact-value redemption call. The caller never supplies or estimates a
|
|
222
|
+
`u64`. The lower-level `redeemAndDistributeReleaseRevenue`,
|
|
223
|
+
`redeemAndDepositCompositionRoyaltyPool`, and
|
|
224
|
+
`redeemAndDepositRecordingRoyaltyPool` remain available when an earlier PTB
|
|
225
|
+
command already produced the exact value.
|
|
195
226
|
|
|
196
|
-
|
|
197
|
-
`AccumulatorRoot` and let Move determine the commit-settled amount; callers no
|
|
198
|
-
longer provide a `u64`. Party-wallet monetary builders are similarly composable:
|
|
227
|
+
Party-wallet monetary builders are similarly composable:
|
|
199
228
|
`receivePartyWalletBalance`, `redeemPartyWalletBalance`, and
|
|
200
|
-
`
|
|
229
|
+
`settlePartyWalletBalance` return the PTB `Balance<Currency>` result. Pass that
|
|
201
230
|
result directly to another Move call, or convert it with `coin::from_balance`
|
|
202
231
|
only when an owned Coin is required. Every returned Balance must be consumed in
|
|
203
232
|
the same PTB.
|
|
@@ -234,8 +263,9 @@ const thunk = client.miso.tx.publishComposition({
|
|
|
234
263
|
`client.miso.tx.publishRecording` and `publishCompositionAndRecording`
|
|
235
264
|
follow the same shape (the latter atomically, borrow-before-share, in one PTB —
|
|
236
265
|
see `@misonetwork/sdk`'s README for why the ordering is load-bearing).
|
|
237
|
-
The protocol,
|
|
238
|
-
|
|
266
|
+
The protocol, immutable Record and Record Shop packages, minato, and core
|
|
267
|
+
`ReleaseRegistry` address all come from the deployment selected by the Sui
|
|
268
|
+
client's network. Record sales have no Record Registry or Settings singleton.
|
|
239
269
|
The deprecated `misoPlatform()` constructor still accepts those values manually
|
|
240
270
|
for compatibility with existing integrations.
|
|
241
271
|
|
|
@@ -248,8 +278,28 @@ import { publishReleaseGraph } from "@misofm/sdk";
|
|
|
248
278
|
// Every composition and recording, optional royalty pools, tracks, and
|
|
249
279
|
// the release — with the release id derived ON-CHAIN — in one atomic PTB.
|
|
250
280
|
const thunk = publishReleaseGraph({
|
|
251
|
-
compositions: [
|
|
252
|
-
|
|
281
|
+
compositions: [
|
|
282
|
+
{
|
|
283
|
+
shareType,
|
|
284
|
+
shareCurrencyId,
|
|
285
|
+
shareTreasuryCapId,
|
|
286
|
+
title: "Song",
|
|
287
|
+
royaltyRateBps: 1000,
|
|
288
|
+
shareRecipients,
|
|
289
|
+
adminAddress,
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
recordings: [
|
|
293
|
+
{
|
|
294
|
+
shareType,
|
|
295
|
+
shareCurrencyId,
|
|
296
|
+
shareTreasuryCapId,
|
|
297
|
+
compositionShareType,
|
|
298
|
+
parentCompositionIndex: 0,
|
|
299
|
+
shareRecipients,
|
|
300
|
+
adminAddress,
|
|
301
|
+
},
|
|
302
|
+
],
|
|
253
303
|
release: {
|
|
254
304
|
title: "Album",
|
|
255
305
|
nonce: "42",
|
|
@@ -336,10 +386,20 @@ const currency = await client.miso.createShareCurrency(signer, {
|
|
|
336
386
|
|
|
337
387
|
// Batched (many currencies, via a ParallelTransactionExecutor):
|
|
338
388
|
import { publishShareCurrencies, initializeShareCurrencies } from "@misofm/sdk";
|
|
339
|
-
const { packageIds } = await publishShareCurrencies(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
389
|
+
const { packageIds } = await publishShareCurrencies(
|
|
390
|
+
executor,
|
|
391
|
+
initializerAddress,
|
|
392
|
+
10,
|
|
393
|
+
);
|
|
394
|
+
const { currencies } = await initializeShareCurrencies(
|
|
395
|
+
executor,
|
|
396
|
+
signerAddress,
|
|
397
|
+
packageIds,
|
|
398
|
+
(pkg) => ({
|
|
399
|
+
name: "…",
|
|
400
|
+
description: "…",
|
|
401
|
+
}),
|
|
402
|
+
);
|
|
343
403
|
```
|
|
344
404
|
|
|
345
405
|
`executeViaExecutor(executor, ...thunks)` (`execute.ts`) submits a
|
|
@@ -369,9 +429,14 @@ duplicate roles.
|
|
|
369
429
|
|
|
370
430
|
```ts
|
|
371
431
|
import {
|
|
372
|
-
attachCompositionCredit,
|
|
373
|
-
|
|
374
|
-
|
|
432
|
+
attachCompositionCredit,
|
|
433
|
+
attachRecordingCredit,
|
|
434
|
+
addReleaseCredit,
|
|
435
|
+
addRecordingPrimaryArtist,
|
|
436
|
+
addRecordingFeaturedArtist,
|
|
437
|
+
getCompositionCredits,
|
|
438
|
+
getRecordingCredits,
|
|
439
|
+
getReleaseCredits,
|
|
375
440
|
} from "@misofm/sdk";
|
|
376
441
|
|
|
377
442
|
const thunk = attachRecordingCredit({
|
|
@@ -379,7 +444,10 @@ const thunk = attachRecordingCredit({
|
|
|
379
444
|
recordingAdminCapId: "0x...",
|
|
380
445
|
partyId: "0x...",
|
|
381
446
|
displayName: "Jane Doe",
|
|
382
|
-
roles: [
|
|
447
|
+
roles: [
|
|
448
|
+
{ type: "Vocalist", level: "Lead" },
|
|
449
|
+
{ type: "Instrumentalist", instrument: "Guitar" },
|
|
450
|
+
],
|
|
383
451
|
recordingShareType: "0x...::share::Share",
|
|
384
452
|
compositionShareType: "0x...::share::Share",
|
|
385
453
|
recordingCreditsPackageId: "0x...",
|
|
@@ -387,12 +455,27 @@ const thunk = attachRecordingCredit({
|
|
|
387
455
|
});
|
|
388
456
|
|
|
389
457
|
// Designate an already-credited party (same params minus displayName/roles/misoCreditPackageId):
|
|
390
|
-
addRecordingPrimaryArtist({
|
|
458
|
+
addRecordingPrimaryArtist({
|
|
459
|
+
recordingId,
|
|
460
|
+
recordingAdminCapId,
|
|
461
|
+
partyId,
|
|
462
|
+
recordingShareType,
|
|
463
|
+
compositionShareType,
|
|
464
|
+
recordingCreditsPackageId,
|
|
465
|
+
});
|
|
391
466
|
|
|
392
467
|
// Reads return null when no credits field is attached.
|
|
393
|
-
const credits = await getCompositionCredits(
|
|
468
|
+
const credits = await getCompositionCredits(
|
|
469
|
+
client,
|
|
470
|
+
compositionId,
|
|
471
|
+
compositionCreditsPackageId,
|
|
472
|
+
);
|
|
394
473
|
// CreditView[]: { partyId, displayName, roles: string[] } — e.g. "Producer (Lead)", "Instrumentalist: Guitar"
|
|
395
|
-
const rc = await getRecordingCredits(
|
|
474
|
+
const rc = await getRecordingCredits(
|
|
475
|
+
client,
|
|
476
|
+
recordingId,
|
|
477
|
+
recordingCreditsPackageId,
|
|
478
|
+
);
|
|
396
479
|
// { credits: CreditView[], primaryArtistIds: string[], featuredArtistIds: string[] }
|
|
397
480
|
```
|
|
398
481
|
|
|
@@ -416,14 +499,18 @@ import { setReleaseCover, getReleaseCover } from "@misofm/sdk";
|
|
|
416
499
|
const thunk = setReleaseCover({
|
|
417
500
|
releaseId: "0x...",
|
|
418
501
|
releaseAdminCapId: "0x...",
|
|
419
|
-
stillBlobId: "987654321",
|
|
420
|
-
animatedBlobId: null,
|
|
502
|
+
stillBlobId: "987654321", // Walrus blob id as u256 (decimal string or bigint)
|
|
503
|
+
animatedBlobId: null, // optional animated cover
|
|
421
504
|
coverArtPackageId: "0x...",
|
|
422
505
|
releaseCoverArtPackageId: "0x...",
|
|
423
506
|
oriPackageId: "0x...",
|
|
424
507
|
});
|
|
425
508
|
|
|
426
|
-
const cover = await getReleaseCover(
|
|
509
|
+
const cover = await getReleaseCover(
|
|
510
|
+
client,
|
|
511
|
+
releaseId,
|
|
512
|
+
releaseCoverArtPackageId,
|
|
513
|
+
);
|
|
427
514
|
// ReleaseCoverView | null: { still, animated } as normalized Walrus refs
|
|
428
515
|
// ({ kind: "blob", blobId } | { kind: "quiltPatch", quiltId, version, startIndex, endIndex })
|
|
429
516
|
```
|
|
@@ -449,10 +536,15 @@ the required `vector<Receiving<Coin<Currency>>>` in the PTB.
|
|
|
449
536
|
|
|
450
537
|
```ts
|
|
451
538
|
import type {
|
|
452
|
-
CreditView,
|
|
453
|
-
|
|
539
|
+
CreditView,
|
|
540
|
+
RecordingCreditsView,
|
|
541
|
+
CompositionRole,
|
|
542
|
+
RecordingRole,
|
|
543
|
+
RecordingRoleLevel,
|
|
544
|
+
RecordingLeveledRoleType,
|
|
454
545
|
ReleaseRole,
|
|
455
|
-
ReleaseCoverView,
|
|
546
|
+
ReleaseCoverView,
|
|
547
|
+
CoverImageRef,
|
|
456
548
|
} from "@misofm/sdk";
|
|
457
549
|
```
|
|
458
550
|
|
|
@@ -493,7 +585,7 @@ the on-chain ABI:
|
|
|
493
585
|
bun run codegen # reads sui-codegen.config.ts → src/contracts/
|
|
494
586
|
```
|
|
495
587
|
|
|
496
|
-
`sui-codegen.config.ts` lists
|
|
588
|
+
`sui-codegen.config.ts` lists `miso_record`, `miso_record_shop`, data
|
|
497
589
|
extensions, generic `royalty_pool`/`routed_stake`, and the `vault` plus all
|
|
498
590
|
vault-plugin packages. The protocol CORE (`miso` —
|
|
499
591
|
composition/recording/release/track) generates into
|
|
@@ -502,7 +594,7 @@ adding the core here to save an import is how the split this package exists to
|
|
|
502
594
|
enforce gets undone.
|
|
503
595
|
|
|
504
596
|
Paths resolve against sibling checkouts, so regenerating requires
|
|
505
|
-
`~/Documents/GitHub/misofm/{sdk,
|
|
597
|
+
`~/Documents/GitHub/misofm/{sdk, record, record-shop, vault, vault-plugins}` and
|
|
506
598
|
`~/Documents/GitHub/misonetwork/{protocol, protocol-extensions,
|
|
507
599
|
royalty-pool, routed-stake, share}`.
|
|
508
600
|
|