@misonetwork/sdk 0.2.2 → 0.3.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 +44 -98
- package/dist/contracts.d.ts +0 -12
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +3 -16
- package/dist/contracts.js.map +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +0 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +0 -4
- package/dist/internal.js.map +1 -1
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js.map +1 -1
- package/package.json +1 -13
- package/src/contracts.ts +3 -19
- package/src/index.ts +3 -3
- package/src/internal.ts +10 -15
- package/src/queries.ts +5 -4
- package/dist/contracts/composition_credits/composition_credits.d.ts +0 -181
- package/dist/contracts/composition_credits/composition_credits.d.ts.map +0 -1
- package/dist/contracts/composition_credits/composition_credits.js +0 -109
- package/dist/contracts/composition_credits/composition_credits.js.map +0 -1
- package/dist/contracts/composition_credits/composition_party_role.d.ts +0 -119
- package/dist/contracts/composition_credits/composition_party_role.d.ts.map +0 -1
- package/dist/contracts/composition_credits/composition_party_role.js +0 -139
- package/dist/contracts/composition_credits/composition_party_role.js.map +0 -1
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts +0 -24
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +0 -1
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js +0 -23
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +0 -1
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts +0 -37
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +0 -1
- package/dist/contracts/composition_credits/deps/sui/vec_map.js +0 -28
- package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +0 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +0 -87
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +0 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +0 -80
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +0 -1
- package/dist/contracts/cover_art/cover_art.d.ts +0 -85
- package/dist/contracts/cover_art/cover_art.d.ts.map +0 -1
- package/dist/contracts/cover_art/cover_art.js +0 -68
- package/dist/contracts/cover_art/cover_art.js.map +0 -1
- package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts +0 -52
- package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts.map +0 -1
- package/dist/contracts/cover_art/deps/ori/walrus_data.js +0 -37
- package/dist/contracts/cover_art/deps/ori/walrus_data.js.map +0 -1
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +0 -24
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +0 -1
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js +0 -23
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +0 -1
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +0 -37
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +0 -1
- package/dist/contracts/recording_credits/deps/sui/vec_map.js +0 -28
- package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +0 -1
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +0 -21
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +0 -1
- package/dist/contracts/recording_credits/deps/sui/vec_set.js +0 -20
- package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +0 -1
- package/dist/contracts/recording_credits/recording_credits.d.ts +0 -2313
- package/dist/contracts/recording_credits/recording_credits.d.ts.map +0 -1
- package/dist/contracts/recording_credits/recording_credits.js +0 -270
- package/dist/contracts/recording_credits/recording_credits.js.map +0 -1
- package/dist/contracts/recording_credits/recording_party_role.d.ts +0 -1174
- package/dist/contracts/recording_credits/recording_party_role.d.ts.map +0 -1
- package/dist/contracts/recording_credits/recording_party_role.js +0 -692
- package/dist/contracts/recording_credits/recording_party_role.js.map +0 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +0 -90
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +0 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +0 -80
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +0 -1
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +0 -52
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +0 -1
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +0 -37
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +0 -1
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +0 -46
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +0 -1
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +0 -21
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +0 -1
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +0 -33
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +0 -1
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js +0 -32
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +0 -1
- package/dist/contracts/release_cover_art/release_cover_art.d.ts +0 -300
- package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +0 -1
- package/dist/contracts/release_cover_art/release_cover_art.js +0 -168
- package/dist/contracts/release_cover_art/release_cover_art.js.map +0 -1
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +0 -24
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +0 -1
- package/dist/contracts/release_credits/deps/miso_credit/credit.js +0 -23
- package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +0 -1
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +0 -37
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +0 -1
- package/dist/contracts/release_credits/deps/sui/vec_map.js +0 -28
- package/dist/contracts/release_credits/deps/sui/vec_map.js.map +0 -1
- package/dist/contracts/release_credits/release_credits.d.ts +0 -142
- package/dist/contracts/release_credits/release_credits.d.ts.map +0 -1
- package/dist/contracts/release_credits/release_credits.js +0 -108
- package/dist/contracts/release_credits/release_credits.js.map +0 -1
- package/dist/contracts/release_credits/release_party_role.d.ts +0 -58
- package/dist/contracts/release_credits/release_party_role.d.ts.map +0 -1
- package/dist/contracts/release_credits/release_party_role.js +0 -66
- package/dist/contracts/release_credits/release_party_role.js.map +0 -1
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +0 -18
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +0 -1
- package/dist/contracts/royalty_pool/deps/std/type_name.js +0 -20
- package/dist/contracts/royalty_pool/deps/std/type_name.js.map +0 -1
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +0 -13
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +0 -1
- package/dist/contracts/royalty_pool/deps/sui/balance.js +0 -15
- package/dist/contracts/royalty_pool/deps/sui/balance.js.map +0 -1
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +0 -37
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +0 -1
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js +0 -28
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +0 -1
- package/dist/contracts/royalty_pool/pool.d.ts +0 -358
- package/dist/contracts/royalty_pool/pool.d.ts.map +0 -1
- package/dist/contracts/royalty_pool/pool.js +0 -352
- package/dist/contracts/royalty_pool/pool.js.map +0 -1
- package/dist/contracts/royalty_pool/stake.d.ts +0 -202
- package/dist/contracts/royalty_pool/stake.d.ts.map +0 -1
- package/dist/contracts/royalty_pool/stake.js +0 -197
- package/dist/contracts/royalty_pool/stake.js.map +0 -1
- package/dist/cover.d.ts +0 -48
- package/dist/cover.d.ts.map +0 -1
- package/dist/cover.js +0 -68
- package/dist/cover.js.map +0 -1
- package/dist/credits.d.ts +0 -171
- package/dist/credits.d.ts.map +0 -1
- package/dist/credits.js +0 -360
- package/dist/credits.js.map +0 -1
- package/dist/extensions/royalty-pool.d.ts +0 -32
- package/dist/extensions/royalty-pool.d.ts.map +0 -1
- package/dist/extensions/royalty-pool.js +0 -33
- package/dist/extensions/royalty-pool.js.map +0 -1
- package/src/contracts/composition_credits/composition_credits.ts +0 -169
- package/src/contracts/composition_credits/composition_party_role.ts +0 -189
- package/src/contracts/composition_credits/deps/miso_credit/credit.ts +0 -27
- package/src/contracts/composition_credits/deps/sui/vec_map.ts +0 -33
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +0 -135
- package/src/contracts/cover_art/cover_art.ts +0 -99
- package/src/contracts/cover_art/deps/ori/walrus_data.ts +0 -36
- package/src/contracts/recording_credits/deps/miso_credit/credit.ts +0 -27
- package/src/contracts/recording_credits/deps/sui/vec_map.ts +0 -33
- package/src/contracts/recording_credits/deps/sui/vec_set.ts +0 -21
- package/src/contracts/recording_credits/recording_credits.ts +0 -458
- package/src/contracts/recording_credits/recording_party_role.ts +0 -1041
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +0 -138
- package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +0 -36
- package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +0 -23
- package/src/contracts/release_cover_art/deps/per_track/per_track.ts +0 -36
- package/src/contracts/release_cover_art/release_cover_art.ts +0 -251
- package/src/contracts/release_credits/deps/miso_credit/credit.ts +0 -27
- package/src/contracts/release_credits/deps/sui/vec_map.ts +0 -33
- package/src/contracts/release_credits/release_credits.ts +0 -156
- package/src/contracts/release_credits/release_party_role.ts +0 -87
- package/src/contracts/royalty_pool/deps/std/type_name.ts +0 -22
- package/src/contracts/royalty_pool/deps/sui/balance.ts +0 -17
- package/src/contracts/royalty_pool/deps/sui/vec_map.ts +0 -33
- package/src/contracts/royalty_pool/pool.ts +0 -577
- package/src/contracts/royalty_pool/stake.ts +0 -317
- package/src/cover.ts +0 -136
- package/src/credits.ts +0 -645
- package/src/extensions/royalty-pool.ts +0 -85
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* First-party credits extension for recordings.
|
|
8
|
-
*
|
|
9
|
-
* Attribution (credits + primary/featured artists) is display-oriented and varies
|
|
10
|
-
* across platforms, so it lives here as a dynamic field on the recording rather
|
|
11
|
-
* than in immutable core. The data is attached under `ExtensionKey()` via the
|
|
12
|
-
* recording's cap-gated `uid_mut`, so every mutation is authorized by the
|
|
13
|
-
* recording's admin and credits survive into any lifecycle state (they may be
|
|
14
|
-
* attached before or after the recording is published).
|
|
15
|
-
*
|
|
16
|
-
* This is Miso's canonical credits standard; because it is an extension, other
|
|
17
|
-
* parties may publish their own recording-credits standard against the same
|
|
18
|
-
* `Recording`. Credits are NOT read by the economics — they are attribution.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
22
|
-
import { bcs } from '@mysten/sui/bcs';
|
|
23
|
-
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
24
|
-
import * as vec_map from './deps/sui/vec_map.js';
|
|
25
|
-
import * as credit from './deps/miso_credit/credit.js';
|
|
26
|
-
import * as recording_party_role from './recording_party_role.js';
|
|
27
|
-
import * as vec_set from './deps/sui/vec_set.js';
|
|
28
|
-
const $moduleName = '@local-pkg/recording_credits::recording_credits';
|
|
29
|
-
export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
|
|
30
|
-
export const RecordingCredits = new MoveStruct({ name: `${$moduleName}::RecordingCredits`, fields: {
|
|
31
|
-
/** Map of party IDs to their credit (display name + roles). */
|
|
32
|
-
credits: vec_map.VecMap(bcs.Address, credit.Credit(recording_party_role.RecordingPartyRole)),
|
|
33
|
-
/** IDs of the primary artists. Always a subset of `credits`. */
|
|
34
|
-
primary_artist_ids: vec_set.VecSet(bcs.Address),
|
|
35
|
-
/** IDs of the featured artists. Always a subset of `credits`. */
|
|
36
|
-
featured_artist_ids: vec_set.VecSet(bcs.Address)
|
|
37
|
-
} });
|
|
38
|
-
export const CreditAddedEvent = new MoveStruct({ name: `${$moduleName}::CreditAddedEvent`, fields: {
|
|
39
|
-
recording_id: bcs.Address,
|
|
40
|
-
party_id: bcs.Address,
|
|
41
|
-
credit: credit.Credit(recording_party_role.RecordingPartyRole)
|
|
42
|
-
} });
|
|
43
|
-
export const CreditRemovedEvent = new MoveStruct({ name: `${$moduleName}::CreditRemovedEvent`, fields: {
|
|
44
|
-
recording_id: bcs.Address,
|
|
45
|
-
party_id: bcs.Address,
|
|
46
|
-
credit: credit.Credit(recording_party_role.RecordingPartyRole)
|
|
47
|
-
} });
|
|
48
|
-
export const PrimaryArtistAddedEvent = new MoveStruct({ name: `${$moduleName}::PrimaryArtistAddedEvent`, fields: {
|
|
49
|
-
recording_id: bcs.Address,
|
|
50
|
-
party_id: bcs.Address
|
|
51
|
-
} });
|
|
52
|
-
export const PrimaryArtistRemovedEvent = new MoveStruct({ name: `${$moduleName}::PrimaryArtistRemovedEvent`, fields: {
|
|
53
|
-
recording_id: bcs.Address,
|
|
54
|
-
party_id: bcs.Address
|
|
55
|
-
} });
|
|
56
|
-
export const FeaturedArtistAddedEvent = new MoveStruct({ name: `${$moduleName}::FeaturedArtistAddedEvent`, fields: {
|
|
57
|
-
recording_id: bcs.Address,
|
|
58
|
-
party_id: bcs.Address
|
|
59
|
-
} });
|
|
60
|
-
export const FeaturedArtistRemovedEvent = new MoveStruct({ name: `${$moduleName}::FeaturedArtistRemovedEvent`, fields: {
|
|
61
|
-
recording_id: bcs.Address,
|
|
62
|
-
party_id: bcs.Address
|
|
63
|
-
} });
|
|
64
|
-
export interface AddCreditArguments {
|
|
65
|
-
self: RawTransactionArgument<string>;
|
|
66
|
-
cap: RawTransactionArgument<string>;
|
|
67
|
-
party: RawTransactionArgument<string>;
|
|
68
|
-
credit: TransactionArgument;
|
|
69
|
-
}
|
|
70
|
-
export interface AddCreditOptions {
|
|
71
|
-
package?: string;
|
|
72
|
-
arguments: AddCreditArguments | [
|
|
73
|
-
self: RawTransactionArgument<string>,
|
|
74
|
-
cap: RawTransactionArgument<string>,
|
|
75
|
-
party: RawTransactionArgument<string>,
|
|
76
|
-
credit: TransactionArgument
|
|
77
|
-
];
|
|
78
|
-
typeArguments: [
|
|
79
|
-
string,
|
|
80
|
-
string
|
|
81
|
-
];
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Adds a credit for a party on the recording, lazily creating the credits record
|
|
85
|
-
* on first use. Each credit must have 1-10 roles, and a party may hold at most one
|
|
86
|
-
* credit. Requires the recording's admin capability.
|
|
87
|
-
*/
|
|
88
|
-
export function addCredit(options: AddCreditOptions) {
|
|
89
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
90
|
-
const argumentsTypes = [
|
|
91
|
-
null,
|
|
92
|
-
null,
|
|
93
|
-
null,
|
|
94
|
-
null
|
|
95
|
-
] satisfies (string | null)[];
|
|
96
|
-
const parameterNames = ["self", "cap", "party", "credit"];
|
|
97
|
-
return (tx: Transaction) => tx.moveCall({
|
|
98
|
-
package: packageAddress,
|
|
99
|
-
module: 'recording_credits',
|
|
100
|
-
function: 'add_credit',
|
|
101
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
102
|
-
typeArguments: options.typeArguments
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
export interface RemoveCreditArguments {
|
|
106
|
-
self: RawTransactionArgument<string>;
|
|
107
|
-
cap: RawTransactionArgument<string>;
|
|
108
|
-
partyId: RawTransactionArgument<string>;
|
|
109
|
-
}
|
|
110
|
-
export interface RemoveCreditOptions {
|
|
111
|
-
package?: string;
|
|
112
|
-
arguments: RemoveCreditArguments | [
|
|
113
|
-
self: RawTransactionArgument<string>,
|
|
114
|
-
cap: RawTransactionArgument<string>,
|
|
115
|
-
partyId: RawTransactionArgument<string>
|
|
116
|
-
];
|
|
117
|
-
typeArguments: [
|
|
118
|
-
string,
|
|
119
|
-
string
|
|
120
|
-
];
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Removes a party's credit. Also drops them from the primary/featured sets,
|
|
124
|
-
* preserving the invariant that those are subsets of the credited parties.
|
|
125
|
-
* Requires the recording's admin capability.
|
|
126
|
-
*/
|
|
127
|
-
export function removeCredit(options: RemoveCreditOptions) {
|
|
128
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
129
|
-
const argumentsTypes = [
|
|
130
|
-
null,
|
|
131
|
-
null,
|
|
132
|
-
'0x2::object::ID'
|
|
133
|
-
] satisfies (string | null)[];
|
|
134
|
-
const parameterNames = ["self", "cap", "partyId"];
|
|
135
|
-
return (tx: Transaction) => tx.moveCall({
|
|
136
|
-
package: packageAddress,
|
|
137
|
-
module: 'recording_credits',
|
|
138
|
-
function: 'remove_credit',
|
|
139
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
140
|
-
typeArguments: options.typeArguments
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
export interface AddPrimaryArtistArguments {
|
|
144
|
-
self: RawTransactionArgument<string>;
|
|
145
|
-
cap: RawTransactionArgument<string>;
|
|
146
|
-
party: RawTransactionArgument<string>;
|
|
147
|
-
}
|
|
148
|
-
export interface AddPrimaryArtistOptions {
|
|
149
|
-
package?: string;
|
|
150
|
-
arguments: AddPrimaryArtistArguments | [
|
|
151
|
-
self: RawTransactionArgument<string>,
|
|
152
|
-
cap: RawTransactionArgument<string>,
|
|
153
|
-
party: RawTransactionArgument<string>
|
|
154
|
-
];
|
|
155
|
-
typeArguments: [
|
|
156
|
-
string,
|
|
157
|
-
string
|
|
158
|
-
];
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Designates an already-credited party as a primary artist. The party must be
|
|
162
|
-
* credited and not already a primary or featured artist.
|
|
163
|
-
*/
|
|
164
|
-
export function addPrimaryArtist(options: AddPrimaryArtistOptions) {
|
|
165
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
166
|
-
const argumentsTypes = [
|
|
167
|
-
null,
|
|
168
|
-
null,
|
|
169
|
-
null
|
|
170
|
-
] satisfies (string | null)[];
|
|
171
|
-
const parameterNames = ["self", "cap", "party"];
|
|
172
|
-
return (tx: Transaction) => tx.moveCall({
|
|
173
|
-
package: packageAddress,
|
|
174
|
-
module: 'recording_credits',
|
|
175
|
-
function: 'add_primary_artist',
|
|
176
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
177
|
-
typeArguments: options.typeArguments
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
export interface RemovePrimaryArtistArguments {
|
|
181
|
-
self: RawTransactionArgument<string>;
|
|
182
|
-
cap: RawTransactionArgument<string>;
|
|
183
|
-
partyId: RawTransactionArgument<string>;
|
|
184
|
-
}
|
|
185
|
-
export interface RemovePrimaryArtistOptions {
|
|
186
|
-
package?: string;
|
|
187
|
-
arguments: RemovePrimaryArtistArguments | [
|
|
188
|
-
self: RawTransactionArgument<string>,
|
|
189
|
-
cap: RawTransactionArgument<string>,
|
|
190
|
-
partyId: RawTransactionArgument<string>
|
|
191
|
-
];
|
|
192
|
-
typeArguments: [
|
|
193
|
-
string,
|
|
194
|
-
string
|
|
195
|
-
];
|
|
196
|
-
}
|
|
197
|
-
/** Removes a party from the primary-artist set (leaves the credit intact). */
|
|
198
|
-
export function removePrimaryArtist(options: RemovePrimaryArtistOptions) {
|
|
199
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
200
|
-
const argumentsTypes = [
|
|
201
|
-
null,
|
|
202
|
-
null,
|
|
203
|
-
'0x2::object::ID'
|
|
204
|
-
] satisfies (string | null)[];
|
|
205
|
-
const parameterNames = ["self", "cap", "partyId"];
|
|
206
|
-
return (tx: Transaction) => tx.moveCall({
|
|
207
|
-
package: packageAddress,
|
|
208
|
-
module: 'recording_credits',
|
|
209
|
-
function: 'remove_primary_artist',
|
|
210
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
211
|
-
typeArguments: options.typeArguments
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
export interface AddFeaturedArtistArguments {
|
|
215
|
-
self: RawTransactionArgument<string>;
|
|
216
|
-
cap: RawTransactionArgument<string>;
|
|
217
|
-
party: RawTransactionArgument<string>;
|
|
218
|
-
}
|
|
219
|
-
export interface AddFeaturedArtistOptions {
|
|
220
|
-
package?: string;
|
|
221
|
-
arguments: AddFeaturedArtistArguments | [
|
|
222
|
-
self: RawTransactionArgument<string>,
|
|
223
|
-
cap: RawTransactionArgument<string>,
|
|
224
|
-
party: RawTransactionArgument<string>
|
|
225
|
-
];
|
|
226
|
-
typeArguments: [
|
|
227
|
-
string,
|
|
228
|
-
string
|
|
229
|
-
];
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Designates an already-credited party as a featured artist. The party must be
|
|
233
|
-
* credited and not already a primary or featured artist.
|
|
234
|
-
*/
|
|
235
|
-
export function addFeaturedArtist(options: AddFeaturedArtistOptions) {
|
|
236
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
237
|
-
const argumentsTypes = [
|
|
238
|
-
null,
|
|
239
|
-
null,
|
|
240
|
-
null
|
|
241
|
-
] satisfies (string | null)[];
|
|
242
|
-
const parameterNames = ["self", "cap", "party"];
|
|
243
|
-
return (tx: Transaction) => tx.moveCall({
|
|
244
|
-
package: packageAddress,
|
|
245
|
-
module: 'recording_credits',
|
|
246
|
-
function: 'add_featured_artist',
|
|
247
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
248
|
-
typeArguments: options.typeArguments
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
export interface RemoveFeaturedArtistArguments {
|
|
252
|
-
self: RawTransactionArgument<string>;
|
|
253
|
-
cap: RawTransactionArgument<string>;
|
|
254
|
-
partyId: RawTransactionArgument<string>;
|
|
255
|
-
}
|
|
256
|
-
export interface RemoveFeaturedArtistOptions {
|
|
257
|
-
package?: string;
|
|
258
|
-
arguments: RemoveFeaturedArtistArguments | [
|
|
259
|
-
self: RawTransactionArgument<string>,
|
|
260
|
-
cap: RawTransactionArgument<string>,
|
|
261
|
-
partyId: RawTransactionArgument<string>
|
|
262
|
-
];
|
|
263
|
-
typeArguments: [
|
|
264
|
-
string,
|
|
265
|
-
string
|
|
266
|
-
];
|
|
267
|
-
}
|
|
268
|
-
/** Removes a party from the featured-artist set (leaves the credit intact). */
|
|
269
|
-
export function removeFeaturedArtist(options: RemoveFeaturedArtistOptions) {
|
|
270
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
271
|
-
const argumentsTypes = [
|
|
272
|
-
null,
|
|
273
|
-
null,
|
|
274
|
-
'0x2::object::ID'
|
|
275
|
-
] satisfies (string | null)[];
|
|
276
|
-
const parameterNames = ["self", "cap", "partyId"];
|
|
277
|
-
return (tx: Transaction) => tx.moveCall({
|
|
278
|
-
package: packageAddress,
|
|
279
|
-
module: 'recording_credits',
|
|
280
|
-
function: 'remove_featured_artist',
|
|
281
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
282
|
-
typeArguments: options.typeArguments
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
export interface HasCreditsArguments {
|
|
286
|
-
self: RawTransactionArgument<string>;
|
|
287
|
-
}
|
|
288
|
-
export interface HasCreditsOptions {
|
|
289
|
-
package?: string;
|
|
290
|
-
arguments: HasCreditsArguments | [
|
|
291
|
-
self: RawTransactionArgument<string>
|
|
292
|
-
];
|
|
293
|
-
typeArguments: [
|
|
294
|
-
string,
|
|
295
|
-
string
|
|
296
|
-
];
|
|
297
|
-
}
|
|
298
|
-
/** Returns whether a credits record has been attached to this recording yet. */
|
|
299
|
-
export function hasCredits(options: HasCreditsOptions) {
|
|
300
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
301
|
-
const argumentsTypes = [
|
|
302
|
-
null
|
|
303
|
-
] satisfies (string | null)[];
|
|
304
|
-
const parameterNames = ["self"];
|
|
305
|
-
return (tx: Transaction) => tx.moveCall({
|
|
306
|
-
package: packageAddress,
|
|
307
|
-
module: 'recording_credits',
|
|
308
|
-
function: 'has_credits',
|
|
309
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
310
|
-
typeArguments: options.typeArguments
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
export interface CreditsArguments {
|
|
314
|
-
self: RawTransactionArgument<string>;
|
|
315
|
-
}
|
|
316
|
-
export interface CreditsOptions {
|
|
317
|
-
package?: string;
|
|
318
|
-
arguments: CreditsArguments | [
|
|
319
|
-
self: RawTransactionArgument<string>
|
|
320
|
-
];
|
|
321
|
-
typeArguments: [
|
|
322
|
-
string,
|
|
323
|
-
string
|
|
324
|
-
];
|
|
325
|
-
}
|
|
326
|
-
/** Returns the party-to-credit map. Aborts if no credits are attached. */
|
|
327
|
-
export function credits(options: CreditsOptions) {
|
|
328
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
329
|
-
const argumentsTypes = [
|
|
330
|
-
null
|
|
331
|
-
] satisfies (string | null)[];
|
|
332
|
-
const parameterNames = ["self"];
|
|
333
|
-
return (tx: Transaction) => tx.moveCall({
|
|
334
|
-
package: packageAddress,
|
|
335
|
-
module: 'recording_credits',
|
|
336
|
-
function: 'credits',
|
|
337
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
338
|
-
typeArguments: options.typeArguments
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
export interface PrimaryArtistIdsArguments {
|
|
342
|
-
self: RawTransactionArgument<string>;
|
|
343
|
-
}
|
|
344
|
-
export interface PrimaryArtistIdsOptions {
|
|
345
|
-
package?: string;
|
|
346
|
-
arguments: PrimaryArtistIdsArguments | [
|
|
347
|
-
self: RawTransactionArgument<string>
|
|
348
|
-
];
|
|
349
|
-
typeArguments: [
|
|
350
|
-
string,
|
|
351
|
-
string
|
|
352
|
-
];
|
|
353
|
-
}
|
|
354
|
-
/** Returns the primary-artist IDs. Aborts if no credits are attached. */
|
|
355
|
-
export function primaryArtistIds(options: PrimaryArtistIdsOptions) {
|
|
356
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
357
|
-
const argumentsTypes = [
|
|
358
|
-
null
|
|
359
|
-
] satisfies (string | null)[];
|
|
360
|
-
const parameterNames = ["self"];
|
|
361
|
-
return (tx: Transaction) => tx.moveCall({
|
|
362
|
-
package: packageAddress,
|
|
363
|
-
module: 'recording_credits',
|
|
364
|
-
function: 'primary_artist_ids',
|
|
365
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
366
|
-
typeArguments: options.typeArguments
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
export interface FeaturedArtistIdsArguments {
|
|
370
|
-
self: RawTransactionArgument<string>;
|
|
371
|
-
}
|
|
372
|
-
export interface FeaturedArtistIdsOptions {
|
|
373
|
-
package?: string;
|
|
374
|
-
arguments: FeaturedArtistIdsArguments | [
|
|
375
|
-
self: RawTransactionArgument<string>
|
|
376
|
-
];
|
|
377
|
-
typeArguments: [
|
|
378
|
-
string,
|
|
379
|
-
string
|
|
380
|
-
];
|
|
381
|
-
}
|
|
382
|
-
/** Returns the featured-artist IDs. Aborts if no credits are attached. */
|
|
383
|
-
export function featuredArtistIds(options: FeaturedArtistIdsOptions) {
|
|
384
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
385
|
-
const argumentsTypes = [
|
|
386
|
-
null
|
|
387
|
-
] satisfies (string | null)[];
|
|
388
|
-
const parameterNames = ["self"];
|
|
389
|
-
return (tx: Transaction) => tx.moveCall({
|
|
390
|
-
package: packageAddress,
|
|
391
|
-
module: 'recording_credits',
|
|
392
|
-
function: 'featured_artist_ids',
|
|
393
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
394
|
-
typeArguments: options.typeArguments
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
export interface IsPrimaryArtistArguments {
|
|
398
|
-
self: RawTransactionArgument<string>;
|
|
399
|
-
partyId: RawTransactionArgument<string>;
|
|
400
|
-
}
|
|
401
|
-
export interface IsPrimaryArtistOptions {
|
|
402
|
-
package?: string;
|
|
403
|
-
arguments: IsPrimaryArtistArguments | [
|
|
404
|
-
self: RawTransactionArgument<string>,
|
|
405
|
-
partyId: RawTransactionArgument<string>
|
|
406
|
-
];
|
|
407
|
-
typeArguments: [
|
|
408
|
-
string,
|
|
409
|
-
string
|
|
410
|
-
];
|
|
411
|
-
}
|
|
412
|
-
/** Returns whether the party is a primary artist (false if no credits attached). */
|
|
413
|
-
export function isPrimaryArtist(options: IsPrimaryArtistOptions) {
|
|
414
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
415
|
-
const argumentsTypes = [
|
|
416
|
-
null,
|
|
417
|
-
'0x2::object::ID'
|
|
418
|
-
] satisfies (string | null)[];
|
|
419
|
-
const parameterNames = ["self", "partyId"];
|
|
420
|
-
return (tx: Transaction) => tx.moveCall({
|
|
421
|
-
package: packageAddress,
|
|
422
|
-
module: 'recording_credits',
|
|
423
|
-
function: 'is_primary_artist',
|
|
424
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
425
|
-
typeArguments: options.typeArguments
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
export interface IsFeaturedArtistArguments {
|
|
429
|
-
self: RawTransactionArgument<string>;
|
|
430
|
-
partyId: RawTransactionArgument<string>;
|
|
431
|
-
}
|
|
432
|
-
export interface IsFeaturedArtistOptions {
|
|
433
|
-
package?: string;
|
|
434
|
-
arguments: IsFeaturedArtistArguments | [
|
|
435
|
-
self: RawTransactionArgument<string>,
|
|
436
|
-
partyId: RawTransactionArgument<string>
|
|
437
|
-
];
|
|
438
|
-
typeArguments: [
|
|
439
|
-
string,
|
|
440
|
-
string
|
|
441
|
-
];
|
|
442
|
-
}
|
|
443
|
-
/** Returns whether the party is a featured artist (false if no credits attached). */
|
|
444
|
-
export function isFeaturedArtist(options: IsFeaturedArtistOptions) {
|
|
445
|
-
const packageAddress = options.package ?? '@local-pkg/recording_credits';
|
|
446
|
-
const argumentsTypes = [
|
|
447
|
-
null,
|
|
448
|
-
'0x2::object::ID'
|
|
449
|
-
] satisfies (string | null)[];
|
|
450
|
-
const parameterNames = ["self", "partyId"];
|
|
451
|
-
return (tx: Transaction) => tx.moveCall({
|
|
452
|
-
package: packageAddress,
|
|
453
|
-
module: 'recording_credits',
|
|
454
|
-
function: 'is_featured_artist',
|
|
455
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
456
|
-
typeArguments: options.typeArguments
|
|
457
|
-
});
|
|
458
|
-
}
|