@medialane/ui 0.365.0 → 0.367.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/dist/components/approve-mint-dialog.d.cts +0 -1
- package/dist/components/approve-mint-dialog.d.ts +0 -1
- package/dist/components/fast-mint/asset-form-parts.cjs +28 -47
- package/dist/components/fast-mint/asset-form-parts.cjs.map +1 -1
- package/dist/components/fast-mint/asset-form-parts.d.cts +13 -8
- package/dist/components/fast-mint/asset-form-parts.d.ts +13 -8
- package/dist/components/fast-mint/asset-form-parts.js +29 -48
- package/dist/components/fast-mint/asset-form-parts.js.map +1 -1
- package/dist/components/fast-mint/collection-section.cjs +11 -21
- package/dist/components/fast-mint/collection-section.cjs.map +1 -1
- package/dist/components/fast-mint/collection-section.d.cts +5 -7
- package/dist/components/fast-mint/collection-section.d.ts +5 -7
- package/dist/components/fast-mint/collection-section.js +11 -21
- package/dist/components/fast-mint/collection-section.js.map +1 -1
- package/dist/components/fast-mint/create-then-add.cjs +55 -0
- package/dist/components/fast-mint/create-then-add.cjs.map +1 -0
- package/dist/components/fast-mint/create-then-add.d.cts +24 -0
- package/dist/components/fast-mint/create-then-add.d.ts +24 -0
- package/dist/components/fast-mint/create-then-add.js +30 -0
- package/dist/components/fast-mint/create-then-add.js.map +1 -0
- package/dist/components/fast-mint/dropzone.d.cts +0 -1
- package/dist/components/fast-mint/dropzone.d.ts +0 -1
- package/dist/components/fast-mint/fast-mint.cjs +68 -102
- package/dist/components/fast-mint/fast-mint.cjs.map +1 -1
- package/dist/components/fast-mint/fast-mint.js +70 -104
- package/dist/components/fast-mint/fast-mint.js.map +1 -1
- package/dist/components/fast-mint/formats/nft.cjs +233 -0
- package/dist/components/fast-mint/formats/nft.cjs.map +1 -0
- package/dist/components/fast-mint/formats/nft.d.cts +19 -0
- package/dist/components/fast-mint/formats/nft.d.ts +19 -0
- package/dist/components/fast-mint/formats/nft.js +214 -0
- package/dist/components/fast-mint/formats/nft.js.map +1 -0
- package/dist/components/fast-mint/formats/pop.cjs +160 -0
- package/dist/components/fast-mint/formats/pop.cjs.map +1 -0
- package/dist/components/fast-mint/formats/pop.d.cts +18 -0
- package/dist/components/fast-mint/formats/pop.d.ts +18 -0
- package/dist/components/fast-mint/formats/pop.js +136 -0
- package/dist/components/fast-mint/formats/pop.js.map +1 -0
- package/dist/components/fast-mint/formats/registry.cjs +42 -0
- package/dist/components/fast-mint/formats/registry.cjs.map +1 -0
- package/dist/components/fast-mint/formats/registry.d.cts +20 -0
- package/dist/components/fast-mint/formats/registry.d.ts +20 -0
- package/dist/components/fast-mint/formats/registry.js +16 -0
- package/dist/components/fast-mint/formats/registry.js.map +1 -0
- package/dist/components/fast-mint/formats/tiers.cjs +206 -0
- package/dist/components/fast-mint/formats/tiers.cjs.map +1 -0
- package/dist/components/fast-mint/formats/tiers.d.cts +19 -0
- package/dist/components/fast-mint/formats/tiers.d.ts +19 -0
- package/dist/components/fast-mint/formats/tiers.js +181 -0
- package/dist/components/fast-mint/formats/tiers.js.map +1 -0
- package/dist/components/fast-mint/formats/types.cjs +31 -0
- package/dist/components/fast-mint/formats/types.cjs.map +1 -0
- package/dist/components/fast-mint/formats/types.d.cts +71 -0
- package/dist/components/fast-mint/formats/types.d.ts +71 -0
- package/dist/components/fast-mint/formats/types.js +7 -0
- package/dist/components/fast-mint/formats/types.js.map +1 -0
- package/dist/components/fast-mint/media-kind.d.cts +0 -1
- package/dist/components/fast-mint/media-kind.d.ts +0 -1
- package/dist/components/fast-mint/success-view.cjs +18 -59
- package/dist/components/fast-mint/success-view.cjs.map +1 -1
- package/dist/components/fast-mint/success-view.d.cts +13 -8
- package/dist/components/fast-mint/success-view.d.ts +13 -8
- package/dist/components/fast-mint/success-view.js +19 -60
- package/dist/components/fast-mint/success-view.js.map +1 -1
- package/dist/components/fast-mint/types.cjs.map +1 -1
- package/dist/components/fast-mint/types.d.cts +0 -2
- package/dist/components/fast-mint/types.d.ts +0 -2
- package/dist/components/launchpad/collection-create-form.cjs +3 -2
- package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
- package/dist/components/launchpad/collection-create-form.js +3 -2
- package/dist/components/launchpad/collection-create-form.js.map +1 -1
- package/dist/components/launchpad/pop-create-fields.cjs +5 -3
- package/dist/components/launchpad/pop-create-fields.cjs.map +1 -1
- package/dist/components/launchpad/pop-create-fields.d.cts +8 -2
- package/dist/components/launchpad/pop-create-fields.d.ts +8 -2
- package/dist/components/launchpad/pop-create-fields.js +4 -3
- package/dist/components/launchpad/pop-create-fields.js.map +1 -1
- package/dist/components/launchpad/pop-create.cjs +8 -12
- package/dist/components/launchpad/pop-create.cjs.map +1 -1
- package/dist/components/launchpad/pop-create.js +8 -12
- package/dist/components/launchpad/pop-create.js.map +1 -1
- package/dist/components/launchpad/tier-mint-form.cjs +8 -25
- package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
- package/dist/components/launchpad/tier-mint-form.js +6 -23
- package/dist/components/launchpad/tier-mint-form.js.map +1 -1
- package/dist/components/transfer-dialog.d.cts +0 -1
- package/dist/components/transfer-dialog.d.ts +0 -1
- package/dist/data/launchpad-services.cjs +12 -12
- package/dist/data/launchpad-services.cjs.map +1 -1
- package/dist/data/launchpad-services.js +12 -12
- package/dist/data/launchpad-services.js.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/utils/drop/actions.d.cts +0 -1
- package/dist/utils/drop/actions.d.ts +0 -1
- package/dist/utils/drop/types.d.cts +0 -1
- package/dist/utils/drop/types.d.ts +0 -1
- package/dist/utils/launchpad-actions.cjs +90 -0
- package/dist/utils/launchpad-actions.cjs.map +1 -0
- package/dist/utils/launchpad-actions.d.cts +39 -0
- package/dist/utils/launchpad-actions.d.ts +39 -0
- package/dist/utils/launchpad-actions.js +60 -0
- package/dist/utils/launchpad-actions.js.map +1 -0
- package/dist/utils/use-transaction.d.cts +0 -1
- package/dist/utils/use-transaction.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/fast-mint/mint-asset.cjs +0 -124
- package/dist/components/fast-mint/mint-asset.cjs.map +0 -1
- package/dist/components/fast-mint/mint-asset.d.cts +0 -41
- package/dist/components/fast-mint/mint-asset.d.ts +0 -41
- package/dist/components/fast-mint/mint-asset.js +0 -100
- package/dist/components/fast-mint/mint-asset.js.map +0 -1
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var mint_asset_exports = {};
|
|
20
|
-
__export(mint_asset_exports, {
|
|
21
|
-
mintAsset: () => mintAsset
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(mint_asset_exports);
|
|
24
|
-
var import_sdk = require("@medialane/sdk");
|
|
25
|
-
var import_starknet = require("@medialane/sdk/starknet");
|
|
26
|
-
var import_ipfs_upload = require("../../utils/ipfs-upload.js");
|
|
27
|
-
async function pollForNewCollection(refetchCollections, name, symbol) {
|
|
28
|
-
for (let attempt = 0; attempt < 8; attempt++) {
|
|
29
|
-
const list = await refetchCollections();
|
|
30
|
-
const match = list.find((c) => c.name === name && c.symbol === symbol);
|
|
31
|
-
if (match?.collectionId) return match;
|
|
32
|
-
await new Promise((r) => setTimeout(r, 1500));
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
async function mintAsset(input) {
|
|
37
|
-
const { client, signer, walletAddress, values, destination } = input;
|
|
38
|
-
const image = input.mediaKind === "image" ? input.mediaUri : input.featureUri;
|
|
39
|
-
const built = (0, import_sdk.buildAssetMetadata)({
|
|
40
|
-
name: values.name,
|
|
41
|
-
description: values.description || "",
|
|
42
|
-
externalUrl: values.external_url || "",
|
|
43
|
-
imageUri: image,
|
|
44
|
-
creator: walletAddress,
|
|
45
|
-
ipType: input.ipType,
|
|
46
|
-
licenseType: values.licenseType,
|
|
47
|
-
commercialUse: values.commercialUse,
|
|
48
|
-
derivatives: values.derivatives,
|
|
49
|
-
attribution: values.attribution,
|
|
50
|
-
geographicScope: values.geographicScope,
|
|
51
|
-
aiPolicy: values.aiPolicy,
|
|
52
|
-
royalty: String(values.royalty),
|
|
53
|
-
templateTraits: input.templateFields.filter(({ traitType, value }) => traitType.trim() && value.trim()).map(({ traitType, value }) => ({ traitType, value }))
|
|
54
|
-
});
|
|
55
|
-
const metadata = { ...built };
|
|
56
|
-
if (input.mediaKind !== "image") metadata.animation_url = input.mediaUri;
|
|
57
|
-
const uploadToken = await input.getUploadToken();
|
|
58
|
-
if (!uploadToken) throw new Error("Sign in first");
|
|
59
|
-
const tokenUri = await (0, import_ipfs_upload.uploadJsonToIpfs)(client.api, metadata);
|
|
60
|
-
const royaltyBps = Math.round(values.royalty * 100);
|
|
61
|
-
let contractAddress;
|
|
62
|
-
let tokenId;
|
|
63
|
-
if (input.assetType === "single") {
|
|
64
|
-
let collectionId = destination.mode === "existing" ? destination.collectionId : "";
|
|
65
|
-
contractAddress = destination.mode === "existing" ? input.singleCollections.find((c) => c.collectionId === destination.collectionId)?.contractAddress ?? null : null;
|
|
66
|
-
if (destination.mode === "new") {
|
|
67
|
-
const created = await client.api.intents.create("create-collection", {
|
|
68
|
-
owner: walletAddress,
|
|
69
|
-
name: destination.name,
|
|
70
|
-
symbol: destination.symbol,
|
|
71
|
-
description: destination.description || void 0,
|
|
72
|
-
image
|
|
73
|
-
});
|
|
74
|
-
await (0, import_starknet.executeIntent)(signer, client, created);
|
|
75
|
-
const found = await pollForNewCollection(input.refetchCollections, destination.name, destination.symbol);
|
|
76
|
-
if (!found) throw new Error("Collection created, but it's still indexing \u2014 try minting again in a moment from My Collections.");
|
|
77
|
-
collectionId = found.collectionId;
|
|
78
|
-
contractAddress = found.contractAddress ?? null;
|
|
79
|
-
}
|
|
80
|
-
const minted = await client.api.intents.create("mint", {
|
|
81
|
-
owner: walletAddress,
|
|
82
|
-
collectionId,
|
|
83
|
-
recipient: walletAddress,
|
|
84
|
-
tokenUri,
|
|
85
|
-
royaltyBps
|
|
86
|
-
});
|
|
87
|
-
const result = await (0, import_starknet.executeIntent)(signer, client, minted);
|
|
88
|
-
tokenId = contractAddress ? (0, import_starknet.mintedTokenIdFromReceipt)(result.receipt, contractAddress) : null;
|
|
89
|
-
} else {
|
|
90
|
-
let collectionContract = destination.mode === "existing" ? destination.collectionContract : "";
|
|
91
|
-
if (destination.mode === "new") {
|
|
92
|
-
const created = await client.api.intents.create("create-collection", {
|
|
93
|
-
owner: walletAddress,
|
|
94
|
-
name: destination.name,
|
|
95
|
-
symbol: destination.symbol,
|
|
96
|
-
description: destination.description || void 0,
|
|
97
|
-
image,
|
|
98
|
-
baseUri: "",
|
|
99
|
-
service: "mip-erc1155"
|
|
100
|
-
});
|
|
101
|
-
const deployResult = await (0, import_starknet.executeIntent)(signer, client, created);
|
|
102
|
-
const deployed = (0, import_starknet.deployedCollectionFromReceipt)(deployResult.receipt, "mip-erc1155");
|
|
103
|
-
if (!deployed) throw new Error("Collection deployed, but its address couldn't be read \u2014 check My Collections to mint into it.");
|
|
104
|
-
collectionContract = deployed;
|
|
105
|
-
}
|
|
106
|
-
const minted = await client.api.intents.create("mint", {
|
|
107
|
-
owner: walletAddress,
|
|
108
|
-
recipient: walletAddress,
|
|
109
|
-
collectionContract,
|
|
110
|
-
tokenUri,
|
|
111
|
-
value: input.editionCount,
|
|
112
|
-
royaltyBps
|
|
113
|
-
});
|
|
114
|
-
const result = await (0, import_starknet.executeIntent)(signer, client, minted);
|
|
115
|
-
contractAddress = collectionContract;
|
|
116
|
-
tokenId = (0, import_starknet.mintedTokenIdFromReceipt)(result.receipt, collectionContract);
|
|
117
|
-
}
|
|
118
|
-
return contractAddress && tokenId ? { contract: contractAddress, tokenId, image } : null;
|
|
119
|
-
}
|
|
120
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
121
|
-
0 && (module.exports = {
|
|
122
|
-
mintAsset
|
|
123
|
-
});
|
|
124
|
-
//# sourceMappingURL=mint-asset.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/fast-mint/mint-asset.ts"],"sourcesContent":["import { buildAssetMetadata, type ApiCollection } from \"@medialane/sdk\";\nimport { executeIntent, deployedCollectionFromReceipt, mintedTokenIdFromReceipt, type MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { IPType } from \"../../data/ip.js\";\nimport type { MetadataField } from \"../ip-type-fields.js\";\nimport { uploadJsonToIpfs } from \"../../utils/ipfs-upload.js\";\nimport type { FormValues } from \"./form.js\";\nimport type { FastMintSigner, MediaKind, MintedAsset } from \"./types.js\";\nimport type { MintAssetType } from \"./mintable-collections.js\";\n\nexport type MintDestination =\n | { mode: \"existing\"; collectionId: string; collectionContract: string }\n | { mode: \"new\"; name: string; symbol: string; description: string };\n\nexport interface MintAssetInput {\n client: MedialaneClient;\n signer: FastMintSigner;\n walletAddress: string;\n values: FormValues;\n ipType: IPType;\n templateFields: MetadataField[];\n mediaKind: MediaKind;\n mediaUri: string;\n featureUri: string | null;\n assetType: MintAssetType;\n editionCount: string;\n destination: MintDestination;\n singleCollections: ApiCollection[];\n refetchCollections: () => Promise<ApiCollection[]>;\n getUploadToken: () => Promise<string | null>;\n}\n\nasync function pollForNewCollection(\n refetchCollections: () => Promise<ApiCollection[]>,\n name: string,\n symbol: string,\n): Promise<ApiCollection | null> {\n for (let attempt = 0; attempt < 8; attempt++) {\n const list = await refetchCollections();\n const match = list.find((c) => c.name === name && c.symbol === symbol);\n if (match?.collectionId) return match;\n await new Promise((r) => setTimeout(r, 1500));\n }\n return null;\n}\n\nexport async function mintAsset(input: MintAssetInput): Promise<MintedAsset | null> {\n const { client, signer, walletAddress, values, destination } = input;\n\n const image = input.mediaKind === \"image\" ? input.mediaUri : input.featureUri!;\n const built = buildAssetMetadata({\n name: values.name,\n description: values.description || \"\",\n externalUrl: values.external_url || \"\",\n imageUri: image,\n creator: walletAddress,\n ipType: input.ipType,\n licenseType: values.licenseType,\n commercialUse: values.commercialUse,\n derivatives: values.derivatives,\n attribution: values.attribution,\n geographicScope: values.geographicScope,\n aiPolicy: values.aiPolicy,\n royalty: String(values.royalty),\n templateTraits: input.templateFields\n .filter(({ traitType, value }) => traitType.trim() && value.trim())\n .map(({ traitType, value }) => ({ traitType, value })),\n });\n const metadata: Record<string, unknown> = { ...built };\n if (input.mediaKind !== \"image\") metadata.animation_url = input.mediaUri;\n\n const uploadToken = await input.getUploadToken();\n if (!uploadToken) throw new Error(\"Sign in first\");\n const tokenUri = await uploadJsonToIpfs(client.api, metadata);\n\n const royaltyBps = Math.round(values.royalty * 100);\n let contractAddress: string | null;\n let tokenId: string | null;\n\n if (input.assetType === \"single\") {\n let collectionId = destination.mode === \"existing\" ? destination.collectionId : \"\";\n contractAddress = destination.mode === \"existing\"\n ? input.singleCollections.find((c) => c.collectionId === destination.collectionId)?.contractAddress ?? null\n : null;\n\n if (destination.mode === \"new\") {\n const created = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: destination.name,\n symbol: destination.symbol,\n description: destination.description || undefined,\n image,\n });\n await executeIntent(signer, client, created);\n\n const found = await pollForNewCollection(input.refetchCollections, destination.name, destination.symbol);\n if (!found) throw new Error(\"Collection created, but it's still indexing — try minting again in a moment from My Collections.\");\n collectionId = found.collectionId!;\n contractAddress = found.contractAddress ?? null;\n }\n\n const minted = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n collectionId,\n recipient: walletAddress,\n tokenUri,\n royaltyBps,\n });\n const result = await executeIntent(signer, client, minted);\n tokenId = contractAddress ? mintedTokenIdFromReceipt(result.receipt, contractAddress) : null;\n } else {\n let collectionContract = destination.mode === \"existing\" ? destination.collectionContract : \"\";\n\n if (destination.mode === \"new\") {\n const created = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: destination.name,\n symbol: destination.symbol,\n description: destination.description || undefined,\n image,\n baseUri: \"\",\n service: \"mip-erc1155\",\n });\n const deployResult = await executeIntent(signer, client, created);\n\n const deployed = deployedCollectionFromReceipt(deployResult.receipt, \"mip-erc1155\");\n if (!deployed) throw new Error(\"Collection deployed, but its address couldn't be read — check My Collections to mint into it.\");\n collectionContract = deployed;\n }\n\n const minted = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n recipient: walletAddress,\n collectionContract,\n tokenUri,\n value: input.editionCount,\n royaltyBps,\n });\n const result = await executeIntent(signer, client, minted);\n contractAddress = collectionContract;\n tokenId = mintedTokenIdFromReceipt(result.receipt, collectionContract);\n }\n\n return contractAddress && tokenId ? { contract: contractAddress, tokenId, image } : null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAuD;AACvD,sBAA6G;AAG7G,yBAAiC;AA2BjC,eAAe,qBACb,oBACA,MACA,QAC+B;AAC/B,WAAS,UAAU,GAAG,UAAU,GAAG,WAAW;AAC5C,UAAM,OAAO,MAAM,mBAAmB;AACtC,UAAM,QAAQ,KAAK,KAAK,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,WAAW,MAAM;AACrE,QAAI,OAAO,aAAc,QAAO;AAChC,UAAM,IAAI,QAAQ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,OAAO,QAAQ;AAAA,MACrD,OAAO;AAAA,MACP,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,OAAO,MAAM;AAAA,MACb;AAAA,IACF,CAAC;AACD,UAAM,SAAS,UAAM,+BAAc,QAAQ,QAAQ,MAAM;AACzD,sBAAkB;AAClB,kBAAU,0CAAyB,OAAO,SAAS,kBAAkB;AAAA,EACvE;AAEA,SAAO,mBAAmB,UAAU,EAAE,UAAU,iBAAiB,SAAS,MAAM,IAAI;AACtF;","names":[]}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ApiCollection } from '@medialane/sdk';
|
|
2
|
-
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
-
import { IPType } from '../../data/ip.cjs';
|
|
4
|
-
import { MetadataField } from '../ip-type-fields.cjs';
|
|
5
|
-
import { FormValues } from './form.cjs';
|
|
6
|
-
import { FastMintSigner, MediaKind, MintedAsset } from './types.cjs';
|
|
7
|
-
import { MintAssetType } from './mintable-collections.cjs';
|
|
8
|
-
import 'react/jsx-runtime';
|
|
9
|
-
import 'react';
|
|
10
|
-
import 'starknet';
|
|
11
|
-
|
|
12
|
-
type MintDestination = {
|
|
13
|
-
mode: "existing";
|
|
14
|
-
collectionId: string;
|
|
15
|
-
collectionContract: string;
|
|
16
|
-
} | {
|
|
17
|
-
mode: "new";
|
|
18
|
-
name: string;
|
|
19
|
-
symbol: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
interface MintAssetInput {
|
|
23
|
-
client: MedialaneClient;
|
|
24
|
-
signer: FastMintSigner;
|
|
25
|
-
walletAddress: string;
|
|
26
|
-
values: FormValues;
|
|
27
|
-
ipType: IPType;
|
|
28
|
-
templateFields: MetadataField[];
|
|
29
|
-
mediaKind: MediaKind;
|
|
30
|
-
mediaUri: string;
|
|
31
|
-
featureUri: string | null;
|
|
32
|
-
assetType: MintAssetType;
|
|
33
|
-
editionCount: string;
|
|
34
|
-
destination: MintDestination;
|
|
35
|
-
singleCollections: ApiCollection[];
|
|
36
|
-
refetchCollections: () => Promise<ApiCollection[]>;
|
|
37
|
-
getUploadToken: () => Promise<string | null>;
|
|
38
|
-
}
|
|
39
|
-
declare function mintAsset(input: MintAssetInput): Promise<MintedAsset | null>;
|
|
40
|
-
|
|
41
|
-
export { type MintAssetInput, type MintDestination, mintAsset };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ApiCollection } from '@medialane/sdk';
|
|
2
|
-
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
-
import { IPType } from '../../data/ip.js';
|
|
4
|
-
import { MetadataField } from '../ip-type-fields.js';
|
|
5
|
-
import { FormValues } from './form.js';
|
|
6
|
-
import { FastMintSigner, MediaKind, MintedAsset } from './types.js';
|
|
7
|
-
import { MintAssetType } from './mintable-collections.js';
|
|
8
|
-
import 'react/jsx-runtime';
|
|
9
|
-
import 'react';
|
|
10
|
-
import 'starknet';
|
|
11
|
-
|
|
12
|
-
type MintDestination = {
|
|
13
|
-
mode: "existing";
|
|
14
|
-
collectionId: string;
|
|
15
|
-
collectionContract: string;
|
|
16
|
-
} | {
|
|
17
|
-
mode: "new";
|
|
18
|
-
name: string;
|
|
19
|
-
symbol: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
interface MintAssetInput {
|
|
23
|
-
client: MedialaneClient;
|
|
24
|
-
signer: FastMintSigner;
|
|
25
|
-
walletAddress: string;
|
|
26
|
-
values: FormValues;
|
|
27
|
-
ipType: IPType;
|
|
28
|
-
templateFields: MetadataField[];
|
|
29
|
-
mediaKind: MediaKind;
|
|
30
|
-
mediaUri: string;
|
|
31
|
-
featureUri: string | null;
|
|
32
|
-
assetType: MintAssetType;
|
|
33
|
-
editionCount: string;
|
|
34
|
-
destination: MintDestination;
|
|
35
|
-
singleCollections: ApiCollection[];
|
|
36
|
-
refetchCollections: () => Promise<ApiCollection[]>;
|
|
37
|
-
getUploadToken: () => Promise<string | null>;
|
|
38
|
-
}
|
|
39
|
-
declare function mintAsset(input: MintAssetInput): Promise<MintedAsset | null>;
|
|
40
|
-
|
|
41
|
-
export { type MintAssetInput, type MintDestination, mintAsset };
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { buildAssetMetadata } from "@medialane/sdk";
|
|
2
|
-
import { executeIntent, deployedCollectionFromReceipt, mintedTokenIdFromReceipt } from "@medialane/sdk/starknet";
|
|
3
|
-
import { uploadJsonToIpfs } from "../../utils/ipfs-upload.js";
|
|
4
|
-
async function pollForNewCollection(refetchCollections, name, symbol) {
|
|
5
|
-
for (let attempt = 0; attempt < 8; attempt++) {
|
|
6
|
-
const list = await refetchCollections();
|
|
7
|
-
const match = list.find((c) => c.name === name && c.symbol === symbol);
|
|
8
|
-
if (match?.collectionId) return match;
|
|
9
|
-
await new Promise((r) => setTimeout(r, 1500));
|
|
10
|
-
}
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
async function mintAsset(input) {
|
|
14
|
-
const { client, signer, walletAddress, values, destination } = input;
|
|
15
|
-
const image = input.mediaKind === "image" ? input.mediaUri : input.featureUri;
|
|
16
|
-
const built = buildAssetMetadata({
|
|
17
|
-
name: values.name,
|
|
18
|
-
description: values.description || "",
|
|
19
|
-
externalUrl: values.external_url || "",
|
|
20
|
-
imageUri: image,
|
|
21
|
-
creator: walletAddress,
|
|
22
|
-
ipType: input.ipType,
|
|
23
|
-
licenseType: values.licenseType,
|
|
24
|
-
commercialUse: values.commercialUse,
|
|
25
|
-
derivatives: values.derivatives,
|
|
26
|
-
attribution: values.attribution,
|
|
27
|
-
geographicScope: values.geographicScope,
|
|
28
|
-
aiPolicy: values.aiPolicy,
|
|
29
|
-
royalty: String(values.royalty),
|
|
30
|
-
templateTraits: input.templateFields.filter(({ traitType, value }) => traitType.trim() && value.trim()).map(({ traitType, value }) => ({ traitType, value }))
|
|
31
|
-
});
|
|
32
|
-
const metadata = { ...built };
|
|
33
|
-
if (input.mediaKind !== "image") metadata.animation_url = input.mediaUri;
|
|
34
|
-
const uploadToken = await input.getUploadToken();
|
|
35
|
-
if (!uploadToken) throw new Error("Sign in first");
|
|
36
|
-
const tokenUri = await uploadJsonToIpfs(client.api, metadata);
|
|
37
|
-
const royaltyBps = Math.round(values.royalty * 100);
|
|
38
|
-
let contractAddress;
|
|
39
|
-
let tokenId;
|
|
40
|
-
if (input.assetType === "single") {
|
|
41
|
-
let collectionId = destination.mode === "existing" ? destination.collectionId : "";
|
|
42
|
-
contractAddress = destination.mode === "existing" ? input.singleCollections.find((c) => c.collectionId === destination.collectionId)?.contractAddress ?? null : null;
|
|
43
|
-
if (destination.mode === "new") {
|
|
44
|
-
const created = await client.api.intents.create("create-collection", {
|
|
45
|
-
owner: walletAddress,
|
|
46
|
-
name: destination.name,
|
|
47
|
-
symbol: destination.symbol,
|
|
48
|
-
description: destination.description || void 0,
|
|
49
|
-
image
|
|
50
|
-
});
|
|
51
|
-
await executeIntent(signer, client, created);
|
|
52
|
-
const found = await pollForNewCollection(input.refetchCollections, destination.name, destination.symbol);
|
|
53
|
-
if (!found) throw new Error("Collection created, but it's still indexing \u2014 try minting again in a moment from My Collections.");
|
|
54
|
-
collectionId = found.collectionId;
|
|
55
|
-
contractAddress = found.contractAddress ?? null;
|
|
56
|
-
}
|
|
57
|
-
const minted = await client.api.intents.create("mint", {
|
|
58
|
-
owner: walletAddress,
|
|
59
|
-
collectionId,
|
|
60
|
-
recipient: walletAddress,
|
|
61
|
-
tokenUri,
|
|
62
|
-
royaltyBps
|
|
63
|
-
});
|
|
64
|
-
const result = await executeIntent(signer, client, minted);
|
|
65
|
-
tokenId = contractAddress ? mintedTokenIdFromReceipt(result.receipt, contractAddress) : null;
|
|
66
|
-
} else {
|
|
67
|
-
let collectionContract = destination.mode === "existing" ? destination.collectionContract : "";
|
|
68
|
-
if (destination.mode === "new") {
|
|
69
|
-
const created = await client.api.intents.create("create-collection", {
|
|
70
|
-
owner: walletAddress,
|
|
71
|
-
name: destination.name,
|
|
72
|
-
symbol: destination.symbol,
|
|
73
|
-
description: destination.description || void 0,
|
|
74
|
-
image,
|
|
75
|
-
baseUri: "",
|
|
76
|
-
service: "mip-erc1155"
|
|
77
|
-
});
|
|
78
|
-
const deployResult = await executeIntent(signer, client, created);
|
|
79
|
-
const deployed = deployedCollectionFromReceipt(deployResult.receipt, "mip-erc1155");
|
|
80
|
-
if (!deployed) throw new Error("Collection deployed, but its address couldn't be read \u2014 check My Collections to mint into it.");
|
|
81
|
-
collectionContract = deployed;
|
|
82
|
-
}
|
|
83
|
-
const minted = await client.api.intents.create("mint", {
|
|
84
|
-
owner: walletAddress,
|
|
85
|
-
recipient: walletAddress,
|
|
86
|
-
collectionContract,
|
|
87
|
-
tokenUri,
|
|
88
|
-
value: input.editionCount,
|
|
89
|
-
royaltyBps
|
|
90
|
-
});
|
|
91
|
-
const result = await executeIntent(signer, client, minted);
|
|
92
|
-
contractAddress = collectionContract;
|
|
93
|
-
tokenId = mintedTokenIdFromReceipt(result.receipt, collectionContract);
|
|
94
|
-
}
|
|
95
|
-
return contractAddress && tokenId ? { contract: contractAddress, tokenId, image } : null;
|
|
96
|
-
}
|
|
97
|
-
export {
|
|
98
|
-
mintAsset
|
|
99
|
-
};
|
|
100
|
-
//# sourceMappingURL=mint-asset.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/fast-mint/mint-asset.ts"],"sourcesContent":["import { buildAssetMetadata, type ApiCollection } from \"@medialane/sdk\";\nimport { executeIntent, deployedCollectionFromReceipt, mintedTokenIdFromReceipt, type MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { IPType } from \"../../data/ip.js\";\nimport type { MetadataField } from \"../ip-type-fields.js\";\nimport { uploadJsonToIpfs } from \"../../utils/ipfs-upload.js\";\nimport type { FormValues } from \"./form.js\";\nimport type { FastMintSigner, MediaKind, MintedAsset } from \"./types.js\";\nimport type { MintAssetType } from \"./mintable-collections.js\";\n\nexport type MintDestination =\n | { mode: \"existing\"; collectionId: string; collectionContract: string }\n | { mode: \"new\"; name: string; symbol: string; description: string };\n\nexport interface MintAssetInput {\n client: MedialaneClient;\n signer: FastMintSigner;\n walletAddress: string;\n values: FormValues;\n ipType: IPType;\n templateFields: MetadataField[];\n mediaKind: MediaKind;\n mediaUri: string;\n featureUri: string | null;\n assetType: MintAssetType;\n editionCount: string;\n destination: MintDestination;\n singleCollections: ApiCollection[];\n refetchCollections: () => Promise<ApiCollection[]>;\n getUploadToken: () => Promise<string | null>;\n}\n\nasync function pollForNewCollection(\n refetchCollections: () => Promise<ApiCollection[]>,\n name: string,\n symbol: string,\n): Promise<ApiCollection | null> {\n for (let attempt = 0; attempt < 8; attempt++) {\n const list = await refetchCollections();\n const match = list.find((c) => c.name === name && c.symbol === symbol);\n if (match?.collectionId) return match;\n await new Promise((r) => setTimeout(r, 1500));\n }\n return null;\n}\n\nexport async function mintAsset(input: MintAssetInput): Promise<MintedAsset | null> {\n const { client, signer, walletAddress, values, destination } = input;\n\n const image = input.mediaKind === \"image\" ? input.mediaUri : input.featureUri!;\n const built = buildAssetMetadata({\n name: values.name,\n description: values.description || \"\",\n externalUrl: values.external_url || \"\",\n imageUri: image,\n creator: walletAddress,\n ipType: input.ipType,\n licenseType: values.licenseType,\n commercialUse: values.commercialUse,\n derivatives: values.derivatives,\n attribution: values.attribution,\n geographicScope: values.geographicScope,\n aiPolicy: values.aiPolicy,\n royalty: String(values.royalty),\n templateTraits: input.templateFields\n .filter(({ traitType, value }) => traitType.trim() && value.trim())\n .map(({ traitType, value }) => ({ traitType, value })),\n });\n const metadata: Record<string, unknown> = { ...built };\n if (input.mediaKind !== \"image\") metadata.animation_url = input.mediaUri;\n\n const uploadToken = await input.getUploadToken();\n if (!uploadToken) throw new Error(\"Sign in first\");\n const tokenUri = await uploadJsonToIpfs(client.api, metadata);\n\n const royaltyBps = Math.round(values.royalty * 100);\n let contractAddress: string | null;\n let tokenId: string | null;\n\n if (input.assetType === \"single\") {\n let collectionId = destination.mode === \"existing\" ? destination.collectionId : \"\";\n contractAddress = destination.mode === \"existing\"\n ? input.singleCollections.find((c) => c.collectionId === destination.collectionId)?.contractAddress ?? null\n : null;\n\n if (destination.mode === \"new\") {\n const created = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: destination.name,\n symbol: destination.symbol,\n description: destination.description || undefined,\n image,\n });\n await executeIntent(signer, client, created);\n\n const found = await pollForNewCollection(input.refetchCollections, destination.name, destination.symbol);\n if (!found) throw new Error(\"Collection created, but it's still indexing — try minting again in a moment from My Collections.\");\n collectionId = found.collectionId!;\n contractAddress = found.contractAddress ?? null;\n }\n\n const minted = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n collectionId,\n recipient: walletAddress,\n tokenUri,\n royaltyBps,\n });\n const result = await executeIntent(signer, client, minted);\n tokenId = contractAddress ? mintedTokenIdFromReceipt(result.receipt, contractAddress) : null;\n } else {\n let collectionContract = destination.mode === \"existing\" ? destination.collectionContract : \"\";\n\n if (destination.mode === \"new\") {\n const created = await client.api.intents.create(\"create-collection\", {\n owner: walletAddress,\n name: destination.name,\n symbol: destination.symbol,\n description: destination.description || undefined,\n image,\n baseUri: \"\",\n service: \"mip-erc1155\",\n });\n const deployResult = await executeIntent(signer, client, created);\n\n const deployed = deployedCollectionFromReceipt(deployResult.receipt, \"mip-erc1155\");\n if (!deployed) throw new Error(\"Collection deployed, but its address couldn't be read — check My Collections to mint into it.\");\n collectionContract = deployed;\n }\n\n const minted = await client.api.intents.create(\"mint\", {\n owner: walletAddress,\n recipient: walletAddress,\n collectionContract,\n tokenUri,\n value: input.editionCount,\n royaltyBps,\n });\n const result = await executeIntent(signer, client, minted);\n contractAddress = collectionContract;\n tokenId = mintedTokenIdFromReceipt(result.receipt, collectionContract);\n }\n\n return contractAddress && tokenId ? { contract: contractAddress, tokenId, image } : null;\n}\n"],"mappings":"AAAA,SAAS,0BAA8C;AACvD,SAAS,eAAe,+BAA+B,gCAAsD;AAG7G,SAAS,wBAAwB;AA2BjC,eAAe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