@misofm/musicos 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +75 -0
- package/dist/client.d.ts +309 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +216 -0
- package/dist/client.js.map +1 -0
- package/dist/contracts/musicos/composition.d.ts +195 -0
- package/dist/contracts/musicos/composition.d.ts.map +1 -0
- package/dist/contracts/musicos/composition.js +195 -0
- package/dist/contracts/musicos/composition.js.map +1 -0
- package/dist/contracts/musicos/deps/bps/bps.d.ts +17 -0
- package/dist/contracts/musicos/deps/bps/bps.d.ts.map +1 -0
- package/dist/contracts/musicos/deps/bps/bps.js +19 -0
- package/dist/contracts/musicos/deps/bps/bps.js.map +1 -0
- package/dist/contracts/musicos/recording.d.ts +238 -0
- package/dist/contracts/musicos/recording.d.ts.map +1 -0
- package/dist/contracts/musicos/recording.js +232 -0
- package/dist/contracts/musicos/recording.js.map +1 -0
- package/dist/contracts/musicos/release.d.ts +298 -0
- package/dist/contracts/musicos/release.d.ts.map +1 -0
- package/dist/contracts/musicos/release.js +298 -0
- package/dist/contracts/musicos/release.js.map +1 -0
- package/dist/contracts/musicos/track.d.ts +193 -0
- package/dist/contracts/musicos/track.d.ts.map +1 -0
- package/dist/contracts/musicos/track.js +197 -0
- package/dist/contracts/musicos/track.js.map +1 -0
- package/dist/contracts/utils/index.d.ts +104 -0
- package/dist/contracts/utils/index.d.ts.map +1 -0
- package/dist/contracts/utils/index.js +272 -0
- package/dist/contracts/utils/index.js.map +1 -0
- package/dist/contracts.d.ts +9 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +14 -0
- package/dist/contracts.js.map +1 -0
- package/dist/deployments.d.ts +60 -0
- package/dist/deployments.d.ts.map +1 -0
- package/dist/deployments.js +109 -0
- package/dist/deployments.js.map +1 -0
- package/dist/events.d.ts +16 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +25 -0
- package/dist/events.js.map +1 -0
- package/dist/execute.d.ts +49 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +110 -0
- package/dist/execute.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +17 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +46 -0
- package/dist/internal.js.map +1 -0
- package/dist/numeric.d.ts +5 -0
- package/dist/numeric.d.ts.map +1 -0
- package/dist/numeric.js +21 -0
- package/dist/numeric.js.map +1 -0
- package/dist/packages.d.ts +67 -0
- package/dist/packages.d.ts.map +1 -0
- package/dist/packages.js +85 -0
- package/dist/packages.js.map +1 -0
- package/dist/parsers.d.ts +9 -0
- package/dist/parsers.d.ts.map +1 -0
- package/dist/parsers.js +40 -0
- package/dist/parsers.js.map +1 -0
- package/dist/queries.d.ts +178 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +611 -0
- package/dist/queries.js.map +1 -0
- package/dist/transactions.d.ts +136 -0
- package/dist/transactions.d.ts.map +1 -0
- package/dist/transactions.js +145 -0
- package/dist/transactions.js.map +1 -0
- package/dist/types.d.ts +194 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/view.d.ts +22 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +42 -0
- package/dist/view.js.map +1 -0
- package/package.json +119 -0
- package/src/client.ts +341 -0
- package/src/contracts/musicos/composition.ts +280 -0
- package/src/contracts/musicos/deps/bps/bps.ts +22 -0
- package/src/contracts/musicos/recording.ts +308 -0
- package/src/contracts/musicos/release.ts +409 -0
- package/src/contracts/musicos/track.ts +255 -0
- package/src/contracts/utils/index.ts +428 -0
- package/src/contracts.ts +29 -0
- package/src/deployments.ts +166 -0
- package/src/events.ts +30 -0
- package/src/execute.ts +137 -0
- package/src/index.ts +21 -0
- package/src/internal.ts +78 -0
- package/src/numeric.ts +25 -0
- package/src/packages.ts +117 -0
- package/src/parsers.ts +66 -0
- package/src/queries.ts +928 -0
- package/src/transactions.ts +305 -0
- package/src/types.ts +222 -0
- package/src/view.ts +65 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Represents a track on a release, linking a recording to its position in the
|
|
6
|
+
* tracklist.
|
|
7
|
+
*
|
|
8
|
+
* A `Track` is the minimal positioned (recording, revenue-share) pair:
|
|
9
|
+
*
|
|
10
|
+
* - `recording_id` — the routing target for the track's revenue, and the handle
|
|
11
|
+
* through which all other metadata (title, cover art, and the
|
|
12
|
+
* recording/composition share-type identities) is reached.
|
|
13
|
+
* - `composition_id` — the identity of the recording's underlying work, so the
|
|
14
|
+
* composition–recording–release graph is walkable on-chain from the release
|
|
15
|
+
* alone. Move cannot chase an ID to an object, so this edge is unreachable in a
|
|
16
|
+
* track loop unless embedded here.
|
|
17
|
+
* - `split_bps` — this track's share of the release's revenue; genuinely
|
|
18
|
+
* release-specific and not derivable from the recording.
|
|
19
|
+
* - `state` — the assign-once lifecycle that carries (then sheds) the recording
|
|
20
|
+
* admin's target release commitment, made at creation; see `TrackState`.
|
|
21
|
+
*
|
|
22
|
+
* `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
|
|
23
|
+
* tracks from many different recordings/compositions, so it cannot be generic over
|
|
24
|
+
* their share types. It stores no title, cover art, or share-type — those are
|
|
25
|
+
* consumed off-chain and derived from the recording via `recording_id`; a `Track`
|
|
26
|
+
* embeds exactly the facts on-chain consumers cannot reach any other way.
|
|
27
|
+
*/
|
|
28
|
+
import { MoveEnum, MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
29
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
30
|
+
/**
|
|
31
|
+
* Lifecycle state of a track within a release. A track is born `Unassigned`,
|
|
32
|
+
* carrying the target release id the consent committed to at creation (the release
|
|
33
|
+
* id is a digest of the whole tracklist, so this is the recording owner's consent
|
|
34
|
+
* to the exact release configuration). At publish the release verifies the match
|
|
35
|
+
* and transitions the track to `Assigned`, which carries no id — shedding the
|
|
36
|
+
* 32-byte commitment once it has served its purpose.
|
|
37
|
+
*/
|
|
38
|
+
export declare const TrackState: MoveEnum<{
|
|
39
|
+
/**
|
|
40
|
+
* Track has been created but not yet assigned to a release. Carries the target
|
|
41
|
+
* release id the consent committed to at creation.
|
|
42
|
+
*/
|
|
43
|
+
Unassigned: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
44
|
+
/** Track has been assigned to its target release. */
|
|
45
|
+
Assigned: null;
|
|
46
|
+
}, "@local-pkg/musicos::track::TrackState">;
|
|
47
|
+
export declare const Track: MoveStruct<{
|
|
48
|
+
/** Current state of the track. */
|
|
49
|
+
state: MoveEnum<{
|
|
50
|
+
/**
|
|
51
|
+
* Track has been created but not yet assigned to a release. Carries the target
|
|
52
|
+
* release id the consent committed to at creation.
|
|
53
|
+
*/
|
|
54
|
+
Unassigned: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
55
|
+
/** Track has been assigned to its target release. */
|
|
56
|
+
Assigned: null;
|
|
57
|
+
}, "@local-pkg/musicos::track::TrackState">;
|
|
58
|
+
/**
|
|
59
|
+
* ID of the composition underlying this track's recording. An identity and
|
|
60
|
+
* membership handle — NOT a revenue routing target: the composition is paid
|
|
61
|
+
* through its recording-share ownership (settled at `recording::new`), so a track
|
|
62
|
+
* routes its full split to the recording. Immutable and safe to denormalize: the
|
|
63
|
+
* recording↔composition pairing is fixed at recording creation.
|
|
64
|
+
*/
|
|
65
|
+
composition_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
66
|
+
/**
|
|
67
|
+
* ID of the recording on this track. The routing target for the track's revenue;
|
|
68
|
+
* also the handle a consumer uses to fetch the recording (whose type carries the
|
|
69
|
+
* recording and composition share-type identities).
|
|
70
|
+
*/
|
|
71
|
+
recording_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
72
|
+
/**
|
|
73
|
+
* This track's share of the release's revenue, in basis points. All tracks in a
|
|
74
|
+
* release sum to 100%. The composition's cut is settled as recording-share
|
|
75
|
+
* ownership at recording creation, so it is not split out here — a track routes
|
|
76
|
+
* its full share to the recording.
|
|
77
|
+
*/
|
|
78
|
+
split_bps: import("../utils/index.ts").MoveTuple<readonly [import("@mysten/bcs").BcsType<number, number, "u16">], "bps::bps::BPS">;
|
|
79
|
+
}, "@local-pkg/musicos::track::Track">;
|
|
80
|
+
export interface NewArguments {
|
|
81
|
+
_: RawTransactionArgument<string>;
|
|
82
|
+
recording: RawTransactionArgument<string>;
|
|
83
|
+
targetReleaseId: RawTransactionArgument<string>;
|
|
84
|
+
trackSplitBpsValue: RawTransactionArgument<number>;
|
|
85
|
+
}
|
|
86
|
+
export interface NewOptions {
|
|
87
|
+
package?: string;
|
|
88
|
+
arguments: NewArguments | [
|
|
89
|
+
_: RawTransactionArgument<string>,
|
|
90
|
+
recording: RawTransactionArgument<string>,
|
|
91
|
+
targetReleaseId: RawTransactionArgument<string>,
|
|
92
|
+
trackSplitBpsValue: RawTransactionArgument<number>
|
|
93
|
+
];
|
|
94
|
+
typeArguments: [
|
|
95
|
+
string,
|
|
96
|
+
string
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Creates a new track: the recording admin's consent to that recording's inclusion
|
|
101
|
+
* in a specific future release with an agreed split. Requires the recording admin
|
|
102
|
+
* capability. No event: a `Track` has `drop` and is not an object, so a creation
|
|
103
|
+
* event could announce a consent that is then silently discarded, and indexers
|
|
104
|
+
* would be unable to distinguish pending from dead. Pre-publish observability is
|
|
105
|
+
* the responsibility of whatever wraps the track (see below).
|
|
106
|
+
*
|
|
107
|
+
* The recording↔composition pairing is compile-time enforced by the recording's
|
|
108
|
+
* `CompositionShare` phantom, and its address-level counterpart is embedded on the
|
|
109
|
+
* recording at creation — so the composition id is copied from the `&Recording`
|
|
110
|
+
* argument with no `Composition` argument and no runtime check needed.
|
|
111
|
+
*
|
|
112
|
+
* ### What creating a track consents to
|
|
113
|
+
*
|
|
114
|
+
* `target_release_id` is derived from the release digest, so targeting it consents
|
|
115
|
+
* to that release's exact economics and membership: the ordered list of
|
|
116
|
+
* `(recording, split)` pairs and the creator's nonce, nothing more. The release's
|
|
117
|
+
* title, artwork, credits, and display grouping are chosen by the release creator
|
|
118
|
+
* — before or after this track is created — and are not bound by the digest.
|
|
119
|
+
* Presentation is trusted and publicly attributable, not cryptographically
|
|
120
|
+
* committed.
|
|
121
|
+
*
|
|
122
|
+
* The recording need not be `Published`: its admin can create tracks inside the
|
|
123
|
+
* recording's own creating transaction (an `Initialized` recording cannot escape
|
|
124
|
+
* that transaction, so across transactions tracks always reference `Published`,
|
|
125
|
+
* shared recordings).
|
|
126
|
+
*
|
|
127
|
+
* A `Track` has `store`, not `key`: it carries no identity of its own, so it may
|
|
128
|
+
* be exercised synchronously in the same transaction that creates it, or handed to
|
|
129
|
+
* an offer extension that wraps it in a real object with its own identity.
|
|
130
|
+
* Withdrawal, expiry, and rejection are then whatever that wrapping extension
|
|
131
|
+
* encodes — visible in its type, not in core.
|
|
132
|
+
*
|
|
133
|
+
* `recording` compile-time-binds the `RecordingShare`/`CompositionShare` phantom
|
|
134
|
+
* pairing, and is read for its own id and its embedded composition id: the
|
|
135
|
+
* monomorphic `Track` must store both _addresses_ — the recording's for revenue
|
|
136
|
+
* routing, the composition's for graph reachability — and an address cannot come
|
|
137
|
+
* from a phantom.
|
|
138
|
+
*/
|
|
139
|
+
export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
140
|
+
export interface RecordingIdArguments {
|
|
141
|
+
self: TransactionArgument;
|
|
142
|
+
}
|
|
143
|
+
export interface RecordingIdOptions {
|
|
144
|
+
package?: string;
|
|
145
|
+
arguments: RecordingIdArguments | [
|
|
146
|
+
self: TransactionArgument
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
/** Returns the ID of the recording. */
|
|
150
|
+
export declare function recordingId(options: RecordingIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
151
|
+
export interface CompositionIdArguments {
|
|
152
|
+
self: TransactionArgument;
|
|
153
|
+
}
|
|
154
|
+
export interface CompositionIdOptions {
|
|
155
|
+
package?: string;
|
|
156
|
+
arguments: CompositionIdArguments | [
|
|
157
|
+
self: TransactionArgument
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Returns the ID of the composition underlying this track's recording. An
|
|
162
|
+
* identity/membership handle (e.g. "is this composition on this release?") — not a
|
|
163
|
+
* revenue routing target: the composition is paid via its recording-share
|
|
164
|
+
* ownership, and a track routes its full split to the recording.
|
|
165
|
+
*/
|
|
166
|
+
export declare function compositionId(options: CompositionIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
167
|
+
export interface SplitBpsArguments {
|
|
168
|
+
self: TransactionArgument;
|
|
169
|
+
}
|
|
170
|
+
export interface SplitBpsOptions {
|
|
171
|
+
package?: string;
|
|
172
|
+
arguments: SplitBpsArguments | [
|
|
173
|
+
self: TransactionArgument
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
/** Returns this track's share of the release's revenue (in basis points). */
|
|
177
|
+
export declare function splitBps(options: SplitBpsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
178
|
+
export interface TargetReleaseIdArguments {
|
|
179
|
+
self: TransactionArgument;
|
|
180
|
+
}
|
|
181
|
+
export interface TargetReleaseIdOptions {
|
|
182
|
+
package?: string;
|
|
183
|
+
arguments: TargetReleaseIdArguments | [
|
|
184
|
+
self: TransactionArgument
|
|
185
|
+
];
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Returns the target release id this track's creator consented to. Aborts if the
|
|
189
|
+
* track is `Assigned`: an assigned track only exists inside a published release,
|
|
190
|
+
* so its release is the object you fetched it from.
|
|
191
|
+
*/
|
|
192
|
+
export declare function targetReleaseId(options: TargetReleaseIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
193
|
+
//# sourceMappingURL=track.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../../../src/contracts/musicos/track.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG9G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;IACf;;;QAGI;;IAEJ,qDAAqD;;2CAErD,CAAC;AACT,eAAO,MAAM,KAAK;IACV,kCAAkC;;QATlC;;;YAGI;;QAEJ,qDAAqD;;;IAMrD;;;;;;OAMG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;sCAEH,CAAC;AACT,MAAM,WAAW,YAAY;IACzB,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAClC,SAAS,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC1C,eAAe,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAChD,kBAAkB,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACtD;AACD,MAAM,WAAW,UAAU;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,YAAY,GAAG;QACtB,CAAC,EAAE,sBAAsB,CAAC,M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,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,QAM/C,WAAW,0DAM1B"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Represents a track on a release, linking a recording to its position in the
|
|
6
|
+
* tracklist.
|
|
7
|
+
*
|
|
8
|
+
* A `Track` is the minimal positioned (recording, revenue-share) pair:
|
|
9
|
+
*
|
|
10
|
+
* - `recording_id` — the routing target for the track's revenue, and the handle
|
|
11
|
+
* through which all other metadata (title, cover art, and the
|
|
12
|
+
* recording/composition share-type identities) is reached.
|
|
13
|
+
* - `composition_id` — the identity of the recording's underlying work, so the
|
|
14
|
+
* composition–recording–release graph is walkable on-chain from the release
|
|
15
|
+
* alone. Move cannot chase an ID to an object, so this edge is unreachable in a
|
|
16
|
+
* track loop unless embedded here.
|
|
17
|
+
* - `split_bps` — this track's share of the release's revenue; genuinely
|
|
18
|
+
* release-specific and not derivable from the recording.
|
|
19
|
+
* - `state` — the assign-once lifecycle that carries (then sheds) the recording
|
|
20
|
+
* admin's target release commitment, made at creation; see `TrackState`.
|
|
21
|
+
*
|
|
22
|
+
* `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
|
|
23
|
+
* tracks from many different recordings/compositions, so it cannot be generic over
|
|
24
|
+
* their share types. It stores no title, cover art, or share-type — those are
|
|
25
|
+
* consumed off-chain and derived from the recording via `recording_id`; a `Track`
|
|
26
|
+
* embeds exactly the facts on-chain consumers cannot reach any other way.
|
|
27
|
+
*/
|
|
28
|
+
import { MoveEnum, MoveStruct, normalizeMoveArguments } from '../utils/index.js';
|
|
29
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
30
|
+
import {} from '@mysten/sui/transactions';
|
|
31
|
+
import * as bps from './deps/bps/bps.js';
|
|
32
|
+
const $moduleName = '@local-pkg/musicos::track';
|
|
33
|
+
/**
|
|
34
|
+
* Lifecycle state of a track within a release. A track is born `Unassigned`,
|
|
35
|
+
* carrying the target release id the consent committed to at creation (the release
|
|
36
|
+
* id is a digest of the whole tracklist, so this is the recording owner's consent
|
|
37
|
+
* to the exact release configuration). At publish the release verifies the match
|
|
38
|
+
* and transitions the track to `Assigned`, which carries no id — shedding the
|
|
39
|
+
* 32-byte commitment once it has served its purpose.
|
|
40
|
+
*/
|
|
41
|
+
export const TrackState = new MoveEnum({ name: `${$moduleName}::TrackState`, fields: {
|
|
42
|
+
/**
|
|
43
|
+
* Track has been created but not yet assigned to a release. Carries the target
|
|
44
|
+
* release id the consent committed to at creation.
|
|
45
|
+
*/
|
|
46
|
+
Unassigned: bcs.Address,
|
|
47
|
+
/** Track has been assigned to its target release. */
|
|
48
|
+
Assigned: null
|
|
49
|
+
} });
|
|
50
|
+
export const Track = new MoveStruct({ name: `${$moduleName}::Track`, fields: {
|
|
51
|
+
/** Current state of the track. */
|
|
52
|
+
state: TrackState,
|
|
53
|
+
/**
|
|
54
|
+
* ID of the composition underlying this track's recording. An identity and
|
|
55
|
+
* membership handle — NOT a revenue routing target: the composition is paid
|
|
56
|
+
* through its recording-share ownership (settled at `recording::new`), so a track
|
|
57
|
+
* routes its full split to the recording. Immutable and safe to denormalize: the
|
|
58
|
+
* recording↔composition pairing is fixed at recording creation.
|
|
59
|
+
*/
|
|
60
|
+
composition_id: bcs.Address,
|
|
61
|
+
/**
|
|
62
|
+
* ID of the recording on this track. The routing target for the track's revenue;
|
|
63
|
+
* also the handle a consumer uses to fetch the recording (whose type carries the
|
|
64
|
+
* recording and composition share-type identities).
|
|
65
|
+
*/
|
|
66
|
+
recording_id: bcs.Address,
|
|
67
|
+
/**
|
|
68
|
+
* This track's share of the release's revenue, in basis points. All tracks in a
|
|
69
|
+
* release sum to 100%. The composition's cut is settled as recording-share
|
|
70
|
+
* ownership at recording creation, so it is not split out here — a track routes
|
|
71
|
+
* its full share to the recording.
|
|
72
|
+
*/
|
|
73
|
+
split_bps: bps.BPS
|
|
74
|
+
} });
|
|
75
|
+
/**
|
|
76
|
+
* Creates a new track: the recording admin's consent to that recording's inclusion
|
|
77
|
+
* in a specific future release with an agreed split. Requires the recording admin
|
|
78
|
+
* capability. No event: a `Track` has `drop` and is not an object, so a creation
|
|
79
|
+
* event could announce a consent that is then silently discarded, and indexers
|
|
80
|
+
* would be unable to distinguish pending from dead. Pre-publish observability is
|
|
81
|
+
* the responsibility of whatever wraps the track (see below).
|
|
82
|
+
*
|
|
83
|
+
* The recording↔composition pairing is compile-time enforced by the recording's
|
|
84
|
+
* `CompositionShare` phantom, and its address-level counterpart is embedded on the
|
|
85
|
+
* recording at creation — so the composition id is copied from the `&Recording`
|
|
86
|
+
* argument with no `Composition` argument and no runtime check needed.
|
|
87
|
+
*
|
|
88
|
+
* ### What creating a track consents to
|
|
89
|
+
*
|
|
90
|
+
* `target_release_id` is derived from the release digest, so targeting it consents
|
|
91
|
+
* to that release's exact economics and membership: the ordered list of
|
|
92
|
+
* `(recording, split)` pairs and the creator's nonce, nothing more. The release's
|
|
93
|
+
* title, artwork, credits, and display grouping are chosen by the release creator
|
|
94
|
+
* — before or after this track is created — and are not bound by the digest.
|
|
95
|
+
* Presentation is trusted and publicly attributable, not cryptographically
|
|
96
|
+
* committed.
|
|
97
|
+
*
|
|
98
|
+
* The recording need not be `Published`: its admin can create tracks inside the
|
|
99
|
+
* recording's own creating transaction (an `Initialized` recording cannot escape
|
|
100
|
+
* that transaction, so across transactions tracks always reference `Published`,
|
|
101
|
+
* shared recordings).
|
|
102
|
+
*
|
|
103
|
+
* A `Track` has `store`, not `key`: it carries no identity of its own, so it may
|
|
104
|
+
* be exercised synchronously in the same transaction that creates it, or handed to
|
|
105
|
+
* an offer extension that wraps it in a real object with its own identity.
|
|
106
|
+
* Withdrawal, expiry, and rejection are then whatever that wrapping extension
|
|
107
|
+
* encodes — visible in its type, not in core.
|
|
108
|
+
*
|
|
109
|
+
* `recording` compile-time-binds the `RecordingShare`/`CompositionShare` phantom
|
|
110
|
+
* pairing, and is read for its own id and its embedded composition id: the
|
|
111
|
+
* monomorphic `Track` must store both _addresses_ — the recording's for revenue
|
|
112
|
+
* routing, the composition's for graph reachability — and an address cannot come
|
|
113
|
+
* from a phantom.
|
|
114
|
+
*/
|
|
115
|
+
export function _new(options) {
|
|
116
|
+
const packageAddress = options.package ?? '@local-pkg/musicos';
|
|
117
|
+
const argumentsTypes = [
|
|
118
|
+
null,
|
|
119
|
+
null,
|
|
120
|
+
'0x2::object::ID',
|
|
121
|
+
'u16'
|
|
122
|
+
];
|
|
123
|
+
const parameterNames = ["_", "recording", "targetReleaseId", "trackSplitBpsValue"];
|
|
124
|
+
return (tx) => tx.moveCall({
|
|
125
|
+
package: packageAddress,
|
|
126
|
+
module: 'track',
|
|
127
|
+
function: 'new',
|
|
128
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
129
|
+
typeArguments: options.typeArguments
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/** Returns the ID of the recording. */
|
|
133
|
+
export function recordingId(options) {
|
|
134
|
+
const packageAddress = options.package ?? '@local-pkg/musicos';
|
|
135
|
+
const argumentsTypes = [
|
|
136
|
+
null
|
|
137
|
+
];
|
|
138
|
+
const parameterNames = ["self"];
|
|
139
|
+
return (tx) => tx.moveCall({
|
|
140
|
+
package: packageAddress,
|
|
141
|
+
module: 'track',
|
|
142
|
+
function: 'recording_id',
|
|
143
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Returns the ID of the composition underlying this track's recording. An
|
|
148
|
+
* identity/membership handle (e.g. "is this composition on this release?") — not a
|
|
149
|
+
* revenue routing target: the composition is paid via its recording-share
|
|
150
|
+
* ownership, and a track routes its full split to the recording.
|
|
151
|
+
*/
|
|
152
|
+
export function compositionId(options) {
|
|
153
|
+
const packageAddress = options.package ?? '@local-pkg/musicos';
|
|
154
|
+
const argumentsTypes = [
|
|
155
|
+
null
|
|
156
|
+
];
|
|
157
|
+
const parameterNames = ["self"];
|
|
158
|
+
return (tx) => tx.moveCall({
|
|
159
|
+
package: packageAddress,
|
|
160
|
+
module: 'track',
|
|
161
|
+
function: 'composition_id',
|
|
162
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/** Returns this track's share of the release's revenue (in basis points). */
|
|
166
|
+
export function splitBps(options) {
|
|
167
|
+
const packageAddress = options.package ?? '@local-pkg/musicos';
|
|
168
|
+
const argumentsTypes = [
|
|
169
|
+
null
|
|
170
|
+
];
|
|
171
|
+
const parameterNames = ["self"];
|
|
172
|
+
return (tx) => tx.moveCall({
|
|
173
|
+
package: packageAddress,
|
|
174
|
+
module: 'track',
|
|
175
|
+
function: 'split_bps',
|
|
176
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Returns the target release id this track's creator consented to. Aborts if the
|
|
181
|
+
* track is `Assigned`: an assigned track only exists inside a published release,
|
|
182
|
+
* so its release is the object you fetched it from.
|
|
183
|
+
*/
|
|
184
|
+
export function targetReleaseId(options) {
|
|
185
|
+
const packageAddress = options.package ?? '@local-pkg/musicos';
|
|
186
|
+
const argumentsTypes = [
|
|
187
|
+
null
|
|
188
|
+
];
|
|
189
|
+
const parameterNames = ["self"];
|
|
190
|
+
return (tx) => tx.moveCall({
|
|
191
|
+
package: packageAddress,
|
|
192
|
+
module: 'track',
|
|
193
|
+
function: 'target_release_id',
|
|
194
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=track.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"track.js","sourceRoot":"","sources":["../../../src/contracts/musicos/track.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,GAAG,MAAM,mBAAmB,CAAC;AACzC,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAChD;;;;;;;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,KAAK,EAAE,UAAU;QACjB;;;;;;WAMG;QACH,cAAc,EAAE,GAAG,CAAC,OAAO;QAC3B;;;;WAIG;QACH,YAAY,EAAE,GAAG,CAAC,OAAO;QACzB;;;;;WAKG;QACH,SAAS,EAAE,GAAG,CAAC,GAAG;KACrB,EAAE,CAAC,CAAC;AAoBT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,UAAU,IAAI,CAAC,OAAmB;IACpC,MAAM,cAAc,GAAG,OA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|
2
|
+
import { type TransactionArgument, type TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
3
|
+
import { type ClientWithCoreApi, type SuiClientTypes } from '@mysten/sui/client';
|
|
4
|
+
export type RawTransactionArgument<T> = T | TransactionArgument;
|
|
5
|
+
export type GetOptions<Include extends Omit<SuiClientTypes.ObjectInclude, 'content'> = {}> = SuiClientTypes.GetObjectOptions<Include> & {
|
|
6
|
+
client: ClientWithCoreApi;
|
|
7
|
+
};
|
|
8
|
+
export type GetManyOptions<Include extends Omit<SuiClientTypes.ObjectInclude, 'content'> = {}> = SuiClientTypes.GetObjectsOptions<Include> & {
|
|
9
|
+
client: ClientWithCoreApi;
|
|
10
|
+
};
|
|
11
|
+
export declare function getPureBcsSchema(typeTag: string | TypeTag): BcsType<any> | null;
|
|
12
|
+
export declare function normalizeMoveArguments(args: unknown[] | object, argTypes: readonly (string | null)[], parameterNames?: string[]): TransactionArgument[];
|
|
13
|
+
/** Context passed to config resolver functions. */
|
|
14
|
+
export interface ConfigResolverContext {
|
|
15
|
+
/**
|
|
16
|
+
* The matched parameter's own instantiated type arguments (not the whole function's type
|
|
17
|
+
* argument tuple). Concrete instantiations are canonical type tags; generic positions pass
|
|
18
|
+
* the caller's `typeArguments` strings through as provided.
|
|
19
|
+
*/
|
|
20
|
+
typeArguments: string[];
|
|
21
|
+
/** The package address the generated call will be sent to. */
|
|
22
|
+
packageAddress: string;
|
|
23
|
+
/** The Move module of the generated call. */
|
|
24
|
+
moduleName: string;
|
|
25
|
+
/** The Move function of the generated call. */
|
|
26
|
+
functionName: string;
|
|
27
|
+
/** The Move name of the matched parameter, when the summary includes parameter names. */
|
|
28
|
+
parameterName?: string;
|
|
29
|
+
/** The matched parameter's position in the generated function's arguments. */
|
|
30
|
+
parameterIndex: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A non-callback transaction argument in a generated config object, used for keys whose matched
|
|
34
|
+
* parameter can't be supplied as an object id string.
|
|
35
|
+
*/
|
|
36
|
+
export type ConfigObjectValue = Exclude<TransactionObjectArgument, (...args: never[]) => unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* A plain value in a generated config object: an object id or a non-callback transaction
|
|
39
|
+
* argument. Keys that can resolve multiple bindings are typed as resolver functions instead.
|
|
40
|
+
*/
|
|
41
|
+
export type ConfigValue = string | ConfigObjectValue;
|
|
42
|
+
/** A type argument: a type tag string, or a BCS type whose name is a Move type. */
|
|
43
|
+
export type TypeArgument = string | BcsType<any>;
|
|
44
|
+
export interface TypeTagOptions {
|
|
45
|
+
package?: string;
|
|
46
|
+
typeArguments?: readonly TypeArgument[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* `typeArguments` is required when the type's name contains unfilled
|
|
50
|
+
* `phantom X` parameters (at any depth). Everything else — argument arity,
|
|
51
|
+
* position contents, and tag validity — is validated at runtime.
|
|
52
|
+
*/
|
|
53
|
+
type TypeTagParams<Name extends string> = Name extends `${string}phantom ${string}` ? [options: TypeTagOptions & {
|
|
54
|
+
typeArguments: readonly TypeArgument[];
|
|
55
|
+
}] : [options?: TypeTagOptions];
|
|
56
|
+
type ResolveTypeTagOptions<Name extends string> = {
|
|
57
|
+
client: ClientWithCoreApi;
|
|
58
|
+
} & (Name extends `${string}phantom ${string}` ? TypeTagOptions & {
|
|
59
|
+
typeArguments: readonly TypeArgument[];
|
|
60
|
+
} : TypeTagOptions);
|
|
61
|
+
export declare class MoveStruct<T extends Record<string, BcsType<any>>, const Name extends string = string> extends BcsStruct<T, Name> {
|
|
62
|
+
/**
|
|
63
|
+
* Build the type tag for this struct.
|
|
64
|
+
*
|
|
65
|
+
* `typeArguments` is the full positional list, in Move declaration order, and
|
|
66
|
+
* is required when the struct has unfilled phantom parameters. The result may
|
|
67
|
+
* contain MVR names: those are valid in transaction `typeArguments`, but for
|
|
68
|
+
* queries or comparisons against on-chain data use `resolveTypeTag` instead.
|
|
69
|
+
*/
|
|
70
|
+
typeTag(...args: TypeTagParams<Name>): string;
|
|
71
|
+
/**
|
|
72
|
+
* Build the type tag for this struct, then resolve any MVR names through the
|
|
73
|
+
* client (using its configured overrides and the MVR API) and return the
|
|
74
|
+
* normalized, address-only form suitable for queries and comparisons against
|
|
75
|
+
* on-chain data.
|
|
76
|
+
*/
|
|
77
|
+
resolveTypeTag(options: ResolveTypeTagOptions<Name>): Promise<string>;
|
|
78
|
+
get<Include extends Omit<SuiClientTypes.ObjectInclude, 'content' | 'json'> = {}>({ objectId, ...options }: GetOptions<Include>): Promise<SuiClientTypes.Object<Include & {
|
|
79
|
+
content: true;
|
|
80
|
+
json: true;
|
|
81
|
+
}> & {
|
|
82
|
+
json: BcsStruct<T>['$inferType'];
|
|
83
|
+
}>;
|
|
84
|
+
getMany<Include extends Omit<SuiClientTypes.ObjectInclude, 'content' | 'json'> = {}>({ client, ...options }: GetManyOptions<Include>): Promise<Array<SuiClientTypes.Object<Include & {
|
|
85
|
+
content: true;
|
|
86
|
+
json: true;
|
|
87
|
+
}> & {
|
|
88
|
+
json: BcsStruct<T>['$inferType'];
|
|
89
|
+
}>>;
|
|
90
|
+
}
|
|
91
|
+
export declare class MoveEnum<T extends Record<string, BcsType<any> | null>, const Name extends string> extends BcsEnum<T, Name> {
|
|
92
|
+
/** Build the type tag for this enum. See `MoveStruct.typeTag` for semantics. */
|
|
93
|
+
typeTag(...args: TypeTagParams<Name>): string;
|
|
94
|
+
/** Build and resolve the type tag for this enum. See `MoveStruct.resolveTypeTag`. */
|
|
95
|
+
resolveTypeTag(options: ResolveTypeTagOptions<Name>): Promise<string>;
|
|
96
|
+
}
|
|
97
|
+
export declare class MoveTuple<const T extends readonly BcsType<any>[], const Name extends string> extends BcsTuple<T, Name> {
|
|
98
|
+
/** Build the type tag for this struct. See `MoveStruct.typeTag` for semantics. */
|
|
99
|
+
typeTag(...args: TypeTagParams<Name>): string;
|
|
100
|
+
/** Build and resolve the type tag for this struct. See `MoveStruct.resolveTypeTag`. */
|
|
101
|
+
resolveTypeTag(options: ResolveTypeTagOptions<Name>): Promise<string>;
|
|
102
|
+
}
|
|
103
|
+
export {};
|
|
104
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,EACN,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAE9B,MAAM,0BAA0B,CAAC;AAClC,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,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,EACxB,QAAQ,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EACpC,cAAc,CAAC,EAAE,MAAM,EAAE,yBAsFzB;AAID,mDAAmD;AACnD,MA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