@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.
Files changed (207) hide show
  1. package/README.md +48 -38
  2. package/dist/client.d.ts +3 -17
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +18 -3
  5. package/dist/client.js.map +1 -1
  6. package/dist/contracts/miso/composition.d.ts +0 -14
  7. package/dist/contracts/miso/composition.d.ts.map +1 -1
  8. package/dist/contracts/miso/composition.js +0 -15
  9. package/dist/contracts/miso/composition.js.map +1 -1
  10. package/dist/contracts/miso/recording.d.ts +0 -15
  11. package/dist/contracts/miso/recording.d.ts.map +1 -1
  12. package/dist/contracts/miso/recording.js +0 -15
  13. package/dist/contracts/miso/recording.js.map +1 -1
  14. package/dist/contracts/miso/release.d.ts +0 -11
  15. package/dist/contracts/miso/release.d.ts.map +1 -1
  16. package/dist/contracts/miso/release.js +0 -14
  17. package/dist/contracts/miso/release.js.map +1 -1
  18. package/dist/contracts/miso_party/deps/sui/vec_set.d.ts +21 -0
  19. package/dist/contracts/miso_party/deps/sui/vec_set.d.ts.map +1 -0
  20. package/dist/contracts/miso_party/deps/sui/vec_set.js +20 -0
  21. package/dist/contracts/miso_party/deps/sui/vec_set.js.map +1 -0
  22. package/dist/contracts/miso_party/party.d.ts +481 -0
  23. package/dist/contracts/miso_party/party.d.ts.map +1 -0
  24. package/dist/contracts/miso_party/party.js +527 -0
  25. package/dist/contracts/miso_party/party.js.map +1 -0
  26. package/dist/contracts/party_cta/party_cta.d.ts +120 -0
  27. package/dist/contracts/party_cta/party_cta.d.ts.map +1 -0
  28. package/dist/contracts/party_cta/party_cta.js +139 -0
  29. package/dist/contracts/party_cta/party_cta.js.map +1 -0
  30. package/dist/contracts/party_genre/party_genre.d.ts +117 -0
  31. package/dist/contracts/party_genre/party_genre.d.ts.map +1 -0
  32. package/dist/contracts/party_genre/party_genre.js +131 -0
  33. package/dist/contracts/party_genre/party_genre.js.map +1 -0
  34. package/dist/contracts/party_media/party_media.d.ts +86 -0
  35. package/dist/contracts/party_media/party_media.d.ts.map +1 -0
  36. package/dist/contracts/party_media/party_media.js +97 -0
  37. package/dist/contracts/party_media/party_media.js.map +1 -0
  38. package/dist/contracts/party_music/party_music.d.ts +209 -0
  39. package/dist/contracts/party_music/party_music.d.ts.map +1 -0
  40. package/dist/contracts/party_music/party_music.js +259 -0
  41. package/dist/contracts/party_music/party_music.js.map +1 -0
  42. package/dist/contracts/party_platform_link/party_platform_link.d.ts +89 -0
  43. package/dist/contracts/party_platform_link/party_platform_link.d.ts.map +1 -0
  44. package/dist/contracts/party_platform_link/party_platform_link.js +92 -0
  45. package/dist/contracts/party_platform_link/party_platform_link.js.map +1 -0
  46. package/dist/contracts/party_pro_link/party_pro_link.d.ts +233 -0
  47. package/dist/contracts/party_pro_link/party_pro_link.d.ts.map +1 -0
  48. package/dist/contracts/party_pro_link/party_pro_link.js +289 -0
  49. package/dist/contracts/party_pro_link/party_pro_link.js.map +1 -0
  50. package/dist/contracts/party_profile/deps/country_code/country_code.d.ts +15 -0
  51. package/dist/contracts/party_profile/deps/country_code/country_code.d.ts.map +1 -0
  52. package/dist/contracts/party_profile/deps/country_code/country_code.js +17 -0
  53. package/dist/contracts/party_profile/deps/country_code/country_code.js.map +1 -0
  54. package/dist/contracts/party_profile/deps/language_code/language_code.d.ts +6 -0
  55. package/dist/contracts/party_profile/deps/language_code/language_code.d.ts.map +1 -0
  56. package/dist/contracts/party_profile/deps/language_code/language_code.js +8 -0
  57. package/dist/contracts/party_profile/deps/language_code/language_code.js.map +1 -0
  58. package/dist/contracts/party_profile/party_profile.d.ts +133 -0
  59. package/dist/contracts/party_profile/party_profile.d.ts.map +1 -0
  60. package/dist/contracts/party_profile/party_profile.js +153 -0
  61. package/dist/contracts/party_profile/party_profile.js.map +1 -0
  62. package/dist/contracts/party_roles/party_roles.d.ts +201 -0
  63. package/dist/contracts/party_roles/party_roles.d.ts.map +1 -0
  64. package/dist/contracts/party_roles/party_roles.js +237 -0
  65. package/dist/contracts/party_roles/party_roles.js.map +1 -0
  66. package/dist/contracts/party_social/party_social.d.ts +258 -0
  67. package/dist/contracts/party_social/party_social.d.ts.map +1 -0
  68. package/dist/contracts/party_social/party_social.js +320 -0
  69. package/dist/contracts/party_social/party_social.js.map +1 -0
  70. package/dist/contracts/party_tags/party_tags.d.ts +116 -0
  71. package/dist/contracts/party_tags/party_tags.d.ts.map +1 -0
  72. package/dist/contracts/party_tags/party_tags.js +130 -0
  73. package/dist/contracts/party_tags/party_tags.js.map +1 -0
  74. package/dist/contracts/routed_stake/routed_stake.d.ts +0 -14
  75. package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -1
  76. package/dist/contracts/routed_stake/routed_stake.js +0 -14
  77. package/dist/contracts/routed_stake/routed_stake.js.map +1 -1
  78. package/dist/contracts/royalty_pool/pool.d.ts +0 -14
  79. package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
  80. package/dist/contracts/royalty_pool/pool.js +0 -14
  81. package/dist/contracts/royalty_pool/pool.js.map +1 -1
  82. package/dist/contracts/royalty_pool/stake.d.ts +6 -13
  83. package/dist/contracts/royalty_pool/stake.d.ts.map +1 -1
  84. package/dist/contracts/royalty_pool/stake.js +6 -14
  85. package/dist/contracts/royalty_pool/stake.js.map +1 -1
  86. package/dist/contracts.d.ts +13 -2
  87. package/dist/contracts.d.ts.map +1 -1
  88. package/dist/contracts.js +14 -2
  89. package/dist/contracts.js.map +1 -1
  90. package/dist/deployments.d.ts +73 -14
  91. package/dist/deployments.d.ts.map +1 -1
  92. package/dist/deployments.js +53 -13
  93. package/dist/deployments.js.map +1 -1
  94. package/dist/events.d.ts +0 -14
  95. package/dist/events.d.ts.map +1 -1
  96. package/dist/events.js +0 -4
  97. package/dist/events.js.map +1 -1
  98. package/dist/index.d.ts +2 -0
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +1 -0
  101. package/dist/index.js.map +1 -1
  102. package/dist/packages.d.ts +39 -4
  103. package/dist/packages.d.ts.map +1 -1
  104. package/dist/packages.js +39 -4
  105. package/dist/packages.js.map +1 -1
  106. package/dist/party/client.d.ts +233 -0
  107. package/dist/party/client.d.ts.map +1 -0
  108. package/dist/party/client.js +222 -0
  109. package/dist/party/client.js.map +1 -0
  110. package/dist/party/extensions/ctas.d.ts +19 -0
  111. package/dist/party/extensions/ctas.d.ts.map +1 -0
  112. package/dist/party/extensions/ctas.js +25 -0
  113. package/dist/party/extensions/ctas.js.map +1 -0
  114. package/dist/party/extensions/genres.d.ts +27 -0
  115. package/dist/party/extensions/genres.d.ts.map +1 -0
  116. package/dist/party/extensions/genres.js +31 -0
  117. package/dist/party/extensions/genres.js.map +1 -0
  118. package/dist/party/extensions/links.d.ts +65 -0
  119. package/dist/party/extensions/links.d.ts.map +1 -0
  120. package/dist/party/extensions/links.js +117 -0
  121. package/dist/party/extensions/links.js.map +1 -0
  122. package/dist/party/extensions/media.d.ts +36 -0
  123. package/dist/party/extensions/media.d.ts.map +1 -0
  124. package/dist/party/extensions/media.js +45 -0
  125. package/dist/party/extensions/media.js.map +1 -0
  126. package/dist/party/extensions/profile.d.ts +24 -0
  127. package/dist/party/extensions/profile.d.ts.map +1 -0
  128. package/dist/party/extensions/profile.js +48 -0
  129. package/dist/party/extensions/profile.js.map +1 -0
  130. package/dist/party/extensions/roles.d.ts +37 -0
  131. package/dist/party/extensions/roles.d.ts.map +1 -0
  132. package/dist/party/extensions/roles.js +46 -0
  133. package/dist/party/extensions/roles.js.map +1 -0
  134. package/dist/party/extensions/tags.d.ts +25 -0
  135. package/dist/party/extensions/tags.d.ts.map +1 -0
  136. package/dist/party/extensions/tags.js +25 -0
  137. package/dist/party/extensions/tags.js.map +1 -0
  138. package/dist/party/index.d.ts +12 -0
  139. package/dist/party/index.d.ts.map +1 -0
  140. package/dist/party/index.js +14 -0
  141. package/dist/party/index.js.map +1 -0
  142. package/dist/party/internal.d.ts +15 -0
  143. package/dist/party/internal.d.ts.map +1 -0
  144. package/dist/party/internal.js +103 -0
  145. package/dist/party/internal.js.map +1 -0
  146. package/dist/party/queries.d.ts +38 -0
  147. package/dist/party/queries.d.ts.map +1 -0
  148. package/dist/party/queries.js +232 -0
  149. package/dist/party/queries.js.map +1 -0
  150. package/dist/party/transactions.d.ts +74 -0
  151. package/dist/party/transactions.d.ts.map +1 -0
  152. package/dist/party/transactions.js +85 -0
  153. package/dist/party/transactions.js.map +1 -0
  154. package/dist/party/types.d.ts +54 -0
  155. package/dist/party/types.d.ts.map +1 -0
  156. package/dist/party/types.js +4 -0
  157. package/dist/party/types.js.map +1 -0
  158. package/package.json +6 -2
  159. package/src/client.ts +21 -3
  160. package/src/contracts/miso/composition.ts +0 -27
  161. package/src/contracts/miso/recording.ts +0 -28
  162. package/src/contracts/miso/release.ts +0 -23
  163. package/src/contracts/miso_party/deps/sui/vec_set.ts +21 -0
  164. package/src/contracts/miso_party/party.ts +797 -0
  165. package/src/contracts/party_cta/party_cta.ts +212 -0
  166. package/src/contracts/party_genre/party_genre.ts +199 -0
  167. package/src/contracts/party_media/party_media.ts +141 -0
  168. package/src/contracts/party_music/party_music.ts +405 -0
  169. package/src/contracts/party_platform_link/party_platform_link.ts +148 -0
  170. package/src/contracts/party_pro_link/party_pro_link.ts +453 -0
  171. package/src/contracts/party_profile/deps/country_code/country_code.ts +19 -0
  172. package/src/contracts/party_profile/deps/language_code/language_code.ts +7 -0
  173. package/src/contracts/party_profile/party_profile.ts +239 -0
  174. package/src/contracts/party_roles/party_roles.ts +363 -0
  175. package/src/contracts/party_social/party_social.ts +502 -0
  176. package/src/contracts/party_tags/party_tags.ts +198 -0
  177. package/src/contracts/routed_stake/routed_stake.ts +0 -27
  178. package/src/contracts/royalty_pool/pool.ts +0 -27
  179. package/src/contracts/royalty_pool/stake.ts +6 -26
  180. package/src/contracts.ts +15 -2
  181. package/src/deployments.ts +56 -14
  182. package/src/events.ts +0 -4
  183. package/src/index.ts +2 -0
  184. package/src/packages.ts +40 -8
  185. package/src/party/client.ts +283 -0
  186. package/src/party/extensions/ctas.ts +46 -0
  187. package/src/party/extensions/genres.ts +62 -0
  188. package/src/party/extensions/links.ts +185 -0
  189. package/src/party/extensions/media.ts +72 -0
  190. package/src/party/extensions/profile.ts +81 -0
  191. package/src/party/extensions/roles.ts +94 -0
  192. package/src/party/extensions/tags.ts +54 -0
  193. package/src/party/index.ts +14 -0
  194. package/src/party/internal.ts +119 -0
  195. package/src/party/queries.ts +303 -0
  196. package/src/party/transactions.ts +167 -0
  197. package/src/party/types.ts +95 -0
  198. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts +0 -52
  199. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +0 -1
  200. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +0 -37
  201. package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +0 -1
  202. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +0 -91
  203. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +0 -1
  204. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +0 -91
  205. package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js.map +0 -1
  206. package/src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts +0 -36
  207. package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +0 -124
