@misonetwork/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +644 -0
  3. package/dist/client.d.ts +197 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +218 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/contracts/composition_credits/composition_credits.d.ts +181 -0
  8. package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -0
  9. package/dist/contracts/composition_credits/composition_credits.js +109 -0
  10. package/dist/contracts/composition_credits/composition_credits.js.map +1 -0
  11. package/dist/contracts/composition_credits/composition_party_role.d.ts +119 -0
  12. package/dist/contracts/composition_credits/composition_party_role.d.ts.map +1 -0
  13. package/dist/contracts/composition_credits/composition_party_role.js +139 -0
  14. package/dist/contracts/composition_credits/composition_party_role.js.map +1 -0
  15. package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts +24 -0
  16. package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +1 -0
  17. package/dist/contracts/composition_credits/deps/miso_credit/credit.js +23 -0
  18. package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +1 -0
  19. package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts +37 -0
  20. package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +1 -0
  21. package/dist/contracts/composition_credits/deps/sui/vec_map.js +28 -0
  22. package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +1 -0
  23. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +87 -0
  24. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -0
  25. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +80 -0
  26. package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -0
  27. package/dist/contracts/cover_art/cover_art.d.ts +85 -0
  28. package/dist/contracts/cover_art/cover_art.d.ts.map +1 -0
  29. package/dist/contracts/cover_art/cover_art.js +68 -0
  30. package/dist/contracts/cover_art/cover_art.js.map +1 -0
  31. package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts +52 -0
  32. package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts.map +1 -0
  33. package/dist/contracts/cover_art/deps/ori/walrus_data.js +37 -0
  34. package/dist/contracts/cover_art/deps/ori/walrus_data.js.map +1 -0
  35. package/dist/contracts/miso/composition.d.ts +231 -0
  36. package/dist/contracts/miso/composition.d.ts.map +1 -0
  37. package/dist/contracts/miso/composition.js +231 -0
  38. package/dist/contracts/miso/composition.js.map +1 -0
  39. package/dist/contracts/miso/deal.d.ts +184 -0
  40. package/dist/contracts/miso/deal.d.ts.map +1 -0
  41. package/dist/contracts/miso/deal.js +184 -0
  42. package/dist/contracts/miso/deal.js.map +1 -0
  43. package/dist/contracts/miso/deps/bps/bps.d.ts +19 -0
  44. package/dist/contracts/miso/deps/bps/bps.d.ts.map +1 -0
  45. package/dist/contracts/miso/deps/bps/bps.js +21 -0
  46. package/dist/contracts/miso/deps/bps/bps.js.map +1 -0
  47. package/dist/contracts/miso/recording.d.ts +228 -0
  48. package/dist/contracts/miso/recording.d.ts.map +1 -0
  49. package/dist/contracts/miso/recording.js +221 -0
  50. package/dist/contracts/miso/recording.js.map +1 -0
  51. package/dist/contracts/miso/release.d.ts +280 -0
  52. package/dist/contracts/miso/release.d.ts.map +1 -0
  53. package/dist/contracts/miso/release.js +282 -0
  54. package/dist/contracts/miso/release.js.map +1 -0
  55. package/dist/contracts/miso/track.d.ts +118 -0
  56. package/dist/contracts/miso/track.d.ts.map +1 -0
  57. package/dist/contracts/miso/track.js +118 -0
  58. package/dist/contracts/miso/track.js.map +1 -0
  59. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +24 -0
  60. package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -0
  61. package/dist/contracts/recording_credits/deps/miso_credit/credit.js +23 -0
  62. package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -0
  63. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +37 -0
  64. package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -0
  65. package/dist/contracts/recording_credits/deps/sui/vec_map.js +28 -0
  66. package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -0
  67. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +21 -0
  68. package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -0
  69. package/dist/contracts/recording_credits/deps/sui/vec_set.js +20 -0
  70. package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -0
  71. package/dist/contracts/recording_credits/recording_credits.d.ts +2313 -0
  72. package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -0
  73. package/dist/contracts/recording_credits/recording_credits.js +270 -0
  74. package/dist/contracts/recording_credits/recording_credits.js.map +1 -0
  75. package/dist/contracts/recording_credits/recording_party_role.d.ts +1174 -0
  76. package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -0
  77. package/dist/contracts/recording_credits/recording_party_role.js +692 -0
  78. package/dist/contracts/recording_credits/recording_party_role.js.map +1 -0
  79. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +90 -0
  80. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -0
  81. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +80 -0
  82. package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -0
  83. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +52 -0
  84. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +1 -0
  85. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +37 -0
  86. package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +1 -0
  87. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +46 -0
  88. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -0
  89. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +21 -0
  90. package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -0
  91. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +33 -0
  92. package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -0
  93. package/dist/contracts/release_cover_art/deps/per_track/per_track.js +32 -0
  94. package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -0
  95. package/dist/contracts/release_cover_art/release_cover_art.d.ts +300 -0
  96. package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -0
  97. package/dist/contracts/release_cover_art/release_cover_art.js +168 -0
  98. package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -0
  99. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +24 -0
  100. package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -0
  101. package/dist/contracts/release_credits/deps/miso_credit/credit.js +23 -0
  102. package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -0
  103. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +37 -0
  104. package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -0
  105. package/dist/contracts/release_credits/deps/sui/vec_map.js +28 -0
  106. package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -0
  107. package/dist/contracts/release_credits/release_credits.d.ts +142 -0
  108. package/dist/contracts/release_credits/release_credits.d.ts.map +1 -0
  109. package/dist/contracts/release_credits/release_credits.js +108 -0
  110. package/dist/contracts/release_credits/release_credits.js.map +1 -0
  111. package/dist/contracts/release_credits/release_party_role.d.ts +58 -0
  112. package/dist/contracts/release_credits/release_party_role.d.ts.map +1 -0
  113. package/dist/contracts/release_credits/release_party_role.js +66 -0
  114. package/dist/contracts/release_credits/release_party_role.js.map +1 -0
  115. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +18 -0
  116. package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -0
  117. package/dist/contracts/royalty_pool/deps/std/type_name.js +20 -0
  118. package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -0
  119. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +13 -0
  120. package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -0
  121. package/dist/contracts/royalty_pool/deps/sui/balance.js +15 -0
  122. package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -0
  123. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +37 -0
  124. package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -0
  125. package/dist/contracts/royalty_pool/deps/sui/vec_map.js +28 -0
  126. package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -0
  127. package/dist/contracts/royalty_pool/pool.d.ts +358 -0
  128. package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
  129. package/dist/contracts/royalty_pool/pool.js +352 -0
  130. package/dist/contracts/royalty_pool/pool.js.map +1 -0
  131. package/dist/contracts/royalty_pool/stake.d.ts +202 -0
  132. package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
  133. package/dist/contracts/royalty_pool/stake.js +197 -0
  134. package/dist/contracts/royalty_pool/stake.js.map +1 -0
  135. package/dist/contracts/utils/index.d.ts +31 -0
  136. package/dist/contracts/utils/index.d.ts.map +1 -0
  137. package/dist/contracts/utils/index.js +162 -0
  138. package/dist/contracts/utils/index.js.map +1 -0
  139. package/dist/contracts.d.ts +18 -0
  140. package/dist/contracts.d.ts.map +1 -0
  141. package/dist/contracts.js +26 -0
  142. package/dist/contracts.js.map +1 -0
  143. package/dist/cover.d.ts +48 -0
  144. package/dist/cover.d.ts.map +1 -0
  145. package/dist/cover.js +68 -0
  146. package/dist/cover.js.map +1 -0
  147. package/dist/credits.d.ts +171 -0
  148. package/dist/credits.d.ts.map +1 -0
  149. package/dist/credits.js +360 -0
  150. package/dist/credits.js.map +1 -0
  151. package/dist/execute.d.ts +49 -0
  152. package/dist/execute.d.ts.map +1 -0
  153. package/dist/execute.js +114 -0
  154. package/dist/execute.js.map +1 -0
  155. package/dist/extensions/royalty-pool.d.ts +32 -0
  156. package/dist/extensions/royalty-pool.d.ts.map +1 -0
  157. package/dist/extensions/royalty-pool.js +33 -0
  158. package/dist/extensions/royalty-pool.js.map +1 -0
  159. package/dist/index.d.ts +13 -0
  160. package/dist/index.d.ts.map +1 -0
  161. package/dist/index.js +16 -0
  162. package/dist/index.js.map +1 -0
  163. package/dist/internal.d.ts +20 -0
  164. package/dist/internal.d.ts.map +1 -0
  165. package/dist/internal.js +48 -0
  166. package/dist/internal.js.map +1 -0
  167. package/dist/parsers.d.ts +9 -0
  168. package/dist/parsers.d.ts.map +1 -0
  169. package/dist/parsers.js +52 -0
  170. package/dist/parsers.js.map +1 -0
  171. package/dist/queries.d.ts +105 -0
  172. package/dist/queries.d.ts.map +1 -0
  173. package/dist/queries.js +380 -0
  174. package/dist/queries.js.map +1 -0
  175. package/dist/schemas.d.ts +99 -0
  176. package/dist/schemas.d.ts.map +1 -0
  177. package/dist/schemas.js +76 -0
  178. package/dist/schemas.js.map +1 -0
  179. package/dist/transactions.d.ts +158 -0
  180. package/dist/transactions.d.ts.map +1 -0
  181. package/dist/transactions.js +154 -0
  182. package/dist/transactions.js.map +1 -0
  183. package/dist/types.d.ts +204 -0
  184. package/dist/types.d.ts.map +1 -0
  185. package/dist/types.js +4 -0
  186. package/dist/types.js.map +1 -0
  187. package/dist/view.d.ts +21 -0
  188. package/dist/view.d.ts.map +1 -0
  189. package/dist/view.js +36 -0
  190. package/dist/view.js.map +1 -0
  191. package/package.json +111 -0
  192. package/src/client.ts +278 -0
  193. package/src/contracts/composition_credits/composition_credits.ts +169 -0
  194. package/src/contracts/composition_credits/composition_party_role.ts +189 -0
  195. package/src/contracts/composition_credits/deps/miso_credit/credit.ts +27 -0
  196. package/src/contracts/composition_credits/deps/sui/vec_map.ts +33 -0
  197. package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +135 -0
  198. package/src/contracts/cover_art/cover_art.ts +99 -0
  199. package/src/contracts/cover_art/deps/ori/walrus_data.ts +36 -0
  200. package/src/contracts/miso/composition.ts +343 -0
  201. package/src/contracts/miso/deal.ts +257 -0
  202. package/src/contracts/miso/deps/bps/bps.ts +23 -0
  203. package/src/contracts/miso/recording.ts +298 -0
  204. package/src/contracts/miso/release.ts +392 -0
  205. package/src/contracts/miso/track.ts +153 -0
  206. package/src/contracts/recording_credits/deps/miso_credit/credit.ts +27 -0
  207. package/src/contracts/recording_credits/deps/sui/vec_map.ts +33 -0
  208. package/src/contracts/recording_credits/deps/sui/vec_set.ts +21 -0
  209. package/src/contracts/recording_credits/recording_credits.ts +458 -0
  210. package/src/contracts/recording_credits/recording_party_role.ts +1041 -0
  211. package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +138 -0
  212. package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +36 -0
  213. package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +23 -0
  214. package/src/contracts/release_cover_art/deps/per_track/per_track.ts +36 -0
  215. package/src/contracts/release_cover_art/release_cover_art.ts +251 -0
  216. package/src/contracts/release_credits/deps/miso_credit/credit.ts +27 -0
  217. package/src/contracts/release_credits/deps/sui/vec_map.ts +33 -0
  218. package/src/contracts/release_credits/release_credits.ts +156 -0
  219. package/src/contracts/release_credits/release_party_role.ts +87 -0
  220. package/src/contracts/royalty_pool/deps/std/type_name.ts +22 -0
  221. package/src/contracts/royalty_pool/deps/sui/balance.ts +17 -0
  222. package/src/contracts/royalty_pool/deps/sui/vec_map.ts +33 -0
  223. package/src/contracts/royalty_pool/pool.ts +577 -0
  224. package/src/contracts/royalty_pool/stake.ts +317 -0
  225. package/src/contracts/utils/index.ts +229 -0
  226. package/src/contracts.ts +30 -0
  227. package/src/cover.ts +136 -0
  228. package/src/credits.ts +645 -0
  229. package/src/execute.ts +141 -0
  230. package/src/extensions/royalty-pool.ts +85 -0
  231. package/src/index.ts +17 -0
  232. package/src/internal.ts +85 -0
  233. package/src/parsers.ts +80 -0
  234. package/src/queries.ts +478 -0
  235. package/src/schemas.ts +96 -0
  236. package/src/transactions.ts +290 -0
  237. package/src/types.ts +244 -0
  238. package/src/view.ts +59 -0
