@misofm/musicos 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +90 -13
  2. package/dist/client.d.ts +27 -26
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +58 -51
  5. package/dist/client.js.map +1 -1
  6. package/dist/deployments.d.ts +9 -0
  7. package/dist/deployments.d.ts.map +1 -1
  8. package/dist/deployments.js +14 -0
  9. package/dist/deployments.js.map +1 -1
  10. package/dist/errors.d.ts +10 -0
  11. package/dist/errors.d.ts.map +1 -0
  12. package/dist/errors.js +17 -0
  13. package/dist/errors.js.map +1 -0
  14. package/dist/events.d.ts +6 -1
  15. package/dist/events.d.ts.map +1 -1
  16. package/dist/events.js +0 -5
  17. package/dist/events.js.map +1 -1
  18. package/dist/execute.d.ts +1 -48
  19. package/dist/execute.d.ts.map +1 -1
  20. package/dist/execute.js +5 -106
  21. package/dist/execute.js.map +1 -1
  22. package/dist/internal.d.ts +45 -6
  23. package/dist/internal.d.ts.map +1 -1
  24. package/dist/internal.js.map +1 -1
  25. package/dist/queries.d.ts +38 -62
  26. package/dist/queries.d.ts.map +1 -1
  27. package/dist/queries.js +240 -266
  28. package/dist/queries.js.map +1 -1
  29. package/dist/transactions.d.ts +2 -1
  30. package/dist/transactions.d.ts.map +1 -1
  31. package/dist/transactions.js.map +1 -1
  32. package/dist/types.d.ts +129 -79
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/types.js +169 -1
  35. package/dist/types.js.map +1 -1
  36. package/dist/view.d.ts +3 -2
  37. package/dist/view.d.ts.map +1 -1
  38. package/dist/view.js +19 -6
  39. package/dist/view.js.map +1 -1
  40. package/package.json +8 -1
  41. package/src/client.ts +78 -98
  42. package/src/deployments.ts +15 -0
  43. package/src/errors.ts +30 -0
  44. package/src/events.ts +1 -1
  45. package/src/execute.ts +5 -133
  46. package/src/internal.ts +17 -23
  47. package/src/queries.ts +386 -424
  48. package/src/transactions.ts +2 -1
  49. package/src/types.ts +59 -48
  50. package/src/view.ts +23 -9
package/dist/events.js CHANGED
@@ -1,10 +1,5 @@
1
1
  // Copyright (c) Miso Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- /**
4
- * BCS decoders for object-model execution events outside the legacy core
5
- * convenience parsers. Each decoder preserves the generated Move field names
6
- * and nested layouts exactly, which is the safe indexer boundary.
7
- */
8
3
  import * as release from "./contracts/musicos/release.js";
9
4
  /** Decode raw event BCS with the corresponding generated codec. */