@@ -0,0 +1,167 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // Core PartyOS transaction builders. Every builder returns a thunk that *appends*
5
+ // commands to a caller-owned Transaction, so flows compose. Package ids are taken
6
+ // in params (the client binds them; see ./client.ts). Calls into the party package
7
+ // go through the generated typed call fns (party.*).
8
+
9
+ import type { Transaction } from "@mysten/sui/transactions";
10
+ import * as party from "../contracts/miso_party/party.ts";
11
+
12
+ export type TxThunk = (tx: Transaction) => void | Promise<void>;
13
+
14
+ export interface CreatePartyParams {
15
+ /** Human-readable party name (not verified; app-layer verifies). */
16
+ name: string;
17
+ /** Address that receives the PartyAdminCap. */
18
+ recipient: string;
19
+ partyPackageId: string;
20
+ }
21
+
22
+ /** Creates an individual party, shares it, and transfers its admin cap to `recipient`. */
23
+ export function createIndividualParty(params: CreatePartyParams): TxThunk {
24
+ return (tx) => {
25
+ const kind = tx.add(party.newIndividualKind({ package: params.partyPackageId }));
26
+ const res = tx.add(party._new({ package: params.partyPackageId, arguments: [kind, params.name] }));
27
+ tx.add(party.share({ package: params.partyPackageId, arguments: [res[0]!, res[1]!] }));
28
+ tx.transferObjects([res[1]!], params.recipient);
29
+ };
30
+ }
31
+
32
+ /** Creates a group party (empty member set), shares it, transfers its admin cap. */
33
+ export function createGroupParty(params: CreatePartyParams): TxThunk {
34
+ return (tx) => {
35
+ const kind = tx.add(party.newGroupKind({ package: params.partyPackageId }));
36
+ const res = tx.add(party._new({ package: params.partyPackageId, arguments: [kind, params.name] }));
37
+ tx.add(party.share({ package: params.partyPackageId, arguments: [res[0]!, res[1]!] }));
38
+ tx.transferObjects([res[1]!], params.recipient);
39
+ };
40
+ }
41
+
42
+ // === Group membership: invite / accept / decline / revoke / leave / evict ===
43
+ // Membership is consent-based: the group admin invites, the member accepts with
44
+ // its OWN admin cap. `member`/`group`/`*Cap` params are all object ids.
45
+
46
+ export interface InvitePartyParams {
47
+ groupId: string;
48
+ groupCapId: string;
49
+ /** The individual party (shared object id) to invite. */
50
+ memberId: string;
51
+ partyPackageId: string;
52
+ }
53
+
54
+ /** Invites an individual party to a group (gated by the group's admin cap). */
55
+ export function inviteParty(params: InvitePartyParams): TxThunk {
56
+ return (tx) => {
57
+ tx.add(party.inviteParty({
58
+ package: params.partyPackageId,
59
+ arguments: [params.groupId, params.memberId, params.groupCapId],
60
+ }));
61
+ };
62
+ }
63
+
64
+ export interface AcceptInviteParams {
65
+ groupId: string;
66
+ memberId: string;
67
+ /** The member party's admin cap id (proves consent). */
68
+ memberCapId: string;
69
+ partyPackageId: string;
70
+ }
71
+
72
+ /** Accepts a pending invite, joining the member to the group (member's cap). */
73
+ export function acceptInvite(params: AcceptInviteParams): TxThunk {
74
+ return (tx) => {
75
+ tx.add(party.acceptInvite({
76
+ package: params.partyPackageId,
77
+ arguments: [params.groupId, params.memberId, params.memberCapId],
78
+ }));
79
+ };
80
+ }
81
+
82
+ export interface DeclineInviteParams {
83
+ groupId: string;
84
+ /** The invited individual party (shared object id). */
85
+ memberId: string;
86
+ memberCapId: string;
87
+ partyPackageId: string;
88
+ }
89
+
90
+ /** Declines a pending invite (member's cap). */
91
+ export function declineInvite(params: DeclineInviteParams): TxThunk {
92
+ return (tx) => {
93
+ tx.add(party.declineInvite({
94
+ package: params.partyPackageId,
95
+ arguments: [params.groupId, params.memberId, params.memberCapId],
96
+ }));
97
+ };
98
+ }
99
+
100
+ export interface RevokeInviteParams {
101
+ groupId: string;
102
+ /** The invited individual party (shared object id). */
103
+ memberId: string;
104
+ groupCapId: string;
105
+ partyPackageId: string;
106
+ }
107
+
108
+ /** Revokes a pending invite (group's admin cap). */
109
+ export function revokeInvite(params: RevokeInviteParams): TxThunk {
110
+ return (tx) => {
111
+ tx.add(party.revokeInvite({
112
+ package: params.partyPackageId,
113
+ arguments: [params.groupId, params.memberId, params.groupCapId],
114
+ }));
115
+ };
116
+ }
117
+
118
+ export interface LeaveGroupParams {
119
+ groupId: string;
120
+ memberId: string;
121
+ memberCapId: string;
122
+ partyPackageId: string;
123
+ }
124
+
125
+ /** Leaves a group, authorized by the member's own admin cap. */
126
+ export function leaveGroup(params: LeaveGroupParams): TxThunk {
127
+ return (tx) => {
128
+ tx.add(party.leave({
129
+ package: params.partyPackageId,
130
+ arguments: [params.groupId, params.memberId, params.memberCapId],
131
+ }));
132
+ };
133
+ }
134
+
135
+ export interface RemoveMemberParams {
136
+ groupId: string;
137
+ groupCapId: string;
138
+ memberId: string;
139
+ partyPackageId: string;
140
+ }
141
+
142
+ /** Evicts a member from a group (group's admin cap); scrubs the member's record too. */
143
+ export function removeMember(params: RemoveMemberParams): TxThunk {
144
+ return (tx) => {
145
+ tx.add(party.removeMember({
146
+ package: params.partyPackageId,
147
+ arguments: [params.groupId, params.groupCapId, params.memberId],
148
+ }));
149
+ };
150
+ }
151
+
152
+ export interface SetNameParams {
153
+ partyId: string;
154
+ capId: string;
155
+ name: string;
156
+ partyPackageId: string;
157
+ }
158
+
159
+ /** Sets the party's human-readable name. */
160
+ export function setName(params: SetNameParams): TxThunk {
161
+ return (tx) => {
162
+ tx.add(party.setName({
163
+ package: params.partyPackageId,
164
+ arguments: [params.partyId, params.capId, params.name],
165
+ }));
166
+ };
167
+ }
@@ -0,0 +1,95 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ // Public, camelCase result types. The mappers in ./internal.ts turn the generated
5
+ // (snake_case, Move-shaped) parse output into these.
6
+
7
+ export type PartyKind = "individual" | "group";
8
+
9
+ export interface Party {
10
+ id: string;
11
+ kind: PartyKind;
12
+ /** Human-readable name (not verified). */
13
+ name: string;
14
+ /** Member party ids — present only when `kind === "group"`. */
15
+ members?: string[];
16
+ /** Unix ms when the party was created. */
17
+ createdAtMs: number;
18
+ }
19
+
20
+ export interface Profile {
21
+ partyId: string;
22
+ bioShort: string;
23
+ bioLong?: string;
24
+ /** ISO 3166-1 alpha-2 country code, e.g. "GB". */
25
+ country?: string;
26
+ /** ISO 639-1 language codes, e.g. ["en"]. */
27
+ languages: string[];
28
+ }
29
+
30
+ /**
31
+ * A party's imagery, stored on-chain as a single Walrus quilt. Individual images
32
+ * (avatar, header, …) are quilt patches addressed by identifier off-chain — see
33
+ * `mediaUrls` / `MEDIA_IDENTIFIERS` in `extensions/media`.
34
+ */
35
+ export interface Media {
36
+ partyId: string;
37
+ /** Walrus quilt blob id (base64url) holding the party's images. */
38
+ quiltId: string;
39
+ }
40
+
41
+ /** A single call-to-action on a party: a labeled external link. Position is priority. */
42
+ export interface Cta {
43
+ label: string;
44
+ url: string;
45
+ }
46
+
47
+ /**
48
+ * A platform this SDK knows how to build a link for. One key per external
49
+ * platform, spanning social (`x`, `instagram`, …), music (`spotify`, `bandcamp`,
50
+ * …), and professional/industry (`website`, `patreon`, …) payloads.
51
+ */
52
+ export type PlatformKey =
53
+ // Social (party_social)
54
+ | "x"
55
+ | "instagram"
56
+ | "threads"
57
+ | "tiktok"
58
+ | "youtube"
59
+ | "discord"
60
+ | "telegram"
61
+ | "reddit"
62
+ | "twitch"
63
+ | "facebook"
64
+ // Music (party_music)
65
+ | "spotify"
66
+ | "bandcamp"
67
+ | "soundcloud"
68
+ | "appleMusic"
69
+ | "deezer"
70
+ | "tidal"
71
+ | "amazonMusic"
72
+ | "audiomack"
73
+ // Professional / industry (party_pro_link)
74
+ | "website"
75
+ | "bookingPage"
76
+ | "managementPage"
77
+ | "publisherPage"
78
+ | "labelPage"
79
+ | "epk"
80
+ | "patreon"
81
+ | "substack"
82
+ | "kofi";
83
+
84
+ /**
85
+ * One external-platform link attached to a party. Only the native identifier
86
+ * (`value` — a handle, artist id, subdomain, or full URL) is stored on-chain; the
87
+ * public `url` is rebuilt client-side from it.
88
+ */
89
+ export interface PlatformLink {
90
+ platform: PlatformKey;
91
+ /** The platform-native identifier stored on-chain (handle / id / subdomain / URL). */
92
+ value: string;
93
+ /** The public profile URL, rebuilt from `value`. */
94
+ url: string;
95
+ }
@@ -1,52 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveEnum, MoveStruct, MoveTuple } from '../../../utils/index.ts';
5
- /**
6
- * Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
7
- * Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
8
- * blob and can never be the direct product of an encryption.
9
- */
10
- export declare const Confidentiality: MoveEnum<{
11
- /** The blob is stored in the clear. */
12
- Unencrypted: null;
13
- /**
14
- * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
15
- * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
16
- * itself a Seal `EncryptedObject`, which already carries the decryption-policy
17
- * package id, so no separate policy field is stored here. Decryption is gated by
18
- * that policy package's `seal_approve`, not by this library.
19
- */
20
- Encrypted: MoveStruct<{
21
- dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
22
- length: number;
23
- }, string>;
24
- }, "Confidentiality.Encrypted">;
25
- }, "ori::walrus_data::Confidentiality">;
26
- /** Represents either a standalone Walrus blob or a patch within a quilt. */
27
- export declare const WalrusData: MoveEnum<{
28
- /** A standalone Walrus blob. Fields: blob_id, confidentiality. */
29
- Blob: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, MoveEnum<{
30
- /** The blob is stored in the clear. */
31
- Unencrypted: null;
32
- /**
33
- * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
34
- * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
35
- * itself a Seal `EncryptedObject`, which already carries the decryption-policy
36
- * package id, so no separate policy field is stored here. Decryption is gated by
37
- * that policy package's `seal_approve`, not by this library.
38
- */
39
- Encrypted: MoveStruct<{
40
- dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
41
- length: number;
42
- }, string>;
43
- }, "Confidentiality.Encrypted">;
44
- }, "ori::walrus_data::Confidentiality">], "WalrusData.Blob">;
45
- /**
46
- * A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
47
- * end_index. Always a plaintext reference into a (possibly separately encrypted)
48
- * quilt blob.
49
- */
50
- QuiltPatch: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("@mysten/sui/bcs").BcsType<number, number, "u8">, import("@mysten/sui/bcs").BcsType<number, number, "u16">, import("@mysten/sui/bcs").BcsType<number, number, "u16">], "WalrusData.QuiltPatch">;
51
- }, "ori::walrus_data::WalrusData">;
52
- //# sourceMappingURL=walrus_data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walrus_data.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAG1E;;;;GAIG;AACH,eAAO,MAAM,eAAe;IACpB,uCAAuC;;IAEvC;;;;;;OAMG;;;;;;uCAIH,CAAC;AACT,4EAA4E;AAC5E,eAAO,MAAM,UAAU;IACf,kEAAkE;;QAflE,uCAAuC;;QAEvC;;;;;;WAMG;;;;;;;IASH;;;;OAIG;;kCAEH,CAAC"}
@@ -1,37 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveEnum, MoveStruct, MoveTuple } from "../../../utils/index.js";
5
- import { bcs } from '@mysten/sui/bcs';
6
- const $moduleName = 'ori::walrus_data';
7
- /**
8
- * Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
9
- * Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
10
- * blob and can never be the direct product of an encryption.
11
- */
12
- export const Confidentiality = new MoveEnum({ name: `${$moduleName}::Confidentiality`, fields: {
13
- /** The blob is stored in the clear. */
14
- Unencrypted: null,
15
- /**
16
- * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
17
- * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
18
- * itself a Seal `EncryptedObject`, which already carries the decryption-policy
19
- * package id, so no separate policy field is stored here. Decryption is gated by
20
- * that policy package's `seal_approve`, not by this library.
21
- */
22
- Encrypted: new MoveStruct({ name: `Confidentiality.Encrypted`, fields: {
23
- dek: bcs.vector(bcs.u8())
24
- } })
25
- } });
26
- /** Represents either a standalone Walrus blob or a patch within a quilt. */
27
- export const WalrusData = new MoveEnum({ name: `${$moduleName}::WalrusData`, fields: {
28
- /** A standalone Walrus blob. Fields: blob_id, confidentiality. */
29
- Blob: new MoveTuple({ name: `WalrusData.Blob`, fields: [bcs.u256(), Confidentiality] }),
30
- /**
31
- * A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
32
- * end_index. Always a plaintext reference into a (possibly separately encrypted)
33
- * quilt blob.
34
- */
35
- QuiltPatch: new MoveTuple({ name: `WalrusData.QuiltPatch`, fields: [bcs.u256(), bcs.u8(), bcs.u16(), bcs.u16()] })
36
- } });
37
- //# sourceMappingURL=walrus_data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"walrus_data.js","sourceRoot":"","sources":["../../../../../src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAChE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AACvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,mBAAmB,EAAE,MAAM,EAAE;QACvF,uCAAuC;QACvC,WAAW,EAAE,IAAI;QACjB;;;;;;WAMG;QACH,SAAS,EAAE,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE;gBAC/D,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;aAC5B,EAAE,CAAC;KACX,EAAE,CAAC,CAAC;AACT,4EAA4E;AAC5E,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,cAAc,EAAE,MAAM,EAAE;QAC7E,kEAAkE;QAClE,IAAI,EAAE,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC;QACvF;;;;WAIG;QACH,UAAU,EAAE,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;KACrH,EAAE,CAAC,CAAC"}
@@ -1,91 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- /**
5
- * The on-chain pointer to a release's snapshot bundle: which Walrus quilt is this
6
- * release's bundle.
7
- *
8
- * A snapshot bundle is curated bonus material a buyer gets access to — one Walrus
9
- * quilt, assembled after the fact. The quilt is self-describing: its plaintext
10
- * `manifest.json` patch carries all the metadata, its media patches are
11
- * chunk-encrypted under one AES envelope key, and that key travels Seal-wrapped
12
- * inside the quilt as its `key.seal` patch. This package therefore stores none of
13
- * that — no ciphertext, no metadata, no access policy (unlocking by holding a
14
- * Record is `miso_record_acl`'s concern, in miso-record-extensions). The stored
15
- * value is the quilt's `WalrusData` blob reference, and nothing else.
16
- *
17
- * The slot is write-once: `set_snapshot_bundle` aborts with `EBundleAlreadySet` if
18
- * a bundle is already set, and there is NO unset, NO remove, and NO replace
19
- * function. That absence is a product guarantee: the bundle a buyer's Record
20
- * points at can never be swapped out from under them. More content later means a
21
- * new Release.
22
- */
23
- import { MoveTuple, MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
24
- import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
25
- export declare const ExtensionKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/release_snapshot_bundle::release_snapshot_bundle::ExtensionKey">;
26
- export declare const SnapshotBundleSetEvent: MoveStruct<{
27
- release_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
28
- bundle: import("../utils/index.ts").MoveEnum<{
29
- Blob: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("../utils/index.ts").MoveEnum<{
30
- Unencrypted: null;
31
- Encrypted: MoveStruct<{
32
- dek: import("@mysten/sui/bcs").BcsType<number[], Iterable<number> & {
33
- length: number;
34
- }, string>;
35
- }, "Confidentiality.Encrypted">;
36
- }, "ori::walrus_data::Confidentiality">], "WalrusData.Blob">;
37
- QuiltPatch: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u256">, import("@mysten/sui/bcs").BcsType<number, number, "u8">, import("@mysten/sui/bcs").BcsType<number, number, "u16">, import("@mysten/sui/bcs").BcsType<number, number, "u16">], "WalrusData.QuiltPatch">;
38
- }, "ori::walrus_data::WalrusData">;
39
- }, "@local-pkg/release_snapshot_bundle::release_snapshot_bundle::SnapshotBundleSetEvent">;
40
- export interface SetSnapshotBundleArguments {
41
- self: RawTransactionArgument<string>;
42
- cap: RawTransactionArgument<string>;
43
- bundle: TransactionArgument;
44
- }
45
- export interface SetSnapshotBundleOptions {
46
- package?: string;
47
- arguments: SetSnapshotBundleArguments | [
48
- self: RawTransactionArgument<string>,
49
- cap: RawTransactionArgument<string>,
50
- bundle: TransactionArgument
51
- ];
52
- }
53
- /**
54
- * Sets the release's snapshot bundle — once. Aborts with `EBundleAlreadySet` if a
55
- * bundle is already set; there is no way to unset or replace it.
56
- *
57
- * The reference must be a plaintext standalone blob. A quilt patch is a slice of
58
- * some other quilt, not the bundle's own quilt blob. And the outer quilt blob is
59
- * plaintext by design: its `manifest.json` patch must be readable, encryption is
60
- * per-patch inside the quilt, and the Seal-wrapped envelope key travels as the
61
- * quilt's `key.seal` patch — so an encrypted outer reference is structurally
62
- * wrong. With no replace function either mistake would be permanent, which is why
63
- * both checks live on-chain rather than in the client.
64
- */
65
- export declare function setSnapshotBundle(options: SetSnapshotBundleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
66
- export interface HasSnapshotBundleArguments {
67
- self: RawTransactionArgument<string>;
68
- }
69
- export interface HasSnapshotBundleOptions {
70
- package?: string;
71
- arguments: HasSnapshotBundleArguments | [
72
- self: RawTransactionArgument<string>
73
- ];
74
- }
75
- /** Returns whether a snapshot bundle is set on this release. */
76
- export declare function hasSnapshotBundle(options: HasSnapshotBundleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
77
- export interface SnapshotBundleArguments {
78
- self: RawTransactionArgument<string>;
79
- }
80
- export interface SnapshotBundleOptions {
81
- package?: string;
82
- arguments: SnapshotBundleArguments | [
83
- self: RawTransactionArgument<string>
84
- ];
85
- }
86
- /**
87
- * The release's snapshot bundle reference. Aborts with `ENoSnapshotBundle` if none
88
- * is set.
89
- */
90
- export declare function snapshotBundle(options: SnapshotBundleOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
91
- //# sourceMappingURL=release_snapshot_bundle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"release_snapshot_bundle.d.ts","sourceRoot":"","sources":["../../../src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE/G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF,eAAO,MAAM,YAAY,gKAAgF,CAAC;AAC1G,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;yFAG3B,CAAC;AACT,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,mBAAmB,CAAC;CAC/B;AACD,MAAM,WAAW,wBAAwB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,0BAA0B,GAAG;QACpC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACpC,GAAG,EAAE,sBAAsB,CAAC,MAAM,CAAC;QACnC,MAAM,EAAE,mBAAmB;KAC9B,CAAC;CACL;AACD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,IAQvD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,wBAAwB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,0BAA0B,GAAG;QACpC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD,gEAAgE;AAChE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,IAMvD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,qBAAqB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,uBAAuB,GAAG;QACjC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;CACL;AACD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,IAMjD,IAAI,WAAW,0DAM1B"}
@@ -1,91 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- /**
5
- * The on-chain pointer to a release's snapshot bundle: which Walrus quilt is this
6
- * release's bundle.
7
- *
8
- * A snapshot bundle is curated bonus material a buyer gets access to — one Walrus
9
- * quilt, assembled after the fact. The quilt is self-describing: its plaintext
10
- * `manifest.json` patch carries all the metadata, its media patches are
11
- * chunk-encrypted under one AES envelope key, and that key travels Seal-wrapped
12
- * inside the quilt as its `key.seal` patch. This package therefore stores none of
13
- * that — no ciphertext, no metadata, no access policy (unlocking by holding a
14
- * Record is `miso_record_acl`'s concern, in miso-record-extensions). The stored
15
- * value is the quilt's `WalrusData` blob reference, and nothing else.
16
- *
17
- * The slot is write-once: `set_snapshot_bundle` aborts with `EBundleAlreadySet` if
18
- * a bundle is already set, and there is NO unset, NO remove, and NO replace
19
- * function. That absence is a product guarantee: the bundle a buyer's Record
20
- * points at can never be swapped out from under them. More content later means a
21
- * new Release.
22
- */
23
- import { MoveTuple, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
24
- import { bcs } from '@mysten/sui/bcs';
25
- import {} from '@mysten/sui/transactions';
26
- import * as walrus_data from "./deps/ori/walrus_data.js";
27
- const $moduleName = '@local-pkg/release_snapshot_bundle::release_snapshot_bundle';
28
- export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
29
- export const SnapshotBundleSetEvent = new MoveStruct({ name: `${$moduleName}::SnapshotBundleSetEvent`, fields: {
30
- release_id: bcs.Address,
31
- bundle: walrus_data.WalrusData
32
- } });
33
- /**
34
- * Sets the release's snapshot bundle — once. Aborts with `EBundleAlreadySet` if a
35
- * bundle is already set; there is no way to unset or replace it.
36
- *
37
- * The reference must be a plaintext standalone blob. A quilt patch is a slice of
38
- * some other quilt, not the bundle's own quilt blob. And the outer quilt blob is
39
- * plaintext by design: its `manifest.json` patch must be readable, encryption is
40
- * per-patch inside the quilt, and the Seal-wrapped envelope key travels as the
41
- * quilt's `key.seal` patch — so an encrypted outer reference is structurally
42
- * wrong. With no replace function either mistake would be permanent, which is why
43
- * both checks live on-chain rather than in the client.
44
- */
45
- export function setSnapshotBundle(options) {
46
- const packageAddress = options.package ?? '@local-pkg/release_snapshot_bundle';
47
- const argumentsTypes = [
48
- null,
49
- null,
50
- null
51
- ];
52
- const parameterNames = ["self", "cap", "bundle"];
53
- return (tx) => tx.moveCall({
54
- package: packageAddress,
55
- module: 'release_snapshot_bundle',
56
- function: 'set_snapshot_bundle',
57
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
58
- });
59
- }
60
- /** Returns whether a snapshot bundle is set on this release. */
61
- export function hasSnapshotBundle(options) {
62
- const packageAddress = options.package ?? '@local-pkg/release_snapshot_bundle';
63
- const argumentsTypes = [
64
- null
65
- ];
66
- const parameterNames = ["self"];
67
- return (tx) => tx.moveCall({
68
- package: packageAddress,
69
- module: 'release_snapshot_bundle',
70
- function: 'has_snapshot_bundle',
71
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
72
- });
73
- }
74
- /**
75
- * The release's snapshot bundle reference. Aborts with `ENoSnapshotBundle` if none
76
- * is set.
77
- */
78
- export function snapshotBundle(options) {
79
- const packageAddress = options.package ?? '@local-pkg/release_snapshot_bundle';
80
- const argumentsTypes = [
81
- null
82
- ];
83
- const parameterNames = ["self"];
84
- return (tx) => tx.moveCall({
85
- package: packageAddress,
86
- module: 'release_snapshot_bundle',
87
- function: 'snapshot_bundle',
88
- arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
89
- });
90
- }
91
- //# sourceMappingURL=release_snapshot_bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"release_snapshot_bundle.js","sourceRoot":"","sources":["../../../src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;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,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,MAAM,WAAW,GAAG,6DAA6D,CAAC;AAClF,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,gBAAgB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,0BAA0B,EAAE,MAAM,EAAE;QACvG,UAAU,EAAE,GAAG,CAAC,OAAO;QACvB,MAAM,EAAE,WAAW,CAAC,UAAU;KACjC,EAAE,CAAC,CAAC;AAcT;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;IAC/E,MAAM,cAAc,GAAG;QACnB,IAAI;QACJ,IAAI;QACJ,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACjD,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,yBAAyB;QACjC,QAAQ,EAAE,qBAAqB;QAC/B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IAC/D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;IAC/E,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,yBAAyB;QACjC,QAAQ,EAAE,qBAAqB;QAC/B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAA8B;IACzD,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,oCAAoC,CAAC;IAC/E,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,yBAAyB;QACjC,QAAQ,EAAE,iBAAiB;QAC3B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
@@ -1,36 +0,0 @@
1
- /**************************************************************
2
- * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
- **************************************************************/
4
- import { MoveEnum, MoveStruct, MoveTuple } from '../../../utils/index.ts';
5
- import { bcs } from '@mysten/sui/bcs';
6
- const $moduleName = 'ori::walrus_data';
7
- /**
8
- * Confidentiality of a stored blob: cleartext, or encrypted with an access policy.
9
- * Only applies to standalone blobs — a quilt patch is a slice of a shared quilt
10
- * blob and can never be the direct product of an encryption.
11
- */
12
- export const Confidentiality = new MoveEnum({ name: `${$moduleName}::Confidentiality`, fields: {
13
- /** The blob is stored in the clear. */
14
- Unencrypted: null,
15
- /**
16
- * The blob is AES-encrypted. `dek` is the AES data-encryption key sealed via Seal
17
- * — a small ciphertext stored on-chain, not the blob bytes. The sealed DEK is
18
- * itself a Seal `EncryptedObject`, which already carries the decryption-policy
19
- * package id, so no separate policy field is stored here. Decryption is gated by
20
- * that policy package's `seal_approve`, not by this library.
21
- */
22
- Encrypted: new MoveStruct({ name: `Confidentiality.Encrypted`, fields: {
23
- dek: bcs.vector(bcs.u8())
24
- } })
25
- } });
26
- /** Represents either a standalone Walrus blob or a patch within a quilt. */
27
- export const WalrusData = new MoveEnum({ name: `${$moduleName}::WalrusData`, fields: {
28
- /** A standalone Walrus blob. Fields: blob_id, confidentiality. */
29
- Blob: new MoveTuple({ name: `WalrusData.Blob`, fields: [bcs.u256(), Confidentiality] }),
30
- /**
31
- * A patch within a Walrus quilt. Fields: quilt_id, version, start_index,
32
- * end_index. Always a plaintext reference into a (possibly separately encrypted)
33
- * quilt blob.
34
- */
35
- QuiltPatch: new MoveTuple({ name: `WalrusData.QuiltPatch`, fields: [bcs.u256(), bcs.u8(), bcs.u16(), bcs.u16()] })
36
- } });