@misonetwork/sdk 0.4.0 → 0.6.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.
Files changed (70) hide show
  1. package/README.md +101 -503
  2. package/dist/client.d.ts +21 -59
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +26 -58
  5. package/dist/client.js.map +1 -1
  6. package/dist/contracts/miso/release.d.ts +34 -31
  7. package/dist/contracts/miso/release.d.ts.map +1 -1
  8. package/dist/contracts/miso/release.js +32 -29
  9. package/dist/contracts/miso/release.js.map +1 -1
  10. package/dist/contracts/miso/track.d.ts +66 -22
  11. package/dist/contracts/miso/track.d.ts.map +1 -1
  12. package/dist/contracts/miso/track.js +65 -20
  13. package/dist/contracts/miso/track.js.map +1 -1
  14. package/dist/contracts/utils/index.d.ts +44 -0
  15. package/dist/contracts/utils/index.d.ts.map +1 -1
  16. package/dist/contracts/utils/index.js +104 -2
  17. package/dist/contracts/utils/index.js.map +1 -1
  18. package/dist/contracts.d.ts +0 -1
  19. package/dist/contracts.d.ts.map +1 -1
  20. package/dist/contracts.js +0 -1
  21. package/dist/contracts.js.map +1 -1
  22. package/dist/deployments.d.ts +21 -0
  23. package/dist/deployments.d.ts.map +1 -0
  24. package/dist/deployments.js +17 -0
  25. package/dist/deployments.js.map +1 -0
  26. package/dist/index.d.ts +1 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +1 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/internal.d.ts +0 -7
  31. package/dist/internal.d.ts.map +1 -1
  32. package/dist/internal.js +0 -22
  33. package/dist/internal.js.map +1 -1
  34. package/dist/parsers.d.ts +1 -4
  35. package/dist/parsers.d.ts.map +1 -1
  36. package/dist/parsers.js +0 -24
  37. package/dist/parsers.js.map +1 -1
  38. package/dist/queries.d.ts +2 -5
  39. package/dist/queries.d.ts.map +1 -1
  40. package/dist/queries.js +8 -45
  41. package/dist/queries.js.map +1 -1
  42. package/dist/transactions.d.ts +10 -71
  43. package/dist/transactions.d.ts.map +1 -1
  44. package/dist/transactions.js +15 -72
  45. package/dist/transactions.js.map +1 -1
  46. package/dist/types.d.ts +3 -40
  47. package/dist/types.d.ts.map +1 -1
  48. package/dist/view.d.ts +7 -7
  49. package/dist/view.d.ts.map +1 -1
  50. package/dist/view.js +9 -9
  51. package/dist/view.js.map +1 -1
  52. package/package.json +8 -4
  53. package/src/client.ts +47 -86
  54. package/src/contracts/miso/release.ts +39 -36
  55. package/src/contracts/miso/track.ts +81 -23
  56. package/src/contracts/utils/index.ts +156 -4
  57. package/src/contracts.ts +0 -1
  58. package/src/deployments.ts +42 -0
  59. package/src/index.ts +1 -0
  60. package/src/internal.ts +0 -24
  61. package/src/parsers.ts +0 -35
  62. package/src/queries.ts +11 -59
  63. package/src/transactions.ts +20 -112
  64. package/src/types.ts +3 -53
  65. package/src/view.ts +13 -13
  66. package/dist/contracts/miso/deal.d.ts +0 -184
  67. package/dist/contracts/miso/deal.d.ts.map +0 -1
  68. package/dist/contracts/miso/deal.js +0 -184
  69. package/dist/contracts/miso/deal.js.map +0 -1
  70. package/src/contracts/miso/deal.ts +0 -257
@@ -36,14 +36,22 @@
36
36
  *
37
37
  * ### Consent scope
38
38
  *
39
- * The release digest — and therefore the derived release id every `Deal` commits
40
- * to — binds the economics and membership of the release: the ordered list of
41
- * `(recording, split)` pairs and the creator's nonce. It deliberately binds
42
- * nothing else. The title — the one embedded field outside the digest — and
39
+ * The release digest — and therefore the derived release id every `Track` commits
40
+ * to at creation — binds the economics and membership of the release: the ordered
41
+ * list of `(recording, split)` pairs and the creator's nonce. It deliberately
42
+ * binds nothing else. The title — the one embedded field outside the digest — and
43
43
  * everything in the extension layer (artwork, credits, display grouping) are
