@misonetwork/sdk 0.2.2 → 0.3.1
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 +7 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +22 -4
- package/dist/internal.js.map +1 -1
- package/dist/queries.d.ts +8 -0
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +30 -8
- 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 +34 -15
- package/src/queries.ts +40 -12
- 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,156 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* First-party credits extension for releases.
|
|
8
|
-
*
|
|
9
|
-
* Attribution (top-line billing) is display-oriented and varies across platforms,
|
|
10
|
-
* so it lives here as a dynamic field on the release rather than in immutable
|
|
11
|
-
* core. The data is attached under `ExtensionKey()` via the release's cap-gated
|
|
12
|
-
* `uid_mut`, so every mutation is authorized by the release's admin and credits
|
|
13
|
-
* survive into any lifecycle state (they may be attached before or after the
|
|
14
|
-
* release is published).
|
|
15
|
-
*
|
|
16
|
-
* This is Miso's canonical credits standard; because it is an extension, other
|
|
17
|
-
* parties may publish their own release-credits standard against the same
|
|
18
|
-
* `Release`. Credits are NOT read by the economics — they are attribution.
|
|
19
|
-
*
|
|
20
|
-
* A release credit carries exactly one role: a party is billed as either a
|
|
21
|
-
* `Primary` or a `Featured` artist on the release.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
25
|
-
import { bcs } from '@mysten/sui/bcs';
|
|
26
|
-
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
27
|
-
import * as vec_map from './deps/sui/vec_map.js';
|
|
28
|
-
import * as credit from './deps/miso_credit/credit.js';
|
|
29
|
-
import * as release_party_role from './release_party_role.js';
|
|
30
|
-
const $moduleName = '@local-pkg/release_credits::release_credits';
|
|
31
|
-
export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
|
|
32
|
-
export const ReleaseCredits = new MoveStruct({ name: `${$moduleName}::ReleaseCredits`, fields: {
|
|
33
|
-
/** Map of party IDs to their credit (display name + role). */
|
|
34
|
-
credits: vec_map.VecMap(bcs.Address, credit.Credit(release_party_role.ReleasePartyRole))
|
|
35
|
-
} });
|
|
36
|
-
export const CreditAddedEvent = new MoveStruct({ name: `${$moduleName}::CreditAddedEvent`, fields: {
|
|
37
|
-
release_id: bcs.Address,
|
|
38
|
-
party_id: bcs.Address,
|
|
39
|
-
credit: credit.Credit(release_party_role.ReleasePartyRole)
|
|
40
|
-
} });
|
|
41
|
-
export const CreditRemovedEvent = new MoveStruct({ name: `${$moduleName}::CreditRemovedEvent`, fields: {
|
|
42
|
-
release_id: bcs.Address,
|
|
43
|
-
party_id: bcs.Address,
|
|
44
|
-
credit: credit.Credit(release_party_role.ReleasePartyRole)
|
|
45
|
-
} });
|
|
46
|
-
export interface AddCreditArguments {
|
|
47
|
-
self: RawTransactionArgument<string>;
|
|
48
|
-
cap: RawTransactionArgument<string>;
|
|
49
|
-
party: RawTransactionArgument<string>;
|
|
50
|
-
credit: TransactionArgument;
|
|
51
|
-
}
|
|
52
|
-
export interface AddCreditOptions {
|
|
53
|
-
package?: string;
|
|
54
|
-
arguments: AddCreditArguments | [
|
|
55
|
-
self: RawTransactionArgument<string>,
|
|
56
|
-
cap: RawTransactionArgument<string>,
|
|
57
|
-
party: RawTransactionArgument<string>,
|
|
58
|
-
credit: TransactionArgument
|
|
59
|
-
];
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Adds a credit for a party on the release, lazily creating the credits record on
|
|
63
|
-
* first use. Each credit must carry exactly one role (Primary or Featured), and a
|
|
64
|
-
* party may hold at most one credit. Requires the release's admin capability.
|
|
65
|
-
*/
|
|
66
|
-
export function addCredit(options: AddCreditOptions) {
|
|
67
|
-
const packageAddress = options.package ?? '@local-pkg/release_credits';
|
|
68
|
-
const argumentsTypes = [
|
|
69
|
-
null,
|
|
70
|
-
null,
|
|
71
|
-
null,
|
|
72
|
-
null
|
|
73
|
-
] satisfies (string | null)[];
|
|
74
|
-
const parameterNames = ["self", "cap", "party", "credit"];
|
|
75
|
-
return (tx: Transaction) => tx.moveCall({
|
|
76
|
-
package: packageAddress,
|
|
77
|
-
module: 'release_credits',
|
|
78
|
-
function: 'add_credit',
|
|
79
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
export interface RemoveCreditArguments {
|
|
83
|
-
self: RawTransactionArgument<string>;
|
|
84
|
-
cap: RawTransactionArgument<string>;
|
|
85
|
-
partyId: RawTransactionArgument<string>;
|
|
86
|
-
}
|
|
87
|
-
export interface RemoveCreditOptions {
|
|
88
|
-
package?: string;
|
|
89
|
-
arguments: RemoveCreditArguments | [
|
|
90
|
-
self: RawTransactionArgument<string>,
|
|
91
|
-
cap: RawTransactionArgument<string>,
|
|
92
|
-
partyId: RawTransactionArgument<string>
|
|
93
|
-
];
|
|
94
|
-
}
|
|
95
|
-
/** Removes a party's credit. Requires the release's admin capability. */
|
|
96
|
-
export function removeCredit(options: RemoveCreditOptions) {
|
|
97
|
-
const packageAddress = options.package ?? '@local-pkg/release_credits';
|
|
98
|
-
const argumentsTypes = [
|
|
99
|
-
null,
|
|
100
|
-
null,
|
|
101
|
-
'0x2::object::ID'
|
|
102
|
-
] satisfies (string | null)[];
|
|
103
|
-
const parameterNames = ["self", "cap", "partyId"];
|
|
104
|
-
return (tx: Transaction) => tx.moveCall({
|
|
105
|
-
package: packageAddress,
|
|
106
|
-
module: 'release_credits',
|
|
107
|
-
function: 'remove_credit',
|
|
108
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
export interface HasCreditsArguments {
|
|
112
|
-
self: RawTransactionArgument<string>;
|
|
113
|
-
}
|
|
114
|
-
export interface HasCreditsOptions {
|
|
115
|
-
package?: string;
|
|
116
|
-
arguments: HasCreditsArguments | [
|
|
117
|
-
self: RawTransactionArgument<string>
|
|
118
|
-
];
|
|
119
|
-
}
|
|
120
|
-
/** Returns whether a credits record has been attached to this release yet. */
|
|
121
|
-
export function hasCredits(options: HasCreditsOptions) {
|
|
122
|
-
const packageAddress = options.package ?? '@local-pkg/release_credits';
|
|
123
|
-
const argumentsTypes = [
|
|
124
|
-
null
|
|
125
|
-
] satisfies (string | null)[];
|
|
126
|
-
const parameterNames = ["self"];
|
|
127
|
-
return (tx: Transaction) => tx.moveCall({
|
|
128
|
-
package: packageAddress,
|
|
129
|
-
module: 'release_credits',
|
|
130
|
-
function: 'has_credits',
|
|
131
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
export interface CreditsArguments {
|
|
135
|
-
self: RawTransactionArgument<string>;
|
|
136
|
-
}
|
|
137
|
-
export interface CreditsOptions {
|
|
138
|
-
package?: string;
|
|
139
|
-
arguments: CreditsArguments | [
|
|
140
|
-
self: RawTransactionArgument<string>
|
|
141
|
-
];
|
|
142
|
-
}
|
|
143
|
-
/** Returns the party-to-credit map. Aborts if no credits are attached. */
|
|
144
|
-
export function credits(options: CreditsOptions) {
|
|
145
|
-
const packageAddress = options.package ?? '@local-pkg/release_credits';
|
|
146
|
-
const argumentsTypes = [
|
|
147
|
-
null
|
|
148
|
-
] satisfies (string | null)[];
|
|
149
|
-
const parameterNames = ["self"];
|
|
150
|
-
return (tx: Transaction) => tx.moveCall({
|
|
151
|
-
package: packageAddress,
|
|
152
|
-
module: 'release_credits',
|
|
153
|
-
function: 'credits',
|
|
154
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
155
|
-
});
|
|
156
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Defines the roles that parties can hold on a release. Releases are the
|
|
8
|
-
* commercial packaging of recordings (an album, single, EP), and a release credit
|
|
9
|
-
* captures top-line billing: a party is either a primary artist or a featured
|
|
10
|
-
* artist on the release.
|
|
11
|
-
*
|
|
12
|
-
* ### Design
|
|
13
|
-
*
|
|
14
|
-
* `ReleasePartyRole` is a closed enum: variants can only be constructed and
|
|
15
|
-
* matched inside this module, so the `new_*_role` constructors are the external
|
|
16
|
-
* write-API and `name()` is the external read-API.
|
|
17
|
-
*
|
|
18
|
-
* - **No level axis and no `Custom` escape hatch.** Release billing is a small,
|
|
19
|
-
* fixed vocabulary: `Primary` or `Featured`.
|
|
20
|
-
* - **`name()` is the canonical identifier**, returned as a stable PascalCase
|
|
21
|
-
* token (`"Primary"` / `"Featured"`).
|
|
22
|
-
*
|
|
23
|
-
* These identifiers are Miso's own canonical vocabulary; any overlap with an
|
|
24
|
-
* external standard (e.g. DDEX) is coincidental, not a reproduction of it.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
import { MoveEnum, normalizeMoveArguments } from '../utils/index.js';
|
|
28
|
-
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
29
|
-
const $moduleName = '@local-pkg/release_credits::release_party_role';
|
|
30
|
-
/** Represents a party's billing on a release. */
|
|
31
|
-
export const ReleasePartyRole = new MoveEnum({ name: `${$moduleName}::ReleasePartyRole`, fields: {
|
|
32
|
-
/** A primary (headline) artist on the release. */
|
|
33
|
-
Primary: null,
|
|
34
|
-
/** A featured (guest) artist on the release. */
|
|
35
|
-
Featured: null
|
|
36
|
-
} });
|
|
37
|
-
export interface NewPrimaryRoleOptions {
|
|
38
|
-
package?: string;
|
|
39
|
-
arguments?: [
|
|
40
|
-
];
|
|
41
|
-
}
|
|
42
|
-
/** Creates a new Primary role. */
|
|
43
|
-
export function newPrimaryRole(options: NewPrimaryRoleOptions = {}) {
|
|
44
|
-
const packageAddress = options.package ?? '@local-pkg/release_credits';
|
|
45
|
-
return (tx: Transaction) => tx.moveCall({
|
|
46
|
-
package: packageAddress,
|
|
47
|
-
module: 'release_party_role',
|
|
48
|
-
function: 'new_primary_role',
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
export interface NewFeaturedRoleOptions {
|
|
52
|
-
package?: string;
|
|
53
|
-
arguments?: [
|
|
54
|
-
];
|
|
55
|
-
}
|
|
56
|
-
/** Creates a new Featured role. */
|
|
57
|
-
export function newFeaturedRole(options: NewFeaturedRoleOptions = {}) {
|
|
58
|
-
const packageAddress = options.package ?? '@local-pkg/release_credits';
|
|
59
|
-
return (tx: Transaction) => tx.moveCall({
|
|
60
|
-
package: packageAddress,
|
|
61
|
-
module: 'release_party_role',
|
|
62
|
-
function: 'new_featured_role',
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
export interface NameArguments {
|
|
66
|
-
self: TransactionArgument;
|
|
67
|
-
}
|
|
68
|
-
export interface NameOptions {
|
|
69
|
-
package?: string;
|
|
70
|
-
arguments: NameArguments | [
|
|
71
|
-
self: TransactionArgument
|
|
72
|
-
];
|
|
73
|
-
}
|
|
74
|
-
/** Returns the canonical identifier of the role as a stable PascalCase token. */
|
|
75
|
-
export function name(options: NameOptions) {
|
|
76
|
-
const packageAddress = options.package ?? '@local-pkg/release_credits';
|
|
77
|
-
const argumentsTypes = [
|
|
78
|
-
null
|
|
79
|
-
] satisfies (string | null)[];
|
|
80
|
-
const parameterNames = ["self"];
|
|
81
|
-
return (tx: Transaction) => tx.moveCall({
|
|
82
|
-
package: packageAddress,
|
|
83
|
-
module: 'release_party_role',
|
|
84
|
-
function: 'name',
|
|
85
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
86
|
-
});
|
|
87
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Functionality for converting Move types into values. Use with care! */
|
|
7
|
-
|
|
8
|
-
import { MoveStruct } from '../../../utils/index.js';
|
|
9
|
-
import { bcs } from '@mysten/sui/bcs';
|
|
10
|
-
const $moduleName = 'std::type_name';
|
|
11
|
-
export const TypeName = new MoveStruct({ name: `${$moduleName}::TypeName`, fields: {
|
|
12
|
-
/**
|
|
13
|
-
* String representation of the type. All types are represented using their source
|
|
14
|
-
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
15
|
-
* Struct types are represented as fully qualified type names; e.g.
|
|
16
|
-
* `00000000000000000000000000000001::string::String` or
|
|
17
|
-
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
18
|
-
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
19
|
-
* 32 depending on the Move platform)
|
|
20
|
-
*/
|
|
21
|
-
name: bcs.string()
|
|
22
|
-
} });
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A storable handler for Balances in general. Is used in the `Coin` module to
|
|
8
|
-
* allow balance operations and can be used to implement custom coins with `Supply`
|
|
9
|
-
* and `Balance`s.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { MoveStruct } from '../../../utils/index.js';
|
|
13
|
-
import { bcs } from '@mysten/sui/bcs';
|
|
14
|
-
const $moduleName = '0x2::balance';
|
|
15
|
-
export const Balance = new MoveStruct({ name: `${$moduleName}::Balance<phantom T>`, fields: {
|
|
16
|
-
value: bcs.u64()
|
|
17
|
-
} });
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
import { type BcsType, bcs } from '@mysten/sui/bcs';
|
|
5
|
-
import { MoveStruct } from '../../../utils/index.js';
|
|
6
|
-
const $moduleName = '0x2::vec_map';
|
|
7
|
-
/** An entry in the map */
|
|
8
|
-
export function Entry<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
9
|
-
K,
|
|
10
|
-
V
|
|
11
|
-
]) {
|
|
12
|
-
return new MoveStruct({ name: `${$moduleName}::Entry<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
|
|
13
|
-
key: typeParameters[0],
|
|
14
|
-
value: typeParameters[1]
|
|
15
|
-
} });
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A map data structure backed by a vector. The map is guaranteed not to contain
|
|
19
|
-
* duplicate keys, but entries are _not_ sorted by key--entries are included in
|
|
20
|
-
* insertion order. All operations are O(N) in the size of the map--the intention
|
|
21
|
-
* of this data structure is only to provide the convenience of programming against
|
|
22
|
-
* a map API. Large maps should use handwritten parent/child relationships instead.
|
|
23
|
-
* Maps that need sorted iteration rather than insertion order iteration should
|
|
24
|
-
* also be handwritten.
|
|
25
|
-
*/
|
|
26
|
-
export function VecMap<K extends BcsType<any>, V extends BcsType<any>>(...typeParameters: [
|
|
27
|
-
K,
|
|
28
|
-
V
|
|
29
|
-
]) {
|
|
30
|
-
return new MoveStruct({ name: `${$moduleName}::VecMap<${typeParameters[0].name as K['name']}, ${typeParameters[1].name as V['name']}>`, fields: {
|
|
31
|
-
contents: bcs.vector(Entry(typeParameters[0], typeParameters[1]))
|
|
32
|
-
} });
|
|
33
|
-
}
|