@misofm/sdk 0.12.3 → 0.13.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 +49 -2
- package/dist/contracts/miso_pressing/certificate.d.ts +1 -1
- package/dist/contracts/miso_pressing/certificate.d.ts.map +1 -1
- package/dist/contracts/miso_pressing/certificate.js +1 -1
- package/dist/contracts/miso_pressing/certificate.js.map +1 -1
- package/dist/contracts/miso_pressing/listing.d.ts +5 -5
- package/dist/contracts/miso_pressing/listing.js +5 -5
- package/dist/contracts/miso_pressing/pressing.d.ts +10 -10
- package/dist/contracts/miso_pressing/pressing.js +7 -7
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +6 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -1
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js +6 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -1
- package/dist/cover.d.ts +2 -2
- package/dist/cover.d.ts.map +1 -1
- package/dist/cover.js +5 -2
- package/dist/cover.js.map +1 -1
- package/dist/credits.d.ts +9 -9
- package/dist/credits.d.ts.map +1 -1
- package/dist/credits.js +8 -5
- package/dist/credits.js.map +1 -1
- package/dist/execute.d.ts +13 -1
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +8 -2
- package/dist/execute.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pressing.d.ts +6 -6
- package/dist/pressing.js +4 -4
- package/dist/publication.d.ts +207 -0
- package/dist/publication.d.ts.map +1 -0
- package/dist/publication.js +666 -0
- package/dist/publication.js.map +1 -0
- package/dist/read/catalog.d.ts +3 -3
- package/dist/read/catalog.js +3 -3
- package/dist/read/receipts.d.ts +2 -2
- package/dist/read/receipts.js +2 -2
- package/dist/recording-extensions.d.ts +2 -2
- package/dist/recording-extensions.d.ts.map +1 -1
- package/dist/recording-extensions.js +8 -5
- package/dist/recording-extensions.js.map +1 -1
- package/dist/release-extensions.d.ts +2 -2
- package/dist/release-extensions.d.ts.map +1 -1
- package/dist/release-extensions.js +10 -7
- package/dist/release-extensions.js.map +1 -1
- package/dist/vault.d.ts +7 -1
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +8 -0
- package/dist/vault.js.map +1 -1
- package/package.json +6 -2
- package/src/contracts/miso_pressing/certificate.ts +1 -1
- package/src/contracts/miso_pressing/listing.ts +5 -5
- package/src/contracts/miso_pressing/pressing.ts +7 -7
- package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +8 -2
- package/src/cover.ts +9 -4
- package/src/credits.ts +18 -14
- package/src/execute.ts +17 -4
- package/src/index.ts +1 -0
- package/src/pressing.ts +6 -6
- package/src/publication.ts +949 -0
- package/src/read/catalog.ts +3 -3
- package/src/read/receipts.ts +2 -2
- package/src/recording-extensions.ts +12 -8
- package/src/release-extensions.ts +14 -9
- package/src/vault.ts +20 -2
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Install both SDKs at the application boundary; the platform package intentionall
|
|
|
39
39
|
does not carry its own protocol SDK copy:
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
bun add @misofm/sdk@^0.
|
|
42
|
+
bun add @misofm/sdk@^0.13.0 @misonetwork/sdk@^0.9.1
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Both SDKs are consumed from npm. The platform package keeps
|
|
@@ -59,7 +59,7 @@ currency's listing enabled.
|
|
|
59
59
|
|
|
60
60
|
**Everything is address math.** The pressing's UID derives off its release's, each
|
|
61
61
|
listing's off the pressing's. The protocol's canonical `ReleaseRegistry` creates the
|
|
62
|
-
release; there is no *pressing* registry or
|
|
62
|
+
release; there is no *pressing* registry or mutable lookup pointer to follow, so
|
|
63
63
|
"where is it" is answered offline — which is why the builders take a RELEASE id and
|
|
64
64
|
compute the rest. A caller cannot pair a listing with the wrong pressing, because it
|
|
65
65
|
never picks one.
|
|
@@ -250,6 +250,53 @@ const thunk = publishReleaseGraph({
|
|
|
250
250
|
});
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
+
### Atomic catalog publication (`publication.ts`)
|
|
254
|
+
|
|
255
|
+
`publishAtomicCatalog` owns the semantic publication transaction. Given
|
|
256
|
+
pre-initialized share currencies, it creates every new Party, Composition,
|
|
257
|
+
Recording, Track, and Release; applies all declared data extensions; installs
|
|
258
|
+
and initializes Vault plugins; opens the Pressing and Listings; shares the new
|
|
259
|
+
objects; and delivers only the selected direct admin cap or VaultAdminCap. The
|
|
260
|
+
entire catalog stage is one PTB, so none of it can land partially.
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
import {
|
|
264
|
+
assertAtomicPublicationBounds,
|
|
265
|
+
parseAtomicPublicationResult,
|
|
266
|
+
publishAtomicCatalog,
|
|
267
|
+
} from "@misofm/sdk/publication";
|
|
268
|
+
|
|
269
|
+
const publication = {
|
|
270
|
+
deployment,
|
|
271
|
+
parties,
|
|
272
|
+
compositions, // includes initialized share Currency + TreasuryCap ids
|
|
273
|
+
recordings,
|
|
274
|
+
release,
|
|
275
|
+
pressing,
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
// Pure local assembly: fail before publishing any share package if the final
|
|
279
|
+
// PTB exceeds the SDK's command/input safety limits or has an invalid graph.
|
|
280
|
+
assertAtomicPublicationBounds(publication);
|
|
281
|
+
|
|
282
|
+
const executed = await executeViaExecutor(
|
|
283
|
+
executor,
|
|
284
|
+
publishAtomicCatalog(publication),
|
|
285
|
+
);
|
|
286
|
+
const result = parseAtomicPublicationResult(publication, executed);
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Fresh raw PartyAdminCap, CompositionAdminCap, RecordingAdminCap, and
|
|
290
|
+
ReleaseAdminCap values never leave the PTB when Vault custody is selected.
|
|
291
|
+
Party Vaults install the Party Wallet plugin by default; royalty-pool,
|
|
292
|
+
routed-stake, and release-revenue plugins are installed while each new Vault is
|
|
293
|
+
still owned. Plugin witness construction remains inside the SDK bindings.
|
|
294
|
+
|
|
295
|
+
Share packages necessarily precede this stage: publish at most five per PTB,
|
|
296
|
+
then initialize their currencies, then submit the atomic catalog PTB. The two
|
|
297
|
+
share helpers below accept a parallel-compatible executor, allowing package
|
|
298
|
+
batches to queue concurrently while a hardware signer serializes approvals.
|
|
299
|
+
|
|
253
300
|
### Share Currency Provisioning (`share.ts`)
|
|
254
301
|
|
|
255
302
|
Every composition and recording is backed by its own fixed-supply share
|
|
@@ -23,7 +23,7 @@ export declare const Certificate: MoveStruct<{
|
|
|
23
23
|
}, "std::type_name::TypeName">;
|
|
24
24
|
/** The exact amount paid. Under a floor price this includes any tip above it. */
|
|
25
25
|
purchase_price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
26
|
-
/** The timestamp stamped from the shared Clock on the
|
|
26
|
+
/** The timestamp stamped from the shared Clock on the Listing purchase path. */
|
|
27
27
|
created_at_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
28
28
|
}, "@local-pkg/miso_pressing::certificate::Certificate">;
|
|
29
29
|
export interface ParentIdArguments {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso_pressing/certificate.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAA0B,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF,eAAO,MAAM,WAAW;IAChB,iEAAiE;;IAEjE,gDAAgD;;IAEhD,yEAAyE;;IAEzE,2CAA2C;;;;IAE3C,iFAAiF;;IAEjF,
|
|
1
|
+
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso_pressing/certificate.ts"],"names":[],"mappings":"AAAA;;gEAEgE;A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AM,CAAC;IACjB,SAAS,EAAE,yBAAyB,GAAG;QACnC,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,IAMrD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,oBAAoB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,sBAAsB,GAAG;QAChC,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,IAM/C,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,kBAAkB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,oBAAoB,GAAG;QAC9B,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,IAM3C,IAAI,WAAW,0DAM1B"}
|
|
@@ -24,7 +24,7 @@ export const Certificate = new MoveStruct({ name: `${$moduleName}::Certificate`,
|
|
|
24
24
|
purchase_currency: type_name.TypeName,
|
|
25
25
|
/** The exact amount paid. Under a floor price this includes any tip above it. */
|
|
26
26
|
purchase_price: bcs.u64(),
|
|
27
|
-
/** The timestamp stamped from the shared Clock on the
|
|
27
|
+
/** The timestamp stamped from the shared Clock on the Listing purchase path. */
|
|
28
28
|
created_at_ms: bcs.u64()
|
|
29
29
|
} });
|
|
30
30
|
export function parentId(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificate.js","sourceRoot":"","sources":["../../../src/contracts/miso_pressing/certificate.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,sBAAsB,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B;IACnD,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,0BAA0B,CAAC;IACrE,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,eAAe;QACzB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
* pressing's own `Scheduled → Active → Paused` governs every currency at once
|
|
45
45
|
* (`pressing::mint_next`). A sale needs both open.
|
|
46
46
|
*
|
|
47
|
-
* The **when** lives on the
|
|
48
|
-
* release going on sale, not about one payment rail, and a run that opened in
|
|
49
|
-
* at Friday 8pm and in USDC at some other time would have two
|
|
47
|
+
* The **when** lives on the Pressing, not here: its opening time is a fact about
|
|
48
|
+
* the release going on sale, not about one payment rail, and a run that opened in
|
|
49
|
+
* SUI at Friday 8pm and in USDC at some other time would have two starts and one
|
|
50
50
|
* number sequence. So a listing carries no schedule — only whether its currency is
|
|
51
51
|
* taken.
|
|
52
52
|
*
|
|
@@ -416,8 +416,8 @@ export interface IsLiveOptions {
|
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* Whether `buy` would be accepted right now: the right pressing, this currency
|
|
419
|
-
* enabled, and the run selling at this moment (open, and past its
|
|
420
|
-
* has one).
|
|
419
|
+
* enabled, and the run selling at this moment (open, and past its scheduled start
|
|
420
|
+
* if it has one).
|
|
421
421
|
*/
|
|
422
422
|
export declare function isLive(options: IsLiveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
423
423
|
export interface AmountArguments {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
* pressing's own `Scheduled → Active → Paused` governs every currency at once
|
|
45
45
|
* (`pressing::mint_next`). A sale needs both open.
|
|
46
46
|
*
|
|
47
|
-
* The **when** lives on the
|
|
48
|
-
* release going on sale, not about one payment rail, and a run that opened in
|
|
49
|
-
* at Friday 8pm and in USDC at some other time would have two
|
|
47
|
+
* The **when** lives on the Pressing, not here: its opening time is a fact about
|
|
48
|
+
* the release going on sale, not about one payment rail, and a run that opened in
|
|
49
|
+
* SUI at Friday 8pm and in USDC at some other time would have two starts and one
|
|
50
50
|
* number sequence. So a listing carries no schedule — only whether its currency is
|
|
51
51
|
* taken.
|
|
52
52
|
*
|
|
@@ -365,8 +365,8 @@ export function state(options) {
|
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
367
367
|
* Whether `buy` would be accepted right now: the right pressing, this currency
|
|
368
|
-
* enabled, and the run selling at this moment (open, and past its
|
|
369
|
-
* has one).
|
|
368
|
+
* enabled, and the run selling at this moment (open, and past its scheduled start
|
|
369
|
+
* if it has one).
|
|
370
370
|
*/
|
|
371
371
|
export function isLive(options) {
|
|
372
372
|
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
* Nothing here is ever destroyed, sealed, or wound down — deleting a pressing
|
|
37
37
|
* would strand its whole derived subtree, so there is no destructor at all. The
|
|
38
38
|
* run's lifecycle is `Scheduled → Active → Paused → Active`: it opens itself at
|
|
39
|
-
* its
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* its scheduled start (no artist transaction, and nobody can buy early), then the
|
|
40
|
+
* artist stops and starts it at will. The first transition is real, not computed —
|
|
41
|
+
* the first sale past the start rewrites `Scheduled` to `Active` inside
|
|
42
42
|
* `mint_next`, which is why `Scheduled` only ever describes a run still waiting.
|
|
43
43
|
* Below it, each listing's `Enabled | Disabled` governs one currency. A run that
|
|
44
44
|
* is paused or not yet open sells in no currency, whatever the listings say.
|
|
@@ -68,8 +68,8 @@ export declare const PressingKey: MoveTuple<readonly [import("@mysten/sui/bcs").
|
|
|
68
68
|
export declare const PressingAdminCapKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/miso_pressing::pressing::PressingAdminCapKey">;
|
|
69
69
|
/**
|
|
70
70
|
* Whether the run sells, over every currency at once. The lifecycle runs
|
|
71
|
-
* `Scheduled → Active → Paused → Active`: a pressing opens itself at its
|
|
72
|
-
*
|
|
71
|
+
* `Scheduled → Active → Paused → Active`: a pressing opens itself at its scheduled
|
|
72
|
+
* start, then the artist stops and starts it at will.
|
|
73
73
|
*/
|
|
74
74
|
export declare const PressingState: MoveEnum<{
|
|
75
75
|
/**
|
|
@@ -80,7 +80,7 @@ export declare const PressingState: MoveEnum<{
|
|
|
80
80
|
* `Active` (in `mint_next`, before any sales logic), so a run reads `Scheduled`
|
|
81
81
|
* only while it is still waiting. Between the start and that first sale the run
|
|
82
82
|
* already sells — `is_selling` answers against the clock — so nobody has to go
|
|
83
|
-
* first for the
|
|
83
|
+
* first for the Pressing to be open.
|
|
84
84
|
*
|
|
85
85
|
* Consequence worth knowing: once the transition fires the start time is gone from
|
|
86
86
|
* the object. `PressingOpenedEvent` and `PressingStateChangedEvent` carry it, so
|
|
@@ -108,7 +108,7 @@ export declare const Pressing: MoveStruct<{
|
|
|
108
108
|
* `Active` (in `mint_next`, before any sales logic), so a run reads `Scheduled`
|
|
109
109
|
* only while it is still waiting. Between the start and that first sale the run
|
|
110
110
|
* already sells — `is_selling` answers against the clock — so nobody has to go
|
|
111
|
-
* first for the
|
|
111
|
+
* first for the Pressing to be open.
|
|
112
112
|
*
|
|
113
113
|
* Consequence worth knowing: once the transition fires the start time is gone from
|
|
114
114
|
* the object. `PressingOpenedEvent` and `PressingStateChangedEvent` carry it, so
|
|
@@ -145,7 +145,7 @@ export declare const PressingOpenedEvent: MoveStruct<{
|
|
|
145
145
|
* `Active` (in `mint_next`, before any sales logic), so a run reads `Scheduled`
|
|
146
146
|
* only while it is still waiting. Between the start and that first sale the run
|
|
147
147
|
* already sells — `is_selling` answers against the clock — so nobody has to go
|
|
148
|
-
* first for the
|
|
148
|
+
* first for the Pressing to be open.
|
|
149
149
|
*
|
|
150
150
|
* Consequence worth knowing: once the transition fires the start time is gone from
|
|
151
151
|
* the object. `PressingOpenedEvent` and `PressingStateChangedEvent` carry it, so
|
|
@@ -171,7 +171,7 @@ export declare const PressingStateChangedEvent: MoveStruct<{
|
|
|
171
171
|
* `Active` (in `mint_next`, before any sales logic), so a run reads `Scheduled`
|
|
172
172
|
* only while it is still waiting. Between the start and that first sale the run
|
|
173
173
|
* already sells — `is_selling` answers against the clock — so nobody has to go
|
|
174
|
-
* first for the
|
|
174
|
+
* first for the Pressing to be open.
|
|
175
175
|
*
|
|
176
176
|
* Consequence worth knowing: once the transition fires the start time is gone from
|
|
177
177
|
* the object. `PressingOpenedEvent` and `PressingStateChangedEvent` carry it, so
|
|
@@ -225,7 +225,7 @@ export interface NewOptions {
|
|
|
225
225
|
];
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
228
|
-
* Open a release's pressing in `state` — `Scheduled` for a
|
|
228
|
+
* Open a release's pressing in `state` — `Scheduled` for a future start, `Active`
|
|
229
229
|
* to sell immediately, `Paused` to set it up quietly. Returns it unshared, so the
|
|
230
230
|
* same transaction can list it (`listing::new`) before `share` puts it on chain,
|
|
231
231
|
* plus the cap that governs it from here on. Neither value has `drop`, so neither
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
* Nothing here is ever destroyed, sealed, or wound down — deleting a pressing
|
|
37
37
|
* would strand its whole derived subtree, so there is no destructor at all. The
|
|
38
38
|
* run's lifecycle is `Scheduled → Active → Paused → Active`: it opens itself at
|
|
39
|
-
* its
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* its scheduled start (no artist transaction, and nobody can buy early), then the
|
|
40
|
+
* artist stops and starts it at will. The first transition is real, not computed —
|
|
41
|
+
* the first sale past the start rewrites `Scheduled` to `Active` inside
|
|
42
42
|
* `mint_next`, which is why `Scheduled` only ever describes a run still waiting.
|
|
43
43
|
* Below it, each listing's `Enabled | Disabled` governs one currency. A run that
|
|
44
44
|
* is paused or not yet open sells in no currency, whatever the listings say.
|
|
@@ -70,8 +70,8 @@ export const PressingKey = new MoveTuple({ name: `${$moduleName}::PressingKey`,
|
|
|
70
70
|
export const PressingAdminCapKey = new MoveTuple({ name: `${$moduleName}::PressingAdminCapKey`, fields: [bcs.bool()] });
|
|
71
71
|
/**
|
|
72
72
|
* Whether the run sells, over every currency at once. The lifecycle runs
|
|
73
|
-
* `Scheduled → Active → Paused → Active`: a pressing opens itself at its
|
|
74
|
-
*
|
|
73
|
+
* `Scheduled → Active → Paused → Active`: a pressing opens itself at its scheduled
|
|
74
|
+
* start, then the artist stops and starts it at will.
|
|
75
75
|
*/
|
|
76
76
|
export const PressingState = new MoveEnum({ name: `${$moduleName}::PressingState`, fields: {
|
|
77
77
|
/**
|
|
@@ -82,7 +82,7 @@ export const PressingState = new MoveEnum({ name: `${$moduleName}::PressingState
|
|
|
82
82
|
* `Active` (in `mint_next`, before any sales logic), so a run reads `Scheduled`
|
|
83
83
|
* only while it is still waiting. Between the start and that first sale the run
|
|
84
84
|
* already sells — `is_selling` answers against the clock — so nobody has to go
|
|
85
|
-
* first for the
|
|
85
|
+
* first for the Pressing to be open.
|
|
86
86
|
*
|
|
87
87
|
* Consequence worth knowing: once the transition fires the start time is gone from
|
|
88
88
|
* the object. `PressingOpenedEvent` and `PressingStateChangedEvent` carry it, so
|
|
@@ -155,7 +155,7 @@ export function newPausedState(options = {}) {
|
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
* Open a release's pressing in `state` — `Scheduled` for a
|
|
158
|
+
* Open a release's pressing in `state` — `Scheduled` for a future start, `Active`
|
|
159
159
|
* to sell immediately, `Paused` to set it up quietly. Returns it unshared, so the
|
|
160
160
|
* same transaction can list it (`listing::new`) before `share` puts it on chain,
|
|
161
161
|
* plus the cap that governs it from here on. Neither value has `drop`, so neither
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
* `TypeName`. The stake cannot be destroyed while any registrations remain. Pool
|
|
14
14
|
* registrations are mutated by `royalty_pool::pool` through the package-private
|
|
15
15
|
* accessors below.
|
|
16
|
+
*
|
|
17
|
+
* Custody warning: `pool::claim_rewards` pays accrued rewards to the _caller_, and
|
|
18
|
+
* `Stake` is `key + store` — a bare shared stake (or one wrapped in a shared
|
|
19
|
+
* object that hands out `&mut`) is drainable by anyone. Stakes must stay
|
|
20
|
+
* address-owned, or wrapped by a contract that pins the reward route (e.g.
|
|
21
|
+
* `routed_stake`); the pool cannot enforce this itself.
|
|
16
22
|
*/
|
|
17
23
|
import { MoveStruct } from '../../../utils/index.js';
|
|
18
24
|
export declare const Registration: MoveStruct<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stake.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/royalty_pool/stake.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE
|
|
1
|
+
{"version":3,"file":"stake.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/royalty_pool/stake.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD,eAAO,MAAM,YAAY;;;uCAGjB,CAAC;AACT,eAAO,MAAM,KAAK;;IAEV,oDAAoD;;;;IAEpD;;;OAGG;;;;;;;;;;;;;;;;;;;;;;+CAEH,CAAC"}
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
* `TypeName`. The stake cannot be destroyed while any registrations remain. Pool
|
|
14
14
|
* registrations are mutated by `royalty_pool::pool` through the package-private
|
|
15
15
|
* accessors below.
|
|
16
|
+
*
|
|
17
|
+
* Custody warning: `pool::claim_rewards` pays accrued rewards to the _caller_, and
|
|
18
|
+
* `Stake` is `key + store` — a bare shared stake (or one wrapped in a shared
|
|
19
|
+
* object that hands out `&mut`) is drainable by anyone. Stakes must stay
|
|
20
|
+
* address-owned, or wrapped by a contract that pins the reward route (e.g.
|
|
21
|
+
* `routed_stake`); the pool cannot enforce this itself.
|
|
16
22
|
*/
|
|
17
23
|
import { MoveStruct } from '../../../utils/index.js';
|
|
18
24
|
import { bcs } from '@mysten/sui/bcs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stake.js","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/royalty_pool/stake.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE
|
|
1
|
+
{"version":3,"file":"stake.js","sourceRoot":"","sources":["../../../../../src/contracts/routed_stake/deps/royalty_pool/stake.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,qBAAqB,CAAC;AACjD,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,gBAAgB,EAAE,MAAM,EAAE;QACnF,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,gBAAgB,EAAE,GAAG,CAAC,IAAI,EAAE;KAC/B,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,wBAAwB,EAAE,MAAM,EAAE;QACpF,EAAE,EAAE,GAAG,CAAC,OAAO;QACf,oDAAoD;QACpD,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB;;;WAGG;QACH,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;KAClE,EAAE,CAAC,CAAC"}
|
package/dist/cover.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ClientWithCoreApi } from "@mysten/sui/client";
|
|
2
2
|
import type { TxThunk } from "./transactions.ts";
|
|
3
|
-
import { type AdminCapAuthority, type U64Input } from "./vault.ts";
|
|
3
|
+
import { type AdminCapAuthority, type ObjectInput, type U64Input } from "./vault.ts";
|
|
4
4
|
type ReleaseAuthorityInput = {
|
|
5
5
|
readonly authority: AdminCapAuthority;
|
|
6
6
|
readonly releaseAdminCapId?: never;
|
|
@@ -10,7 +10,7 @@ type ReleaseAuthorityInput = {
|
|
|
10
10
|
};
|
|
11
11
|
interface SetReleaseCoverParamsBase {
|
|
12
12
|
/** The `Release` object to attach the cover to. */
|
|
13
|
-
releaseId:
|
|
13
|
+
releaseId: ObjectInput;
|
|
14
14
|
/** Walrus blob id of the still cover image, as `u256` (decimal string or bigint). */
|
|
15
15
|
stillBlobId: bigint | string;
|
|
16
16
|
/** Optional animated-cover Walrus blob id (`u256`); omit for a still-only cover. */
|
package/dist/cover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cover.d.ts","sourceRoot":"","sources":["../src/cover.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cover.d.ts","sourceRoot":"","sources":["../src/cover.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAA6C,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,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AM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;CAChC;AAkCD;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,MAAM,EACjB,wBAAwB,EAAE,MAAM,GAC/B,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAMlC;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,UAAU,GAClB,gBAAgB,GAAG,IAAI,CAWzB;AAED,+EAA+E;AAC/E,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,wBAAwB,EAAE,MAAM,GAC/B,MAAM,CAMR;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,iBAAiB,EACzB,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,wBAAwB,EAAE,MAAM,GAC/B,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAsBpD"}
|
package/dist/cover.js
CHANGED
|
@@ -13,6 +13,9 @@ function releaseAuthorityOf(input) {
|
|
|
13
13
|
return directAdminCap(input.releaseAdminCapId);
|
|
14
14
|
throw new Error("release authority is required");
|
|
15
15
|
}
|
|
16
|
+
function object(tx, value) {
|
|
17
|
+
return typeof value === "string" ? tx.object(value) : value;
|
|
18
|
+
}
|
|
16
19
|
function buildCover(tx, p) {
|
|
17
20
|
const walrusType = `${p.oriPackageId}::walrus_data::WalrusData`;
|
|
18
21
|
const blob = (id) => tx.moveCall({
|
|
@@ -38,7 +41,7 @@ export function setReleaseCover(p) {
|
|
|
38
41
|
const cover = buildCover(tx, p);
|
|
39
42
|
invokeWithAdminCap(tx, releaseAuthorityOf(p), {
|
|
40
43
|
target: `${p.releaseCoverArtPackageId}::release_cover_art::set_cover`,
|
|
41
|
-
arguments: [
|
|
44
|
+
arguments: [object(tx, p.releaseId), cover],
|
|
42
45
|
adminCapIndex: 1,
|
|
43
46
|
});
|
|
44
47
|
};
|
|
@@ -49,7 +52,7 @@ export function setReleaseTrackCover(p) {
|
|
|
49
52
|
const cover = buildCover(tx, p);
|
|
50
53
|
invokeWithAdminCap(tx, releaseAuthorityOf(p), {
|
|
51
54
|
target: `${p.releaseCoverArtPackageId}::release_cover_art::set_track_cover`,
|
|
52
|
-
arguments: [
|
|
55
|
+
arguments: [object(tx, p.releaseId), tx.pure.u64(asU64("trackIndex", p.trackIndex)), cover],
|
|
53
56
|
adminCapIndex: 1,
|
|
54
57
|
});
|
|
55
58
|
};
|
package/dist/cover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cover.js","sourceRoot":"","sources":["../src/cover.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAgBtC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cover.js","sourceRoot":"","sources":["../src/cover.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAgBtC,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAA2D,MAAM,YAAY,CAAC;AAChI,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,QAAQ,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,eAAe,MAAM,oDAAoD,CAAC;AAKtF,SAAS,kBAAkB,CAAC,KAA4B;IACtD,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,SAAS,CAAC;IAC1D,IAAI,KAAK,CAAC,iBAAiB,KAAK,SAAS;QAAE,OAAO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HANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ClientWithCoreApi } from "@mysten/sui/client";
|
|
2
2
|
import type { TxThunk } from "./transactions.ts";
|
|
3
|
-
import { type AdminCapAuthority } from "./vault.ts";
|
|
3
|
+
import { type AdminCapAuthority, type ObjectInput } from "./vault.ts";
|
|
4
4
|
type CompositionAuthorityInput = {
|
|
5
5
|
readonly authority: AdminCapAuthority;
|
|
6
6
|
readonly compositionAdminCapId?: never;
|
|
@@ -59,9 +59,9 @@ export type RecordingRole = {
|
|
|
59
59
|
export type ReleaseRole = "Primary" | "Featured";
|
|
60
60
|
interface AttachCompositionCreditParamsBase {
|
|
61
61
|
/** The `Composition` object to credit on. */
|
|
62
|
-
compositionId:
|
|
62
|
+
compositionId: ObjectInput;
|
|
63
63
|
/** The `Party` being credited. */
|
|
64
|
-
partyId:
|
|
64
|
+
partyId: ObjectInput;
|
|
65
65
|
/** Human-readable name for the credit (≤200 bytes, non-empty). */
|
|
66
66
|
displayName: string;
|
|
67
67
|
/** 1–5 writing roles; duplicates are rejected on-chain. */
|
|
@@ -82,9 +82,9 @@ export type AttachCompositionCreditParams = AttachCompositionCreditParamsBase &
|
|
|
82
82
|
export declare function attachCompositionCredit(p: AttachCompositionCreditParams): TxThunk;
|
|
83
83
|
interface AttachRecordingCreditParamsBase {
|
|
84
84
|
/** The `Recording` object to credit on. */
|
|
85
|
-
recordingId:
|
|
85
|
+
recordingId: ObjectInput;
|
|
86
86
|
/** The `Party` being credited. */
|
|
87
|
-
partyId:
|
|
87
|
+
partyId: ObjectInput;
|
|
88
88
|
/** Human-readable name for the credit (≤200 bytes, non-empty). */
|
|
89
89
|
displayName: string;
|
|
90
90
|
/** 1–10 production/performance roles; duplicates are rejected on-chain. */
|
|
@@ -108,9 +108,9 @@ export type AttachRecordingCreditParams = AttachRecordingCreditParamsBase & Reco
|
|
|
108
108
|
export declare function attachRecordingCredit(p: AttachRecordingCreditParams): TxThunk;
|
|
109
109
|
interface AddRecordingArtistParamsBase {
|
|
110
110
|
/** The `Recording` object. */
|
|
111
|
-
recordingId:
|
|
111
|
+
recordingId: ObjectInput;
|
|
112
112
|
/** The `Party` to designate. Must already be credited on the recording. */
|
|
113
|
-
partyId:
|
|
113
|
+
partyId: ObjectInput;
|
|
114
114
|
/** The recording's own share coin type (the `RecordingShare` phantom). */
|
|
115
115
|
recordingShareType: string;
|
|
116
116
|
/** The parent composition's share coin type (the `CompositionShare` phantom). */
|
|
@@ -133,9 +133,9 @@ export declare function addRecordingPrimaryArtist(p: AddRecordingArtistParams):
|
|
|
133
133
|
export declare function addRecordingFeaturedArtist(p: AddRecordingArtistParams): TxThunk;
|
|
134
134
|
interface AddReleaseCreditParamsBase {
|
|
135
135
|
/** The `Release` object to credit on. */
|
|
136
|
-
releaseId:
|
|
136
|
+
releaseId: ObjectInput;
|
|
137
137
|
/** The `Party` being credited. */
|
|
138
|
-
partyId:
|
|
138
|
+
partyId: ObjectInput;
|
|
139
139
|
/** Human-readable name for the credit (≤200 bytes, non-empty). */
|
|
140
140
|
displayName: string;
|
|
141
141
|
/** The single billing role: `"Primary"` or `"Featured"`. */
|
package/dist/credits.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../src/credits.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAQ5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAQjD,OAAO,EAAsC,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../src/credits.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAQ5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAQjD,OAAO,EAAsC,KAAK,iBAAiB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,CAAC,CAAC,CAAC,CAkBhD;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,MAAM,EACnB,yBAAyB,EAAE,MAAM,GAChC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAUtC;AAED,iEAAiE;AACjE,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,iBAAiB,EACzB,iBAAiB,EAAE,SAAS,MAAM,EAAE,EACpC,yBAAyB,EAAE,MAAM,GAChC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAmBxD;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,MAAM,EACjB,uBAAuB,EAAE,MAAM,GAC9B,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAM9B;AAED,0EAA0E;AAC1E,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,iBAAiB,EACzB,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,uBAAuB,EAAE,MAAM,GAC9B,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAYhD"}
|
package/dist/credits.js
CHANGED
|
@@ -10,6 +10,9 @@ import * as recordingPartyRole from "./contracts/recording_credits/recording_par
|
|
|
10
10
|
import * as releaseCredits from "./contracts/release_credits/release_credits.js";
|
|
11
11
|
import * as releasePartyRole from "./contracts/release_credits/release_party_role.js";
|
|
12
12
|
import { directAdminCap, invokeWithAdminCap } from "./vault.js";
|
|
13
|
+
function object(tx, value) {
|
|
14
|
+
return typeof value === "string" ? tx.object(value) : value;
|
|
15
|
+
}
|
|
13
16
|
function compositionAuthorityOf(input) {
|
|
14
17
|
if (input.authority !== undefined)
|
|
15
18
|
return input.authority;
|
|
@@ -193,7 +196,7 @@ export function attachCompositionCredit(p) {
|
|
|
193
196
|
invokeWithAdminCap(tx, compositionAuthorityOf(p), {
|
|
194
197
|
target: `${p.compositionCreditsPackageId}::composition_credits::add_credit`,
|
|
195
198
|
typeArguments: [p.compositionShareType],
|
|
196
|
-
arguments: [
|
|
199
|
+
arguments: [object(tx, p.compositionId), object(tx, p.partyId), credit],
|
|
197
200
|
adminCapIndex: 1,
|
|
198
201
|
});
|
|
199
202
|
};
|
|
@@ -214,7 +217,7 @@ export function attachRecordingCredit(p) {
|
|
|
214
217
|
invokeWithAdminCap(tx, recordingAuthorityOf(p), {
|
|
215
218
|
target: `${p.recordingCreditsPackageId}::recording_credits::add_credit`,
|
|
216
219
|
typeArguments: [p.recordingShareType, p.compositionShareType],
|
|
217
|
-
arguments: [
|
|
220
|
+
arguments: [object(tx, p.recordingId), object(tx, p.partyId), credit],
|
|
218
221
|
adminCapIndex: 1,
|
|
219
222
|
});
|
|
220
223
|
};
|
|
@@ -229,7 +232,7 @@ export function addRecordingPrimaryArtist(p) {
|
|
|
229
232
|
invokeWithAdminCap(tx, recordingAuthorityOf(p), {
|
|
230
233
|
target: `${p.recordingCreditsPackageId}::recording_credits::add_primary_artist`,
|
|
231
234
|
typeArguments: [p.recordingShareType, p.compositionShareType],
|
|
232
|
-
arguments: [
|
|
235
|
+
arguments: [object(tx, p.recordingId), object(tx, p.partyId)],
|
|
233
236
|
adminCapIndex: 1,
|
|
234
237
|
});
|
|
235
238
|
};
|
|
@@ -244,7 +247,7 @@ export function addRecordingFeaturedArtist(p) {
|
|
|
244
247
|
invokeWithAdminCap(tx, recordingAuthorityOf(p), {
|
|
245
248
|
target: `${p.recordingCreditsPackageId}::recording_credits::add_featured_artist`,
|
|
246
249
|
typeArguments: [p.recordingShareType, p.compositionShareType],
|
|
247
|
-
arguments: [
|
|
250
|
+
arguments: [object(tx, p.recordingId), object(tx, p.partyId)],
|
|
248
251
|
adminCapIndex: 1,
|
|
249
252
|
});
|
|
250
253
|
};
|
|
@@ -262,7 +265,7 @@ export function addReleaseCredit(p) {
|
|
|
262
265
|
const credit = buildCredit(tx, p.misoCreditPackageId, roleType, p.displayName, [roleArg]);
|
|
263
266
|
invokeWithAdminCap(tx, releaseAuthorityOf(p), {
|
|
264
267
|
target: `${p.releaseCreditsPackageId}::release_credits::add_credit`,
|
|
265
|
-
arguments: [
|
|
268
|
+
arguments: [object(tx, p.releaseId), object(tx, p.partyId), credit],
|
|
266
269
|
adminCapIndex: 1,
|
|
267
270
|
});
|
|
268
271
|
};
|