@medialane/sdk 0.85.3 → 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/README.md +15 -15
- package/dist/index.cjs +56 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +56 -60
- package/dist/index.js.map +1 -1
- package/dist/{services-14BcGiDF.d.ts → services-CovenF1m.d.ts} +38 -41
- package/dist/{services-Yy1coqTe.d.cts → services-D8saJqJw.d.cts} +38 -41
- package/dist/starknet/index.cjs +56 -60
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +1 -1
- package/dist/starknet/index.d.ts +1 -1
- package/dist/starknet/index.js +56 -60
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as ServiceDefinition, a as ServiceCapability } from './services-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
335
|
-
bearer(
|
|
336
|
-
return { Authorization: `Bearer ${
|
|
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.
|
|
505
|
-
* via the tenant API key; pass a
|
|
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,
|
|
508
|
-
const extraHeaders =
|
|
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 (
|
|
577
|
+
* Authorization: Bearer (SIWS token) simultaneously.
|
|
577
578
|
*/
|
|
578
|
-
async claimCollection(contractAddress, walletAddress,
|
|
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(
|
|
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
|
|
611
|
+
* Update collection profile. Requires SIWS token for ownership check.
|
|
611
612
|
*/
|
|
612
|
-
updateCollectionProfile(contractAddress, data,
|
|
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(
|
|
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,
|
|
625
|
+
getGatedContent(contractAddress, siwsToken) {
|
|
625
626
|
return this.request(
|
|
626
627
|
`/v1/collections/${this.addr(contractAddress)}/gated-content`,
|
|
627
|
-
{ method: "GET", headers: this.bearer(
|
|
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
|
|
658
|
+
* Update creator profile. Requires SIWS token; wallet must match authenticated user.
|
|
658
659
|
*/
|
|
659
|
-
updateCreatorProfile(walletAddress, data,
|
|
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(
|
|
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
|
|
673
|
-
submitCollectionSlugClaim(contractAddress, slug,
|
|
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(
|
|
678
|
+
headers: this.bearer(siwsToken)
|
|
678
679
|
});
|
|
679
680
|
}
|
|
680
|
-
/** Returns all slug claims submitted by the authenticated wallet. Requires
|
|
681
|
-
getMyCollectionSlugClaims(
|
|
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(
|
|
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
|
-
*
|
|
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(
|
|
705
|
+
async upsertMyWallet(siwsToken, options = {}) {
|
|
710
706
|
const body = {
|
|
711
707
|
walletType: options.walletType ?? "UNKNOWN",
|
|
712
708
|
appSource: options.appSource ?? "MEDIALANE_SDK"
|
|
@@ -718,7 +714,7 @@ var ApiClient = class {
|
|
|
718
714
|
return this.request("/v1/users/me", {
|
|
719
715
|
method: "POST",
|
|
720
716
|
body: JSON.stringify(body),
|
|
721
|
-
headers: this.bearer(
|
|
717
|
+
headers: this.bearer(siwsToken)
|
|
722
718
|
});
|
|
723
719
|
}
|
|
724
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. */
|
|
@@ -731,12 +727,12 @@ var ApiClient = class {
|
|
|
731
727
|
/**
|
|
732
728
|
* Get the authenticated user's stored wallet address from the backend DB.
|
|
733
729
|
* Returns null if the user has not completed onboarding yet.
|
|
734
|
-
* Requires
|
|
730
|
+
* Requires SIWS token; no tenant API key needed.
|
|
735
731
|
*/
|
|
736
|
-
getMyWallet(
|
|
732
|
+
getMyWallet(siwsToken) {
|
|
737
733
|
return this.request(
|
|
738
734
|
"/v1/users/me",
|
|
739
|
-
{ method: "GET", headers: this.bearer(
|
|
735
|
+
{ method: "GET", headers: this.bearer(siwsToken) },
|
|
740
736
|
{ allow404: true }
|
|
741
737
|
);
|
|
742
738
|
}
|
|
@@ -754,87 +750,87 @@ var ApiClient = class {
|
|
|
754
750
|
);
|
|
755
751
|
}
|
|
756
752
|
/**
|
|
757
|
-
* Submit a custom remix offer for a token. Requires
|
|
753
|
+
* Submit a custom remix offer for a token. Requires SIWS token.
|
|
758
754
|
*/
|
|
759
|
-
submitRemixOffer(params,
|
|
755
|
+
submitRemixOffer(params, siwsToken) {
|
|
760
756
|
return this.request("/v1/remix-offers", {
|
|
761
757
|
method: "POST",
|
|
762
758
|
body: JSON.stringify(params),
|
|
763
|
-
headers: { "Authorization": `Bearer ${
|
|
759
|
+
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
764
760
|
});
|
|
765
761
|
}
|
|
766
762
|
/**
|
|
767
|
-
* Submit an auto remix offer for a token with an open license. Requires
|
|
763
|
+
* Submit an auto remix offer for a token with an open license. Requires SIWS token.
|
|
768
764
|
*/
|
|
769
|
-
submitAutoRemixOffer(params,
|
|
765
|
+
submitAutoRemixOffer(params, siwsToken) {
|
|
770
766
|
return this.request("/v1/remix-offers/auto", {
|
|
771
767
|
method: "POST",
|
|
772
768
|
body: JSON.stringify(params),
|
|
773
|
-
headers: { "Authorization": `Bearer ${
|
|
769
|
+
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
774
770
|
});
|
|
775
771
|
}
|
|
776
772
|
/**
|
|
777
|
-
* Record a self-remix (owner remixing their own token). Requires
|
|
773
|
+
* Record a self-remix (owner remixing their own token). Requires SIWS token.
|
|
778
774
|
*/
|
|
779
|
-
confirmSelfRemix(params,
|
|
775
|
+
confirmSelfRemix(params, siwsToken) {
|
|
780
776
|
return this.request("/v1/remix-offers/self/confirm", {
|
|
781
777
|
method: "POST",
|
|
782
778
|
body: JSON.stringify(params),
|
|
783
|
-
headers: { "Authorization": `Bearer ${
|
|
779
|
+
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
784
780
|
});
|
|
785
781
|
}
|
|
786
782
|
/**
|
|
787
|
-
* List remix offers by role. Requires
|
|
783
|
+
* List remix offers by role. Requires SIWS token.
|
|
788
784
|
* role="creator" — offers where you are the original creator.
|
|
789
785
|
* role="requester" — offers you made.
|
|
790
786
|
*/
|
|
791
|
-
getRemixOffers(query,
|
|
787
|
+
getRemixOffers(query, siwsToken) {
|
|
792
788
|
const params = new URLSearchParams({ role: query.role });
|
|
793
789
|
if (query.page !== void 0) params.set("page", String(query.page));
|
|
794
790
|
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
795
791
|
return this.request(`/v1/remix-offers?${params}`, {
|
|
796
792
|
method: "GET",
|
|
797
|
-
headers: this.bearer(
|
|
793
|
+
headers: this.bearer(siwsToken)
|
|
798
794
|
});
|
|
799
795
|
}
|
|
800
796
|
/**
|
|
801
|
-
* Get a single remix offer.
|
|
797
|
+
* Get a single remix offer. SIWS token optional (price/currency hidden for non-participants).
|
|
802
798
|
*/
|
|
803
|
-
getRemixOffer(id,
|
|
799
|
+
getRemixOffer(id, siwsToken) {
|
|
804
800
|
return this.request(`/v1/remix-offers/${id}`, {
|
|
805
801
|
method: "GET",
|
|
806
|
-
headers:
|
|
802
|
+
headers: siwsToken ? this.bearer(siwsToken) : void 0
|
|
807
803
|
});
|
|
808
804
|
}
|
|
809
805
|
/**
|
|
810
|
-
* Creator approves a remix offer (authorises the requester to mint). Requires
|
|
806
|
+
* Creator approves a remix offer (authorises the requester to mint). Requires SIWS token.
|
|
811
807
|
*/
|
|
812
|
-
confirmRemixOffer(id, params,
|
|
808
|
+
confirmRemixOffer(id, params, siwsToken) {
|
|
813
809
|
return this.request(`/v1/remix-offers/${id}/confirm`, {
|
|
814
810
|
method: "POST",
|
|
815
811
|
body: JSON.stringify(params),
|
|
816
|
-
headers: { "Authorization": `Bearer ${
|
|
812
|
+
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
817
813
|
});
|
|
818
814
|
}
|
|
819
815
|
/**
|
|
820
|
-
* Creator rejects a remix offer. Requires
|
|
816
|
+
* Creator rejects a remix offer. Requires SIWS token.
|
|
821
817
|
*/
|
|
822
|
-
rejectRemixOffer(id,
|
|
818
|
+
rejectRemixOffer(id, siwsToken) {
|
|
823
819
|
return this.request(`/v1/remix-offers/${id}/reject`, {
|
|
824
820
|
method: "POST",
|
|
825
821
|
body: JSON.stringify({}),
|
|
826
|
-
headers: { "Authorization": `Bearer ${
|
|
822
|
+
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
827
823
|
});
|
|
828
824
|
}
|
|
829
825
|
/**
|
|
830
826
|
* Requester extends the expiry of a pending remix offer by 1–30 days.
|
|
831
|
-
* Requires
|
|
827
|
+
* Requires SIWS token.
|
|
832
828
|
*/
|
|
833
|
-
extendRemixOffer(id, days,
|
|
829
|
+
extendRemixOffer(id, days, siwsToken) {
|
|
834
830
|
return this.request(`/v1/remix-offers/${id}/extend`, {
|
|
835
831
|
method: "POST",
|
|
836
832
|
body: JSON.stringify({ days }),
|
|
837
|
-
headers: { "Authorization": `Bearer ${
|
|
833
|
+
headers: { "Authorization": `Bearer ${siwsToken}` }
|
|
838
834
|
});
|
|
839
835
|
}
|
|
840
836
|
// ─── POP Protocol ──────────────────────────────────────────────────────────
|
|
@@ -872,7 +868,7 @@ var ApiClient = class {
|
|
|
872
868
|
/**
|
|
873
869
|
* Creator-authed coin profile edit (image/description). Backend authorizes
|
|
874
870
|
* via `coin.creator` (trustless — from the factory event), not a body param;
|
|
875
|
-
* `siwsToken` is the caller's SIWS
|
|
871
|
+
* `siwsToken` is the caller's SIWS bearer token for `identityAuth`.
|
|
876
872
|
*/
|
|
877
873
|
updateCoinProfile(contract, data, siwsToken) {
|
|
878
874
|
return this.request(`/v1/coins/${this.addr(contract)}`, {
|