@medialane/sdk 0.85.2 → 0.85.4

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as ServiceDefinition, a as ServiceCapability } from './services-Cm9PVUkA.cjs';
2
- export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-Cm9PVUkA.cjs';
1
+ import { S as ServiceDefinition, a as ServiceCapability } from './services-D8saJqJw.cjs';
2
+ export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-D8saJqJw.cjs';
3
3
  import { C as Chain } from './types-sIc3OCpo.cjs';
4
4
  export { A as AdapterTxResult, a as AssetRef, b as CHAINS, c as ChainCoordinates, d as CoordinatesByChain, e as CreateCollectionInput, D as DEFAULT_CHAIN, E as EvmCoordinates, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, S as SolanaCoordinates, f as StarknetCoordinates, g as StellarCoordinates, V as VenueAdapter, h as getCoordinates, i as getStarknetCoordinates } from './types-sIc3OCpo.cjs';
5
5
  import 'zod';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as ServiceDefinition, a as ServiceCapability } from './services-DDAdIU4r.js';
2
- export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-DDAdIU4r.js';
1
+ import { S as ServiceDefinition, a as ServiceCapability } from './services-CovenF1m.js';
2
+ export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-CovenF1m.js';
3
3
  import { C as Chain } from './types-sIc3OCpo.js';
4
4
  export { A as AdapterTxResult, a as AssetRef, b as CHAINS, c as ChainCoordinates, d as CoordinatesByChain, e as CreateCollectionInput, D as DEFAULT_CHAIN, E as EvmCoordinates, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, S as SolanaCoordinates, f as StarknetCoordinates, g as StellarCoordinates, V as VenueAdapter, h as getCoordinates, i as getStarknetCoordinates } from './types-sIc3OCpo.js';
5
5
  import 'zod';
