@medialane/sdk 0.16.0 → 0.18.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
@@ -4996,8 +4996,9 @@ declare const IPNftABI: readonly [{
4996
4996
  }];
4997
4997
  }];
4998
4998
 
4999
- /** Lookup. Returns undefined for external/unknown (service: null) — callers
5000
- * fall back to standard-based generic UI (01-core-model §I). */
4999
+ /** Lookup. Returns undefined for unregistered service IDs — callers should
5000
+ * treat that as a data error, since every Collection.service value is
5001
+ * expected to map to a registered ServiceDefinition. */
5001
5002
  declare function getService(id: string | null | undefined): ServiceDefinition | undefined;
5002
5003
  /** All registered services (e.g. the launchpad grid). */
5003
5004
  declare function listServices(): ServiceDefinition[];
@@ -5064,34 +5065,20 @@ declare function encodeByteArray(str: string): string[];
5064
5065
 
5065
5066
  /**
5066
5067
  * Build SNIP-12 typed data for signing an OrderParameters struct.
5067
- * Uses TypedDataRevision.ACTIVE and ContractAddress / shortstring SNIP-12 types.
5068
+ * The shape is identical across ERC-721 and ERC-1155 (nested OfferItem +
5069
+ * ConsiderationItem) — only the domain version differs.
5068
5070
  */
5069
5071
  declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5070
- /**
5071
- * Build SNIP-12 typed data for signing an OrderFulfillment struct.
5072
- */
5073
- declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5074
- /**
5075
- * Build SNIP-12 typed data for signing an OrderCancellation struct.
5076
- */
5077
- declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5078
-
5079
- /**
5080
- * Build SNIP-12 typed data for signing an ERC-1155 OrderParameters struct.
5081
- *
5082
- * Uses the ERC-1155 V2 marketplace shape:
5083
- * - Domain name is "Medialane"
5084
- * - Domain version is "2"
5085
- * - OrderParameters contains nested OfferItem and ConsiderationItem structs
5086
- */
5087
5072
  declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5088
5073
  /**
5089
- * Build SNIP-12 typed data for signing an ERC-1155 OrderFulfillment struct.
5074
+ * Build SNIP-12 typed data for an OrderFulfillment struct.
5075
+ * ERC-1155 adds a `quantity` field so the contract can verify the partial-fill
5076
+ * amount; ERC-721 omits it (always single-fill).
5090
5077
  */
5078
+ declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5091
5079
  declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5092
- /**
5093
- * Build SNIP-12 typed data for signing an ERC-1155 OrderCancellation struct.
5094
- */
5080
+ /** OrderCancellation typed data — identical shape across both standards. */
5081
+ declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5095
5082
  declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5096
5083
 
5097
5084
  export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, 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 ApiWalletType, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintItemParams, type BuildFeeCallParams, COLLECTION_1155_CLASS_HASH_MAINNET, COLLECTION_1155_CONTRACT_MAINNET, COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET, COLLECTION_1155_START_BLOCK_MAINNET, COLLECTION_721_CONTRACT_MAINNET, COLLECTION_721_START_BLOCK_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type ClaimConditions, CollectionRegistryABI, type CollectionSort, 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, type EnforcementDeclaration, type FeeConfig, FeeConfigSchema, type FeeSurface, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPCOLLECTION_CLASS_HASH_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPMarketplaceABI, IPNFT_CLASS_HASH_MAINNET, IPNftABI, 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, type MakeOffer1155Params, 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 OrderDetails, 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 ResolvedFeeConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type ServiceCapability, type ServiceDefinition, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFeeCall, buildFulfillmentTypedData, buildOrderTypedData, encodeByteArray, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, listServices, normalizeAddress, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.d.ts CHANGED
@@ -4996,8 +4996,9 @@ declare const IPNftABI: readonly [{
4996
4996
  }];
4997
4997
  }];
4998
4998
 
