@medialane/sdk 0.4.8 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -212,10 +212,10 @@ interface ApiCollectionsQuery {
212
212
  sort?: CollectionSort;
213
213
  owner?: string;
214
214
  }
215
- type OrderStatus = "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
215
+ type OrderStatus = "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED" | "COUNTER_OFFERED";
216
216
  type SortOrder = "price_asc" | "price_desc" | "recent";
217
217
  type ActivityType = "transfer" | "sale" | "listing" | "offer" | "cancelled";
218
- type IntentType = "CREATE_LISTING" | "MAKE_OFFER" | "FULFILL_ORDER" | "CANCEL_ORDER" | "MINT" | "CREATE_COLLECTION";
218
+ type IntentType = "CREATE_LISTING" | "MAKE_OFFER" | "FULFILL_ORDER" | "CANCEL_ORDER" | "MINT" | "CREATE_COLLECTION" | "COUNTER_OFFER";
219
219
  type IntentStatus = "PENDING" | "SIGNED" | "SUBMITTED" | "CONFIRMED" | "FAILED" | "EXPIRED";
220
220
  type WebhookEventType = "ORDER_CREATED" | "ORDER_FULFILLED" | "ORDER_CANCELLED" | "TRANSFER";
221
221
  type WebhookStatus = "ACTIVE" | "DISABLED";
@@ -287,6 +287,10 @@ interface ApiOrder {
287
287
  updatedAt: string;
288
288
  /** Embedded token metadata (name/image/description). Null when not yet indexed. */
289
289
  token: ApiOrderTokenMeta | null;
290
+ /** Set when this is a counter-offer listing — points to the original buyer bid. */
291
+ parentOrderHash?: string | null;
292
+ /** Optional seller message accompanying a counter-offer. */
293
+ counterOfferMessage?: string | null;
290
294
  }
291
295
  /**
292
296
  * A single OpenSea-compatible ERC-721 attribute.
@@ -453,6 +457,10 @@ interface ApiIntent {
453
457
  signature: string[];
454
458
  txHash: string | null;
455
459
  orderHash: string | null;
460
+ /** Set on COUNTER_OFFER intents — the original bid order hash being countered. */
461
+ parentOrderHash?: string | null;
462
+ /** Optional seller message on counter-offer intents. */
463
+ counterOfferMessage?: string | null;
456
464
  expiresAt: string;
457
465
  createdAt: string;
458
466
  updatedAt: string;
@@ -511,6 +519,101 @@ interface CreateCollectionIntentParams {
511
519
  /** Optional: override the default collection contract address */
512
520
  collectionContract?: string;
513
521
  }