10
5
  export function decodeEvent(codec, bytes) {
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC;;;;GAIG;AAEH,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAG1D,mEAAmE;AACnE,MAAM,UAAU,WAAW,CAAI,KAAmB,EAAE,KAAiB;IACnE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,OAAO,CAAI,KAAmB;IACrC,OAAO,CAAC,KAAiB,EAAK,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE;QACJ,sBAAsB,EAAE,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC;KACrE;CACO,CAAC"}
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAStC,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D,mEAAmE;AACnE,MAAM,UAAU,WAAW,CAAI,KAAmB,EAAE,KAAiB;IACnE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,OAAO,CAAI,KAAmB;IACrC,OAAO,CAAC,KAAiB,EAAK,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE;QACJ,sBAAsB,EAAE,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC;KACrE;CACO,CAAC"}
package/dist/execute.d.ts CHANGED
@@ -1,49 +1,2 @@
1
- import { Transaction } from "@mysten/sui/transactions";
2
- import type { ClientWithCoreApi, SuiClientTypes } from "@mysten/sui/client";
3
- import type { Signer } from "@mysten/sui/cryptography";
4
- import type { TxThunk } from "./transactions.ts";
5
- /** The effect fields every submit path requests, so extraction is uniform. */
6
- export declare const FULL_INCLUDE: {
7
- readonly effects: true;
8
- readonly objectTypes: true;
9
- readonly balanceChanges: true;
10
- };
11
- type FullInclude = typeof FULL_INCLUDE;
12
- export interface ExecResult {
13
- digest: string;
14
- /** Objects created/mutated/deleted by the transaction. */
15
- changedObjects: SuiClientTypes.ChangedObject[];
16
- /** Map of changed objectId → fully-qualified type. */
17
- objectTypes: Record<string, string>;
18
- /** Net coin balance deltas by address. */
19
- balanceChanges: SuiClientTypes.BalanceChange[];
20
- /** Net gas cost in MIST (computation + storage − rebate). */
21
- gasUsed: number;
22
- }
23
- /** Builds a fresh Transaction from one or more thunks (awaiting async ones). */
24
- export declare function buildTx(...thunks: TxThunk[]): Promise<Transaction>;
25
- /** Normalizes the `{ $kind }` transaction-result envelope into an {@link ExecResult}. */
26
- export declare function toExecResult(res: SuiClientTypes.TransactionResult<FullInclude>): ExecResult;
27
- /** Signs, executes, and waits for a transaction; returns changes, types, gas. */
28
- export declare function signAndExecute(client: ClientWithCoreApi, signer: Signer, tx: Transaction): Promise<ExecResult>;
29
- /** Convenience: build from thunks, then sign+execute in one call. */
30
- export declare function execThunks(client: ClientWithCoreApi, signer: Signer, ...thunks: TxThunk[]): Promise<ExecResult>;
31
- /** The package id from the (single) newly-published package. */
32
- export declare function publishedPackageId(r: ExecResult): string;
33
- /** All package ids newly published by the transaction (up to 5 per PTB). */
34
- export declare function allPublishedPackageIds(r: ExecResult): string[];
35
- /** The first newly-created object whose type contains `substr`. */
36
- export declare function createdByType(r: ExecResult, substr: string): string;
37
- /** Like {@link createdByType} but returns undefined instead of throwing. */
38
- export declare function maybeCreatedByType(r: ExecResult, substr: string): string | undefined;
39
- /** The first newly-created object whose type is EXACTLY `type` (for non-generic types). */
40
- export declare function createdByExactType(r: ExecResult, type: string): string;
41
- /** All newly-created objects whose type contains `substr`. */
42
- export declare function allCreatedByType(r: ExecResult, substr: string): {
43
- objectId: string;
44
- objectType: string;
45
- }[];
46
- /** The signed balance delta for `address` in `coinType`, or "0" if absent. */
47
- export declare function balanceDelta(r: ExecResult, address: string, coinType: string): string;
48
- export {};
1
+ export * from "@misofm/effect/execute";
49
2
  //# sourceMappingURL=execute.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,8EAA8E;AAC9E,eAAO,MAAM,YAAY;aAAK,OAAO;aAAQ,WAAW;aAAQ,cAAc;CAAiB,CAAC;AAChG,KAAK,WAAW,GAAG,OAAO,YAAY,CAAC;AAEvC,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,cAAc,EAAE,cAAc,CAAC,aAAa,EAAE,CAAC;IAC/C,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC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AM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EAAE,CAO1G;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGrF"}
1
+ {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAQA,cAAc,wBAAwB,CAAC"}
package/dist/execute.js CHANGED
@@ -1,110 +1,9 @@
1
1
  // Copyright (c) Miso Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
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
- import { Transaction } from "@mysten/sui/transactions";
14
- /** The effect fields every submit path requests, so extraction is uniform. */
15
- export const FULL_INCLUDE = { effects: true, objectTypes: true, balanceChanges: true };
16
- /** Builds a fresh Transaction from one or more thunks (awaiting async ones). */
17
- export async function buildTx(...thunks) {
18
- const tx = new Transaction();
19
- for (const thunk of thunks)
20
- await thunk(tx);
21
- return tx;
22
- }
23
- /** Normalizes the `{ $kind }` transaction-result envelope into an {@link ExecResult}. */
24
- export function toExecResult(res) {
25
- if (res.$kind !== "Transaction") {
26
- const failed = res.FailedTransaction;
27
- const status = failed.effects?.status;
28
- const err = status && !status.success ? JSON.stringify(status.error) : "unknown error";
29
- throw new Error(`Transaction failed: ${err} (digest ${failed.digest})`);
30
- }
31
- const t = res.Transaction;
32
- const effects = t.effects;
33
- if (!effects.status.success) {
34
- throw new Error(`Transaction reverted: ${JSON.stringify(effects.status.error)} (digest ${t.digest})`);
35
- }
36
- return {
37
- digest: t.digest,
38
- changedObjects: effects.changedObjects,
39
- objectTypes: t.objectTypes ?? {},
40
- balanceChanges: t.balanceChanges ?? [],
41
- gasUsed: netGas(effects.gasUsed),
42
- };
43
- }
44
- /** Signs, executes, and waits for a transaction; returns changes, types, gas. */
45
- export async function signAndExecute(client, signer, tx) {
46
- const res = await client.core.signAndExecuteTransaction({ transaction: tx, signer, include: FULL_INCLUDE });
47
- const result = toExecResult(res);
48
- await client.core.waitForTransaction({ digest: result.digest });
49
- return result;
50
- }
51
- /** Convenience: build from thunks, then sign+execute in one call. */
52
- export async function execThunks(client, signer, ...thunks) {
53
- return signAndExecute(client, signer, await buildTx(...thunks));
54
- }
55
- // ── Object-change extractors ────────────────────────────────────────────────
56
- /** The package id from the (single) newly-published package. */
57
- export function publishedPackageId(r) {
58
- const pkg = r.changedObjects.find((c) => c.idOperation === "Created" && c.outputState === "PackageWrite");
59
- if (!pkg)
60
- throw new Error("No published package found in object changes.");
61
- return pkg.objectId;
62
- }
63
- /** All package ids newly published by the transaction (up to 5 per PTB). */
64
- export function allPublishedPackageIds(r) {
65
- return r.changedObjects
66
- .filter((c) => c.idOperation === "Created" && c.outputState === "PackageWrite")
67
- .map((c) => c.objectId);
68
- }
69
- /** The first newly-created object whose type contains `substr`. */
70
- export function createdByType(r, substr) {
71
- const id = maybeCreatedByType(r, substr);
72
- if (!id)
73
- throw new Error(`No created object with type containing "${substr}" found in object changes.`);
74
- return id;
75
- }
76
- /** Like {@link createdByType} but returns undefined instead of throwing. */
77
- export function maybeCreatedByType(r, substr) {
78
- for (const c of r.changedObjects) {
79
- if (c.idOperation === "Created" && (r.objectTypes[c.objectId] ?? "").includes(substr))
80
- return c.objectId;
81
- }
82
- return undefined;
83
- }
84
- /** The first newly-created object whose type is EXACTLY `type` (for non-generic types). */
85
- export function createdByExactType(r, type) {
86
- for (const c of r.changedObjects) {
87
- if (c.idOperation === "Created" && r.objectTypes[c.objectId] === type)
88
- return c.objectId;
89
- }
90
- throw new Error(`No created object of exact type "${type}" found in object changes.`);
91
- }
92
- /** All newly-created objects whose type contains `substr`. */
93
- export function allCreatedByType(r, substr) {
94
- const out = [];
95
- for (const c of r.changedObjects) {
96
- const type = r.objectTypes[c.objectId] ?? "";
97
- if (c.idOperation === "Created" && type.includes(substr))
98
- out.push({ objectId: c.objectId, objectType: type });
99
- }
100
- return out;
101
- }
102
- /** The signed balance delta for `address` in `coinType`, or "0" if absent. */
103
- export function balanceDelta(r, address, coinType) {
104
- const change = r.balanceChanges.find((b) => b.address === address && b.coinType === coinType);
105
- return change?.amount ?? "0";
106
- }
107
- function netGas(gasUsed) {
108
- return Number(gasUsed.computationCost) + Number(gasUsed.storageCost) - Number(gasUsed.storageRebate);
109
- }
4
+ // This module is a thin re-export of `@misofm/effect/execute` so the
5
+ // `@misofm/musicos/execute` subpath keeps resolving for existing callers
6
+ // the implementation is transport-agnostic and shared across every `@misofm/*`
7
+ // SDK, so there is exactly one copy of it.
8
+ export * from "@misofm/effect/execute";
110
9
  //# sourceMappingURL=execute.js.map
@@ -1 +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;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAW,CAAC;AAehG,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,GAAG,MAAiB;IAChD,MAAM,EAAE,GAAG,IAAI,WAAW,E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AAE,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"}
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,4EAA4E;AAC5E,qEAAqE;AACrE,2EAA2E;AAC3E,+EAA+E;AAC/E,2CAA2C;AAC3C,cAAc,wBAAwB,CAAC"}
@@ -1,7 +1,8 @@
1
- import type { BPS, Composition, Recording, Release as ReleaseType, Track } from "./types.ts";
2
1
  type Parsed = any;
3
2
  /** `BPS` is a Move tuple struct `(u16)`, parsed as `[number]`. */
4
- export declare function mapBps(d: Parsed): BPS;
3
+ export declare function mapBps(d: Parsed): {
4
+ value: number;
5
+ };
5
6
  /** Lifecycle state enum (`Initialized | Published(u64)`). */
6
7
  export declare function mapState(d: Parsed): {
7
8
  type: "Initialized";
@@ -9,9 +10,47 @@ export declare function mapState(d: Parsed): {
9
10
  type: "Published";
10
11
  timestampMs: number;
11
12
  };
12
- export declare function mapComposition(id: string, d: Parsed): Composition;
13
- export declare function mapRecording(id: string, d: Parsed): Recording;
14
- export declare function mapTrack(d: Parsed): Track;
15
- export declare function mapRelease(id: string, d: Parsed): ReleaseType;
13
+ export declare function mapComposition(id: string, d: Parsed): {
14
+ id: string;
15
+ state: {
16
+ type: "Initialized";
17
+ } | {
18
+ type: "Published";
19
+ timestampMs: number;
20
+ };
21
+ title: string;
22
+ royaltyRate: {
23
+ value: number;
24
+ };
25
+ };
26
+ export declare function mapRecording(id: string, d: Parsed): {
27
+ id: string;
28
+ state: {
29
+ type: "Initialized";
30
+ } | {
31
+ type: "Published";
32
+ timestampMs: number;
33
+ };
34
+ compositionId: string;
35
+ };
36
+ export declare function mapTrack(d: Parsed): {
37
+ state: "Unassigned" | "Assigned";
38
+ compositionId: string;
39
+ recordingId: string;
40
+ splitBps: {
41
+ value: number;
42
+ };
43
+ };
44
+ export declare function mapRelease(id: string, d: Parsed): {
45
+ id: string;
46
+ state: {
47
+ type: "Initialized";
48
+ } | {
49
+ type: "Published";
50
+ timestampMs: number;
51
+ };
52
+ title: string;
53
+ tracks: any;
54
+ };
16
55
  export {};
17
56
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,GAAG,EACH,WAAW,EACX,SAAS,EACT,OAAO,IAAI,WAAW,EACtB,KAAK,EAEN,MAAM,YAAY,CAAC;AAKpB,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;C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AAC,CAAC,KAAK,CAAC;QACxB,KAAK,EAAE,CAAC,CAAC,KAAe;QACxB,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,EAAU,EAAE,CAAS;IAChD,OAAO;QACL,EAAE;QACF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;QACxB,aAAa,EAAE,CAAC,CAAC,cAAwB;KAC1C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,CAAS;IAChC,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,IAAI,YAAY,CAA8B;QACpE,aAAa,EAAE,CAAC,CAAC,cAAwB;QACzC,WAAW,EAAE,CAAC,CAAC,YAAsB;QACrC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;KAC9B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,EAAU,EAAE,CAAS;IAC9C,OAAO;QACL,EAAE;QACF,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;QACxB,KAAK,EAAE,CAAC,CAAC,KAAe;QACxB,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;KACvC,CAAC;AACJ,CAAC"}
package/dist/queries.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import type { ClientWithCoreApi } from "@mysten/sui/client";
2
- import type { SuiGraphQLClient } from "@mysten/sui/graphql";
3
- import type { Composition, CompositionAdminCap, Recording, RecordingAdminCap, Release, ReleaseAdminCap } from "./types.ts";
1
+ import { ConflictingWorkKindError } from "./errors.ts";
2
+ import { Effect, Option, Schema } from "effect";
3
+ import { type BcsParser, BcsDecodeError, ObjectNotFoundError, SuiClient, SuiGraphQL, SuiRpcError } from "@misofm/effect";
4
+ import { Composition, CompositionAdminCap, Recording, RecordingAdminCap, Release, ReleaseAdminCap, ReleaseRegistry } from "./types.ts";
5
+ export type { BcsParser };
4
6
  /**
5
7
  * Extracts the type parameter `T` from `package::module::Type<T>`. For multi-
6
8
  * parameter types this returns everything between the outer angle brackets —
@@ -10,35 +12,11 @@ export declare function extractTypeParam(objectType: string): string;
10
12
  /** Splits the two top-level type parameters of `pkg::mod::Type<A, B>`. */
11
13
  export declare function extractTypeParams2(objectType: string): [string, string];
12
14
  /**
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
- /** Any generated BCS codec with a `parse` method. */
34
- export interface BcsParser<T> {
35
- parse(bytes: Uint8Array): T;
36
- }
37
- /**
38
- * Fetch and parse an object through the transport-neutral Core API. Object
39
- * content is BCS; never pass the full `objectBcs` envelope to a Move codec.
15
+ * Fetch and parse an object through the transport-neutral Core API, validating
16
+ * the parsed result against a domain `Schema`. Object content is BCS; never
17
+ * pass the full `objectBcs` envelope to a Move codec.
40
18
  */
41
- export declare function getObjectByBcs<T>(client: ClientWithCoreApi, objectId: string, codec: BcsParser<T>): Promise<T>;
19
+ export declare const getObjectByBcs: <P, A>(objectId: string, codec: BcsParser<P>, schema: Schema.Codec<A, any, never, never>, typeName: string) => Effect.Effect<A, BcsDecodeError | ObjectNotFoundError | SuiRpcError, SuiClient>;
42
20
  export interface ExtensionFieldParams<T> {
43
21
  /** Freshly published package address for the extension. */
44
22
  packageId: string;
@@ -50,9 +28,9 @@ export interface ExtensionFieldParams<T> {
50
28
  /**
51
29
  * Read an optional first-party extension field from a core object's UID. Every
52
30
  * current extension uses a fieldless `ExtensionKey`, whose BCS is one false
53
- * boolean byte. Absence returns `null`; transport errors still propagate.
31
+ * boolean byte. Absence resolves to `Option.none()`; transport errors still fail.
54
32
  */
55
- export declare function getExtensionField<T>(client: ClientWithCoreApi, parentId: string, params: ExtensionFieldParams<T>): Promise<T | null>;
33
+ export declare const getExtensionField: <T>(parentId: string, params: ExtensionFieldParams<T>) => Effect.Effect<Option.Option<T>, SuiRpcError, SuiClient>;
56
34
  export interface ReleaseDspFieldParams<T> {
57
35
  /** Freshly published `release_dsp_link` package address. */
58
36
  packageId: string;
@@ -62,13 +40,11 @@ export interface ReleaseDspFieldParams<T> {
62
40
  codec: BcsParser<T>;
63
41
  }
64
42
  /** Read a release-level DSP link stored under `ReleaseLinkKey(platform)`. */
65
- export declare function getReleaseDspLink<T>(client: ClientWithCoreApi, releaseId: string, params: ReleaseDspFieldParams<T>): Promise<T | null>;
43
+ export declare function getReleaseDspLink<T>(releaseId: string, params: ReleaseDspFieldParams<T>): Effect.Effect<Option.Option<T>, SuiRpcError, SuiClient>;
66
44
  /** Read the per-track DSP-link array stored under `TrackLinksKey(platform)`. */
67
- export declare function getTrackDspLinks<T>(client: ClientWithCoreApi, releaseId: string, params: ReleaseDspFieldParams<T>): Promise<T | null>;
45
+ export declare function getTrackDspLinks<T>(releaseId: string, params: ReleaseDspFieldParams<T>): Effect.Effect<Option.Option<T>, SuiRpcError, SuiClient>;
68
46
  /** Parse the shared canonical core `miso::release::ReleaseRegistry` by ID. */
69
- export declare function getReleaseRegistryById(client: ClientWithCoreApi, registryId: string): Promise<{
70
- id: string;
71
- }>;
47
+ export declare function getReleaseRegistryById(registryId: string): Effect.Effect<ReleaseRegistry, ObjectNotFoundError | SuiRpcError | BcsDecodeError, SuiClient>;
72
48
  export interface WorkShareTypes {
73
49
  compositions: readonly string[];
74
50
  recordings: readonly string[];
@@ -85,7 +61,7 @@ export interface WorkAddressesByShareType {
85
61
  * exposes the first, so one bare Recording scan is shared by every requested
86
62
  * recording type and filtered client-side.
87
63
  */
88
- export declare function getWorkAddressesByShareTypes(client: SuiGraphQLClient, shareTypes: WorkShareTypes, misoPackageId: string): Promise<WorkAddressesByShareType>;
64
+ export declare const getWorkAddressesByShareTypes: (shareTypes: WorkShareTypes, misoPackageId: string) => Effect.Effect<WorkAddressesByShareType, SuiRpcError, SuiGraphQL>;
89
65
  export interface WorkIds {
90
66
  compositions: readonly string[];
91
67
  recordings: readonly string[];
@@ -97,15 +73,15 @@ export interface WorksById {
97
73
  releases: Partial<Record<string, Release>>;
98
74
  }
99
75
  /** Fetch and parse heterogeneous work objects through one Core bulk request. */
100
- export declare function getWorksByIds(client: ClientWithCoreApi, ids: WorkIds): Promise<WorksById>;
76
+ export declare const getWorksByIds: (ids: WorkIds) => Effect.Effect<WorksById, BcsDecodeError | ConflictingWorkKindError | SuiRpcError, SuiClient>;
101
77
  /** Fetches multiple compositions by ID in one Core request. */
102
- export declare function getCompositionsByIds(client: ClientWithCoreApi, compositionIds: string[]): Promise<Record<string, Composition>>;
78
+ export declare const getCompositionsByIds: (compositionIds: string[]) => Effect.Effect<Record<string, Composition>, BcsDecodeError | SuiRpcError, SuiClient>;
103
79
  /** Fetches a composition by its object ID. */
104
- export declare function getCompositionById(client: ClientWithCoreApi, compositionId: string): Promise<Composition>;
80
+ export declare function getCompositionById(compositionId: string): Effect.Effect<Composition, ObjectNotFoundError | SuiRpcError | BcsDecodeError, SuiClient>;
105
81
  /** Extracts the share type `T` from a `Composition<T>` object. */
106
- export declare function getCompositionShareType(client: ClientWithCoreApi, compositionId: string): Promise<string>;
82
+ export declare const getCompositionShareType: (compositionId: string) => Effect.Effect<string, ObjectNotFoundError | SuiRpcError, SuiClient>;
107
83
  /** Fetches a composition by its share type (GraphQL discovery + Core read). */
108
- export declare function getCompositionByShareType(client: ClientWithCoreApi, graphqlClient: SuiGraphQLClient, shareType: string, misoPackageId: string): Promise<Composition>;
84
+ export declare const getCompositionByShareType: (shareType: string, misoPackageId: string) => Effect.Effect<Composition, BcsDecodeError | ObjectNotFoundError | SuiRpcError, SuiClient | SuiGraphQL>;
109
85
  /**
110
86
  * Resolves a composition share type to its object address.
111
87
  *
@@ -113,8 +89,8 @@ export declare function getCompositionByShareType(client: ClientWithCoreApi, gra
113
89
  * composition's identity but will read extension fields rather than the core
114
90
  * Composition contents.
115
91
  */
116
- export declare function getCompositionAddressByShareType(graphqlClient: SuiGraphQLClient, shareType: string, misoPackageId: string): Promise<string | null>;
117
- export declare function getCompositionAdminCapById(client: ClientWithCoreApi, adminCapId: string): Promise<CompositionAdminCap>;
92
+ export declare function getCompositionAddressByShareType(shareType: string, misoPackageId: string): Effect.Effect<Option.Option<string>, SuiRpcError, SuiGraphQL>;
93
+ export declare const getCompositionAdminCapById: (adminCapId: string) => Effect.Effect<CompositionAdminCap, ObjectNotFoundError | SuiRpcError, SuiClient>;
118
94
  /**
119
95
  * Composition admin caps owned by `owner`.
120
96
  *
@@ -122,26 +98,26 @@ export declare function getCompositionAdminCapById(client: ClientWithCoreApi, ad
122
98
  * object's instantiated `type`, so the share type is read straight off
123
99
  * `CompositionAdminCap<CompositionShare>` with no second round-trip.
124
100
  */
125
- export declare function getOwnedCompositionAdminCaps(client: ClientWithCoreApi, owner: string, misoPackageId: string): Promise<CompositionAdminCap[]>;
101
+ export declare const getOwnedCompositionAdminCaps: (owner: string, misoPackageId: string) => Effect.Effect<CompositionAdminCap[], SuiRpcError, SuiClient>;
126
102
  export declare function deriveCompositionAdminCapId(compositionId: string, misoPackageId: string): string;
127
- export declare function getRecordingsByIds(client: ClientWithCoreApi, recordingIds: string[]): Promise<Record<string, Recording>>;
128
- export declare function getRecordingById(client: ClientWithCoreApi, recordingId: string): Promise<Recording>;
103
+ export declare const getRecordingsByIds: (recordingIds: string[]) => Effect.Effect<Record<string, Recording>, BcsDecodeError | SuiRpcError, SuiClient>;
104
+ export declare function getRecordingById(recordingId: string): Effect.Effect<Recording, ObjectNotFoundError | SuiRpcError | BcsDecodeError, SuiClient>;
129
105
  /**
130
106
  * The recording's OWN share type (`RecordingShare`). `Recording` is generic over
131
107
  * two phantoms — `Recording<RecordingShare, CompositionShare>` — so this splits
132
108
  * them and returns the first; use {@link getRecordingShareTypes} when the
133
109
  * parent composition's share type is needed too.
134
110
  */
135
- export declare function getRecordingShareType(client: ClientWithCoreApi, recordingId: string): Promise<string>;
111
+ export declare const getRecordingShareType: (recordingId: string) => Effect.Effect<string, ObjectNotFoundError | SuiRpcError, SuiClient>;
136
112
  /**
137
113
  * Both of a recording's share types, as `[RecordingShare, CompositionShare]`.
138
114
  * Most builders need the pair — `track::new`, `recording::publish`
139
115
  * and the recording credit/pool extensions are all generic over both, in this
140
116
  * order.
141
117
  */
142
- export declare function getRecordingShareTypes(client: ClientWithCoreApi, recordingId: string): Promise<[string, string]>;
143
- export declare function getRecordingByShareType(client: ClientWithCoreApi, graphqlClient: SuiGraphQLClient, shareType: string, misoPackageId: string): Promise<Recording>;
144
- export declare function getRecordingAdminCapById(client: ClientWithCoreApi, adminCapId: string): Promise<RecordingAdminCap>;
118
+ export declare const getRecordingShareTypes: (recordingId: string) => Effect.Effect<[string, string], ObjectNotFoundError | SuiRpcError, SuiClient>;
119
+ export declare const getRecordingByShareType: (shareType: string, misoPackageId: string) => Effect.Effect<Recording, BcsDecodeError | ObjectNotFoundError | SuiRpcError, SuiClient | SuiGraphQL>;
120
+ export declare const getRecordingAdminCapById: (adminCapId: string) => Effect.Effect<RecordingAdminCap, ObjectNotFoundError | SuiRpcError, SuiClient>;
145
121
  /**
146
122
  * Recording admin caps owned by `owner`.
147
123
  *
@@ -150,15 +126,15 @@ export declare function getRecordingAdminCapById(client: ClientWithCoreApi, admi
150
126
  * so this yields only the recording's own share type — its parent composition's
151
127
  * share type is not recoverable from the cap alone.
152
128
  */
153
- export declare function getOwnedRecordingAdminCaps(client: ClientWithCoreApi, owner: string, misoPackageId: string): Promise<RecordingAdminCap[]>;
129
+ export declare const getOwnedRecordingAdminCaps: (owner: string, misoPackageId: string) => Effect.Effect<RecordingAdminCap[], SuiRpcError, SuiClient>;
154
130
  export declare function deriveRecordingAdminCapId(recordingId: string, misoPackageId: string): string;
155
- export declare function getReleasesByIds(client: ClientWithCoreApi, releaseIds: string[]): Promise<Record<string, Release>>;
156
- export declare function getReleaseById(client: ClientWithCoreApi, releaseId: string): Promise<Release>;
157
- export declare function getReleaseAdminCapById(client: ClientWithCoreApi, adminCapId: string): Promise<ReleaseAdminCap>;
158
- export declare function getOwnedReleaseAdminCaps(client: ClientWithCoreApi, owner: string, misoPackageId: string): Promise<ReleaseAdminCap[]>;
131
+ export declare const getReleasesByIds: (releaseIds: string[]) => Effect.Effect<Record<string, Release>, BcsDecodeError | SuiRpcError, SuiClient>;
132
+ export declare function getReleaseById(releaseId: string): Effect.Effect<Release, ObjectNotFoundError | SuiRpcError | BcsDecodeError, SuiClient>;
133
+ export declare const getReleaseAdminCapById: (adminCapId: string) => Effect.Effect<ReleaseAdminCap, ObjectNotFoundError | SuiRpcError, SuiClient>;
134
+ export declare const getOwnedReleaseAdminCaps: (owner: string, misoPackageId: string) => Effect.Effect<ReleaseAdminCap[], SuiRpcError, SuiClient>;
159
135
  export declare function deriveReleaseAdminCapId(releaseId: string, misoPackageId: string): string;
160
136
  /** Extracts the share type `T` from a `Currency<T>` object. */
161
- export declare function getShareCurrencyType(client: ClientWithCoreApi, shareCurrencyId: string): Promise<string>;
137
+ export declare const getShareCurrencyType: (shareCurrencyId: string) => Effect.Effect<string, ObjectNotFoundError | SuiRpcError, SuiClient>;
162
138
  /**
163
139
  * Finds the `TreasuryCap<ShareType>` owned by `owner`. One Core API call.
164
140
  *
@@ -170,9 +146,9 @@ export declare function getShareCurrencyType(client: ClientWithCoreApi, shareCur
170
146
  * compose the two:
171
147
  *
172
148
  * ```ts
173
- * const shareType = await getShareCurrencyType(client, shareCurrencyId);
174
- * const capId = await getShareCurrencyTreasuryCap(client, shareType, owner);
149
+ * const shareType = yield* getShareCurrencyType(shareCurrencyId);
150
+ * const capId = yield* getShareCurrencyTreasuryCap(shareType, owner);
175
151
  * ```
176
152
  */
177
- export declare function getShareCurrencyTreasuryCap(client: ClientWithCoreApi, shareType: string, owner: string): Promise<string>;
153
+ export declare const getShareCurrencyTreasuryCap: (shareType: string, owner: string) => Effect.Effect<string, SuiRpcError, SuiClient>;
178
154
  //# sourceMappingURL=queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../src/queries.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAgB5D,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EACnB,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,eAAe,EAChB,MAAM,YAAY,CAAC;AAMpB;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAK3D;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAWvE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAoB9C;AAKD,qDAAqD;AACrD,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,CAAC,CAAC;CAC7B;AAsCD;;;GAGG;AACH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