4999
- /** Lookup. Returns undefined for external/unknown (service: null) — callers
5000
- * fall back to standard-based generic UI (01-core-model §I). */
4999
+ /** Lookup. Returns undefined for unregistered service IDs — callers should
5000
+ * treat that as a data error, since every Collection.service value is
5001
+ * expected to map to a registered ServiceDefinition. */
5001
5002
  declare function getService(id: string | null | undefined): ServiceDefinition | undefined;
5002
5003
  /** All registered services (e.g. the launchpad grid). */
5003
5004
  declare function listServices(): ServiceDefinition[];
@@ -5064,34 +5065,20 @@ declare function encodeByteArray(str: string): string[];
5064
5065
 
5065
5066
  /**
5066
5067
  * Build SNIP-12 typed data for signing an OrderParameters struct.
5067
- * Uses TypedDataRevision.ACTIVE and ContractAddress / shortstring SNIP-12 types.
5068
+ * The shape is identical across ERC-721 and ERC-1155 (nested OfferItem +
5069
+ * ConsiderationItem) — only the domain version differs.
5068
5070
  */
5069
5071
  declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5070
- /**
5071
- * Build SNIP-12 typed data for signing an OrderFulfillment struct.
5072
- */
5073
- declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5074
- /**
5075
- * Build SNIP-12 typed data for signing an OrderCancellation struct.
5076
- */
5077
- declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5078
-
5079
- /**
5080
- * Build SNIP-12 typed data for signing an ERC-1155 OrderParameters struct.
5081
- *
5082
- * Uses the ERC-1155 V2 marketplace shape:
5083
- * - Domain name is "Medialane"
5084
- * - Domain version is "2"
5085
- * - OrderParameters contains nested OfferItem and ConsiderationItem structs
5086
- */
5087
5072
  declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5088
5073
  /**
5089
- * Build SNIP-12 typed data for signing an ERC-1155 OrderFulfillment struct.
5074
+ * Build SNIP-12 typed data for an OrderFulfillment struct.
5075
+ * ERC-1155 adds a `quantity` field so the contract can verify the partial-fill
5076
+ * amount; ERC-721 omits it (always single-fill).
5090
5077
  */
5078
+ declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5091
5079
  declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5092
- /**
5093
- * Build SNIP-12 typed data for signing an ERC-1155 OrderCancellation struct.
5094
- */
5080
+ /** OrderCancellation typed data — identical shape across both standards. */
5081
+ declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5095
5082
  declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5096
5083
 
5097
5084
  export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, 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 ApiWalletType, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintItemParams, type BuildFeeCallParams, COLLECTION_1155_CLASS_HASH_MAINNET, COLLECTION_1155_CONTRACT_MAINNET, COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET, COLLECTION_1155_START_BLOCK_MAINNET, COLLECTION_721_CONTRACT_MAINNET, COLLECTION_721_START_BLOCK_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type ClaimConditions, CollectionRegistryABI, type CollectionSort, 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, type EnforcementDeclaration, type FeeConfig, FeeConfigSchema, type FeeSurface, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPCOLLECTION_CLASS_HASH_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPMarketplaceABI, IPNFT_CLASS_HASH_MAINNET, IPNftABI, 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, type MakeOffer1155Params, 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 OrderDetails, 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 ResolvedFeeConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type ServiceCapability, type ServiceDefinition, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, build1155CancellationTypedData, build1155FulfillmentTypedData, build1155OrderTypedData, buildCancellationTypedData, buildFeeCall, buildFulfillmentTypedData, buildOrderTypedData, encodeByteArray, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, listServices, normalizeAddress, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { cairo, TypedDataRevision, num, Contract, shortString, constants, RpcProvider } from 'starknet';
2
+ import { cairo, num, Contract, TypedDataRevision, shortString, constants, RpcProvider } from 'starknet';
3
3
 
4
4
  // src/config.ts
5
5
 
@@ -126,69 +126,104 @@ function resolveConfig(raw) {
126
126
  feeConfig: resolveFeeConfig(parsed.feeConfig)
127
127
  };
128
128
  }
