@misonetwork/sdk 0.5.0 → 0.7.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 +23 -4
- package/dist/client.d.ts +24 -13
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +25 -8
- package/dist/client.js.map +1 -1
- package/dist/contracts/miso/composition.d.ts +16 -38
- package/dist/contracts/miso/composition.d.ts.map +1 -1
- package/dist/contracts/miso/composition.js +16 -37
- package/dist/contracts/miso/composition.js.map +1 -1
- package/dist/contracts/miso/recording.d.ts +43 -18
- package/dist/contracts/miso/recording.d.ts.map +1 -1
- package/dist/contracts/miso/recording.js +45 -19
- package/dist/contracts/miso/recording.js.map +1 -1
- package/dist/contracts/miso/release.d.ts +2 -0
- package/dist/contracts/miso/release.d.ts.map +1 -1
- package/dist/contracts/miso/track.d.ts +39 -8
- package/dist/contracts/miso/track.d.ts.map +1 -1
- package/dist/contracts/miso/track.js +42 -8
- package/dist/contracts/miso/track.js.map +1 -1
- package/dist/deployments.d.ts +21 -0
- package/dist/deployments.d.ts.map +1 -0
- package/dist/deployments.js +17 -0
- package/dist/deployments.js.map +1 -0
- 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/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -0
- package/dist/internal.js.map +1 -1
- package/dist/parsers.d.ts +1 -2
- package/dist/parsers.d.ts.map +1 -1
- package/dist/parsers.js +1 -5
- package/dist/parsers.js.map +1 -1
- package/dist/transactions.d.ts +0 -9
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +1 -3
- package/dist/transactions.js.map +1 -1
- package/dist/types.d.ts +17 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/client.ts +46 -12
- package/src/contracts/miso/composition.ts +16 -53
- package/src/contracts/miso/recording.ts +59 -22
- package/src/contracts/miso/track.ts +51 -8
- package/src/deployments.ts +42 -0
- package/src/index.ts +1 -0
- package/src/internal.ts +2 -0
- package/src/parsers.ts +1 -10
- package/src/transactions.ts +1 -11
- package/src/types.ts +17 -9
|
@@ -43,14 +43,15 @@
|
|
|
43
43
|
* the one trust assumption that never expires: integrators should model the cap
|
|
44
44
|
* holder as able to mutate or delete any extension data, forever.
|
|
45
45
|
*
|
|
46
|
-
* The recording carries its parent composition's identity
|
|
47
|
-
* `CompositionShare` phantom type parameter
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
46
|
+
* The recording carries its parent composition's identity two ways. The
|
|
47
|
+
* `CompositionShare` phantom type parameter is the durable identity (a share
|
|
48
|
+
* currency is published independently of miso and survives a fresh republish,
|
|
49
|
+
* whereas an object ID does not) and makes the recording↔composition lineage
|
|
50
|
+
* compile-time enforced wherever the two meet. The embedded `composition_id` is
|
|
51
|
+
* the address-level handle: Move cannot chase a type (or an ID) to an object, so
|
|
52
|
+
* on-chain consumers holding only `&Recording` — or a bare `Track` — could not
|
|
53
|
+
* otherwise reach the composition at all. Both are set at creation and immutable,
|
|
54
|
+
* so they cannot diverge.
|
|
54
55
|
*
|
|
55
56
|
* A recording is its own freshly-created object (`object::new`), not a derived
|
|
56
57
|
* child of its composition: `recording::new` takes a read-only `&Composition`
|
|
@@ -73,7 +74,15 @@ export const Recording = new MoveStruct({ name: `${$moduleName}::Recording<phant
|
|
|
73
74
|
/** Unique identifier for this recording. */
|
|
74
75
|
id: bcs.Address,
|
|
75
76
|
/** Current lifecycle state. */
|
|
76
|
-
state: RecordingState
|
|
77
|
+
state: RecordingState,
|
|
78
|
+
/**
|
|
79
|
+
* Object ID of the parent composition. The address-level counterpart of the
|
|
80
|
+
* `CompositionShare` phantom, set from the `&Composition` passed to `new` (the
|
|
81
|
+
* shared phantom proves the pairing). An identity handle — not a revenue routing
|
|
82
|
+
* target: the composition is paid through its recording-share ownership, settled
|
|
83
|
+
* at creation.
|
|
84
|
+
*/
|
|
85
|
+
composition_id: bcs.Address
|
|
77
86
|
} });
|
|
78
87
|
export const RecordingAdminCap = new MoveStruct({ name: `${$moduleName}::RecordingAdminCap<phantom RecordingShare>`, fields: {
|
|
79
88
|
/** Unique identifier for this capability. */
|
|
@@ -104,13 +113,11 @@ export const CompositionSharesGrantedEvent = new MoveStruct({ name: `${$moduleNa
|
|
|
104
113
|
* composition owner then does with the shares (hold, stake, sell) is outside the
|
|
105
114
|
* protocol's scope.
|
|
106
115
|
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* will grant (pass the rate they observed, or `2000` to accept up to the protocol
|
|
113
|
-
* maximum).
|
|
116
|
+
* The composition's royalty rate is immutable, so the rate a recorder's client
|
|
117
|
+
* displayed is exactly the rate applied here — no slippage protection is needed or
|
|
118
|
+
* possible. Whether that rate is acceptable is the recorder's decision to make
|
|
119
|
+
* before calling; per-deal deviations settle as voluntary share transfers after
|
|
120
|
+
* creation.
|
|
114
121
|
*
|
|
115
122
|
* The composition need not be `Published`: within the composition's own creating
|
|
116
123
|
* transaction its creator can already mint recordings against it. Third parties
|
|
@@ -131,10 +138,9 @@ export function _new(options) {
|
|
|
131
138
|
const argumentsTypes = [
|
|
132
139
|
null,
|
|
133
140
|
null,
|
|
134
|
-
null
|
|
135
|
-
'u16'
|
|
141
|
+
null
|
|
136
142
|
];
|
|
137
|
-
const parameterNames = ["composition", "shareCurrency", "shareTreasuryCap"
|
|
143
|
+
const parameterNames = ["composition", "shareCurrency", "shareTreasuryCap"];
|
|
138
144
|
return (tx) => tx.moveCall({
|
|
139
145
|
package: packageAddress,
|
|
140
146
|
module: 'recording',
|
|
@@ -166,6 +172,26 @@ export function publish(options) {
|
|
|
166
172
|
typeArguments: options.typeArguments
|
|
167
173
|
});
|
|
168
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Returns the object ID of the parent composition. An identity/membership handle
|
|
177
|
+
* (the address-level counterpart of the `CompositionShare` phantom) — not a
|
|
178
|
+
* revenue routing target: the composition is paid via its recording-share
|
|
179
|
+
* ownership.
|
|
180
|
+
*/
|
|
181
|
+
export function compositionId(options) {
|
|
182
|
+
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
183
|
+
const argumentsTypes = [
|
|
184
|
+
null
|
|
185
|
+
];
|
|
186
|
+
const parameterNames = ["self"];
|
|
187
|
+
return (tx) => tx.moveCall({
|
|
188
|
+
package: packageAddress,
|
|
189
|
+
module: 'recording',
|
|
190
|
+
function: 'composition_id',
|
|
191
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
192
|
+
typeArguments: options.typeArguments
|
|
193
|
+
});
|
|
194
|
+
}
|
|
169
195
|
/** Returns the recording's object ID. */
|
|
170
196
|
export function id(options) {
|
|
171
197
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recording.js","sourceRoot":"","sources":["../../../src/contracts/miso/recording.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE
|
|
1
|
+
{"version":3,"file":"recording.js","sourceRoot":"","sources":["../../../src/contracts/miso/recording.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AACzH,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAoB,MAAM,0BAA0B,CAAC;AAC5D,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACjD,sCAAsC;AACtC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,kBAAkB,EAAE,MAAM,EAAE;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CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;QACpF,aAAa,EAAE,OAAO,CAAC,aAAa;KACvC,CAAC,CAAC;AACP,CAAC;AAgBD;;;;;;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,GAAG,CAAC,CAAC;IACrC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,SAAS;QACnB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;QACpF,aAAa,EAAE,OAAO,CAAC,aAAa;KACvC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -100,6 +100,7 @@ export declare const Release: MoveStruct<{
|
|
|
100
100
|
Unassigned: string;
|
|
101
101
|
Assigned: true;
|
|
102
102
|
}, "Unassigned" | "Assigned">;
|
|
103
|
+
composition_id: string;
|
|
103
104
|
recording_id: string;
|
|
104
105
|
split_bps: [number];
|
|
105
106
|
}[], Iterable<{
|
|
@@ -107,6 +108,7 @@ export declare const Release: MoveStruct<{
|
|
|
107
108
|
Unassigned: string | Uint8Array<ArrayBufferLike>;
|
|
108
109
|
Assigned: boolean | object | null;
|
|
109
110
|
}>;
|
|
111
|
+
composition_id: string | Uint8Array<ArrayBufferLike>;
|
|
110
112
|
recording_id: string | Uint8Array<ArrayBufferLike>;
|
|
111
113
|
split_bps: readonly [number];
|
|
112
114
|
}> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso/release.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEzH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF,oCAAoC;AACpC,eAAO,MAAM,YAAY;IACjB,oDAAoD;;IAEpD,0EAA0E;;4CAE1E,CAAC;AACT,eAAO,MAAM,OAAO;IACZ,0CAA0C;;IAE1C,+BAA+B;;QAR/B,oDAAoD;;QAEpD,0EAA0E;;;IAQ1E,4BAA4B;;IAE5B;;;OAGG
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso/release.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEzH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF,oCAAoC;AACpC,eAAO,MAAM,YAAY;IACjB,oDAAoD;;IAEpD,0EAA0E;;4CAE1E,CAAC;AACT,eAAO,MAAM,OAAO;IACZ,0CAA0C;;IAE1C,+BAA+B;;QAR/B,oDAAoD;;QAEpD,0EAA0E;;;IAQ1E,4BAA4B;;IAE5B;;;OAGG;;;;;;;;;;;;;;;;;;;;uCAEH,CAAC;AACT,eAAO,M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C,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,UAAU;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,YAAY,GAAG;QACtB,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD,2EAA2E;AAC3E,wBAAgB,GAAG,CAAC,OAAO,EAAE,UAAU,IAM3B,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACvC;AACD,MAAM,WAAW,aAAa;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,eAAe,GAAG;QACzB,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACpC,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACtC,CAAC;CACL;AACD;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,IAOjC,IAAI,WAAW,0DAM1B"}
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
* - `recording_id` — the routing target for the track's revenue, and the handle
|
|
11
11
|
* through which all other metadata (title, cover art, and the
|
|
12
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.
|
|
13
17
|
* - `split_bps` — this track's share of the release's revenue; genuinely
|
|
14
18
|
* release-specific and not derivable from the recording.
|
|
15
19
|
* - `state` — the assign-once lifecycle that carries (then sheds) the recording
|
|
@@ -17,8 +21,9 @@
|
|
|
17
21
|
*
|
|
18
22
|
* `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
|
|
19
23
|
* tracks from many different recordings/compositions, so it cannot be generic over
|
|
20
|
-
* their share types. It stores no title, cover art, or share-type —
|
|
21
|
-
* from the recording via `recording_id
|
|
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.
|
|
22
27
|
*/
|
|
23
28
|
import { MoveEnum, MoveStruct, type RawTransactionArgument } from '../utils/index.js';
|
|
24
29
|
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
@@ -50,6 +55,14 @@ export declare const Track: MoveStruct<{
|
|
|
50
55
|
/** Track has been assigned to its target release. */
|
|
51
56
|
Assigned: null;
|
|
52
57
|
}, "@local-pkg/miso::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/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
53
66
|
/**
|
|
54
67
|
* ID of the recording on this track. The routing target for the track's revenue;
|
|
55
68
|
* also the handle a consumer uses to fetch the recording (whose type carries the
|
|
@@ -91,9 +104,10 @@ export interface NewOptions {
|
|
|
91
104
|
* would be unable to distinguish pending from dead. Pre-publish observability is
|
|
92
105
|
* the responsibility of whatever wraps the track (see below).
|
|
93
106
|
*
|
|
94
|
-
* The composition is
|
|
95
|
-
*
|
|
96
|
-
*
|
|
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.
|
|
97
111
|
*
|
|
98
112
|
* ### What creating a track consents to
|
|
99
113
|
*
|
|
@@ -117,9 +131,10 @@ export interface NewOptions {
|
|
|
117
131
|
* encodes — visible in its type, not in core.
|
|
118
132
|
*
|
|
119
133
|
* `recording` compile-time-binds the `RecordingShare`/`CompositionShare` phantom
|
|
120
|
-
* pairing, and is read for its id
|
|
121
|
-
*
|
|
122
|
-
*
|
|
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.
|
|
123
138
|
*/
|
|
124
139
|
export declare function _new(options: NewOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
125
140
|
export interface RecordingIdArguments {
|
|
@@ -133,6 +148,22 @@ export interface RecordingIdOptions {
|
|
|
133
148
|
}
|
|
134
149
|
/** Returns the ID of the recording. */
|
|
135
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;
|
|
136
167
|
export interface SplitBpsArguments {
|
|
137
168
|
self: TransactionArgument;
|
|
138
169
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso/track.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE
|
|
1
|
+
{"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso/track.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE9G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU;IACf;;;QAGI;;IAEJ,qDAAqD;;wCAErD,CAAC;AACT,eAAO,MAAM,KAAK;IACV,kCAAkC;;QATlC;;;YAGI;;QAEJ,qDAAqD;;;IAMrD;;;;;;OAMG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;mCAEH,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,MAAM,CAAC;QACjC,SAAS,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACzC,eAAe,EAAE,sBAAsB,CAAC,MAAM,CAAC;QAC/C,kBAAkB,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACrD,CAAC;IACF,aAAa,EAAE;QACX,MAAM;QACN,MAAM;KACT,CAAC;CACL;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AI,WAAW,0DAM1B"}
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
* - `recording_id` — the routing target for the track's revenue, and the handle
|
|
11
11
|
* through which all other metadata (title, cover art, and the
|
|
12
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.
|
|
13
17
|
* - `split_bps` — this track's share of the release's revenue; genuinely
|
|
14
18
|
* release-specific and not derivable from the recording.
|
|
15
19
|
* - `state` — the assign-once lifecycle that carries (then sheds) the recording
|
|
@@ -17,8 +21,9 @@
|
|
|
17
21
|
*
|
|
18
22
|
* `Track` is intentionally monomorphic: a `Release` holds a `vector<Track>` of
|
|
19
23
|
* tracks from many different recordings/compositions, so it cannot be generic over
|
|
20
|
-
* their share types. It stores no title, cover art, or share-type —
|
|
21
|
-
* from the recording via `recording_id
|
|
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.
|
|
22
27
|
*/
|
|
23
28
|
import { MoveEnum, MoveStruct, normalizeMoveArguments } from '../utils/index.js';
|
|
24
29
|
import { bcs } from '@mysten/sui/bcs';
|
|
@@ -45,6 +50,14 @@ export const TrackState = new MoveEnum({ name: `${$moduleName}::TrackState`, fie
|
|
|
45
50
|
export const Track = new MoveStruct({ name: `${$moduleName}::Track`, fields: {
|
|
46
51
|
/** Current state of the track. */
|
|
47
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,
|
|
48
61
|
/**
|
|
49
62
|
* ID of the recording on this track. The routing target for the track's revenue;
|
|
50
63
|
* also the handle a consumer uses to fetch the recording (whose type carries the
|
|
@@ -67,9 +80,10 @@ export const Track = new MoveStruct({ name: `${$moduleName}::Track`, fields: {
|
|
|
67
80
|
* would be unable to distinguish pending from dead. Pre-publish observability is
|
|
68
81
|
* the responsibility of whatever wraps the track (see below).
|
|
69
82
|
*
|
|
70
|
-
* The composition is
|
|
71
|
-
*
|
|
72
|
-
*
|
|
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.
|
|
73
87
|
*
|
|
74
88
|
* ### What creating a track consents to
|
|
75
89
|
*
|
|
@@ -93,9 +107,10 @@ export const Track = new MoveStruct({ name: `${$moduleName}::Track`, fields: {
|
|
|
93
107
|
* encodes — visible in its type, not in core.
|
|
94
108
|
*
|
|
95
109
|
* `recording` compile-time-binds the `RecordingShare`/`CompositionShare` phantom
|
|
96
|
-
* pairing, and is read for its id
|
|
97
|
-
*
|
|
98
|
-
*
|
|
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.
|
|
99
114
|
*/
|
|
100
115
|
export function _new(options) {
|
|
101
116
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
@@ -128,6 +143,25 @@ export function recordingId(options) {
|
|
|
128
143
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
129
144
|
});
|
|
130
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/miso';
|
|
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
|
+
}
|
|
131
165
|
/** Returns this track's share of the release's revenue (in basis points). */
|
|
132
166
|
export function splitBps(options) {
|
|
133
167
|
const packageAddress = options.package ?? '@local-pkg/miso';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.js","sourceRoot":"","sources":["../../../src/contracts/miso/track.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE
|
|
1
|
+
{"version":3,"file":"track.js","sourceRoot":"","sources":["../../../src/contracts/miso/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;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;Q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M,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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Sui networks with a protocol deployment bundled into this SDK release. */
|
|
2
|
+
export type MisoNetwork = "mainnet" | "testnet";
|
|
3
|
+
/**
|
|
4
|
+
* On-chain identity for one Miso protocol deployment.
|
|
5
|
+
*
|
|
6
|
+
* Package deployments are immutable. A new publish is represented by a new SDK
|
|
7
|
+
* release with updated values here, keeping the ABI bindings and addresses in
|
|
8
|
+
* the same versioned artifact.
|
|
9
|
+
*/
|
|
10
|
+
export interface MisoProtocolDeployment {
|
|
11
|
+
/** The published `miso` package used for calls, types, and derivation. */
|
|
12
|
+
readonly packageId: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const MISO_PROTOCOL_DEPLOYMENTS: {
|
|
15
|
+
readonly testnet: {
|
|
16
|
+
readonly packageId: "0x974d453e82b09ac90d29cf65d981d3cf3cabe1e5ca9c6348f42860226ef9b5c4";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/** Resolve a bundled deployment, failing closed for devnet/localnet/custom names. */
|
|
20
|
+
export declare function getMisoProtocolDeployment(network: string): MisoProtocolDeployment;
|
|
21
|
+
//# sourceMappingURL=deployments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAGA,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,yBAAyB;;;;CAKmC,CAAC;AAE1E,qFAAqF;AACrF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,GACd,sBAAsB,CAaxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export const MISO_PROTOCOL_DEPLOYMENTS = {
|
|
4
|
+
testnet: {
|
|
5
|
+
packageId: "0x974d453e82b09ac90d29cf65d981d3cf3cabe1e5ca9c6348f42860226ef9b5c4",
|
|
6
|
+
},
|
|
7
|
+
};
|
|
8
|
+
/** Resolve a bundled deployment, failing closed for devnet/localnet/custom names. */
|
|
9
|
+
export function getMisoProtocolDeployment(network) {
|
|
10
|
+
const deployment = MISO_PROTOCOL_DEPLOYMENTS[network];
|
|
11
|
+
if (!deployment) {
|
|
12
|
+
throw new Error(`@misonetwork/sdk: no bundled Miso protocol deployment for network "${network}". ` +
|
|
13
|
+
"Pass an explicit deployment to miso() for custom networks.");
|
|
14
|
+
}
|
|
15
|
+
return deployment;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=deployments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAiBtC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE;QACP,SAAS,EACP,oEAAoE;KACvE;CACsE,CAAC;AAE1E,qFAAqF;AACrF,MAAM,UAAU,yBAAyB,CACvC,OAAe;IAEf,MAAM,UAAU,GACd,yBAGD,CAAC,OAAO,CAAC,CAAC;IACX,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,sEAAsE,OAAO,KAAK;YAChF,4DAA4D,CAC/D,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AAGjC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./queries.js";
|
|
|
10
10
|
export * from "./parsers.js";
|
|
11
11
|
export * from "./view.js";
|
|
12
12
|
export * from "./client.js";
|
|
13
|
+
export * from "./deployments.js";
|
|
13
14
|
// Generated, ABI-bound bindings (BCS structs + type-safe Move calls).
|
|
14
15
|
export * as contracts from "./contracts.js";
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,6EAA6E;AAC7E,4EAA4E;AAC5E,kEAAkE;AAClE,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,6EAA6E;AAC7E,4EAA4E;AAC5E,kEAAkE;AAClE,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AAEjC,sEAAsE;AACtE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,IAAI,WAAW,EACtB,KAAK,EAEN,MAAM,YAAY,CAAC;AAKpB,KAAK,MAAM,GAAG,GAAG,CAAC;AAIlB,kEAAkE;AAClE,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAErC;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,GACR;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAGtE;AAID,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,CAOjE;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,IAAI,WAAW,EACtB,KAAK,EAEN,MAAM,YAAY,CAAC;AAKpB,KAAK,MAAM,GAAG,GAAG,CAAC;AAIlB,kEAAkE;AAClE,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAErC;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,GACR;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAGtE;AAID,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,CAOjE;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAM7D;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAOzC;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,CAO7D"}
|
package/dist/internal.js
CHANGED
|
@@ -24,11 +24,13 @@ export function mapRecording(id, d) {
|
|
|
24
24
|
return {
|
|
25
25
|
id,
|
|
26
26
|
state: mapState(d.state),
|
|
27
|
+
compositionId: d.composition_id,
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
30
|
export function mapTrack(d) {
|
|
30
31
|
return {
|
|
31
32
|
state: (d.state?.$kind ?? "Unassigned"),
|
|
33
|
+
compositionId: d.composition_id,
|
|
32
34
|
recordingId: d.recording_id,
|
|
33
35
|
splitBps: mapBps(d.split_bps),
|
|
34
36
|
};
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AA8BtC,qBAAqB;AAErB,kEAAkE;AAClE,MAAM,UAAU,MAAM,CAAC,CAAS;IAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACxD,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,QAAQ,CACtB,CAAS;IAET,IAAI,CAAC,EAAE,KAAK,KAAK,WAAW;QAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;IAC7F,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;AACjC,CAAC;AAED,kBAAkB;AAElB,MAAM,UAAU,cAAc,CAAC,EAAU,EAAE,CAAS;IAClD,OAAO;QACL,EAAE;QACF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;QACxB,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,EAAU,EAAE,CAAS;IAChD,OAAO;QACL,EAAE;QACF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AA8BtC,qBAAqB;AAErB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S;IAC9C,OAAO;QACL,EAAE;QACF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;QACxB,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;KACvC,CAAC;AACJ,CAAC"}
|
package/dist/parsers.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { CompositionPublishedEvent,
|
|
1
|
+
import type { CompositionPublishedEvent, RecordingPublishedEvent, ReleasePublishedEvent } from "./types.ts";
|
|
2
2
|
export declare function parseCompositionPublishedEvent(bytes: Uint8Array): CompositionPublishedEvent;
|
|
3
|
-
export declare function parseCompositionRoyaltySetEvent(bytes: Uint8Array): CompositionRoyaltySetEvent;
|
|
4
3
|
export declare function parseRecordingPublishedEvent(bytes: Uint8Array): RecordingPublishedEvent;
|
|
5
4
|
export declare function parseReleasePublishedEvent(bytes: Uint8Array): ReleasePublishedEvent;
|
|
6
5
|
//# sourceMappingURL=parsers.d.ts.map
|
package/dist/parsers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAIpB,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,UAAU,GAAG,yBAAyB,CAG3F;AAID,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,uBAAuB,CAGvF;AAID,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,UAAU,GAAG,qBAAqB,CAGnF"}
|
package/dist/parsers.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Event parsers. The BCS layouts come from the codegen-generated structs (so
|
|
4
4
|
// they track the on-chain ABI automatically); these functions parse raw event
|
|
5
5
|
// bytes and map them to the public camelCase event types.
|
|
6
|
-
import { CompositionPublishedEvent as CompositionPublishedEventBcs
|
|
6
|
+
import { CompositionPublishedEvent as CompositionPublishedEventBcs } from "./contracts/miso/composition.js";
|
|
7
7
|
import { RecordingPublishedEvent as RecordingPublishedEventBcs } from "./contracts/miso/recording.js";
|
|
8
8
|
import { ReleasePublishedEvent as ReleasePublishedEventBcs } from "./contracts/miso/release.js";
|
|
9
9
|
// === Composition ===
|
|
@@ -11,10 +11,6 @@ export function parseCompositionPublishedEvent(bytes) {
|
|
|
11
11
|
const e = CompositionPublishedEventBcs.parse(bytes);
|
|
12
12
|
return { compositionId: e.composition_id };
|
|
13
13
|
}
|
|
14
|
-
export function parseCompositionRoyaltySetEvent(bytes) {
|
|
15
|
-
const e = CompositionRoyaltySetEventBcs.parse(bytes);
|
|
16
|
-
return { royaltyRateBps: e.royalty_rate_bps };
|
|
17
|
-
}
|
|
18
14
|
// === Recording ===
|
|
19
15
|
export function parseRecordingPublishedEvent(bytes) {
|
|
20
16
|
const e = RecordingPublishedEventBcs.parse(bytes);
|
package/dist/parsers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,6EAA6E;AAC7E,8EAA8E;AAC9E,0DAA0D;AAE1D,OAAO,
|
|
1
|
+
{"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,6EAA6E;AAC7E,8EAA8E;AAC9E,0DAA0D;AAE1D,OAAO,EAAE,yBAAyB,IAAI,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAC5G,OAAO,EAAE,uBAAuB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAE,qBAAqB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAOhG,sBAAsB;AAEtB,MAAM,UAAU,8BAA8B,CAAC,KAAiB;IAC9D,MAAM,CAAC,GAAG,4BAA4B,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC;AAC7C,CAAC;AAED,oBAAoB;AAEpB,MAAM,UAAU,4BAA4B,CAAC,KAAiB;IAC5D,MAAM,CAAC,GAAG,0BAA0B,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClD,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC;AACzC,CAAC;AAED,kBAAkB;AAElB,MAAM,UAAU,0BAA0B,CAAC,KAAiB;IAC1D,MAAM,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;AACrC,CAAC"}
|
package/dist/transactions.d.ts
CHANGED
|
@@ -42,8 +42,6 @@ export interface RecordingParts {
|
|
|
42
42
|
/** The creator's remaining share supply after the composition's cut is split off. */
|
|
43
43
|
balance: TransactionObjectArgument;
|
|
44
44
|
}
|
|
45
|
-
/** The protocol's maximum composition royalty rate (`MAX_ROYALTY_RATE_BPS`). */
|
|
46
|
-
export declare const PROTOCOL_MAX_ROYALTY_RATE_BPS = 2000;
|
|
47
45
|
export interface CreateRecordingParams extends ShareCurrencyBinding {
|
|
48
46
|
/** Share type of the parent composition (the recording's `CompositionShare` phantom). */
|
|
49
47
|
compositionShareType: string;
|
|
@@ -53,13 +51,6 @@ export interface CreateRecordingParams extends ShareCurrencyBinding {
|
|
|
53
51
|
* unshared, transaction-local `createComposition(...).composition` result.
|
|
54
52
|
*/
|
|
55
53
|
composition: TransactionObjectArgument;
|
|
56
|
-
/**
|
|
57
|
-
* Slippage guard: the maximum composition royalty rate (bps) the recorder will
|
|
58
|
-
* grant — `recording::new` aborts if the composition's live rate exceeds it.
|
|
59
|
-
* Pass the rate you observed. Defaults to the protocol maximum (2000), which
|
|
60
|
-
* accepts any legal rate.
|
|
61
|
-
*/
|
|
62
|
-
maxRoyaltyRateBps?: number;
|
|
63
54
|
misoPackageId: string;
|
|
64
55
|
}
|
|
65
56
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAMvF,0FAA0F;AAC1F,MAAM,MAAM,OAAO,GAAG,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAMhE;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,kFAAkF;IAClF,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAMD,uFAAuF;AACvF,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,yBAAyB,CAAC;IACvC,QAAQ,EAAE,yBAAyB,CAAC;IACpC,sEAAsE;IACtE,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,uBAAuB,GAAG,gBAAgB,CASpG;AAMD,qFAAqF;AACrF,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,yBAAyB,CAAC;IACrC,QAAQ,EAA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;IACvC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,qBAAqB,GAAG,cAAc,CAS9F;AAMD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,0EAA0E;IAC1E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qFAAqF;IACrF,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAG,yBAAyB,CAiBjG"}
|
package/dist/transactions.js
CHANGED
|
@@ -50,8 +50,6 @@ export function createComposition(tx, params) {
|
|
|
50
50
|
}));
|
|
51
51
|
return { composition: result[0], adminCap: result[1], balance: result[2] };
|
|
52
52
|
}
|
|
53
|
-
/** The protocol's maximum composition royalty rate (`MAX_ROYALTY_RATE_BPS`). */
|
|
54
|
-
export const PROTOCOL_MAX_ROYALTY_RATE_BPS = 2000;
|
|
55
53
|
/**
|
|
56
54
|
* PRIMITIVE. Appends `recording::new` and returns its by-value results without
|
|
57
55
|
* publishing/dispersing/transferring. Because it borrows the composition by
|
|
@@ -63,7 +61,7 @@ export function createRecording(tx, params) {
|
|
|
63
61
|
const result = tx.add(recording._new({
|
|
64
62
|
package: params.misoPackageId,
|
|
65
63
|
typeArguments: [params.shareType, params.compositionShareType],
|
|
66
|
-
arguments: [params.composition, tx.object(params.shareCurrencyId), tx.object(params.shareTreasuryCapId)
|
|
64
|
+
arguments: [params.composition, tx.object(params.shareCurrencyId), tx.object(params.shareTreasuryCapId)],
|
|
67
65
|
}));
|
|
68
66
|
return { recording: result[0], adminCap: result[1], balance: result[2] };
|
|
69
67
|
}
|
package/dist/transactions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,sEAAsE;AACtE,mDAAmD;AACnD,8EAA8E;AAC9E,6EAA6E;AAC7E,wEAAwE;AACxE,aAAa;AACb,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,gCAAgC;AAChC,EAAE;AACF,0DAA0D;AAC1D,+EAA+E;AAC/E,oEAAoE;AACpE,EAAE;AACF,8EAA8E;AAC9E,iFAAiF;AACjF,+EAA+E;AAC/E,gFAAgF;AAChF,0EAA0E;AAC1E,gFAAgF;AAChF,gFAAgF;AAChF,2CAA2C;AAC3C,EAAE;AACF,8EAA8E;AAC9E,uDAAuD;AACvD,4EAA4E;AAC5E,+DAA+D;AAC/D,4EAA4E;AAC5E,gFAAgF;AAChF,gFAAgF;AAChF,+BAA+B;AAE/B,OAAO,EAAE,WAAW,EAAkC,MAAM,0BAA0B,CAAC;AAEvF,OAAO,KAAK,WAAW,MAAM,iCAAiC,CAAC;AAC/D,OAAO,KAAK,SAAS,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AA2CnD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAe,EAAE,MAA+B;IAChF,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CACnB,WAAW,CAAC,IAAI,CAAC;QACf,OAAO,EAAE,MAAM,CAAC,aAAa;QAC7B,aAAa,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC;QACjC,SAAS,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,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