522
+ interface CreateCounterOfferIntentParams {
523
+ /** Wallet address of the NFT owner making the counter-offer. */
524
+ sellerAddress: string;
525
+ /** Order hash of the original buyer bid being countered. */
526
+ originalOrderHash: string;
527
+ /** Counter price as a raw wei integer string (not human-readable). */
528
+ counterPrice: string;
529
+ /** Duration in seconds the counter-offer will be valid (3600–2592000). */
530
+ durationSeconds: number;
531
+ /** Optional message from the seller to the buyer. Max 500 chars. */
532
+ message?: string;
533
+ }
534
+ interface ApiCounterOffersQuery {
535
+ /** Original bid order hash — returns the counter-offer for this specific bid. */
536
+ originalOrderHash?: string;
537
+ /** Seller address — returns all counter-offers sent by this seller. */
538
+ sellerAddress?: string;
539
+ page?: number;
540
+ limit?: number;
541
+ }
542
+ declare const OPEN_LICENSES: readonly ["CC0", "CC BY", "CC BY-SA", "CC BY-NC"];
543
+ type OpenLicense = (typeof OPEN_LICENSES)[number];
544
+ type RemixOfferStatus = "PENDING" | "AUTO_PENDING" | "APPROVED" | "COMPLETED" | "REJECTED" | "EXPIRED" | "SELF_MINTED";
545
+ interface ApiRemixOffer {
546
+ id: string;
547
+ status: RemixOfferStatus;
548
+ originalContract: string;
549
+ originalTokenId: string;
550
+ creatorAddress: string;
551
+ requesterAddress: string | null;
552
+ message?: string | null;
553
+ /** Visible only to creator and requester */
554
+ proposedPrice?: string;
555
+ /** Visible only to creator and requester */
556
+ proposedCurrency?: string;
557
+ licenseType: string;
558
+ commercial: boolean;
559
+ derivatives: boolean;
560
+ royaltyPct: number | null;
561
+ approvedCollection: string | null;
562
+ remixContract: string | null;
563
+ remixTokenId: string | null;
564
+ orderHash: string | null;
565
+ createdAt: string;
566
+ expiresAt: string;
567
+ updatedAt: string;
568
+ }
569
+ /** Public remix record — price/currency omitted for non-participants */
570
+ interface ApiPublicRemix {
571
+ id: string;
572
+ remixContract: string | null;
573
+ remixTokenId: string | null;
574
+ licenseType: string;
575
+ commercial: boolean;
576
+ derivatives: boolean;
577
+ createdAt: string;
578
+ }
579
+ interface CreateRemixOfferParams {
580
+ originalContract: string;
581
+ originalTokenId: string;
582
+ licenseType: string;
583
+ commercial: boolean;
584
+ derivatives: boolean;
585
+ royaltyPct?: number;
586
+ proposedPrice?: string;
587
+ proposedCurrency?: string;
588
+ message?: string;
589
+ }
590
+ interface AutoRemixOfferParams {
591
+ originalContract: string;
592
+ originalTokenId: string;
593
+ licenseType: string;
594
+ }
595
+ interface ConfirmSelfRemixParams {
596
+ originalContract: string;
597
+ originalTokenId: string;
598
+ remixContract: string;
599
+ remixTokenId: string;
600
+ licenseType: string;
601
+ commercial: boolean;
602
+ derivatives: boolean;
603
+ royaltyPct?: number;
604
+ }
605
+ interface ConfirmRemixOfferParams {
606
+ approvedCollection: string;
607
+ remixContract: string;
608
+ remixTokenId: string;
609
+ orderHash?: string;
610
+ }
611
+ interface ApiRemixOffersQuery {
612
+ /** "creator" = offers where you are the original creator; "requester" = offers you made */
613
+ role: "creator" | "requester";
614
+ page?: number;
615
+ limit?: number;
616
+ }
514
617
  interface ApiMetadataSignedUrl {
515
618
  url: string;
516
619
  }
