@misonetwork/sdk 0.8.0 → 0.9.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 +48 -38
- package/dist/client.d.ts +3 -17
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +18 -3
- package/dist/client.js.map +1 -1
- package/dist/contracts/miso/composition.d.ts +0 -14
- package/dist/contracts/miso/composition.d.ts.map +1 -1
- package/dist/contracts/miso/composition.js +0 -15
- package/dist/contracts/miso/composition.js.map +1 -1
- package/dist/contracts/miso/recording.d.ts +0 -15
- package/dist/contracts/miso/recording.d.ts.map +1 -1
- package/dist/contracts/miso/recording.js +0 -15
- package/dist/contracts/miso/recording.js.map +1 -1
- package/dist/contracts/miso/release.d.ts +0 -11
- package/dist/contracts/miso/release.d.ts.map +1 -1
- package/dist/contracts/miso/release.js +0 -14
- package/dist/contracts/miso/release.js.map +1 -1
- package/dist/contracts/miso_party/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js +20 -0
- package/dist/contracts/miso_party/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/miso_party/party.d.ts +481 -0
- package/dist/contracts/miso_party/party.d.ts.map +1 -0
- package/dist/contracts/miso_party/party.js +527 -0
- package/dist/contracts/miso_party/party.js.map +1 -0
- package/dist/contracts/party_cta/party_cta.d.ts +120 -0
- package/dist/contracts/party_cta/party_cta.d.ts.map +1 -0
- package/dist/contracts/party_cta/party_cta.js +139 -0
- package/dist/contracts/party_cta/party_cta.js.map +1 -0
- package/dist/contracts/party_genre/party_genre.d.ts +117 -0
- package/dist/contracts/party_genre/party_genre.d.ts.map +1 -0
- package/dist/contracts/party_genre/party_genre.js +131 -0
- package/dist/contracts/party_genre/party_genre.js.map +1 -0
- package/dist/contracts/party_media/party_media.d.ts +86 -0
- package/dist/contracts/party_media/party_media.d.ts.map +1 -0
- package/dist/contracts/party_media/party_media.js +97 -0
- package/dist/contracts/party_media/party_media.js.map +1 -0
- package/dist/contracts/party_music/party_music.d.ts +209 -0
- package/dist/contracts/party_music/party_music.d.ts.map +1 -0
- package/dist/contracts/party_music/party_music.js +259 -0
- package/dist/contracts/party_music/party_music.js.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts +89 -0
- package/dist/contracts/party_platform_link/party_platform_link.d.ts.map +1 -0
- package/dist/contracts/party_platform_link/party_platform_link.js +92 -0
- package/dist/contracts/party_platform_link/party_platform_link.js.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts +233 -0
- package/dist/contracts/party_pro_link/party_pro_link.d.ts.map +1 -0
- package/dist/contracts/party_pro_link/party_pro_link.js +289 -0
- package/dist/contracts/party_pro_link/party_pro_link.js.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts +15 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js +17 -0
- package/dist/contracts/party_profile/deps/country_code/country_code.js.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts +6 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.d.ts.map +1 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js +8 -0
- package/dist/contracts/party_profile/deps/language_code/language_code.js.map +1 -0
- package/dist/contracts/party_profile/party_profile.d.ts +133 -0
- package/dist/contracts/party_profile/party_profile.d.ts.map +1 -0
- package/dist/contracts/party_profile/party_profile.js +153 -0
- package/dist/contracts/party_profile/party_profile.js.map +1 -0
- package/dist/contracts/party_roles/party_roles.d.ts +201 -0
- package/dist/contracts/party_roles/party_roles.d.ts.map +1 -0
- package/dist/contracts/party_roles/party_roles.js +237 -0
- package/dist/contracts/party_roles/party_roles.js.map +1 -0
- package/dist/contracts/party_social/party_social.d.ts +258 -0
- package/dist/contracts/party_social/party_social.d.ts.map +1 -0
- package/dist/contracts/party_social/party_social.js +320 -0
- package/dist/contracts/party_social/party_social.js.map +1 -0
- package/dist/contracts/party_tags/party_tags.d.ts +116 -0
- package/dist/contracts/party_tags/party_tags.d.ts.map +1 -0
- package/dist/contracts/party_tags/party_tags.js +130 -0
- package/dist/contracts/party_tags/party_tags.js.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts +0 -14
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -1
- package/dist/contracts/routed_stake/routed_stake.js +0 -14
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -1
- package/dist/contracts/royalty_pool/pool.d.ts +0 -14
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/pool.js +0 -14
- package/dist/contracts/royalty_pool/pool.js.map +1 -1
- package/dist/contracts/royalty_pool/stake.d.ts +6 -13
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/stake.js +6 -14
- package/dist/contracts/royalty_pool/stake.js.map +1 -1
- package/dist/contracts.d.ts +13 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +14 -2
- package/dist/contracts.js.map +1 -1
- package/dist/deployments.d.ts +73 -14
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +53 -13
- package/dist/deployments.js.map +1 -1
- package/dist/events.d.ts +0 -14
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +0 -4
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/packages.d.ts +39 -4
- package/dist/packages.d.ts.map +1 -1
- package/dist/packages.js +39 -4
- package/dist/packages.js.map +1 -1
- package/dist/party/client.d.ts +233 -0
- package/dist/party/client.d.ts.map +1 -0
- package/dist/party/client.js +222 -0
- package/dist/party/client.js.map +1 -0
- package/dist/party/extensions/ctas.d.ts +19 -0
- package/dist/party/extensions/ctas.d.ts.map +1 -0
- package/dist/party/extensions/ctas.js +25 -0
- package/dist/party/extensions/ctas.js.map +1 -0
- package/dist/party/extensions/genres.d.ts +27 -0
- package/dist/party/extensions/genres.d.ts.map +1 -0
- package/dist/party/extensions/genres.js +31 -0
- package/dist/party/extensions/genres.js.map +1 -0
- package/dist/party/extensions/links.d.ts +65 -0
- package/dist/party/extensions/links.d.ts.map +1 -0
- package/dist/party/extensions/links.js +117 -0
- package/dist/party/extensions/links.js.map +1 -0
- package/dist/party/extensions/media.d.ts +36 -0
- package/dist/party/extensions/media.d.ts.map +1 -0
- package/dist/party/extensions/media.js +45 -0
- package/dist/party/extensions/media.js.map +1 -0
- package/dist/party/extensions/profile.d.ts +24 -0
- package/dist/party/extensions/profile.d.ts.map +1 -0
- package/dist/party/extensions/profile.js +48 -0
- package/dist/party/extensions/profile.js.map +1 -0
- package/dist/party/extensions/roles.d.ts +37 -0
- package/dist/party/extensions/roles.d.ts.map +1 -0
- package/dist/party/extensions/roles.js +46 -0
- package/dist/party/extensions/roles.js.map +1 -0
- package/dist/party/extensions/tags.d.ts +25 -0
- package/dist/party/extensions/tags.d.ts.map +1 -0
- package/dist/party/extensions/tags.js +25 -0
- package/dist/party/extensions/tags.js.map +1 -0
- package/dist/party/index.d.ts +12 -0
- package/dist/party/index.d.ts.map +1 -0
- package/dist/party/index.js +14 -0
- package/dist/party/index.js.map +1 -0
- package/dist/party/internal.d.ts +15 -0
- package/dist/party/internal.d.ts.map +1 -0
- package/dist/party/internal.js +103 -0
- package/dist/party/internal.js.map +1 -0
- package/dist/party/queries.d.ts +38 -0
- package/dist/party/queries.d.ts.map +1 -0
- package/dist/party/queries.js +232 -0
- package/dist/party/queries.js.map +1 -0
- package/dist/party/transactions.d.ts +74 -0
- package/dist/party/transactions.d.ts.map +1 -0
- package/dist/party/transactions.js +85 -0
- package/dist/party/transactions.js.map +1 -0
- package/dist/party/types.d.ts +54 -0
- package/dist/party/types.d.ts.map +1 -0
- package/dist/party/types.js +4 -0
- package/dist/party/types.js.map +1 -0
- package/package.json +6 -2
- package/src/client.ts +21 -3
- package/src/contracts/miso/composition.ts +0 -27
- package/src/contracts/miso/recording.ts +0 -28
- package/src/contracts/miso/release.ts +0 -23
- package/src/contracts/miso_party/deps/sui/vec_set.ts +21 -0
- package/src/contracts/miso_party/party.ts +797 -0
- package/src/contracts/party_cta/party_cta.ts +212 -0
- package/src/contracts/party_genre/party_genre.ts +199 -0
- package/src/contracts/party_media/party_media.ts +141 -0
- package/src/contracts/party_music/party_music.ts +405 -0
- package/src/contracts/party_platform_link/party_platform_link.ts +148 -0
- package/src/contracts/party_pro_link/party_pro_link.ts +453 -0
- package/src/contracts/party_profile/deps/country_code/country_code.ts +19 -0
- package/src/contracts/party_profile/deps/language_code/language_code.ts +7 -0
- package/src/contracts/party_profile/party_profile.ts +239 -0
- package/src/contracts/party_roles/party_roles.ts +363 -0
- package/src/contracts/party_social/party_social.ts +502 -0
- package/src/contracts/party_tags/party_tags.ts +198 -0
- package/src/contracts/routed_stake/routed_stake.ts +0 -27
- package/src/contracts/royalty_pool/pool.ts +0 -27
- package/src/contracts/royalty_pool/stake.ts +6 -26
- package/src/contracts.ts +15 -2
- package/src/deployments.ts +56 -14
- package/src/events.ts +0 -4
- package/src/index.ts +2 -0
- package/src/packages.ts +40 -8
- package/src/party/client.ts +283 -0
- package/src/party/extensions/ctas.ts +46 -0
- package/src/party/extensions/genres.ts +62 -0
- package/src/party/extensions/links.ts +185 -0
- package/src/party/extensions/media.ts +72 -0
- package/src/party/extensions/profile.ts +81 -0
- package/src/party/extensions/roles.ts +94 -0
- package/src/party/extensions/tags.ts +54 -0
- package/src/party/index.ts +14 -0
- package/src/party/internal.ts +119 -0
- package/src/party/queries.ts +303 -0
- package/src/party/transactions.ts +167 -0
- package/src/party/types.ts +95 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts +0 -52
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +0 -1
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +0 -37
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +0 -1
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +0 -91
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +0 -1
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +0 -91
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js.map +0 -1
- package/src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts +0 -36
- package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +0 -124
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Off-Miso call-to-action links for a party — the "what do you want people to do"
|
|
6
|
+
* row (Tickets, Merch, Newsletter, external Listen, …).
|
|
7
|
+
*
|
|
8
|
+
* Deliberately slim: a CTA is just a `{ label, url }`. On-Miso actions (collect /
|
|
9
|
+
* listen-on-Miso / pin) are a different, interactive concern and live in
|
|
10
|
+
* `party_featured`, which references object ids and can render live state — so
|
|
11
|
+
* this package stays a plain, dependency-light external link hub.
|
|
12
|
+
*
|
|
13
|
+
* The CTAs are an ordered list: **position is priority**. The whole list is
|
|
14
|
+
* written at once (`set_ctas`) — the natural fit for a drag-to-reorder editor that
|
|
15
|
+
* saves on submit — so there are no per-entry ids to track. Gated by the
|
|
16
|
+
* `PartyAdminCap`; views are permissionless.
|
|
17
|
+
*/
|
|
18
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
19
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
20
|
+
import {} from '@mysten/sui/transactions';
|
|
21
|
+
const $moduleName = '@local-pkg/party_cta::party_cta';
|
|
22
|
+
export const CtasKey = new MoveTuple({ name: `${$moduleName}::CtasKey`, fields: [bcs.bool()] });
|
|
23
|
+
export const Cta = new MoveStruct({ name: `${$moduleName}::Cta`, fields: {
|
|
24
|
+
label: bcs.string(),
|
|
25
|
+
url: bcs.string()
|
|
26
|
+
} });
|
|
27
|
+
export const CtasSetEvent = new MoveStruct({ name: `${$moduleName}::CtasSetEvent`, fields: {
|
|
28
|
+
party_id: bcs.Address,
|
|
29
|
+
count: bcs.u64()
|
|
30
|
+
} });
|
|
31
|
+
export const CtasClearedEvent = new MoveStruct({ name: `${$moduleName}::CtasClearedEvent`, fields: {
|
|
32
|
+
party_id: bcs.Address
|
|
33
|
+
} });
|
|
34
|
+
/**
|
|
35
|
+
* Builds a CTA. Aborts if the label or url is empty or too long. Callers build the
|
|
36
|
+
* ordered `vector<Cta>` client-side and submit it with `set_ctas`.
|
|
37
|
+
*/
|
|
38
|
+
export function newCta(options) {
|
|
39
|
+
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
40
|
+
const argumentsTypes = [
|
|
41
|
+
'0x1::string::String',
|
|
42
|
+
'0x1::string::String'
|
|
43
|
+
];
|
|
44
|
+
const parameterNames = ["label", "url"];
|
|
45
|
+
return (tx) => tx.moveCall({
|
|
46
|
+
package: packageAddress,
|
|
47
|
+
module: 'party_cta',
|
|
48
|
+
function: 'new_cta',
|
|
49
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** The CTA's display label. */
|
|
53
|
+
export function label(options) {
|
|
54
|
+
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
55
|
+
const argumentsTypes = [
|
|
56
|
+
null
|
|
57
|
+
];
|
|
58
|
+
const parameterNames = ["self"];
|
|
59
|
+
return (tx) => tx.moveCall({
|
|
60
|
+
package: packageAddress,
|
|
61
|
+
module: 'party_cta',
|
|
62
|
+
function: 'label',
|
|
63
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/** The CTA's destination url. */
|
|
67
|
+
export function url(options) {
|
|
68
|
+
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
69
|
+
const argumentsTypes = [
|
|
70
|
+
null
|
|
71
|
+
];
|
|
72
|
+
const parameterNames = ["self"];
|
|
73
|
+
return (tx) => tx.moveCall({
|
|
74
|
+
package: packageAddress,
|
|
75
|
+
module: 'party_cta',
|
|
76
|
+
function: 'url',
|
|
77
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** Sets (or replaces) the party's ordered CTA list. Position is priority. */
|
|
81
|
+
export function setCtas(options) {
|
|
82
|
+
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
83
|
+
const argumentsTypes = [
|
|
84
|
+
null,
|
|
85
|
+
null,
|
|
86
|
+
'vector<null>'
|
|
87
|
+
];
|
|
88
|
+
const parameterNames = ["self", "cap", "ctas"];
|
|
89
|
+
return (tx) => tx.moveCall({
|
|
90
|
+
package: packageAddress,
|
|
91
|
+
module: 'party_cta',
|
|
92
|
+
function: 'set_ctas',
|
|
93
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/** Removes the party's CTA list. No-op if none is set. */
|
|
97
|
+
export function clearCtas(options) {
|
|
98
|
+
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
99
|
+
const argumentsTypes = [
|
|
100
|
+
null,
|
|
101
|
+
null
|
|
102
|
+
];
|
|
103
|
+
const parameterNames = ["self", "cap"];
|
|
104
|
+
return (tx) => tx.moveCall({
|
|
105
|
+
package: packageAddress,
|
|
106
|
+
module: 'party_cta',
|
|
107
|
+
function: 'clear_ctas',
|
|
108
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/** Whether the party has a CTA list. */
|
|
112
|
+
export function hasCtas(options) {
|
|
113
|
+
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
114
|
+
const argumentsTypes = [
|
|
115
|
+
null
|
|
116
|
+
];
|
|
117
|
+
const parameterNames = ["self"];
|
|
118
|
+
return (tx) => tx.moveCall({
|
|
119
|
+
package: packageAddress,
|
|
120
|
+
module: 'party_cta',
|
|
121
|
+
function: 'has_ctas',
|
|
122
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/** The party's ordered CTA list (empty if unset). */
|
|
126
|
+
export function ctas(options) {
|
|
127
|
+
const packageAddress = options.package ?? '@local-pkg/party_cta';
|
|
128
|
+
const argumentsTypes = [
|
|
129
|
+
null
|
|
130
|
+
];
|
|
131
|
+
const parameterNames = ["self"];
|
|
132
|
+
return (tx) => tx.moveCall({
|
|
133
|
+
package: packageAddress,
|
|
134
|
+
module: 'party_cta',
|
|
135
|
+
function: 'ctas',
|
|
136
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=party_cta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"party_cta.js","sourceRoot":"","sources":["../../../src/contracts/party_cta/party_cta.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,MAAM,WAAW,GAAG,iCAAiC,CAAC;AACtD,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,WAAW,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,C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,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,MAAM;QAChB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Musical-genre tags for a party, piggybacking the Miso genre vocabulary.
|
|
6
|
+
*
|
|
7
|
+
* Stores a set of `genre::Genre` object ids — the same canonical, name-derived
|
|
8
|
+
* genres the shared vocabulary primitive mints, so a party's genres reference
|
|
9
|
+
* exactly the ids releases (and anything else) use. Adding a genre takes a
|
|
10
|
+
* `&Genre`, proving the id is a real vocabulary entry; removal is by id. Genre is
|
|
11
|
+
* presentation, not protocol-verifiable state, so a party's genres are a
|
|
12
|
+
* lightweight display tag list — no primary/secondary ranking, no anti-churn
|
|
13
|
+
* locks. The set mechanics — storage, duplicate and capacity checks, field
|
|
14
|
+
* reclamation — live in the shared `typed_set` primitive; this package keeps the
|
|
15
|
+
* vocabulary proof, the capacity, and the typed events. Duplicate / not-present /
|
|
16
|
+
* over-max aborts come from `typed_set` with its own error codes. All writes are
|
|
17
|
+
* gated by the `PartyAdminCap`; views are permissionless.
|
|
18
|
+
*/
|
|
19
|
+
import { MoveTuple, MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
20
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
21
|
+
export declare const GenresKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/party_genre::party_genre::GenresKey">;
|
|
22
|
+
export declare const GenreAddedEvent: MoveStruct<{
|
|
23
|
+
party_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
24
|
+
genre_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
25
|
+
}, "@local-pkg/party_genre::party_genre::GenreAddedEvent">;
|
|
26
|
+
export declare const GenreRemovedEvent: MoveStruct<{
|
|
27
|
+
party_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
28
|
+
genre_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
29
|
+
}, "@local-pkg/party_genre::party_genre::GenreRemovedEvent">;
|
|
30
|
+
export declare const GenresClearedEvent: MoveStruct<{
|
|
31
|
+
party_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
32
|
+
}, "@local-pkg/party_genre::party_genre::GenresClearedEvent">;
|
|
33
|
+
export interface AddGenreArguments {
|
|
34
|
+
self: RawTransactionArgument<string>;
|
|
35
|
+
cap: RawTransactionArgument<string>;
|
|
36
|
+
genre: RawTransactionArgument<string>;
|
|
37
|
+
}
|
|
38
|
+
export interface AddGenreOptions {
|
|
39
|
+
package?: string;
|
|
40
|
+
arguments: AddGenreArguments | [
|
|
41
|
+
self: RawTransactionArgument<string>,
|
|
42
|
+
cap: RawTransactionArgument<string>,
|
|
43
|
+
genre: RawTransactionArgument<string>
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Adds a genre to the party. Takes `&Genre` so only a real vocabulary entry can be
|
|
48
|
+
* tagged. Aborts in `typed_set` if already present or the max is reached.
|
|
49
|
+
*/
|
|
50
|
+
export declare function addGenre(options: AddGenreOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
51
|
+
export interface RemoveGenreArguments {
|
|
52
|
+
self: RawTransactionArgument<string>;
|
|
53
|
+
cap: RawTransactionArgument<string>;
|
|
54
|
+
genreId: RawTransactionArgument<string>;
|
|
55
|
+
}
|
|
56
|
+
export interface RemoveGenreOptions {
|
|
57
|
+
package?: string;
|
|
58
|
+
arguments: RemoveGenreArguments | [
|
|
59
|
+
self: RawTransactionArgument<string>,
|
|
60
|
+
cap: RawTransactionArgument<string>,
|
|
61
|
+
genreId: RawTransactionArgument<string>
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Removes a genre from the party. Aborts in `typed_set` if not present. The whole
|
|
66
|
+
* field is dropped when the last genre leaves.
|
|
67
|
+
*/
|
|
68
|
+
export declare function removeGenre(options: RemoveGenreOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
69
|
+
export interface ClearGenresArguments {
|
|
70
|
+
self: RawTransactionArgument<string>;
|
|
71
|
+
cap: RawTransactionArgument<string>;
|
|
72
|
+
}
|
|
73
|
+
export interface ClearGenresOptions {
|
|
74
|
+
package?: string;
|
|
75
|
+
arguments: ClearGenresArguments | [
|
|
76
|
+
self: RawTransactionArgument<string>,
|
|
77
|
+
cap: RawTransactionArgument<string>
|
|
78
|
+
];
|
|
79
|
+
}
|
|
80
|
+
/** Removes the party's entire genre set. No-op if none is set. */
|
|
81
|
+
export declare function clearGenres(options: ClearGenresOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
82
|
+
export interface HasGenresArguments {
|
|
83
|
+
self: RawTransactionArgument<string>;
|
|
84
|
+
}
|
|
85
|
+
export interface HasGenresOptions {
|
|
86
|
+
package?: string;
|
|
87
|
+
arguments: HasGenresArguments | [
|
|
88
|
+
self: RawTransactionArgument<string>
|
|
89
|
+
];
|
|
90
|
+
}
|
|
91
|
+
/** Whether the party carries any genres. */
|
|
92
|
+
export declare function hasGenres(options: HasGenresOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
93
|
+
export interface HasGenreArguments {
|
|
94
|
+
self: RawTransactionArgument<string>;
|
|
95
|
+
genreId: RawTransactionArgument<string>;
|
|
96
|
+
}
|
|
97
|
+
export interface HasGenreOptions {
|
|
98
|
+
package?: string;
|
|
99
|
+
arguments: HasGenreArguments | [
|
|
100
|
+
self: RawTransactionArgument<string>,
|
|
101
|
+
genreId: RawTransactionArgument<string>
|
|
102
|
+
];
|
|
103
|
+
}
|
|
104
|
+
/** Whether the party carries the given genre. */
|
|
105
|
+
export declare function hasGenre(options: HasGenreOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
106
|
+
export interface GenresArguments {
|
|
107
|
+
self: RawTransactionArgument<string>;
|
|
108
|
+
}
|
|
109
|
+
export interface GenresOptions {
|
|
110
|
+
package?: string;
|
|
111
|
+
arguments: GenresArguments | [
|
|
112
|
+
self: RawTransactionArgument<string>
|
|
113
|
+
];
|
|
114
|
+
}
|
|
115
|
+
/** The party's genre ids. */
|
|
116
|
+
export declare function genres(options: GenresOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
117
|
+
//# sourceMappingURL=party_genre.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"party_genre.d.ts","sourceRoot":"","sources":["../../../src/contracts/party_genre/party_genre.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE/G,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAO,MAAM,SAAS,qIAA6E,CAAC;AACpG,eAAO,MAAM,eAAe;;;0DAGpB,CAAC;AACT,eAAO,MAAM,iBAAiB;;;4DAGtB,CAAC;AACT,eAAO,MAAM,kBAAkB;;6DAEvB,CAAC;AACT,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;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0 +1,131 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Musical-genre tags for a party, piggybacking the Miso genre vocabulary.
|
|
6
|
+
*
|
|
7
|
+
* Stores a set of `genre::Genre` object ids — the same canonical, name-derived
|
|
8
|
+
* genres the shared vocabulary primitive mints, so a party's genres reference
|
|
9
|
+
* exactly the ids releases (and anything else) use. Adding a genre takes a
|
|
10
|
+
* `&Genre`, proving the id is a real vocabulary entry; removal is by id. Genre is
|
|
11
|
+
* presentation, not protocol-verifiable state, so a party's genres are a
|
|
12
|
+
* lightweight display tag list — no primary/secondary ranking, no anti-churn
|
|
13
|
+
* locks. The set mechanics — storage, duplicate and capacity checks, field
|
|
14
|
+
* reclamation — live in the shared `typed_set` primitive; this package keeps the
|
|
15
|
+
* vocabulary proof, the capacity, and the typed events. Duplicate / not-present /
|
|
16
|
+
* over-max aborts come from `typed_set` with its own error codes. All writes are
|
|
17
|
+
* gated by the `PartyAdminCap`; views are permissionless.
|
|
18
|
+
*/
|
|
19
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
20
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
21
|
+
import {} from '@mysten/sui/transactions';
|
|
22
|
+
const $moduleName = '@local-pkg/party_genre::party_genre';
|
|
23
|
+
export const GenresKey = new MoveTuple({ name: `${$moduleName}::GenresKey`, fields: [bcs.bool()] });
|
|
24
|
+
export const GenreAddedEvent = new MoveStruct({ name: `${$moduleName}::GenreAddedEvent`, fields: {
|
|
25
|
+
party_id: bcs.Address,
|
|
26
|
+
genre_id: bcs.Address
|
|
27
|
+
} });
|
|
28
|
+
export const GenreRemovedEvent = new MoveStruct({ name: `${$moduleName}::GenreRemovedEvent`, fields: {
|
|
29
|
+
party_id: bcs.Address,
|
|
30
|
+
genre_id: bcs.Address
|
|
31
|
+
} });
|
|
32
|
+
export const GenresClearedEvent = new MoveStruct({ name: `${$moduleName}::GenresClearedEvent`, fields: {
|
|
33
|
+
party_id: bcs.Address
|
|
34
|
+
} });
|
|
35
|
+
/**
|
|
36
|
+
* Adds a genre to the party. Takes `&Genre` so only a real vocabulary entry can be
|
|
37
|
+
* tagged. Aborts in `typed_set` if already present or the max is reached.
|
|
38
|
+
*/
|
|
39
|
+
export function addGenre(options) {
|
|
40
|
+
const packageAddress = options.package ?? '@local-pkg/party_genre';
|
|
41
|
+
const argumentsTypes = [
|
|
42
|
+
null,
|
|
43
|
+
null,
|
|
44
|
+
null
|
|
45
|
+
];
|
|
46
|
+
const parameterNames = ["self", "cap", "genre"];
|
|
47
|
+
return (tx) => tx.moveCall({
|
|
48
|
+
package: packageAddress,
|
|
49
|
+
module: 'party_genre',
|
|
50
|
+
function: 'add_genre',
|
|
51
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Removes a genre from the party. Aborts in `typed_set` if not present. The whole
|
|
56
|
+
* field is dropped when the last genre leaves.
|
|
57
|
+
*/
|
|
58
|
+
export function removeGenre(options) {
|
|
59
|
+
const packageAddress = options.package ?? '@local-pkg/party_genre';
|
|
60
|
+
const argumentsTypes = [
|
|
61
|
+
null,
|
|
62
|
+
null,
|
|
63
|
+
'0x2::object::ID'
|
|
64
|
+
];
|
|
65
|
+
const parameterNames = ["self", "cap", "genreId"];
|
|
66
|
+
return (tx) => tx.moveCall({
|
|
67
|
+
package: packageAddress,
|
|
68
|
+
module: 'party_genre',
|
|
69
|
+
function: 'remove_genre',
|
|
70
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/** Removes the party's entire genre set. No-op if none is set. */
|
|
74
|
+
export function clearGenres(options) {
|
|
75
|
+
const packageAddress = options.package ?? '@local-pkg/party_genre';
|
|
76
|
+
const argumentsTypes = [
|
|
77
|
+
null,
|
|
78
|
+
null
|
|
79
|
+
];
|
|
80
|
+
const parameterNames = ["self", "cap"];
|
|
81
|
+
return (tx) => tx.moveCall({
|
|
82
|
+
package: packageAddress,
|
|
83
|
+
module: 'party_genre',
|
|
84
|
+
function: 'clear_genres',
|
|
85
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** Whether the party carries any genres. */
|
|
89
|
+
export function hasGenres(options) {
|
|
90
|
+
const packageAddress = options.package ?? '@local-pkg/party_genre';
|
|
91
|
+
const argumentsTypes = [
|
|
92
|
+
null
|
|
93
|
+
];
|
|
94
|
+
const parameterNames = ["self"];
|
|
95
|
+
return (tx) => tx.moveCall({
|
|
96
|
+
package: packageAddress,
|
|
97
|
+
module: 'party_genre',
|
|
98
|
+
function: 'has_genres',
|
|
99
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/** Whether the party carries the given genre. */
|
|
103
|
+
export function hasGenre(options) {
|
|
104
|
+
const packageAddress = options.package ?? '@local-pkg/party_genre';
|
|
105
|
+
const argumentsTypes = [
|
|
106
|
+
null,
|
|
107
|
+
'0x2::object::ID'
|
|
108
|
+
];
|
|
109
|
+
const parameterNames = ["self", "genreId"];
|
|
110
|
+
return (tx) => tx.moveCall({
|
|
111
|
+
package: packageAddress,
|
|
112
|
+
module: 'party_genre',
|
|
113
|
+
function: 'has_genre',
|
|
114
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/** The party's genre ids. */
|
|
118
|
+
export function genres(options) {
|
|
119
|
+
const packageAddress = options.package ?? '@local-pkg/party_genre';
|
|
120
|
+
const argumentsTypes = [
|
|
121
|
+
null
|
|
122
|
+
];
|
|
123
|
+
const parameterNames = ["self"];
|
|
124
|
+
return (tx) => tx.moveCall({
|
|
125
|
+
package: packageAddress,
|
|
126
|
+
module: 'party_genre',
|
|
127
|
+
function: 'genres',
|
|
128
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=party_genre.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"party_genre.js","sourceRoot":"","sources":["../../../src/contracts/party_genre/party_genre.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAoB,MAAM,0BAA0B,CAAC;AAC5D,MAAM,WAAW,GAAG,qCAAqC,CAAC;AAC1D,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,aAAa,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AACpG,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,mBAAmB,EAAE,MAAM,EAAE;QACzF,QAAQ,EAAE,GAAG,CAAC,OAAO;QACrB,QAAQ,EAAE,GAAG,CAAC,OAAO;KACxB,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,qBAAqB,EAAE,MAAM,EAAE;QAC7F,QAAQ,EAAE,GAAG,CAAC,OAAO;QACrB,QAAQ,EAAE,GAAG,CAAC,OAAO;KACxB,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC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EAAE,WAAW;QACrB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD,6BAA6B;AAC7B,MAAM,UAAU,MAAM,CAAC,OAAsB;IACzC,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,wBAAwB,CAAC;IACnE,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,aAAa;QACrB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Profile imagery for a party, stored as a single Walrus quilt.
|
|
6
|
+
*
|
|
7
|
+
* All of a party's images (avatar, header/cover, …) live together in one Walrus
|
|
8
|
+
* quilt — batching them under a single storage reservation is markedly cheaper
|
|
9
|
+
* than one blob each, which matters when the platform sponsors storage. Only the
|
|
10
|
+
* quilt's blob id is held on-chain, as a `Media` dynamic field on the party's UID,
|
|
11
|
+
* gated by the `PartyAdminCap`; views are permissionless.
|
|
12
|
+
*
|
|
13
|
+
* The chain is deliberately role-agnostic: which patch is the avatar vs the header
|
|
14
|
+
* is a client convention (quilt patch _identifiers_, e.g. "avatar" / "header"),
|
|
15
|
+
* derived off-chain — never stored here. Updating any image means re-storing the
|
|
16
|
+
* quilt and calling `set_media` with the new id.
|
|
17
|
+
*/
|
|
18
|
+
import { MoveTuple, MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
19
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
20
|
+
export declare const MediaKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/party_media::party_media::MediaKey">;
|
|
21
|
+
export declare const Media: MoveStruct<{
|
|
22
|
+
/**
|
|
23
|
+
* Walrus quilt blob id holding all of the party's images. Individual images are
|
|
24
|
+
* quilt patches addressed by identifier ("avatar", "header", …); those roles are a
|
|
25
|
+
* client convention, derived off-chain, not stored here.
|
|
26
|
+
*/
|
|
27
|
+
quilt: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
28
|
+
}, "@local-pkg/party_media::party_media::Media">;
|
|
29
|
+
export declare const MediaSetEvent: MoveStruct<{
|
|
30
|
+
party_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
31
|
+
quilt: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">;
|
|
32
|
+
}, "@local-pkg/party_media::party_media::MediaSetEvent">;
|
|
33
|
+
export declare const MediaClearedEvent: MoveStruct<{
|
|
34
|
+
party_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
35
|
+
}, "@local-pkg/party_media::party_media::MediaClearedEvent">;
|
|
36
|
+
export interface SetMediaArguments {
|
|
37
|
+
self: RawTransactionArgument<string>;
|
|
38
|
+
cap: RawTransactionArgument<string>;
|
|
39
|
+
quilt: RawTransactionArgument<number | bigint>;
|
|
40
|
+
}
|
|
41
|
+
export interface SetMediaOptions {
|
|
42
|
+
package?: string;
|
|
43
|
+
arguments: SetMediaArguments | [
|
|
44
|
+
self: RawTransactionArgument<string>,
|
|
45
|
+
cap: RawTransactionArgument<string>,
|
|
46
|
+
quilt: RawTransactionArgument<number | bigint>
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
/** Sets (or replaces) the party's media quilt. Aborts on a zero id. */
|
|
50
|
+
export declare function setMedia(options: SetMediaOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
51
|
+
export interface ClearMediaArguments {
|
|
52
|
+
self: RawTransactionArgument<string>;
|
|
53
|
+
cap: RawTransactionArgument<string>;
|
|
54
|
+
}
|
|
55
|
+
export interface ClearMediaOptions {
|
|
56
|
+
package?: string;
|
|
57
|
+
arguments: ClearMediaArguments | [
|
|
58
|
+
self: RawTransactionArgument<string>,
|
|
59
|
+
cap: RawTransactionArgument<string>
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
/** Removes the party's media. No-op if none is set. */
|
|
63
|
+
export declare function clearMedia(options: ClearMediaOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
64
|
+
export interface HasMediaArguments {
|
|
65
|
+
self: RawTransactionArgument<string>;
|
|
66
|
+
}
|
|
67
|
+
export interface HasMediaOptions {
|
|
68
|
+
package?: string;
|
|
69
|
+
arguments: HasMediaArguments | [
|
|
70
|
+
self: RawTransactionArgument<string>
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
/** Whether the party has media set. */
|
|
74
|
+
export declare function hasMedia(options: HasMediaOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
75
|
+
export interface QuiltArguments {
|
|
76
|
+
self: RawTransactionArgument<string>;
|
|
77
|
+
}
|
|
78
|
+
export interface QuiltOptions {
|
|
79
|
+
package?: string;
|
|
80
|
+
arguments: QuiltArguments | [
|
|
81
|
+
self: RawTransactionArgument<string>
|
|
82
|
+
];
|
|
83
|
+
}
|
|
84
|
+
/** The party's media quilt id, if set. */
|
|
85
|
+
export declare function quilt(options: QuiltOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
86
|
+
//# sourceMappingURL=party_media.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"party_media.d.ts","sourceRoot":"","s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sBAAsB,CAAC,MAAM,CAAC;KACtC,CAAC;CACL;AACD,uDAAuD;AACvD,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,IAOzC,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,eAAe;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,GAAG;QAC3B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD,uCAAuC;AACvC,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,IAMrC,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,cAAc,GAAG;QACxB,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD,0CAA0C;AAC1C,wBAAgB,KAAK,CAAC,OAAO,EAAE,YAAY,IAM/B,IAAI,WAAW,0DAM1B"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Profile imagery for a party, stored as a single Walrus quilt.
|
|
6
|
+
*
|
|
7
|
+
* All of a party's images (avatar, header/cover, …) live together in one Walrus
|
|
8
|
+
* quilt — batching them under a single storage reservation is markedly cheaper
|
|
9
|
+
* than one blob each, which matters when the platform sponsors storage. Only the
|
|
10
|
+
* quilt's blob id is held on-chain, as a `Media` dynamic field on the party's UID,
|
|
11
|
+
* gated by the `PartyAdminCap`; views are permissionless.
|
|
12
|
+
*
|
|
13
|
+
* The chain is deliberately role-agnostic: which patch is the avatar vs the header
|
|
14
|
+
* is a client convention (quilt patch _identifiers_, e.g. "avatar" / "header"),
|
|
15
|
+
* derived off-chain — never stored here. Updating any image means re-storing the
|
|
16
|
+
* quilt and calling `set_media` with the new id.
|
|
17
|
+
*/
|
|
18
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
19
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
20
|
+
import {} from '@mysten/sui/transactions';
|
|
21
|
+
const $moduleName = '@local-pkg/party_media::party_media';
|
|
22
|
+
export const MediaKey = new MoveTuple({ name: `${$moduleName}::MediaKey`, fields: [bcs.bool()] });
|
|
23
|
+
export const Media = new MoveStruct({ name: `${$moduleName}::Media`, fields: {
|
|
24
|
+
/**
|
|
25
|
+
* Walrus quilt blob id holding all of the party's images. Individual images are
|
|
26
|
+
* quilt patches addressed by identifier ("avatar", "header", …); those roles are a
|
|
27
|
+
* client convention, derived off-chain, not stored here.
|
|
28
|
+
*/
|
|
29
|
+
quilt: bcs.u256()
|
|
30
|
+
} });
|
|
31
|
+
export const MediaSetEvent = new MoveStruct({ name: `${$moduleName}::MediaSetEvent`, fields: {
|
|
32
|
+
party_id: bcs.Address,
|
|
33
|
+
quilt: bcs.u256()
|
|
34
|
+
} });
|
|
35
|
+
export const MediaClearedEvent = new MoveStruct({ name: `${$moduleName}::MediaClearedEvent`, fields: {
|
|
36
|
+
party_id: bcs.Address
|
|
37
|
+
} });
|
|
38
|
+
/** Sets (or replaces) the party's media quilt. Aborts on a zero id. */
|
|
39
|
+
export function setMedia(options) {
|
|
40
|
+
const packageAddress = options.package ?? '@local-pkg/party_media';
|
|
41
|
+
const argumentsTypes = [
|
|
42
|
+
null,
|
|
43
|
+
null,
|
|
44
|
+
'u256'
|
|
45
|
+
];
|
|
46
|
+
const parameterNames = ["self", "cap", "quilt"];
|
|
47
|
+
return (tx) => tx.moveCall({
|
|
48
|
+
package: packageAddress,
|
|
49
|
+
module: 'party_media',
|
|
50
|
+
function: 'set_media',
|
|
51
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/** Removes the party's media. No-op if none is set. */
|
|
55
|
+
export function clearMedia(options) {
|
|
56
|
+
const packageAddress = options.package ?? '@local-pkg/party_media';
|
|
57
|
+
const argumentsTypes = [
|
|
58
|
+
null,
|
|
59
|
+
null
|
|
60
|
+
];
|
|
61
|
+
const parameterNames = ["self", "cap"];
|
|
62
|
+
return (tx) => tx.moveCall({
|
|
63
|
+
package: packageAddress,
|
|
64
|
+
module: 'party_media',
|
|
65
|
+
function: 'clear_media',
|
|
66
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/** Whether the party has media set. */
|
|
70
|
+
export function hasMedia(options) {
|
|
71
|
+
const packageAddress = options.package ?? '@local-pkg/party_media';
|
|
72
|
+
const argumentsTypes = [
|
|
73
|
+
null
|
|
74
|
+
];
|
|
75
|
+
const parameterNames = ["self"];
|
|
76
|
+
return (tx) => tx.moveCall({
|
|
77
|
+
package: packageAddress,
|
|
78
|
+
module: 'party_media',
|
|
79
|
+
function: 'has_media',
|
|
80
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** The party's media quilt id, if set. */
|
|
84
|
+
export function quilt(options) {
|
|
85
|
+
const packageAddress = options.package ?? '@local-pkg/party_media';
|
|
86
|
+
const argumentsTypes = [
|
|
87
|
+
null
|
|
88
|
+
];
|
|
89
|
+
const parameterNames = ["self"];
|
|
90
|
+
return (tx) => tx.moveCall({
|
|
91
|
+
package: packageAddress,
|
|
92
|
+
module: 'party_media',
|
|
93
|
+
function: 'quilt',
|
|
94
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=party_media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"party_media.js","sourceRoot":"","sources":["../../../src/contracts/party_media/party_media.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAoB,MAAM,0BAA0B,CAAC;AAC5D,MAAM,WAAW,GAAG,qCAAqC,CAAC;AAC1D,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,SAAS,EAAE,MAAM,EAAE;QACrE;;;;aAIK;QACL,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE;KACpB,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,iBAAiB,EAAE,MAAM,EAAE;QACrF,QAAQ,EAAE,GAAG,CAAC,OAAO;QACrB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE;KACpB,EAAE,CAAC,CAAC;AACT,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,qBAAqB,EAAE,MAAM,EAAE;QAC7F,QAAQ,EAAE,GAAG,CAAC,OAAO;KACxB,EAAE,CAAC,CAAC;AAcT,uEAAuE;AACvE,MAAM,UAAU,QAAQ,CAAC,OAAwB;IAC7C,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,I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