@medialane/sdk 0.85.4 → 0.85.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evm/index.cjs +0 -7
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +1 -23
- package/dist/evm/index.d.ts +1 -23
- package/dist/evm/index.js +0 -7
- package/dist/evm/index.js.map +1 -1
- package/dist/index.cjs +2 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -146
- package/dist/index.d.ts +4 -146
- package/dist/index.js +2 -140
- package/dist/index.js.map +1 -1
- package/dist/{services-CovenF1m.d.ts → services-CQKFABiG.d.cts} +4 -327
- package/dist/{services-D8saJqJw.d.cts → services-okgZ2AMD.d.ts} +4 -327
- package/dist/solana/index.cjs +0 -5
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +1 -14
- package/dist/solana/index.d.ts +1 -14
- package/dist/solana/index.js +0 -5
- package/dist/solana/index.js.map +1 -1
- package/dist/starknet/index.cjs +2 -220
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +2 -334
- package/dist/starknet/index.d.ts +2 -334
- package/dist/starknet/index.js +2 -220
- package/dist/starknet/index.js.map +1 -1
- package/dist/stellar/index.cjs +0 -5
- package/dist/stellar/index.cjs.map +1 -1
- package/dist/stellar/index.d.cts +1 -9
- package/dist/stellar/index.d.ts +1 -9
- package/dist/stellar/index.js +0 -5
- package/dist/stellar/index.js.map +1 -1
- package/dist/{types-sIc3OCpo.d.cts → types-nPIXtCF5.d.cts} +0 -45
- package/dist/{types-sIc3OCpo.d.ts → types-nPIXtCF5.d.ts} +0 -45
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -44,11 +44,6 @@ var COORDINATES = {
|
|
|
44
44
|
ipClubFactoryClassHash: "0x05d9d431bd3532b1fa4d5bab572f49c5ad8034ee3cc83951aa41ae82c9cad266",
|
|
45
45
|
ipClubCollectionClassHash: "0x05b8477c72e6bf0cf64967d71155021fd4d77d9a57e8805c6b40709121c002c5",
|
|
46
46
|
ipClubFactoryStartBlock: 11928775,
|
|
47
|
-
// v3 redesign (deployed 2026-07-15): single contract is both the
|
|
48
|
-
// offer/bid/proposal registry and the license collection (embeds
|
|
49
|
-
// ERC721Component directly) — no separate receipt contract, no
|
|
50
|
-
// set_minter bootstrap. Supersedes the 2026-07-02 v2 address, which had
|
|
51
|
-
// zero offers/licenses ever issued (clean cutover, no reclassification).
|
|
52
47
|
ipSponsorship: "0x03729ebe0fedf29ec97fca34db09174772af7f870af26a26e024a61040143e5c",
|
|
53
48
|
ipSponsorshipClassHash: "0x0626daac2ed7e2bf630ef5b10104b3202db1559216c0c1a504c0e99be2fbfec3",
|
|
54
49
|
ipSponsorshipStartBlock: 11896456,
|
|
@@ -87,13 +82,10 @@ function resolveFeeConfig(raw) {
|
|
|
87
82
|
|
|
88
83
|
// src/config.ts
|
|
89
84
|
var MedialaneConfigSchema = zod.z.object({
|
|
90
|
-
// Chain-scoped client (spec 2026-06-13 Decision B): one client per chain,
|
|
91
|
-
// coordinates resolved from the registry. Replaces the removed `network` axis.
|
|
92
85
|
chain: zod.z.enum(CHAINS).default(DEFAULT_CHAIN),
|
|
93
86
|
rpcUrl: zod.z.string().url().optional(),
|
|
94
87
|
backendUrl: zod.z.string().url().optional(),
|
|
95
88
|
apiKey: zod.z.string().optional(),
|
|
96
|
-
// Per-contract overrides remain for tests/forks; default from the registry.
|
|
97
89
|
marketplace721Contract: zod.z.string().optional(),
|
|
98
90
|
marketplaceContract: zod.z.string().optional(),
|
|
99
91
|
marketplace1155Contract: zod.z.string().optional(),
|
|
@@ -283,17 +275,9 @@ var ApiClient = class {
|
|
|
283
275
|
this.baseHeaders = apiKey ? { "x-api-key": apiKey } : {};
|
|
284
276
|
this.retryOptions = retryOptions;
|
|
285
277
|
}
|
|
286
|
-
/** Normalize an address for this client's chain (chain-scoped — Decision B). */
|
|
287
278
|
addr(a) {
|
|
288
279
|
return normalizeAddress(this.chain, a);
|
|
289
280
|
}
|
|
290
|
-
/**
|
|
291
|
-
* The one HTTP path for the whole client: base headers (incl. x-api-key),
|
|
292
|
-
* JSON error unwrapping, and `withRetry` (5xx/network only — 4xx never
|
|
293
|
-
* retried). `allow404`/`allow403` turn those statuses into a `null` result
|
|
294
|
-
* instead of a throw, for "profile may not exist" / "not a holder" reads —
|
|
295
|
-
* so no method needs to hand-roll `fetch` to get that behavior.
|
|
296
|
-
*/
|
|
297
281
|
async request(path, init, opts) {
|
|
298
282
|
const url = `${this.baseUrl.replace(/\/$/, "")}${path}`;
|
|
299
283
|
const headers = { ...this.baseHeaders };
|
|
@@ -333,11 +317,9 @@ var ApiClient = class {
|
|
|
333
317
|
del(path) {
|
|
334
318
|
return this.request(path, { method: "DELETE" });
|
|
335
319
|
}
|
|
336
|
-
/** Bearer header for SIWS-token-authenticated routes. */
|
|
337
320
|
bearer(siwsToken) {
|
|
338
321
|
return { Authorization: `Bearer ${siwsToken}` };
|
|
339
322
|
}
|
|
340
|
-
// ─── Orders ────────────────────────────────────────────────────────────────
|
|
341
323
|
getOrders(query = {}) {
|
|
342
324
|
const params = new URLSearchParams();
|
|
343
325
|
if (query.status) params.set("status", query.status);
|
|
@@ -364,7 +346,6 @@ var ApiClient = class {
|
|
|
364
346
|
`/v1/orders/user/${this.addr(address)}?page=${page}&limit=${limit}`
|
|
365
347
|
);
|
|
366
348
|
}
|
|
367
|
-
// ─── Tokens ────────────────────────────────────────────────────────────────
|
|
368
349
|
getToken(contract, tokenId, wait = false) {
|
|
369
350
|
return this.get(
|
|
370
351
|
`/v1/tokens/${contract}/${tokenId}${wait ? "?wait=true" : ""}`
|
|
@@ -380,13 +361,13 @@ var ApiClient = class {
|
|
|
380
361
|
`/v1/tokens/${contract}/${tokenId}/history?page=${page}&limit=${limit}`
|
|
381
362
|
);
|
|
382
363
|
}
|
|
383
|
-
|
|
384
|
-
getCollections(page = 1, limit = 20, isKnown, sort, service, chain) {
|
|
364
|
+
getCollections(page = 1, limit = 20, isKnown, sort, service, chain, standard) {
|
|
385
365
|
const params = new URLSearchParams({ page: String(page), limit: String(limit) });
|
|
386
366
|
if (isKnown !== void 0) params.set("isKnown", String(isKnown));
|
|
387
367
|
if (sort) params.set("sort", sort);
|
|
388
368
|
if (service) params.set("service", service);
|
|
389
369
|
if (chain) params.set("chain", chain);
|
|
370
|
+
if (standard) params.set("standard", standard);
|
|
390
371
|
return this.get(`/v1/collections?${params}`);
|
|
391
372
|
}
|
|
392
373
|
getCollectionsByOwner(owner, page = 1, limit = 50) {
|
|
@@ -401,7 +382,6 @@ var ApiClient = class {
|
|
|
401
382
|
`/v1/collections/${this.addr(contract)}/tokens?page=${page}&limit=${limit}&sort=${sort}`
|
|
402
383
|
);
|
|
403
384
|
}
|
|
404
|
-
// ─── Activities ────────────────────────────────────────────────────────────
|
|
405
385
|
getActivities(query = {}) {
|
|
406
386
|
const params = new URLSearchParams();
|
|
407
387
|
if (query.type) params.set("type", query.type);
|
|
@@ -417,7 +397,6 @@ var ApiClient = class {
|
|
|
417
397
|
`/v1/activities/${this.addr(address)}?page=${page}&limit=${limit}`
|
|
418
398
|
);
|
|
419
399
|
}
|
|
420
|
-
// ─── Comments ──────────────────────────────────────────────────────────────
|
|
421
400
|
getTokenComments(contract, tokenId, opts = {}) {
|
|
422
401
|
const params = new URLSearchParams();
|
|
423
402
|
if (opts.page !== void 0) params.set("page", String(opts.page));
|
|
@@ -427,7 +406,6 @@ var ApiClient = class {
|
|
|
427
406
|
`/v1/tokens/${this.addr(contract)}/${tokenId}/comments${qs ? `?${qs}` : ""}`
|
|
428
407
|
);
|
|
429
408
|
}
|
|
430
|
-
// ─── Search ────────────────────────────────────────────────────────────────
|
|
431
409
|
search(q, limit = 10, chain) {
|
|
432
410
|
const params = new URLSearchParams({ q, limit: String(limit) });
|
|
433
411
|
if (chain) params.set("chain", chain);
|
|
@@ -435,7 +413,6 @@ var ApiClient = class {
|
|
|
435
413
|
`/v1/search?${params.toString()}`
|
|
436
414
|
);
|
|
437
415
|
}
|
|
438
|
-
// ─── Intents ───────────────────────────────────────────────────────────────
|
|
439
416
|
createListingIntent(params) {
|
|
440
417
|
return this.post("/v1/intents/listing", params);
|
|
441
418
|
}
|
|
@@ -502,11 +479,6 @@ var ApiClient = class {
|
|
|
502
479
|
rejectSponsorshipProposalIntent(params) {
|
|
503
480
|
return this.post("/v1/intents/sponsorship-proposal-reject", params);
|
|
504
481
|
}
|
|
505
|
-
/**
|
|
506
|
-
* Create a counter-offer intent. The seller proposes a new price in response
|
|
507
|
-
* to a buyer's active bid. siwsToken is optional — the endpoint authenticates
|
|
508
|
-
* via the tenant API key; pass a SIWS token only if your backend requires it.
|
|
509
|
-
*/
|
|
510
482
|
createCounterOfferIntent(params, siwsToken) {
|
|
511
483
|
const extraHeaders = siwsToken ? { "Authorization": `Bearer ${siwsToken}` } : {};
|
|
512
484
|
return this.request("/v1/intents/counter-offer", {
|
|
@@ -515,10 +487,6 @@ var ApiClient = class {
|
|
|
515
487
|
headers: extraHeaders
|
|
516
488
|
});
|
|
517
489
|
}
|
|
518
|
-
/**
|
|
519
|
-
* Fetch counter-offers. Pass `originalOrderHash` (buyer view) or
|
|
520
|
-
* `sellerAddress` (seller view) — at least one is required.
|
|
521
|
-
*/
|
|
522
490
|
getCounterOffers(query) {
|
|
523
491
|
const params = new URLSearchParams();
|
|
524
492
|
if (query.originalOrderHash) params.set("originalOrderHash", query.originalOrderHash);
|
|
@@ -527,7 +495,6 @@ var ApiClient = class {
|
|
|
527
495
|
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
528
496
|
return this.get(`/v1/orders/counter-offers?${params}`);
|
|
529
497
|
}
|
|
530
|
-
// ─── Metadata ──────────────────────────────────────────────────────────────
|
|
531
498
|
getMetadataSignedUrl() {
|
|
532
499
|
return this.get("/v1/metadata/signed-url");
|
|
533
500
|
}
|
|
@@ -546,7 +513,6 @@ var ApiClient = class {
|
|
|
546
513
|
body: formData
|
|
547
514
|
});
|
|
548
515
|
}
|
|
549
|
-
// ─── Portal (tenant self-service) ──────────────────────────────────────────
|
|
550
516
|
getMe() {
|
|
551
517
|
return this.get("/v1/portal/me");
|
|
552
518
|
}
|
|
@@ -573,11 +539,6 @@ var ApiClient = class {
|
|
|
573
539
|
`/v1/portal/webhooks/${id}`
|
|
574
540
|
);
|
|
575
541
|
}
|
|
576
|
-
// ─── Collection Claims ──────────────────────────────────────────────────────
|
|
577
|
-
/**
|
|
578
|
-
* Path 1: On-chain auto claim. Sends both x-api-key (tenant auth) and
|
|
579
|
-
* Authorization: Bearer (SIWS token) simultaneously.
|
|
580
|
-
*/
|
|
581
542
|
async claimCollection(contractAddress, walletAddress, siwsToken) {
|
|
582
543
|
return this.request("/v1/collections/claim", {
|
|
583
544
|
method: "POST",
|
|
@@ -585,23 +546,18 @@ var ApiClient = class {
|
|
|
585
546
|
headers: this.bearer(siwsToken)
|
|
586
547
|
});
|
|
587
548
|
}
|
|
588
|
-
/**
|
|
589
|
-
* Path 3: Manual off-chain claim request (email-based).
|
|
590
|
-
*/
|
|
591
549
|
requestCollectionClaim(params) {
|
|
592
550
|
return this.request("/v1/collections/claim/request", {
|
|
593
551
|
method: "POST",
|
|
594
552
|
body: JSON.stringify(params)
|
|
595
553
|
});
|
|
596
554
|
}
|
|
597
|
-
// ─── Business Provisioning ──────────────────────────────────────────────────
|
|
598
555
|
registerBusinessProvisioning(params) {
|
|
599
556
|
return this.post("/v1/business/provisioning", params);
|
|
600
557
|
}
|
|
601
558
|
completeBusinessProvisioning(id) {
|
|
602
559
|
return this.post(`/v1/business/provisioning/${id}/complete`, {});
|
|
603
560
|
}
|
|
604
|
-
// ─── Collection Profiles ────────────────────────────────────────────────────
|
|
605
561
|
getCollectionProfile(contractAddress) {
|
|
606
562
|
return this.request(
|
|
607
563
|
`/v1/collections/${this.addr(contractAddress)}/profile`,
|
|
@@ -609,16 +565,12 @@ var ApiClient = class {
|
|
|
609
565
|
{ allow404: true }
|
|
610
566
|
);
|
|
611
567
|
}
|
|
612
|
-
/**
|
|
613
|
-
* Update collection profile. Requires SIWS token for ownership check.
|
|
614
|
-
*/
|
|
615
568
|
updateCollectionProfile(contractAddress, data, siwsToken) {
|
|
616
569
|
return this.request(
|
|
617
570
|
`/v1/collections/${this.addr(contractAddress)}/profile`,
|
|
618
571
|
{ method: "PATCH", body: JSON.stringify(data), headers: this.bearer(siwsToken) }
|
|
619
572
|
);
|
|
620
573
|
}
|
|
621
|
-
/** No signature required — wallet activity is public on-chain data, read like any other /v1 GET. */
|
|
622
574
|
getWalletActivity(address, chain = "STARKNET") {
|
|
623
575
|
return this.get(
|
|
624
576
|
`/v1/wallet-activity?address=${this.addr(address)}&chain=${chain}`
|
|
@@ -631,8 +583,6 @@ var ApiClient = class {
|
|
|
631
583
|
{ allow404: true, allow403: true }
|
|
632
584
|
);
|
|
633
585
|
}
|
|
634
|
-
// ─── Creator Profiles ───────────────────────────────────────────────────────
|
|
635
|
-
/** List all creators with an approved username. */
|
|
636
586
|
getCreators(opts = {}) {
|
|
637
587
|
const params = new URLSearchParams();
|
|
638
588
|
if (opts.search) params.set("search", opts.search);
|
|
@@ -648,7 +598,6 @@ var ApiClient = class {
|
|
|
648
598
|
{ allow404: true }
|
|
649
599
|
);
|
|
650
600
|
}
|
|
651
|
-
/** Resolve a username slug to a creator profile (public). */
|
|
652
601
|
getCreatorByUsername(username) {
|
|
653
602
|
return this.request(
|
|
654
603
|
`/v1/creators/by-username/${encodeURIComponent(username.toLowerCase().trim())}`,
|
|
@@ -656,23 +605,17 @@ var ApiClient = class {
|
|
|
656
605
|
{ allow404: true }
|
|
657
606
|
);
|
|
658
607
|
}
|
|
659
|
-
/**
|
|
660
|
-
* Update creator profile. Requires SIWS token; wallet must match authenticated user.
|
|
661
|
-
*/
|
|
662
608
|
updateCreatorProfile(walletAddress, data, siwsToken) {
|
|
663
609
|
return this.request(
|
|
664
610
|
`/v1/creators/${this.addr(walletAddress)}/profile`,
|
|
665
611
|
{ method: "PATCH", body: JSON.stringify(data), headers: this.bearer(siwsToken) }
|
|
666
612
|
);
|
|
667
613
|
}
|
|
668
|
-
// ─── Collection Slug Claims ───────────────────────────────────────────────────
|
|
669
|
-
/** Check if a collection slug is available (public, no auth). */
|
|
670
614
|
checkCollectionSlugAvailability(slug) {
|
|
671
615
|
return this.get(
|
|
672
616
|
`/v1/collection-slug-claims/check/${encodeURIComponent(slug.toLowerCase().trim())}`
|
|
673
617
|
);
|
|
674
618
|
}
|
|
675
|
-
/** Submit a slug claim for a collection. Requires SIWS token — caller must be the collection owner. */
|
|
676
619
|
submitCollectionSlugClaim(contractAddress, slug, siwsToken, notifyEmail) {
|
|
677
620
|
return this.request("/v1/collection-slug-claims", {
|
|
678
621
|
method: "POST",
|
|
@@ -680,14 +623,12 @@ var ApiClient = class {
|
|
|
680
623
|
headers: this.bearer(siwsToken)
|
|
681
624
|
});
|
|
682
625
|
}
|
|
683
|
-
/** Returns all slug claims submitted by the authenticated wallet. Requires SIWS token. */
|
|
684
626
|
getMyCollectionSlugClaims(siwsToken) {
|
|
685
627
|
return this.request("/v1/collection-slug-claims/me", {
|
|
686
628
|
method: "GET",
|
|
687
629
|
headers: this.bearer(siwsToken)
|
|
688
630
|
});
|
|
689
631
|
}
|
|
690
|
-
/** Resolve a collection slug to a full collection. Returns null if not found. */
|
|
691
632
|
getCollectionBySlug(slug) {
|
|
692
633
|
return this.request(
|
|
693
634
|
`/v1/collections/by-slug/${encodeURIComponent(slug.toLowerCase().trim())}`,
|
|
@@ -695,12 +636,6 @@ var ApiClient = class {
|
|
|
695
636
|
{ allow404: true }
|
|
696
637
|
);
|
|
697
638
|
}
|
|
698
|
-
// ─── User Wallet ─────────────────────────────────────────────────────────────
|
|
699
|
-
/**
|
|
700
|
-
* Frictionless wallet registration. Tenant API key only (no SIWS token required).
|
|
701
|
-
* Idempotent — backend's ensureAccountForWallet upserts and upgrades existing
|
|
702
|
-
* UNKNOWN walletType rows when a more specific value is supplied.
|
|
703
|
-
*/
|
|
704
639
|
async registerUser(params) {
|
|
705
640
|
return this.post("/v1/users/register", params);
|
|
706
641
|
}
|
|
@@ -719,18 +654,12 @@ var ApiClient = class {
|
|
|
719
654
|
headers: this.bearer(siwsToken)
|
|
720
655
|
});
|
|
721
656
|
}
|
|
722
|
-
/** Whether an email already has an account attached — used by io's onboarding to branch into an "already exists" message instead of creating a duplicate account. */
|
|
723
657
|
async checkEmailExists(email) {
|
|
724
658
|
const { exists } = await this.get(
|
|
725
659
|
`/v1/auth/email/exists?email=${encodeURIComponent(email)}`
|
|
726
660
|
);
|
|
727
661
|
return exists;
|
|
728
662
|
}
|
|
729
|
-
/**
|
|
730
|
-
* Get the authenticated user's stored wallet address from the backend DB.
|
|
731
|
-
* Returns null if the user has not completed onboarding yet.
|
|
732
|
-
* Requires SIWS token; no tenant API key needed.
|
|
733
|
-
*/
|
|
734
663
|
getMyWallet(siwsToken) {
|
|
735
664
|
return this.request(
|
|
736
665
|
"/v1/users/me",
|
|
@@ -738,10 +667,6 @@ var ApiClient = class {
|
|
|
738
667
|
{ allow404: true }
|
|
739
668
|
);
|
|
740
669
|
}
|
|
741
|
-
// ─── Remix Licensing ─────────────────────────────────────────────────────────
|
|
742
|
-
/**
|
|
743
|
-
* Get public remixes of a token (open to everyone).
|
|
744
|
-
*/
|
|
745
670
|
getTokenRemixes(contract, tokenId, opts = {}) {
|
|
746
671
|
const params = new URLSearchParams();
|
|
747
672
|
if (opts.page !== void 0) params.set("page", String(opts.page));
|
|
@@ -751,9 +676,6 @@ var ApiClient = class {
|
|
|
751
676
|
`/v1/tokens/${this.addr(contract)}/${tokenId}/remixes${qs ? `?${qs}` : ""}`
|
|
752
677
|
);
|
|
753
678
|
}
|
|
754
|
-
/**
|
|
755
|
-
* Submit a custom remix offer for a token. Requires SIWS token.
|
|
756
|
-
*/
|
|
757
679
|
submitRemixOffer(params, siwsToken) {
|
|
758
680
|
return this.request("/v1/remix-offers", {
|
|
759
681
|
method: "POST",
|
|
@@ -761,9 +683,6 @@ var ApiClient = class {
|
|
|
761
683
|
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
762
684
|
});
|
|
763
685
|
}
|
|
764
|
-
/**
|
|
765
|
-
* Submit an auto remix offer for a token with an open license. Requires SIWS token.
|
|
766
|
-
*/
|
|
767
686
|
submitAutoRemixOffer(params, siwsToken) {
|
|
768
687
|
return this.request("/v1/remix-offers/auto", {
|
|
769
688
|
method: "POST",
|
|
@@ -771,9 +690,6 @@ var ApiClient = class {
|
|
|
771
690
|
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
772
691
|
});
|
|
773
692
|
}
|
|
774
|
-
/**
|
|
775
|
-
* Record a self-remix (owner remixing their own token). Requires SIWS token.
|
|
776
|
-
*/
|
|
777
693
|
confirmSelfRemix(params, siwsToken) {
|
|
778
694
|
return this.request("/v1/remix-offers/self/confirm", {
|
|
779
695
|
method: "POST",
|
|
@@ -781,11 +697,6 @@ var ApiClient = class {
|
|
|
781
697
|
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
782
698
|
});
|
|
783
699
|
}
|
|
784
|
-
/**
|
|
785
|
-
* List remix offers by role. Requires SIWS token.
|
|
786
|
-
* role="creator" — offers where you are the original creator.
|
|
787
|
-
* role="requester" — offers you made.
|
|
788
|
-
*/
|
|
789
700
|
getRemixOffers(query, siwsToken) {
|
|
790
701
|
const params = new URLSearchParams({ role: query.role });
|
|
791
702
|
if (query.page !== void 0) params.set("page", String(query.page));
|
|
@@ -795,18 +706,12 @@ var ApiClient = class {
|
|
|
795
706
|
headers: this.bearer(siwsToken)
|
|
796
707
|
});
|
|
797
708
|
}
|
|
798
|
-
/**
|
|
799
|
-
* Get a single remix offer. SIWS token optional (price/currency hidden for non-participants).
|
|
800
|
-
*/
|
|
801
709
|
getRemixOffer(id, siwsToken) {
|
|
802
710
|
return this.request(`/v1/remix-offers/${id}`, {
|
|
803
711
|
method: "GET",
|
|
804
712
|
headers: siwsToken ? this.bearer(siwsToken) : void 0
|
|
805
713
|
});
|
|
806
714
|
}
|
|
807
|
-
/**
|
|
808
|
-
* Creator approves a remix offer (authorises the requester to mint). Requires SIWS token.
|
|
809
|
-
*/
|
|
810
715
|
confirmRemixOffer(id, params, siwsToken) {
|
|
811
716
|
return this.request(`/v1/remix-offers/${id}/confirm`, {
|
|
812
717
|
method: "POST",
|
|
@@ -814,9 +719,6 @@ var ApiClient = class {
|
|
|
814
719
|
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
815
720
|
});
|
|
816
721
|
}
|
|
817
|
-
/**
|
|
818
|
-
* Creator rejects a remix offer. Requires SIWS token.
|
|
819
|
-
*/
|
|
820
722
|
rejectRemixOffer(id, siwsToken) {
|
|
821
723
|
return this.request(`/v1/remix-offers/${id}/reject`, {
|
|
822
724
|
method: "POST",
|
|
@@ -824,10 +726,6 @@ var ApiClient = class {
|
|
|
824
726
|
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
825
727
|
});
|
|
826
728
|
}
|
|
827
|
-
/**
|
|
828
|
-
* Requester extends the expiry of a pending remix offer by 1–30 days.
|
|
829
|
-
* Requires SIWS token.
|
|
830
|
-
*/
|
|
831
729
|
extendRemixOffer(id, days, siwsToken) {
|
|
832
730
|
return this.request(`/v1/remix-offers/${id}/extend`, {
|
|
833
731
|
method: "POST",
|
|
@@ -835,7 +733,6 @@ var ApiClient = class {
|
|
|
835
733
|
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
836
734
|
});
|
|
837
735
|
}
|
|
838
|
-
// ─── POP Protocol ──────────────────────────────────────────────────────────
|
|
839
736
|
getPopCollections(opts = {}) {
|
|
840
737
|
return this.getCollections(opts.page ?? 1, opts.limit ?? 20, void 0, opts.sort, "POP_PROTOCOL");
|
|
841
738
|
}
|
|
@@ -852,9 +749,6 @@ var ApiClient = class {
|
|
|
852
749
|
);
|
|
853
750
|
return res.data;
|
|
854
751
|
}
|
|
855
|
-
// ─── Coins (fungible — ERC-20 etc.) ───────────────────────────────────────────
|
|
856
|
-
// Coins are a separate model from Collections (spec 2026-06-14). Price/liquidity
|
|
857
|
-
// is read live from Ekubo (CreatorCoinService.getPrice), never from these.
|
|
858
752
|
getCoins(opts = {}) {
|
|
859
753
|
const params = new URLSearchParams();
|
|
860
754
|
if (opts.page) params.set("page", String(opts.page));
|
|
@@ -867,11 +761,6 @@ var ApiClient = class {
|
|
|
867
761
|
getCoin(contract) {
|
|
868
762
|
return this.get(`/v1/coins/${this.addr(contract)}`);
|
|
869
763
|
}
|
|
870
|
-
/**
|
|
871
|
-
* Creator-authed coin profile edit (image/description). Backend authorizes
|
|
872
|
-
* via `coin.creator` (trustless — from the factory event), not a body param;
|
|
873
|
-
* `siwsToken` is the caller's SIWS bearer token for `identityAuth`.
|
|
874
|
-
*/
|
|
875
764
|
updateCoinProfile(contract, data, siwsToken) {
|
|
876
765
|
return this.request(`/v1/coins/${this.addr(contract)}`, {
|
|
877
766
|
method: "PATCH",
|
|
@@ -879,7 +768,6 @@ var ApiClient = class {
|
|
|
879
768
|
headers: this.bearer(siwsToken)
|
|
880
769
|
});
|
|
881
770
|
}
|
|
882
|
-
// ─── Collection Drop ────────────────────────────────────────────────────────
|
|
883
771
|
getDropCollections(opts = {}) {
|
|
884
772
|
return this.getCollections(opts.page ?? 1, opts.limit ?? 20, void 0, opts.sort, "COLLECTION_DROP");
|
|
885
773
|
}
|
|
@@ -889,29 +777,22 @@ var ApiClient = class {
|
|
|
889
777
|
);
|
|
890
778
|
return res.data;
|
|
891
779
|
}
|
|
892
|
-
// ─── Rewards (v0.49.0) ─────────────────────────────────────────────────────
|
|
893
|
-
// Scores are recomputed on a schedule by the backend (~15 min) — reads only.
|
|
894
|
-
/** Score + level + progress + badges for one address (zeroed for unknown). */
|
|
895
780
|
async getRewards(address) {
|
|
896
781
|
const res = await this.get(`/v1/rewards/${this.addr(address)}`);
|
|
897
782
|
return res.data;
|
|
898
783
|
}
|
|
899
|
-
/** Paginated XP leaderboard. */
|
|
900
784
|
getRewardsLeaderboard(page = 1, limit = 50) {
|
|
901
785
|
return this.get(`/v1/rewards?page=${page}&limit=${limit}`);
|
|
902
786
|
}
|
|
903
|
-
/** Point-event history for an address. */
|
|
904
787
|
getRewardsEvents(address, page = 1, limit = 20) {
|
|
905
788
|
return this.get(
|
|
906
789
|
`/v1/rewards/${this.addr(address)}/events?page=${page}&limit=${limit}`
|
|
907
790
|
);
|
|
908
791
|
}
|
|
909
|
-
/** Reward configuration: level ladder, enabled action XP values, badge catalog. */
|
|
910
792
|
async getRewardsConfig() {
|
|
911
793
|
const res = await this.get(`/v1/rewards/config`);
|
|
912
794
|
return res.data;
|
|
913
795
|
}
|
|
914
|
-
/** Minimal level info for up to 50 addresses — one call per list page. */
|
|
915
796
|
async getRewardsBatch(addresses) {
|
|
916
797
|
if (addresses.length === 0) return [];
|
|
917
798
|
const params = new URLSearchParams({ addresses: addresses.map((a) => this.addr(a)).join(",") });
|
|
@@ -959,7 +840,6 @@ var STARKNET_CREATOR_COIN_START_BLOCK = SN.creatorCoinStartBlock;
|
|
|
959
840
|
var STARKNET_EKUBO_CORE = SN.ekuboCore;
|
|
960
841
|
var SUPPORTED_TOKENS = [
|
|
961
842
|
{
|
|
962
|
-
// Circle-native USDC on Starknet (canonical)
|
|
963
843
|
symbol: "USDC",
|
|
964
844
|
address: "0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb",
|
|
965
845
|
decimals: 6,
|
|
@@ -1031,10 +911,6 @@ var SERVICES = {
|
|
|
1031
911
|
capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
|
|
1032
912
|
events: [
|
|
1033
913
|
{ name: "CollectionCreated", emittedBy: "factory" }
|
|
1034
|
-
// Per-instance ERC-721 Transfer emitted by each deployed collection; not
|
|
1035
|
-
// yet declared here because the indexer polls discovered instances on a
|
|
1036
|
-
// slow schedule. Plan 2026-05-24-data-driven-event-registry.md covers
|
|
1037
|
-
// the migration.
|
|
1038
914
|
],
|
|
1039
915
|
metadataSchema: { licenseDefault: "CC BY-SA" }
|
|
1040
916
|
},
|
|
@@ -1046,8 +922,6 @@ var SERVICES = {
|
|
|
1046
922
|
provenance: "MEDIALANE",
|
|
1047
923
|
uiVariant: "standard",
|
|
1048
924
|
capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
|
|
1049
|
-
// No factory — single shared contract. Events declared when the genesis
|
|
1050
|
-
// contract address is wired into onchain.STARKNET.factoryAddress here.
|
|
1051
925
|
metadataSchema: { licenseDefault: "CC BY-SA" }
|
|
1052
926
|
},
|
|
1053
927
|
"mip-erc1155": {
|
|
@@ -1164,14 +1038,6 @@ var SERVICES = {
|
|
|
1164
1038
|
}
|
|
1165
1039
|
},
|
|
1166
1040
|
uiVariant: "standard",
|
|
1167
|
-
// v3: one contract is both the offer/bid/proposal registry and the
|
|
1168
|
-
// issued license collection (a real, standard ERC-721 minted internally
|
|
1169
|
-
// — no separate receipt contract). `transfer` reflects that a license is
|
|
1170
|
-
// freely transferable at the protocol layer; transferable/expiry intent
|
|
1171
|
-
// is declarative (carried in metadata + LicenseMinted), never
|
|
1172
|
-
// contract-enforced. Supersedes the 2026-07-02 v2 `ip-sponsorship`
|
|
1173
|
-
// (registry-only) + `ip-sponsorship-license` (non-authoritative receipt
|
|
1174
|
-
// via a dedicated ip-erc721 instance) pair — retired as of this redesign.
|
|
1175
1041
|
capabilities: ["sponsor", "transfer"],
|
|
1176
1042
|
events: [
|
|
1177
1043
|
{ name: "OfferCreated", emittedBy: "factory" },
|
|
@@ -1194,10 +1060,6 @@ var SERVICES = {
|
|
|
1194
1060
|
}
|
|
1195
1061
|
},
|
|
1196
1062
|
uiVariant: "coin",
|
|
1197
|
-
// `swap` is a UI affordance (05 §III): the marketplace renders an embedded
|
|
1198
|
-
// Ekubo swap (via StarkZapp) for the coin. Settlement is Ekubo — Medialane
|
|
1199
|
-
// operates NO trading venue and custodies nothing. No venue service exists
|
|
1200
|
-
// for coins (unlike NFTs, whose Medialane marketplace contract settles them).
|
|
1201
1063
|
capabilities: ["launch", "swap", "transfer"],
|
|
1202
1064
|
events: [
|
|
1203
1065
|
{ name: "CreatorCoinCreated", emittedBy: "factory" },
|