@misofm/sdk 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -62,14 +62,17 @@ Register the extension on any client implementing Sui's Core API
62
62
  ```ts
63
63
  import { SuiGrpcClient } from "@mysten/sui/grpc";
64
64
  import { Transaction } from "@mysten/sui/transactions";
65
- import { misoPlatform } from "@misofm/sdk";
65
+ import { miso } from "@misofm/sdk";
66
66
 
67
67
  const client = new SuiGrpcClient({ network: "testnet", baseUrl }).$extend(
68
- misoPlatform({ packageId: MISO_PRESSING_PACKAGE_ID, settingsId: MISO_RECORD_SETTINGS_ID }),
68
+ miso(),
69
69
  );
70
70
 
71
+ // The permissionless protocol SDK is part of the same facade.
72
+ const release = await client.miso.protocol.getReleaseById(releaseId);
73
+
71
74
  // Read: run + one currency's offer, one round trip, no registry lookup.
72
- const { pressing, listing } = await client.misoPlatform.getSale({
75
+ const { pressing, listing } = await client.miso.getSale({
73
76
  releaseId,
74
77
  currencyType: USD_COIN_TYPE,
75
78
  });
@@ -77,7 +80,7 @@ const { pressing, listing } = await client.misoPlatform.getSale({
77
80
  // Write: a thunk, so it composes with protocol calls in the same PTB.
78
81
  const tx = new Transaction();
79
82
  tx.add(
80
- client.misoPlatform.tx.buyRecord({
83
+ client.miso.tx.buyRecord({
81
84
  releaseId,
82
85
  currencyType: USD_COIN_TYPE,
83
86
  amount: listing.price.amount,
@@ -93,6 +96,11 @@ Holding the ids yourself? Every builder and reader is exported bare, taking
93
96
  import { buyRecord, getSale } from "@misofm/sdk/pressing";
94
97
  ```
95
98
 
99
+ Mainnet is selected automatically once the complete platform deployment is
100
+ included in this SDK. Until then, registering `miso()` on a Mainnet client fails
101
+ closed. Localnet, Devnet, forks, and private deployments can provide one complete
102
+ explicit deployment through `miso({ deployment })`.
103
+
96
104
  ### High-level platform reads
97
105
 
98
106
  `@misofm/sdk/read` turns protocol, pressing, PartyOS, credits, cover, and wallet
