@misofm/platform 0.0.0 → 0.19.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.
- package/LICENSE +201 -0
- package/README.md +686 -3
- package/dist/auth.d.ts +73 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +193 -0
- package/dist/auth.js.map +1 -0
- package/dist/catalog.d.ts +48 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +92 -0
- package/dist/catalog.js.map +1 -0
- package/dist/client.d.ts +459 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +783 -0
- package/dist/client.js.map +1 -0
- package/dist/contracts.d.ts +33 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +48 -0
- package/dist/contracts.js.map +1 -0
- package/dist/cover.d.ts +69 -0
- package/dist/cover.d.ts.map +1 -0
- package/dist/cover.js +132 -0
- package/dist/cover.js.map +1 -0
- package/dist/credits.d.ts +200 -0
- package/dist/credits.d.ts.map +1 -0
- package/dist/credits.js +465 -0
- package/dist/credits.js.map +1 -0
- package/dist/deployments.d.ts +221 -0
- package/dist/deployments.d.ts.map +1 -0
- package/dist/deployments.js +176 -0
- package/dist/deployments.js.map +1 -0
- package/dist/execute.d.ts +30 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +31 -0
- package/dist/execute.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +13 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +41 -0
- package/dist/internal.js.map +1 -0
- package/dist/mix.d.ts +144 -0
- package/dist/mix.d.ts.map +1 -0
- package/dist/mix.js +656 -0
- package/dist/mix.js.map +1 -0
- package/dist/pressing.d.ts +137 -0
- package/dist/pressing.d.ts.map +1 -0
- package/dist/pressing.js +390 -0
- package/dist/pressing.js.map +1 -0
- package/dist/publication.d.ts +215 -0
- package/dist/publication.d.ts.map +1 -0
- package/dist/publication.js +864 -0
- package/dist/publication.js.map +1 -0
- package/dist/queries.d.ts +2 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +8 -0
- package/dist/queries.js.map +1 -0
- package/dist/read/artist.d.ts +18 -0
- package/dist/read/artist.d.ts.map +1 -0
- package/dist/read/artist.js +86 -0
- package/dist/read/artist.js.map +1 -0
- package/dist/read/catalog.d.ts +93 -0
- package/dist/read/catalog.d.ts.map +1 -0
- package/dist/read/catalog.js +441 -0
- package/dist/read/catalog.js.map +1 -0
- package/dist/read/client.d.ts +37 -0
- package/dist/read/client.d.ts.map +1 -0
- package/dist/read/client.js +50 -0
- package/dist/read/client.js.map +1 -0
- package/dist/read/config.d.ts +68 -0
- package/dist/read/config.d.ts.map +1 -0
- package/dist/read/config.js +63 -0
- package/dist/read/config.js.map +1 -0
- package/dist/read/genres.d.ts +7 -0
- package/dist/read/genres.d.ts.map +1 -0
- package/dist/read/genres.js +38 -0
- package/dist/read/genres.js.map +1 -0
- package/dist/read/index.d.ts +14 -0
- package/dist/read/index.d.ts.map +1 -0
- package/dist/read/index.js +23 -0
- package/dist/read/index.js.map +1 -0
- package/dist/read/internal/scalars.d.ts +23 -0
- package/dist/read/internal/scalars.d.ts.map +1 -0
- package/dist/read/internal/scalars.js +57 -0
- package/dist/read/internal/scalars.js.map +1 -0
- package/dist/read/internal/walrus.d.ts +6 -0
- package/dist/read/internal/walrus.d.ts.map +1 -0
- package/dist/read/internal/walrus.js +29 -0
- package/dist/read/internal/walrus.js.map +1 -0
- package/dist/read/receipts.d.ts +41 -0
- package/dist/read/receipts.d.ts.map +1 -0
- package/dist/read/receipts.js +398 -0
- package/dist/read/receipts.js.map +1 -0
- package/dist/read/types.d.ts +328 -0
- package/dist/read/types.d.ts.map +1 -0
- package/dist/read/types.js +21 -0
- package/dist/read/types.js.map +1 -0
- package/dist/read/wallet.d.ts +74 -0
- package/dist/read/wallet.d.ts.map +1 -0
- package/dist/read/wallet.js +578 -0
- package/dist/read/wallet.js.map +1 -0
- package/dist/read/works.d.ts +29 -0
- package/dist/read/works.d.ts.map +1 -0
- package/dist/read/works.js +191 -0
- package/dist/read/works.js.map +1 -0
- package/dist/recording-extensions.d.ts +58 -0
- package/dist/recording-extensions.d.ts.map +1 -0
- package/dist/recording-extensions.js +148 -0
- package/dist/recording-extensions.js.map +1 -0
- package/dist/release-extensions.d.ts +93 -0
- package/dist/release-extensions.d.ts.map +1 -0
- package/dist/release-extensions.js +190 -0
- package/dist/release-extensions.js.map +1 -0
- package/dist/release-graph.d.ts +65 -0
- package/dist/release-graph.d.ts.map +1 -0
- package/dist/release-graph.js +136 -0
- package/dist/release-graph.js.map +1 -0
- package/dist/share-template.d.ts +3 -0
- package/dist/share-template.d.ts.map +1 -0
- package/dist/share-template.js +46 -0
- package/dist/share-template.js.map +1 -0
- package/dist/share.d.ts +67 -0
- package/dist/share.d.ts.map +1 -0
- package/dist/share.js +157 -0
- package/dist/share.js.map +1 -0
- package/dist/transactions.d.ts +216 -0
- package/dist/transactions.d.ts.map +1 -0
- package/dist/transactions.js +314 -0
- package/dist/transactions.js.map +1 -0
- package/dist/vault.d.ts +364 -0
- package/dist/vault.d.ts.map +1 -0
- package/dist/vault.js +507 -0
- package/dist/vault.js.map +1 -0
- package/package.json +145 -5
- package/src/auth.ts +275 -0
- package/src/catalog.ts +189 -0
- package/src/client.ts +1310 -0
- package/src/contracts.ts +53 -0
- package/src/cover.ts +240 -0
- package/src/credits.ts +906 -0
- package/src/deployments.ts +354 -0
- package/src/execute.ts +52 -0
- package/src/index.ts +69 -0
- package/src/internal.ts +46 -0
- package/src/mix.ts +910 -0
- package/src/pressing.ts +705 -0
- package/src/publication.ts +1205 -0
- package/src/queries.ts +9 -0
- package/src/read/artist.ts +118 -0
- package/src/read/catalog.ts +668 -0
- package/src/read/client.ts +87 -0
- package/src/read/config.ts +138 -0
- package/src/read/genres.ts +37 -0
- package/src/read/index.ts +85 -0
- package/src/read/internal/scalars.ts +59 -0
- package/src/read/internal/walrus.ts +42 -0
- package/src/read/receipts.ts +476 -0
- package/src/read/types.ts +415 -0
- package/src/read/wallet.ts +687 -0
- package/src/read/works.ts +297 -0
- package/src/recording-extensions.ts +241 -0
- package/src/release-extensions.ts +311 -0
- package/src/release-graph.ts +219 -0
- package/src/share-template.ts +55 -0
- package/src/share.ts +261 -0
- package/src/transactions.ts +542 -0
- package/src/vault.ts +1009 -0
package/dist/share.js
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { fromBase64, fromHex, toBase64 } from "@mysten/sui/utils";
|
|
4
|
+
import { update_constants } from "@mysten/move-bytecode-template";
|
|
5
|
+
import { execThunks, publishedPackageId, allPublishedPackageIds, createdByType, allCreatedByType, } from "@misofm/protocol";
|
|
6
|
+
import { publishShareCurrency, initializeShareCurrency } from "./transactions.js";
|
|
7
|
+
import { SHARE_TEMPLATE } from "./share-template.js";
|
|
8
|
+
import { executeViaExecutor } from "./execute.js";
|
|
9
|
+
/** The protocol cap on Publish/Upgrade commands per programmable transaction. */
|
|
10
|
+
const PUBLISHES_PER_PTB = 5;
|
|
11
|
+
/** Initializes batched per PTB (each is one moveCall + transfer; all share the 0xc registry). */
|
|
12
|
+
const INITS_PER_PTB = 10;
|
|
13
|
+
// Address-free type markers: gRPC object types carry fully-normalized addresses
|
|
14
|
+
// (e.g. 0x0000…0002::coin::TreasuryCap), so we match on module::type rather than a
|
|
15
|
+
// short "0x2" prefix that would never match.
|
|
16
|
+
const CURRENCY_TYPE = "::coin_registry::Currency<";
|
|
17
|
+
const TREASURY_CAP_TYPE = "::coin::TreasuryCap<";
|
|
18
|
+
// ── Bytecode patching ────────────────────────────────────────────────────────
|
|
19
|
+
/**
|
|
20
|
+
* Patches the `INITIALIZER` constant in the share module bytecode, replacing the
|
|
21
|
+
* 32-byte zero-address placeholder with `initializerAddress`. The template is left
|
|
22
|
+
* untouched; a fresh patched copy is returned. `share::initialize` asserts the
|
|
23
|
+
* sender equals this address, so it must be the signer that will initialize.
|
|
24
|
+
*/
|
|
25
|
+
export function patchInitializer(template, initializerAddress) {
|
|
26
|
+
const moduleBytes = fromBase64(template.modules[0]);
|
|
27
|
+
// BCS-encoded vector<u8> of 32 zero bytes: [length=32, 0×32].
|
|
28
|
+
const oldValue = new Uint8Array(33);
|
|
29
|
+
oldValue[0] = 32;
|
|
30
|
+
// BCS-encoded vector<u8> of the initializer's 32 address bytes.
|
|
31
|
+
const newValue = new Uint8Array(33);
|
|
32
|
+
newValue[0] = 32;
|
|
33
|
+
newValue.set(fromHex(initializerAddress), 1);
|
|
34
|
+
const patched = update_constants(moduleBytes, newValue, oldValue, "Vector(U8)");
|
|
35
|
+
return { ...template, modules: [toBase64(patched)] };
|
|
36
|
+
}
|
|
37
|
+
/** Publishes an immutable package, then initializes a fresh share currency in a second tx. */
|
|
38
|
+
export async function createShareCurrency(client, signer, params) {
|
|
39
|
+
const signerAddress = signer.toSuiAddress();
|
|
40
|
+
const initializer = params.initializerAddress ?? signerAddress;
|
|
41
|
+
const recipient = params.treasuryCapRecipient ?? signerAddress;
|
|
42
|
+
// Tx 1: publish the share package with the initializer baked in.
|
|
43
|
+
const patched = patchInitializer(params.template ?? SHARE_TEMPLATE, initializer);
|
|
44
|
+
const publishRes = await execThunks(client, signer, publishShareCurrency(patched));
|
|
45
|
+
const packageId = publishedPackageId(publishRes);
|
|
46
|
+
// Tx 2: initialize → creates the Currency object + transfers the TreasuryCap.
|
|
47
|
+
const initRes = await execThunks(client, signer, initializeShareCurrency({
|
|
48
|
+
shareCurrencyPackageId: packageId,
|
|
49
|
+
name: params.name,
|
|
50
|
+
description: params.description,
|
|
51
|
+
iconUrl: params.iconUrl ?? "",
|
|
52
|
+
treasuryCapRecipient: recipient,
|
|
53
|
+
}));
|
|
54
|
+
return {
|
|
55
|
+
packageId,
|
|
56
|
+
currencyId: createdByType(initRes, CURRENCY_TYPE),
|
|
57
|
+
shareType: `${packageId}::share::Share`,
|
|
58
|
+
treasuryCapId: createdByType(initRes, TREASURY_CAP_TYPE),
|
|
59
|
+
gasUsed: publishRes.gasUsed + initRes.gasUsed,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
// ── Batched (parallel) ─────────────────────────────────────────────────────
|
|
63
|
+
/** Splits an array into fixed-size chunks. */
|
|
64
|
+
function chunk(items, size) {
|
|
65
|
+
const out = [];
|
|
66
|
+
for (let i = 0; i < items.length; i += size)
|
|
67
|
+
out.push(items.slice(i, i + size));
|
|
68
|
+
return out;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Publishes `count` fresh, permanently immutable share-currency packages, batched
|
|
72
|
+
* at ≤5 publishes per PTB and run concurrently through the executor. Each publish
|
|
73
|
+
* consumes its UpgradeCap in the same PTB. Returns the published package ids
|
|
74
|
+
* (fungible — order is not meaningful; the caller assigns them to work slots).
|
|
75
|
+
*/
|
|
76
|
+
export async function publishShareCurrencies(executor, initializerAddress, count, template = SHARE_TEMPLATE) {
|
|
77
|
+
if (count <= 0)
|
|
78
|
+
return { packageIds: [], gasUsed: 0 };
|
|
79
|
+
// One patched template, reused for every publish (identical bytecode → distinct packages).
|
|
80
|
+
const patched = patchInitializer(template, initializerAddress);
|
|
81
|
+
const batchSizes = [];
|
|
82
|
+
for (let remaining = count; remaining > 0; remaining -= PUBLISHES_PER_PTB) {
|
|
83
|
+
batchSizes.push(Math.min(PUBLISHES_PER_PTB, remaining));
|
|
84
|
+
}
|
|
85
|
+
const results = await Promise.all(batchSizes.map((n) => executeViaExecutor(executor, ...Array.from({ length: n }, () => publishShareCurrency(patched)))));
|
|
86
|
+
const packageIds = results.flatMap(allPublishedPackageIds);
|
|
87
|
+
const gasUsed = results.reduce((sum, r) => sum + r.gasUsed, 0);
|
|
88
|
+
if (packageIds.length !== count) {
|
|
89
|
+
throw new Error(`Expected ${count} published share packages, got ${packageIds.length}.`);
|
|
90
|
+
}
|
|
91
|
+
return { packageIds, gasUsed };
|
|
92
|
+
}
|
|
93
|
+
/** Re-associates one init PTB's created objects back to their packages by share type. */
|
|
94
|
+
function currenciesFromResult(res, batchPkgs) {
|
|
95
|
+
const currencies = allCreatedByType(res, CURRENCY_TYPE);
|
|
96
|
+
const treasuries = allCreatedByType(res, TREASURY_CAP_TYPE);
|
|
97
|
+
return batchPkgs.map((pkg) => {
|
|
98
|
+
const shareType = `${pkg}::share::Share`;
|
|
99
|
+
const currency = currencies.find((o) => o.objectType.includes(shareType));
|
|
100
|
+
const treasury = treasuries.find((o) => o.objectType.includes(shareType));
|
|
101
|
+
if (!currency)
|
|
102
|
+
throw new Error(`No Currency<${shareType}> created during initialize.`);
|
|
103
|
+
if (!treasury)
|
|
104
|
+
throw new Error(`No TreasuryCap<${shareType}> created during initialize.`);
|
|
105
|
+
return { packageId: pkg, currencyId: currency.objectId, shareType, treasuryCapId: treasury.objectId, gasUsed: 0 };
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Initializes each published package into a `Currency<Share>` + `TreasuryCap`,
|
|
110
|
+
* batched and run concurrently. `metaOf` supplies each package's display metadata,
|
|
111
|
+
* so a currency destined for a specific work is named for it.
|
|
112
|
+
*
|
|
113
|
+
* `share::initialize` is NON-idempotent (`coin_registry` registers one `Currency`
|
|
114
|
+
* per type), so a batch must never be re-run. Batches run under `Promise.allSettled`
|
|
115
|
+
* and `onBatch` fires for each SUCCEEDED batch as it lands — letting the caller
|
|
116
|
+
* persist that batch immediately. If any batch fails, the succeeded ones are already
|
|
117
|
+
* reported and this throws, so a resume re-initializes only the still-missing packages.
|
|
118
|
+
*/
|
|
119
|
+
export async function initializeShareCurrencies(executor, signerAddress, packageIds, metaOf, onBatch) {
|
|
120
|
+
if (packageIds.length === 0)
|
|
121
|
+
return { currencies: [], gasUsed: 0 };
|
|
122
|
+
const batches = chunk(packageIds, INITS_PER_PTB);
|
|
123
|
+
const settled = await Promise.allSettled(batches.map(async (batchPkgs) => {
|
|
124
|
+
const res = await executeViaExecutor(executor, ...batchPkgs.map((pkg) => {
|
|
125
|
+
const meta = metaOf(pkg);
|
|
126
|
+
return initializeShareCurrency({
|
|
127
|
+
shareCurrencyPackageId: pkg,
|
|
128
|
+
name: meta.name,
|
|
129
|
+
description: meta.description,
|
|
130
|
+
iconUrl: meta.iconUrl ?? "",
|
|
131
|
+
treasuryCapRecipient: signerAddress,
|
|
132
|
+
});
|
|
133
|
+
}));
|
|
134
|
+
const batchCurrencies = currenciesFromResult(res, batchPkgs);
|
|
135
|
+
if (onBatch)
|
|
136
|
+
await onBatch(batchCurrencies, res.gasUsed);
|
|
137
|
+
return { batchCurrencies, gasUsed: res.gasUsed };
|
|
138
|
+
}));
|
|
139
|
+
const currencies = [];
|
|
140
|
+
const errors = [];
|
|
141
|
+
let gasUsed = 0;
|
|
142
|
+
for (const s of settled) {
|
|
143
|
+
if (s.status === "fulfilled") {
|
|
144
|
+
currencies.push(...s.value.batchCurrencies);
|
|
145
|
+
gasUsed += s.value.gasUsed;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
errors.push(s.reason);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (errors.length > 0) {
|
|
152
|
+
const msg = errors.map((e) => (e instanceof Error ? e.message : String(e))).join("; ");
|
|
153
|
+
throw new Error(`${errors.length}/${batches.length} initialize batch(es) failed: ${msg}`);
|
|
154
|
+
}
|
|
155
|
+
return { currencies, gasUsed };
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=share.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.js","sourceRoot":"","sources":["../src/share.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,sCAAsC;AAwBtC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE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C;QACxB,IAAI,CAAC,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YAC7B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAC5C,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvF,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC,CAAC;IAC5F,CAAC;IACD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { Transaction, type TransactionObjectArgument } from "@mysten/sui/transactions";
|
|
2
|
+
import { type CompositionParts, type RecordingParts, type ShareCurrencyBinding, type TxThunk } from "@misofm/protocol";
|
|
3
|
+
import { type AdminCapAuthority, type AdminCapCustody, type U64Input } from "./vault.ts";
|
|
4
|
+
interface ReleaseParts {
|
|
5
|
+
release: TransactionObjectArgument;
|
|
6
|
+
adminCap: TransactionObjectArgument;
|
|
7
|
+
}
|
|
8
|
+
export type { TxThunk };
|
|
9
|
+
/** New custody is explicit; the legacy address shape remains mutually exclusive. */
|
|
10
|
+
export type AdminCustodyInput = {
|
|
11
|
+
readonly adminCustody: AdminCapCustody;
|
|
12
|
+
readonly adminAddress?: never;
|
|
13
|
+
} | {
|
|
14
|
+
readonly adminCustody?: never;
|
|
15
|
+
readonly adminAddress: string;
|
|
16
|
+
};
|
|
17
|
+
export type RecordingAuthorityInput = {
|
|
18
|
+
readonly recordingAuthority: AdminCapAuthority;
|
|
19
|
+
readonly recordingAdminCapId?: never;
|
|
20
|
+
} | {
|
|
21
|
+
readonly recordingAuthority?: never;
|
|
22
|
+
readonly recordingAdminCapId: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function custodyOf(input: AdminCustodyInput): AdminCapCustody;
|
|
25
|
+
export declare function recordingAuthorityOf(input: RecordingAuthorityInput): AdminCapAuthority;
|
|
26
|
+
/** Reject a malformed multi-result command before it becomes a PTB argument. */
|
|
27
|
+
export declare function requiredCommandResult<T>(result: {
|
|
28
|
+
readonly [index: number]: T | undefined;
|
|
29
|
+
}, index: number, command: string): T;
|
|
30
|
+
export interface ShareRecipient {
|
|
31
|
+
address: string;
|
|
32
|
+
value: U64Input;
|
|
33
|
+
}
|
|
34
|
+
export interface CreateShareStakeParams {
|
|
35
|
+
readonly balance: TransactionObjectArgument;
|
|
36
|
+
readonly shareType: string;
|
|
37
|
+
readonly value: U64Input;
|
|
38
|
+
readonly royaltyPoolPackageId: string;
|
|
39
|
+
}
|
|
40
|
+
/** Split shares from a Balance and return a fresh, unregistered Stake object. */
|
|
41
|
+
export declare function createShareStake(tx: Transaction, params: CreateShareStakeParams): TransactionObjectArgument;
|
|
42
|
+
export interface RegisterShareStakeParams {
|
|
43
|
+
readonly stake: TransactionObjectArgument;
|
|
44
|
+
readonly pool: TransactionObjectArgument;
|
|
45
|
+
readonly shareType: string;
|
|
46
|
+
readonly currencyType: string;
|
|
47
|
+
readonly royaltyPoolPackageId: string;
|
|
48
|
+
}
|
|
49
|
+
/** Register an existing Stake with one RoyaltyPool. */
|
|
50
|
+
export declare function registerShareStake(tx: Transaction, params: RegisterShareStakeParams): void;
|
|
51
|
+
export interface CreateShareStakesParams {
|
|
52
|
+
readonly balance: TransactionObjectArgument;
|
|
53
|
+
readonly shareType: string;
|
|
54
|
+
readonly recipients: readonly ShareRecipient[];
|
|
55
|
+
readonly royaltyPoolPackageId: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Convert an entire share Balance into one unregistered Stake per recipient.
|
|
59
|
+
* The emptied Balance is destroyed, so recipient values must consume it exactly.
|
|
60
|
+
* Returned stakes remain caller-controlled for optional registration and transfer.
|
|
61
|
+
*/
|
|
62
|
+
export declare function createShareStakes(tx: Transaction, params: CreateShareStakesParams): TransactionObjectArgument[];
|
|
63
|
+
export interface ShareRoyaltyPoolParams {
|
|
64
|
+
readonly pool: TransactionObjectArgument;
|
|
65
|
+
readonly shareType: string;
|
|
66
|
+
readonly currencyType: string;
|
|
67
|
+
readonly royaltyPoolPackageId: string;
|
|
68
|
+
}
|
|
69
|
+
/** Consume an unshared RoyaltyPool and make it globally accessible. */
|
|
70
|
+
export declare function shareRoyaltyPool(tx: Transaction, params: ShareRoyaltyPoolParams): void;
|
|
71
|
+
/**
|
|
72
|
+
* Splits a share `Balance` across `recipients` via `minato::disperse_balance`, then
|
|
73
|
+
* destroys the emptied balance. Exposed for consumers assembling custom share
|
|
74
|
+
* distributions in their own PTBs.
|
|
75
|
+
*/
|
|
76
|
+
export declare function disperseShares(tx: Transaction, minatoPackageId: string, shareType: string, balance: TransactionObjectArgument, recipients: ShareRecipient[]): void;
|
|
77
|
+
export interface PackageBytecode {
|
|
78
|
+
modules: string[];
|
|
79
|
+
dependencies: string[];
|
|
80
|
+
digest: number[];
|
|
81
|
+
}
|
|
82
|
+
/** Publish a share package and permanently destroy its UpgradeCap in the same PTB. */
|
|
83
|
+
export declare function publishShareCurrency(bytecode: PackageBytecode): TxThunk;
|
|
84
|
+
export interface InitializeShareCurrencyParams {
|
|
85
|
+
shareCurrencyPackageId: string;
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
iconUrl: string;
|
|
89
|
+
treasuryCapRecipient: string;
|
|
90
|
+
}
|
|
91
|
+
export declare function initializeShareCurrency(params: InitializeShareCurrencyParams): TxThunk;
|
|
92
|
+
interface FinalizeCompositionParamsBase extends CompositionParts {
|
|
93
|
+
/** The composition's `share::Share` type. */
|
|
94
|
+
shareType: string;
|
|
95
|
+
shareRecipients: ShareRecipient[];
|
|
96
|
+
misoPackageId: string;
|
|
97
|
+
minatoPackageId: string;
|
|
98
|
+
}
|
|
99
|
+
export type FinalizeCompositionParams = FinalizeCompositionParamsBase & AdminCustodyInput;
|
|
100
|
+
/**
|
|
101
|
+
* The opinionated finish for a composition: disperse its share supply to
|
|
102
|
+
* `shareRecipients`, publish (share) it, and transfer its admin cap to
|
|
103
|
+
* `adminAddress`. Consumers that want different economics skip this and act on
|
|
104
|
+
* the `CompositionParts` from `@misofm/protocol`'s `createComposition` directly.
|
|
105
|
+
*/
|
|
106
|
+
export declare function finalizeComposition(tx: Transaction, params: FinalizeCompositionParams): void;
|
|
107
|
+
interface PublishCompositionParamsBase extends ShareCurrencyBinding {
|
|
108
|
+
title: string;
|
|
109
|
+
royaltyRateBps: number;
|
|
110
|
+
shareRecipients: ShareRecipient[];
|
|
111
|
+
misoPackageId: string;
|
|
112
|
+
minatoPackageId: string;
|
|
113
|
+
}
|
|
114
|
+
export type PublishCompositionParams = PublishCompositionParamsBase & AdminCustodyInput;
|
|
115
|
+
/** Convenience: publish a composition end-to-end (createComposition → finalizeComposition). */
|
|
116
|
+
export declare function publishComposition(params: PublishCompositionParams): TxThunk;
|
|
117
|
+
interface FinalizeRecordingParamsBase extends RecordingParts {
|
|
118
|
+
/** The recording's own `share::Share` type. */
|
|
119
|
+
recordingShareType: string;
|
|
120
|
+
/** Share type of the parent composition. */
|
|
121
|
+
compositionShareType: string;
|
|
122
|
+
shareRecipients: ShareRecipient[];
|
|
123
|
+
misoPackageId: string;
|
|
124
|
+
minatoPackageId: string;
|
|
125
|
+
}
|
|
126
|
+
export type FinalizeRecordingParams = FinalizeRecordingParamsBase & AdminCustodyInput;
|
|
127
|
+
/**
|
|
128
|
+
* The opinionated finish for a recording: publish (share) it, disperse its
|
|
129
|
+
* share supply, and transfer its admin cap to `adminAddress`. A recording has
|
|
130
|
+
* no embedded metadata to set — naming lives in the metadata extension.
|
|
131
|
+
*/
|
|
132
|
+
export declare function finalizeRecording(tx: Transaction, params: FinalizeRecordingParams): void;
|
|
133
|
+
interface PublishRecordingParamsBase extends ShareCurrencyBinding {
|
|
134
|
+
/**
|
|
135
|
+
* Parent composition, referenced as an on-chain object. Read-only at
|
|
136
|
+
* `recording::new` (only its royalty rate and id are read).
|
|
137
|
+
*/
|
|
138
|
+
compositionId: string;
|
|
139
|
+
/** Share type of the parent composition (the recording's `CompositionShare` phantom). */
|
|
140
|
+
compositionShareType: string;
|
|
141
|
+
shareRecipients: ShareRecipient[];
|
|
142
|
+
misoPackageId: string;
|
|
143
|
+
minatoPackageId: string;
|
|
144
|
+
}
|
|
145
|
+
export type PublishRecordingParams = PublishRecordingParamsBase & AdminCustodyInput;
|
|
146
|
+
/** Convenience: publish a recording against an already-on-chain composition. */
|
|
147
|
+
export declare function publishRecording(params: PublishRecordingParams): TxThunk;
|
|
148
|
+
export interface PublishCompositionAndRecordingParams {
|
|
149
|
+
title: string;
|
|
150
|
+
royaltyRateBps: number;
|
|
151
|
+
/** Share-currency binding for the composition. */
|
|
152
|
+
composition: ShareCurrencyBinding & {
|
|
153
|
+
shareRecipients: ShareRecipient[];
|
|
154
|
+
} & AdminCustodyInput;
|
|
155
|
+
/** Share-currency binding for the recording. */
|
|
156
|
+
recording: ShareCurrencyBinding & {
|
|
157
|
+
shareRecipients: ShareRecipient[];
|
|
158
|
+
} & AdminCustodyInput;
|
|
159
|
+
misoPackageId: string;
|
|
160
|
+
minatoPackageId: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Publishes a composition and its recording in a single atomic PTB.
|
|
164
|
+
*
|
|
165
|
+
* The ordering is load-bearing: `recording::new` borrows the composition by
|
|
166
|
+
* immutable reference, so it must run while the composition is still an unshared,
|
|
167
|
+
* transaction-local value — i.e. AFTER `composition::new` but BEFORE
|
|
168
|
+
* `composition::publish` (which moves the composition into `share_object`). Hence:
|
|
169
|
+
* `composition::new` → `recording::new(&comp)` → finalize composition (publish) →
|
|
170
|
+
* finalize recording (publish).
|
|
171
|
+
*/
|
|
172
|
+
export declare function publishCompositionAndRecording(params: PublishCompositionAndRecordingParams): TxThunk;
|
|
173
|
+
interface FinalizeReleaseParamsBase extends ReleaseParts {
|
|
174
|
+
/** Explicit direct delivery or Vault custody for the ReleaseAdminCap. */
|
|
175
|
+
misoPackageId: string;
|
|
176
|
+
}
|
|
177
|
+
export type FinalizeReleaseParams = FinalizeReleaseParamsBase & AdminCustodyInput;
|
|
178
|
+
/**
|
|
179
|
+
* The opinionated finish for a release: publish (share) it and transfer its
|
|
180
|
+
* admin cap to `adminAddress`.
|
|
181
|
+
*
|
|
182
|
+
* MUST run in the same PTB as `release::new(registry, …)` that produced
|
|
183
|
+
* these parts —
|
|
184
|
+
* `Release` is `key`-only with no `drop`, so an unpublished release cannot
|
|
185
|
+
* outlive its transaction. Splitting create from finalize is what lets a caller
|
|
186
|
+
* do something else with the cap (route it to a vault, hand it to another
|
|
187
|
+
* package, keep it for later commands) instead of a plain address transfer.
|
|
188
|
+
*/
|
|
189
|
+
export declare function finalizeRelease(tx: Transaction, params: FinalizeReleaseParams): void;
|
|
190
|
+
interface TrackInputBase {
|
|
191
|
+
recordingId: string;
|
|
192
|
+
/** Explicit legacy direct cap or Vault custody authority for this recording. */
|
|
193
|
+
/** Share type of the recording (the track `RecordingShare` phantom). */
|
|
194
|
+
recordingShareType: string;
|
|
195
|
+
/** Share type of the parent composition (the track `CompositionShare` phantom). */
|
|
196
|
+
compositionShareType: string;
|
|
197
|
+
splitBps: number;
|
|
198
|
+
}
|
|
199
|
+
export type TrackInput = TrackInputBase & RecordingAuthorityInput;
|
|
200
|
+
interface PublishReleaseParamsBase {
|
|
201
|
+
title: string;
|
|
202
|
+
/** The ordered tracklist. Display grouping (discs/sides) is extension data. */
|
|
203
|
+
tracks: TrackInput[];
|
|
204
|
+
/** Shared core `miso::release::ReleaseRegistry` object. */
|
|
205
|
+
releaseRegistryId: string;
|
|
206
|
+
releaseId: string;
|
|
207
|
+
releaseNonce: string;
|
|
208
|
+
misoPackageId: string;
|
|
209
|
+
}
|
|
210
|
+
export type PublishReleaseParams = PublishReleaseParamsBase & AdminCustodyInput;
|
|
211
|
+
/**
|
|
212
|
+
* Convenience: publish a release end-to-end, assembling its tracklist from
|
|
213
|
+
* recording admin caps held by the sender.
|
|
214
|
+
*/
|
|
215
|
+
export declare function publishRelease(params: PublishReleaseParams): TxThunk;
|
|
216
|
+
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/transactions.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,WAAW,EAAE,KAAK,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAIL,KAAK,gBAAgB,EAGrB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAiE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMxJ,UAAU,YAAY;IACpB,OAAO,EAAE,yBAAyB,CAAC;IACnC,QAAQ,EAAE,yBAAyB,CAAC;CACrC;AAID,YAAY,EAAE,OAAO,EAAE,CAAC;AAExB,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAA;CAAE,GACzE;IAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE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