package/dist/index.js CHANGED
@@ -331,9 +331,9 @@ var ApiClient = class {
331
331
  del(path) {
332
332
  return this.request(path, { method: "DELETE" });
333
333
  }
334
- /** Bearer header for Clerk-JWT-authenticated routes. */
335
- bearer(clerkToken) {
336
- return { Authorization: `Bearer ${clerkToken}` };
334
+ /** Bearer header for SIWS-token-authenticated routes. */
335
+ bearer(siwsToken) {
336
+ return { Authorization: `Bearer ${siwsToken}` };
337
337
  }
338
338
  // ─── Orders ────────────────────────────────────────────────────────────────
339
339
  getOrders(query = {}) {
@@ -403,6 +403,7 @@ var ApiClient = class {
403
403
  getActivities(query = {}) {
404
404
  const params = new URLSearchParams();
405
405
  if (query.type) params.set("type", query.type);
406
+ if (query.contract) params.set("contract", query.contract);
406
407
  if (query.page !== void 0) params.set("page", String(query.page));
407
408
  if (query.limit !== void 0) params.set("limit", String(query.limit));
408
409
  if (query.chain) params.set("chain", query.chain);
@@ -501,11 +502,11 @@ var ApiClient = class {
501
502
  }
502
503
  /**
503
504
  * Create a counter-offer intent. The seller proposes a new price in response
504
- * to a buyer's active bid. clerkToken is optional — the endpoint authenticates
505
- * via the tenant API key; pass a Clerk JWT only if your backend requires it.
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.
506
507
  */
507
- createCounterOfferIntent(params, clerkToken) {
508
- const extraHeaders = clerkToken ? { "Authorization": `Bearer ${clerkToken}` } : {};
508
+ createCounterOfferIntent(params, siwsToken) {
509
+ const extraHeaders = siwsToken ? { "Authorization": `Bearer ${siwsToken}` } : {};
509
510
  return this.request("/v1/intents/counter-offer", {
510
511
  method: "POST",
511
512
  body: JSON.stringify(params),
@@ -573,13 +574,13 @@ var ApiClient = class {
573
574
  // ─── Collection Claims ──────────────────────────────────────────────────────
574
575
  /**
575
576
  * Path 1: On-chain auto claim. Sends both x-api-key (tenant auth) and
576
- * Authorization: Bearer (Clerk JWT) simultaneously.
577
+ * Authorization: Bearer (SIWS token) simultaneously.
577
578
  */
578
- async claimCollection(contractAddress, walletAddress, clerkToken) {
579
+ async claimCollection(contractAddress, walletAddress, siwsToken) {
579
580
  return this.request("/v1/collections/claim", {
580
581
  method: "POST",
581
582
  body: JSON.stringify({ contractAddress, walletAddress }),
582
- headers: this.bearer(clerkToken)
583
+ headers: this.bearer(siwsToken)
583
584
  });
584
585
  }
585
586
  /**
@@ -607,12 +608,12 @@ var ApiClient = class {
607
608
  );
608
609
  }
609
610
  /**
610
- * Update collection profile. Requires Clerk JWT for ownership check.
611
+ * Update collection profile. Requires SIWS token for ownership check.
611
612
  */
612
- updateCollectionProfile(contractAddress, data, clerkToken) {
613
+ updateCollectionProfile(contractAddress, data, siwsToken) {
613
614
  return this.request(
614
615
  `/v1/collections/${this.addr(contractAddress)}/profile`,
615
- { method: "PATCH", body: JSON.stringify(data), headers: this.bearer(clerkToken) }
616
+ { method: "PATCH", body: JSON.stringify(data), headers: this.bearer(siwsToken) }
616
617
  );
617
618
  }
618
619
  /** No signature required — wallet activity is public on-chain data, read like any other /v1 GET. */
@@ -621,10 +622,10 @@ var ApiClient = class {
621
622
  `/v1/wallet-activity?address=${this.addr(address)}&chain=${chain}`
622
623
  );
623
624
  }
624
- getGatedContent(contractAddress, clerkToken) {
625
+ getGatedContent(contractAddress, siwsToken) {
625
626
  return this.request(
626
627
  `/v1/collections/${this.addr(contractAddress)}/gated-content`,
627
- { method: "GET", headers: this.bearer(clerkToken) },
628
+ { method: "GET", headers: this.bearer(siwsToken) },
628
629
  { allow404: true, allow403: true }
629
630
  );
630
631
  }
@@ -654,12 +655,12 @@ var ApiClient = class {
654
655
  );
655
656
  }
656
657
  /**
657
- * Update creator profile. Requires Clerk JWT; wallet must match authenticated user.
658
+ * Update creator profile. Requires SIWS token; wallet must match authenticated user.
658
659
  */
659
- updateCreatorProfile(walletAddress, data, clerkToken) {
660
+ updateCreatorProfile(walletAddress, data, siwsToken) {
660
661
  return this.request(
661
662
  `/v1/creators/${this.addr(walletAddress)}/profile`,
662
- { method: "PATCH", body: JSON.stringify(data), headers: this.bearer(clerkToken) }
663
+ { method: "PATCH", body: JSON.stringify(data), headers: this.bearer(siwsToken) }
663
664
  );
664
665
  }
665
666
  // ─── Collection Slug Claims ───────────────────────────────────────────────────
@@ -669,19 +670,19 @@ var ApiClient = class {
669
670
  `/v1/collection-slug-claims/check/${encodeURIComponent(slug.toLowerCase().trim())}`
670
671
  );
671
672
  }
672
- /** Submit a slug claim for a collection. Requires Clerk JWT — caller must be the collection owner. */
673
- submitCollectionSlugClaim(contractAddress, slug, clerkToken, notifyEmail) {
673
+ /** Submit a slug claim for a collection. Requires SIWS token — caller must be the collection owner. */
674
+ submitCollectionSlugClaim(contractAddress, slug, siwsToken, notifyEmail) {
674
675
  return this.request("/v1/collection-slug-claims", {
675
676
  method: "POST",
676
677
  body: JSON.stringify({ contractAddress, slug, notifyEmail }),
677
- headers: this.bearer(clerkToken)
678
+ headers: this.bearer(siwsToken)
678
679
  });
679
680
  }
680
- /** Returns all slug claims submitted by the authenticated wallet. Requires Clerk JWT. */
681
- getMyCollectionSlugClaims(clerkToken) {
681
+ /** Returns all slug claims submitted by the authenticated wallet. Requires SIWS token. */
682
+ getMyCollectionSlugClaims(siwsToken) {
682
683
  return this.request("/v1/collection-slug-claims/me", {
683
684
  method: "GET",
684
- headers: this.bearer(clerkToken)
685
+ headers: this.bearer(siwsToken)
685
686
  });
686
687
  }
687
688
  /** Resolve a collection slug to a full collection. Returns null if not found. */
@@ -694,19 +695,14 @@ var ApiClient = class {
694
695
  }
695
696
  // ─── User Wallet ─────────────────────────────────────────────────────────────
696
697
  /**
697
- * Upsert the authenticated user's wallet address in the backend DB.
698
- * Call after onboarding when ChipiPay confirms the wallet address.
699
- * Requires Clerk JWT; no tenant API key needed.
700
- */
701
- /**
702
- * Frictionless wallet registration. Tenant API key only (no Clerk JWT required).
698
+ * Frictionless wallet registration. Tenant API key only (no SIWS token required).
703
699
  * Idempotent — backend's ensureAccountForWallet upserts and upgrades existing
704
700
  * UNKNOWN walletType rows when a more specific value is supplied.
705
701
  */
706
702
  async registerUser(params) {
707
703
  return this.post("/v1/users/register", params);
708
704
  }
709
- async upsertMyWallet(clerkToken, options = {}) {
705
+ async upsertMyWallet(siwsToken, options = {}) {
710
706
  const body = {
711
707
  walletType: options.walletType ?? "UNKNOWN",
712
708
  appSource: options.appSource ?? "MEDIALANE_SDK"
@@ -714,10 +710,11 @@ var ApiClient = class {
714
710
  if (options.chain) body.chain = options.chain;
715
711
  if (options.emailVerificationToken) body.emailVerificationToken = options.emailVerificationToken;
716
712
  if (options.email) body.email = options.email;
713
+ if (options.accountToken) body.accountToken = options.accountToken;
717
714
  return this.request("/v1/users/me", {
718
715
  method: "POST",
719
716
  body: JSON.stringify(body),
720
- headers: this.bearer(clerkToken)
717
+ headers: this.bearer(siwsToken)
721
718
  });
722
719
  }
723
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. */
@@ -730,12 +727,12 @@ var ApiClient = class {
730
727
  /**
731
728
  * Get the authenticated user's stored wallet address from the backend DB.
732
729
  * Returns null if the user has not completed onboarding yet.
733
- * Requires Clerk JWT; no tenant API key needed.
730
+ * Requires SIWS token; no tenant API key needed.
734
731
  */
735
- getMyWallet(clerkToken) {
732
+ getMyWallet(siwsToken) {
736
733
  return this.request(
737
734
  "/v1/users/me",
738
- { method: "GET", headers: this.bearer(clerkToken) },
735
+ { method: "GET", headers: this.bearer(siwsToken) },
739
736
  { allow404: true }
740
737
  );
741
738
  }
@@ -753,87 +750,87 @@ var ApiClient = class {
753
750
  );
754
751
  }
755
752
  /**
756
- * Submit a custom remix offer for a token. Requires Clerk JWT.
753
+ * Submit a custom remix offer for a token. Requires SIWS token.
757
754
  */
758
- submitRemixOffer(params, clerkToken) {
755
+ submitRemixOffer(params, siwsToken) {
759
756
  return this.request("/v1/remix-offers", {
760
757
  method: "POST",
761
758
  body: JSON.stringify(params),
762
- headers: { "Authorization": `Bearer ${clerkToken}` }
759
+ headers: { "Authorization": `Bearer ${siwsToken}` }
763
760
  });
764
761
  }
765
762
  /**
766
- * Submit an auto remix offer for a token with an open license. Requires Clerk JWT.
763
+ * Submit an auto remix offer for a token with an open license. Requires SIWS token.
767
764
  */
768
- submitAutoRemixOffer(params, clerkToken) {
765
+ submitAutoRemixOffer(params, siwsToken) {
769
766
  return this.request("/v1/remix-offers/auto", {
770
767
  method: "POST",
771
768
  body: JSON.stringify(params),
772
- headers: { "Authorization": `Bearer ${clerkToken}` }
769
+ headers: { "Authorization": `Bearer ${siwsToken}` }
773
770
  });
774
771
  }
775
772
  /**
776
- * Record a self-remix (owner remixing their own token). Requires Clerk JWT.
773
+ * Record a self-remix (owner remixing their own token). Requires SIWS token.
777
774
  */
778
- confirmSelfRemix(params, clerkToken) {
775
+ confirmSelfRemix(params, siwsToken) {
779
776
  return this.request("/v1/remix-offers/self/confirm", {
780
777
  method: "POST",
781
778
  body: JSON.stringify(params),
782
- headers: { "Authorization": `Bearer ${clerkToken}` }
779
+ headers: { "Authorization": `Bearer ${siwsToken}` }
783
780
  });
784
781
  }
785
782
  /**
786
- * List remix offers by role. Requires Clerk JWT.
783
+ * List remix offers by role. Requires SIWS token.
787
784
  * role="creator" — offers where you are the original creator.
788
785
  * role="requester" — offers you made.
789
786
  */
790
- getRemixOffers(query, clerkToken) {
787
+ getRemixOffers(query, siwsToken) {
791
788
  const params = new URLSearchParams({ role: query.role });
792
789
  if (query.page !== void 0) params.set("page", String(query.page));
793
790
  if (query.limit !== void 0) params.set("limit", String(query.limit));
794
791
  return this.request(`/v1/remix-offers?${params}`, {
795
792
  method: "GET",
796
- headers: this.bearer(clerkToken)
793
+ headers: this.bearer(siwsToken)
797
794
  });
798
795
  }
799
796
  /**
800
- * Get a single remix offer. Clerk JWT optional (price/currency hidden for non-participants).
797
+ * Get a single remix offer. SIWS token optional (price/currency hidden for non-participants).
801
798
  */
802
- getRemixOffer(id, clerkToken) {
799
+ getRemixOffer(id, siwsToken) {
803
800
  return this.request(`/v1/remix-offers/${id}`, {
804
801
  method: "GET",
805
- headers: clerkToken ? this.bearer(clerkToken) : void 0
802
+ headers: siwsToken ? this.bearer(siwsToken) : void 0
806
803
  });
807
804
  }
808
805
  /**
809
- * Creator approves a remix offer (authorises the requester to mint). Requires Clerk JWT.
806
+ * Creator approves a remix offer (authorises the requester to mint). Requires SIWS token.
810
807
  */
811
- confirmRemixOffer(id, params, clerkToken) {
808
+ confirmRemixOffer(id, params, siwsToken) {
812
809
  return this.request(`/v1/remix-offers/${id}/confirm`, {
813
810
  method: "POST",
814
811
  body: JSON.stringify(params),
815
- headers: { "Authorization": `Bearer ${clerkToken}` }
812
+ headers: { "Authorization": `Bearer ${siwsToken}` }
816
813
  });
817
814
  }
818
815
  /**
819
- * Creator rejects a remix offer. Requires Clerk JWT.
816
+ * Creator rejects a remix offer. Requires SIWS token.
820
817
  */
821
- rejectRemixOffer(id, clerkToken) {
818
+ rejectRemixOffer(id, siwsToken) {
822
819
  return this.request(`/v1/remix-offers/${id}/reject`, {
823
820
  method: "POST",
824
821
  body: JSON.stringify({}),
825
- headers: { "Authorization": `Bearer ${clerkToken}` }
822
+ headers: { "Authorization": `Bearer ${siwsToken}` }
826
823
  });
827
824
  }
828
825
  /**
829
826
  * Requester extends the expiry of a pending remix offer by 1–30 days.
830
- * Requires Clerk JWT.
827
+ * Requires SIWS token.
831
828
  */
832
- extendRemixOffer(id, days, clerkToken) {
829
+ extendRemixOffer(id, days, siwsToken) {
833
830
  return this.request(`/v1/remix-offers/${id}/extend`, {
834
831
  method: "POST",
835
832
  body: JSON.stringify({ days }),
836
- headers: { "Authorization": `Bearer ${clerkToken}` }
833
+ headers: { "Authorization": `Bearer ${siwsToken}` }
837
834
  });
838
835
  }
839
836
  // ─── POP Protocol ──────────────────────────────────────────────────────────
@@ -871,7 +868,7 @@ var ApiClient = class {
871
868
  /**
872
869
  * Creator-authed coin profile edit (image/description). Backend authorizes
873
870
  * via `coin.creator` (trustless — from the factory event), not a body param;
874
- * `siwsToken` is the caller's SIWS/Clerk bearer token for `identityAuth`.
871
+ * `siwsToken` is the caller's SIWS bearer token for `identityAuth`.
875
872
  */
876
873
  updateCoinProfile(contract, data, siwsToken) {
877
874
  return this.request(`/v1/coins/${this.addr(contract)}`, {