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