44
- * chosen by the release creator, before or after deals are signed, and are trusted
45
- * and publicly attributable rather than cryptographically committed. See
46
- * `deal::new` for the signer-side statement of this boundary.
44
+ * chosen by the release creator, before or after tracks are created, and are
45
+ * trusted and publicly attributable rather than cryptographically committed. See
46
+ * `track::new` for the signer-side statement of this boundary.
47
+ *
48
+ * The derived id commits to a `(parent, digest)` pair, not the digest alone — so
49
+ * targeting an id also consents to that namespace's liveness. If the parent object
50
+ * is deleted, or its `&mut UID` becomes permanently unreachable, the release can
51
+ * never exist and every track or offer targeting it is stranded — the same
52
+ * blast-radius class as a release that simply never publishes. A coordinator meant
53
+ * to serve as the default parent namespace should therefore be shared and
54
+ * undeletable.
47
55
  *
48
56
  * ### Lifecycle and trust model
49
57
  *
@@ -62,12 +70,11 @@
62
70
  * the one trust assumption that never expires: integrators should model the cap
63
71
  * holder as able to mutate or delete any extension data, forever.
64
72
  */
65
- import { MoveTuple, MoveEnum, MoveStruct, normalizeMoveArguments } from '../utils/index.js';
73
+ import { MoveEnum, MoveStruct, MoveTuple, normalizeMoveArguments } from '../utils/index.js';
66
74
  import { bcs } from '@mysten/sui/bcs';
67
75
  import {} from '@mysten/sui/transactions';
68
76
  import * as track from './track.js';
69
77
  const $moduleName = '@local-pkg/miso::release';
70
- export const RELEASE = new MoveTuple({ name: `${$moduleName}::RELEASE`, fields: [bcs.bool()] });
71
78
  /** Lifecycle state of a release. */
