@medialane/sdk 0.204.0 → 0.206.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/README.md +1 -0
- package/dist/{chunk-GIBIHGSV.js → chunk-EPU52YSA.js} +24 -11
- package/dist/chunk-EPU52YSA.js.map +1 -0
- package/dist/{chunk-KGAGWULG.js → chunk-GENBWVGK.js} +8 -5
- package/dist/chunk-GENBWVGK.js.map +1 -0
- package/dist/{chunk-3HPMEDYH.cjs → chunk-MCVAZVLN.cjs} +8 -5
- package/dist/chunk-MCVAZVLN.cjs.map +1 -0
- package/dist/{chunk-ZLMIHQWM.cjs → chunk-ZYRSMDMJ.cjs} +36 -23
- package/dist/chunk-ZYRSMDMJ.cjs.map +1 -0
- package/dist/contract/index.cjs +2 -1
- package/dist/contract/index.cjs.map +1 -1
- package/dist/contract/index.d.cts +2 -2
- package/dist/contract/index.d.ts +2 -2
- package/dist/contract/index.js +2 -1
- package/dist/contract/index.js.map +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{passkey-errors-yndCFeHv.d.cts → passkey-errors-BjqEFmu_.d.cts} +1 -1
- package/dist/{passkey-errors-B0HGcjPc.d.ts → passkey-errors-DMv2Vn1P.d.ts} +1 -1
- package/dist/{responses-D3nBY71f.d.ts → responses-BpnS-Io9.d.cts} +5 -0
- package/dist/{responses-D3nBY71f.d.cts → responses-BpnS-Io9.d.ts} +5 -0
- package/dist/{services-B15RJBSW.d.cts → services-Cy5FH8sP.d.cts} +8 -4
- package/dist/{services-BAnTJhwt.d.ts → services-DWmXVwTV.d.ts} +8 -4
- package/dist/starknet/index.cjs +84 -84
- package/dist/starknet/index.d.cts +20 -7
- package/dist/starknet/index.d.ts +20 -7
- package/dist/starknet/index.js +3 -3
- package/dist/wallet/index.cjs +59 -59
- package/dist/wallet/index.d.cts +3 -3
- package/dist/wallet/index.d.ts +3 -3
- package/dist/wallet/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-3HPMEDYH.cjs.map +0 -1
- package/dist/chunk-GIBIHGSV.js.map +0 -1
- package/dist/chunk-KGAGWULG.js.map +0 -1
- package/dist/chunk-ZLMIHQWM.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkMEJ47LC3_cjs = require('./chunk-MEJ47LC3.cjs');
|
|
4
4
|
var chunkZVANOWIB_cjs = require('./chunk-ZVANOWIB.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkMCVAZVLN_cjs = require('./chunk-MCVAZVLN.cjs');
|
|
6
6
|
var chunkH2NJB3AK_cjs = require('./chunk-H2NJB3AK.cjs');
|
|
7
7
|
require('./chunk-W76AZ5WC.cjs');
|
|
8
8
|
require('./chunk-Q7SFCCGT.cjs');
|
|
@@ -32,7 +32,7 @@ function createLaunchpadRunsClient({ baseUrl, fetchImpl = fetch }) {
|
|
|
32
32
|
});
|
|
33
33
|
const body = await res.json().catch(() => ({}));
|
|
34
34
|
if (!res.ok) {
|
|
35
|
-
throw new RunRequestError(String(body.error ??
|
|
35
|
+
throw new RunRequestError(String(body.error ?? `Request returned status ${res.status}`), res.status, body);
|
|
36
36
|
}
|
|
37
37
|
return { status: res.status, data: body.data };
|
|
38
38
|
}
|
|
@@ -361,135 +361,135 @@ Object.defineProperty(exports, "verifySiwsToken", {
|
|
|
361
361
|
});
|
|
362
362
|
Object.defineProperty(exports, "ApiClient", {
|
|
363
363
|
enumerable: true,
|
|
364
|
-
get: function () { return
|
|
364
|
+
get: function () { return chunkMCVAZVLN_cjs.ApiClient; }
|
|
365
365
|
});
|
|
366
366
|
Object.defineProperty(exports, "DEFAULT_CURRENCY", {
|
|
367
367
|
enumerable: true,
|
|
368
|
-
get: function () { return
|
|
368
|
+
get: function () { return chunkMCVAZVLN_cjs.DEFAULT_CURRENCY; }
|
|
369
369
|
});
|
|
370
370
|
Object.defineProperty(exports, "DeviceKeyMissingError", {
|
|
371
371
|
enumerable: true,
|
|
372
|
-
get: function () { return
|
|
372
|
+
get: function () { return chunkMCVAZVLN_cjs.DeviceKeyMissingError; }
|
|
373
373
|
});
|
|
374
374
|
Object.defineProperty(exports, "MedialaneApiError", {
|
|
375
375
|
enumerable: true,
|
|
376
|
-
get: function () { return
|
|
376
|
+
get: function () { return chunkMCVAZVLN_cjs.MedialaneApiError; }
|
|
377
377
|
});
|
|
378
378
|
Object.defineProperty(exports, "MedialaneError", {
|
|
379
379
|
enumerable: true,
|
|
380
|
-
get: function () { return
|
|
380
|
+
get: function () { return chunkMCVAZVLN_cjs.MedialaneError; }
|
|
381
381
|
});
|
|
382
382
|
Object.defineProperty(exports, "PasskeyCancelledError", {
|
|
383
383
|
enumerable: true,
|
|
384
|
-
get: function () { return
|
|
384
|
+
get: function () { return chunkMCVAZVLN_cjs.PasskeyCancelledError; }
|
|
385
385
|
});
|
|
386
386
|
Object.defineProperty(exports, "PasskeyUnsupportedError", {
|
|
387
387
|
enumerable: true,
|
|
388
|
-
get: function () { return
|
|
388
|
+
get: function () { return chunkMCVAZVLN_cjs.PasskeyUnsupportedError; }
|
|
389
389
|
});
|
|
390
390
|
Object.defineProperty(exports, "STARKNET_COLLECTION_1155_CONTRACT", {
|
|
391
391
|
enumerable: true,
|
|
392
|
-
get: function () { return
|
|
392
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_COLLECTION_1155_CONTRACT; }
|
|
393
393
|
});
|
|
394
394
|
Object.defineProperty(exports, "STARKNET_COLLECTION_721_CONTRACT", {
|
|
395
395
|
enumerable: true,
|
|
396
|
-
get: function () { return
|
|
396
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_COLLECTION_721_CONTRACT; }
|
|
397
397
|
});
|
|
398
398
|
Object.defineProperty(exports, "STARKNET_CREATOR_COIN_FACTORY_CONTRACT", {
|
|
399
399
|
enumerable: true,
|
|
400
|
-
get: function () { return
|
|
400
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_CREATOR_COIN_FACTORY_CONTRACT; }
|
|
401
401
|
});
|
|
402
402
|
Object.defineProperty(exports, "STARKNET_DATA_TOKENIZATION_721_CONTRACT", {
|
|
403
403
|
enumerable: true,
|
|
404
|
-
get: function () { return
|
|
404
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_DATA_TOKENIZATION_721_CONTRACT; }
|
|
405
405
|
});
|
|
406
406
|
Object.defineProperty(exports, "STARKNET_DROP_FACTORY_CONTRACT", {
|
|
407
407
|
enumerable: true,
|
|
408
|
-
get: function () { return
|
|
408
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_DROP_FACTORY_CONTRACT; }
|
|
409
409
|
});
|
|
410
410
|
Object.defineProperty(exports, "STARKNET_DROP_FACTORY_START_BLOCK", {
|
|
411
411
|
enumerable: true,
|
|
412
|
-
get: function () { return
|
|
412
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_DROP_FACTORY_START_BLOCK; }
|
|
413
413
|
});
|
|
414
414
|
Object.defineProperty(exports, "STARKNET_GENESIS_MINT_CONTRACT", {
|
|
415
415
|
enumerable: true,
|
|
416
|
-
get: function () { return
|
|
416
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_GENESIS_MINT_CONTRACT; }
|
|
417
417
|
});
|
|
418
418
|
Object.defineProperty(exports, "STARKNET_GENESIS_NFT_URI", {
|
|
419
419
|
enumerable: true,
|
|
420
|
-
get: function () { return
|
|
420
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_GENESIS_NFT_URI; }
|
|
421
421
|
});
|
|
422
422
|
Object.defineProperty(exports, "STARKNET_IP_CLUB_FACTORY_CONTRACT", {
|
|
423
423
|
enumerable: true,
|
|
424
|
-
get: function () { return
|
|
424
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_IP_CLUB_FACTORY_CONTRACT; }
|
|
425
425
|
});
|
|
426
426
|
Object.defineProperty(exports, "STARKNET_IP_SPONSORSHIP_CONTRACT", {
|
|
427
427
|
enumerable: true,
|
|
428
|
-
get: function () { return
|
|
428
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_IP_SPONSORSHIP_CONTRACT; }
|
|
429
429
|
});
|
|
430
430
|
Object.defineProperty(exports, "STARKNET_IP_TICKETS_FACTORY_CONTRACT", {
|
|
431
431
|
enumerable: true,
|
|
432
|
-
get: function () { return
|
|
432
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_IP_TICKETS_FACTORY_CONTRACT; }
|
|
433
433
|
});
|
|
434
434
|
Object.defineProperty(exports, "STARKNET_MARKETPLACE_1155_CONTRACT", {
|
|
435
435
|
enumerable: true,
|
|
436
|
-
get: function () { return
|
|
436
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_MARKETPLACE_1155_CONTRACT; }
|
|
437
437
|
});
|
|
438
438
|
Object.defineProperty(exports, "STARKNET_MARKETPLACE_721_CONTRACT", {
|
|
439
439
|
enumerable: true,
|
|
440
|
-
get: function () { return
|
|
440
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_MARKETPLACE_721_CONTRACT; }
|
|
441
441
|
});
|
|
442
442
|
Object.defineProperty(exports, "STARKNET_NFTCOMMENTS_CONTRACT", {
|
|
443
443
|
enumerable: true,
|
|
444
|
-
get: function () { return
|
|
444
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_NFTCOMMENTS_CONTRACT; }
|
|
445
445
|
});
|
|
446
446
|
Object.defineProperty(exports, "STARKNET_POP_FACTORY_CONTRACT", {
|
|
447
447
|
enumerable: true,
|
|
448
|
-
get: function () { return
|
|
448
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_POP_FACTORY_CONTRACT; }
|
|
449
449
|
});
|
|
450
450
|
Object.defineProperty(exports, "STARKNET_POP_FACTORY_START_BLOCK", {
|
|
451
451
|
enumerable: true,
|
|
452
|
-
get: function () { return
|
|
452
|
+
get: function () { return chunkMCVAZVLN_cjs.STARKNET_POP_FACTORY_START_BLOCK; }
|
|
453
453
|
});
|
|
454
454
|
Object.defineProperty(exports, "SUPPORTED_TOKENS", {
|
|
455
455
|
enumerable: true,
|
|
456
|
-
get: function () { return
|
|
456
|
+
get: function () { return chunkMCVAZVLN_cjs.SUPPORTED_TOKENS; }
|
|
457
457
|
});
|
|
458
458
|
Object.defineProperty(exports, "UserFacingError", {
|
|
459
459
|
enumerable: true,
|
|
460
|
-
get: function () { return
|
|
460
|
+
get: function () { return chunkMCVAZVLN_cjs.UserFacingError; }
|
|
461
461
|
});
|
|
462
462
|
Object.defineProperty(exports, "formatAmount", {
|
|
463
463
|
enumerable: true,
|
|
464
|
-
get: function () { return
|
|
464
|
+
get: function () { return chunkMCVAZVLN_cjs.formatAmount; }
|
|
465
465
|
});
|
|
466
466
|
Object.defineProperty(exports, "getListableTokens", {
|
|
467
467
|
enumerable: true,
|
|
468
|
-
get: function () { return
|
|
468
|
+
get: function () { return chunkMCVAZVLN_cjs.getListableTokens; }
|
|
469
469
|
});
|
|
470
470
|
Object.defineProperty(exports, "getTokenByAddress", {
|
|
471
471
|
enumerable: true,
|
|
472
|
-
get: function () { return
|
|
472
|
+
get: function () { return chunkMCVAZVLN_cjs.getTokenByAddress; }
|
|
473
473
|
});
|
|
474
474
|
Object.defineProperty(exports, "getTokenBySymbol", {
|
|
475
475
|
enumerable: true,
|
|
476
|
-
get: function () { return
|
|
476
|
+
get: function () { return chunkMCVAZVLN_cjs.getTokenBySymbol; }
|
|
477
477
|
});
|
|
478
478
|
Object.defineProperty(exports, "normalizeAddress", {
|
|
479
479
|
enumerable: true,
|
|
480
|
-
get: function () { return
|
|
480
|
+
get: function () { return chunkMCVAZVLN_cjs.normalizeAddress; }
|
|
481
481
|
});
|
|
482
482
|
Object.defineProperty(exports, "normalizeHash", {
|
|
483
483
|
enumerable: true,
|
|
484
|
-
get: function () { return
|
|
484
|
+
get: function () { return chunkMCVAZVLN_cjs.normalizeHash; }
|
|
485
485
|
});
|
|
486
486
|
Object.defineProperty(exports, "parseAmount", {
|
|
487
487
|
enumerable: true,
|
|
488
|
-
get: function () { return
|
|
488
|
+
get: function () { return chunkMCVAZVLN_cjs.parseAmount; }
|
|
489
489
|
});
|
|
490
490
|
Object.defineProperty(exports, "shortenAddress", {
|
|
491
491
|
enumerable: true,
|
|
492
|
-
get: function () { return
|
|
492
|
+
get: function () { return chunkMCVAZVLN_cjs.shortenAddress; }
|
|
493
493
|
});
|
|
494
494
|
Object.defineProperty(exports, "CHAINS", {
|
|
495
495
|
enumerable: true,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/launchpad-runs.ts","../src/types/api.ts","../src/metadata.ts","../src/remix-policy.ts","../src/uploads.ts"],"names":[],"mappings":";;;;;;;;;;AAoEO,IAAM,qBAAA,GAAwB,CAAC,GAAA,KACpC,GAAA,CAAI,OAAA,KAAY;AAEX,IAAM,cAAA,GAAiB,CAAC,GAAA,KAA2C,GAAA,CAAI,OAAA,KAAY;AAEnF,IAAM,wBAAA,GAA2B,CAAC,GAAA,KACvC,GAAA,CAAI,OAAA,KAAY;AAQX,IAAM,eAAA,GAAN,cAA8B,KAAA,CAAM;AAAA,EACzC,WAAA,CACE,OAAA,EACS,MAAA,EACA,IAAA,EACT;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AAHJ,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AACA,IAAA,IAAA,CAAA,IAAA,GAAA,IAAA;AAAA,EAGX;AACF;AAOO,SAAS,yBAAA,CAA0B,EAAE,OAAA,EAAS,SAAA,GAAY,OAAM,EAA+B;AACpG,EAAA,MAAM,UAAU,CAAA,EAAG,OAAA,CAAQ,OAAA,CAAQ,KAAA,EAAO,EAAE,CAAC,CAAA,eAAA,CAAA;AAC7C,EAAA,MAAM,UAAU,CAAC,EAAA,KAAuB,CAAA,EAAG,OAAO,IAAI,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jG,EAAA,IAAI,IAAA,CAAK,IAAA,IAAQ,gBAAA,EAAkB,OAAO,IAAA;AAC1C,EAAA,MAAM,IAAA,GAAO,IAAA,KAAS,OAAA,GAAU,OAAA,GAAU,MAAA;AAC1C,EAAA,OAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,IAAA,EAAO,cAAA,CAAe,IAAA,CAAK,IAAI,CAAC,CAAA,0BAAA,EAA6B,cAAA,CAAe,gBAAgB,CAAC,CAAA,CAAA,CAAA;AAClH","file":"index.cjs","sourcesContent":["import type { FetchLike } from \"../utils/fetch.js\";\nexport type RunStatus = \"DRAFT\" | \"PAID\" | \"RUNNING\" | \"COMPLETED\" | \"FAILED\" | \"CANCELLED\";\n\nexport interface RunQuoteLine {\n action: string;\n units: number;\n unitCredits: number;\n credits: number;\n}\n\nexport interface RunQuote {\n lines: RunQuoteLine[];\n total: number;\n}\n\nexport type NextStep =\n | { kind: \"collection\" }\n | { kind: \"wait-collection\" }\n | { kind: \"upload\"; files: string[] }\n | { kind: \"metadata\"; items: number[] }\n | { kind: \"wallets\" }\n | { kind: \"batch\"; index: number }\n | { kind: \"wait\"; index: number }\n | { kind: \"done\" };\n\nexport type TicketingNextStep =\n | { kind: \"collection\" }\n | { kind: \"wait-collection\" }\n | { kind: \"upload\"; files: string[] }\n | { kind: \"ticket-metadata\" }\n | { kind: \"tier\" }\n | { kind: \"wait-tier\" }\n | { kind: \"wallets\" }\n | { kind: \"batch\"; index: number }\n | { kind: \"wait\"; index: number }\n | { kind: \"done\" };\n\nexport type CertificateEmissionNextStep =\n | { kind: \"collection\" }\n | { kind: \"wait-collection\" }\n | { kind: \"upload\"; files: string[] }\n | { kind: \"certificate-metadata\" }\n | { kind: \"wallets\" }\n | { kind: \"batch\"; index: number }\n | { kind: \"wait\"; index: number }\n | { kind: \"done\" };\n\nexport interface WalletRequest {\n recipient: string;\n}\n\ninterface LaunchpadRunBase {\n id: string;\n status: RunStatus;\n spec: unknown;\n quote: RunQuote | null;\n creditsHeld: number;\n creditsSpent: number;\n progress: unknown;\n createdAt: string;\n updatedAt: string;\n}\n\nexport type DataTokenizationRun = LaunchpadRunBase & { service: \"data-tokenization-erc721\"; next?: NextStep };\nexport type TicketingRun = LaunchpadRunBase & { service: \"ip-ticketing\"; next?: TicketingNextStep };\nexport type CertificateEmissionRun = LaunchpadRunBase & { service: \"certificate-emission\"; next?: CertificateEmissionNextStep };\nexport type LaunchpadRun = DataTokenizationRun | TicketingRun | CertificateEmissionRun;\n\nexport const isDataTokenizationRun = (run: LaunchpadRun): run is DataTokenizationRun =>\n run.service === \"data-tokenization-erc721\";\n\nexport const isTicketingRun = (run: LaunchpadRun): run is TicketingRun => run.service === \"ip-ticketing\";\n\nexport const isCertificateEmissionRun = (run: LaunchpadRun): run is CertificateEmissionRun =>\n run.service === \"certificate-emission\";\n\nexport interface ConfirmResult {\n pending: boolean;\n status: string;\n completed?: boolean;\n}\n\nexport class RunRequestError extends Error {\n constructor(\n message: string,\n readonly status: number,\n readonly body: Record<string, unknown>,\n ) {\n super(message);\n }\n}\n\nexport interface LaunchpadRunsClientOptions {\n baseUrl: string;\n fetchImpl?: FetchLike;\n}\n\nexport function createLaunchpadRunsClient({ baseUrl, fetchImpl = fetch }: LaunchpadRunsClientOptions) {\n const runsUrl = `${baseUrl.replace(/\\/$/, \"\")}/v1/portal/runs`;\n const runBase = (id: string): string => `${runsUrl}/${id}`;\n const runBatchBase = (id: string, index: number): string => `${runBase(id)}/batches/${index}`;\n const runCollectionBase = (id: string): string => `${runBase(id)}/collection`;\n const runTierBase = (id: string): string => `${runBase(id)}/tier`;\n\n const runFetch: FetchLike = (input, init) => fetchImpl(input, { ...init, cache: \"no-store\" });\n\n async function call<T>(url: string, init?: RequestInit): Promise<{ status: number; data: T }> {\n const res = await runFetch(url, {\n ...init,\n headers: { \"content-type\": \"application/json\", ...(init?.headers as Record<string, string> | undefined) },\n });\n const body = (await res.json().catch(() => ({}))) as Record<string, unknown>;\n if (!res.ok) {\n throw new RunRequestError(String(body.error ?? \"Something went wrong with this run\"), res.status, body);\n }\n return { status: res.status, data: body.data as T };\n }\n\n const post = <T>(url: string, body?: unknown) =>\n call<T>(url, { method: \"POST\", body: body === undefined ? undefined : JSON.stringify(body) });\n\n const confirm = async (url: string): Promise<ConfirmResult> => {\n const { status, data } = await post<{ status: string; completed?: boolean }>(url);\n return { pending: status === 202, status: data.status, completed: data.completed };\n };\n\n const ticketing = {\n uploadUrl: async (id: string, name: string) =>\n (await post<{ name: string; url: string }>(`${runBase(id)}/files/upload-url`, { name })).data.url,\n\n uploaded: async (id: string, name: string, cid: string) =>\n (await post<{ name: string; uri: string }>(`${runBase(id)}/files/uploaded`, { name, cid })).data,\n\n metadata: async (id: string, userAddress: string) =>\n (await post<{ tokenUri: string }>(`${runBase(id)}/metadata`, { userAddress })).data,\n\n resolveWallets: async (id: string) =>\n (await post<{ pending: string[] }>(`${runBase(id)}/wallets/resolve`)).data.pending,\n\n registerWallet: async (id: string, request: WalletRequest) =>\n (await post<{ recipient: string; walletAddress: string }>(`${runBase(id)}/wallets`, request)).data,\n\n confirmCollection: (id: string) => confirm(`${runCollectionBase(id)}/confirm`),\n confirmTier: (id: string) => confirm(`${runTierBase(id)}/confirm`),\n confirmBatch: (id: string, index: number) => confirm(`${runBatchBase(id, index)}/confirm`),\n };\n\n const certificateEmission = {\n uploadUrl: async (id: string, name: string) =>\n (await post<{ name: string; url: string }>(`${runBase(id)}/files/upload-url`, { name })).data.url,\n\n uploaded: async (id: string, name: string, cid: string) =>\n (await post<{ name: string; uri: string }>(`${runBase(id)}/files/uploaded`, { name, cid })).data,\n\n metadata: async (id: string, userAddress: string) =>\n (await post<{ tokenUri: string }>(`${runBase(id)}/certificate-metadata`, { userAddress })).data,\n\n resolveWallets: async (id: string) =>\n (await post<{ pending: string[] }>(`${runBase(id)}/recipients/resolve`)).data.pending,\n\n registerWallet: async (id: string, request: WalletRequest) =>\n (await post<{ recipient: string; walletAddress: string }>(`${runBase(id)}/recipients`, request)).data,\n\n confirmCollection: (id: string) => confirm(`${runCollectionBase(id)}/confirm`),\n confirmBatch: (id: string, index: number) => confirm(`${runBatchBase(id, index)}/confirm`),\n };\n\n return {\n fetch: runFetch,\n runBase,\n runBatchBase,\n runCollectionBase,\n runTierBase,\n ticketing,\n certificateEmission,\n\n list: async () => (await call<LaunchpadRun[]>(runsUrl)).data,\n\n get: async (id: string) => (await call<LaunchpadRun>(`${runBase(id)}`)).data,\n\n create: async (service: string, spec: unknown) =>\n (await post<LaunchpadRun>(runsUrl, { service, spec })).data,\n\n update: async (id: string, spec: unknown) =>\n (await call<LaunchpadRun>(`${runBase(id)}`, { method: \"PATCH\", body: JSON.stringify({ spec }) })).data,\n\n cancel: async (id: string) => (await post<LaunchpadRun>(`${runBase(id)}/cancel`)).data,\n\n checkoutWithCredits: async (id: string) =>\n (await post<LaunchpadRun>(`${runBase(id)}/checkout`, { method: \"credits\" })).data,\n\n checkoutFromWallet: async (id: string, intentId: string) =>\n (await post<LaunchpadRun>(`${runBase(id)}/checkout`, { method: \"wallet\", intentId })).data,\n\n uploadUrl: async (id: string, name: string) =>\n (await post<{ name: string; url: string }>(`${runBase(id)}/files/upload-url`, { name })).data.url,\n\n uploaded: async (id: string, name: string, cid: string) =>\n (await post<{ name: string; uri: string }>(`${runBase(id)}/files/uploaded`, { name, cid })).data,\n\n itemMetadata: async (id: string, index: number, userAddress: string) =>\n (await post<{ index: number; tokenUri: string }>(`${runBase(id)}/items/${index}/metadata`, { userAddress })).data,\n\n resolveGuests: async (id: string) =>\n (await post<{ pending: string[] }>(`${runBase(id)}/guests/resolve`)).data.pending,\n\n registerGuest: async (id: string, request: WalletRequest) =>\n (await post<{ recipient: string; walletAddress: string }>(`${runBase(id)}/guests`, request)).data,\n\n confirmBatch: async (id: string, index: number): Promise<ConfirmResult> => {\n const { status, data } = await post<{ status: string; completed?: boolean }>(\n `${runBase(id)}/batches/${index}/confirm`,\n );\n return { pending: status === 202, status: data.status, completed: data.completed };\n },\n\n confirmCollection: async (id: string): Promise<ConfirmResult> => {\n const { status, data } = await post<{ status: string }>(`${runBase(id)}/collection/confirm`);\n return { pending: status === 202, status: data.status };\n },\n };\n}\n\nexport type LaunchpadRunsClient = ReturnType<typeof createLaunchpadRunsClient>;\n","import type { z } from \"zod\";\nimport type * as intents from \"../contract/intents.js\";\nimport type * as issuance from \"../contract/issuance.js\";\nimport type * as orders from \"../contract/orders.js\";\nimport type * as profiles from \"../contract/profiles.js\";\nimport type * as responses from \"../contract/responses.js\";\n\nexport type IPType =\n | \"Audio\"\n | \"Art\"\n | \"Documents\"\n | \"NFT\"\n | \"Video\"\n | \"Photography\"\n | \"Patents\"\n | \"Posts\"\n | \"Publications\"\n | \"RWA\"\n | \"Software\"\n | \"Custom\";\n\nexport type CollectionSort = \"recent\" | \"supply\" | \"floor\" | \"volume\" | \"name\";\n\nexport type CollectionTokensSort = \"recent\" | \"oldest\" | \"name\" | \"price\";\n\nexport type ServiceCapability =\n | \"list\" | \"buy\" | \"make_offer\" | \"cancel\"\n | \"transfer\" | \"burn\"\n | \"mint\" | \"claim\" | \"airdrop\"\n | \"remix\" | \"license\"\n | \"subscribe\" | \"redeem\"\n | \"launch\" | \"swap\"\n | \"sponsor\";\n\nexport interface EnforcementDeclaration {\n royalty?: \"erc2981\" | \"service-split\" | \"none\";\n escrow?: boolean;\n timeLock?: boolean;\n revocable?: boolean;\n}\n\nexport interface ServiceEventDeclaration {\n\n name: string;\n\n emittedBy: \"factory\" | \"instance\";\n\n poll?: \"fast\" | \"slow\";\n}\n\nexport interface ServiceDefinition {\n\n id: string;\n displayName: string;\n description: string;\n standard: \"ERC721\" | \"ERC1155\" | \"ERC20\" | \"UNKNOWN\";\n provenance: \"MEDIALANE\" | \"EXTERNAL\";\n onchain?: Partial<Record<import(\"../chains.js\").Chain, {\n factoryAddress?: string;\n classHash?: string;\n startBlock?: number;\n }>>;\n\n uiVariant: string;\n capabilities: ServiceCapability[];\n\n events?: ServiceEventDeclaration[];\n metadataSchema?: {\n requiredTraits?: string[];\n\n licenseDefault?: string;\n enforcement?: EnforcementDeclaration;\n };\n}\n\nexport interface ApiCollectionsQuery {\n page?: number;\n limit?: number;\n isKnown?: boolean;\n sort?: CollectionSort;\n owner?: string;\n\n service?: string;\n}\n\nexport type OrderStatus = \"ACTIVE\" | \"FULFILLED\" | \"CANCELLED\" | \"EXPIRED\";\nexport type SortOrder = \"price_asc\" | \"price_desc\" | \"recent\";\nexport type ActivityType = \"mint\" | \"transfer\" | \"sale\" | \"listing\" | \"offer\" | \"cancelled\";\nexport type IntentType = \"CREATE_LISTING\" | \"MAKE_OFFER\" | \"FULFILL_ORDER\" | \"CANCEL_ORDER\" | \"MINT\" | \"CREATE_COLLECTION\" | \"COUNTER_OFFER\";\nexport type IntentStatus = \"PENDING\" | \"SIGNED\" | \"SUBMITTED\" | \"CONFIRMED\" | \"FAILED\" | \"EXPIRED\";\n\nexport interface ApiMeta {\n page: number;\n limit: number;\n total?: number;\n\n counts?: Record<string, number>;\n}\n\nexport interface ApiResponse<T> {\n data: T;\n meta?: ApiMeta;\n}\n\nexport type ChainFilter = import(\"../chains.js\").Chain | \"all\";\n\nexport type ApiOrdersQuery = z.input<typeof orders.ordersListQuery> & { chain?: ChainFilter };\n\nexport interface ApiOrderOffer {\n itemType: string;\n token: string;\n identifier: string;\n startAmount: string;\n endAmount: string;\n}\n\nexport interface ApiOrderConsideration extends ApiOrderOffer {\n recipient: string;\n}\n\nexport interface ApiOrderPrice {\n raw: string | null;\n formatted: string | null;\n currency: string | null;\n decimals: number;\n}\n\nexport interface ApiOrderTxHash {\n created: string | null;\n fulfilled: string | null;\n cancelled: string | null;\n}\n\nexport interface ApiOrderTokenMeta {\n name: string | null;\n image: string | null;\n description: string | null;\n animationUrl: string | null;\n}\n\nexport type ApiOrder = z.output<typeof responses.orderSchema>;\n\nexport type IpAttribute = z.output<typeof responses.tokenAttributeSchema>;\n\nexport interface IpNftMetadata {\n name: string;\n description?: string;\n image?: string | null;\n external_url?: string;\n attributes?: IpAttribute[];\n\n ipType?: string | null;\n licenseType?: string | null;\n commercialUse?: string | null;\n derivatives?: string | null;\n attribution?: string | null;\n territory?: string | null;\n aiPolicy?: string | null;\n royalty?: string | null;\n registration?: string | null;\n}\n\nexport type ApiTokenMetadata = ApiToken[\"metadata\"];\n\nexport interface ApiTokenBalance {\n owner: string;\n\n amount: string;\n}\n\nexport type ApiToken = z.output<typeof responses.tokenSchema>;\n\nexport type ApiCollection = z.output<typeof responses.collectionSchema>;\n\nexport interface ApiCoin {\n id: string;\n chain: string;\n contractAddress: string;\n standard: \"ERC20\";\n\n service: string;\n name: string | null;\n symbol: string | null;\n decimals: number;\n\n totalSupply: string | null;\n description: string | null;\n image: string | null;\n creator: string | null;\n\n isLaunched?: boolean | null;\n startBlock: string;\n isHidden: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface ApiCoinPrice {\n\n usdc: number;\n}\n\nexport type ApiCoinPrices = Record<string, ApiCoinPrice | null>;\n\nexport type ApiCoinClaimResult =\n | { verified: true; coin: ApiCoin | null }\n | { verified: false; reason: \"owner_mismatch\" | \"owner_check_failed\" | \"not_erc20\" | \"no_total_supply\" };\n\nexport interface ApiCoinsQuery {\n chain?: ChainFilter;\n page?: number;\n limit?: number;\n service?: string;\n sort?: string;\n creator?: string;\n}\n\nexport interface ApiActivityPrice {\n raw: string | null;\n formatted: string | null;\n currency: string | null;\n}\n\nexport interface ApiActivity {\n type: ActivityType;\n chain: import(\"../chains.js\").Chain;\n\n contractAddress?: string;\n tokenId?: string;\n from?: string;\n to?: string;\n blockNumber?: string;\n\n amount?: string;\n\n orderHash?: string;\n nftContract?: string;\n nftTokenId?: string;\n offerer?: string;\n fulfiller?: string | null;\n price?: ApiActivityPrice;\n\n tokenStandard?: \"ERC721\" | \"ERC1155\";\n txHash: string | null;\n timestamp: string;\n\n token?: { name: string | null; image: string | null; animationUrl: string | null } | null;\n}\n\nexport interface ApiActivitiesQuery {\n chain?: ChainFilter;\n type?: ActivityType;\n\n contract?: string;\n page?: number;\n limit?: number;\n}\n\nexport interface ApiComment {\n id: string;\n chain: string;\n contractAddress: string;\n tokenId: string;\n author: string;\n content: string;\n txHash: string | null;\n blockNumber: string;\n postedAt: string;\n}\n\nexport interface ApiSearchTokenResult {\n contractAddress: string;\n tokenId: string;\n name: string | null;\n image: string | null;\n owner: string;\n metadataStatus: string;\n}\n\nexport interface ApiSearchCollectionResult {\n contractAddress: string;\n name: string | null;\n image: string | null;\n totalSupply: number | null;\n floorPrice: string | null;\n holderCount: number | null;\n}\n\nexport interface ApiSearchCreatorResult {\n walletAddress: string;\n username: string | null;\n name: string | null;\n bio: string | null;\n avatarImage: string | null;\n}\n\nexport interface ApiSearchResult {\n tokens: ApiSearchTokenResult[];\n collections: ApiSearchCollectionResult[];\n creators: ApiSearchCreatorResult[];\n}\n\nexport interface ApiIntent {\n id: string;\n chain: string;\n type: IntentType;\n status: IntentStatus;\n requester: string;\n typedData: unknown;\n calls: unknown;\n signature: string[];\n txHash: string | null;\n orderHash: string | null;\n\n parentOrderHash?: string | null;\n\n counterOfferMessage?: string | null;\n expiresAt: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface IntentCall {\n contractAddress: string;\n entrypoint: string;\n calldata: string[];\n}\n\nexport type ApiIntentCreated =\n | { id: string; expiresAt: string; requiresSignature: true; typedData: unknown }\n | { id: string; expiresAt: string; requiresSignature: false; calls: IntentCall[] };\n\nexport interface ApiTxSyncResult {\n applied: number;\n contracts?: string[];\n pending: boolean;\n}\n\nexport type CreateListingIntentParams = z.input<typeof intents.listingSchema>;\n\nexport type MakeOfferIntentParams = z.input<typeof intents.offerSchema>;\n\nexport type FulfillOrderIntentParams = z.input<typeof intents.fulfillSchema>;\n\nexport type CancelOrderIntentParams = z.input<typeof intents.cancelSchema>;\n\nexport type FactoryFamilyServiceId = (typeof intents.FACTORY_FAMILY_SERVICE_IDS)[number];\n\nexport type TierServiceId = (typeof intents.TIER_SERVICE_IDS)[number];\n\nexport type CollectionServiceId = (typeof intents.COLLECTION_SERVICE_IDS)[number];\n\nexport type CreateMintIntentParams = z.input<typeof intents.mintSchema>;\n\n/** Drop sale terms on the wire: amounts as decimal strings in the token's smallest unit. */\nexport interface DropTermsBody {\n /** Unix seconds; 0 = open from creation. */\n startTime: number;\n /** Unix seconds; 0 = never closes. */\n endTime: number;\n /** Per token; \"0\" = free. */\n price: string;\n paymentToken: string;\n /** \"0\" = unlimited. */\n maxPerWallet: string;\n}\n\nexport type ApiDropListStatus = \"live\" | \"upcoming\" | \"ended\";\n\nexport interface ApiDrop {\n contractAddress: string;\n dropId: string;\n organizer: string;\n name: string | null;\n symbol: string | null;\n description: string | null;\n image: string | null;\n /** Token URI = baseUri + token id. */\n baseUri: string | null;\n /** \"0\" = no cap. */\n maxSupply: string;\n minted: string;\n /** Total paid to the organizer, in the payment token's smallest unit. */\n revenue: string;\n collectors: number;\n terms: DropTermsBody;\n /** \"0x0\" = open to everyone. */\n allowlistRoot: string;\n createdBlock: string;\n}\n\nexport interface ApiDropFee {\n /** Platform fee added to a mint, in basis points; 0 when none applies. */\n launchpadBps: number;\n}\n\nexport interface ApiDropMint {\n kind: \"claim\" | \"issue\";\n wallet: string;\n quantity: string;\n firstTokenId: string;\n totalPaid: string;\n txHash: string;\n blockNumber: string;\n createdAt: string;\n}\n\nexport type CreateCollectionIntentParams = z.input<typeof intents.createCollectionSchema>;\n\nexport interface CheckoutIntentItem {\n orderHash: string;\n\n quantity?: string;\n}\n\nexport type CreateCheckoutIntentParams = z.input<typeof intents.checkoutBodySchema>;\n\nexport interface ApiCheckoutIntentResult {\n id?: string;\n orderHash: string;\n requiresSignature?: false;\n calls?: unknown;\n expiresAt?: string;\n\n error?: string;\n}\n\nexport type CreateTierIntentParams = z.output<typeof intents.createTierSchema>;\n\nexport type EmissionParams = z.input<typeof issuance.emissionSchema>;\n\nexport interface ApiEmissionCall {\n contractAddress: string;\n entrypoint: string;\n calldata: string[];\n}\n\nexport interface ApiEmissionResult {\n service: string;\n recipientCount: number;\n callCount: number;\n batches: ApiEmissionCall[][];\n}\n\nexport type CreateCoinIntentParams = z.input<typeof intents.createCoinSchema>;\n\nexport type LaunchCoinIntentParams = z.output<typeof intents.launchCoinSchema>;\n\nexport type CreateSponsorshipOfferIntentParams = z.output<typeof intents.sponsorshipOfferSchema>;\n\nexport type SetSponsorshipOfferOpenIntentParams = z.input<typeof intents.sponsorshipOfferOpenSchema>;\n\nexport type PlaceSponsorshipBidIntentParams = z.input<typeof intents.sponsorshipBidSchema>;\n\nexport type RetractSponsorshipBidIntentParams = z.input<typeof intents.sponsorshipBidRetractSchema>;\n\nexport type AcceptSponsorshipBidIntentParams = z.input<typeof intents.sponsorshipBidAcceptSchema>;\n\nexport type CreateSponsorshipProposalIntentParams = z.output<typeof intents.sponsorshipProposalSchema>;\n\nexport type WithdrawSponsorshipProposalIntentParams = z.input<typeof intents.sponsorshipProposalWithdrawSchema>;\n\nexport type AcceptSponsorshipProposalIntentParams = z.input<typeof intents.sponsorshipProposalAcceptSchema>;\n\nexport type RejectSponsorshipProposalIntentParams = z.input<typeof intents.sponsorshipProposalRejectSchema>;\n\nexport type CreateCounterOfferIntentParams = z.input<typeof intents.counterOfferSchema>;\n\nexport interface ApiCounterOffersQuery {\n\n originalOrderHash?: string;\n\n sellerAddress?: string;\n page?: number;\n limit?: number;\n}\n\nexport const OPEN_LICENSES = [\"CC0\", \"CC BY\", \"CC BY-SA\", \"CC BY-NC\"] as const;\nexport type OpenLicense = (typeof OPEN_LICENSES)[number];\n\nexport type RemixOfferStatus =\n | \"PENDING\"\n | \"AUTO_PENDING\"\n | \"APPROVED\"\n | \"COMPLETED\"\n | \"REJECTED\"\n | \"EXPIRED\"\n | \"SELF_MINTED\";\n\nexport interface ApiRemixOfferPrice {\n raw: string;\n formatted: string;\n currency: string;\n decimals: number;\n}\n\nexport interface ApiRemixOffer {\n id: string;\n status: RemixOfferStatus;\n originalContract: string;\n originalTokenId: string;\n creatorAddress: string;\n requesterAddress: string | null;\n message?: string | null;\n\n price?: ApiRemixOfferPrice;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n royaltyPct: number | null;\n approvedCollection: string | null;\n remixContract: string | null;\n remixTokenId: string | null;\n orderHash: string | null;\n createdAt: string;\n expiresAt: string;\n updatedAt: string;\n}\n\nexport interface ApiPublicRemix {\n id: string;\n remixContract: string | null;\n remixTokenId: string | null;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n createdAt: string;\n}\n\nexport interface CreateRemixOfferParams {\n originalContract: string;\n originalTokenId: string;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n royaltyPct?: number;\n proposedPrice?: string;\n proposedCurrency?: string;\n message?: string;\n\n expiresInDays?: number;\n}\n\nexport interface AutoRemixOfferParams {\n originalContract: string;\n originalTokenId: string;\n licenseType: string;\n}\n\nexport interface ConfirmSelfRemixParams {\n originalContract: string;\n originalTokenId: string;\n remixContract: string;\n remixTokenId: string;\n\n txHash?: string;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n royaltyPct?: number;\n}\n\nexport interface ConfirmRemixOfferParams {\n approvedCollection: string;\n remixContract: string;\n remixTokenId: string;\n orderHash?: string;\n}\n\nexport interface ApiRemixOffersQuery {\n\n role: \"creator\" | \"requester\";\n status?: string;\n page?: number;\n limit?: number;\n}\n\nexport interface ApiMetadataSignedUrl {\n url: string;\n}\n\nexport interface ApiMetadataUpload {\n cid: string;\n url: string;\n}\n\nexport interface ApiPortalMe {\n id: string;\n accountId: string;\n status: string;\n creditBalance: number;\n}\n\nexport interface ApiPortalKey {\n id: string;\n prefix: string;\n label: string | null;\n lastUsedAt: string | null;\n createdAt: string;\n}\n\nexport interface ApiPortalKeyCreated {\n id: string;\n prefix: string;\n label: string | null;\n\n plaintext: string;\n}\n\nexport interface ApiCreditPayment {\n id: string;\n asset: string;\n amountAtomic: string;\n creditedAmount: number;\n mdlnMultiplier: number;\n txHash: string;\n status: string;\n createdAt: string;\n}\n\nexport interface ApiFundingMethod {\n id: string;\n [detail: string]: unknown;\n}\n\nexport type ApiFundingStatus = \"PENDING\" | \"SETTLED\" | \"FAILED\" | \"EXPIRED\";\n\nexport interface ApiFundingIntent {\n id: string;\n method: string;\n status: ApiFundingStatus;\n expiresAt: string;\n payer?: string | null;\n}\n\nexport interface ApiFundingInstructions {\n chain: string;\n payTo: string;\n asset: string;\n amountAtomic: string;\n}\n\nexport type ApiFundingSubmit =\n | { status: \"SETTLED\"; credited?: number }\n | { status: \"PENDING\"; reason: string };\n\nexport interface ApiSpendByAction {\n actionKey: string;\n credits: number;\n units: number;\n}\n\nexport interface ApiPortalSpend {\n recent: Array<{ actionKey: string; credits: number; createdAt: string }>;\n byAction: ApiSpendByAction[];\n spent: number;\n credited: number;\n drift: number;\n}\n\nexport interface ApiCollectionProfile {\n contractAddress: string;\n chain: string;\n displayName: string | null;\n description: string | null;\n image: string | null;\n bannerImage: string | null;\n websiteUrl: string | null;\n twitterUrl: string | null;\n discordUrl: string | null;\n telegramUrl: string | null;\n hasGatedContent: boolean;\n gatedContentTitle: string | null;\n slug: string | null;\n updatedBy: string | null;\n updatedAt: string;\n}\n\nexport type UpdateCollectionProfileInput = z.output<typeof profiles.collectionProfileSchema>;\n\nexport interface ApiCollectionSlugClaim {\n id: string;\n slug: string;\n contractAddress: string;\n chain: string;\n walletAddress: string;\n status: \"PENDING\" | \"APPROVED\" | \"REJECTED\";\n adminNotes: string | null;\n notifyEmail: string | null;\n reviewedAt: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface ApiCreatorProfile {\n walletAddress: string;\n chain: string;\n username: string | null;\n name: string | null;\n bio: string | null;\n avatarImage: string | null;\n\n collectionImage?: string | null;\n websiteUrl: string | null;\n twitterUrl: string | null;\n discordUrl: string | null;\n telegramUrl: string | null;\n updatedAt: string;\n}\n\nexport interface ApiCreatorListResult {\n creators: ApiCreatorProfile[];\n total: number;\n page: number;\n limit: number;\n}\n\nexport type ApiChain = \"STARKNET\" | \"ETHEREUM\" | \"SOLANA\" | \"BASE\" | \"BITCOIN\";\n\nexport interface ApiSession {\n accountId: string;\n publicId: string;\n walletAddress: string | null;\n email: string | null;\n emailDeadline: string | null;\n}\n\nexport interface ApiUserWallet {\n walletAddress: string;\n email?: string | null;\n emailDeadline?: string | null;\n}\n\nexport interface ApiCollectionClaim {\n id: string;\n contractAddress: string;\n chain: string;\n claimantAddress: string | null;\n status: \"PENDING\" | \"AUTO_APPROVED\" | \"APPROVED\" | \"REJECTED\";\n verificationMethod: \"ONCHAIN\" | \"SIGNATURE\" | \"MANUAL\";\n createdAt: string;\n}\n\nexport interface ApiAdminCollectionClaim extends ApiCollectionClaim {\n claimantEmail: string | null;\n notes: string | null;\n adminNotes: string | null;\n reviewedBy: string | null;\n reviewedAt: string | null;\n updatedAt: string;\n}\n\nexport interface ApiBusinessProvisioning {\n chain: string;\n walletAddress: string;\n}\n\nexport interface ApiWalletActivity {\n id: string;\n chain: string;\n accountAddress: string;\n type: \"SEND\" | \"RECEIVE\" | \"SWAP\" | \"DEPLOY\" | \"GUARDIAN_SET\" | \"GUARDIAN_TRIGGER_ESCAPE\" | \"GUARDIAN_COMPLETE_ESCAPE\" | \"GUARDIAN_CANCEL_ESCAPE\";\n txHash: string;\n blockNumber: string;\n timestamp: string;\n tokenAddress: string | null;\n amount: string | null;\n counterparty: string | null;\n tokenInAddress: string | null;\n amountIn: string | null;\n tokenOutAddress: string | null;\n amountOut: string | null;\n}\n\nexport interface ApiRewardsBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface ApiRewardsLevel {\n level: number;\n name: string;\n xpRequired: number;\n badgeColor: string;\n description: string | null;\n}\n\nexport interface ApiUserRewards {\n address: string;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n nextLevel: { level: number; name: string; xpRequired: number } | null;\n progressPct: number;\n breakdown: Record<string, number>;\n badges: ApiRewardsBadge[];\n computedAt: string | null;\n}\n\nexport interface ApiRewardsLeaderboardEntry {\n rank: number;\n address: string;\n accountId: string | null;\n publicId: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface ApiRewardsConfig {\n levels: ApiRewardsLevel[];\n actions: { type: string; label: string; xp: number; dailyCap: number | null }[];\n badges: ApiRewardsBadge[];\n}\n\nexport interface ApiRewardsBatchEntry {\n address: string;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface ApiPointEvent {\n id: string;\n actionType: string;\n xp: number;\n multiplier: number;\n finalXp: number;\n txHash: string | null;\n createdAt: string;\n}\n\nexport interface ApiPlatformStats {\n collections: number;\n tokens: number;\n sales: number;\n}\n\nexport interface ApiTierOnchain {\n maxSupply: string;\n minted: string;\n startTime: number | null;\n endTime: number | null;\n royaltyBps: number;\n}\n\nexport interface ApiSwapQuoteRequest {\n sellSymbol?: string;\n buySymbol?: string;\n sellTokenAddress?: string;\n buyTokenAddress?: string;\n sellAmountRaw?: string;\n buyAmountRaw?: string;\n takerAddress?: string;\n}\n\nexport interface ApiSwapQuote {\n quoteId: string;\n sellTokenAddress: string;\n sellAmount: string;\n buyTokenAddress: string;\n buyAmount: string;\n}\n\nexport interface ApiIpNftTokenData {\n owner: string;\n metadataUri: string;\n originalCreator: string;\n registeredAt: number;\n}\n\nexport interface ApiTokensQuery {\n page?: number;\n limit?: number;\n sort?: string;\n ipType?: string;\n derivatives?: \"allowed\";\n}\n\nexport interface ApiUsernameClaim {\n id: string;\n username: string;\n walletAddress: string;\n status: \"PENDING\" | \"APPROVED\" | \"REJECTED\";\n adminNotes: string | null;\n reviewedAt: string | null;\n createdAt: string;\n}\n\nexport type ApiReportTargetType = \"COLLECTION\" | \"TOKEN\" | \"CREATOR\" | \"COMMENT\";\n\nexport interface ApiSubmitReport {\n targetType: ApiReportTargetType;\n targetContract?: string;\n targetTokenId?: string;\n targetAddress?: string;\n targetId?: string;\n categories: string[];\n description?: string;\n}\n\nexport interface ApiSponsorshipOffer {\n id: string;\n chain: string;\n contractAddress: string;\n offerId: string;\n author: string;\n nftContract: string;\n tokenId: string;\n minAmount: string;\n duration: number;\n paymentToken: string;\n licenseTermsUri: string;\n transferable: boolean;\n royaltyBps: number;\n specificSponsor: string | null;\n open: boolean;\n createdAtChain: string;\n updatedAt: string;\n}\n\nexport interface ApiSponsorshipBid {\n id: string;\n chain: string;\n contractAddress: string;\n offerId: string;\n sponsor: string;\n amount: string;\n placedAtChain: string;\n updatedAt: string;\n}\n\nexport interface ApiSponsorshipProposal {\n id: string;\n chain: string;\n contractAddress: string;\n proposalId: string;\n proposer: string;\n nftContract: string;\n tokenId: string;\n amount: string;\n duration: number;\n validUntil: string | null;\n paymentToken: string;\n licenseTermsUri: string;\n transferable: boolean;\n royaltyBps: number;\n open: boolean;\n accepted: boolean | null;\n createdAtChain: string;\n closedAtChain: string | null;\n updatedAt: string;\n}\n\nexport interface ApiSponsorshipLicense {\n id: string;\n chain: string;\n contractAddress: string;\n tokenId: string;\n author: string;\n recipient: string;\n assetContract: string;\n assetTokenId: string;\n expiresAt: string;\n transferable: boolean;\n royaltyBps: number;\n licenseTermsUri: string;\n offerId: string | null;\n proposalId: string | null;\n mintedAtChain: string;\n currentHolder?: string | null;\n}\n\nexport interface ApiSponsorshipOffersQuery {\n limit?: number;\n nftContract?: string;\n author?: string;\n owner?: string;\n open?: boolean;\n}\n\nexport interface ApiSponsorshipProposalsQuery {\n limit?: number;\n nftContract?: string;\n proposer?: string;\n owner?: string;\n open?: boolean;\n}\n\nexport interface ApiSponsorshipLicensesQuery {\n limit?: number;\n holder?: string;\n author?: string;\n}\n\nexport interface ApiCollectionsListQuery {\n page?: number;\n limit?: number;\n owner?: string;\n service?: string;\n sort?: CollectionSort;\n isFeatured?: boolean;\n hideEmpty?: boolean;\n standard?: string;\n chain?: ChainFilter;\n}\n\nexport interface ApiPricingRule {\n actionKey: string;\n chain: string;\n service: string;\n credits: number;\n}\n\nexport interface ApiPricing {\n creditsPerUsdc: number;\n mdln?: { contract: string | null; tiers: { minWholeTokens: number; multiplier: number }[] };\n pricing: { default: number; rules: ApiPricingRule[] };\n}\n\nexport type CreateTransferTokenIntentParams = z.input<typeof intents.transferTokenSchema>;\n\nexport type CreateTransferNftIntentParams = z.input<typeof intents.transferNftSchema>;\n\nexport type CreateTransferCollectionOwnershipIntentParams = z.input<typeof intents.transferCollectionOwnershipSchema>;\n\nexport type CreateCommentIntentParams = z.input<typeof intents.commentSchema>;\n\nexport type CreateGenesisMintIntentParams = z.input<typeof intents.genesisMintSchema>;\n\nexport type CreatePopClaimIntentParams = z.input<typeof intents.popClaimSchema>;\n\nexport type CreatePopBurnIntentParams = z.input<typeof intents.popBurnSchema>;\n\nexport type CreateDropClaimIntentParams = z.input<typeof intents.dropClaimSchema>;\n\nexport type WalletManageAction = \"add_owner\" | \"remove_owner\" | \"cancel_escape\" | \"set_first_guardian\" | \"trigger_escape\" | \"complete_escape\";\n\nexport type CreateWalletManageIntentParams = z.input<typeof intents.walletManageSchema>;\n\nexport type CreateSwapIntentParams = z.input<typeof intents.swapIntentSchema>;\n\nexport type CreateFundingTransferIntentParams = z.input<typeof intents.fundingTransferSchema>;\n\nexport type DropManageAction = \"issue\" | \"set_allowlist_root\";\n\nexport type CreateDropManageIntentParams = z.input<typeof intents.dropManageSchema>;\n\nexport type PopManageAction = \"issue\" | \"set_allowlist_root\";\n\nexport type CreatePopManageIntentParams = z.input<typeof intents.popManageSchema>;\n\nexport interface IntentParamsByKind {\n listing: CreateListingIntentParams;\n offer: MakeOfferIntentParams;\n fulfill: FulfillOrderIntentParams;\n cancel: CancelOrderIntentParams;\n mint: CreateMintIntentParams;\n \"transfer-token\": CreateTransferTokenIntentParams;\n \"transfer-nft\": CreateTransferNftIntentParams;\n \"transfer-collection-ownership\": CreateTransferCollectionOwnershipIntentParams;\n comment: CreateCommentIntentParams;\n \"genesis-mint\": CreateGenesisMintIntentParams;\n \"pop-claim\": CreatePopClaimIntentParams;\n \"pop-burn\": CreatePopBurnIntentParams;\n \"drop-claim\": CreateDropClaimIntentParams;\n \"wallet-manage\": CreateWalletManageIntentParams;\n swap: CreateSwapIntentParams;\n \"funding-transfer\": CreateFundingTransferIntentParams;\n \"drop-manage\": CreateDropManageIntentParams;\n \"pop-manage\": CreatePopManageIntentParams;\n \"create-collection\": CreateCollectionIntentParams;\n \"create-tier\": CreateTierIntentParams;\n \"create-coin\": CreateCoinIntentParams;\n \"launch-coin\": LaunchCoinIntentParams;\n \"sponsorship-offer\": CreateSponsorshipOfferIntentParams;\n \"sponsorship-offer-open\": SetSponsorshipOfferOpenIntentParams;\n \"sponsorship-bid\": PlaceSponsorshipBidIntentParams;\n \"sponsorship-bid-retract\": RetractSponsorshipBidIntentParams;\n \"sponsorship-bid-accept\": AcceptSponsorshipBidIntentParams;\n \"sponsorship-proposal\": CreateSponsorshipProposalIntentParams;\n \"sponsorship-proposal-withdraw\": WithdrawSponsorshipProposalIntentParams;\n \"sponsorship-proposal-accept\": AcceptSponsorshipProposalIntentParams;\n \"sponsorship-proposal-reject\": RejectSponsorshipProposalIntentParams;\n \"counter-offer\": CreateCounterOfferIntentParams;\n}\n","\n\nexport type AssetAttribute = { trait_type: string; value: string };\n\nexport interface AssetMetadata {\n name: string;\n description: string;\n image: string | null;\n external_url: string;\n attributes: AssetAttribute[];\n}\n\nexport interface BuildAssetMetadataInput {\n name: string;\n description?: string | null;\n externalUrl?: string | null;\n imageUri?: string | null;\n creator?: string | null;\n ipType?: string | null;\n licenseType?: string | null;\n commercialUse?: string | null;\n derivatives?: string | null;\n attribution?: string | null;\n geographicScope?: string | null;\n aiPolicy?: string | null;\n royalty?: string | null;\n edition?: string | null;\n\n templateTraits?: { traitType: string; value: string }[];\n}\n\nexport const RESERVED_TRAITS = new Set([\n \"Creator\", \"IP Type\", \"License\", \"Commercial Use\", \"Derivatives\",\n \"Attribution\", \"Territory\", \"AI Policy\", \"Royalty\", \"Edition\",\n \"Standard\",\n]);\nconst RESERVED_TRAITS_NORMALIZED = new Set([...RESERVED_TRAITS].map((t) => t.toLowerCase()));\n\nexport function buildAssetMetadata(input: BuildAssetMetadataInput): AssetMetadata {\n const attributes: AssetAttribute[] = [];\n\n if (input.creator) attributes.push({ trait_type: \"Creator\", value: input.creator });\n if (input.ipType) attributes.push({ trait_type: \"IP Type\", value: input.ipType });\n if (input.licenseType) attributes.push({ trait_type: \"License\", value: input.licenseType });\n if (input.commercialUse) attributes.push({ trait_type: \"Commercial Use\", value: input.commercialUse });\n if (input.derivatives) attributes.push({ trait_type: \"Derivatives\", value: input.derivatives });\n if (input.attribution) attributes.push({ trait_type: \"Attribution\", value: input.attribution });\n if (input.geographicScope) attributes.push({ trait_type: \"Territory\", value: input.geographicScope });\n if (input.aiPolicy) attributes.push({ trait_type: \"AI Policy\", value: input.aiPolicy });\n\n if (input.royalty) {\n const num = parseFloat(String(input.royalty).replace(\"%\", \"\"));\n if (!isNaN(num) && num > 0) attributes.push({ trait_type: \"Royalty\", value: `${num}%` });\n }\n\n if (input.edition) attributes.push({ trait_type: \"Edition\", value: input.edition });\n\n for (const t of input.templateTraits ?? []) {\n const traitType = t.traitType?.trim() ?? \"\";\n const traitValue = String(t.value ?? \"\").trim();\n if (!traitType || !traitValue || RESERVED_TRAITS_NORMALIZED.has(traitType.toLowerCase())) continue;\n attributes.push({ trait_type: traitType, value: traitValue });\n }\n\n if (input.licenseType) attributes.push({ trait_type: \"Standard\", value: \"Berne Convention\" });\n\n return {\n name: input.name,\n description: input.description ?? \"\",\n image: input.imageUri ?? null,\n external_url: input.externalUrl || \"https://medialane.io\",\n attributes,\n };\n}\n\nexport interface CollectionMetadata {\n name: string;\n description?: string;\n image?: string;\n external_link: string;\n}\n\nexport interface BuildCollectionMetadataInput {\n name: string;\n owner: string;\n description?: string | null;\n image?: string | null;\n externalLink?: string | null;\n}\n\nexport const accountPageUrl = (address: string): string => `https://www.medialane.io/account/${address}`;\n\nexport function buildCollectionMetadata(input: BuildCollectionMetadataInput): CollectionMetadata {\n const description = input.description?.trim();\n const image = input.image?.trim();\n return {\n name: input.name,\n ...(description ? { description } : {}),\n ...(image ? { image } : {}),\n external_link: input.externalLink?.trim() || accountPageUrl(input.owner),\n };\n}\n","\n\ntype Attribute = { trait_type?: string; value?: string | number | boolean };\n\nexport function getDerivativesTerm(\n attributes: Attribute[] | null | undefined,\n): \"Allowed\" | \"Not Allowed\" | null {\n const v = (Array.isArray(attributes) ? attributes : []).find(\n (a) => a.trait_type === \"Derivatives\",\n )?.value;\n return v === \"Allowed\" || v === \"Not Allowed\" ? v : null;\n}\n\nexport interface RemixPolicyInput {\n\n parentNoDerivatives: boolean;\n\n viewerIsParentOwner: boolean;\n\n dealAvailable: boolean;\n}\n\nexport interface RemixPolicy extends RemixPolicyInput {\n\n canRemixDirect: boolean;\n\n showDealOption: boolean;\n}\n\nexport function resolveRemixPolicy(input: RemixPolicyInput): RemixPolicy {\n const canRemixDirect = input.viewerIsParentOwner || !input.parentNoDerivatives;\n const showDealOption = input.dealAvailable && !input.viewerIsParentOwner;\n return { ...input, canRemixDirect, showDealOption };\n}\n","export type UploadKind = \"image\" | \"document\" | \"media\";\n\nconst MB = 1024 * 1024;\n\nexport const MAX_UPLOAD_BYTES = 90 * MB;\n\nexport function formatFileSize(bytes: number): string {\n const mb = bytes / MB;\n return `${Number.isInteger(mb) ? mb : mb.toFixed(1)} MB`;\n}\n\nexport function uploadSizeError(file: { size: number }, kind: UploadKind = \"image\"): string | null {\n if (file.size <= MAX_UPLOAD_BYTES) return null;\n const noun = kind === \"image\" ? \"image\" : \"file\";\n return `That ${noun} is ${formatFileSize(file.size)}. Please choose one under ${formatFileSize(MAX_UPLOAD_BYTES)}.`;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/api/launchpad-runs.ts","../src/types/api.ts","../src/metadata.ts","../src/remix-policy.ts","../src/uploads.ts"],"names":[],"mappings":";;;;;;;;;;AAoEO,IAAM,qBAAA,GAAwB,CAAC,GAAA,KACpC,GAAA,CA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,SAAA,IAAa,CAAA,KAAM,aAAA,GAAgB,CAAA,GAAI,IAAA;AACtD;AAkBO,SAAS,mBAAmB,KAAA,EAAsC;AACvE,EAAA,MAAM,cAAA,GAAiB,KAAA,CAAM,mBAAA,IAAuB,CAAC,KAAA,CAAM,mBAAA;AAC3D,EAAA,MAAM,cAAA,GAAiB,KAAA,CAAM,aAAA,IAAiB,CAAC,KAAA,CAAM,mBAAA;AACrD,EAAA,OAAO,EAAE,GAAG,KAAA,EAAO,cAAA,EAAgB,cAAA,EAAe;AACpD;;;AC/BA,IAAM,KAAK,IAAA,GAAO,IAAA;AAEX,IAAM,mBAAmB,EAAA,GAAK;AAE9B,SAAS,eAAe,KAAA,EAAuB;AACpD,EAAA,MAAM,KAAK,KAAA,GAAQ,EAAA;AACnB,EAAA,OAAO,CAAA,EAAG,OAAO,SAAA,CAAU,EAAE,IAAI,EAAA,GAAK,EAAA,CAAG,OAAA,CAAQ,CAAC,CAAC,CAAA,GAAA,CAAA;AACrD;AAEO,SAAS,eAAA,CAAgB,IAAA,EAAwB,IAAA,GAAmB,OAAA,EAAwB;AACjG,EAAA,IAAI,IAAA,CAAK,IAAA,IAAQ,gBAAA,EAAkB,OAAO,IAAA;AAC1C,EAAA,MAAM,IAAA,GAAO,IAAA,KAAS,OAAA,GAAU,OAAA,GAAU,MAAA;AAC1C,EAAA,OAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,IAAA,EAAO,cAAA,CAAe,IAAA,CAAK,IAAI,CAAC,CAAA,0BAAA,EAA6B,cAAA,CAAe,gBAAgB,CAAC,CAAA,CAAA,CAAA;AAClH","file":"index.cjs","sourcesContent":["import type { FetchLike } from \"../utils/fetch.js\";\nexport type RunStatus = \"DRAFT\" | \"PAID\" | \"RUNNING\" | \"COMPLETED\" | \"FAILED\" | \"CANCELLED\";\n\nexport interface RunQuoteLine {\n action: string;\n units: number;\n unitCredits: number;\n credits: number;\n}\n\nexport interface RunQuote {\n lines: RunQuoteLine[];\n total: number;\n}\n\nexport type NextStep =\n | { kind: \"collection\" }\n | { kind: \"wait-collection\" }\n | { kind: \"upload\"; files: string[] }\n | { kind: \"metadata\"; items: number[] }\n | { kind: \"wallets\" }\n | { kind: \"batch\"; index: number }\n | { kind: \"wait\"; index: number }\n | { kind: \"done\" };\n\nexport type TicketingNextStep =\n | { kind: \"collection\" }\n | { kind: \"wait-collection\" }\n | { kind: \"upload\"; files: string[] }\n | { kind: \"ticket-metadata\" }\n | { kind: \"tier\" }\n | { kind: \"wait-tier\" }\n | { kind: \"wallets\" }\n | { kind: \"batch\"; index: number }\n | { kind: \"wait\"; index: number }\n | { kind: \"done\" };\n\nexport type CertificateEmissionNextStep =\n | { kind: \"collection\" }\n | { kind: \"wait-collection\" }\n | { kind: \"upload\"; files: string[] }\n | { kind: \"certificate-metadata\" }\n | { kind: \"wallets\" }\n | { kind: \"batch\"; index: number }\n | { kind: \"wait\"; index: number }\n | { kind: \"done\" };\n\nexport interface WalletRequest {\n recipient: string;\n}\n\ninterface LaunchpadRunBase {\n id: string;\n status: RunStatus;\n spec: unknown;\n quote: RunQuote | null;\n creditsHeld: number;\n creditsSpent: number;\n progress: unknown;\n createdAt: string;\n updatedAt: string;\n}\n\nexport type DataTokenizationRun = LaunchpadRunBase & { service: \"data-tokenization-erc721\"; next?: NextStep };\nexport type TicketingRun = LaunchpadRunBase & { service: \"ip-ticketing\"; next?: TicketingNextStep };\nexport type CertificateEmissionRun = LaunchpadRunBase & { service: \"certificate-emission\"; next?: CertificateEmissionNextStep };\nexport type LaunchpadRun = DataTokenizationRun | TicketingRun | CertificateEmissionRun;\n\nexport const isDataTokenizationRun = (run: LaunchpadRun): run is DataTokenizationRun =>\n run.service === \"data-tokenization-erc721\";\n\nexport const isTicketingRun = (run: LaunchpadRun): run is TicketingRun => run.service === \"ip-ticketing\";\n\nexport const isCertificateEmissionRun = (run: LaunchpadRun): run is CertificateEmissionRun =>\n run.service === \"certificate-emission\";\n\nexport interface ConfirmResult {\n pending: boolean;\n status: string;\n completed?: boolean;\n}\n\nexport class RunRequestError extends Error {\n constructor(\n message: string,\n readonly status: number,\n readonly body: Record<string, unknown>,\n ) {\n super(message);\n }\n}\n\nexport interface LaunchpadRunsClientOptions {\n baseUrl: string;\n fetchImpl?: FetchLike;\n}\n\nexport function createLaunchpadRunsClient({ baseUrl, fetchImpl = fetch }: LaunchpadRunsClientOptions) {\n const runsUrl = `${baseUrl.replace(/\\/$/, \"\")}/v1/portal/runs`;\n const runBase = (id: string): string => `${runsUrl}/${id}`;\n const runBatchBase = (id: string, index: number): string => `${runBase(id)}/batches/${index}`;\n const runCollectionBase = (id: string): string => `${runBase(id)}/collection`;\n const runTierBase = (id: string): string => `${runBase(id)}/tier`;\n\n const runFetch: FetchLike = (input, init) => fetchImpl(input, { ...init, cache: \"no-store\" });\n\n async function call<T>(url: string, init?: RequestInit): Promise<{ status: number; data: T }> {\n const res = await runFetch(url, {\n ...init,\n headers: { \"content-type\": \"application/json\", ...(init?.headers as Record<string, string> | undefined) },\n });\n const body = (await res.json().catch(() => ({}))) as Record<string, unknown>;\n if (!res.ok) {\n throw new RunRequestError(String(body.error ?? `Request returned status ${res.status}`), res.status, body);\n }\n return { status: res.status, data: body.data as T };\n }\n\n const post = <T>(url: string, body?: unknown) =>\n call<T>(url, { method: \"POST\", body: body === undefined ? undefined : JSON.stringify(body) });\n\n const confirm = async (url: string): Promise<ConfirmResult> => {\n const { status, data } = await post<{ status: string; completed?: boolean }>(url);\n return { pending: status === 202, status: data.status, completed: data.completed };\n };\n\n const ticketing = {\n uploadUrl: async (id: string, name: string) =>\n (await post<{ name: string; url: string }>(`${runBase(id)}/files/upload-url`, { name })).data.url,\n\n uploaded: async (id: string, name: string, cid: string) =>\n (await post<{ name: string; uri: string }>(`${runBase(id)}/files/uploaded`, { name, cid })).data,\n\n metadata: async (id: string, userAddress: string) =>\n (await post<{ tokenUri: string }>(`${runBase(id)}/metadata`, { userAddress })).data,\n\n resolveWallets: async (id: string) =>\n (await post<{ pending: string[] }>(`${runBase(id)}/wallets/resolve`)).data.pending,\n\n registerWallet: async (id: string, request: WalletRequest) =>\n (await post<{ recipient: string; walletAddress: string }>(`${runBase(id)}/wallets`, request)).data,\n\n confirmCollection: (id: string) => confirm(`${runCollectionBase(id)}/confirm`),\n confirmTier: (id: string) => confirm(`${runTierBase(id)}/confirm`),\n confirmBatch: (id: string, index: number) => confirm(`${runBatchBase(id, index)}/confirm`),\n };\n\n const certificateEmission = {\n uploadUrl: async (id: string, name: string) =>\n (await post<{ name: string; url: string }>(`${runBase(id)}/files/upload-url`, { name })).data.url,\n\n uploaded: async (id: string, name: string, cid: string) =>\n (await post<{ name: string; uri: string }>(`${runBase(id)}/files/uploaded`, { name, cid })).data,\n\n metadata: async (id: string, userAddress: string) =>\n (await post<{ tokenUri: string }>(`${runBase(id)}/certificate-metadata`, { userAddress })).data,\n\n resolveWallets: async (id: string) =>\n (await post<{ pending: string[] }>(`${runBase(id)}/recipients/resolve`)).data.pending,\n\n registerWallet: async (id: string, request: WalletRequest) =>\n (await post<{ recipient: string; walletAddress: string }>(`${runBase(id)}/recipients`, request)).data,\n\n confirmCollection: (id: string) => confirm(`${runCollectionBase(id)}/confirm`),\n confirmBatch: (id: string, index: number) => confirm(`${runBatchBase(id, index)}/confirm`),\n };\n\n return {\n fetch: runFetch,\n runBase,\n runBatchBase,\n runCollectionBase,\n runTierBase,\n ticketing,\n certificateEmission,\n\n list: async () => (await call<LaunchpadRun[]>(runsUrl)).data,\n\n get: async (id: string) => (await call<LaunchpadRun>(`${runBase(id)}`)).data,\n\n create: async (service: string, spec: unknown) =>\n (await post<LaunchpadRun>(runsUrl, { service, spec })).data,\n\n update: async (id: string, spec: unknown) =>\n (await call<LaunchpadRun>(`${runBase(id)}`, { method: \"PATCH\", body: JSON.stringify({ spec }) })).data,\n\n cancel: async (id: string) => (await post<LaunchpadRun>(`${runBase(id)}/cancel`)).data,\n\n checkoutWithCredits: async (id: string) =>\n (await post<LaunchpadRun>(`${runBase(id)}/checkout`, { method: \"credits\" })).data,\n\n checkoutFromWallet: async (id: string, intentId: string) =>\n (await post<LaunchpadRun>(`${runBase(id)}/checkout`, { method: \"wallet\", intentId })).data,\n\n uploadUrl: async (id: string, name: string) =>\n (await post<{ name: string; url: string }>(`${runBase(id)}/files/upload-url`, { name })).data.url,\n\n uploaded: async (id: string, name: string, cid: string) =>\n (await post<{ name: string; uri: string }>(`${runBase(id)}/files/uploaded`, { name, cid })).data,\n\n itemMetadata: async (id: string, index: number, userAddress: string) =>\n (await post<{ index: number; tokenUri: string }>(`${runBase(id)}/items/${index}/metadata`, { userAddress })).data,\n\n resolveGuests: async (id: string) =>\n (await post<{ pending: string[] }>(`${runBase(id)}/guests/resolve`)).data.pending,\n\n registerGuest: async (id: string, request: WalletRequest) =>\n (await post<{ recipient: string; walletAddress: string }>(`${runBase(id)}/guests`, request)).data,\n\n confirmBatch: async (id: string, index: number): Promise<ConfirmResult> => {\n const { status, data } = await post<{ status: string; completed?: boolean }>(\n `${runBase(id)}/batches/${index}/confirm`,\n );\n return { pending: status === 202, status: data.status, completed: data.completed };\n },\n\n confirmCollection: async (id: string): Promise<ConfirmResult> => {\n const { status, data } = await post<{ status: string }>(`${runBase(id)}/collection/confirm`);\n return { pending: status === 202, status: data.status };\n },\n };\n}\n\nexport type LaunchpadRunsClient = ReturnType<typeof createLaunchpadRunsClient>;\n","import type { z } from \"zod\";\nimport type * as intents from \"../contract/intents.js\";\nimport type * as issuance from \"../contract/issuance.js\";\nimport type * as orders from \"../contract/orders.js\";\nimport type * as profiles from \"../contract/profiles.js\";\nimport type * as responses from \"../contract/responses.js\";\n\nexport type IPType =\n | \"Audio\"\n | \"Art\"\n | \"Documents\"\n | \"NFT\"\n | \"Video\"\n | \"Photography\"\n | \"Patents\"\n | \"Posts\"\n | \"Publications\"\n | \"RWA\"\n | \"Software\"\n | \"Custom\";\n\nexport type CollectionSort = \"recent\" | \"supply\" | \"floor\" | \"volume\" | \"name\";\n\nexport type CollectionTokensSort = \"recent\" | \"oldest\" | \"name\" | \"price\";\n\nexport type ServiceCapability =\n | \"list\" | \"buy\" | \"make_offer\" | \"cancel\"\n | \"transfer\" | \"burn\"\n | \"mint\" | \"claim\" | \"airdrop\"\n | \"remix\" | \"license\"\n | \"subscribe\" | \"redeem\"\n | \"launch\" | \"swap\"\n | \"sponsor\";\n\nexport interface EnforcementDeclaration {\n royalty?: \"erc2981\" | \"service-split\" | \"none\";\n escrow?: boolean;\n timeLock?: boolean;\n revocable?: boolean;\n}\n\nexport interface ServiceEventDeclaration {\n\n name: string;\n\n emittedBy: \"factory\" | \"instance\";\n\n poll?: \"fast\" | \"slow\";\n}\n\nexport interface ServiceDefinition {\n\n id: string;\n displayName: string;\n description: string;\n standard: \"ERC721\" | \"ERC1155\" | \"ERC20\" | \"UNKNOWN\";\n provenance: \"MEDIALANE\" | \"EXTERNAL\";\n onchain?: Partial<Record<import(\"../chains.js\").Chain, {\n factoryAddress?: string;\n classHash?: string;\n startBlock?: number;\n }>>;\n\n uiVariant: string;\n capabilities: ServiceCapability[];\n\n events?: ServiceEventDeclaration[];\n metadataSchema?: {\n requiredTraits?: string[];\n\n licenseDefault?: string;\n enforcement?: EnforcementDeclaration;\n };\n}\n\nexport interface ApiCollectionsQuery {\n page?: number;\n limit?: number;\n isKnown?: boolean;\n sort?: CollectionSort;\n owner?: string;\n\n service?: string;\n}\n\nexport type OrderStatus = \"ACTIVE\" | \"FULFILLED\" | \"CANCELLED\" | \"EXPIRED\";\nexport type SortOrder = \"price_asc\" | \"price_desc\" | \"recent\";\nexport type ActivityType = \"mint\" | \"transfer\" | \"sale\" | \"listing\" | \"offer\" | \"cancelled\";\nexport type IntentType = \"CREATE_LISTING\" | \"MAKE_OFFER\" | \"FULFILL_ORDER\" | \"CANCEL_ORDER\" | \"MINT\" | \"CREATE_COLLECTION\" | \"COUNTER_OFFER\";\nexport type IntentStatus = \"PENDING\" | \"SIGNED\" | \"SUBMITTED\" | \"CONFIRMED\" | \"FAILED\" | \"EXPIRED\";\n\nexport interface ApiMeta {\n page: number;\n limit: number;\n total?: number;\n\n counts?: Record<string, number>;\n}\n\nexport interface ApiResponse<T> {\n data: T;\n meta?: ApiMeta;\n}\n\nexport type ChainFilter = import(\"../chains.js\").Chain | \"all\";\n\nexport type ApiOrdersQuery = z.input<typeof orders.ordersListQuery> & { chain?: ChainFilter };\n\nexport interface ApiOrderOffer {\n itemType: string;\n token: string;\n identifier: string;\n startAmount: string;\n endAmount: string;\n}\n\nexport interface ApiOrderConsideration extends ApiOrderOffer {\n recipient: string;\n}\n\nexport interface ApiOrderPrice {\n raw: string | null;\n formatted: string | null;\n currency: string | null;\n decimals: number;\n}\n\nexport interface ApiOrderTxHash {\n created: string | null;\n fulfilled: string | null;\n cancelled: string | null;\n}\n\nexport interface ApiOrderTokenMeta {\n name: string | null;\n image: string | null;\n description: string | null;\n animationUrl: string | null;\n}\n\nexport type ApiOrder = z.output<typeof responses.orderSchema>;\n\nexport type IpAttribute = z.output<typeof responses.tokenAttributeSchema>;\n\nexport interface IpNftMetadata {\n name: string;\n description?: string;\n image?: string | null;\n external_url?: string;\n attributes?: IpAttribute[];\n\n ipType?: string | null;\n licenseType?: string | null;\n commercialUse?: string | null;\n derivatives?: string | null;\n attribution?: string | null;\n territory?: string | null;\n aiPolicy?: string | null;\n royalty?: string | null;\n registration?: string | null;\n}\n\nexport type ApiTokenMetadata = ApiToken[\"metadata\"];\n\nexport interface ApiTokenBalance {\n owner: string;\n\n amount: string;\n}\n\nexport type ApiToken = z.output<typeof responses.tokenSchema>;\n\nexport type ApiCollection = z.output<typeof responses.collectionSchema>;\n\nexport interface ApiCoin {\n id: string;\n chain: string;\n contractAddress: string;\n standard: \"ERC20\";\n\n service: string;\n name: string | null;\n symbol: string | null;\n decimals: number;\n\n totalSupply: string | null;\n description: string | null;\n image: string | null;\n creator: string | null;\n\n isLaunched?: boolean | null;\n startBlock: string;\n isHidden: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface ApiCoinPrice {\n\n usdc: number;\n}\n\nexport type ApiCoinPrices = Record<string, ApiCoinPrice | null>;\n\nexport type ApiCoinClaimResult =\n | { verified: true; coin: ApiCoin | null }\n | { verified: false; reason: \"owner_mismatch\" | \"owner_check_failed\" | \"not_erc20\" | \"no_total_supply\" };\n\nexport interface ApiCoinsQuery {\n chain?: ChainFilter;\n page?: number;\n limit?: number;\n service?: string;\n sort?: string;\n creator?: string;\n}\n\nexport interface ApiActivityPrice {\n raw: string | null;\n formatted: string | null;\n currency: string | null;\n}\n\nexport interface ApiActivity {\n type: ActivityType;\n chain: import(\"../chains.js\").Chain;\n\n contractAddress?: string;\n tokenId?: string;\n from?: string;\n to?: string;\n blockNumber?: string;\n\n amount?: string;\n\n orderHash?: string;\n nftContract?: string;\n nftTokenId?: string;\n offerer?: string;\n fulfiller?: string | null;\n price?: ApiActivityPrice;\n\n tokenStandard?: \"ERC721\" | \"ERC1155\";\n txHash: string | null;\n timestamp: string;\n\n token?: { name: string | null; image: string | null; animationUrl: string | null } | null;\n}\n\nexport interface ApiActivitiesQuery {\n chain?: ChainFilter;\n type?: ActivityType;\n\n contract?: string;\n page?: number;\n limit?: number;\n}\n\nexport interface ApiComment {\n id: string;\n chain: string;\n contractAddress: string;\n tokenId: string;\n author: string;\n content: string;\n txHash: string | null;\n blockNumber: string;\n postedAt: string;\n}\n\nexport interface ApiSearchTokenResult {\n contractAddress: string;\n tokenId: string;\n name: string | null;\n image: string | null;\n owner: string;\n metadataStatus: string;\n}\n\nexport interface ApiSearchCollectionResult {\n contractAddress: string;\n name: string | null;\n image: string | null;\n totalSupply: number | null;\n floorPrice: string | null;\n holderCount: number | null;\n}\n\nexport interface ApiSearchCreatorResult {\n walletAddress: string;\n username: string | null;\n name: string | null;\n bio: string | null;\n avatarImage: string | null;\n}\n\nexport interface ApiSearchResult {\n tokens: ApiSearchTokenResult[];\n collections: ApiSearchCollectionResult[];\n creators: ApiSearchCreatorResult[];\n}\n\nexport interface ApiIntent {\n id: string;\n chain: string;\n type: IntentType;\n status: IntentStatus;\n requester: string;\n typedData: unknown;\n calls: unknown;\n signature: string[];\n txHash: string | null;\n orderHash: string | null;\n\n parentOrderHash?: string | null;\n\n counterOfferMessage?: string | null;\n expiresAt: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface IntentCall {\n contractAddress: string;\n entrypoint: string;\n calldata: string[];\n}\n\nexport type ApiIntentCreated =\n | { id: string; expiresAt: string; requiresSignature: true; typedData: unknown }\n | { id: string; expiresAt: string; requiresSignature: false; calls: IntentCall[] };\n\nexport interface ApiTxSyncResult {\n applied: number;\n contracts?: string[];\n pending: boolean;\n}\n\nexport type CreateListingIntentParams = z.input<typeof intents.listingSchema>;\n\nexport type MakeOfferIntentParams = z.input<typeof intents.offerSchema>;\n\nexport type FulfillOrderIntentParams = z.input<typeof intents.fulfillSchema>;\n\nexport type CancelOrderIntentParams = z.input<typeof intents.cancelSchema>;\n\nexport type FactoryFamilyServiceId = (typeof intents.FACTORY_FAMILY_SERVICE_IDS)[number];\n\nexport type TierServiceId = (typeof intents.TIER_SERVICE_IDS)[number];\n\nexport type CollectionServiceId = (typeof intents.COLLECTION_SERVICE_IDS)[number];\n\nexport type CreateMintIntentParams = z.input<typeof intents.mintSchema>;\n\n/** Drop sale terms on the wire: amounts as decimal strings in the token's smallest unit. */\nexport interface DropTermsBody {\n /** Unix seconds; 0 = open from creation. */\n startTime: number;\n /** Unix seconds; 0 = never closes. */\n endTime: number;\n /** Per token; \"0\" = free. */\n price: string;\n paymentToken: string;\n /** \"0\" = unlimited. */\n maxPerWallet: string;\n}\n\nexport type ApiDropListStatus = \"live\" | \"upcoming\" | \"ended\";\n\nexport interface ApiDrop {\n contractAddress: string;\n dropId: string;\n organizer: string;\n name: string | null;\n symbol: string | null;\n description: string | null;\n image: string | null;\n /** Token URI = baseUri + token id. */\n baseUri: string | null;\n /** \"0\" = no cap. */\n maxSupply: string;\n minted: string;\n /** Total paid to the organizer, in the payment token's smallest unit. */\n revenue: string;\n collectors: number;\n terms: DropTermsBody;\n /** \"0x0\" = open to everyone. */\n allowlistRoot: string;\n createdBlock: string;\n}\n\nexport interface ApiDropFee {\n /** Platform fee added to a mint, in basis points; 0 when none applies. */\n launchpadBps: number;\n}\n\nexport interface ApiDropMint {\n kind: \"claim\" | \"issue\";\n wallet: string;\n quantity: string;\n firstTokenId: string;\n totalPaid: string;\n txHash: string;\n blockNumber: string;\n createdAt: string;\n}\n\nexport type CreateCollectionIntentParams = z.input<typeof intents.createCollectionSchema>;\n\nexport interface CheckoutIntentItem {\n orderHash: string;\n\n quantity?: string;\n}\n\nexport type CreateCheckoutIntentParams = z.input<typeof intents.checkoutBodySchema>;\n\nexport interface ApiCheckoutIntentResult {\n id?: string;\n orderHash: string;\n requiresSignature?: false;\n calls?: unknown;\n expiresAt?: string;\n\n error?: string;\n}\n\nexport type CreateTierIntentParams = z.output<typeof intents.createTierSchema>;\n\nexport type EmissionParams = z.input<typeof issuance.emissionSchema>;\n\nexport interface ApiEmissionCall {\n contractAddress: string;\n entrypoint: string;\n calldata: string[];\n}\n\nexport interface ApiEmissionResult {\n service: string;\n recipientCount: number;\n callCount: number;\n batches: ApiEmissionCall[][];\n}\n\nexport type CreateCoinIntentParams = z.input<typeof intents.createCoinSchema>;\n\nexport type LaunchCoinIntentParams = z.output<typeof intents.launchCoinSchema>;\n\nexport type CreateSponsorshipOfferIntentParams = z.output<typeof intents.sponsorshipOfferSchema>;\n\nexport type SetSponsorshipOfferOpenIntentParams = z.input<typeof intents.sponsorshipOfferOpenSchema>;\n\nexport type PlaceSponsorshipBidIntentParams = z.input<typeof intents.sponsorshipBidSchema>;\n\nexport type RetractSponsorshipBidIntentParams = z.input<typeof intents.sponsorshipBidRetractSchema>;\n\nexport type AcceptSponsorshipBidIntentParams = z.input<typeof intents.sponsorshipBidAcceptSchema>;\n\nexport type CreateSponsorshipProposalIntentParams = z.output<typeof intents.sponsorshipProposalSchema>;\n\nexport type WithdrawSponsorshipProposalIntentParams = z.input<typeof intents.sponsorshipProposalWithdrawSchema>;\n\nexport type AcceptSponsorshipProposalIntentParams = z.input<typeof intents.sponsorshipProposalAcceptSchema>;\n\nexport type RejectSponsorshipProposalIntentParams = z.input<typeof intents.sponsorshipProposalRejectSchema>;\n\nexport type CreateCounterOfferIntentParams = z.input<typeof intents.counterOfferSchema>;\n\nexport interface ApiCounterOffersQuery {\n\n originalOrderHash?: string;\n\n sellerAddress?: string;\n page?: number;\n limit?: number;\n}\n\nexport const OPEN_LICENSES = [\"CC0\", \"CC BY\", \"CC BY-SA\", \"CC BY-NC\"] as const;\nexport type OpenLicense = (typeof OPEN_LICENSES)[number];\n\nexport type RemixOfferStatus =\n | \"PENDING\"\n | \"AUTO_PENDING\"\n | \"APPROVED\"\n | \"COMPLETED\"\n | \"REJECTED\"\n | \"EXPIRED\"\n | \"SELF_MINTED\";\n\nexport interface ApiRemixOfferPrice {\n raw: string;\n formatted: string;\n currency: string;\n decimals: number;\n}\n\nexport interface ApiRemixOffer {\n id: string;\n status: RemixOfferStatus;\n originalContract: string;\n originalTokenId: string;\n creatorAddress: string;\n requesterAddress: string | null;\n message?: string | null;\n\n price?: ApiRemixOfferPrice;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n royaltyPct: number | null;\n approvedCollection: string | null;\n remixContract: string | null;\n remixTokenId: string | null;\n orderHash: string | null;\n createdAt: string;\n expiresAt: string;\n updatedAt: string;\n}\n\nexport interface ApiPublicRemix {\n id: string;\n remixContract: string | null;\n remixTokenId: string | null;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n createdAt: string;\n}\n\nexport interface CreateRemixOfferParams {\n originalContract: string;\n originalTokenId: string;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n royaltyPct?: number;\n proposedPrice?: string;\n proposedCurrency?: string;\n message?: string;\n\n expiresInDays?: number;\n}\n\nexport interface AutoRemixOfferParams {\n originalContract: string;\n originalTokenId: string;\n licenseType: string;\n}\n\nexport interface ConfirmSelfRemixParams {\n originalContract: string;\n originalTokenId: string;\n remixContract: string;\n remixTokenId: string;\n\n txHash?: string;\n licenseType: string;\n commercial: boolean;\n derivatives: boolean;\n royaltyPct?: number;\n}\n\nexport interface ConfirmRemixOfferParams {\n approvedCollection: string;\n remixContract: string;\n remixTokenId: string;\n orderHash?: string;\n}\n\nexport interface ApiRemixOffersQuery {\n\n role: \"creator\" | \"requester\";\n status?: string;\n page?: number;\n limit?: number;\n}\n\nexport interface ApiMetadataSignedUrl {\n url: string;\n}\n\nexport interface ApiMetadataUpload {\n cid: string;\n url: string;\n}\n\nexport interface ApiPortalMe {\n id: string;\n accountId: string;\n status: string;\n creditBalance: number;\n}\n\nexport interface ApiPortalKey {\n id: string;\n prefix: string;\n label: string | null;\n lastUsedAt: string | null;\n createdAt: string;\n}\n\nexport interface ApiPortalKeyCreated {\n id: string;\n prefix: string;\n label: string | null;\n\n plaintext: string;\n}\n\nexport interface ApiCreditPayment {\n id: string;\n asset: string;\n amountAtomic: string;\n creditedAmount: number;\n mdlnMultiplier: number;\n txHash: string;\n status: string;\n createdAt: string;\n}\n\nexport interface ApiFundingMethod {\n id: string;\n [detail: string]: unknown;\n}\n\nexport type ApiFundingStatus = \"PENDING\" | \"SETTLED\" | \"FAILED\" | \"EXPIRED\";\n\nexport interface ApiFundingIntent {\n id: string;\n method: string;\n status: ApiFundingStatus;\n expiresAt: string;\n payer?: string | null;\n}\n\nexport interface ApiFundingInstructions {\n chain: string;\n payTo: string;\n asset: string;\n amountAtomic: string;\n}\n\nexport type ApiFundingSubmit =\n | { status: \"SETTLED\"; credited?: number }\n | { status: \"PENDING\"; reason: string };\n\nexport interface ApiSpendByAction {\n actionKey: string;\n credits: number;\n units: number;\n}\n\nexport interface ApiPortalSpend {\n recent: Array<{ actionKey: string; credits: number; createdAt: string }>;\n byAction: ApiSpendByAction[];\n spent: number;\n credited: number;\n drift: number;\n}\n\nexport interface ApiCollectionProfile {\n contractAddress: string;\n chain: string;\n displayName: string | null;\n description: string | null;\n image: string | null;\n bannerImage: string | null;\n websiteUrl: string | null;\n twitterUrl: string | null;\n discordUrl: string | null;\n telegramUrl: string | null;\n hasGatedContent: boolean;\n gatedContentTitle: string | null;\n slug: string | null;\n updatedBy: string | null;\n updatedAt: string;\n}\n\nexport type UpdateCollectionProfileInput = z.output<typeof profiles.collectionProfileSchema>;\n\nexport interface ApiCollectionSlugClaim {\n id: string;\n slug: string;\n contractAddress: string;\n chain: string;\n walletAddress: string;\n status: \"PENDING\" | \"APPROVED\" | \"REJECTED\";\n adminNotes: string | null;\n notifyEmail: string | null;\n reviewedAt: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface ApiCreatorProfile {\n walletAddress: string;\n chain: string;\n username: string | null;\n name: string | null;\n bio: string | null;\n avatarImage: string | null;\n\n collectionImage?: string | null;\n websiteUrl: string | null;\n twitterUrl: string | null;\n discordUrl: string | null;\n telegramUrl: string | null;\n updatedAt: string;\n}\n\nexport interface ApiCreatorListResult {\n creators: ApiCreatorProfile[];\n total: number;\n page: number;\n limit: number;\n}\n\nexport type ApiChain = \"STARKNET\" | \"ETHEREUM\" | \"SOLANA\" | \"BASE\" | \"BITCOIN\";\n\nexport interface ApiSession {\n accountId: string;\n publicId: string;\n walletAddress: string | null;\n email: string | null;\n emailDeadline: string | null;\n}\n\nexport interface ApiUserWallet {\n walletAddress: string;\n email?: string | null;\n emailDeadline?: string | null;\n}\n\nexport interface ApiCollectionClaim {\n id: string;\n contractAddress: string;\n chain: string;\n claimantAddress: string | null;\n status: \"PENDING\" | \"AUTO_APPROVED\" | \"APPROVED\" | \"REJECTED\";\n verificationMethod: \"ONCHAIN\" | \"SIGNATURE\" | \"MANUAL\";\n createdAt: string;\n}\n\nexport interface ApiAdminCollectionClaim extends ApiCollectionClaim {\n claimantEmail: string | null;\n notes: string | null;\n adminNotes: string | null;\n reviewedBy: string | null;\n reviewedAt: string | null;\n updatedAt: string;\n}\n\nexport interface ApiBusinessProvisioning {\n chain: string;\n walletAddress: string;\n}\n\nexport interface ApiWalletActivity {\n id: string;\n chain: string;\n accountAddress: string;\n type: \"SEND\" | \"RECEIVE\" | \"SWAP\" | \"DEPLOY\" | \"GUARDIAN_SET\" | \"GUARDIAN_TRIGGER_ESCAPE\" | \"GUARDIAN_COMPLETE_ESCAPE\" | \"GUARDIAN_CANCEL_ESCAPE\";\n txHash: string;\n blockNumber: string;\n timestamp: string;\n tokenAddress: string | null;\n amount: string | null;\n counterparty: string | null;\n tokenInAddress: string | null;\n amountIn: string | null;\n tokenOutAddress: string | null;\n amountOut: string | null;\n}\n\nexport interface ApiRewardsBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface ApiRewardsLevel {\n level: number;\n name: string;\n xpRequired: number;\n badgeColor: string;\n description: string | null;\n}\n\nexport interface ApiUserRewards {\n address: string;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n nextLevel: { level: number; name: string; xpRequired: number } | null;\n progressPct: number;\n breakdown: Record<string, number>;\n badges: ApiRewardsBadge[];\n computedAt: string | null;\n}\n\nexport interface ApiRewardsLeaderboardEntry {\n rank: number;\n address: string;\n accountId: string | null;\n publicId: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface ApiRewardsConfig {\n levels: ApiRewardsLevel[];\n actions: { type: string; label: string; xp: number; dailyCap: number | null }[];\n badges: ApiRewardsBadge[];\n}\n\nexport interface ApiRewardsBatchEntry {\n address: string;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface ApiPointEvent {\n id: string;\n actionType: string;\n xp: number;\n multiplier: number;\n finalXp: number;\n txHash: string | null;\n createdAt: string;\n}\n\nexport interface ApiPlatformStats {\n collections: number;\n tokens: number;\n sales: number;\n}\n\nexport interface ApiTierOnchain {\n maxSupply: string;\n minted: string;\n startTime: number | null;\n endTime: number | null;\n royaltyBps: number;\n}\n\nexport interface ApiSwapQuoteRequest {\n sellSymbol?: string;\n buySymbol?: string;\n sellTokenAddress?: string;\n buyTokenAddress?: string;\n sellAmountRaw?: string;\n buyAmountRaw?: string;\n takerAddress?: string;\n}\n\nexport interface ApiSwapQuote {\n quoteId: string;\n sellTokenAddress: string;\n sellAmount: string;\n buyTokenAddress: string;\n buyAmount: string;\n}\n\nexport interface ApiIpNftTokenData {\n owner: string;\n metadataUri: string;\n originalCreator: string;\n registeredAt: number;\n}\n\nexport interface ApiTokensQuery {\n page?: number;\n limit?: number;\n sort?: string;\n ipType?: string;\n derivatives?: \"allowed\";\n}\n\nexport interface ApiUsernameClaim {\n id: string;\n username: string;\n walletAddress: string;\n status: \"PENDING\" | \"APPROVED\" | \"REJECTED\";\n adminNotes: string | null;\n reviewedAt: string | null;\n createdAt: string;\n}\n\nexport type ApiReportTargetType = \"COLLECTION\" | \"TOKEN\" | \"CREATOR\" | \"COMMENT\";\n\nexport interface ApiSubmitReport {\n targetType: ApiReportTargetType;\n targetContract?: string;\n targetTokenId?: string;\n targetAddress?: string;\n targetId?: string;\n categories: string[];\n description?: string;\n}\n\nexport interface ApiSponsorshipOffer {\n id: string;\n chain: string;\n contractAddress: string;\n offerId: string;\n author: string;\n nftContract: string;\n tokenId: string;\n minAmount: string;\n duration: number;\n paymentToken: string;\n licenseTermsUri: string;\n transferable: boolean;\n royaltyBps: number;\n specificSponsor: string | null;\n open: boolean;\n createdAtChain: string;\n updatedAt: string;\n}\n\nexport interface ApiSponsorshipBid {\n id: string;\n chain: string;\n contractAddress: string;\n offerId: string;\n sponsor: string;\n amount: string;\n placedAtChain: string;\n updatedAt: string;\n}\n\nexport interface ApiSponsorshipProposal {\n id: string;\n chain: string;\n contractAddress: string;\n proposalId: string;\n proposer: string;\n nftContract: string;\n tokenId: string;\n amount: string;\n duration: number;\n validUntil: string | null;\n paymentToken: string;\n licenseTermsUri: string;\n transferable: boolean;\n royaltyBps: number;\n open: boolean;\n accepted: boolean | null;\n createdAtChain: string;\n closedAtChain: string | null;\n updatedAt: string;\n}\n\nexport interface ApiSponsorshipLicense {\n id: string;\n chain: string;\n contractAddress: string;\n tokenId: string;\n author: string;\n recipient: string;\n assetContract: string;\n assetTokenId: string;\n expiresAt: string;\n transferable: boolean;\n royaltyBps: number;\n licenseTermsUri: string;\n offerId: string | null;\n proposalId: string | null;\n mintedAtChain: string;\n currentHolder?: string | null;\n}\n\nexport interface ApiSponsorshipOffersQuery {\n limit?: number;\n nftContract?: string;\n author?: string;\n owner?: string;\n open?: boolean;\n}\n\nexport interface ApiSponsorshipProposalsQuery {\n limit?: number;\n nftContract?: string;\n proposer?: string;\n owner?: string;\n open?: boolean;\n}\n\nexport interface ApiSponsorshipLicensesQuery {\n limit?: number;\n holder?: string;\n author?: string;\n}\n\nexport interface ApiCollectionsListQuery {\n page?: number;\n limit?: number;\n owner?: string;\n service?: string;\n sort?: CollectionSort;\n isFeatured?: boolean;\n hideEmpty?: boolean;\n standard?: string;\n chain?: ChainFilter;\n}\n\nexport interface ApiPricingRule {\n actionKey: string;\n chain: string;\n service: string;\n credits: number;\n}\n\nexport interface ApiPricing {\n creditsPerUsdc: number;\n mdln?: { contract: string | null; tiers: { minWholeTokens: number; multiplier: number }[] };\n pricing: { default: number; rules: ApiPricingRule[] };\n}\n\nexport type CreateTransferTokenIntentParams = z.input<typeof intents.transferTokenSchema>;\n\nexport type CreateTransferNftIntentParams = z.input<typeof intents.transferNftSchema>;\n\nexport type CreateTransferCollectionOwnershipIntentParams = z.input<typeof intents.transferCollectionOwnershipSchema>;\n\nexport type CreateCommentIntentParams = z.input<typeof intents.commentSchema>;\n\nexport type CreateGenesisMintIntentParams = z.input<typeof intents.genesisMintSchema>;\n\nexport type CreatePopClaimIntentParams = z.input<typeof intents.popClaimSchema>;\n\nexport type CreatePopBurnIntentParams = z.input<typeof intents.popBurnSchema>;\n\nexport type CreateDropClaimIntentParams = z.input<typeof intents.dropClaimSchema>;\n\nexport type WalletManageAction = \"add_owner\" | \"remove_owner\" | \"cancel_escape\" | \"set_first_guardian\" | \"trigger_escape\" | \"complete_escape\";\n\nexport type CreateWalletManageIntentParams = z.input<typeof intents.walletManageSchema>;\n\nexport type CreateSwapIntentParams = z.input<typeof intents.swapIntentSchema>;\n\nexport type CreateFundingTransferIntentParams = z.input<typeof intents.fundingTransferSchema>;\n\nexport type DropManageAction = \"issue\" | \"set_allowlist_root\";\n\nexport type CreateDropManageIntentParams = z.input<typeof intents.dropManageSchema>;\n\nexport type PopManageAction = \"issue\" | \"set_allowlist_root\";\n\nexport type CreatePopManageIntentParams = z.input<typeof intents.popManageSchema>;\n\nexport interface IntentParamsByKind {\n listing: CreateListingIntentParams;\n offer: MakeOfferIntentParams;\n fulfill: FulfillOrderIntentParams;\n cancel: CancelOrderIntentParams;\n mint: CreateMintIntentParams;\n \"transfer-token\": CreateTransferTokenIntentParams;\n \"transfer-nft\": CreateTransferNftIntentParams;\n \"transfer-collection-ownership\": CreateTransferCollectionOwnershipIntentParams;\n comment: CreateCommentIntentParams;\n \"genesis-mint\": CreateGenesisMintIntentParams;\n \"pop-claim\": CreatePopClaimIntentParams;\n \"pop-burn\": CreatePopBurnIntentParams;\n \"drop-claim\": CreateDropClaimIntentParams;\n \"wallet-manage\": CreateWalletManageIntentParams;\n swap: CreateSwapIntentParams;\n \"funding-transfer\": CreateFundingTransferIntentParams;\n \"drop-manage\": CreateDropManageIntentParams;\n \"pop-manage\": CreatePopManageIntentParams;\n \"create-collection\": CreateCollectionIntentParams;\n \"create-tier\": CreateTierIntentParams;\n \"create-coin\": CreateCoinIntentParams;\n \"launch-coin\": LaunchCoinIntentParams;\n \"sponsorship-offer\": CreateSponsorshipOfferIntentParams;\n \"sponsorship-offer-open\": SetSponsorshipOfferOpenIntentParams;\n \"sponsorship-bid\": PlaceSponsorshipBidIntentParams;\n \"sponsorship-bid-retract\": RetractSponsorshipBidIntentParams;\n \"sponsorship-bid-accept\": AcceptSponsorshipBidIntentParams;\n \"sponsorship-proposal\": CreateSponsorshipProposalIntentParams;\n \"sponsorship-proposal-withdraw\": WithdrawSponsorshipProposalIntentParams;\n \"sponsorship-proposal-accept\": AcceptSponsorshipProposalIntentParams;\n \"sponsorship-proposal-reject\": RejectSponsorshipProposalIntentParams;\n \"counter-offer\": CreateCounterOfferIntentParams;\n}\n","\n\nexport type AssetAttribute = { trait_type: string; value: string };\n\nexport interface AssetMetadata {\n name: string;\n description: string;\n image: string | null;\n external_url: string;\n attributes: AssetAttribute[];\n}\n\nexport interface BuildAssetMetadataInput {\n name: string;\n description?: string | null;\n externalUrl?: string | null;\n imageUri?: string | null;\n creator?: string | null;\n ipType?: string | null;\n licenseType?: string | null;\n commercialUse?: string | null;\n derivatives?: string | null;\n attribution?: string | null;\n geographicScope?: string | null;\n aiPolicy?: string | null;\n royalty?: string | null;\n edition?: string | null;\n\n templateTraits?: { traitType: string; value: string }[];\n}\n\nexport const RESERVED_TRAITS = new Set([\n \"Creator\", \"IP Type\", \"License\", \"Commercial Use\", \"Derivatives\",\n \"Attribution\", \"Territory\", \"AI Policy\", \"Royalty\", \"Edition\",\n \"Standard\",\n]);\nconst RESERVED_TRAITS_NORMALIZED = new Set([...RESERVED_TRAITS].map((t) => t.toLowerCase()));\n\nexport function buildAssetMetadata(input: BuildAssetMetadataInput): AssetMetadata {\n const attributes: AssetAttribute[] = [];\n\n if (input.creator) attributes.push({ trait_type: \"Creator\", value: input.creator });\n if (input.ipType) attributes.push({ trait_type: \"IP Type\", value: input.ipType });\n if (input.licenseType) attributes.push({ trait_type: \"License\", value: input.licenseType });\n if (input.commercialUse) attributes.push({ trait_type: \"Commercial Use\", value: input.commercialUse });\n if (input.derivatives) attributes.push({ trait_type: \"Derivatives\", value: input.derivatives });\n if (input.attribution) attributes.push({ trait_type: \"Attribution\", value: input.attribution });\n if (input.geographicScope) attributes.push({ trait_type: \"Territory\", value: input.geographicScope });\n if (input.aiPolicy) attributes.push({ trait_type: \"AI Policy\", value: input.aiPolicy });\n\n if (input.royalty) {\n const num = parseFloat(String(input.royalty).replace(\"%\", \"\"));\n if (!isNaN(num) && num > 0) attributes.push({ trait_type: \"Royalty\", value: `${num}%` });\n }\n\n if (input.edition) attributes.push({ trait_type: \"Edition\", value: input.edition });\n\n for (const t of input.templateTraits ?? []) {\n const traitType = t.traitType?.trim() ?? \"\";\n const traitValue = String(t.value ?? \"\").trim();\n if (!traitType || !traitValue || RESERVED_TRAITS_NORMALIZED.has(traitType.toLowerCase())) continue;\n attributes.push({ trait_type: traitType, value: traitValue });\n }\n\n if (input.licenseType) attributes.push({ trait_type: \"Standard\", value: \"Berne Convention\" });\n\n return {\n name: input.name,\n description: input.description ?? \"\",\n image: input.imageUri ?? null,\n external_url: input.externalUrl || \"https://medialane.io\",\n attributes,\n };\n}\n\nexport interface CollectionMetadata {\n name: string;\n description?: string;\n image?: string;\n external_link: string;\n}\n\nexport interface BuildCollectionMetadataInput {\n name: string;\n owner: string;\n description?: string | null;\n image?: string | null;\n externalLink?: string | null;\n}\n\nexport const accountPageUrl = (address: string): string => `https://www.medialane.io/account/${address}`;\n\nexport function buildCollectionMetadata(input: BuildCollectionMetadataInput): CollectionMetadata {\n const description = input.description?.trim();\n const image = input.image?.trim();\n return {\n name: input.name,\n ...(description ? { description } : {}),\n ...(image ? { image } : {}),\n external_link: input.externalLink?.trim() || accountPageUrl(input.owner),\n };\n}\n","\n\ntype Attribute = { trait_type?: string; value?: string | number | boolean };\n\nexport function getDerivativesTerm(\n attributes: Attribute[] | null | undefined,\n): \"Allowed\" | \"Not Allowed\" | null {\n const v = (Array.isArray(attributes) ? attributes : []).find(\n (a) => a.trait_type === \"Derivatives\",\n )?.value;\n return v === \"Allowed\" || v === \"Not Allowed\" ? v : null;\n}\n\nexport interface RemixPolicyInput {\n\n parentNoDerivatives: boolean;\n\n viewerIsParentOwner: boolean;\n\n dealAvailable: boolean;\n}\n\nexport interface RemixPolicy extends RemixPolicyInput {\n\n canRemixDirect: boolean;\n\n showDealOption: boolean;\n}\n\nexport function resolveRemixPolicy(input: RemixPolicyInput): RemixPolicy {\n const canRemixDirect = input.viewerIsParentOwner || !input.parentNoDerivatives;\n const showDealOption = input.dealAvailable && !input.viewerIsParentOwner;\n return { ...input, canRemixDirect, showDealOption };\n}\n","export type UploadKind = \"image\" | \"document\" | \"media\";\n\nconst MB = 1024 * 1024;\n\nexport const MAX_UPLOAD_BYTES = 90 * MB;\n\nexport function formatFileSize(bytes: number): string {\n const mb = bytes / MB;\n return `${Number.isInteger(mb) ? mb : mb.toFixed(1)} MB`;\n}\n\nexport function uploadSizeError(file: { size: number }, kind: UploadKind = \"image\"): string | null {\n if (file.size <= MAX_UPLOAD_BYTES) return null;\n const noun = kind === \"image\" ? \"image\" : \"file\";\n return `That ${noun} is ${formatFileSize(file.size)}. Please choose one under ${formatFileSize(MAX_UPLOAD_BYTES)}.`;\n}\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { A as ActivityApi, a as AddSupplyParams, b as ApiClient, c as ApiClientOptions, B as BatchMintEditionParams, d as BearerSource, e as BusinessApi, C as ChainReadsApi, f as CoinsApi, g as CollectionsApi, h as CreateDropParams, i as CreateMembershipParams, j as CreatePopCollectionParams, k as CreateSponsorshipOfferParams, l as CreateTicketParams, m as CreatorsApi, D as DeployCollectionParams, n as DropTerms, o as DropsApi, F as FeeConfig, p as FundingApi, G as GatedContent, I as IntentsApi, M as MedialaneApiError, q as MedialaneConfig, r as MedialaneError, s as MedialaneErrorCode, t as MetadataApi, u as MintEditionParams, v as MintMembershipsParams, w as MintTicketsParams, O as OrdersApi, P as PlatformApi, x as PortalApi, y as ProposeSponsorshipParams, z as ProvisioningResult, R as RemixApi, E as ResolvedConfig, H as ResolvedFeeConfig, J as RetryOptions, K as RewardsApi, S as SearchApi, L as SponsorshipApi, T as TokensApi, U as UserFacingError, N as resolveConfig, Q as resolveFeeConfig } from './services-
|
|
1
|
+
export { A as ActivityApi, a as AddSupplyParams, b as ApiClient, c as ApiClientOptions, B as BatchMintEditionParams, d as BearerSource, e as BusinessApi, C as ChainReadsApi, f as CoinsApi, g as CollectionsApi, h as CreateDropParams, i as CreateMembershipParams, j as CreatePopCollectionParams, k as CreateSponsorshipOfferParams, l as CreateTicketParams, m as CreatorsApi, D as DeployCollectionParams, n as DropTerms, o as DropsApi, F as FeeConfig, p as FundingApi, G as GatedContent, I as IntentsApi, M as MedialaneApiError, q as MedialaneConfig, r as MedialaneError, s as MedialaneErrorCode, t as MetadataApi, u as MintEditionParams, v as MintMembershipsParams, w as MintTicketsParams, O as OrdersApi, P as PlatformApi, x as PortalApi, y as ProposeSponsorshipParams, z as ProvisioningResult, R as RemixApi, E as ResolvedConfig, H as ResolvedFeeConfig, J as RetryOptions, K as RewardsApi, S as SearchApi, L as SponsorshipApi, T as TokensApi, U as UserFacingError, N as resolveConfig, Q as resolveFeeConfig } from './services-Cy5FH8sP.cjs';
|
|
2
2
|
import { F as FetchLike } from './fetch-Cx9Pr7-B.cjs';
|
|
3
|
-
import { S as ServiceDefinition, a as ServiceCapability } from './passkey-errors-
|
|
4
|
-
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as AccountApi, d as ActivityType, e as ApiActivitiesQuery, f as ApiActivity, g as ApiActivityPrice, h as ApiAdminCollectionClaim, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiCoin, m as ApiCoinClaimResult, n as ApiCoinPrice, o as ApiCoinPrices, p as ApiCoinsQuery, q as ApiCollection, r as ApiCollectionClaim, s as ApiCollectionProfile, t as ApiCollectionSlugClaim, u as ApiCollectionsListQuery, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiDrop, D as ApiDropFee, E as ApiDropListStatus, F as ApiDropMint, G as ApiEmissionCall, H as ApiEmissionResult, I as ApiFundingInstructions, J as ApiFundingIntent, K as ApiFundingMethod, L as ApiFundingStatus, M as ApiFundingSubmit, N as ApiIntent, O as ApiIntentCreated, P as ApiIpNftTokenData, Q as ApiMeta, R as ApiMetadataSignedUrl, T as ApiMetadataUpload, U as ApiOrder, V as ApiOrderConsideration, W as ApiOrderOffer, X as ApiOrderPrice, Y as ApiOrderTokenMeta, Z as ApiOrderTxHash, _ as ApiOrdersQuery, $ as ApiPlatformStats, a0 as ApiPointEvent, a1 as ApiPortalKey, a2 as ApiPortalKeyCreated, a3 as ApiPortalMe, a4 as ApiPortalSpend, a5 as ApiPricing, a6 as ApiPricingRule, a7 as ApiPublicRemix, a8 as ApiRemixOffer, a9 as ApiRemixOfferPrice, aa as ApiRemixOffersQuery, ab as ApiReportTargetType, ac as ApiResponse, ad as ApiRewardsBadge, ae as ApiRewardsBatchEntry, af as ApiRewardsConfig, ag as ApiRewardsLeaderboardEntry, ah as ApiRewardsLevel, ai as ApiSearchCollectionResult, aj as ApiSearchCreatorResult, ak as ApiSearchResult, al as ApiSearchTokenResult, am as ApiSession, an as ApiSpendByAction, ao as ApiSponsorshipBid, ap as ApiSponsorshipLicense, aq as ApiSponsorshipLicensesQuery, ar as ApiSponsorshipOffer, as as ApiSponsorshipOffersQuery, at as ApiSponsorshipProposal, au as ApiSponsorshipProposalsQuery, av as ApiSubmitReport, aw as ApiSwapQuote, ax as ApiSwapQuoteRequest, ay as ApiTierOnchain, az as ApiToken, aA as ApiTokenBalance, aB as ApiTokenMetadata, aC as ApiTokensQuery, aD as ApiTxSyncResult, aE as ApiUserRewards, aF as ApiUserWallet, aG as ApiUsernameClaim, aH as ApiWalletActivity, aI as AutoRemixOfferParams, aJ as CancelOrderIntentParams, aK as ChainFilter, aL as CheckoutIntentItem, aM as CollectionServiceId, aN as CollectionSort, aO as CollectionTokensSort, aP as ConfirmRemixOfferParams, aQ as ConfirmSelfRemixParams, aR as CreateCheckoutIntentParams, aS as CreateCoinIntentParams, aT as CreateCollectionIntentParams, aU as CreateCommentIntentParams, aV as CreateCounterOfferIntentParams, aW as CreateDropClaimIntentParams, aX as CreateDropManageIntentParams, aY as CreateFundingTransferIntentParams, aZ as CreateGenesisMintIntentParams, a_ as CreateListingIntentParams, a$ as CreateMintIntentParams, b0 as CreatePopBurnIntentParams, b1 as CreatePopClaimIntentParams, b2 as CreatePopManageIntentParams, b3 as CreateRemixOfferParams, b4 as CreateSponsorshipOfferIntentParams, b5 as CreateSponsorshipProposalIntentParams, b6 as CreateSwapIntentParams, b7 as CreateTierIntentParams, b8 as CreateTransferCollectionOwnershipIntentParams, b9 as CreateTransferNftIntentParams, ba as CreateTransferTokenIntentParams, bb as CreateWalletManageIntentParams, bc as DeviceKeyMissingError, bd as DropManageAction, be as DropTermsBody, bf as EmissionParams, bg as EnforcementDeclaration, bh as FactoryFamilyServiceId, bi as FulfillOrderIntentParams, bj as IPType, bk as IntentCall, bl as IntentParamsByKind, bm as IntentStatus, bn as IntentType, bo as IpAttribute, bp as IpNftMetadata, bq as LaunchCoinIntentParams, br as MakeOfferIntentParams, bs as OPEN_LICENSES, bt as OpenLicense, bu as OrderStatus, bv as PasskeyCancelledError, bw as PasskeyUnsupportedError, bx as PasskeyUnsupportedReason, by as PlaceSponsorshipBidIntentParams, bz as PopManageAction, bA as RegisteredUser, bB as RejectSponsorshipProposalIntentParams, bC as RemixOfferStatus, bD as RetractSponsorshipBidIntentParams, bE as ServiceEventDeclaration, bF as SetSponsorshipOfferOpenIntentParams, bG as SortOrder, bH as TierServiceId, bI as UpdateCollectionProfileInput, bJ as WalletManageAction, bK as WithdrawSponsorshipProposalIntentParams } from './passkey-errors-
|
|
3
|
+
import { S as ServiceDefinition, a as ServiceCapability } from './passkey-errors-BjqEFmu_.cjs';
|
|
4
|
+
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as AccountApi, d as ActivityType, e as ApiActivitiesQuery, f as ApiActivity, g as ApiActivityPrice, h as ApiAdminCollectionClaim, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiCoin, m as ApiCoinClaimResult, n as ApiCoinPrice, o as ApiCoinPrices, p as ApiCoinsQuery, q as ApiCollection, r as ApiCollectionClaim, s as ApiCollectionProfile, t as ApiCollectionSlugClaim, u as ApiCollectionsListQuery, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiDrop, D as ApiDropFee, E as ApiDropListStatus, F as ApiDropMint, G as ApiEmissionCall, H as ApiEmissionResult, I as ApiFundingInstructions, J as ApiFundingIntent, K as ApiFundingMethod, L as ApiFundingStatus, M as ApiFundingSubmit, N as ApiIntent, O as ApiIntentCreated, P as ApiIpNftTokenData, Q as ApiMeta, R as ApiMetadataSignedUrl, T as ApiMetadataUpload, U as ApiOrder, V as ApiOrderConsideration, W as ApiOrderOffer, X as ApiOrderPrice, Y as ApiOrderTokenMeta, Z as ApiOrderTxHash, _ as ApiOrdersQuery, $ as ApiPlatformStats, a0 as ApiPointEvent, a1 as ApiPortalKey, a2 as ApiPortalKeyCreated, a3 as ApiPortalMe, a4 as ApiPortalSpend, a5 as ApiPricing, a6 as ApiPricingRule, a7 as ApiPublicRemix, a8 as ApiRemixOffer, a9 as ApiRemixOfferPrice, aa as ApiRemixOffersQuery, ab as ApiReportTargetType, ac as ApiResponse, ad as ApiRewardsBadge, ae as ApiRewardsBatchEntry, af as ApiRewardsConfig, ag as ApiRewardsLeaderboardEntry, ah as ApiRewardsLevel, ai as ApiSearchCollectionResult, aj as ApiSearchCreatorResult, ak as ApiSearchResult, al as ApiSearchTokenResult, am as ApiSession, an as ApiSpendByAction, ao as ApiSponsorshipBid, ap as ApiSponsorshipLicense, aq as ApiSponsorshipLicensesQuery, ar as ApiSponsorshipOffer, as as ApiSponsorshipOffersQuery, at as ApiSponsorshipProposal, au as ApiSponsorshipProposalsQuery, av as ApiSubmitReport, aw as ApiSwapQuote, ax as ApiSwapQuoteRequest, ay as ApiTierOnchain, az as ApiToken, aA as ApiTokenBalance, aB as ApiTokenMetadata, aC as ApiTokensQuery, aD as ApiTxSyncResult, aE as ApiUserRewards, aF as ApiUserWallet, aG as ApiUsernameClaim, aH as ApiWalletActivity, aI as AutoRemixOfferParams, aJ as CancelOrderIntentParams, aK as ChainFilter, aL as CheckoutIntentItem, aM as CollectionServiceId, aN as CollectionSort, aO as CollectionTokensSort, aP as ConfirmRemixOfferParams, aQ as ConfirmSelfRemixParams, aR as CreateCheckoutIntentParams, aS as CreateCoinIntentParams, aT as CreateCollectionIntentParams, aU as CreateCommentIntentParams, aV as CreateCounterOfferIntentParams, aW as CreateDropClaimIntentParams, aX as CreateDropManageIntentParams, aY as CreateFundingTransferIntentParams, aZ as CreateGenesisMintIntentParams, a_ as CreateListingIntentParams, a$ as CreateMintIntentParams, b0 as CreatePopBurnIntentParams, b1 as CreatePopClaimIntentParams, b2 as CreatePopManageIntentParams, b3 as CreateRemixOfferParams, b4 as CreateSponsorshipOfferIntentParams, b5 as CreateSponsorshipProposalIntentParams, b6 as CreateSwapIntentParams, b7 as CreateTierIntentParams, b8 as CreateTransferCollectionOwnershipIntentParams, b9 as CreateTransferNftIntentParams, ba as CreateTransferTokenIntentParams, bb as CreateWalletManageIntentParams, bc as DeviceKeyMissingError, bd as DropManageAction, be as DropTermsBody, bf as EmissionParams, bg as EnforcementDeclaration, bh as FactoryFamilyServiceId, bi as FulfillOrderIntentParams, bj as IPType, bk as IntentCall, bl as IntentParamsByKind, bm as IntentStatus, bn as IntentType, bo as IpAttribute, bp as IpNftMetadata, bq as LaunchCoinIntentParams, br as MakeOfferIntentParams, bs as OPEN_LICENSES, bt as OpenLicense, bu as OrderStatus, bv as PasskeyCancelledError, bw as PasskeyUnsupportedError, bx as PasskeyUnsupportedReason, by as PlaceSponsorshipBidIntentParams, bz as PopManageAction, bA as RegisteredUser, bB as RejectSponsorshipProposalIntentParams, bC as RemixOfferStatus, bD as RetractSponsorshipBidIntentParams, bE as ServiceEventDeclaration, bF as SetSponsorshipOfferOpenIntentParams, bG as SortOrder, bH as TierServiceId, bI as UpdateCollectionProfileInput, bJ as WalletManageAction, bK as WithdrawSponsorshipProposalIntentParams } from './passkey-errors-BjqEFmu_.cjs';
|
|
5
5
|
import { C as Chain } from './chains-CmwjZVU7.cjs';
|
|
6
6
|
export { a as CHAINS, b as ChainCoordinates, c as CoordinatesByChain, D as DEFAULT_CHAIN, E as EvmCoordinates, S as SolanaCoordinates, d as StarknetCoordinates, e as StellarCoordinates, g as getCoordinates, f as getStarknetCoordinates } from './chains-CmwjZVU7.cjs';
|
|
7
7
|
export { ACCOUNT_SESSION_COOKIE, ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, AppGatewayConfig, AppSessionConfig, BackendMetadataConfig, BackendUploadResult, CappedBody, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, ImageProxyConfig, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, SiwsIdentity, createAppGateway, createAppSessionHandler, createImageProxyHandler, getBackendSignedUrl, isPrivateHost, isPrivateOrInsecureUrl, isPublicAppRoute, isSameOrigin, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, readBodyWithCap, resolveSafeImageContentType, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken } from './server/index.cjs';
|
|
8
8
|
export { A as AdapterTxResult, a as AssetRef, C as CreateCollectionInput, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, V as VenueAdapter } from './types-BftPOVEJ.cjs';
|
|
9
9
|
import 'zod';
|
|
10
|
-
import './responses-
|
|
10
|
+
import './responses-BpnS-Io9.cjs';
|
|
11
11
|
import 'starknet';
|
|
12
12
|
import './provisioning-CwRkCN8D.cjs';
|
|
13
13
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { A as ActivityApi, a as AddSupplyParams, b as ApiClient, c as ApiClientOptions, B as BatchMintEditionParams, d as BearerSource, e as BusinessApi, C as ChainReadsApi, f as CoinsApi, g as CollectionsApi, h as CreateDropParams, i as CreateMembershipParams, j as CreatePopCollectionParams, k as CreateSponsorshipOfferParams, l as CreateTicketParams, m as CreatorsApi, D as DeployCollectionParams, n as DropTerms, o as DropsApi, F as FeeConfig, p as FundingApi, G as GatedContent, I as IntentsApi, M as MedialaneApiError, q as MedialaneConfig, r as MedialaneError, s as MedialaneErrorCode, t as MetadataApi, u as MintEditionParams, v as MintMembershipsParams, w as MintTicketsParams, O as OrdersApi, P as PlatformApi, x as PortalApi, y as ProposeSponsorshipParams, z as ProvisioningResult, R as RemixApi, E as ResolvedConfig, H as ResolvedFeeConfig, J as RetryOptions, K as RewardsApi, S as SearchApi, L as SponsorshipApi, T as TokensApi, U as UserFacingError, N as resolveConfig, Q as resolveFeeConfig } from './services-
|
|
1
|
+
export { A as ActivityApi, a as AddSupplyParams, b as ApiClient, c as ApiClientOptions, B as BatchMintEditionParams, d as BearerSource, e as BusinessApi, C as ChainReadsApi, f as CoinsApi, g as CollectionsApi, h as CreateDropParams, i as CreateMembershipParams, j as CreatePopCollectionParams, k as CreateSponsorshipOfferParams, l as CreateTicketParams, m as CreatorsApi, D as DeployCollectionParams, n as DropTerms, o as DropsApi, F as FeeConfig, p as FundingApi, G as GatedContent, I as IntentsApi, M as MedialaneApiError, q as MedialaneConfig, r as MedialaneError, s as MedialaneErrorCode, t as MetadataApi, u as MintEditionParams, v as MintMembershipsParams, w as MintTicketsParams, O as OrdersApi, P as PlatformApi, x as PortalApi, y as ProposeSponsorshipParams, z as ProvisioningResult, R as RemixApi, E as ResolvedConfig, H as ResolvedFeeConfig, J as RetryOptions, K as RewardsApi, S as SearchApi, L as SponsorshipApi, T as TokensApi, U as UserFacingError, N as resolveConfig, Q as resolveFeeConfig } from './services-DWmXVwTV.js';
|
|
2
2
|
import { F as FetchLike } from './fetch-Cx9Pr7-B.js';
|
|
3
|
-
import { S as ServiceDefinition, a as ServiceCapability } from './passkey-errors-
|
|
4
|
-
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as AccountApi, d as ActivityType, e as ApiActivitiesQuery, f as ApiActivity, g as ApiActivityPrice, h as ApiAdminCollectionClaim, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiCoin, m as ApiCoinClaimResult, n as ApiCoinPrice, o as ApiCoinPrices, p as ApiCoinsQuery, q as ApiCollection, r as ApiCollectionClaim, s as ApiCollectionProfile, t as ApiCollectionSlugClaim, u as ApiCollectionsListQuery, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiDrop, D as ApiDropFee, E as ApiDropListStatus, F as ApiDropMint, G as ApiEmissionCall, H as ApiEmissionResult, I as ApiFundingInstructions, J as ApiFundingIntent, K as ApiFundingMethod, L as ApiFundingStatus, M as ApiFundingSubmit, N as ApiIntent, O as ApiIntentCreated, P as ApiIpNftTokenData, Q as ApiMeta, R as ApiMetadataSignedUrl, T as ApiMetadataUpload, U as ApiOrder, V as ApiOrderConsideration, W as ApiOrderOffer, X as ApiOrderPrice, Y as ApiOrderTokenMeta, Z as ApiOrderTxHash, _ as ApiOrdersQuery, $ as ApiPlatformStats, a0 as ApiPointEvent, a1 as ApiPortalKey, a2 as ApiPortalKeyCreated, a3 as ApiPortalMe, a4 as ApiPortalSpend, a5 as ApiPricing, a6 as ApiPricingRule, a7 as ApiPublicRemix, a8 as ApiRemixOffer, a9 as ApiRemixOfferPrice, aa as ApiRemixOffersQuery, ab as ApiReportTargetType, ac as ApiResponse, ad as ApiRewardsBadge, ae as ApiRewardsBatchEntry, af as ApiRewardsConfig, ag as ApiRewardsLeaderboardEntry, ah as ApiRewardsLevel, ai as ApiSearchCollectionResult, aj as ApiSearchCreatorResult, ak as ApiSearchResult, al as ApiSearchTokenResult, am as ApiSession, an as ApiSpendByAction, ao as ApiSponsorshipBid, ap as ApiSponsorshipLicense, aq as ApiSponsorshipLicensesQuery, ar as ApiSponsorshipOffer, as as ApiSponsorshipOffersQuery, at as ApiSponsorshipProposal, au as ApiSponsorshipProposalsQuery, av as ApiSubmitReport, aw as ApiSwapQuote, ax as ApiSwapQuoteRequest, ay as ApiTierOnchain, az as ApiToken, aA as ApiTokenBalance, aB as ApiTokenMetadata, aC as ApiTokensQuery, aD as ApiTxSyncResult, aE as ApiUserRewards, aF as ApiUserWallet, aG as ApiUsernameClaim, aH as ApiWalletActivity, aI as AutoRemixOfferParams, aJ as CancelOrderIntentParams, aK as ChainFilter, aL as CheckoutIntentItem, aM as CollectionServiceId, aN as CollectionSort, aO as CollectionTokensSort, aP as ConfirmRemixOfferParams, aQ as ConfirmSelfRemixParams, aR as CreateCheckoutIntentParams, aS as CreateCoinIntentParams, aT as CreateCollectionIntentParams, aU as CreateCommentIntentParams, aV as CreateCounterOfferIntentParams, aW as CreateDropClaimIntentParams, aX as CreateDropManageIntentParams, aY as CreateFundingTransferIntentParams, aZ as CreateGenesisMintIntentParams, a_ as CreateListingIntentParams, a$ as CreateMintIntentParams, b0 as CreatePopBurnIntentParams, b1 as CreatePopClaimIntentParams, b2 as CreatePopManageIntentParams, b3 as CreateRemixOfferParams, b4 as CreateSponsorshipOfferIntentParams, b5 as CreateSponsorshipProposalIntentParams, b6 as CreateSwapIntentParams, b7 as CreateTierIntentParams, b8 as CreateTransferCollectionOwnershipIntentParams, b9 as CreateTransferNftIntentParams, ba as CreateTransferTokenIntentParams, bb as CreateWalletManageIntentParams, bc as DeviceKeyMissingError, bd as DropManageAction, be as DropTermsBody, bf as EmissionParams, bg as EnforcementDeclaration, bh as FactoryFamilyServiceId, bi as FulfillOrderIntentParams, bj as IPType, bk as IntentCall, bl as IntentParamsByKind, bm as IntentStatus, bn as IntentType, bo as IpAttribute, bp as IpNftMetadata, bq as LaunchCoinIntentParams, br as MakeOfferIntentParams, bs as OPEN_LICENSES, bt as OpenLicense, bu as OrderStatus, bv as PasskeyCancelledError, bw as PasskeyUnsupportedError, bx as PasskeyUnsupportedReason, by as PlaceSponsorshipBidIntentParams, bz as PopManageAction, bA as RegisteredUser, bB as RejectSponsorshipProposalIntentParams, bC as RemixOfferStatus, bD as RetractSponsorshipBidIntentParams, bE as ServiceEventDeclaration, bF as SetSponsorshipOfferOpenIntentParams, bG as SortOrder, bH as TierServiceId, bI as UpdateCollectionProfileInput, bJ as WalletManageAction, bK as WithdrawSponsorshipProposalIntentParams } from './passkey-errors-
|
|
3
|
+
import { S as ServiceDefinition, a as ServiceCapability } from './passkey-errors-DMv2Vn1P.js';
|
|
4
|
+
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as AccountApi, d as ActivityType, e as ApiActivitiesQuery, f as ApiActivity, g as ApiActivityPrice, h as ApiAdminCollectionClaim, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiCoin, m as ApiCoinClaimResult, n as ApiCoinPrice, o as ApiCoinPrices, p as ApiCoinsQuery, q as ApiCollection, r as ApiCollectionClaim, s as ApiCollectionProfile, t as ApiCollectionSlugClaim, u as ApiCollectionsListQuery, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiDrop, D as ApiDropFee, E as ApiDropListStatus, F as ApiDropMint, G as ApiEmissionCall, H as ApiEmissionResult, I as ApiFundingInstructions, J as ApiFundingIntent, K as ApiFundingMethod, L as ApiFundingStatus, M as ApiFundingSubmit, N as ApiIntent, O as ApiIntentCreated, P as ApiIpNftTokenData, Q as ApiMeta, R as ApiMetadataSignedUrl, T as ApiMetadataUpload, U as ApiOrder, V as ApiOrderConsideration, W as ApiOrderOffer, X as ApiOrderPrice, Y as ApiOrderTokenMeta, Z as ApiOrderTxHash, _ as ApiOrdersQuery, $ as ApiPlatformStats, a0 as ApiPointEvent, a1 as ApiPortalKey, a2 as ApiPortalKeyCreated, a3 as ApiPortalMe, a4 as ApiPortalSpend, a5 as ApiPricing, a6 as ApiPricingRule, a7 as ApiPublicRemix, a8 as ApiRemixOffer, a9 as ApiRemixOfferPrice, aa as ApiRemixOffersQuery, ab as ApiReportTargetType, ac as ApiResponse, ad as ApiRewardsBadge, ae as ApiRewardsBatchEntry, af as ApiRewardsConfig, ag as ApiRewardsLeaderboardEntry, ah as ApiRewardsLevel, ai as ApiSearchCollectionResult, aj as ApiSearchCreatorResult, ak as ApiSearchResult, al as ApiSearchTokenResult, am as ApiSession, an as ApiSpendByAction, ao as ApiSponsorshipBid, ap as ApiSponsorshipLicense, aq as ApiSponsorshipLicensesQuery, ar as ApiSponsorshipOffer, as as ApiSponsorshipOffersQuery, at as ApiSponsorshipProposal, au as ApiSponsorshipProposalsQuery, av as ApiSubmitReport, aw as ApiSwapQuote, ax as ApiSwapQuoteRequest, ay as ApiTierOnchain, az as ApiToken, aA as ApiTokenBalance, aB as ApiTokenMetadata, aC as ApiTokensQuery, aD as ApiTxSyncResult, aE as ApiUserRewards, aF as ApiUserWallet, aG as ApiUsernameClaim, aH as ApiWalletActivity, aI as AutoRemixOfferParams, aJ as CancelOrderIntentParams, aK as ChainFilter, aL as CheckoutIntentItem, aM as CollectionServiceId, aN as CollectionSort, aO as CollectionTokensSort, aP as ConfirmRemixOfferParams, aQ as ConfirmSelfRemixParams, aR as CreateCheckoutIntentParams, aS as CreateCoinIntentParams, aT as CreateCollectionIntentParams, aU as CreateCommentIntentParams, aV as CreateCounterOfferIntentParams, aW as CreateDropClaimIntentParams, aX as CreateDropManageIntentParams, aY as CreateFundingTransferIntentParams, aZ as CreateGenesisMintIntentParams, a_ as CreateListingIntentParams, a$ as CreateMintIntentParams, b0 as CreatePopBurnIntentParams, b1 as CreatePopClaimIntentParams, b2 as CreatePopManageIntentParams, b3 as CreateRemixOfferParams, b4 as CreateSponsorshipOfferIntentParams, b5 as CreateSponsorshipProposalIntentParams, b6 as CreateSwapIntentParams, b7 as CreateTierIntentParams, b8 as CreateTransferCollectionOwnershipIntentParams, b9 as CreateTransferNftIntentParams, ba as CreateTransferTokenIntentParams, bb as CreateWalletManageIntentParams, bc as DeviceKeyMissingError, bd as DropManageAction, be as DropTermsBody, bf as EmissionParams, bg as EnforcementDeclaration, bh as FactoryFamilyServiceId, bi as FulfillOrderIntentParams, bj as IPType, bk as IntentCall, bl as IntentParamsByKind, bm as IntentStatus, bn as IntentType, bo as IpAttribute, bp as IpNftMetadata, bq as LaunchCoinIntentParams, br as MakeOfferIntentParams, bs as OPEN_LICENSES, bt as OpenLicense, bu as OrderStatus, bv as PasskeyCancelledError, bw as PasskeyUnsupportedError, bx as PasskeyUnsupportedReason, by as PlaceSponsorshipBidIntentParams, bz as PopManageAction, bA as RegisteredUser, bB as RejectSponsorshipProposalIntentParams, bC as RemixOfferStatus, bD as RetractSponsorshipBidIntentParams, bE as ServiceEventDeclaration, bF as SetSponsorshipOfferOpenIntentParams, bG as SortOrder, bH as TierServiceId, bI as UpdateCollectionProfileInput, bJ as WalletManageAction, bK as WithdrawSponsorshipProposalIntentParams } from './passkey-errors-DMv2Vn1P.js';
|
|
5
5
|
import { C as Chain } from './chains-CmwjZVU7.js';
|
|
6
6
|
export { a as CHAINS, b as ChainCoordinates, c as CoordinatesByChain, D as DEFAULT_CHAIN, E as EvmCoordinates, S as SolanaCoordinates, d as StarknetCoordinates, e as StellarCoordinates, g as getCoordinates, f as getStarknetCoordinates } from './chains-CmwjZVU7.js';
|
|
7
7
|
export { ACCOUNT_SESSION_COOKIE, ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, AppGatewayConfig, AppSessionConfig, BackendMetadataConfig, BackendUploadResult, CappedBody, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, ImageProxyConfig, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, SiwsIdentity, createAppGateway, createAppSessionHandler, createImageProxyHandler, getBackendSignedUrl, isPrivateHost, isPrivateOrInsecureUrl, isPublicAppRoute, isSameOrigin, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, readBodyWithCap, resolveSafeImageContentType, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken } from './server/index.js';
|
|
8
8
|
export { A as AdapterTxResult, a as AssetRef, C as CreateCollectionInput, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, V as VenueAdapter } from './types-BW6ktwcT.js';
|
|
9
9
|
import 'zod';
|
|
10
|
-
import './responses-
|
|
10
|
+
import './responses-BpnS-Io9.js';
|
|
11
11
|
import 'starknet';
|
|
12
12
|
import './provisioning-CwRkCN8D.js';
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { SUPPORTED_URL_CHAINS, assetHref, chainFromSlug, chainSlug, coinHref, collectionHref, dropHref, encodeU256, getService, getServicesByCapability, hasCapability, isServiceId, listServices, profileHref, resolveConfig, resolveFeeConfig, stringifyBigInts, u256ToBigInt } from './chunk-GV4A2WNO.js';
|
|
2
2
|
export { ACCOUNT_SESSION_COOKIE, ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, createAppGateway, createAppSessionHandler, createImageProxyHandler, getBackendSignedUrl, isPrivateHost, isPrivateOrInsecureUrl, isPublicAppRoute, isSameOrigin, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, readBodyWithCap, resolveSafeImageContentType, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken } from './chunk-F7W6IWTL.js';
|
|
3
|
-
export { ApiClient, DEFAULT_CURRENCY, DeviceKeyMissingError, MedialaneApiError, MedialaneError, PasskeyCancelledError, PasskeyUnsupportedError, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_721_CONTRACT, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_DROP_FACTORY_START_BLOCK, STARKNET_GENESIS_MINT_CONTRACT, STARKNET_GENESIS_NFT_URI, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_FACTORY_CONTRACT, STARKNET_POP_FACTORY_START_BLOCK, SUPPORTED_TOKENS, UserFacingError, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, normalizeHash, parseAmount, shortenAddress } from './chunk-
|
|
3
|
+
export { ApiClient, DEFAULT_CURRENCY, DeviceKeyMissingError, MedialaneApiError, MedialaneError, PasskeyCancelledError, PasskeyUnsupportedError, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_721_CONTRACT, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_DROP_FACTORY_START_BLOCK, STARKNET_GENESIS_MINT_CONTRACT, STARKNET_GENESIS_NFT_URI, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_FACTORY_CONTRACT, STARKNET_POP_FACTORY_START_BLOCK, SUPPORTED_TOKENS, UserFacingError, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, normalizeHash, parseAmount, shortenAddress } from './chunk-GENBWVGK.js';
|
|
4
4
|
export { CHAINS, DEFAULT_CHAIN, getCoordinates, getStarknetCoordinates } from './chunk-5KY6P434.js';
|
|
5
5
|
import './chunk-WRBXQPRL.js';
|
|
6
6
|
import './chunk-PZ5AY32C.js';
|
|
@@ -30,7 +30,7 @@ function createLaunchpadRunsClient({ baseUrl, fetchImpl = fetch }) {
|
|
|
30
30
|
});
|
|
31
31
|
const body = await res.json().catch(() => ({}));
|
|
32
32
|
if (!res.ok) {
|
|
33
|
-
throw new RunRequestError(String(body.error ??
|
|
33
|
+
throw new RunRequestError(String(body.error ?? `Request returned status ${res.status}`), res.status, body);
|
|
34
34
|
}
|
|
35
35
|
return { status: res.status, data: body.data };
|
|
36
36
|
}
|