129
+ var STARKNET_DOMAIN = [
130
+ { name: "name", type: "shortstring" },
131
+ { name: "version", type: "shortstring" },
132
+ { name: "chainId", type: "shortstring" },
133
+ { name: "revision", type: "shortstring" }
134
+ ];
135
+ var OFFER_ITEM = [
136
+ { name: "item_type", type: "shortstring" },
137
+ { name: "token", type: "ContractAddress" },
138
+ { name: "identifier_or_criteria", type: "felt" },
139
+ { name: "start_amount", type: "felt" },
140
+ { name: "end_amount", type: "felt" }
141
+ ];
142
+ var CONSIDERATION_ITEM = [
143
+ { name: "item_type", type: "shortstring" },
144
+ { name: "token", type: "ContractAddress" },
145
+ { name: "identifier_or_criteria", type: "felt" },
146
+ { name: "start_amount", type: "felt" },
147
+ { name: "end_amount", type: "felt" },
148
+ { name: "recipient", type: "ContractAddress" }
149
+ ];
150
+ var ORDER_PARAMETERS = [
151
+ { name: "offerer", type: "ContractAddress" },
152
+ { name: "offer", type: "OfferItem" },
153
+ { name: "consideration", type: "ConsiderationItem" },
154
+ { name: "start_time", type: "felt" },
155
+ { name: "end_time", type: "felt" },
156
+ { name: "salt", type: "felt" },
157
+ { name: "nonce", type: "felt" }
158
+ ];
159
+ var ORDER_CANCELLATION = [
160
+ { name: "order_hash", type: "felt" },
161
+ { name: "offerer", type: "ContractAddress" },
162
+ { name: "nonce", type: "felt" }
163
+ ];
164
+ var DOMAIN_VERSION = {
165
+ erc721: "1",
166
+ erc1155: "2"
167
+ };
168
+ function buildDomain(standard, chainId) {
169
+ return {
170
+ name: "Medialane",
171
+ version: DOMAIN_VERSION[standard],
172
+ chainId,
173
+ revision: TypedDataRevision.ACTIVE
174
+ };
175
+ }
129
176
  function buildOrderTypedData(message, chainId) {
130
177
  return {
131
- domain: {
132
- name: "Medialane",
133
- version: "1",
134
- chainId,
135
- revision: TypedDataRevision.ACTIVE
178
+ domain: buildDomain("erc721", chainId),
179
+ primaryType: "OrderParameters",
180
+ types: {
181
+ StarknetDomain: STARKNET_DOMAIN,
182
+ OrderParameters: ORDER_PARAMETERS,
183
+ OfferItem: OFFER_ITEM,
184
+ ConsiderationItem: CONSIDERATION_ITEM
136
185
  },
186
+ message
187
+ };
188
+ }
189
+ function build1155OrderTypedData(message, chainId) {
190
+ return {
191
+ domain: buildDomain("erc1155", chainId),
137
192
  primaryType: "OrderParameters",
138
193
  types: {
139
- StarknetDomain: [
140
- { name: "name", type: "shortstring" },
141
- { name: "version", type: "shortstring" },
142
- { name: "chainId", type: "shortstring" },
143
- { name: "revision", type: "shortstring" }
144
- ],
145
- OrderParameters: [
146
- { name: "offerer", type: "ContractAddress" },
147
- { name: "offer", type: "OfferItem" },
148
- { name: "consideration", type: "ConsiderationItem" },
149
- { name: "start_time", type: "felt" },
150
- { name: "end_time", type: "felt" },
151
- { name: "salt", type: "felt" },
152
- { name: "nonce", type: "felt" }
153
- ],
154
- OfferItem: [
155
- { name: "item_type", type: "shortstring" },
156
- { name: "token", type: "ContractAddress" },
157
- { name: "identifier_or_criteria", type: "felt" },
158
- { name: "start_amount", type: "felt" },
159
- { name: "end_amount", type: "felt" }
160
- ],
161
- ConsiderationItem: [
162
- { name: "item_type", type: "shortstring" },
163
- { name: "token", type: "ContractAddress" },
164
- { name: "identifier_or_criteria", type: "felt" },
165
- { name: "start_amount", type: "felt" },
166
- { name: "end_amount", type: "felt" },
167
- { name: "recipient", type: "ContractAddress" }
168
- ]
194
+ StarknetDomain: STARKNET_DOMAIN,
195
+ OrderParameters: ORDER_PARAMETERS,
196
+ OfferItem: OFFER_ITEM,
197
+ ConsiderationItem: CONSIDERATION_ITEM
169
198
  },
170
199
  message
171
200
  };
172
201
  }
173
202
  function buildFulfillmentTypedData(message, chainId) {
174
203
  return {
175
- domain: {
176
- name: "Medialane",
177
- version: "1",
178
- chainId,
179
- revision: TypedDataRevision.ACTIVE
204
+ domain: buildDomain("erc721", chainId),
205
+ primaryType: "OrderFulfillment",
206
+ types: {
207
+ StarknetDomain: STARKNET_DOMAIN,
208
+ OrderFulfillment: [
209
+ { name: "order_hash", type: "felt" },
210
+ { name: "fulfiller", type: "ContractAddress" },
211
+ { name: "nonce", type: "felt" }
212
+ ]
180
213
  },
214
+ message
215
+ };
216
+ }
217
+ function build1155FulfillmentTypedData(message, chainId) {
218
+ return {
219
+ domain: buildDomain("erc1155", chainId),
181
220
  primaryType: "OrderFulfillment",
182
221
  types: {
183
- StarknetDomain: [
184
- { name: "name", type: "shortstring" },
185
- { name: "version", type: "shortstring" },
186
- { name: "chainId", type: "shortstring" },
187
- { name: "revision", type: "shortstring" }
188
- ],
222
+ StarknetDomain: STARKNET_DOMAIN,
189
223
  OrderFulfillment: [
190
224
  { name: "order_hash", type: "felt" },
191
225
  { name: "fulfiller", type: "ContractAddress" },
226
+ { name: "quantity", type: "felt" },
192
227
  { name: "nonce", type: "felt" }
193
228
  ]
194
229
  },
@@ -197,25 +232,22 @@ function buildFulfillmentTypedData(message, chainId) {
197
232
  }
198
233
  function buildCancellationTypedData(message, chainId) {
199
234
  return {
200
- domain: {
201
- name: "Medialane",
202
- version: "1",
203
- chainId,
204
- revision: TypedDataRevision.ACTIVE
235
+ domain: buildDomain("erc721", chainId),
236
+ primaryType: "OrderCancellation",
237
+ types: {
238
+ StarknetDomain: STARKNET_DOMAIN,
239
+ OrderCancellation: ORDER_CANCELLATION
205
240
  },
241
+ message
242
+ };
243
+ }
244
+ function build1155CancellationTypedData(message, chainId) {
245
+ return {
246
+ domain: buildDomain("erc1155", chainId),
206
247
  primaryType: "OrderCancellation",
207
248
  types: {
208
- StarknetDomain: [
209
- { name: "name", type: "shortstring" },
210
- { name: "version", type: "shortstring" },
211
- { name: "chainId", type: "shortstring" },
212
- { name: "revision", type: "shortstring" }
213
- ],
214
- OrderCancellation: [
215
- { name: "order_hash", type: "felt" },
216
- { name: "offerer", type: "ContractAddress" },
217
- { name: "nonce", type: "felt" }
218
- ]
249
+ StarknetDomain: STARKNET_DOMAIN,
250
+ OrderCancellation: ORDER_CANCELLATION
219
251
  },
220
252
  message
221
253
  };
@@ -4921,85 +4953,6 @@ var MarketplaceModule = class {
4921
4953
  return buildCancellationTypedData(params, chainId);
4922
4954
  }
4923
4955
  };
4924
- var STARKNET_DOMAIN = [
4925
- { name: "name", type: "shortstring" },
4926
- { name: "version", type: "shortstring" },
4927
- { name: "chainId", type: "shortstring" },
4928
- { name: "revision", type: "shortstring" }
4929
- ];
4930
- function domain1155(chainId) {
4931
- return {
4932
- name: "Medialane",
4933
- version: "2",
4934
- chainId,
4935
- revision: TypedDataRevision.ACTIVE
4936
- };
4937
- }
4938
- function build1155OrderTypedData(message, chainId) {
4939
- return {
4940
- domain: domain1155(chainId),
4941
- primaryType: "OrderParameters",
4942
- types: {
4943
- StarknetDomain: STARKNET_DOMAIN,
4944
- OfferItem: [
4945
- { name: "item_type", type: "shortstring" },
4946
- { name: "token", type: "ContractAddress" },
4947
- { name: "identifier_or_criteria", type: "felt" },
4948
- { name: "start_amount", type: "felt" },
4949
- { name: "end_amount", type: "felt" }
4950
- ],
4951
- ConsiderationItem: [
4952
- { name: "item_type", type: "shortstring" },
4953
- { name: "token", type: "ContractAddress" },
4954
- { name: "identifier_or_criteria", type: "felt" },
4955
- { name: "start_amount", type: "felt" },
4956
- { name: "end_amount", type: "felt" },
4957
- { name: "recipient", type: "ContractAddress" }
4958
- ],
4959
- OrderParameters: [
4960
- { name: "offerer", type: "ContractAddress" },
4961
- { name: "offer", type: "OfferItem" },
4962
- { name: "consideration", type: "ConsiderationItem" },
4963
- { name: "start_time", type: "felt" },
4964
- { name: "end_time", type: "felt" },
4965
- { name: "salt", type: "felt" },
4966
- { name: "nonce", type: "felt" }
4967
- ]
4968
- },
4969
- message
4970
- };
4971
- }
4972
- function build1155FulfillmentTypedData(message, chainId) {
4973
- return {
4974
- domain: domain1155(chainId),
4975
- primaryType: "OrderFulfillment",
4976
- types: {
4977
- StarknetDomain: STARKNET_DOMAIN,
4978
- OrderFulfillment: [
4979
- { name: "order_hash", type: "felt" },
4980
- { name: "fulfiller", type: "ContractAddress" },
4981
- { name: "quantity", type: "felt" },
4982
- { name: "nonce", type: "felt" }
4983
- ]
4984
- },
4985
- message
4986
- };
4987
- }
4988
- function build1155CancellationTypedData(message, chainId) {
4989
- return {
4990
- domain: domain1155(chainId),
4991
- primaryType: "OrderCancellation",
4992
- types: {
4993
- StarknetDomain: STARKNET_DOMAIN,
4994
- OrderCancellation: [
4995
- { name: "order_hash", type: "felt" },
4996
- { name: "offerer", type: "ContractAddress" },
4997
- { name: "nonce", type: "felt" }
4998
- ]
4999
- },
5000
- message
5001
- };
5002
- }
5003
4956
  var _contractCache2 = /* @__PURE__ */ new WeakMap();
5004
4957
  function getContract(config) {
5005
4958
  let c = _contractCache2.get(config);
@@ -6379,6 +6332,24 @@ var SERVICES = {
6379
6332
  },
6380
6333
  uiVariant: "edition",
6381
6334
  capabilities: ["list", "buy", "make_offer", "cancel"]
6335
+ },
6336
+ "external-erc721": {
6337
+ id: "external-erc721",
6338
+ displayName: "External ERC-721",
6339
+ description: "ERC-721 contract not deployed via a Medialane service.",
6340
+ standard: "ERC721",
6341
+ provenance: "EXTERNAL",
6342
+ uiVariant: "standard",
6343
+ capabilities: ["list", "buy", "make_offer", "cancel", "transfer"]
6344
+ },
6345
+ "external-erc1155": {
6346
+ id: "external-erc1155",
6347
+ displayName: "External ERC-1155",
6348
+ description: "ERC-1155 contract not deployed via a Medialane service.",
6349
+ standard: "ERC1155",
6350
+ provenance: "EXTERNAL",
6351
+ uiVariant: "edition",
6352
+ capabilities: ["list", "buy", "make_offer", "cancel", "transfer"]
6382
6353
  }
6383
6354
  };
6384
6355
  function getService(id) {