@@ -179,21 +187,17 @@ back its by-value parts (the object, its admin cap, its freshly-minted share
179
187
  supplies the opinionated finish on top:
180
188
 
181
189
  ```ts
182
- import { misoPlatform } from "@misofm/sdk";
190
+ import { miso } from "@misofm/sdk";
183
191
 
184
192
  const client = new SuiGrpcClient({ network: "testnet", baseUrl }).$extend(
185
- misoPlatform({
186
- packageId: MISO_PRESSING_PACKAGE_ID,
187
- misoPackageId: MISO_PROTOCOL_PACKAGE_ID, // required for publish builders
188
- minatoPackageId: MINATO_PACKAGE_ID, // required — they disperse shares via minato
189
- }),
193
+ miso(),
190
194
  );
191
195
 
192
196
  // Mints the composition's share supply, disperses it to shareRecipients via
193
197
  // minato, publishes (shares) the composition, and transfers the
194
198
  // CompositionAdminCap to adminAddress — createComposition → finalizeComposition
195
199
  // in one PTB.
196
- const thunk = client.misoPlatform.tx.publishComposition({
200
+ const thunk = client.miso.tx.publishComposition({
197
201
  title: "Song Title",
198
202
  royaltyRateBps: 1000,
199
203
  shareType: "0x...::share::Share",
@@ -204,14 +208,13 @@ const thunk = client.misoPlatform.tx.publishComposition({
204
208
  });
205
209
  ```
206
210
 
207
- `client.misoPlatform.tx.publishRecording` and `publishCompositionAndRecording`
211
+ `client.miso.tx.publishRecording` and `publishCompositionAndRecording`
208
212
  follow the same shape (the latter atomically, borrow-before-share, in one PTB —
209
213
  see `@misonetwork/sdk`'s README for why the ordering is load-bearing).
210
- `misoPackageId`/`minatoPackageId`/`releaseRegistryPackageId`/`releaseRegistryId`
211
- are optional on the client a sell-only
212
- client (e.g. a storefront that never mints new works) can omit them; the
213
- publish builders throw at call time, not at client construction, if they're
214
- missing.
214
+ The protocol, pressing, record-settings, minato, and release-coordinator
215
+ addresses all come from the deployment selected by the Sui client's network.
216
+ The deprecated `misoPlatform()` constructor still accepts those values manually
217
+ for compatibility with existing integrations.
215
218
 
216
219
  For custom PTBs, the bare primitives (`disperseShares`, `finalizeComposition`,
217
220
  `finalizeRecording`) and the whole-graph orchestrator are exported standalone:
@@ -246,7 +249,7 @@ Publish and initialize are necessarily two transactions:
246
249
 
247
250
  ```ts
248
251
  // Sequential (one currency, two txs):
249
- const currency = await client.misoPlatform.createShareCurrency(signer, {
252
+ const currency = await client.miso.createShareCurrency(signer, {
250
253
  name: "Song Shares",
251
254
  description: "…",
252
255
  });
@@ -375,7 +378,8 @@ carry an optional `RecordingRoleLevel` (`Producer`, `Vocalist`, `Engineer`,
375
378
 
376
379
  ```
377
380
  src/
378
- client.ts the client extension misoPlatform({ packageId, settingsId, misoPackageId?, minatoPackageId?, releaseRegistryPackageId?, releaseRegistryId? })
381
+ deployments.ts baked per-network package and singleton object ids
382
+ client.ts the full client.miso facade; protocol lives at client.miso.protocol
379
383
  pressing.ts facade: builders, readers, and the id derivations
380
384
  queries.ts shared read plumbing (isNotFound, re-exported from @misonetwork/sdk)
381
385
  transactions.ts the TxThunk contract + the opinionated publish flow (disperse/finalize/publish*)
@@ -419,10 +423,10 @@ Paths resolve against sibling checkouts, so regenerating requires
419
423
 
420
424
  ## Dependency on `@misonetwork/sdk`
421
425
 
422
- `@misonetwork/sdk` is a `dependencies` entry (not a peer) this package
423
- imports its bare primitives and types directly, rather than registering it as
424
- a second client extension via `$extend`, so it isn't the "avoid bundling two
425
- copies of a Mysten package" situation the peer-dependency guidance targets.
426
+ `@misonetwork/sdk` is a `dependencies` entry (not a peer). This package imports
427
+ its primitives, deployment configuration, and protocol client directly, then
428
+ wraps that client at `client.miso.protocol`; applications do not install or
429
+ register a second protocol extension.
426
430
  `@mysten/sui` itself stays a peer dependency here, same as in
427
431
  `@misonetwork/sdk`.
428
432
 
@@ -438,6 +442,6 @@ bun install
438
442
  If you are changing both packages at once, `bun link` still works for a local
439
443
  loop — register the protocol SDK with `bun link` in its checkout, then run `bun
440
444
  link @misonetwork/sdk` here. Keep `@misonetwork/sdk` at its released semver
441
- range (`^0.5.0`) when committing. Note that `file:` does NOT work for this: Bun copies a `file:`
445
+ range (`^0.6.0`) when committing. Note that `file:` does NOT work for this: Bun copies a `file:`
442
446
  dependency while honouring `.gitignore`, and `@misonetwork/sdk` builds to a
443
447
  gitignored `dist/`, so the copy arrives empty and nothing resolves.
package/dist/client.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- import type { ClientWithCoreApi } from "@mysten/sui/client";
1
+ import type { ClientWithCoreApi, SuiClientRegistration } from "@mysten/sui/client";
2
2
  import type { Signer } from "@mysten/sui/cryptography";
3
+ import type { SuiGraphQLClient } from "@mysten/sui/graphql";
4
+ import { type MisoProtocolClient } from "@misonetwork/sdk/client";
3
5
  import * as listingContract from "./contracts/miso_pressing/listing.ts";
4
6
  import * as pressingContract from "./contracts/miso_pressing/pressing.ts";
5
7
  import * as releaseRegistry from "./contracts/release_registry/release_registry.ts";
@@ -7,6 +9,16 @@ import type { BuyRecordParams, GetSaleParams, ListingView, OpenListingParams, Op
7
9
  import { publishShareCurrency, initializeShareCurrency } from "./transactions.ts";
8
10
  import type { TxThunk, PublishCompositionParams, PublishRecordingParams, PublishCompositionAndRecordingParams, PublishReleaseParams } from "./transactions.ts";
9
11
  import * as share from "./share.ts";
12
+ import { type PublishReleaseGraphParams } from "./release-graph.ts";
13
+ import { type MisoPlatformDeployment } from "./deployments.ts";
14
+ export interface MisoOptions<Name extends string = "miso"> {
15
+ /** Name for the client extension. Defaults to `miso`. */
16
+ name?: Name;
17
+ /** Complete custom deployment; omit to select the bundled client network. */
18
+ deployment?: MisoPlatformDeployment;
19
+ /** Required only by protocol methods that perform global type discovery. */
20
+ graphqlClient?: SuiGraphQLClient;
21
+ }
10
22
  export interface MisoPlatformConfig {
11
23
  /** The published `miso_pressing` package. */
12
24
  packageId: string;
@@ -39,9 +51,15 @@ type Configured<T> = Omit<T, "misoPressingPackageId" | "settingsId">;
39
51
  type ConfiguredPublish<T> = Omit<T, "misoPackageId" | "minatoPackageId">;
40
52
  /** Release-builder params with this client's core, share, and registry ids dropped. */
41
53
  type ConfiguredRelease<T> = Omit<T, "misoPackageId" | "minatoPackageId" | "releaseRegistryPackageId" | "releaseRegistryId">;
54
+ /** Whole-graph params with this client's package ids dropped. */
55
+ export type ConfiguredReleaseGraphParams = Omit<PublishReleaseGraphParams, "misoPackageId" | "minatoPackageId" | "releaseRegistryPackageId">;
42
56
  export declare class MisoPlatformClient {
43
57
  #private;
44
- constructor(client: ClientWithCoreApi, config: MisoPlatformConfig);
58
+ /** The permissionless protocol layer wrapped by this platform facade. */
59
+ readonly protocol: MisoProtocolClient;
60
+ /** Bundled/custom deployment selected for the full facade, when available. */
61
+ readonly deployment?: MisoPlatformDeployment;
62
+ constructor(client: ClientWithCoreApi, config: MisoPlatformConfig, protocol?: MisoProtocolClient, deployment?: MisoPlatformDeployment);
45
63
  get packageId(): string;
46
64
  /** The run itself, or `null` if this release has never opened one. */
47
65
  getPressing(pressingId: string): Promise<PressingView | null>;
@@ -74,11 +92,12 @@ export declare class MisoPlatformClient {
74
92
  publishRecording: (p: ConfiguredPublish<PublishRecordingParams>) => TxThunk;
75
93
  publishCompositionAndRecording: (p: ConfiguredPublish<PublishCompositionAndRecordingParams>) => TxThunk;
76
94
  publishRelease: (p: ConfiguredRelease<PublishReleaseParams>) => TxThunk;
95
+ publishReleaseGraph: (p: ConfiguredReleaseGraphParams) => TxThunk;
77
96
  };
78
97
  /** Publishes + initializes a fresh share currency (two txs). */
79
98
  createShareCurrency(signer: Signer, params: share.CreateShareCurrencyParams): Promise<share.ShareCurrency>;
80
99
  /** Generated Move-call bindings, for commands this facade doesn't wrap. */
81
- readonly call: {
100
+ get call(): {
82
101
  listing: typeof listingContract;
83
102
  pressing: typeof pressingContract;
84
103
  releaseRegistry: typeof releaseRegistry;
@@ -135,8 +154,18 @@ export declare class MisoPlatformClient {
135
154
  }, "@local-pkg/release_registry::release_registry::ReleaseRegistryCreatedEvent">;
136
155
  };
137
156
  }
157
+ /** The full Miso client exposed by `@misofm/sdk`. */
158
+ export { MisoPlatformClient as MisoClient };
159
+ /**
160
+ * Registers the complete Miso facade at `client.miso`.
161
+ *
162
+ * Platform operations live directly on `client.miso`; the lower-level
163
+ * permissionless protocol SDK is available at `client.miso.protocol`.
164
+ */
165
+ export declare function miso<const Name extends string = "miso">(options?: MisoOptions<Name>): SuiClientRegistration<ClientWithCoreApi, Name, MisoPlatformClient>;
138
166
  /**
139
- * Registers the platform layer on a Sui client. Pass the result to `$extend`.
167
+ * @deprecated Prefer zero-config `miso()`, which registers the complete facade
168
+ * at `client.miso` and exposes the protocol layer at `client.miso.protocol`.
140
169
  *
141
170
  * `settingsId` is optional so a read-only client (an indexer, a catalog page) can
142
171
  * skip it; asking to build a purchase without it throws rather than sending a
@@ -146,5 +175,4 @@ export declare function misoPlatform(config: MisoPlatformConfig): {
146
175
  name: "misoPlatform";
147
176
  register: (client: ClientWithCoreApi) => MisoPlatformClient;
148
177
  };
149
- export {};
150
178
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,eAAe,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,gBAAgB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,eAAe,MAAM,kDAAkD,CAAC;AAgBpF,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EAKxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,OAAO,EACP,wBAAwB,EACxB,sBAAsB,EACtB,oCAAoC,EACpC,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,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C,MAAM,EAAE,kBAAkB;;uBAGhC,iBAAiB;EAWvC"}
package/dist/client.js CHANGED
@@ -1,17 +1,43 @@
1
1
  // Copyright (c) Miso Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
+ import { miso as protocolMiso, } from "@misonetwork/sdk/client";
3
4
  import * as listingContract from "./contracts/miso_pressing/listing.js";
4
5
  import * as pressingContract from "./contracts/miso_pressing/pressing.js";
5
6
  import * as releaseRegistry from "./contracts/release_registry/release_registry.js";
6
7
  import { buyRecord, deriveListingId, derivePressingAdminCapId, derivePressingId, deriveSaleIds, getListing, getPressing, getSale, openListing, openPressing, setListingPrice, setListingState, setPressingState, } from "./pressing.js";
7
8
  import { publishShareCurrency, initializeShareCurrency, publishComposition, publishRecording, publishCompositionAndRecording, publishRelease, } from "./transactions.js";
8
9
  import * as share from "./share.js";
10
+ import { publishReleaseGraph, } from "./release-graph.js";
11
+ import { getMisoPlatformDeployment, } from "./deployments.js";
12
+ /** Defaults `options.package` to `pkg` for every generated call function. */
13
+ function bindModulePackage(mod, pkg) {
14
+ const out = {};
15
+ for (const [key, value] of Object.entries({ ...mod })) {
16
+ out[key] =
17
+ typeof value === "function"
18
+ ? (options) => value({ package: pkg, ...options })
19
+ : value;
20
+ }
21
+ return out;
22
+ }
9
23
  export class MisoPlatformClient {
10
24
  #client;
11
25
  #config;
12
- constructor(client, config) {
26
+ /** The permissionless protocol layer wrapped by this platform facade. */
27
+ protocol;
28
+ /** Bundled/custom deployment selected for the full facade, when available. */
29
+ deployment;
30
+ constructor(client, config, protocol, deployment) {
13
31
  this.#client = client;
14
32
  this.#config = config;
33
+ this.protocol =
34
+ protocol ??
35
+ protocolMiso({
36
+ deployment: config.misoPackageId
37
+ ? { packageId: config.misoPackageId }
38
+ : undefined,
39
+ }).register(client);
40
+ this.deployment = deployment;
15
41
  }
16
42
  get packageId() {
17
43
  return this.#config.packageId;
@@ -97,6 +123,15 @@ export class MisoPlatformClient {
97
123
  releaseRegistryId: registry.id,
98
124
  });
99
125
  },
126
+ publishReleaseGraph: (p) => {
127
+ const registry = this.#releaseRegistry();
128
+ return publishReleaseGraph({
129
+ ...p,
130
+ misoPackageId: this.#misoPackageId(),
131
+ minatoPackageId: this.#minatoPackageId(),
132
+ releaseRegistryPackageId: registry.packageId,
133
+ });
134
+ },
100
135
  };
101
136
  // ── Share currency provisioning (executes; Signer pattern) ─────────────────
102
137
  /** Publishes + initializes a fresh share currency (two txs). */
@@ -105,7 +140,15 @@ export class MisoPlatformClient {
105
140
  }
106
141
  // ── Generated layer ───────────────────────────────────────────────────────
107
142
  /** Generated Move-call bindings, for commands this facade doesn't wrap. */
108
- call = { listing: listingContract, pressing: pressingContract, releaseRegistry };
143
+ get call() {
144
+ return {
145
+ listing: bindModulePackage(listingContract, this.packageId),
146
+ pressing: bindModulePackage(pressingContract, this.packageId),
147
+ releaseRegistry: this.#config.releaseRegistryPackageId
148
+ ? bindModulePackage(releaseRegistry, this.#config.releaseRegistryPackageId)
149
+ : releaseRegistry,
150
+ };
151
+ }
109
152
  /** Generated BCS definitions, for parsing objects or events yourself. */
110
153
  bcs = {
111
154
  Pressing: pressingContract.Pressing,
@@ -116,8 +159,38 @@ export class MisoPlatformClient {
116
159
  ReleaseRegistryCreatedEvent: releaseRegistry.ReleaseRegistryCreatedEvent,
117
160
  };
118
161
  }
162
+ /** The full Miso client exposed by `@misofm/sdk`. */
163
+ export { MisoPlatformClient as MisoClient };
119
164
  /**
120
- * Registers the platform layer on a Sui client. Pass the result to `$extend`.
165
+ * Registers the complete Miso facade at `client.miso`.
166
+ *
167
+ * Platform operations live directly on `client.miso`; the lower-level
168
+ * permissionless protocol SDK is available at `client.miso.protocol`.
169
+ */
170
+ export function miso(options = {}) {
171
+ const name = (options.name ?? "miso");
172
+ return {
173
+ name,
174
+ register: (client) => {
175
+ const deployment = options.deployment ?? getMisoPlatformDeployment(client.network);
176
+ const protocol = protocolMiso({
177
+ deployment: deployment.protocol,
178
+ graphqlClient: options.graphqlClient,
179
+ }).register(client);
180
+ return new MisoPlatformClient(client, {
181
+ packageId: deployment.packages.pressing,
182
+ settingsId: deployment.objects.recordSettings,
183
+ misoPackageId: deployment.protocol.packageId,
184
+ minatoPackageId: deployment.packages.minato,
185
+ releaseRegistryPackageId: deployment.packages.releaseRegistry,
186
+ releaseRegistryId: deployment.objects.releaseRegistry,
187
+ }, protocol, deployment);
188
+ },
189
+ };
190
+ }
191
+ /**
192
+ * @deprecated Prefer zero-config `miso()`, which registers the complete facade
193
+ * at `client.miso` and exposes the protocol layer at `client.miso.protocol`.
121
194
  *
122
195
  * `settingsId` is optional so a read-only client (an indexer, a catalog page) can
123
196
  * skip it; asking to build a purchase without it throws rather than sending a
@@ -126,7 +199,16 @@ export class MisoPlatformClient {
126
199
  export function misoPlatform(config) {
127
200
  return {
128
201
  name: "misoPlatform",
129
- register: (client) => new MisoPlatformClient(client, config),
202
+ register: (client) => {
203
+ const protocol = protocolMiso({
204
+ deployment: config.misoPackageId
205
+ ? {
206
+ packageId: config.misoPackageId,
207
+ }
208
+ : undefined,
209
+ }).register(client);
210
+ return new MisoPlatformClient(client, config, protocol);
211
+ },
130
212
  };
131
213
  }
132
214
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AA8BtC,OAAO,KAAK,eAAe,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,gBAAgB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,KAAK,eAAe,MAAM,kDAAkD,CAAC;AACpF,OAAO,EACL,SAAS,EACT,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,WAAW,EACX,OAAO,EACP,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAYvB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,k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AAC,SAAS;gBAC5C,eAAe,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM;gBAC3C,wBAAwB,EAAE,UAAU,CAAC,QAAQ,CAAC,eAAe;gBAC7D,iBAAiB,EAAE,UAAU,CAAC,OAAO,CAAC,eAAe;aACtD,EACD,QAAQ,EACR,UAAU,CACX,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,MAA0B;IACrD,OAAO;QACL,IAAI,EAAE,cAAuB;QAC7B,QAAQ,EAAE,CAAC,MAAyB,EAAE,EAAE;YACtC,MAAM,QAAQ,GAAG,YAAY,CAAC;gBAC5B,UAAU,EAAE,MAAM,CAAC,aAAa;oBAC9B,CAAC,CAAC;wBACE,SAAS,EAAE,MAAM,CAAC,aAAa;qBAChC;oBACH,CAAC,CAAC,SAAS;aACd,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACpB,OAAO,IAAI,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC1D,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { type MisoProtocolDeployment } from "@misonetwork/sdk/deployments";
2
+ /** Complete on-chain identity used by the Miso platform SDK on one network. */
3
+ export interface MisoPlatformDeployment {
4
+ /** The protocol deployment this platform deployment was built against. */
5
+ readonly protocol: MisoProtocolDeployment;
6
+ readonly packages: {
7
+ readonly pressing: string;
8
+ readonly record: string;
9
+ readonly releaseRegistry: string;
10
+ readonly minato: string;
11
+ readonly drop: string;
12
+ readonly credit: string;
13
+ readonly compositionCredits: string;
14
+ readonly recordingCredits: string;
15
+ readonly releaseCredits: string;
16
+ /** Base royalty-pool value library. */
17
+ readonly royaltyPool: string;
18
+ /** Composition royalty-pool extension. */
19
+ readonly compositionRoyaltyPool: string;
20
+ /** Recording royalty-pool extension. */
21
+ readonly recordingRoyaltyPool: string;
22
+ /** Cover-art value type used by the release cover extension. */
23
+ readonly coverArt: string;
24
+ readonly releaseCoverArt: string;
25
+ /** External `ori::walrus_data::WalrusData` dependency used by cover art. */
26
+ readonly ori: string;
27
+ };
28
+ readonly objects: {
29
+ readonly recordSettings: string;
30
+ readonly releaseRegistry: string;
31
+ };
32
+ /** PartyOS packages used by the composed artist and wallet reads. */
33
+ readonly party: {
34
+ readonly partyPackageId: string;
35
+ readonly partyProfilePackageId: string;
36
+ readonly countryCodePackageId: string;
37
+ readonly languageCodePackageId: string;
38
+ readonly partyMediaPackageId: string;
39
+ readonly partyRolesPackageId: string;
40
+ readonly partyTagsPackageId: string;
41
+ readonly partyGenrePackageId: string;
42
+ readonly partyCtaPackageId: string;
43
+ readonly partyPlatformLinkPackageId: string;
44
+ readonly partySocialPackageId: string;
45
+ readonly partyMusicPackageId: string;
46
+ readonly partyProLinkPackageId: string;
47
+ readonly partyFeaturedDropPackageId: string;
48
+ readonly genrePackageId: string;
49
+ };
50
+ readonly legacy: {
51
+ readonly releaseCoverArtPackages: readonly string[];
52
+ };
53
+ }
54
+ /**
55
+ * Platform deployments bundled with this SDK release.
56
+ *
57
+ * Mainnet is intentionally absent until the complete platform stack is live.
58
+ * Mainnet is intentionally unavailable until this ABI is deployed there.
59
+ */
60
+ export declare const MISO_PLATFORM_DEPLOYMENTS: {
61
+ readonly testnet: {
62
+ readonly protocol: {
63
+ readonly packageId: "0x974d453e82b09ac90d29cf65d981d3cf3cabe1e5ca9c6348f42860226ef9b5c4";
64
+ };
65
+ readonly packages: {
66
+ readonly pressing: "0xd0913b584d87a3891a8013c58644e3896f438fd948e819a69db256b47314974e";
67
+ readonly record: "0x97e2772d81528c69e21b6681f6702f90deae2a6b079e19da1df53f9f4fdd3271";
68
+ readonly releaseRegistry: "0x683b2feb784a815171d2976418345bd41c046e159dcf7a16890c766f69fd7808";
69
+ readonly minato: "0x8466e9864c1d947888e73b0e349b035bc22805579eef18f132966f56c8efe1d2";
70
+ readonly drop: "0xfc2b51f068dee9d5482d39fa017164f6a8c3601cabb59084a518de5f609ef1c7";
71
+ readonly credit: "0x0121926470393cc93b89b5b6d5067737a8bc0c1c545fb96c4447569174116174";
72
+ readonly compositionCredits: "0xfa2f62db28f2eb42c8c1a6533097fb2095649efab05c0527be1874b9be6cdc73";
73
+ readonly recordingCredits: "0xc794252bd90efb4cc224107f9dd0a56d4f4f5623783628b6af286f6535dd4c1e";
74
+ readonly releaseCredits: "0x42e2dbf6098d18782911460ecf79b338af2f1b654ef7ba99c6e7344fd4bf3f94";
75
+ readonly royaltyPool: "0x798fb353a5dbed51a0df08a7c10fdc432a11d60b55e016102ca635f9033c654d";
76
+ readonly compositionRoyaltyPool: "0xc22693ec50312492d7da23f3544625df637a92cd2be08e09d0f2eb8ff4e0e7ac";
77
+ readonly recordingRoyaltyPool: "0x33c9149889ef9e8078a5eba5c5486e8938e2dc69b3bd49a45c5c57e9f3d898a8";
78
+ readonly coverArt: "0xb29052d1174835a8061149aeca08f53551fa0691de64350247fc5cb558f797a0";
79
+ readonly releaseCoverArt: "0x831a612920343696de7e8f0603ff4c0b21c43ca3de478feb96d230e263cd11d4";
80
+ readonly ori: "0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78";
81
+ };
82
+ readonly objects: {
83
+ readonly recordSettings: "0x6a005dad071562d421ad7a9d368289f5c9f0408ca495cd466a1f774d65a21fa7";
84
+ readonly releaseRegistry: "0x5941b8690916e762a7583363906496d64a6ea3e6cedb078c90e23e7c671544f2";
85
+ };
86
+ readonly party: {
87
+ readonly partyPackageId: "0x09a812d46c3aa3978703c8e5a7409ba67b9ba2dfdb91154e48ebdd9d2415da0c";
88
+ readonly partyProfilePackageId: "0xce89d3f993dfebc0b697388598c3b01e9db7b73fa2e8df18ed22608cf7ac5aee";
89
+ readonly countryCodePackageId: "0x6c3a53f228ccd089825d0fb5ee1f0465a4b7a438bc1b1735b4e2f01df8d056e9";
90
+ readonly languageCodePackageId: "0xa18b786807cfc45488691f93aa647800b77cf9993e420d110afd7024c5b15948";
91
+ readonly partyMediaPackageId: "0x7db56ef37692f84c1cfb0e0b26bde35ac9f1bc0bcd91ac5d24b3f8b4d1821349";
92
+ readonly partyRolesPackageId: "0x41a442a2c39368af2181e73ea5b90e2e0b4f89de09050c121a6e7d79e7c84415";
93
+ readonly partyTagsPackageId: "0xa4c7f6b05bb9b612ea7640974c150ce31ad7927ea82d3f9f4673acac7deef0da";
94
+ readonly partyGenrePackageId: "0x6ce063438be6cf44ccf5f17bf8892c9e0cef4e2344442aeb44412beead74d3a8";
95
+ readonly partyCtaPackageId: "0x85a312210d9ddbae535e0f933032c8a56aa3f0fe1d6c3430d4fa538765008da3";
96
+ readonly partyPlatformLinkPackageId: "0x46d9f3e05d2065a926b010fe833baf61e5c250c233d512a260cbe746b02c56af";
97
+ readonly partySocialPackageId: "0x438e767ce8f5699f12be1704a12ff69c28045ca241f890ca8a978d55e09f6541";
98
+ readonly partyMusicPackageId: "0x89add347dfa779aa77e21b1853a37f2054dbecfce29799b61463d9900877b7b1";
99
+ readonly partyProLinkPackageId: "0xe5e8a0d02b43037abb7e6ddb4b742c6197aadf2dc19910957bba98307bef4103";
100
+ readonly partyFeaturedDropPackageId: "0x1a7b926686565a6cc82a9e0630839dc1f75c9bf4fafc0ba789a05af2c3c269f0";
101
+ readonly genrePackageId: "0xcbbce10e8b0781d458e88ce99d08e0c85f1e674c5b7ec975383d74f87a1d76b1";
102
+ };
103
+ readonly legacy: {
104
+ readonly releaseCoverArtPackages: readonly ["0x25c3c87ef4823d62d80dd8bda714ef4976df0f04453997646659a6cebadd655b", "0x1ee2cae0da7595d7973c310c912434ef531589b468cc57839296810c1385f7f6", "0x7d4a205a68f8e768a408c9f4c45a4d4076722c5edeba9068c0ac058f554e964e"];
105
+ };
106
+ };
107
+ };
108
+ /** Resolve a bundled platform deployment, failing closed when it is unavailable. */
109
+ export declare function getMisoPlatformDeployment(network: string): MisoPlatformDeployment;
110
+ //# sourceMappingURL=deployments.d.ts.map
@@ -0,0 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MAAM,CAAC;QAChC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;QACvC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;QACtC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;QACvC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;QACrC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;QACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;QACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;QACrC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;QACnC,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;QAC5C,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;QACtC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;QACrC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;QACvC,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;QAC5C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;KACjC,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,uBAAuB,EAAE,SAAS,MAAM,EAAE,CAAC;KACrD,CAAC;CACH;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFmC,CAAC;AAE1E,oFAAoF;AACpF,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,GACd,sBAAsB,CAaxB"}
@@ -0,0 +1,69 @@
1
+ // Copyright (c) Miso Labs, Inc.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { MISO_PROTOCOL_DEPLOYMENTS, } from "@misonetwork/sdk/deployments";
4
+ /**
5
+ * Platform deployments bundled with this SDK release.
6
+ *
7
+ * Mainnet is intentionally absent until the complete platform stack is live.
8
+ * Mainnet is intentionally unavailable until this ABI is deployed there.
9
+ */
10
+ export const MISO_PLATFORM_DEPLOYMENTS = {
11
+ testnet: {
12
+ protocol: MISO_PROTOCOL_DEPLOYMENTS.testnet,
13
+ packages: {
14
+ pressing: "0xd0913b584d87a3891a8013c58644e3896f438fd948e819a69db256b47314974e",
15
+ record: "0x97e2772d81528c69e21b6681f6702f90deae2a6b079e19da1df53f9f4fdd3271",
16
+ releaseRegistry: "0x683b2feb784a815171d2976418345bd41c046e159dcf7a16890c766f69fd7808",
17
+ minato: "0x8466e9864c1d947888e73b0e349b035bc22805579eef18f132966f56c8efe1d2",
18
+ drop: "0xfc2b51f068dee9d5482d39fa017164f6a8c3601cabb59084a518de5f609ef1c7",
19
+ credit: "0x0121926470393cc93b89b5b6d5067737a8bc0c1c545fb96c4447569174116174",
20
+ compositionCredits: "0xfa2f62db28f2eb42c8c1a6533097fb2095649efab05c0527be1874b9be6cdc73",
21
+ recordingCredits: "0xc794252bd90efb4cc224107f9dd0a56d4f4f5623783628b6af286f6535dd4c1e",
22
+ releaseCredits: "0x42e2dbf6098d18782911460ecf79b338af2f1b654ef7ba99c6e7344fd4bf3f94",
23
+ royaltyPool: "0x798fb353a5dbed51a0df08a7c10fdc432a11d60b55e016102ca635f9033c654d",
24
+ compositionRoyaltyPool: "0xc22693ec50312492d7da23f3544625df637a92cd2be08e09d0f2eb8ff4e0e7ac",
25
+ recordingRoyaltyPool: "0x33c9149889ef9e8078a5eba5c5486e8938e2dc69b3bd49a45c5c57e9f3d898a8",
26
+ coverArt: "0xb29052d1174835a8061149aeca08f53551fa0691de64350247fc5cb558f797a0",
27
+ releaseCoverArt: "0x831a612920343696de7e8f0603ff4c0b21c43ca3de478feb96d230e263cd11d4",
28
+ ori: "0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78",
29
+ },
30
+ objects: {
31
+ recordSettings: "0x6a005dad071562d421ad7a9d368289f5c9f0408ca495cd466a1f774d65a21fa7",
32
+ releaseRegistry: "0x5941b8690916e762a7583363906496d64a6ea3e6cedb078c90e23e7c671544f2",
33
+ },
34
+ party: {
35
+ partyPackageId: "0x09a812d46c3aa3978703c8e5a7409ba67b9ba2dfdb91154e48ebdd9d2415da0c",
36
+ partyProfilePackageId: "0xce89d3f993dfebc0b697388598c3b01e9db7b73fa2e8df18ed22608cf7ac5aee",
37
+ countryCodePackageId: "0x6c3a53f228ccd089825d0fb5ee1f0465a4b7a438bc1b1735b4e2f01df8d056e9",
38
+ languageCodePackageId: "0xa18b786807cfc45488691f93aa647800b77cf9993e420d110afd7024c5b15948",
39
+ partyMediaPackageId: "0x7db56ef37692f84c1cfb0e0b26bde35ac9f1bc0bcd91ac5d24b3f8b4d1821349",
40
+ partyRolesPackageId: "0x41a442a2c39368af2181e73ea5b90e2e0b4f89de09050c121a6e7d79e7c84415",
41
+ partyTagsPackageId: "0xa4c7f6b05bb9b612ea7640974c150ce31ad7927ea82d3f9f4673acac7deef0da",
42
+ partyGenrePackageId: "0x6ce063438be6cf44ccf5f17bf8892c9e0cef4e2344442aeb44412beead74d3a8",
43
+ partyCtaPackageId: "0x85a312210d9ddbae535e0f933032c8a56aa3f0fe1d6c3430d4fa538765008da3",
44
+ partyPlatformLinkPackageId: "0x46d9f3e05d2065a926b010fe833baf61e5c250c233d512a260cbe746b02c56af",
45
+ partySocialPackageId: "0x438e767ce8f5699f12be1704a12ff69c28045ca241f890ca8a978d55e09f6541",
46
+ partyMusicPackageId: "0x89add347dfa779aa77e21b1853a37f2054dbecfce29799b61463d9900877b7b1",
47
+ partyProLinkPackageId: "0xe5e8a0d02b43037abb7e6ddb4b742c6197aadf2dc19910957bba98307bef4103",
48
+ partyFeaturedDropPackageId: "0x1a7b926686565a6cc82a9e0630839dc1f75c9bf4fafc0ba789a05af2c3c269f0",
49
+ genrePackageId: "0xcbbce10e8b0781d458e88ce99d08e0c85f1e674c5b7ec975383d74f87a1d76b1",
50
+ },
51
+ legacy: {
52
+ releaseCoverArtPackages: [
53
+ "0x25c3c87ef4823d62d80dd8bda714ef4976df0f04453997646659a6cebadd655b",
54
+ "0x1ee2cae0da7595d7973c310c912434ef531589b468cc57839296810c1385f7f6",
55
+ "0x7d4a205a68f8e768a408c9f4c45a4d4076722c5edeba9068c0ac058f554e964e",
56
+ ],
57
+ },
58
+ },
59
+ };
60
+ /** Resolve a bundled platform deployment, failing closed when it is unavailable. */
61
+ export function getMisoPlatformDeployment(network) {
62
+ const deployment = MISO_PLATFORM_DEPLOYMENTS[network];
63
+ if (!deployment) {
64
+ throw new Error(`@misofm/sdk: no bundled Miso platform deployment for network "${network}". ` +
65
+ "Pass an explicit deployment to miso() for custom networks.");
66
+ }
67
+ return deployment;
68
+ }
69
+ //# sourceMappingURL=deployments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAEtC,OAAO,EACL,yBAAyB,GAG1B,MAAM,8BAA8B,CAAC;AAuDtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,OAAO,EAAE;QACP,QAAQ,EAAE,yBAAyB,CAAC,OAAO;QAC3C,QAAQ,EAAE;YACR,QAAQ,EACN,oEAAoE;YACtE,MAAM,EACJ,oEAAoE;YACtE,eAAe,EACb,oEAAoE;YACtE,MAAM,EACJ,oEAAoE;YACtE,IAAI,EACF,oEAAoE;YACtE,MAAM,EACJ,oEAAoE;YACtE,kBAAkB,EAChB,oEAAoE;YACtE,gBAAgB,EACd,oEAAoE;YACtE,cAAc,EACZ,oEAAoE;YACtE,WAAW,EACT,oEAAoE;YACtE,sBAAsB,EACpB,oEAAoE;YACtE,oBAAoB,EAClB,oEAAoE;YACtE,QAAQ,EACN,oEAAoE;YACtE,eAAe,EACb,oEAAoE;YACtE,GAAG,EACD,oEAAoE;SACvE;QACD,OAAO,EAAE;YACP,cAAc,EACZ,oEAAoE;YACtE,eAAe,EACb,oEAAoE;SACvE;QACD,KAAK,EAAE;YACL,cAAc,EACZ,oEAAoE;YACtE,qBAAqB,EACnB,oEAAoE;YACtE,oBAAoB,EAClB,oEAAoE;YACtE,qBAAqB,EACnB,oEAAoE;YACtE,mBAAmB,EACjB,oEAAoE;YACtE,mBAAmB,EACjB,oEAAoE;YACtE,kBAAkB,EAChB,oEAAoE;YACtE,mBAAmB,EACjB,oEAAoE;YACtE,iBAAiB,EACf,oEAAoE;YACtE,0BAA0B,EACxB,oEAAoE;YACtE,oBAAoB,EAClB,oEAAoE;YACtE,mBAAmB,EACjB,oEAAoE;YACtE,qBAAqB,EACnB,oEAAoE;YACtE,0BAA0B,EACxB,oEAAoE;YACtE,cAAc,EACZ,oEAAoE;SACvE;QACD,MAAM,EAAE;YACN,uBAAuB,EAAE;gBACvB,oEAAoE;gBACpE,oEAAoE;gBACpE,oEAAoE;aACrE;SACF;KACF;CACsE,CAAC;AAE1E,oFAAoF;AACpF,MAAM,UAAU,yBAAyB,CACvC,OAAe;IAEf,MAAM,UAAU,GACd,yBAGD,CAAC,OAAO,CAAC,CAAC;IACX,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,iEAAiE,OAAO,KAAK;YAC3E,4DAA4D,CAC/D,CAAC;IACJ,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
package/dist/execute.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { ParallelTransactionExecutor } from "@mysten/sui/transactions";
2
2
  import { type ExecResult } from "@misonetwork/sdk";
3
3
  import type { TxThunk } from "./transactions.ts";
4
+ export * from "@misonetwork/sdk/execute";
4
5
  /**
5
6
  * Builds a transaction from thunks and executes it through the parallel executor,
6
7
  * exactly ONCE.
@@ -1 +1 @@
1
- {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIjD;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,2BAA2B,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAIzH"}
1
+ {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAKjD,cAAc,0BAA0B,CAAC;AAIzC;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,2BAA2B,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAIzH"}
package/dist/execute.js CHANGED
@@ -1,6 +1,10 @@
1
1
  // Copyright (c) Miso Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { buildTx, toExecResult, FULL_INCLUDE } from "@misonetwork/sdk";
4
+ // Consumers of the platform SDK should not need a second direct dependency on
5
+ // the protocol SDK just to execute a composed PTB. Keep the generic execution
6
+ // surface available through this platform-layer entry point as well.
7
+ export * from "@misonetwork/sdk/execute";
4
8
  /**
5
9
  * Builds a transaction from thunks and executes it through the parallel executor,
6
10
  * exactly ONCE.
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAWtC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;AAKxF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,QAAqC,EAAE,GAAG,MAAiB;IAClG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;IACpC,MAAM,GAAG,GAAkD,MAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IAC/G,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"execute.js","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAWtC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAmB,MAAM,kBAAkB,CAAC;AAGxF,8EAA8E;AAC9E,8EAA8E;AAC9E,qEAAqE;AACrE,cAAc,0BAA0B,CAAC;AAIzC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,QAAqC,EAAE,GAAG,MAAiB;IAClG,MAAM,EAAE,GAAG,MAAM,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;IACpC,MAAM,GAAG,GAAkD,MAAM,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IAC/G,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- export { misoPlatform, MisoPlatformClient } from "./client.ts";
2
- export type { MisoPlatformConfig } from "./client.ts";
1
+ export { miso, misoPlatform, MisoClient, MisoPlatformClient } from "./client.ts";
2
+ export type { ConfiguredReleaseGraphParams, MisoOptions, MisoPlatformConfig, } from "./client.ts";
3
+ export * from "./deployments.ts";
3
4
  export * from "./pressing.ts";
4
5
  export * from "./transactions.ts";
5
6
  export * from "./execute.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAK7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,8BAA8B,CAAC;AAG7C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA6BA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjF,YAAY,EACV,4BAA4B,EAC5B,WAAW,EACX,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAK7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,8BAA8B,CAAC;AAG7C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}