@medialane/sdk 0.8.0 → 0.8.2

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,12 +1,33 @@
1
1
  import { z } from 'zod';
2
2
  import { AccountInterface, constants, TypedData } from 'starknet';
3
3
 
4
- declare const MARKETPLACE_CONTRACT_MAINNET = "0x0234f4e8838801ebf01d7f4166d42aed9a55bc67c1301162decf9e2040e05f16";
5
- /** Medialane1155 dedicated ERC-1155 marketplace. Deployed 2026-04-15. */
6
- declare const MARKETPLACE_1155_CONTRACT_MAINNET = "0x03aab04e806542cd88bfd0c5bb2a37334fd742d477a2e0f97af09aa4a36137ca";
4
+ /** Medialane Protocol ERC-721 marketplace — immutable, no admin key. */
5
+ declare const MARKETPLACE_721_CONTRACT_MAINNET = "0x00f8ccaae0bc811c79605974cc1dab769b9cea8877f033f8e3c17f30457caba6";
6
+ /** @deprecated Use MARKETPLACE_721_CONTRACT_MAINNET. */
7
+ declare const MARKETPLACE_CONTRACT_MAINNET = "0x00f8ccaae0bc811c79605974cc1dab769b9cea8877f033f8e3c17f30457caba6";
8
+ /** Class hash of the Medialane Protocol ERC-721 marketplace implementation. */
9
+ declare const MARKETPLACE_721_CLASS_HASH_MAINNET = "0x03dff4f34b976207246207954263be9a28b51390321702443291088dcdf4b2e6";
10
+ /** @deprecated Use MARKETPLACE_721_CLASS_HASH_MAINNET. */
11
+ declare const MARKETPLACE_CLASS_HASH_MAINNET = "0x03dff4f34b976207246207954263be9a28b51390321702443291088dcdf4b2e6";
12
+ /** First mainnet block for the current Medialane Protocol ERC-721 deployment. */
13
+ declare const MARKETPLACE_721_START_BLOCK_MAINNET = 9196722;
14
+ /** @deprecated Use MARKETPLACE_721_START_BLOCK_MAINNET. */
15
+ declare const MARKETPLACE_START_BLOCK_MAINNET = 9196722;
16
+ /** Medialane Protocol ERC-1155 marketplace — immutable, no admin key. */
17
+ declare const MARKETPLACE_1155_CONTRACT_MAINNET = "0x04a0a65bd13e1ec9a2ce92c36115578486331e941b395f97d49fe488baac8309";
18
+ /** Class hash of the Medialane Protocol ERC-1155 marketplace implementation. */
19
+ declare const MARKETPLACE_1155_CLASS_HASH_MAINNET = "0x03e1b84f1058dd5c9c766634e638d02756b59910080492983a5168c99856efd0";
20
+ /** First mainnet block for the current Medialane Protocol ERC-1155 deployment. */
21
+ declare const MARKETPLACE_1155_START_BLOCK_MAINNET = 9197091;
22
+ declare const COLLECTION_721_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
23
+ /** @deprecated Use COLLECTION_721_CONTRACT_MAINNET. */
7
24
  declare const COLLECTION_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
8
25
  declare const DROP_FACTORY_CONTRACT_MAINNET = "0x03587f42e29daee1b193f6cf83bf8627908ed6632d0d83fcb26225c50547d800";
9
26
  declare const POP_FACTORY_CONTRACT_MAINNET = "0x00b32c34b427d8f346b5843ada6a37bd3368d879fc752cd52b68a87287f60111";