@@ -0,0 +1,114 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // Transaction execution + effect extraction (the Signer-parameter pattern).
4
+ //
5
+ // Builders elsewhere only *append* to a caller-owned Transaction; this module is
6
+ // where a transaction is actually submitted. `signAndExecute` submits over the
7
+ // unified Core API, unwraps the `{ $kind: "Transaction", Transaction }` envelope,
8
+ // waits for finality, and returns changed objects, the objectId→type map, balance
9
+ // changes, and net gas for downstream extraction. Everything here is
10
+ // transport-agnostic — it takes any `ClientWithCoreApi`, so gRPC / JSON-RPC /
11
+ // GraphQL clients all work.
12
+ //
13
+ // `executeViaExecutor`, which submitted a non-idempotent PTB through a
14
+ // `ParallelTransactionExecutor` exactly once, moved to `@misofm/sdk` along with
15
+ // its only caller (`share.ts`'s batch currency publishing) — it builds on
16
+ // `buildTx`/`toExecResult`/`FULL_INCLUDE` exported from this module.
17
+ import { Transaction } from "@mysten/sui/transactions";
18
+ /** The effect fields every submit path requests, so extraction is uniform. */
19
+ export const FULL_INCLUDE = { effects: true, objectTypes: true, balanceChanges: true };
20
+ /** Builds a fresh Transaction from one or more thunks (awaiting async ones). */
21
+ export async function buildTx(...thunks) {
22
+ const tx = new Transaction();
23
+ for (const thunk of thunks)
24
+ await thunk(tx);
25
+ return tx;
26
+ }
27
+ /** Normalizes the `{ $kind }` transaction-result envelope into an {@link ExecResult}. */
28
+ export function toExecResult(res) {
29
+ if (res.$kind !== "Transaction") {
30
+ const failed = res.FailedTransaction;
31
+ const status = failed.effects?.status;
32
+ const err = status && !status.success ? JSON.stringify(status.error) : "unknown error";
33
+ throw new Error(`Transaction failed: ${err} (digest ${failed.digest})`);
34
+ }
35
+ const t = res.Transaction;
36
+ const effects = t.effects;
37
+ if (!effects.status.success) {
38
+ throw new Error(`Transaction reverted: ${JSON.stringify(effects.status.error)} (digest ${t.digest})`);
39
+ }
40
+ return {
41
+ digest: t.digest,
42
+ changedObjects: effects.changedObjects,
43
+ objectTypes: t.objectTypes ?? {},
44
+ balanceChanges: t.balanceChanges ?? [],
45
+ gasUsed: netGas(effects.gasUsed),
46
+ };
47
+ }
48
+ /** Signs, executes, and waits for a transaction; returns changes, types, gas. */
49
+ export async function signAndExecute(client, signer, tx) {
50
+ const res = await client.core.signAndExecuteTransaction({ transaction: tx, signer, include: FULL_INCLUDE });
51
+ const result = toExecResult(res);
52
+ await client.core.waitForTransaction({ digest: result.digest });
53
+ return result;
54
+ }
55
+ /** Convenience: build from thunks, then sign+execute in one call. */
56
+ export async function execThunks(client, signer, ...thunks) {
57
+ return signAndExecute(client, signer, await buildTx(...thunks));
58
+ }
59
+ // ── Object-change extractors ────────────────────────────────────────────────
60
+ /** The package id from the (single) newly-published package. */
61
+ export function publishedPackageId(r) {
62
+ const pkg = r.changedObjects.find((c) => c.idOperation === "Created" && c.outputState === "PackageWrite");
63
+ if (!pkg)
64
+ throw new Error("No published package found in object changes.");
65
+ return pkg.objectId;
66
+ }
67
+ /** All package ids newly published by the transaction (up to 5 per PTB). */
68
+ export function allPublishedPackageIds(r) {
69
+ return r.changedObjects
70
+ .filter((c) => c.idOperation === "Created" && c.outputState === "PackageWrite")
71
+ .map((c) => c.objectId);
72
+ }
73
+ /** The first newly-created object whose type contains `substr`. */
74
+ export function createdByType(r, substr) {
75
+ const id = maybeCreatedByType(r, substr);
76
+ if (!id)
77
+ throw new Error(`No created object with type containing "${substr}" found in object changes.`);
78
+ return id;
79
+ }
80
+ /** Like {@link createdByType} but returns undefined instead of throwing. */
81
+ export function maybeCreatedByType(r, substr) {
82
+ for (const c of r.changedObjects) {
83
+ if (c.idOperation === "Created" && (r.objectTypes[c.objectId] ?? "").includes(substr))
84
+ return c.objectId;
85
+ }
86
+ return undefined;
87
+ }
88
+ /** The first newly-created object whose type is EXACTLY `type` (for non-generic types). */
89
+ export function createdByExactType(r, type) {
90
+ for (const c of r.changedObjects) {
91
+ if (c.idOperation === "Created" && r.objectTypes[c.objectId] === type)
92
+ return c.objectId;
93
+ }
94
+ throw new Error(`No created object of exact type "${type}" found in object changes.`);
95
+ }
96
+ /** All newly-created objects whose type contains `substr`. */
97
+ export function allCreatedByType(r, substr) {
98
+ const out = [];
99
+ for (const c of r.changedObjects) {
100
+ const type = r.objectTypes[c.objectId] ?? "";
101
+ if (c.idOperation === "Created" && type.includes(substr))
102
+ out.push({ objectId: c.objectId, objectType: type });
103
+ }
104
+ return out;
105
+ }
106
+ /** The signed balance delta for `address` in `coinType`, or "0" if absent. */
107
+ export function balanceDelta(r, address, coinType) {
108
+ const change = r.balanceChanges.find((b) => b.address === address && b.coinType === coinType);
109
+ return change?.amount ?? "0";
110
+ }
111
+ function netGas(gasUsed) {
112
+ return Number(gasUsed.computationCost) + Number(gasUsed.storageCost) - Number(gasUsed.storageRebate);
113
+ }
114
+ //# sourceMappingURL=execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,4EAA4E;AAC5E,EAAE;AACF,iFAAiF;AACjF,+EAA+E;AAC/E,kFAAkF;AAClF,kFAAkF;AAClF,qEAAqE;AACrE,8EAA8E;AAC9E,4BAA4B;AAC5B,EAAE;AACF,uEAAuE;AACvE,gFAAgF;AAChF,0EAA0E;AAC1E,qEAAqE;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,8E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D;AAC9D,MAAM,UAAU,gBAAgB,CAAC,CAAa,EAAE,MAAc;IAC5D,MAAM,GAAG,GAA+C,EAAE,CAAC;IAC3D,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC7C,IAAI,CAAC,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IACjH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,YAAY,CAAC,CAAa,EAAE,OAAe,EAAE,QAAgB;IAC3E,MAAM,MAAM,GAAG,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;IAC9F,OAAO,MAAM,EAAE,MAAM,IAAI,GAAG,CAAC;AAC/B,CAAC;AAED,SAAS,MAAM,CAAC,OAAsC;IACpD,OAAO,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;AACvG,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
2
+ export interface AttachCompositionRoyaltyPoolParams {
3
+ /** The Composition — an in-PTB `createComposition` result, borrowed `&mut`. */
4
+ composition: TransactionObjectArgument;
5
+ /** The CompositionAdminCap, borrowed `&`. */
6
+ adminCap: TransactionObjectArgument;
7
+ /** The composition's share type (the pool's `Share` phantom = CompositionShare). */
8
+ compositionShareType: string;
9
+ /** Fully-qualified coin type the pool accumulates (the `Currency` phantom). */
10
+ currency: string;
11
+ compositionRoyaltyPoolPackageId: string;
12
+ royaltyPoolPackageId: string;
13
+ }
14
+ /** Creates a royalty pool for a composition and shares it, appending to `tx`. */
15
+ export declare function attachCompositionRoyaltyPool(tx: Transaction, params: AttachCompositionRoyaltyPoolParams): void;
16
+ export interface AttachRecordingRoyaltyPoolParams {
17
+ /** The Recording — an in-PTB `createRecording` result, borrowed `&mut`. */
18
+ recording: TransactionObjectArgument;
19
+ /** The RecordingAdminCap, borrowed `&`. */
20
+ adminCap: TransactionObjectArgument;
21
+ /** The recording's own share type (the pool's `Share` phantom = RecordingShare). */
22
+ recordingShareType: string;
23
+ /** The parent composition's share type (the recording's `CompositionShare` phantom). */
24
+ compositionShareType: string;
25
+ /** Fully-qualified coin type the pool accumulates (the `Currency` phantom). */
26
+ currency: string;
27
+ recordingRoyaltyPoolPackageId: string;
28
+ royaltyPoolPackageId: string;
29
+ }
30
+ /** Creates a royalty pool for a recording and shares it, appending to `tx`. */
31
+ export declare function attachRecordingRoyaltyPool(tx: Transaction, params: AttachRecordingRoyaltyPoolParams): void;
32
+ //# sourceMappingURL=royalty-pool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"royalty-pool.d.ts","sourceRoot":"","sources":["../../src/extensions/royalty-pool.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAKvF,MAAM,WAAW,kCAAkC;IACjD,+EAA+E;IAC/E,WAAW,EAAE,yBAAyB,CAAC;IACvC,6CAA6C;IAC7C,QAAQ,EAAE,yBAAyB,CAAC;IACpC,oFAAoF;IACpF,oBAAoB,EAAE,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,+BAA+B,EAAE,MAAM,CAAC;IACxC,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,iFAAiF;AACjF,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,kCAAkC,GAAG,IAAI,CAe9G;AAED,MAAM,WAAW,gCAAgC;IAC/C,2EAA2E;IAC3E,SAAS,EAAE,yBAAyB,CAAC;IACrC,2CAA2C;IAC3C,QAAQ,EAAE,yBAAyB,CAAC;IACpC,oFAAoF;IACpF,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wFAAwF;IACxF,oBAAoB,EAAE,MAAM,CAAC;IAC7B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;IACjB,6BAA6B,EAAE,MAAM,CAAC;IACtC,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,+EAA+E;AAC/E,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,gCAAgC,GAAG,IAAI,CAgB1G"}
@@ -0,0 +1,33 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import * as compositionRoyaltyPool from "../contracts/composition_royalty_pool/composition_royalty_pool.js";
4
+ import * as recordingRoyaltyPool from "../contracts/recording_royalty_pool/recording_royalty_pool.js";
5
+ import * as pool from "../contracts/royalty_pool/pool.js";
6
+ /** Creates a royalty pool for a composition and shares it, appending to `tx`. */
7
+ export function attachCompositionRoyaltyPool(tx, params) {
8
+ const created = tx.add(compositionRoyaltyPool.initializePool({
9
+ package: params.compositionRoyaltyPoolPackageId,
10
+ typeArguments: [params.compositionShareType, params.currency],
11
+ arguments: [params.composition, params.adminCap],
12
+ }));
13
+ tx.add(pool.share({
14
+ package: params.royaltyPoolPackageId,
15
+ typeArguments: [params.compositionShareType, params.currency],
16
+ arguments: [created],
17
+ }));
18
+ }
19
+ /** Creates a royalty pool for a recording and shares it, appending to `tx`. */
20
+ export function attachRecordingRoyaltyPool(tx, params) {
21
+ const created = tx.add(recordingRoyaltyPool.initializePool({
22
+ package: params.recordingRoyaltyPoolPackageId,
23
+ typeArguments: [params.recordingShareType, params.compositionShareType, params.currency],
24
+ arguments: [params.recording, params.adminCap],
25
+ }));
26
+ // The pool is RoyaltyPool<RecordingShare, Currency> — Share is the recording's own share type.
27
+ tx.add(pool.share({
28
+ package: params.royaltyPoolPackageId,
29
+ typeArguments: [params.recordingShareType, params.currency],
30
+ arguments: [created],
31
+ }));
32
+ }
33
+ //# sourceMappingURL=royalty-pool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"royalty-pool.js","sourceRoot":"","sources":["../../src/extensions/royalty-pool.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAgBtC,OAAO,KAAK,sBAAsB,MAAM,mEAAmE,CAAC;AAC5G,OAAO,KAAK,oBAAoB,MAAM,+DAA+D,CAAC;AACtG,OAAO,KAAK,IAAI,MAAM,mCAAmC,CAAC;AAe1D,iFAAiF;AACjF,MAAM,UAAU,4BAA4B,CAAC,EAAe,EAAE,MAA0C;IACtG,MAAM,OAAO,GAAG,EAAE,CAAC,GAAG,CACpB,sBAAsB,CAAC,cAAc,CAAC;QACpC,OAAO,EAAE,MAAM,CAAC,+BAA+B;QAC/C,aAAa,EAAE,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC7D,SAAS,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC;KACjD,CAAC,CACH,CAAC;IACF,EAAE,CAAC,GAAG,CACJ,IAAI,CAAC,KAAK,CAAC;QACT,OAAO,EAAE,MAAM,CAAC,oBAAoB;QACpC,aAAa,EAAE,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC7D,SAAS,EAAE,CAAC,OAAO,CAAC;KACrB,CAAC,CACH,CAAC;AACJ,CAAC;AAiBD,+EAA+E;AAC/E,MAAM,UAAU,0BAA0B,CAAC,EAAe,EAAE,MAAwC;IAClG,MAAM,OAAO,GAAG,EAAE,CAAC,GAAG,CACpB,oBAAoB,CAAC,cAAc,CAAC;QAClC,OAAO,EAAE,MAAM,CAAC,6BAA6B;QAC7C,aAAa,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,QAAQ,CAAC;QACxF,SAAS,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC;KAC/C,CAAC,CACH,CAAC;IACF,+FAA+F;IAC/F,EAAE,CAAC,GAAG,CACJ,IAAI,CAAC,KAAK,CAAC;QACT,OAAO,EAAE,MAAM,CAAC,oBAAoB;QACpC,aAAa,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,QAAQ,CAAC;QAC3D,SAAS,EAAE,CAAC,OAAO,CAAC;KACrB,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ export * from "./types.ts";
2
+ export * from "./schemas.ts";
3
+ export * from "./transactions.ts";
4
+ export * from "./execute.ts";
5
+ export * from "./extensions/royalty-pool.ts";
6
+ export * from "./queries.ts";
7
+ export * from "./parsers.ts";
8
+ export * from "./view.ts";
9
+ export * from "./client.ts";
10
+ export * as contracts from "./contracts.ts";
11
+ export * from "./cover.ts";
12
+ export * from "./credits.ts";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAG5B,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ export * from "./types.js";
4
+ export * from "./schemas.js";
5
+ export * from "./transactions.js";
6
+ export * from "./execute.js";
7
+ export * from "./extensions/royalty-pool.js";
8
+ export * from "./queries.js";
9
+ export * from "./parsers.js";
10
+ export * from "./view.js";
11
+ export * from "./client.js";
12
+ // Generated, ABI-bound bindings (BCS structs + type-safe Move calls).
13
+ export * as contracts from "./contracts.js";
14
+ export * from "./cover.js";
15
+ export * from "./credits.js";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAE5B,sEAAsE;AACtE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { BPS, Composition, Recording, Release as ReleaseType, Track } from "./types.ts";
2
+ /** `0x1::option::none` / `0x1::option::some` moveCall targets. */
3
+ export declare const OPTION_NONE = "0x1::option::none";
4
+ export declare const OPTION_SOME = "0x1::option::some";
5
+ type Parsed = any;
6
+ /** `BPS` is a Move tuple struct `(u16)`, parsed as `[number]`. */
7
+ export declare function mapBps(d: Parsed): BPS;
8
+ /** Lifecycle state enum (`Initialized | Published(u64)`). */
9
+ export declare function mapState(d: Parsed): {
10
+ type: "Initialized";
11
+ } | {
12
+ type: "Published";
13
+ timestampMs: number;
14
+ };
15
+ export declare function mapComposition(id: string, d: Parsed): Composition;
16
+ export declare function mapRecording(id: string, d: Parsed): Recording;
17
+ export declare function mapTrack(d: Parsed): Track;
18
+ export declare function mapRelease(id: string, d: Parsed): ReleaseType;
19
+ export {};
20
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,IAAI,WAAW,EACtB,KAAK,EAEN,MAAM,YAAY,CAAC;AAIpB,kEAAkE;AAClE,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAC/C,eAAO,MAAM,WAAW,sBAAsB,CAAC;AAK/C,KAAK,MAAM,GAAG,GAAG,CAAC;AAIlB,kEAAkE;AAClE,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAErC;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,GACR;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAGtE;AAID,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,CAOjE;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAK7D;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,KAAK,CAMzC;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,CAO7D"}
@@ -0,0 +1,48 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // === PTB building blocks ===
4
+ /** `0x1::option::none` / `0x1::option::some` moveCall targets. */
5
+ export const OPTION_NONE = "0x1::option::none";
6
+ export const OPTION_SOME = "0x1::option::some";
7
+ // === Primitives ===
8
+ /** `BPS` is a Move tuple struct `(u16)`, parsed as `[number]`. */
9
+ export function mapBps(d) {
10
+ return { value: Number(Array.isArray(d) ? d[0] : d) };
11
+ }
12
+ /** Lifecycle state enum (`Initialized | Published(u64)`). */
13
+ export function mapState(d) {
14
+ if (d?.$kind === "Published")
15
+ return { type: "Published", timestampMs: Number(d.Published) };
16
+ return { type: "Initialized" };
17
+ }
18
+ // === Objects ===
19
+ export function mapComposition(id, d) {
20
+ return {
21
+ id,
22
+ state: mapState(d.state),
23
+ title: d.title,
24
+ royaltyRate: mapBps(d.royalty_rate),
25
+ };
26
+ }
27
+ export function mapRecording(id, d) {
28
+ return {
29
+ id,
30
+ state: mapState(d.state),
31
+ };
32
+ }
33
+ export function mapTrack(d) {
34
+ return {
35
+ state: (d.state?.$kind ?? "Unassigned"),
36
+ recordingId: d.recording_id,
37
+ splitBps: mapBps(d.split_bps),
38
+ };
39
+ }
40
+ export function mapRelease(id, d) {
41
+ return {
42
+ id,
43
+ state: mapState(d.state),
44
+ title: d.title,
45
+ tracks: (d.tracks ?? []).map(mapTrack),
46
+ };
47
+ }
48
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAwBtC,8BAA8B;AAE9B,kEAAkE;AAClE,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAC/C,MAAM,CAAC,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAO/C,qBAAqB;AAErB,kEAAkE;AAClE,MAAM,UAAU,MAAM,CAAC,CAAS;IAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,C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,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { CompositionPublishedEvent, CompositionRoyaltySetEvent, RecordingPublishedEvent, ReleasePublishedEvent, DealCreatedEvent, DealAcceptedEvent, DealRejectedEvent } from "./types.ts";
2
+ export declare function parseCompositionPublishedEvent(bytes: Uint8Array): CompositionPublishedEvent;
3
+ export declare function parseCompositionRoyaltySetEvent(bytes: Uint8Array): CompositionRoyaltySetEvent;
4
+ export declare function parseRecordingPublishedEvent(bytes: Uint8Array): RecordingPublishedEvent;
5
+ export declare function parseReleasePublishedEvent(bytes: Uint8Array): ReleasePublishedEvent;
6
+ export declare function parseDealCreatedEvent(bytes: Uint8Array): DealCreatedEvent;
7
+ export declare function parseDealAcceptedEvent(bytes: Uint8Array): DealAcceptedEvent;
8
+ export declare function parseDealRejectedEvent(bytes: Uint8Array): DealRejectedEvent;
9
+ //# sourceMappingURL=parsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.d.ts","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAIpB,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,UAAU,GAAG,yBAAyB,CAG3F;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,UAAU,GAAG,0BAA0B,CAG7F;AAID,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,uBAAuB,CAGvF;AAID,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,UAAU,GAAG,qBAAqB,CAGnF;AAID,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,gBAAgB,CAOzE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAM3E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,CAM3E"}
@@ -0,0 +1,52 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // Event parsers. The BCS layouts come from the codegen-generated structs (so
4
+ // they track the on-chain ABI automatically); these functions parse raw event
5
+ // bytes and map them to the public camelCase event types.
6
+ import { CompositionPublishedEvent as CompositionPublishedEventBcs, CompositionRoyaltySetEvent as CompositionRoyaltySetEventBcs, } from "./contracts/miso/composition.js";
7
+ import { RecordingPublishedEvent as RecordingPublishedEventBcs } from "./contracts/miso/recording.js";
8
+ import { ReleasePublishedEvent as ReleasePublishedEventBcs } from "./contracts/miso/release.js";
9
+ import { DealCreatedEvent as DealCreatedEventBcs, DealAcceptedEvent as DealAcceptedEventBcs, DealRejectedEvent as DealRejectedEventBcs, } from "./contracts/miso/deal.js";
10
+ // === Composition ===
11
+ export function parseCompositionPublishedEvent(bytes) {
12
+ const e = CompositionPublishedEventBcs.parse(bytes);
13
+ return { compositionId: e.composition_id };
14
+ }
15
+ export function parseCompositionRoyaltySetEvent(bytes) {
16
+ const e = CompositionRoyaltySetEventBcs.parse(bytes);
17
+ return { royaltyRateBps: e.royalty_rate_bps };
18
+ }
19
+ // === Recording ===
20
+ export function parseRecordingPublishedEvent(bytes) {
21
+ const e = RecordingPublishedEventBcs.parse(bytes);
22
+ return { recordingId: e.recording_id };
23
+ }
24
+ // === Release ===
25
+ export function parseReleasePublishedEvent(bytes) {
26
+ const e = ReleasePublishedEventBcs.parse(bytes);
27
+ return { releaseId: e.release_id };
28
+ }
29
+ // === Deal ===
30
+ export function parseDealCreatedEvent(bytes) {
31
+ const e = DealCreatedEventBcs.parse(bytes);
32
+ return {
33
+ dealId: e.deal_id,
34
+ releaseId: e.release_id,
35
+ trackSplitBps: { value: e.track_split_bps_value },
36
+ };
37
+ }
38
+ export function parseDealAcceptedEvent(bytes) {
39
+ const e = DealAcceptedEventBcs.parse(bytes);
40
+ return {
41
+ dealId: e.deal_id,
42
+ releaseId: e.release_id,
43
+ };
44
+ }
45
+ export function parseDealRejectedEvent(bytes) {
46
+ const e = DealRejectedEventBcs.parse(bytes);
47
+ return {
48
+ dealId: e.deal_id,
49
+ releaseId: e.release_id,
50
+ };
51
+ }
52
+ //# sourceMappingURL=parsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parsers.js","sourceRoot":"","sources":["../src/parsers.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,6EAA6E;AAC7E,8EAA8E;AAC9E,0DAA0D;AAE1D,OAAO,EACL,yBAAyB,IAAI,4BAA4B,EACzD,0BAA0B,IAAI,6BAA6B,GAC5D,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,uBAAuB,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAE,qBAAqB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EACL,gBAAgB,IAAI,mBAAmB,EACvC,iBAAiB,IAAI,oBAAoB,EACzC,iBAAiB,IAAI,oBAAoB,GAC1C,MAAM,0BAA0B,CAAC;AAWlC,sBAAsB;AAEtB,MAAM,UAAU,8BAA8B,CAAC,KAAiB;IAC9D,MAAM,CAAC,GAAG,4BAA4B,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,KAAiB;IAC/D,MAAM,CAAC,GAAG,6BAA6B,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrD,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAChD,CAAC;AAED,oBAAoB;AAEpB,MAAM,UAAU,4BAA4B,CAAC,KAAiB;IAC5D,MAAM,CAAC,GAAG,0BAA0B,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClD,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC;AACzC,CAAC;AAED,kBAAkB;AAElB,MAAM,UAAU,0BAA0B,CAAC,KAAiB;IAC1D,MAAM,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;AACrC,CAAC;AAED,eAAe;AAEf,MAAM,UAAU,qBAAqB,CAAC,KAAiB;IACrD,MAAM,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3C,OAAO;QACL,MAAM,EAAE,CAAC,CAAC,OAAO;QACjB,SAAS,EAAE,CAAC,CAAC,UAAU;QACvB,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,qBAAqB,EAAE;KAClD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAAiB;IACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5C,OAAO;QACL,MAAM,EAAE,CAAC,CAAC,OAAO;QACjB,SAAS,EAAE,CAAC,CAAC,UAAU;KACxB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAAiB;IACtD,MAAM,CAAC,GAAG,oBAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5C,OAAO;QACL,MAAM,EAAE,CAAC,CAAC,OAAO;QACjB,SAAS,EAAE,CAAC,CAAC,UAAU;KACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,105 @@
1
+ import type { ClientWithCoreApi } from "@mysten/sui/client";
2
+ import type { SuiGraphQLClient } from "@mysten/sui/graphql";
3
+ import type { Composition, CompositionAdminCap, Deal, Recording, RecordingAdminCap, Release, ReleaseAdminCap } from "./types.ts";
4
+ /**
5
+ * Extracts the type parameter `T` from `package::module::Type<T>`. For multi-
6
+ * parameter types this returns everything between the outer angle brackets —
7
+ * use {@link extractTypeParams2} to split two top-level parameters.
8
+ */
9
+ export declare function extractTypeParam(objectType: string): string;
10
+ /** Splits the two top-level type parameters of `pkg::mod::Type<A, B>`. */
11
+ export declare function extractTypeParams2(objectType: string): [string, string];
12
+ /**
13
+ * True when `e` is a "this object does not exist" error from any of the Sui
14
+ * client transports, so null-returning readers can distinguish absence from
15
+ * transport failure. Matches, in order of preference:
16
+ *
17
+ * 1. Structured `ObjectError.code` values thrown by the JSON-RPC core client
18
+ * (`notExists`, `deleted`, `dynamicFieldNotFound`) and the GraphQL core
19
+ * client (`notFound`). The class itself is not exported by `@mysten/sui`,
20
+ * so we duck-type on `code`.
21
+ * 2. The message shapes those clients (and the gRPC core client, which wraps
22
+ * the server's per-object status message in a plain `Error`) produce:
23
+ * "Object 0x… does not exist" / "Object 0x… not found" / "Object 0x… has
24
+ * been deleted" / "Dynamic field not found for object 0x…" / "No object
25
+ * found for id 0x…".
26
+ *
27
+ * Transport/protocol errors must NOT match: every message pattern requires
28
+ * object-ish context ("object" / "dynamic field"), so e.g. a JSON-RPC
29
+ * "Method not found" or a gRPC "peer not found" is never treated as a missing
30
+ * object and propagates to the caller.
31
+ */
32
+ export declare function isNotFound(e: unknown): boolean;
33
+ /** Fetches multiple compositions by ID in one Core request. */
34
+ export declare function getCompositionsByIds(client: ClientWithCoreApi, compositionIds: string[]): Promise<Record<string, Composition>>;
35
+ /** Fetches a composition by its object ID. */
36
+ export declare function getCompositionById(client: ClientWithCoreApi, compositionId: string): Promise<Composition>;
37
+ /** Extracts the share type `T` from a `Composition<T>` object. */
38
+ export declare function getCompositionShareType(client: ClientWithCoreApi, compositionId: string): Promise<string>;
39
+ /** Fetches a composition by its share type (GraphQL discovery + Core read). */
40
+ export declare function getCompositionByShareType(client: ClientWithCoreApi, graphqlClient: SuiGraphQLClient, shareType: string, misoPackageId: string): Promise<Composition>;
41
+ export declare function getCompositionAdminCapById(client: ClientWithCoreApi, adminCapId: string): Promise<CompositionAdminCap>;
42
+ /**
43
+ * Composition admin caps owned by `owner`.
44
+ *
45
+ * Core API (no GraphQL): `listOwnedObjects` takes a type filter and returns each
46
+ * object's instantiated `type`, so the share type is read straight off
47
+ * `CompositionAdminCap<CompositionShare>` with no second round-trip.
48
+ */
49
+ export declare function getOwnedCompositionAdminCaps(client: ClientWithCoreApi, owner: string, misoPackageId: string): Promise<CompositionAdminCap[]>;
50
+ export declare function deriveCompositionAdminCapId(compositionId: string, misoPackageId: string): string;
51
+ export declare function getRecordingsByIds(client: ClientWithCoreApi, recordingIds: string[]): Promise<Record<string, Recording>>;
52
+ export declare function getRecordingById(client: ClientWithCoreApi, recordingId: string): Promise<Recording>;
53
+ /**
54
+ * The recording's OWN share type (`RecordingShare`). `Recording` is generic over
55
+ * two phantoms — `Recording<RecordingShare, CompositionShare>` — so this splits
56
+ * them and returns the first; use {@link getRecordingShareTypes} when the
57
+ * parent composition's share type is needed too.
58
+ */
59
+ export declare function getRecordingShareType(client: ClientWithCoreApi, recordingId: string): Promise<string>;
60
+ /**
61
+ * Both of a recording's share types, as `[RecordingShare, CompositionShare]`.
62
+ * Most builders need the pair — `deal::new`, `track::new`, `recording::publish`
63
+ * and the recording credit/pool extensions are all generic over both, in this
64
+ * order.
65
+ */
66
+ export declare function getRecordingShareTypes(client: ClientWithCoreApi, recordingId: string): Promise<[string, string]>;
67
+ export declare function getRecordingByShareType(client: ClientWithCoreApi, graphqlClient: SuiGraphQLClient, shareType: string, misoPackageId: string): Promise<Recording>;
68
+ export declare function getRecordingAdminCapById(client: ClientWithCoreApi, adminCapId: string): Promise<RecordingAdminCap>;
69
+ /**
70
+ * Recording admin caps owned by `owner`.
71
+ *
72
+ * Core API (no GraphQL), same shape as {@link getOwnedCompositionAdminCaps}.
73
+ * Note `RecordingAdminCap<phantom RecordingShare>` is deliberately single-param,
74
+ * so this yields only the recording's own share type — its parent composition's
75
+ * share type is not recoverable from the cap alone.
76
+ */
77
+ export declare function getOwnedRecordingAdminCaps(client: ClientWithCoreApi, owner: string, misoPackageId: string): Promise<RecordingAdminCap[]>;
78
+ export declare function deriveRecordingAdminCapId(recordingId: string, misoPackageId: string): string;
79
+ /** Fetches a deal by its object ID (share types read from the type parameters). */
80
+ export declare function getDealById(client: ClientWithCoreApi, dealId: string): Promise<Deal>;
81
+ export declare function getReleasesByIds(client: ClientWithCoreApi, releaseIds: string[]): Promise<Record<string, Release>>;
82
+ export declare function getReleaseById(client: ClientWithCoreApi, releaseId: string): Promise<Release>;
83
+ export declare function getReleaseRegistry(client: SuiGraphQLClient, misoPackageId: string): Promise<string>;
84
+ export declare function getReleaseAdminCapById(client: ClientWithCoreApi, adminCapId: string): Promise<ReleaseAdminCap>;
85
+ export declare function getOwnedReleaseAdminCaps(client: ClientWithCoreApi, owner: string, misoPackageId: string): Promise<ReleaseAdminCap[]>;
86
+ export declare function deriveReleaseAdminCapId(releaseId: string, misoPackageId: string): string;
87
+ /** Extracts the share type `T` from a `Currency<T>` object. */
88
+ export declare function getShareCurrencyType(client: ClientWithCoreApi, shareCurrencyId: string): Promise<string>;
89
+ /**
90
+ * Finds the `TreasuryCap<ShareType>` owned by `owner`. One Core API call.
91
+ *
92
+ * Takes the share TYPE, not the `Currency` object id, because callers almost
93
+ * always have it already — it is {@link ShareCurrencyBinding.shareType},
94
+ * threaded through every builder. Taking the object id instead would force a
95
+ * `getObject` purely to read the type parameter back off the tag, a round trip
96
+ * the caller already paid for. If you genuinely hold only the currency id,
97
+ * compose the two:
98
+ *
99
+ * ```ts
100
+ * const shareType = await getShareCurrencyType(client, shareCurrencyId);
101
+ * const capId = await getShareCurrencyTreasuryCap(client, shareType, owner);
102
+ * ```
103
+ */
104
+ export declare function getShareCurrencyTreasuryCap(client: ClientWithCoreApi, shareType: string, owner: string): Promise<string>;
105
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,iBAAiB,EAA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