@misofm/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +248 -0
- package/dist/catalog.d.ts +31 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +45 -0
- package/dist/catalog.js.map +1 -0
- package/dist/client.d.ts +134 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +113 -0
- package/dist/client.js.map +1 -0
- package/dist/contracts/miso_pressing/certificate.d.ts +78 -0
- package/dist/contracts/miso_pressing/certificate.d.ts.map +1 -0
- package/dist/contracts/miso_pressing/certificate.js +91 -0
- package/dist/contracts/miso_pressing/certificate.js.map +1 -0
- package/dist/contracts/miso_pressing/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/miso_pressing/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/miso_pressing/deps/std/type_name.js +20 -0
- package/dist/contracts/miso_pressing/deps/std/type_name.js.map +1 -0
- package/dist/contracts/miso_pressing/listing.d.ts +449 -0
- package/dist/contracts/miso_pressing/listing.d.ts.map +1 -0
- package/dist/contracts/miso_pressing/listing.js +416 -0
- package/dist/contracts/miso_pressing/listing.js.map +1 -0
- package/dist/contracts/miso_pressing/pressing.d.ts +365 -0
- package/dist/contracts/miso_pressing/pressing.d.ts.map +1 -0
- package/dist/contracts/miso_pressing/pressing.js +335 -0
- package/dist/contracts/miso_pressing/pressing.js.map +1 -0
- package/dist/contracts/utils/index.d.ts +31 -0
- package/dist/contracts/utils/index.d.ts.map +1 -0
- package/dist/contracts/utils/index.js +162 -0
- package/dist/contracts/utils/index.js.map +1 -0
- package/dist/execute.d.ts +17 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +21 -0
- package/dist/execute.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/pressing.d.ts +223 -0
- package/dist/pressing.d.ts.map +1 -0
- package/dist/pressing.js +280 -0
- package/dist/pressing.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/release-graph.d.ts +93 -0
- package/dist/release-graph.d.ts.map +1 -0
- package/dist/release-graph.js +143 -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 +66 -0
- package/dist/share.d.ts.map +1 -0
- package/dist/share.js +156 -0
- package/dist/share.js.map +1 -0
- package/dist/transactions.d.ts +177 -0
- package/dist/transactions.d.ts.map +1 -0
- package/dist/transactions.js +237 -0
- package/dist/transactions.js.map +1 -0
- package/package.json +99 -0
- package/src/catalog.ts +77 -0
- package/src/client.ts +249 -0
- package/src/contracts/miso_pressing/certificate.ts +129 -0
- package/src/contracts/miso_pressing/deps/std/type_name.ts +22 -0
- package/src/contracts/miso_pressing/listing.ts +621 -0
- package/src/contracts/miso_pressing/pressing.ts +454 -0
- package/src/contracts/utils/index.ts +229 -0
- package/src/execute.ts +34 -0
- package/src/index.ts +29 -0
- package/src/pressing.ts +497 -0
- package/src/queries.ts +9 -0
- package/src/release-graph.ts +279 -0
- package/src/share-template.ts +55 -0
- package/src/share.ts +258 -0
- package/src/transactions.ts +440 -0
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { ClientWithCoreApi } from "@mysten/sui/client";
|
|
2
|
+
import type { Signer } from "@mysten/sui/cryptography";
|
|
3
|
+
import * as listingContract from "./contracts/miso_pressing/listing.ts";
|
|
4
|
+
import * as pressingContract from "./contracts/miso_pressing/pressing.ts";
|
|
5
|
+
import type { BuyRecordParams, GetSaleParams, ListingView, OpenListingParams, OpenPressingParams, PressingView, SetListingPriceParams, SetListingStateParams, SetPressingStateParams } from "./pressing.ts";
|
|
6
|
+
import { publishShareCurrency, initializeShareCurrency } from "./transactions.ts";
|
|
7
|
+
import type { TxThunk, PublishCompositionParams, PublishRecordingParams, PublishCompositionAndRecordingParams } from "./transactions.ts";
|
|
8
|
+
import * as share from "./share.ts";
|
|
9
|
+
export interface MisoPlatformConfig {
|
|
10
|
+
/** The published `miso_pressing` package. */
|
|
11
|
+
packageId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The `miso_record` shared `Settings` that authorizes `miso_pressing`'s
|
|
14
|
+
* `MintWitness`. Required to buy; optional if this client only ever reads.
|
|
15
|
+
*/
|
|
16
|
+
settingsId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The `@misonetwork/sdk` protocol package (miso core). Required for the
|
|
19
|
+
* publish builders (`publishComposition`, `publishRecording`,
|
|
20
|
+
* `publishCompositionAndRecording`) — optional if this client only ever
|
|
21
|
+
* sells pressed records.
|
|
22
|
+
*/
|
|
23
|
+
misoPackageId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The minato share-disperse package. Bound into the publish builders so
|
|
26
|
+
* callers don't repeat it; required alongside `misoPackageId` for the same
|
|
27
|
+
* builders (they disperse shares via minato).
|
|
28
|
+
*/
|
|
29
|
+
minatoPackageId?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Params with the ids this client already knows dropped from the call site. */
|
|
32
|
+
type Configured<T> = Omit<T, "misoPressingPackageId" | "settingsId">;
|
|
33
|
+
/** Publish-builder params with the protocol/minato ids this client already knows dropped. */
|
|
34
|
+
type ConfiguredPublish<T> = Omit<T, "misoPackageId" | "minatoPackageId">;
|
|
35
|
+
export declare class MisoPlatformClient {
|
|
36
|
+
#private;
|
|
37
|
+
constructor(client: ClientWithCoreApi, config: MisoPlatformConfig);
|
|
38
|
+
get packageId(): string;
|
|
39
|
+
/** The run itself, or `null` if this release has never opened one. */
|
|
40
|
+
getPressing(pressingId: string): Promise<PressingView | null>;
|
|
41
|
+
/** One currency's offer, or `null` if the run does not sell in it. */
|
|
42
|
+
getListing(listingId: string): Promise<ListingView | null>;
|
|
43
|
+
/** Run + one currency's offer in a single round trip, by address math. */
|
|
44
|
+
getSale(p: Configured<GetSaleParams>): Promise<{
|
|
45
|
+
pressing: PressingView | null;
|
|
46
|
+
listing: ListingView | null;
|
|
47
|
+
}>;
|
|
48
|
+
readonly ids: {
|
|
49
|
+
pressing: (releaseId: string) => string;
|
|
50
|
+
pressingAdminCap: (pressingId: string) => string;
|
|
51
|
+
listing: (pressingId: string, currencyType: string) => string;
|
|
52
|
+
sale: (releaseId: string, currencyType: string) => {
|
|
53
|
+
pressingId: string;
|
|
54
|
+
listingId: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
readonly tx: {
|
|
58
|
+
buyRecord: (p: Configured<BuyRecordParams>) => TxThunk;
|
|
59
|
+
openPressing: (p: Configured<OpenPressingParams>) => TxThunk;
|
|
60
|
+
openListing: (p: Configured<OpenListingParams>) => TxThunk;
|
|
61
|
+
setListingPrice: (p: Configured<SetListingPriceParams>) => TxThunk;
|
|
62
|
+
setListingState: (p: Configured<SetListingStateParams>) => TxThunk;
|
|
63
|
+
setPressingState: (p: Configured<SetPressingStateParams>) => TxThunk;
|
|
64
|
+
publishShareCurrency: typeof publishShareCurrency;
|
|
65
|
+
initializeShareCurrency: typeof initializeShareCurrency;
|
|
66
|
+
publishComposition: (p: ConfiguredPublish<PublishCompositionParams>) => TxThunk;
|
|
67
|
+
publishRecording: (p: ConfiguredPublish<PublishRecordingParams>) => TxThunk;
|
|
68
|
+
publishCompositionAndRecording: (p: ConfiguredPublish<PublishCompositionAndRecordingParams>) => TxThunk;
|
|
69
|
+
};
|
|
70
|
+
/** Publishes + initializes a fresh share currency (two txs). */
|
|
71
|
+
createShareCurrency(signer: Signer, params: share.CreateShareCurrencyParams): Promise<share.ShareCurrency>;
|
|
72
|
+
/** Generated Move-call bindings, for commands this facade doesn't wrap. */
|
|
73
|
+
readonly call: {
|
|
74
|
+
listing: typeof listingContract;
|
|
75
|
+
pressing: typeof pressingContract;
|
|
76
|
+
};
|
|
77
|
+
/** Generated BCS definitions, for parsing objects or events yourself. */
|
|
78
|
+
readonly bcs: {
|
|
79
|
+
Pressing: import("./contracts/utils/index.ts").MoveStruct<{
|
|
80
|
+
id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
81
|
+
release_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
82
|
+
state: import("./contracts/utils/index.ts").MoveEnum<{
|
|
83
|
+
Scheduled: import("./contracts/utils/index.ts").MoveStruct<{
|
|
84
|
+
start_timestamp_ms: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
85
|
+
}, "PressingState.Scheduled">;
|
|
86
|
+
Active: null;
|
|
87
|
+
Paused: null;
|
|
88
|
+
}, "@local-pkg/miso_pressing::pressing::PressingState">;
|
|
89
|
+
supply: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
90
|
+
}, "@local-pkg/miso_pressing::pressing::Pressing">;
|
|
91
|
+
PressingAdminCap: import("./contracts/utils/index.ts").MoveStruct<{
|
|
92
|
+
id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
93
|
+
pressing_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
94
|
+
}, "@local-pkg/miso_pressing::pressing::PressingAdminCap">;
|
|
95
|
+
Listing: import("./contracts/utils/index.ts").MoveStruct<{
|
|
96
|
+
id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
97
|
+
release_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
98
|
+
pressing_id: import("@mysten/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
99
|
+
price: import("./contracts/utils/index.ts").MoveEnum<{
|
|
100
|
+
Fixed: import("./contracts/utils/index.ts").MoveStruct<{
|
|
101
|
+
amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
102
|
+
}, "Price.Fixed">;
|
|
103
|
+
Floor: import("./contracts/utils/index.ts").MoveStruct<{
|
|
104
|
+
amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
105
|
+
}, "Price.Floor">;
|
|
106
|
+
}, "@local-pkg/miso_pressing::listing::Price">;
|
|
107
|
+
state: import("./contracts/utils/index.ts").MoveEnum<{
|
|
108
|
+
Enabled: null;
|
|
109
|
+
Disabled: null;
|
|
110
|
+
}, "@local-pkg/miso_pressing::listing::ListingState">;
|
|
111
|
+
}, "@local-pkg/miso_pressing::listing::Listing<phantom Currency>">;
|
|
112
|
+
Price: import("./contracts/utils/index.ts").MoveEnum<{
|
|
113
|
+
Fixed: import("./contracts/utils/index.ts").MoveStruct<{
|
|
114
|
+
amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
115
|
+
}, "Price.Fixed">;
|
|
116
|
+
Floor: import("./contracts/utils/index.ts").MoveStruct<{
|
|
117
|
+
amount: import("@mysten/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
118
|
+
}, "Price.Floor">;
|
|
119
|
+
}, "@local-pkg/miso_pressing::listing::Price">;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Registers the platform layer on a Sui client. Pass the result to `$extend`.
|
|
124
|
+
*
|
|
125
|
+
* `settingsId` is optional so a read-only client (an indexer, a catalog page) can
|
|
126
|
+
* skip it; asking to build a purchase without it throws rather than sending a
|
|
127
|
+
* transaction against the wrong `Settings`.
|
|
128
|
+
*/
|
|
129
|
+
export declare function misoPlatform(config: MisoPlatformConfig): {
|
|
130
|
+
name: "misoPlatform";
|
|
131
|
+
register: (client: ClientWithCoreApi) => MisoPlatformClient;
|
|
132
|
+
};
|
|
133
|
+
export {};
|
|
134
|
+
//# s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;;;;;;;;;;;;;;;;;;;;;;;MAKV;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB;;uBAGhC,iBAAiB;EAEvC"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import * as listingContract from "./contracts/miso_pressing/listing.js";
|
|
4
|
+
import * as pressingContract from "./contracts/miso_pressing/pressing.js";
|
|
5
|
+
import { buyRecord, deriveListingId, derivePressingAdminCapId, derivePressingId, deriveSaleIds, getListing, getPressing, getSale, openListing, openPressing, setListingPrice, setListingState, setPressingState, } from "./pressing.js";
|
|
6
|
+
import { publishShareCurrency, initializeShareCurrency, publishComposition, publishRecording, publishCompositionAndRecording, } from "./transactions.js";
|
|
7
|
+
import * as share from "./share.js";
|
|
8
|
+
export class MisoPlatformClient {
|
|
9
|
+
#client;
|
|
10
|
+
#config;
|
|
11
|
+
constructor(client, config) {
|
|
12
|
+
this.#client = client;
|
|
13
|
+
this.#config = config;
|
|
14
|
+
}
|
|
15
|
+
get packageId() {
|
|
16
|
+
return this.#config.packageId;
|
|
17
|
+
}
|
|
18
|
+
#settings() {
|
|
19
|
+
const { settingsId } = this.#config;
|
|
20
|
+
if (!settingsId) {
|
|
21
|
+
throw new Error("misoPlatform: `settingsId` is required to build a purchase — pass it to misoPlatform({ settingsId }).");
|
|
22
|
+
}
|
|
23
|
+
return settingsId;
|
|
24
|
+
}
|
|
25
|
+
#misoPackageId() {
|
|
26
|
+
const { misoPackageId } = this.#config;
|
|
27
|
+
if (!misoPackageId) {
|
|
28
|
+
throw new Error("misoPlatform: `misoPackageId` is required for the publish builders " +
|
|
29
|
+
"(publishComposition, publishRecording, publishCompositionAndRecording) — pass it to misoPlatform({ misoPackageId }).");
|
|
30
|
+
}
|
|
31
|
+
return misoPackageId;
|
|
32
|
+
}
|
|
33
|
+
#minatoPackageId() {
|
|
34
|
+
const { minatoPackageId } = this.#config;
|
|
35
|
+
if (!minatoPackageId) {
|
|
36
|
+
throw new Error("misoPlatform: `minatoPackageId` is required for the publish builders that disperse shares " +
|
|
37
|
+
"(publishComposition, publishRecording, publishCompositionAndRecording) — pass it to misoPlatform({ minatoPackageId }).");
|
|
38
|
+
}
|
|
39
|
+
return minatoPackageId;
|
|
40
|
+
}
|
|
41
|
+
// ── Reads ─────────────────────────────────────────────────────────────────
|
|
42
|
+
/** The run itself, or `null` if this release has never opened one. */
|
|
43
|
+
getPressing(pressingId) {
|
|
44
|
+
return getPressing(this.#client, pressingId);
|
|
45
|
+
}
|
|
46
|
+
/** One currency's offer, or `null` if the run does not sell in it. */
|
|
47
|
+
getListing(listingId) {
|
|
48
|
+
return getListing(this.#client, listingId);
|
|
49
|
+
}
|
|
50
|
+
/** Run + one currency's offer in a single round trip, by address math. */
|
|
51
|
+
getSale(p) {
|
|
52
|
+
return getSale(this.#client, { ...p, misoPressingPackageId: this.packageId });
|
|
53
|
+
}
|
|
54
|
+
// ── Address math ──────────────────────────────────────────────────────────
|
|
55
|
+
ids = {
|
|
56
|
+
pressing: (releaseId) => derivePressingId(releaseId, this.packageId),
|
|
57
|
+
pressingAdminCap: (pressingId) => derivePressingAdminCapId(pressingId, this.packageId),
|
|
58
|
+
listing: (pressingId, currencyType) => deriveListingId(pressingId, currencyType, this.packageId),
|
|
59
|
+
sale: (releaseId, currencyType) => deriveSaleIds(releaseId, currencyType, this.packageId),
|
|
60
|
+
};
|
|
61
|
+
// ── Transaction builders ──────────────────────────────────────────────────
|
|
62
|
+
tx = {
|
|
63
|
+
buyRecord: (p) => buyRecord({
|
|
64
|
+
...p,
|
|
65
|
+
settingsId: this.#settings(),
|
|
66
|
+
misoPressingPackageId: this.packageId,
|
|
67
|
+
}),
|
|
68
|
+
openPressing: (p) => openPressing({ ...p, misoPressingPackageId: this.packageId }),
|
|
69
|
+
openListing: (p) => openListing({ ...p, misoPressingPackageId: this.packageId }),
|
|
70
|
+
setListingPrice: (p) => setListingPrice({ ...p, misoPressingPackageId: this.packageId }),
|
|
71
|
+
setListingState: (p) => setListingState({ ...p, misoPressingPackageId: this.packageId }),
|
|
72
|
+
setPressingState: (p) => setPressingState({ ...p, misoPressingPackageId: this.packageId }),
|
|
73
|
+
// Publishing (protocol works + minato share economics) — package-id-free
|
|
74
|
+
// builders pass through unchanged; the rest bind this client's
|
|
75
|
+
// `misoPackageId`/`minatoPackageId`, throwing at call time if either is
|
|
76
|
+
// missing (kept optional on the client so a sell-only client, e.g. a
|
|
77
|
+
// storefront that never mints new works, doesn't need to carry them).
|
|
78
|
+
publishShareCurrency,
|
|
79
|
+
initializeShareCurrency,
|
|
80
|
+
publishComposition: (p) => publishComposition({ ...p, misoPackageId: this.#misoPackageId(), minatoPackageId: this.#minatoPackageId() }),
|
|
81
|
+
publishRecording: (p) => publishRecording({ ...p, misoPackageId: this.#misoPackageId(), minatoPackageId: this.#minatoPackageId() }),
|
|
82
|
+
publishCompositionAndRecording: (p) => publishCompositionAndRecording({ ...p, misoPackageId: this.#misoPackageId(), minatoPackageId: this.#minatoPackageId() }),
|
|
83
|
+
};
|
|
84
|
+
// ── Share currency provisioning (executes; Signer pattern) ─────────────────
|
|
85
|
+
/** Publishes + initializes a fresh share currency (two txs). */
|
|
86
|
+
async createShareCurrency(signer, params) {
|
|
87
|
+
return share.createShareCurrency(this.#client, signer, params);
|
|
88
|
+
}
|
|
89
|
+
// ── Generated layer ───────────────────────────────────────────────────────
|
|
90
|
+
/** Generated Move-call bindings, for commands this facade doesn't wrap. */
|
|
91
|
+
call = { listing: listingContract, pressing: pressingContract };
|
|
92
|
+
/** Generated BCS definitions, for parsing objects or events yourself. */
|
|
93
|
+
bcs = {
|
|
94
|
+
Pressing: pressingContract.Pressing,
|
|
95
|
+
PressingAdminCap: pressingContract.PressingAdminCap,
|
|
96
|
+
Listing: listingContract.Listing,
|
|
97
|
+
Price: listingContract.Price,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Registers the platform layer on a Sui client. Pass the result to `$extend`.
|
|
102
|
+
*
|
|
103
|
+
* `settingsId` is optional so a read-only client (an indexer, a catalog page) can
|
|
104
|
+
* skip it; asking to build a purchase without it throws rather than sending a
|
|
105
|
+
* transaction against the wrong `Settings`.
|
|
106
|
+
*/
|
|
107
|
+
export function misoPlatform(config) {
|
|
108
|
+
return {
|
|
109
|
+
name: "misoPlatform",
|
|
110
|
+
register: (client) => new MisoPlatformClient(client, config),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +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,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,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAO3B,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AA+BpC,MAAM,OAAO,kBAAkB;IACpB,OAAO,CAAoB;IAC3B,OAAO,CAAqB;IAErC,YAAY,MAAyB,EAAE,MAA0B;QAC/D,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;IAChC,CAAC;I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AC7B,QAAQ,EAAE,CAAC,MAAyB,EAAE,EAAE,CAAC,IAAI,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC;KAChF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* The pressing's certificate on a record.
|
|
6
|
+
*
|
|
7
|
+
* One struct holds everything the sale fixed about a copy: where it sits in the
|
|
8
|
+
* run, and what was paid for it. These were two dynamic fields — a certificate and
|
|
9
|
+
* a receipt — and separating them bought nothing: both are written once, in the
|
|
10
|
+
* same transaction, by the same call, and neither is meaningful without the other.
|
|
11
|
+
*
|
|
12
|
+
* A serial is only meaningful inside the sequence that issued it — a different
|
|
13
|
+
* production package counts from 1 again — so the number never travels alone. It
|
|
14
|
+
* does not need to carry its pressing's id to say which sequence it means: a
|
|
15
|
+
* release has exactly one pressing, at a derived address, so
|
|
16
|
+
* `pressing::derive_id( record.release_id())` recomputes it from the record
|
|
17
|
+
* itself. Storing it would be storing a value that is pure arithmetic on values
|
|
18
|
+
* already present.
|
|
19
|
+
*/
|
|
20
|
+
import { MoveTuple, MoveStruct, type RawTransactionArgument } from '../utils/index.js';
|
|
21
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
22
|
+
export declare const CertificateKey: MoveTuple<readonly [import("@mysten/sui/bcs").BcsType<boolean, boolean, "bool">], "@local-pkg/miso_pressing::certificate::CertificateKey">;
|
|
23
|
+
export declare const Certificate: MoveStruct<{
|
|
24
|
+
/** Position in the pressing's run (1-based). */
|
|
25
|
+
number: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
26
|
+
/** The currency type the buyer paid in. */
|
|
27
|
+
purchase_currency: MoveStruct<{
|
|
28
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
29
|
+
}, "std::type_name::TypeName">;
|
|
30
|
+
/** The exact amount paid. Under a floor price this includes any tip above it. */
|
|
31
|
+
purchase_price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
32
|
+
}, "@local-pkg/miso_pressing::certificate::Certificate">;
|
|
33
|
+
export interface OfArguments {
|
|
34
|
+
record: RawTransactionArgument<string>;
|
|
35
|
+
}
|
|
36
|
+
export interface OfOptions {
|
|
37
|
+
package?: string;
|
|
38
|
+
arguments: OfArguments | [
|
|
39
|
+
record: RawTransactionArgument<string>
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The certificate on `record`, or `none` for a record minted by some other
|
|
44
|
+
* package. The only way to read the field, since only this module can construct
|
|
45
|
+
* its key.
|
|
46
|
+
*/
|
|
47
|
+
export declare function _of(options: OfOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
48
|
+
export interface NumberArguments {
|
|
49
|
+
self: TransactionArgument;
|
|
50
|
+
}
|
|
51
|
+
export interface NumberOptions {
|
|
52
|
+
package?: string;
|
|
53
|
+
arguments: NumberArguments | [
|
|
54
|
+
self: TransactionArgument
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
export declare function number(options: NumberOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
58
|
+
export interface PurchaseCurrencyArguments {
|
|
59
|
+
self: TransactionArgument;
|
|
60
|
+
}
|
|
61
|
+
export interface PurchaseCurrencyOptions {
|
|
62
|
+
package?: string;
|
|
63
|
+
arguments: PurchaseCurrencyArguments | [
|
|
64
|
+
self: TransactionArgument
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
export declare function purchaseCurrency(options: PurchaseCurrencyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
68
|
+
export interface PurchasePriceArguments {
|
|
69
|
+
self: TransactionArgument;
|
|
70
|
+
}
|
|
71
|
+
export interface PurchasePriceOptions {
|
|
72
|
+
package?: string;
|
|
73
|
+
arguments: PurchasePriceArguments | [
|
|
74
|
+
self: TransactionArgument
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
export declare function purchasePrice(options: PurchasePriceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
78
|
+
//# sourceMappingURL=certificate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso_pressing/certificate.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAA0B,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE/G,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGtF,eAAO,MAAM,cAAc,4IAAkF,CAAC;AAC9G,eAAO,MAAM,WAAW;IAChB,gDAAgD;;IAEhD,2CAA2C;;;;IAE3C,iFAAiF;;wDAEjF,CAAC;AACT,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CAC1C;AACD,MAAM,WAAW,SAAS;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,WAAW,GAAG;QACrB,MAAM,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACzC,CAAC;CACL;AACD;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,SAAS,IAM1B,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,aAAa;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,eAAe,GAAG;QACzB,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,IAMjC,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,yBAAyB;IACtC,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,uBAAuB;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,yBAAyB,GAAG;QACnC,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,IAMrD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,oBAAoB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,sBAAsB,GAAG;QAChC,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,IAM/C,IAAI,WAAW,0DAM1B"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* The pressing's certificate on a record.
|
|
6
|
+
*
|
|
7
|
+
* One struct holds everything the sale fixed about a copy: where it sits in the
|
|
8
|
+
* run, and what was paid for it. These were two dynamic fields — a certificate and
|
|
9
|
+
* a receipt — and separating them bought nothing: both are written once, in the
|
|
10
|
+
* same transaction, by the same call, and neither is meaningful without the other.
|
|
11
|
+
*
|
|
12
|
+
* A serial is only meaningful inside the sequence that issued it — a different
|
|
13
|
+
* production package counts from 1 again — so the number never travels alone. It
|
|
14
|
+
* does not need to carry its pressing's id to say which sequence it means: a
|
|
15
|
+
* release has exactly one pressing, at a derived address, so
|
|
16
|
+
* `pressing::derive_id( record.release_id())` recomputes it from the record
|
|
17
|
+
* itself. Storing it would be storing a value that is pure arithmetic on values
|
|
18
|
+
* already present.
|
|
19
|
+
*/
|
|
20
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments } from '../utils/index.js';
|
|
21
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
22
|
+
import {} from '@mysten/sui/transactions';
|
|
23
|
+
import * as type_name from './deps/std/type_name.js';
|
|
24
|
+
const $moduleName = '@local-pkg/miso_pressing::certificate';
|
|
25
|
+
export const CertificateKey = new MoveTuple({ name: `${$moduleName}::CertificateKey`, fields: [bcs.bool()] });
|
|
26
|
+
export const Certificate = new MoveStruct({ name: `${$moduleName}::Certificate`, fields: {
|
|
27
|
+
/** Position in the pressing's run (1-based). */
|
|
28
|
+
number: bcs.u64(),
|
|
29
|
+
/** The currency type the buyer paid in. */
|
|
30
|
+
purchase_currency: type_name.TypeName,
|
|
31
|
+
/** The exact amount paid. Under a floor price this includes any tip above it. */
|
|
32
|
+
purchase_price: bcs.u64()
|
|
33
|
+
} });
|
|
34
|
+
/**
|
|
35
|
+
* The certificate on `record`, or `none` for a record minted by some other
|
|
36
|
+
* package. The only way to read the field, since only this module can construct
|
|
37
|
+
* its key.
|
|
38
|
+
*/
|
|
39
|
+
export function _of(options) {
|
|
40
|
+
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
41
|
+
const argumentsTypes = [
|
|
42
|
+
null
|
|
43
|
+
];
|
|
44
|
+
const parameterNames = ["record"];
|
|
45
|
+
return (tx) => tx.moveCall({
|
|
46
|
+
package: packageAddress,
|
|
47
|
+
module: 'certificate',
|
|
48
|
+
function: 'of',
|
|
49
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export function number(options) {
|
|
53
|
+
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
54
|
+
const argumentsTypes = [
|
|
55
|
+
null
|
|
56
|
+
];
|
|
57
|
+
const parameterNames = ["self"];
|
|
58
|
+
return (tx) => tx.moveCall({
|
|
59
|
+
package: packageAddress,
|
|
60
|
+
module: 'certificate',
|
|
61
|
+
function: 'number',
|
|
62
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
export function purchaseCurrency(options) {
|
|
66
|
+
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
67
|
+
const argumentsTypes = [
|
|
68
|
+
null
|
|
69
|
+
];
|
|
70
|
+
const parameterNames = ["self"];
|
|
71
|
+
return (tx) => tx.moveCall({
|
|
72
|
+
package: packageAddress,
|
|
73
|
+
module: 'certificate',
|
|
74
|
+
function: 'purchase_currency',
|
|
75
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export function purchasePrice(options) {
|
|
79
|
+
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
80
|
+
const argumentsTypes = [
|
|
81
|
+
null
|
|
82
|
+
];
|
|
83
|
+
const parameterNames = ["self"];
|
|
84
|
+
return (tx) => tx.moveCall({
|
|
85
|
+
package: packageAddress,
|
|
86
|
+
module: 'certificate',
|
|
87
|
+
function: 'purchase_price',
|
|
88
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=certificate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificate.js","sourceRoot":"","sources":["../../../src/contracts/miso_pressing/certificate.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,sBAAsB,EAA+B,MAAM,mBAAmB,CAAC;AAC/G,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAA8C,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,SAAS,MAAM,yBAAyB,CAAC;AACrD,MAAM,WAAW,GAAG,uCA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ACvB,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD,MAAM,UAAU,gBAAgB,CAAC,OAAgC;IAC7D,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,0BAA0B,CAAC;IACrE,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,mBAAmB;QAC7B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC;AAUD,MAAM,UAAU,aAAa,CAAC,OAA6B;IACvD,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,0BAA0B,CAAC;IACrE,MAAM,cAAc,GAAG;QACnB,IAAI;KACqB,CAAC;IAC9B,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,CAAC,EAAe,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC;QACpC,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,gBAAgB;QAC1B,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE,cAAc,CAAC;KACvF,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
6
|
+
export declare const TypeName: MoveStruct<{
|
|
7
|
+
/**
|
|
8
|
+
* String representation of the type. All types are represented using their source
|
|
9
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
10
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
11
|
+
* `00000000000000000000000000000001::string::String` or
|
|
12
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
13
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
14
|
+
* 32 depending on the Move platform)
|
|
15
|
+
*/
|
|
16
|
+
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
17
|
+
}, "std::type_name::TypeName">;
|
|
18
|
+
//# sourceMappingURL=type_name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type_name.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/miso_pressing/deps/std/type_name.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE,0EAA0E;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,eAAO,MAAM,QAAQ;IACb;;;;;;;;SAQK;;8BAEL,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Functionality for converting Move types into values. Use with care! */
|
|
5
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
6
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
7
|
+
const $moduleName = 'std::type_name';
|
|
8
|
+
export const TypeName = new MoveStruct({ name: `${$moduleName}::TypeName`, fields: {
|
|
9
|
+
/**
|
|
10
|
+
* String representation of the type. All types are represented using their source
|
|
11
|
+
* syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
|
|
12
|
+
* Struct types are represented as fully qualified type names; e.g.
|
|
13
|
+
* `00000000000000000000000000000001::string::String` or
|
|
14
|
+
* `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
|
|
15
|
+
* Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
|
|
16
|
+
* 32 depending on the Move platform)
|
|
17
|
+
*/
|
|
18
|
+
name: bcs.string()
|
|
19
|
+
} });
|
|
20
|
+
//# sourceMappingURL=type_name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type_name.js","sourceRoot":"","sources":["../../../../../src/contracts/miso_pressing/deps/std/type_name.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE,0EAA0E;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,EAAE,MAAM,EAAE;QAC3E;;;;;;;;aAQK;QACL,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE;KACrB,EAAE,CAAC,CAAC"}
|