72
79
  export const ReleaseState = new MoveEnum({ name: `${$moduleName}::ReleaseState`, fields: {
73
80
  /** Release is initialized but not yet published. */
@@ -83,15 +90,12 @@ export const Release = new MoveStruct({ name: `${$moduleName}::Release`, fields:
83
90
  /** Title of the release. */
84
91
  title: bcs.string(),
85
92
  /**
86
- * The ordered tracklist. Same shape as the digest pre-image every deal consented
87
- * to; display grouping lives in the metadata extension.
93
+ * The ordered tracklist. Same shape as the digest pre-image every track's creator
94
+ * consented to; display grouping lives in the metadata extension.
88
95
  */
89
96
  tracks: bcs.vector(track.Track)
90
97
  } });
91
98
  export const ReleaseKey = new MoveTuple({ name: `${$moduleName}::ReleaseKey`, fields: [bcs.vector(bcs.u8())] });
92
- export const ReleaseRegistry = new MoveStruct({ name: `${$moduleName}::ReleaseRegistry`, fields: {
93
- id: bcs.Address
94
- } });
95
99
  export const ReleaseAdminCap = new MoveStruct({ name: `${$moduleName}::ReleaseAdminCap`, fields: {
96
100
  /** Unique identifier for this capability. */
97
101
  id: bcs.Address,
@@ -99,16 +103,15 @@ export const ReleaseAdminCap = new MoveStruct({ name: `${$moduleName}::ReleaseAd
99
103
  release_id: bcs.Address
100
104
  } });
101
105
  export const ReleaseAdminCapKey = new MoveTuple({ name: `${$moduleName}::ReleaseAdminCapKey`, fields: [bcs.bool()] });
102
- export const ReleaseRegistryCreatedEvent = new MoveStruct({ name: `${$moduleName}::ReleaseRegistryCreatedEvent`, fields: {
103
- registry_id: bcs.Address,
104
- created_by: bcs.Address
105
- } });
106
106
  export const ReleasePublishedEvent = new MoveStruct({ name: `${$moduleName}::ReleasePublishedEvent`, fields: {
107
107
  release_id: bcs.Address
108
108
  } });
109
109
  /**
110
- * Creates a new release with the given configuration. Returns the release and
111
- * admin capability.
110
+ * Creates a new release with the given configuration. Claims the release's UID as
111
+ * a derived child of `parent`, keyed by the release digest (see the module doc's
112
+ * "Consent scope" section) — so contention is per-parent, and which object serves
113
+ * as parent is entirely the caller's choice. Returns the release and admin
114
+ * capability.
112
115
  */
113
116
  export function _new(options) {
114
117
  const packageAddress = options.package ?? '@local-pkg/miso';
@@ -116,9 +119,9 @@ export function _new(options) {
116
119
  '0x1::string::String',
117
120
  'vector<null>',
118
121
  'u256',
119
- null
122
+ '0x2::object::ID'
120
123
  ];
121
- const parameterNames = ["title", "tracks", "nonce", "registry"];
124
+ const parameterNames = ["title", "tracks", "nonce", "parent"];
122
125
  return (tx) => tx.moveCall({
123
126
  package: packageAddress,
124
127
  module: 'release',
@@ -164,23 +167,23 @@ export function authorize(options) {
164
167
  });
165
168
  }
166
169
  /**
167
- * Derives the release ID that `new()` would produce for the given inputs, without
168
- * creating the object. This is the on-chain equivalent of the client-side
169
- * `deriveReleaseId()` function.
170
+ * Derives the target release ID that `new()` would produce for the given inputs
171
+ * and parent, without creating the object. This is the on-chain equivalent of the
172
+ * client-side `deriveReleaseId()` function.
170
173
  */
171
- export function deriveReleaseId(options) {
174
+ export function deriveTargetReleaseId(options) {
172
175
  const packageAddress = options.package ?? '@local-pkg/miso';
173
176
  const argumentsTypes = [
174
177
  'vector<0x2::object::ID>',
175
178
  'vector<u64>',
176
179
  'u256',
177
- null
180
+ '0x2::object::ID'
178
181
  ];
179
- const parameterNames = ["recordingIds", "trackSplitValues", "nonce", "registry"];
182
+ const parameterNames = ["recordingIds", "trackSplitValues", "nonce", "parent"];
180
183
  return (tx) => tx.moveCall({
181
184
  package: packageAddress,
182
185
  module: 'release',
183
- function: 'derive_release_id',
186
+ function: 'derive_target_release_id',
184
187
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
185
188
  });
186
189
  }
@@ -1 +1 @@
1
- {"version":3,"file":"release.js","sourceRoot":"","sources":["../../../src/contracts/miso/release.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AACzH,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAC/C,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,WAAW,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAChG,oCAAoC;AACpC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,gBAAgB,EAAE,MAAM,EAAE;QACjF,oDAAoD;QACpD,W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AAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,iBAAiB,CAAC;IAC5D,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,SAAS;QACjB,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAYD;;;;;;GAMG;AACH,MAAM,UAAU,MAAM,CAAC,OAAsB;IACzC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,iBAAiB,CAAC;IAC5D,MAAM,cAAc,GAAG;QACnB,IAAI;QACJ,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACvC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
@@ -12,8 +12,8 @@
12
12
  * recording/composition share-type identities) is reached.
13
13
  * - `split_bps` — this track's share of the release's revenue; genuinely
14
14
  * release-specific and not derivable from the recording.
15
- * - `state` — the assign-once lifecycle that carries (then sheds) each deal's
16
- * target release commitment; see `TrackState`.
15
+ * - `state` — the assign-once lifecycle that carries (then sheds) the recording
16
+ * admin's target release commitment, made at creation; see `TrackState`.
17
17
  *
18
18
  * `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
19
19
  * tracks from many different recordings/compositions, so it cannot be generic over
@@ -24,16 +24,16 @@ import { MoveEnum, MoveStruct, type RawTransactionArgument } from '../utils/inde
24
24
  import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
25
25
  /**
26
26
  * Lifecycle state of a track within a release. A track is born `Unassigned`,
27
- * carrying the target `release_id` its originating `Deal` committed to (the
28
- * release id is a digest of the whole tracklist, so this is the recording owner's
29
- * consent to the exact release configuration). At publish the release verifies the
30
- * match and transitions the track to `Assigned`, which carries no id — shedding
31
- * the 32-byte commitment once it has served its purpose.
27
+ * carrying the target release id the consent committed to at creation (the release
28
+ * id is a digest of the whole tracklist, so this is the recording owner's consent
29
+ * to the exact release configuration). At publish the release verifies the match
30
+ * and transitions the track to `Assigned`, which carries no id — shedding the
31
+ * 32-byte commitment once it has served its purpose.
32
32
  */
33
33
  export declare const TrackState: MoveEnum<{
34
34
  /**
35
35
  * Track has been created but not yet assigned to a release. Carries the target
36
- * release id the originating deal committed to.
36
+ * release id the consent committed to at creation.
37
37
  */
38
38
  Unassigned: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
39
39
  /** Track has been assigned to its target release. */
@@ -44,7 +44,7 @@ export declare const Track: MoveStruct<{
44
44
  state: MoveEnum<{
45
45
  /**
46
46
  * Track has been created but not yet assigned to a release. Carries the target
47
- * release id the originating deal committed to.
47
+ * release id the consent committed to at creation.
48
48
  */
49
49
  Unassigned: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
50
50
  /** Track has been assigned to its target release. */
@@ -65,14 +65,18 @@ export declare const Track: MoveStruct<{
65
65
  split_bps: import("../utils/index.js").MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<number, number, "u16">], "bps::bps::BPS">;
66
66
  }, "@local-pkg/miso::track::Track">;
67
67
  export interface NewArguments {
68
- deal: RawTransactionArgument<string>;
68
+ _: RawTransactionArgument<string>;
69
69
  recording: RawTransactionArgument<string>;
70
+ targetReleaseId: RawTransactionArgument<string>;
71
+ trackSplitBpsValue: RawTransactionArgument<number>;
70
72
  }
71
73
  export interface NewOptions {
72
74
  package?: string;
73
75
  arguments: NewArguments | [
74
- deal: RawTransactionArgument<string>,
75
- recording: RawTransactionArgument<string>
76
+ _: RawTransactionArgument<string>,
77
+ recording: RawTransactionArgument<string>,
78
+ targetReleaseId: RawTransactionArgument<string>,
79
+ trackSplitBpsValue: RawTransactionArgument<number>
76
80
  ];
77
81
  typeArguments: [
78
82
  string,
@@ -80,17 +84,42 @@ export interface NewOptions {
80
84
  ];
81
85
  }
82
86
  /**
83
- * Creates a new track by accepting a deal. The deal is the authorization — created
84
- * by the recording's admin, carrying the target release and the agreed split.
85
- * Emits a `DealAcceptedEvent`.
87
+ * Creates a new track: the recording admin's consent to that recording's inclusion
88
+ * in a specific future release with an agreed split. Requires the recording admin
89
+ * capability. No event: a `Track` has `drop` and is not an object, so a creation
90
+ * event could announce a consent that is then silently discarded, and indexers
91
+ * would be unable to distinguish pending from dead. Pre-publish observability is
92
+ * the responsibility of whatever wraps the track (see below).
86
93
  *
87
- * The deal's `RecordingShare`/`CompositionShare` phantoms are erased here: a
88
- * `Track` is monomorphic so it can live in a release's heterogeneous
89
- * `vector<Track>`. Identity rides on those phantoms up to this point, but the
90
- * monomorphic `Track` must store the recording's _address_ for revenue routing —
91
- * and an address can't come from a phantom. So the matching `Recording` is passed
92
- * in (the deal's phantoms force it to be the right one) purely to read its id; the
93
- * deal no longer stores it.
94
+ * The composition is identified by the recording's `CompositionShare` phantom, so
95
+ * the recording↔composition pairing is compile-time enforced there is no
96
+ * `Composition` argument and no runtime ID check.
97
+ *
98
+ * ### What creating a track consents to
99
+ *
100
+ * `target_release_id` is derived from the release digest, so targeting it consents
101
+ * to that release's exact economics and membership: the ordered list of
102
+ * `(recording, split)` pairs and the creator's nonce, nothing more. The release's
103
+ * title, artwork, credits, and display grouping are chosen by the release creator
104
+ * — before or after this track is created — and are not bound by the digest.
105
+ * Presentation is trusted and publicly attributable, not cryptographically
106
+ * committed.
107
+ *
108
+ * The recording need not be `Published`: its admin can create tracks inside the
109
+ * recording's own creating transaction (an `Initialized` recording cannot escape
110
+ * that transaction, so across transactions tracks always reference `Published`,
111
+ * shared recordings).
112
+ *
113
+ * A `Track` has `store`, not `key`: it carries no identity of its own, so it may
114
+ * be exercised synchronously in the same transaction that creates it, or handed to
115
+ * an offer extension that wraps it in a real object with its own identity.
116
+ * Withdrawal, expiry, and rejection are then whatever that wrapping extension
117
+ * encodes — visible in its type, not in core.
118
+ *
119
+ * `recording` compile-time-binds the `RecordingShare`/`CompositionShare` phantom
120
+ * pairing, and is read for its id: the monomorphic `Track` must store the
121
+ * recording's _address_ for revenue routing, and an address cannot come from a
122
+ * phantom.
94
123
  */
95
124
  export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
96
125
  export interface RecordingIdArguments {
@@ -115,4 +144,19 @@ export interface SplitBpsOptions {
115
144
  }
116
145
  /** Returns this track's share of the release's revenue (in basis points). */
117
146
  export declare function splitBps(options: SplitBpsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
147
+ export interface TargetReleaseIdArguments {
148
+ self: TransactionArgument;
149
+ }
150
+ export interface TargetReleaseIdOptions {
151
+ package?: string;
152
+ arguments: TargetReleaseIdArguments | [
153
+ self: TransactionArgument
154
+ ];
155
+ }
156
+ /**
157
+ * Returns the target release id this track's creator consented to. Aborts if the
158
+ * track is `Assigned`: an assigned track only exists inside a published release,
159
+ * so its release is the object you fetched it from.
160
+ */
161
+ export declare function targetReleaseId(options: TargetReleaseIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
118
162
  //# sourceMappingURL=track.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso/track.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,E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ACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,UAAU,IAS5B,IAAI,WAAW,0DAO1B;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,uCAAuC;AACvC,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,IAM3C,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,eAAe;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,GAAG;QAC3B,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,IAMrC,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,sBAAsB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,wBAAwB,GAAG;QAClC,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,IAMnD,IAAI,WAAW,0DAM1B"}
@@ -12,8 +12,8 @@
12
12
  * recording/composition share-type identities) is reached.
13
13
  * - `split_bps` — this track's share of the release's revenue; genuinely
14
14
  * release-specific and not derivable from the recording.
15
- * - `state` — the assign-once lifecycle that carries (then sheds) each deal's
16
- * target release commitment; see `TrackState`.
15
+ * - `state` — the assign-once lifecycle that carries (then sheds) the recording
16
+ * admin's target release commitment, made at creation; see `TrackState`.
17
17
  *
18
18
  * `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
19
19
  * tracks from many different recordings/compositions, so it cannot be generic over
@@ -27,16 +27,16 @@ import * as bps from './deps/bps/bps.js';
27
27
  const $moduleName = '@local-pkg/miso::track';
28
28
  /**
29
29
  * Lifecycle state of a track within a release. A track is born `Unassigned`,
30
- * carrying the target `release_id` its originating `Deal` committed to (the
31
- * release id is a digest of the whole tracklist, so this is the recording owner's
32
- * consent to the exact release configuration). At publish the release verifies the
33
- * match and transitions the track to `Assigned`, which carries no id — shedding
34
- * the 32-byte commitment once it has served its purpose.
30
+ * carrying the target release id the consent committed to at creation (the release
31
+ * id is a digest of the whole tracklist, so this is the recording owner's consent
32
+ * to the exact release configuration). At publish the release verifies the match
33
+ * and transitions the track to `Assigned`, which carries no id — shedding the
34
+ * 32-byte commitment once it has served its purpose.
35
35
  */
36
36
  export const TrackState = new MoveEnum({ name: `${$moduleName}::TrackState`, fields: {
37
37
  /**
38
38
  * Track has been created but not yet assigned to a release. Carries the target
39
- * release id the originating deal committed to.
39
+ * release id the consent committed to at creation.
40
40
  */
41
41
  Unassigned: bcs.Address,
42
42
  /** Track has been assigned to its target release. */
@@ -60,25 +60,52 @@ export const Track = new MoveStruct({ name: `${$moduleName}::Track`, fields: {
60
60
  split_bps: bps.BPS
61
61
  } });
62
62
  /**
63
- * Creates a new track by accepting a deal. The deal is the authorization — created
64
- * by the recording's admin, carrying the target release and the agreed split.
65
- * Emits a `DealAcceptedEvent`.
63
+ * Creates a new track: the recording admin's consent to that recording's inclusion
64
+ * in a specific future release with an agreed split. Requires the recording admin
65
+ * capability. No event: a `Track` has `drop` and is not an object, so a creation
66
+ * event could announce a consent that is then silently discarded, and indexers
67
+ * would be unable to distinguish pending from dead. Pre-publish observability is
68
+ * the responsibility of whatever wraps the track (see below).
66
69
  *
67
- * The deal's `RecordingShare`/`CompositionShare` phantoms are erased here: a
68
- * `Track` is monomorphic so it can live in a release's heterogeneous
69
- * `vector<Track>`. Identity rides on those phantoms up to this point, but the
70
- * monomorphic `Track` must store the recording's _address_ for revenue routing —
71
- * and an address can't come from a phantom. So the matching `Recording` is passed
72
- * in (the deal's phantoms force it to be the right one) purely to read its id; the
73
- * deal no longer stores it.
70
+ * The composition is identified by the recording's `CompositionShare` phantom, so
71
+ * the recording↔composition pairing is compile-time enforced there is no
72
+ * `Composition` argument and no runtime ID check.
73
+ *
74
+ * ### What creating a track consents to
75
+ *
76
+ * `target_release_id` is derived from the release digest, so targeting it consents
77
+ * to that release's exact economics and membership: the ordered list of
78
+ * `(recording, split)` pairs and the creator's nonce, nothing more. The release's
79
+ * title, artwork, credits, and display grouping are chosen by the release creator
80
+ * — before or after this track is created — and are not bound by the digest.
81
+ * Presentation is trusted and publicly attributable, not cryptographically
82
+ * committed.
83
+ *
84
+ * The recording need not be `Published`: its admin can create tracks inside the
85
+ * recording's own creating transaction (an `Initialized` recording cannot escape
86
+ * that transaction, so across transactions tracks always reference `Published`,
87
+ * shared recordings).
88
+ *
89
+ * A `Track` has `store`, not `key`: it carries no identity of its own, so it may
90
+ * be exercised synchronously in the same transaction that creates it, or handed to
91
+ * an offer extension that wraps it in a real object with its own identity.
92
+ * Withdrawal, expiry, and rejection are then whatever that wrapping extension
93
+ * encodes — visible in its type, not in core.
94
+ *
95
+ * `recording` compile-time-binds the `RecordingShare`/`CompositionShare` phantom
96
+ * pairing, and is read for its id: the monomorphic `Track` must store the
97
+ * recording's _address_ for revenue routing, and an address cannot come from a
98
+ * phantom.
74
99
  */
75
100
  export function _new(options) {
76
101
  const packageAddress = options.package ?? '@local-pkg/miso';
77
102
  const argumentsTypes = [
78
103
  null,
79
- null
104
+ null,
105
+ '0x2::object::ID',
106
+ 'u16'
80
107
  ];
81
- const parameterNames = ["deal", "recording"];
108
+ const parameterNames = ["_", "recording", "targetReleaseId", "trackSplitBpsValue"];
82
109
  return (tx) => tx.moveCall({
83
110
  package: packageAddress,
84
111
  module: 'track',
@@ -115,4 +142,22 @@ export function splitBps(options) {
115
142
  arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
116
143
  });
117
144
  }
145
+ /**
146
+ * Returns the target release id this track's creator consented to. Aborts if the
147
+ * track is `Assigned`: an assigned track only exists inside a published release,
148
+ * so its release is the object you fetched it from.
149
+ */
150
+ export function targetReleaseId(options) {
151
+ const packageAddress = options.package ?? '@local-pkg/miso';
152
+ const argumentsTypes = [
153
+ null
154
+ ];
155
+ const parameterNames = ["self"];
156
+ return (tx) => tx.moveCall({
157
+ package: packageAddress,
158
+ module: 'track',
159
+ function: 'target_release_id',
160
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
161
+ });
162
+ }
118
163
  //# sourceMappingURL=track.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"track.js","sourceRoot":"","sources":["../../../src/contracts/miso/track.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAC7C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,cAAc,EAAE,MAAM,EAAE;QAC7E;;;YAGI;QACJ,UAAU,EAAE,GAAG,CAAC,OAAO;QACvB,qDAAqD;QACrD,QAAQ,EAAE,IAAI;KACjB,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,SAAS,EAAE,MAAM,EAAE;QACrE,kCAAkC;QAClC,K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;IAC5D,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,OAAO;QACf,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,OAA+B;IAC3D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,iBAAiB,CAAC;IAC5D,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,OAAO;QACf,QAAQ,EAAE,mBAAmB;QAC7B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
@@ -10,7 +10,42 @@ export type GetManyOptions<Include extends Omit<SuiClientTypes.ObjectInclude, 'c
10
10
  };
11
11
  export declare function getPureBcsSchema(typeTag: string | TypeTag): BcsType<any> | null;
12
12
  export declare function normalizeMoveArguments(args: unknown[] | object, argTypes: readonly (string | null)[], parameterNames?: string[]): TransactionArgument[];
13
+ /** A type argument: a type tag string, or a BCS type whose name is a Move type. */
14
+ export type TypeArgument = string | BcsType<any>;
15
+ export interface TypeTagOptions {
16
+ package?: string;
17
+ typeArguments?: readonly TypeArgument[];
18
+ }
19
+ /**
20
+ * `typeArguments` is required when the type's name contains unfilled
21
+ * `phantom X` parameters (at any depth). Everything else — argument arity,
22
+ * position contents, and tag validity — is validated at runtime.
23
+ */
24
+ type TypeTagParams<Name extends string> = Name extends `${string}phantom ${string}` ? [options: TypeTagOptions & {
25
+ typeArguments: readonly TypeArgument[];
26
+ }] : [options?: TypeTagOptions];
27
+ type ResolveTypeTagOptions<Name extends string> = {
28
+ client: ClientWithCoreApi;
29
+ } & (Name extends `${string}phantom ${string}` ? TypeTagOptions & {
30
+ typeArguments: readonly TypeArgument[];
31
+ } : TypeTagOptions);
13
32
  export declare class MoveStruct<T extends Record<string, BcsType<any>>, const Name extends string = string> extends BcsStruct<T, Name> {
33
+ /**
34
+ * Build the type tag for this struct.
35
+ *
36
+ * `typeArguments` is the full positional list, in Move declaration order, and
37
+ * is required when the struct has unfilled phantom parameters. The result may
38
+ * contain MVR names: those are valid in transaction `typeArguments`, but for
39
+ * queries or comparisons against on-chain data use `resolveTypeTag` instead.
40
+ */
41
+ typeTag(...args: TypeTagParams<Name>): string;
42
+ /**
43
+ * Build the type tag for this struct, then resolve any MVR names through the
44
+ * client (using its configured overrides and the MVR API) and return the
45
+ * normalized, address-only form suitable for queries and comparisons against
46
+ * on-chain data.
47
+ */
48
+ resolveTypeTag(options: ResolveTypeTagOptions<Name>): Promise<string>;
14
49
  get<Include extends Omit<SuiClientTypes.ObjectInclude, 'content' | 'json'> = {}>({ objectId, ...options }: GetOptions<Include>): Promise<SuiClientTypes.Object<Include & {
15
50
  content: true;
16
51
  json: true;
@@ -25,7 +60,16 @@ export declare class MoveStruct<T extends Record<string, BcsType<any>>, const Na
25
60
  }>>;
26
61
  }
27
62
  export declare class MoveEnum<T extends Record<string, BcsType<any> | null>, const Name extends string> extends BcsEnum<T, Name> {
63
+ /** Build the type tag for this enum. See `MoveStruct.typeTag` for semantics. */
64
+ typeTag(...args: TypeTagParams<Name>): string;
65
+ /** Build and resolve the type tag for this enum. See `MoveStruct.resolveTypeTag`. */
66
+ resolveTypeTag(options: ResolveTypeTagOptions<Name>): Promise<string>;
28
67
  }
29
68
  export declare class MoveTuple<const T extends readonly BcsType<any>[], const Name extends string> extends BcsTuple<T, Name> {
69
+ /** Build the type tag for this struct. See `MoveStruct.typeTag` for semantics. */
70
+ typeTag(...args: TypeTagParams<Name>): string;
71
+ /** Build and resolve the type tag for this struct. See `MoveStruct.resolveTypeTag`. */
72
+ resolveTypeTag(options: ResolveTypeTagOptions<Name>): Promise<string>;
30
73
  }
74
+ export {};
31
75
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contracts/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,KAAK,OAAO,EACZ,KAAK,OAAO,EAEZ,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,mBAAmB,EAAc,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKjF,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC;AAEhE,MAAM,MAAM,UAAU,CAAC,OAAO,SAAS,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,EAAE,IACxF,cAAc,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE1E,MAAM,MAAM,cAAc,CAAC,OAAO,SAAS,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG,EAAE,IAC5F,cAAc,CAAC,iBAAiB,CAAC,OAAO,CAAC,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAE3E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAmD/E;AAED,wBAAgB,sBAAsB,CACrC,IAA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