@@ -658,6 +761,16 @@ declare class ApiClient {
658
761
  submitIntentSignature(id: string, signature: string[]): Promise<ApiResponse<ApiIntent>>;
659
762
  createMintIntent(params: CreateMintIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
660
763
  createCollectionIntent(params: CreateCollectionIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
764
+ /**
765
+ * Create a counter-offer intent. Requires seller Clerk JWT for auth.
766
+ * The seller proposes a new price in response to a buyer's active bid.
767
+ */
768
+ createCounterOfferIntent(params: CreateCounterOfferIntentParams, clerkToken: string): Promise<ApiResponse<ApiIntentCreated>>;
769
+ /**
770
+ * Fetch counter-offers. Pass `originalOrderHash` (buyer view) or
771
+ * `sellerAddress` (seller view) — at least one is required.
772
+ */
773
+ getCounterOffers(query: ApiCounterOffersQuery): Promise<ApiResponse<ApiOrder[]>>;
661
774
  getMetadataSignedUrl(): Promise<ApiResponse<ApiMetadataSignedUrl>>;
662
775
  uploadMetadata(metadata: Record<string, unknown>): Promise<ApiResponse<ApiMetadataUpload>>;
663
776
  resolveMetadata(uri: string): Promise<ApiResponse<unknown>>;
@@ -726,6 +839,43 @@ declare class ApiClient {
726
839
  * Requires Clerk JWT; no tenant API key needed.
727
840
  */
728
841
  getMyWallet(clerkToken: string): Promise<ApiUserWallet | null>;
842
+ /**
843
+ * Get public remixes of a token (open to everyone).
844
+ */
845
+ getTokenRemixes(contract: string, tokenId: string, opts?: {
846
+ page?: number;
847
+ limit?: number;
848
+ }): Promise<ApiResponse<ApiPublicRemix[]>>;
849
+ /**
850
+ * Submit a custom remix offer for a token. Requires Clerk JWT.
851
+ */
852
+ submitRemixOffer(params: CreateRemixOfferParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
853
+ /**
854
+ * Submit an auto remix offer for a token with an open license. Requires Clerk JWT.
855
+ */
856
+ submitAutoRemixOffer(params: AutoRemixOfferParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
857
+ /**
858
+ * Record a self-remix (owner remixing their own token). Requires Clerk JWT.
859
+ */
860
+ confirmSelfRemix(params: ConfirmSelfRemixParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
861
+ /**
862
+ * List remix offers by role. Requires Clerk JWT.
863
+ * role="creator" — offers where you are the original creator.
864
+ * role="requester" — offers you made.
865
+ */
866
+ getRemixOffers(query: ApiRemixOffersQuery, clerkToken: string): Promise<ApiResponse<ApiRemixOffer[]>>;
867
+ /**
868
+ * Get a single remix offer. Clerk JWT optional (price/currency hidden for non-participants).
869
+ */
870
+ getRemixOffer(id: string, clerkToken?: string): Promise<ApiResponse<ApiRemixOffer>>;
871
+ /**
872
+ * Creator approves a remix offer (authorises the requester to mint). Requires Clerk JWT.
873
+ */
874
+ confirmRemixOffer(id: string, params: ConfirmRemixOfferParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
875
+ /**
876
+ * Creator rejects a remix offer. Requires Clerk JWT.
877
+ */
878
+ rejectRemixOffer(id: string, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
729
879
  }
730
880
 
731
881
  declare class MedialaneClient {
@@ -1173,4 +1323,4 @@ declare function buildFulfillmentTypedData(message: Record<string, unknown>, cha
1173
1323
  */
1174
1324
  declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
1175
1325
 
1176
- export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, type OfferItem, type Order, type OrderParameters, type OrderStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
1326
+ export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.d.ts CHANGED
@@ -212,10 +212,10 @@ interface ApiCollectionsQuery {
212
212
  sort?: CollectionSort;
213
213
  owner?: string;
214
214
  }
215
- type OrderStatus = "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
215
+ type OrderStatus = "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED" | "COUNTER_OFFERED";
216
216
  type SortOrder = "price_asc" | "price_desc" | "recent";
217
217
  type ActivityType = "transfer" | "sale" | "listing" | "offer" | "cancelled";
218
- type IntentType = "CREATE_LISTING" | "MAKE_OFFER" | "FULFILL_ORDER" | "CANCEL_ORDER" | "MINT" | "CREATE_COLLECTION";
218
+ type IntentType = "CREATE_LISTING" | "MAKE_OFFER" | "FULFILL_ORDER" | "CANCEL_ORDER" | "MINT" | "CREATE_COLLECTION" | "COUNTER_OFFER";
219
219
  type IntentStatus = "PENDING" | "SIGNED" | "SUBMITTED" | "CONFIRMED" | "FAILED" | "EXPIRED";
220
220
  type WebhookEventType = "ORDER_CREATED" | "ORDER_FULFILLED" | "ORDER_CANCELLED" | "TRANSFER";
221
221
  type WebhookStatus = "ACTIVE" | "DISABLED";
@@ -287,6 +287,10 @@ interface ApiOrder {
287
287
  updatedAt: string;
288
288
  /** Embedded token metadata (name/image/description). Null when not yet indexed. */
289
289
  token: ApiOrderTokenMeta | null;
290
+ /** Set when this is a counter-offer listing — points to the original buyer bid. */
291
+ parentOrderHash?: string | null;
292
+ /** Optional seller message accompanying a counter-offer. */
293
+ counterOfferMessage?: string | null;
290
294
  }
291
295
  /**
292
296
  * A single OpenSea-compatible ERC-721 attribute.
@@ -453,6 +457,10 @@ interface ApiIntent {
453
457
  signature: string[];
454
458
  txHash: string | null;
455
459
  orderHash: string | null;
460
+ /** Set on COUNTER_OFFER intents — the original bid order hash being countered. */
461
+ parentOrderHash?: string | null;
462
+ /** Optional seller message on counter-offer intents. */
463
+ counterOfferMessage?: string | null;
456
464
  expiresAt: string;
457
465
  createdAt: string;
458
466
  updatedAt: string;
@@ -511,6 +519,101 @@ interface CreateCollectionIntentParams {
511
519
  /** Optional: override the default collection contract address */
512
520
  collectionContract?: string;
513
521
  }
522
+ interface CreateCounterOfferIntentParams {
523
+ /** Wallet address of the NFT owner making the counter-offer. */
524
+ sellerAddress: string;
525
+ /** Order hash of the original buyer bid being countered. */
526
+ originalOrderHash: string;
527
+ /** Counter price as a raw wei integer string (not human-readable). */
528
+ counterPrice: string;
529
+ /** Duration in seconds the counter-offer will be valid (3600–2592000). */
530
+ durationSeconds: number;
531
+ /** Optional message from the seller to the buyer. Max 500 chars. */
532
+ message?: string;
533
+ }
534
+ interface ApiCounterOffersQuery {
535
+ /** Original bid order hash — returns the counter-offer for this specific bid. */
536
+ originalOrderHash?: string;
537
+ /** Seller address — returns all counter-offers sent by this seller. */
538
+ sellerAddress?: string;
539
+ page?: number;
540
+ limit?: number;
541
+ }
542
+ declare const OPEN_LICENSES: readonly ["CC0", "CC BY", "CC BY-SA", "CC BY-NC"];
543
+ type OpenLicense = (typeof OPEN_LICENSES)[number];
544
+ type RemixOfferStatus = "PENDING" | "AUTO_PENDING" | "APPROVED" | "COMPLETED" | "REJECTED" | "EXPIRED" | "SELF_MINTED";
545
+ interface ApiRemixOffer {
546
+ id: string;
547
+ status: RemixOfferStatus;
548
+ originalContract: string;
549
+ originalTokenId: string;
550
+ creatorAddress: string;
551
+ requesterAddress: string | null;
552
+ message?: string | null;
553
+ /** Visible only to creator and requester */
554
+ proposedPrice?: string;
555
+ /** Visible only to creator and requester */
556
+ proposedCurrency?: string;
557
+ licenseType: string;
558
+ commercial: boolean;
559
+ derivatives: boolean;
560
+ royaltyPct: number | null;
561
+ approvedCollection: string | null;
562
+ remixContract: string | null;
563
+ remixTokenId: string | null;
564
+ orderHash: string | null;
565
+ createdAt: string;
566
+ expiresAt: string;
567
+ updatedAt: string;
568
+ }
569
+ /** Public remix record — price/currency omitted for non-participants */
570
+ interface ApiPublicRemix {
571
+ id: string;
572
+ remixContract: string | null;
573
+ remixTokenId: string | null;
574
+ licenseType: string;
575
+ commercial: boolean;
576
+ derivatives: boolean;
577
+ createdAt: string;
578
+ }
579
+ interface CreateRemixOfferParams {
580
+ originalContract: string;
581
+ originalTokenId: string;
582
+ licenseType: string;
583
+ commercial: boolean;
584
+ derivatives: boolean;
585
+ royaltyPct?: number;
586
+ proposedPrice?: string;
587
+ proposedCurrency?: string;
588
+ message?: string;
589
+ }
590
+ interface AutoRemixOfferParams {
591
+ originalContract: string;
592
+ originalTokenId: string;
593
+ licenseType: string;
594
+ }
595
+ interface ConfirmSelfRemixParams {
596
+ originalContract: string;
597
+ originalTokenId: string;
598
+ remixContract: string;
599
+ remixTokenId: string;
600
+ licenseType: string;
601
+ commercial: boolean;
602
+ derivatives: boolean;
603
+ royaltyPct?: number;
604
+ }
605
+ interface ConfirmRemixOfferParams {
606
+ approvedCollection: string;
607
+ remixContract: string;
608
+ remixTokenId: string;
609
+ orderHash?: string;
610
+ }
611
+ interface ApiRemixOffersQuery {
612
+ /** "creator" = offers where you are the original creator; "requester" = offers you made */
613
+ role: "creator" | "requester";
614
+ page?: number;
615
+ limit?: number;
616
+ }
514
617
  interface ApiMetadataSignedUrl {
515
618
  url: string;
516
619
  }
@@ -658,6 +761,16 @@ declare class ApiClient {
658
761
  submitIntentSignature(id: string, signature: string[]): Promise<ApiResponse<ApiIntent>>;
659
762
  createMintIntent(params: CreateMintIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
660
763
  createCollectionIntent(params: CreateCollectionIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
764
+ /**
765
+ * Create a counter-offer intent. Requires seller Clerk JWT for auth.
766
+ * The seller proposes a new price in response to a buyer's active bid.
767
+ */
768
+ createCounterOfferIntent(params: CreateCounterOfferIntentParams, clerkToken: string): Promise<ApiResponse<ApiIntentCreated>>;
769
+ /**
770
+ * Fetch counter-offers. Pass `originalOrderHash` (buyer view) or
771
+ * `sellerAddress` (seller view) — at least one is required.
772
+ */
773
+ getCounterOffers(query: ApiCounterOffersQuery): Promise<ApiResponse<ApiOrder[]>>;
661
774
  getMetadataSignedUrl(): Promise<ApiResponse<ApiMetadataSignedUrl>>;
662
775
  uploadMetadata(metadata: Record<string, unknown>): Promise<ApiResponse<ApiMetadataUpload>>;
663
776
  resolveMetadata(uri: string): Promise<ApiResponse<unknown>>;
@@ -726,6 +839,43 @@ declare class ApiClient {
726
839
  * Requires Clerk JWT; no tenant API key needed.
727
840
  */
728
841
  getMyWallet(clerkToken: string): Promise<ApiUserWallet | null>;
842
+ /**
843
+ * Get public remixes of a token (open to everyone).
844
+ */
845
+ getTokenRemixes(contract: string, tokenId: string, opts?: {
846
+ page?: number;
847
+ limit?: number;
848
+ }): Promise<ApiResponse<ApiPublicRemix[]>>;
849
+ /**
850
+ * Submit a custom remix offer for a token. Requires Clerk JWT.
851
+ */
852
+ submitRemixOffer(params: CreateRemixOfferParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
853
+ /**
854
+ * Submit an auto remix offer for a token with an open license. Requires Clerk JWT.
855
+ */
856
+ submitAutoRemixOffer(params: AutoRemixOfferParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
857
+ /**
858
+ * Record a self-remix (owner remixing their own token). Requires Clerk JWT.
859
+ */
860
+ confirmSelfRemix(params: ConfirmSelfRemixParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
861
+ /**
862
+ * List remix offers by role. Requires Clerk JWT.
863
+ * role="creator" — offers where you are the original creator.
864
+ * role="requester" — offers you made.
865
+ */
866
+ getRemixOffers(query: ApiRemixOffersQuery, clerkToken: string): Promise<ApiResponse<ApiRemixOffer[]>>;
867
+ /**
868
+ * Get a single remix offer. Clerk JWT optional (price/currency hidden for non-participants).
869
+ */
870
+ getRemixOffer(id: string, clerkToken?: string): Promise<ApiResponse<ApiRemixOffer>>;
871
+ /**
872
+ * Creator approves a remix offer (authorises the requester to mint). Requires Clerk JWT.
873
+ */
874
+ confirmRemixOffer(id: string, params: ConfirmRemixOfferParams, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
875
+ /**
876
+ * Creator rejects a remix offer. Requires Clerk JWT.
877
+ */
878
+ rejectRemixOffer(id: string, clerkToken: string): Promise<ApiResponse<ApiRemixOffer>>;
729
879
  }
730
880
 
731
881
  declare class MedialaneClient {
@@ -1173,4 +1323,4 @@ declare function buildFulfillmentTypedData(message: Record<string, unknown>, cha
1173
1323
  */
1174
1324
  declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
1175
1325
 
1176
- export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, type OfferItem, type Order, type OrderParameters, type OrderStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
1326
+ export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.js CHANGED
@@ -1145,6 +1145,29 @@ var ApiClient = class {
1145
1145
  createCollectionIntent(params) {
1146
1146
  return this.post("/v1/intents/create-collection", params);
1147
1147
  }
1148
+ /**
1149
+ * Create a counter-offer intent. Requires seller Clerk JWT for auth.
1150
+ * The seller proposes a new price in response to a buyer's active bid.
1151
+ */
1152
+ createCounterOfferIntent(params, clerkToken) {
1153
+ return this.request("/v1/intents/counter-offer", {
1154
+ method: "POST",
1155
+ body: JSON.stringify(params),
1156
+ headers: { "Authorization": `Bearer ${clerkToken}` }
1157
+ });
1158
+ }
1159
+ /**
1160
+ * Fetch counter-offers. Pass `originalOrderHash` (buyer view) or
1161
+ * `sellerAddress` (seller view) — at least one is required.
1162
+ */
1163
+ getCounterOffers(query) {
1164
+ const params = new URLSearchParams();
1165
+ if (query.originalOrderHash) params.set("originalOrderHash", query.originalOrderHash);
1166
+ if (query.sellerAddress) params.set("sellerAddress", query.sellerAddress);
1167
+ if (query.page !== void 0) params.set("page", String(query.page));
1168
+ if (query.limit !== void 0) params.set("limit", String(query.limit));
1169
+ return this.get(`/v1/orders/counter-offers?${params}`);
1170
+ }
1148
1171
  // ─── Metadata ──────────────────────────────────────────────────────────────
1149
1172
  getMetadataSignedUrl() {
1150
1173
  return this.get("/v1/metadata/signed-url");
@@ -1311,6 +1334,94 @@ var ApiClient = class {
1311
1334
  if (res.status === 404) return null;
1312
1335
  return res.json();
1313
1336
  }
1337
+ // ─── Remix Licensing ─────────────────────────────────────────────────────────
1338
+ /**
1339
+ * Get public remixes of a token (open to everyone).
1340
+ */
1341
+ getTokenRemixes(contract, tokenId, opts = {}) {
1342
+ const params = new URLSearchParams();
1343
+ if (opts.page !== void 0) params.set("page", String(opts.page));
1344
+ if (opts.limit !== void 0) params.set("limit", String(opts.limit));
1345
+ const qs = params.toString();
1346
+ return this.get(
1347
+ `/v1/tokens/${normalizeAddress(contract)}/${tokenId}/remixes${qs ? `?${qs}` : ""}`
1348
+ );
1349
+ }
1350
+ /**
1351
+ * Submit a custom remix offer for a token. Requires Clerk JWT.
1352
+ */
1353
+ submitRemixOffer(params, clerkToken) {
1354
+ return this.request("/v1/remix-offers", {
1355
+ method: "POST",
1356
+ body: JSON.stringify(params),
1357
+ headers: { "Authorization": `Bearer ${clerkToken}` }
1358
+ });
1359
+ }
1360
+ /**
1361
+ * Submit an auto remix offer for a token with an open license. Requires Clerk JWT.
1362
+ */
1363
+ submitAutoRemixOffer(params, clerkToken) {
1364
+ return this.request("/v1/remix-offers/auto", {
1365
+ method: "POST",
1366
+ body: JSON.stringify(params),
1367
+ headers: { "Authorization": `Bearer ${clerkToken}` }
1368
+ });
1369
+ }
1370
+ /**
1371
+ * Record a self-remix (owner remixing their own token). Requires Clerk JWT.
1372
+ */
1373
+ confirmSelfRemix(params, clerkToken) {
1374
+ return this.request("/v1/remix-offers/self/confirm", {
1375
+ method: "POST",
1376
+ body: JSON.stringify(params),
1377
+ headers: { "Authorization": `Bearer ${clerkToken}` }
1378
+ });
1379
+ }
1380
+ /**
1381
+ * List remix offers by role. Requires Clerk JWT.
1382
+ * role="creator" — offers where you are the original creator.
1383
+ * role="requester" — offers you made.
1384
+ */
1385
+ async getRemixOffers(query, clerkToken) {
1386
+ const params = new URLSearchParams({ role: query.role });
1387
+ if (query.page !== void 0) params.set("page", String(query.page));
1388
+ if (query.limit !== void 0) params.set("limit", String(query.limit));
1389
+ const url = `${this.baseUrl.replace(/\/$/, "")}/v1/remix-offers?${params}`;
1390
+ const res = await fetch(url, {
1391
+ headers: { ...this.baseHeaders, "Authorization": `Bearer ${clerkToken}` }
1392
+ });
1393
+ return res.json();
1394
+ }
1395
+ /**
1396
+ * Get a single remix offer. Clerk JWT optional (price/currency hidden for non-participants).
1397
+ */
1398
+ async getRemixOffer(id, clerkToken) {
1399
+ const url = `${this.baseUrl.replace(/\/$/, "")}/v1/remix-offers/${id}`;
1400
+ const headers = { ...this.baseHeaders };
1401
+ if (clerkToken) headers["Authorization"] = `Bearer ${clerkToken}`;
1402
+ const res = await fetch(url, { headers });
1403
+ return res.json();
1404
+ }
1405
+ /**
1406
+ * Creator approves a remix offer (authorises the requester to mint). Requires Clerk JWT.
1407
+ */
1408
+ confirmRemixOffer(id, params, clerkToken) {
1409
+ return this.request(`/v1/remix-offers/${id}/confirm`, {
1410
+ method: "POST",
1411
+ body: JSON.stringify(params),
1412
+ headers: { "Authorization": `Bearer ${clerkToken}` }
1413
+ });
1414
+ }
1415
+ /**
1416
+ * Creator rejects a remix offer. Requires Clerk JWT.
1417
+ */
1418
+ rejectRemixOffer(id, clerkToken) {
1419
+ return this.request(`/v1/remix-offers/${id}/reject`, {
1420
+ method: "POST",
1421
+ body: JSON.stringify({}),
1422
+ headers: { "Authorization": `Bearer ${clerkToken}` }
1423
+ });
1424
+ }
1314
1425
  };
1315
1426
 
1316
1427
  // src/client.ts
@@ -1343,6 +1454,9 @@ var MedialaneClient = class {
1343
1454
  }
1344
1455
  };
1345
1456
 
1346
- export { ApiClient, COLLECTION_CONTRACT_MAINNET, DEFAULT_RPC_URLS, IPMarketplaceABI, MARKETPLACE_CONTRACT_MAINNET, MarketplaceModule, MedialaneApiError, MedialaneClient, MedialaneError, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
1457
+ // src/types/api.ts
1458
+ var OPEN_LICENSES = ["CC0", "CC BY", "CC BY-SA", "CC BY-NC"];
1459
+
1460
+ export { ApiClient, COLLECTION_CONTRACT_MAINNET, DEFAULT_RPC_URLS, IPMarketplaceABI, MARKETPLACE_CONTRACT_MAINNET, MarketplaceModule, MedialaneApiError, MedialaneClient, MedialaneError, OPEN_LICENSES, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
1347
1461
  //# sourceMappingURL=index.js.map
1348
1462
  //# sourceMappingURL=index.js.map