27
+ /** NFTComments on-chain comment system — immutable, no admin key. */
28
+ declare const NFTCOMMENTS_CONTRACT_MAINNET = "0x024f97eb5abe659fb650bf162b5fc16501f8f3863a7369901ce6099462e62799";
29
+ /** Earliest block required to index the current mainnet protocol deployments. */
30
+ declare const INDEXER_START_BLOCK_MAINNET = 9196722;
10
31
  declare const SUPPORTED_TOKENS: readonly [{
11
32
  readonly symbol: "USDC";
12
33
  readonly address: "0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb";
@@ -40,8 +61,12 @@ declare const DEFAULT_RPC_URL = "https://rpc.starknet.lava.build";
40
61
  declare const POP_COLLECTION_CLASS_HASH_MAINNET = "0x077c421686f10851872561953ea16898d933364b7f8937a5d7e2b1ba0a36263f";
41
62
  declare const DROP_COLLECTION_CLASS_HASH_MAINNET = "0x00092e72cdb63067521e803aaf7d4101c3e3ce026ae6bc045ec4228027e58282";
42
63
  /** IP-Programmable-ERC1155-Collections factory. Redeployed 2026-04-16 (v2 — adds base_uri). */
64
+ declare const COLLECTION_1155_CONTRACT_MAINNET = "0x006b2dc7ca7c4f466bb4575ba043d934310f052074f849caf853a86bcb819fd6";
65
+ /** @deprecated Use COLLECTION_1155_CONTRACT_MAINNET. */
43
66
  declare const ERC1155_FACTORY_CONTRACT_MAINNET = "0x006b2dc7ca7c4f466bb4575ba043d934310f052074f849caf853a86bcb819fd6";
44
67
  /** Class hash of the IPCollection ERC-1155 implementation. Redeployed 2026-04-16 (v2). */
68
+ declare const COLLECTION_1155_CLASS_HASH_MAINNET = "0x39a85126c6627db263617e5bce2bb72e49d2bb1f20961efc8b8954665bcfd25";
69
+ /** @deprecated Use COLLECTION_1155_CLASS_HASH_MAINNET. */
45
70
  declare const ERC1155_COLLECTION_CLASS_HASH_MAINNET = "0x39a85126c6627db263617e5bce2bb72e49d2bb1f20961efc8b8954665bcfd25";
46
71
 
47
72
  interface RetryOptions {
@@ -55,9 +80,12 @@ declare const MedialaneConfigSchema: z.ZodObject<{
55
80
  rpcUrl: z.ZodOptional<z.ZodString>;
56
81
  backendUrl: z.ZodOptional<z.ZodString>;
57
82
  apiKey: z.ZodOptional<z.ZodString>;
83
+ marketplace721Contract: z.ZodOptional<z.ZodString>;
58
84
  marketplaceContract: z.ZodOptional<z.ZodString>;
59
85
  marketplace1155Contract: z.ZodOptional<z.ZodString>;
86
+ collection721Contract: z.ZodOptional<z.ZodString>;
60
87
  collectionContract: z.ZodOptional<z.ZodString>;
88
+ collection1155Contract: z.ZodOptional<z.ZodString>;
61
89
  retryOptions: z.ZodOptional<z.ZodObject<{
62
90
  maxAttempts: z.ZodOptional<z.ZodNumber>;
63
91
  baseDelayMs: z.ZodOptional<z.ZodNumber>;
@@ -76,9 +104,12 @@ declare const MedialaneConfigSchema: z.ZodObject<{
76
104
  rpcUrl?: string | undefined;
77
105
  backendUrl?: string | undefined;
78
106
  apiKey?: string | undefined;
107
+ marketplace721Contract?: string | undefined;
79
108
  marketplaceContract?: string | undefined;
80
109
  marketplace1155Contract?: string | undefined;
110
+ collection721Contract?: string | undefined;
81
111
  collectionContract?: string | undefined;
112
+ collection1155Contract?: string | undefined;
82
113
  retryOptions?: {
83
114
  maxAttempts?: number | undefined;
84
115
  baseDelayMs?: number | undefined;
@@ -89,9 +120,12 @@ declare const MedialaneConfigSchema: z.ZodObject<{
89
120
  rpcUrl?: string | undefined;
90
121
  backendUrl?: string | undefined;
91
122
  apiKey?: string | undefined;
123
+ marketplace721Contract?: string | undefined;
92
124
  marketplaceContract?: string | undefined;
93
125
  marketplace1155Contract?: string | undefined;
126
+ collection721Contract?: string | undefined;
94
127
  collectionContract?: string | undefined;
128
+ collection1155Contract?: string | undefined;
95
129
  retryOptions?: {
96
130
  maxAttempts?: number | undefined;
97
131
  baseDelayMs?: number | undefined;
@@ -104,9 +138,12 @@ interface ResolvedConfig {
104
138
  rpcUrl: string;
105
139
  backendUrl: string | undefined;
106
140
  apiKey: string | undefined;
141
+ marketplace721Contract: string;
107
142
  marketplaceContract: string;
108
143
  marketplace1155Contract: string;
144
+ collection721Contract: string;
109
145
  collectionContract: string;
146
+ collection1155Contract: string;
110
147
  retryOptions?: RetryOptions;
111
148
  }
112
149
  declare function resolveConfig(raw: MedialaneConfig): ResolvedConfig;
@@ -2989,7 +3026,7 @@ interface BatchMintItemParams {
2989
3026
  }
2990
3027
  declare class ERC1155CollectionService {
2991
3028
  private readonly factoryAddress;
2992
- constructor(_config: ResolvedConfig);
3029
+ constructor(config: ResolvedConfig);
2993
3030
  private _factory;
2994
3031
  private _collection;
2995
3032
  /**
@@ -3119,4 +3156,4 @@ declare function build1155FulfillmentTypedData(message: Record<string, unknown>,
3119
3156
  */
3120
3157
  declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
3121
3158
 
3122
- 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 ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintItemParams, COLLECTION_CONTRACT_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type ClaimConditions, CollectionRegistryABI, type CollectionSort, type CollectionSource, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateDropParams, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, type DropMintStatus, DropService, ERC1155CollectionService, ERC1155_COLLECTION_CLASS_HASH_MAINNET, ERC1155_FACTORY_CONTRACT_MAINNET, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPCollection1155ABI, IPCollection1155FactoryABI, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_1155_CONTRACT_MAINNET, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintItemParams, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, POPCollectionABI, POPFactoryABI, POP_COLLECTION_CLASS_HASH_MAINNET, POP_FACTORY_CONTRACT_MAINNET, type PopBatchEligibilityItem, type PopClaimStatus, type PopEventType, PopService, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
3159
+ 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 ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintItemParams, COLLECTION_1155_CLASS_HASH_MAINNET, COLLECTION_1155_CONTRACT_MAINNET, COLLECTION_721_CONTRACT_MAINNET, COLLECTION_CONTRACT_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type ClaimConditions, CollectionRegistryABI, type CollectionSort, type CollectionSource, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateDropParams, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, type DropMintStatus, DropService, ERC1155CollectionService, ERC1155_COLLECTION_CLASS_HASH_MAINNET, ERC1155_FACTORY_CONTRACT_MAINNET, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, INDEXER_START_BLOCK_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_1155_CLASS_HASH_MAINNET, MARKETPLACE_1155_CONTRACT_MAINNET, MARKETPLACE_1155_START_BLOCK_MAINNET, MARKETPLACE_721_CLASS_HASH_MAINNET, MARKETPLACE_721_CONTRACT_MAINNET, MARKETPLACE_721_START_BLOCK_MAINNET, MARKETPLACE_CLASS_HASH_MAINNET, MARKETPLACE_CONTRACT_MAINNET, MARKETPLACE_START_BLOCK_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintItemParams, type MintParams, NFTCOMMENTS_CONTRACT_MAINNET, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, POPCollectionABI, POPFactoryABI, POP_COLLECTION_CLASS_HASH_MAINNET, POP_FACTORY_CONTRACT_MAINNET, type PopBatchEligibilityItem, type PopClaimStatus, type PopEventType, PopService, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,33 @@
1
1
  import { z } from 'zod';
2
2
  import { AccountInterface, constants, TypedData } from 'starknet';
3
3
 
4
- declare const MARKETPLACE_CONTRACT_MAINNET = "0x0234f4e8838801ebf01d7f4166d42aed9a55bc67c1301162decf9e2040e05f16";
5
- /** Medialane1155 dedicated ERC-1155 marketplace. Deployed 2026-04-15. */
6
- declare const MARKETPLACE_1155_CONTRACT_MAINNET = "0x03aab04e806542cd88bfd0c5bb2a37334fd742d477a2e0f97af09aa4a36137ca";
4
+ /** Medialane Protocol ERC-721 marketplace — immutable, no admin key. */
5
+ declare const MARKETPLACE_721_CONTRACT_MAINNET = "0x00f8ccaae0bc811c79605974cc1dab769b9cea8877f033f8e3c17f30457caba6";
6
+ /** @deprecated Use MARKETPLACE_721_CONTRACT_MAINNET. */
7
+ declare const MARKETPLACE_CONTRACT_MAINNET = "0x00f8ccaae0bc811c79605974cc1dab769b9cea8877f033f8e3c17f30457caba6";
8
+ /** Class hash of the Medialane Protocol ERC-721 marketplace implementation. */
9
+ declare const MARKETPLACE_721_CLASS_HASH_MAINNET = "0x03dff4f34b976207246207954263be9a28b51390321702443291088dcdf4b2e6";
10
+ /** @deprecated Use MARKETPLACE_721_CLASS_HASH_MAINNET. */
11
+ declare const MARKETPLACE_CLASS_HASH_MAINNET = "0x03dff4f34b976207246207954263be9a28b51390321702443291088dcdf4b2e6";
12
+ /** First mainnet block for the current Medialane Protocol ERC-721 deployment. */
13
+ declare const MARKETPLACE_721_START_BLOCK_MAINNET = 9196722;
14
+ /** @deprecated Use MARKETPLACE_721_START_BLOCK_MAINNET. */
15
+ declare const MARKETPLACE_START_BLOCK_MAINNET = 9196722;
16
+ /** Medialane Protocol ERC-1155 marketplace — immutable, no admin key. */
17
+ declare const MARKETPLACE_1155_CONTRACT_MAINNET = "0x04a0a65bd13e1ec9a2ce92c36115578486331e941b395f97d49fe488baac8309";
18
+ /** Class hash of the Medialane Protocol ERC-1155 marketplace implementation. */
19
+ declare const MARKETPLACE_1155_CLASS_HASH_MAINNET = "0x03e1b84f1058dd5c9c766634e638d02756b59910080492983a5168c99856efd0";
20
+ /** First mainnet block for the current Medialane Protocol ERC-1155 deployment. */
21
+ declare const MARKETPLACE_1155_START_BLOCK_MAINNET = 9197091;
22
+ declare const COLLECTION_721_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
23
+ /** @deprecated Use COLLECTION_721_CONTRACT_MAINNET. */
7
24
  declare const COLLECTION_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
8
25
  declare const DROP_FACTORY_CONTRACT_MAINNET = "0x03587f42e29daee1b193f6cf83bf8627908ed6632d0d83fcb26225c50547d800";
9
26
  declare const POP_FACTORY_CONTRACT_MAINNET = "0x00b32c34b427d8f346b5843ada6a37bd3368d879fc752cd52b68a87287f60111";
27
+ /** NFTComments on-chain comment system — immutable, no admin key. */
28
+ declare const NFTCOMMENTS_CONTRACT_MAINNET = "0x024f97eb5abe659fb650bf162b5fc16501f8f3863a7369901ce6099462e62799";
29
+ /** Earliest block required to index the current mainnet protocol deployments. */
30
+ declare const INDEXER_START_BLOCK_MAINNET = 9196722;
10
31
  declare const SUPPORTED_TOKENS: readonly [{
11
32
  readonly symbol: "USDC";
12
33
  readonly address: "0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb";
@@ -40,8 +61,12 @@ declare const DEFAULT_RPC_URL = "https://rpc.starknet.lava.build";
40
61
  declare const POP_COLLECTION_CLASS_HASH_MAINNET = "0x077c421686f10851872561953ea16898d933364b7f8937a5d7e2b1ba0a36263f";
41
62
  declare const DROP_COLLECTION_CLASS_HASH_MAINNET = "0x00092e72cdb63067521e803aaf7d4101c3e3ce026ae6bc045ec4228027e58282";
42
63
  /** IP-Programmable-ERC1155-Collections factory. Redeployed 2026-04-16 (v2 — adds base_uri). */
64
+ declare const COLLECTION_1155_CONTRACT_MAINNET = "0x006b2dc7ca7c4f466bb4575ba043d934310f052074f849caf853a86bcb819fd6";
65
+ /** @deprecated Use COLLECTION_1155_CONTRACT_MAINNET. */
43
66
  declare const ERC1155_FACTORY_CONTRACT_MAINNET = "0x006b2dc7ca7c4f466bb4575ba043d934310f052074f849caf853a86bcb819fd6";
44
67
  /** Class hash of the IPCollection ERC-1155 implementation. Redeployed 2026-04-16 (v2). */
68
+ declare const COLLECTION_1155_CLASS_HASH_MAINNET = "0x39a85126c6627db263617e5bce2bb72e49d2bb1f20961efc8b8954665bcfd25";
69
+ /** @deprecated Use COLLECTION_1155_CLASS_HASH_MAINNET. */
45
70
  declare const ERC1155_COLLECTION_CLASS_HASH_MAINNET = "0x39a85126c6627db263617e5bce2bb72e49d2bb1f20961efc8b8954665bcfd25";
46
71
 
47
72
  interface RetryOptions {
@@ -55,9 +80,12 @@ declare const MedialaneConfigSchema: z.ZodObject<{
55
80
  rpcUrl: z.ZodOptional<z.ZodString>;
56
81
  backendUrl: z.ZodOptional<z.ZodString>;
57
82
  apiKey: z.ZodOptional<z.ZodString>;
83
+ marketplace721Contract: z.ZodOptional<z.ZodString>;
58
84
  marketplaceContract: z.ZodOptional<z.ZodString>;
59
85
  marketplace1155Contract: z.ZodOptional<z.ZodString>;
86
+ collection721Contract: z.ZodOptional<z.ZodString>;
60
87
  collectionContract: z.ZodOptional<z.ZodString>;
88
+ collection1155Contract: z.ZodOptional<z.ZodString>;
61
89
  retryOptions: z.ZodOptional<z.ZodObject<{
62
90
  maxAttempts: z.ZodOptional<z.ZodNumber>;
63
91
  baseDelayMs: z.ZodOptional<z.ZodNumber>;
@@ -76,9 +104,12 @@ declare const MedialaneConfigSchema: z.ZodObject<{
76
104
  rpcUrl?: string | undefined;
77
105
  backendUrl?: string | undefined;
78
106
  apiKey?: string | undefined;
107
+ marketplace721Contract?: string | undefined;
79
108
  marketplaceContract?: string | undefined;
80
109
  marketplace1155Contract?: string | undefined;
110
+ collection721Contract?: string | undefined;
81
111
  collectionContract?: string | undefined;
112
+ collection1155Contract?: string | undefined;
82
113
  retryOptions?: {
83
114
  maxAttempts?: number | undefined;
84
115
  baseDelayMs?: number | undefined;
@@ -89,9 +120,12 @@ declare const MedialaneConfigSchema: z.ZodObject<{
89
120
  rpcUrl?: string | undefined;
90
121
  backendUrl?: string | undefined;
91
122
  apiKey?: string | undefined;
123
+ marketplace721Contract?: string | undefined;
92
124
  marketplaceContract?: string | undefined;
93
125
  marketplace1155Contract?: string | undefined;
126
+ collection721Contract?: string | undefined;
94
127
  collectionContract?: string | undefined;
128
+ collection1155Contract?: string | undefined;
95
129
  retryOptions?: {
96
130
  maxAttempts?: number | undefined;
97
131
  baseDelayMs?: number | undefined;
@@ -104,9 +138,12 @@ interface ResolvedConfig {
104
138
  rpcUrl: string;
105
139
  backendUrl: string | undefined;
106
140
  apiKey: string | undefined;
141
+ marketplace721Contract: string;
107
142
  marketplaceContract: string;
108
143
  marketplace1155Contract: string;
144
+ collection721Contract: string;
109
145
  collectionContract: string;
146
+ collection1155Contract: string;
110
147
  retryOptions?: RetryOptions;
111
148
  }
112
149
  declare function resolveConfig(raw: MedialaneConfig): ResolvedConfig;
@@ -2989,7 +3026,7 @@ interface BatchMintItemParams {
2989
3026
  }
2990
3027
  declare class ERC1155CollectionService {
2991
3028
  private readonly factoryAddress;
2992
- constructor(_config: ResolvedConfig);
3029
+ constructor(config: ResolvedConfig);
2993
3030
  private _factory;
2994
3031
  private _collection;
2995
3032
  /**
@@ -3119,4 +3156,4 @@ declare function build1155FulfillmentTypedData(message: Record<string, unknown>,
3119
3156
  */
3120
3157
  declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
3121
3158
 
3122
- 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 ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintItemParams, COLLECTION_CONTRACT_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type ClaimConditions, CollectionRegistryABI, type CollectionSort, type CollectionSource, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateDropParams, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, type DropMintStatus, DropService, ERC1155CollectionService, ERC1155_COLLECTION_CLASS_HASH_MAINNET, ERC1155_FACTORY_CONTRACT_MAINNET, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPCollection1155ABI, IPCollection1155FactoryABI, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_1155_CONTRACT_MAINNET, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintItemParams, type MintParams, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, POPCollectionABI, POPFactoryABI, POP_COLLECTION_CLASS_HASH_MAINNET, POP_FACTORY_CONTRACT_MAINNET, type PopBatchEligibilityItem, type PopClaimStatus, type PopEventType, PopService, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
3159
+ 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 ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintItemParams, COLLECTION_1155_CLASS_HASH_MAINNET, COLLECTION_1155_CONTRACT_MAINNET, COLLECTION_721_CONTRACT_MAINNET, COLLECTION_CONTRACT_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type ClaimConditions, CollectionRegistryABI, type CollectionSort, type CollectionSource, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateDropParams, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, type DropMintStatus, DropService, ERC1155CollectionService, ERC1155_COLLECTION_CLASS_HASH_MAINNET, ERC1155_FACTORY_CONTRACT_MAINNET, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, INDEXER_START_BLOCK_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_1155_CLASS_HASH_MAINNET, MARKETPLACE_1155_CONTRACT_MAINNET, MARKETPLACE_1155_START_BLOCK_MAINNET, MARKETPLACE_721_CLASS_HASH_MAINNET, MARKETPLACE_721_CONTRACT_MAINNET, MARKETPLACE_721_START_BLOCK_MAINNET, MARKETPLACE_CLASS_HASH_MAINNET, MARKETPLACE_CONTRACT_MAINNET, MARKETPLACE_START_BLOCK_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintItemParams, type MintParams, NFTCOMMENTS_CONTRACT_MAINNET, type Network, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderParameters, type OrderStatus, POPCollectionABI, POPFactoryABI, POP_COLLECTION_CLASS_HASH_MAINNET, POP_FACTORY_CONTRACT_MAINNET, type PopBatchEligibilityItem, type PopClaimStatus, type PopEventType, PopService, type RemixOfferStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.js CHANGED
@@ -4,11 +4,21 @@ import { TypedDataRevision, Contract, shortString, cairo, constants, RpcProvider
4
4
  // src/config.ts
5
5
 
6
6
  // src/constants.ts
7
- var MARKETPLACE_CONTRACT_MAINNET = "0x0234f4e8838801ebf01d7f4166d42aed9a55bc67c1301162decf9e2040e05f16";
8
- var MARKETPLACE_1155_CONTRACT_MAINNET = "0x03aab04e806542cd88bfd0c5bb2a37334fd742d477a2e0f97af09aa4a36137ca";
9
- var COLLECTION_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
7
+ var MARKETPLACE_721_CONTRACT_MAINNET = "0x00f8ccaae0bc811c79605974cc1dab769b9cea8877f033f8e3c17f30457caba6";
8
+ var MARKETPLACE_CONTRACT_MAINNET = MARKETPLACE_721_CONTRACT_MAINNET;
9
+ var MARKETPLACE_721_CLASS_HASH_MAINNET = "0x03dff4f34b976207246207954263be9a28b51390321702443291088dcdf4b2e6";
10
+ var MARKETPLACE_CLASS_HASH_MAINNET = MARKETPLACE_721_CLASS_HASH_MAINNET;
11
+ var MARKETPLACE_721_START_BLOCK_MAINNET = 9196722;
12
+ var MARKETPLACE_START_BLOCK_MAINNET = MARKETPLACE_721_START_BLOCK_MAINNET;
13
+ var MARKETPLACE_1155_CONTRACT_MAINNET = "0x04a0a65bd13e1ec9a2ce92c36115578486331e941b395f97d49fe488baac8309";
14
+ var MARKETPLACE_1155_CLASS_HASH_MAINNET = "0x03e1b84f1058dd5c9c766634e638d02756b59910080492983a5168c99856efd0";
15
+ var MARKETPLACE_1155_START_BLOCK_MAINNET = 9197091;
16
+ var COLLECTION_721_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
17
+ var COLLECTION_CONTRACT_MAINNET = COLLECTION_721_CONTRACT_MAINNET;
10
18
  var DROP_FACTORY_CONTRACT_MAINNET = "0x03587f42e29daee1b193f6cf83bf8627908ed6632d0d83fcb26225c50547d800";
11
19
  var POP_FACTORY_CONTRACT_MAINNET = "0x00b32c34b427d8f346b5843ada6a37bd3368d879fc752cd52b68a87287f60111";
20
+ var NFTCOMMENTS_CONTRACT_MAINNET = "0x024f97eb5abe659fb650bf162b5fc16501f8f3863a7369901ce6099462e62799";
21
+ var INDEXER_START_BLOCK_MAINNET = MARKETPLACE_721_START_BLOCK_MAINNET;
12
22
  var SUPPORTED_TOKENS = [
13
23
  {
14
24
  // Circle-native USDC on Starknet (canonical)
@@ -47,8 +57,10 @@ var SUPPORTED_NETWORKS = ["mainnet"];
47
57
  var DEFAULT_RPC_URL = "https://rpc.starknet.lava.build";
48
58
  var POP_COLLECTION_CLASS_HASH_MAINNET = "0x077c421686f10851872561953ea16898d933364b7f8937a5d7e2b1ba0a36263f";
49
59
  var DROP_COLLECTION_CLASS_HASH_MAINNET = "0x00092e72cdb63067521e803aaf7d4101c3e3ce026ae6bc045ec4228027e58282";
50
- var ERC1155_FACTORY_CONTRACT_MAINNET = "0x006b2dc7ca7c4f466bb4575ba043d934310f052074f849caf853a86bcb819fd6";
51
- var ERC1155_COLLECTION_CLASS_HASH_MAINNET = "0x39a85126c6627db263617e5bce2bb72e49d2bb1f20961efc8b8954665bcfd25";
60
+ var COLLECTION_1155_CONTRACT_MAINNET = "0x006b2dc7ca7c4f466bb4575ba043d934310f052074f849caf853a86bcb819fd6";
61
+ var ERC1155_FACTORY_CONTRACT_MAINNET = COLLECTION_1155_CONTRACT_MAINNET;
62
+ var COLLECTION_1155_CLASS_HASH_MAINNET = "0x39a85126c6627db263617e5bce2bb72e49d2bb1f20961efc8b8954665bcfd25";
63
+ var ERC1155_COLLECTION_CLASS_HASH_MAINNET = COLLECTION_1155_CLASS_HASH_MAINNET;
52
64
 
53
65
  // src/config.ts
54
66
  var MedialaneConfigSchema = z.object({
@@ -56,9 +68,12 @@ var MedialaneConfigSchema = z.object({
56
68
  rpcUrl: z.string().url().optional(),
57
69
  backendUrl: z.string().url().optional(),
58
70
  apiKey: z.string().optional(),
71
+ marketplace721Contract: z.string().optional(),
59
72
  marketplaceContract: z.string().optional(),
60
73
  marketplace1155Contract: z.string().optional(),
74
+ collection721Contract: z.string().optional(),
61
75
  collectionContract: z.string().optional(),
76
+ collection1155Contract: z.string().optional(),
62
77
  retryOptions: z.object({
63
78
  maxAttempts: z.number().int().min(1).max(10).optional(),
64
79
  baseDelayMs: z.number().int().min(0).optional(),
@@ -67,14 +82,19 @@ var MedialaneConfigSchema = z.object({
67
82
  });
68
83
  function resolveConfig(raw) {
69
84
  const parsed = MedialaneConfigSchema.parse(raw);
85
+ const marketplace721Contract = parsed.marketplace721Contract ?? parsed.marketplaceContract ?? MARKETPLACE_721_CONTRACT_MAINNET;
86
+ const collection721Contract = parsed.collection721Contract ?? parsed.collectionContract ?? COLLECTION_721_CONTRACT_MAINNET;
70
87
  return {
71
88
  network: parsed.network,
72
89
  rpcUrl: parsed.rpcUrl ?? DEFAULT_RPC_URL,
73
90
  backendUrl: parsed.backendUrl,
74
91
  apiKey: parsed.apiKey,
75
- marketplaceContract: parsed.marketplaceContract ?? MARKETPLACE_CONTRACT_MAINNET,
92
+ marketplace721Contract,
93
+ marketplaceContract: marketplace721Contract,
76
94
  marketplace1155Contract: parsed.marketplace1155Contract ?? MARKETPLACE_1155_CONTRACT_MAINNET,
77
- collectionContract: parsed.collectionContract ?? COLLECTION_CONTRACT_MAINNET,
95
+ collection721Contract,
96
+ collectionContract: collection721Contract,
97
+ collection1155Contract: parsed.collection1155Contract ?? COLLECTION_1155_CONTRACT_MAINNET,
78
98
  retryOptions: parsed.retryOptions
79
99
  };
80
100
  }
@@ -3372,8 +3392,8 @@ var MedialaneClient = class {
3372
3392
  // src/types/api.ts
3373
3393
  var OPEN_LICENSES = ["CC0", "CC BY", "CC BY-SA", "CC BY-NC"];
3374
3394
  var ERC1155CollectionService = class {
3375
- constructor(_config) {
3376
- this.factoryAddress = ERC1155_FACTORY_CONTRACT_MAINNET;
3395
+ constructor(config) {
3396
+ this.factoryAddress = config.collection1155Contract ?? COLLECTION_1155_CONTRACT_MAINNET;
3377
3397
  }
3378
3398
  _factory(account) {
3379
3399
  return new Contract(
@@ -3479,6 +3499,6 @@ var ERC1155CollectionService = class {
3479
3499
  }
3480
3500
  };
3481
3501
 
3482
- export { ApiClient, COLLECTION_CONTRACT_MAINNET, CollectionRegistryABI, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, ERC1155_COLLECTION_CLASS_HASH_MAINNET, ERC1155_FACTORY_CONTRACT_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPMarketplaceABI, MARKETPLACE_1155_CONTRACT_MAINNET, MARKETPLACE_CONTRACT_MAINNET, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, MedialaneError, OPEN_LICENSES, POPCollectionABI, POPFactoryABI, POP_COLLECTION_CLASS_HASH_MAINNET, POP_FACTORY_CONTRACT_MAINNET, PopService, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
3502
+ export { ApiClient, COLLECTION_1155_CLASS_HASH_MAINNET, COLLECTION_1155_CONTRACT_MAINNET, COLLECTION_721_CONTRACT_MAINNET, COLLECTION_CONTRACT_MAINNET, CollectionRegistryABI, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, ERC1155_COLLECTION_CLASS_HASH_MAINNET, ERC1155_FACTORY_CONTRACT_MAINNET, INDEXER_START_BLOCK_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPMarketplaceABI, MARKETPLACE_1155_CLASS_HASH_MAINNET, MARKETPLACE_1155_CONTRACT_MAINNET, MARKETPLACE_1155_START_BLOCK_MAINNET, MARKETPLACE_721_CLASS_HASH_MAINNET, MARKETPLACE_721_CONTRACT_MAINNET, MARKETPLACE_721_START_BLOCK_MAINNET, MARKETPLACE_CLASS_HASH_MAINNET, MARKETPLACE_CONTRACT_MAINNET, MARKETPLACE_START_BLOCK_MAINNET, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, MedialaneError, NFTCOMMENTS_CONTRACT_MAINNET, OPEN_LICENSES, POPCollectionABI, POPFactoryABI, POP_COLLECTION_CLASS_HASH_MAINNET, POP_FACTORY_CONTRACT_MAINNET, PopService, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
3483
3503
  //# sourceMappingURL=index.js.map
3484
3504
  //# sourceMappingURL=index.js.map