@medialane/sdk 0.20.0 → 0.22.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
@@ -426,6 +426,37 @@ interface EnforcementDeclaration {
426
426
  timeLock?: boolean;
427
427
  revocable?: boolean;
428
428
  }
429
+ /** An on-chain event the service emits. The indexer consumes this list to
430
+ * decide what to poll and how to parse — the year-2 "data-driven event
431
+ * parser registry" foundation (02-protocol-app-split §V).
432
+ *
433
+ * The Cairo selector is derivable from `name` via
434
+ * `starknet.hash.getSelectorFromName(name)` — not stored to avoid
435
+ * duplication and keep the SDK runtime-free of pre-computed hashes.
436
+ */
437
+ interface ServiceEventDeclaration {
438
+ /** Cairo event struct name (e.g. "OrderCreated", "CollectionCreated"). */
439
+ name: string;
440
+ /**
441
+ * Where this event is emitted:
442
+ * - "factory": at the service's `onchain.factoryAddress` (fixed address).
443
+ * Examples: marketplace OrderCreated, factory CollectionCreated.
444
+ * - "instance": at the address of each deployed collection contract
445
+ * (variable; the indexer iterates discovered instances).
446
+ * Examples: ERC-721 Transfer, POP AllowlistUpdated.
447
+ */
448
+ emittedBy: "factory" | "instance";
449
+ /**
450
+ * Polling cadence the indexer should use:
451
+ * - "fast" (default): every indexer tick (~6s). Right for low-volume
452
+ * protocol events like order/factory events.
453
+ * - "slow": a separate slower loop (~2min). Right for
454
+ * high-volume per-instance events like Transfer
455
+ * and AllowlistUpdated — polling them every tick
456
+ * against every known instance is RPC-expensive.
457
+ */
458
+ poll?: "fast" | "slow";
459
+ }
429
460
  /** Declarative description of a service (05-service-model §II).
430
461
  * SDK-resident in v1; on-chain registry in year 2. */
431
462
  interface ServiceDefinition {
@@ -443,6 +474,12 @@ interface ServiceDefinition {
443
474
  /** Drives the dapp asset/collection page variant. */
444
475
  uiVariant: string;
445
476
  capabilities: ServiceCapability[];
477
+ /** Events the indexer should poll + parse for this service.
478
+ * Optional during the year-1 transition — backend hand-coded pollers
479
+ * (medialane-backend/src/mirror/poller.ts) take precedence today.
480
+ * Populated here so consumers and the future data-driven indexer can
481
+ * read what events a service emits without code-spelunking. */
482
+ events?: ServiceEventDeclaration[];
446
483
  metadataSchema?: {
447
484
  requiredTraits?: string[];
448
485
  /** Canonical platform default is "CC BY-SA" (04-licensing-model §III). */
@@ -536,10 +573,21 @@ interface ApiOrder {
536
573
  updatedAt: string;
537
574
  /** Embedded token metadata (name/image/description). Null when not yet indexed. */
538
575
  token: ApiOrderTokenMeta | null;
539
- /** Set when this is a counter-offer listing — points to the original buyer bid. */
576
+ /** Set when this is a counter-offer listing — points to the original buyer bid.
577
+ * Now always emitted by the backend (was conditional); kept optional in the
578
+ * type for back-compat with older response shapes. */
540
579
  parentOrderHash?: string | null;
541
580
  /** Optional seller message accompanying a counter-offer. */
542
581
  counterOfferMessage?: string | null;
582
+ /** True when this order is a bid (ERC-20 offer) AND at least one ACTIVE counter
583
+ * exists with `parentOrderHash = this.orderHash`. Set by endpoints that compute
584
+ * it (currently `GET /v1/orders/user/:address` and `GET /v1/orders/:orderHash`);
585
+ * undefined on endpoints that don't.
586
+ *
587
+ * Use this instead of `status === "COUNTER_OFFERED"` for "this bid has been
588
+ * countered" affordances. The status pattern is being phased out per
589
+ * 01-core-model §V — counter-offers are linked orders, not a lifecycle state. */
590
+ hasActiveCounterOffer?: boolean;
543
591
  }
544
592
  /**
545
593
  * A single OpenSea-compatible ERC-721 attribute.
@@ -5031,6 +5079,10 @@ declare const SERVICES: {
5031
5079
  };
5032
5080
  readonly uiVariant: "standard";
5033
5081
  readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
5082
+ readonly events: [{
5083
+ readonly name: "CollectionCreated";
5084
+ readonly emittedBy: "factory";
5085
+ }];
5034
5086
  readonly metadataSchema: {
5035
5087
  readonly licenseDefault: "CC BY-SA";
5036
5088
  };
@@ -5060,6 +5112,10 @@ declare const SERVICES: {
5060
5112
  };
5061
5113
  readonly uiVariant: "edition";
5062
5114
  readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
5115
+ readonly events: [{
5116
+ readonly name: "CollectionDeployed";
5117
+ readonly emittedBy: "factory";
5118
+ }];
5063
5119
  readonly metadataSchema: {
5064
5120
  readonly licenseDefault: "CC BY-SA";
5065
5121
  };
@@ -5076,6 +5132,14 @@ declare const SERVICES: {
5076
5132
  };
5077
5133
  readonly uiVariant: "pop";
5078
5134
  readonly capabilities: ["claim", "transfer"];
5135
+ readonly events: [{
5136
+ readonly name: "CollectionCreated";
5137
+ readonly emittedBy: "factory";
5138
+ }, {
5139
+ readonly name: "AllowlistUpdated";
5140
+ readonly emittedBy: "instance";
5141
+ readonly poll: "slow";
5142
+ }];
5079
5143
  readonly metadataSchema: {
5080
5144
  readonly licenseDefault: "CC BY-SA";
5081
5145
  };
@@ -5092,6 +5156,14 @@ declare const SERVICES: {
5092
5156
  };
5093
5157
  readonly uiVariant: "drop";
5094
5158
  readonly capabilities: ["claim", "list", "buy", "make_offer", "cancel", "transfer"];
5159
+ readonly events: [{
5160
+ readonly name: "DropCreated";
5161
+ readonly emittedBy: "factory";
5162
+ }, {
5163
+ readonly name: "AllowlistUpdated";
5164
+ readonly emittedBy: "instance";
5165
+ readonly poll: "slow";
5166
+ }];
5095
5167
  readonly metadataSchema: {
5096
5168
  readonly licenseDefault: "CC BY-SA";
5097
5169
  };
@@ -5109,6 +5181,16 @@ declare const SERVICES: {
5109
5181
  };
5110
5182
  readonly uiVariant: "standard";
5111
5183
  readonly capabilities: ["list", "buy", "make_offer", "cancel"];
5184
+ readonly events: [{
5185
+ readonly name: "OrderCreated";
5186
+ readonly emittedBy: "factory";
5187
+ }, {
5188
+ readonly name: "OrderFulfilled";
5189
+ readonly emittedBy: "factory";
5190
+ }, {
5191
+ readonly name: "OrderCancelled";
5192
+ readonly emittedBy: "factory";
5193
+ }];
5112
5194
  };
5113
5195
  readonly "medialane-marketplace-erc1155": {
5114
5196
  readonly id: "medialane-marketplace-erc1155";
@@ -5123,6 +5205,16 @@ declare const SERVICES: {
5123
5205
  };
5124
5206
  readonly uiVariant: "edition";
5125
5207
  readonly capabilities: ["list", "buy", "make_offer", "cancel"];
5208
+ readonly events: [{
5209
+ readonly name: "OrderCreated";
5210
+ readonly emittedBy: "factory";
5211
+ }, {
5212
+ readonly name: "OrderFulfilled";
5213
+ readonly emittedBy: "factory";
5214
+ }, {
5215
+ readonly name: "OrderCancelled";
5216
+ readonly emittedBy: "factory";
5217
+ }];
5126
5218
  };
5127
5219
  readonly "external-erc721": {
5128
5220
  readonly id: "external-erc721";
@@ -5164,9 +5256,24 @@ declare function listServices(): ServiceDefinition[];
5164
5256
  declare function getServicesByCapability(cap: ServiceCapability): ServiceDefinition[];
5165
5257
 
5166
5258
  /**
5167
- * Normalize a Starknet address to a 0x-prefixed 64-character hex string.
5259
+ * Normalize a Starknet address to a 0x-prefixed 64-character lowercase hex
5260
+ * string. Validates the input by routing through `BigInt(...)` — non-numeric
5261
+ * input throws `Invalid Starknet address: "<input>"`.
5262
+ *
5263
+ * The single source of truth for address normalization across Medialane.
5264
+ * `medialane-backend` re-exports this; do not maintain a parallel copy.
5168
5265
  */
5169
5266
  declare function normalizeAddress(address: string): string;
5267
+ /**
5268
+ * Normalize a Starknet felt/hash (tx hash, order hash, etc.) to a 0x-prefixed
5269
+ * 64-character lowercase hex string. Same shape as `normalizeAddress` — kept
5270
+ * as a separate name so the *intent* of each call site is explicit.
5271
+ *
5272
+ * Starknet RPCs and wallets may omit leading zeroes for the same value;
5273
+ * database uniqueness must not treat those textual variants as different
5274
+ * transactions.
5275
+ */
5276
+ declare function normalizeHash(hash: string): string;
5170
5277
  /**
5171
5278
  * Shorten an address to "0x1234...abcd" format.
5172
5279
  */
@@ -5226,17 +5333,17 @@ declare function encodeByteArray(str: string): string[];
5226
5333
  * The shape is identical across ERC-721 and ERC-1155 (nested OfferItem +
5227
5334
  * ConsiderationItem) — only the domain version differs.
5228
5335
  */
5229
- declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5230
- declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5336
+ declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5337
+ declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5231
5338
  /**
5232
5339
  * Build SNIP-12 typed data for an OrderFulfillment struct.
5233
5340
  * ERC-1155 adds a `quantity` field so the contract can verify the partial-fill
5234
5341
  * amount; ERC-721 omits it (always single-fill).
5235
5342
  */
5236
- declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5237
- declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5343
+ declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5344
+ declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5238
5345
  /** OrderCancellation typed data — identical shape across both standards. */
5239
- declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5240
- declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5346
+ declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5347
+ declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5241
5348
 
5242
- 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 ServiceId, 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, isServiceId, listServices, normalizeAddress, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
5349
+ 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 ServiceEventDeclaration, type ServiceId, 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, isServiceId, listServices, normalizeAddress, normalizeHash, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.d.ts CHANGED
@@ -426,6 +426,37 @@ interface EnforcementDeclaration {
426
426
  timeLock?: boolean;
427
427
  revocable?: boolean;
428
428
  }
429
+ /** An on-chain event the service emits. The indexer consumes this list to
430
+ * decide what to poll and how to parse — the year-2 "data-driven event
431
+ * parser registry" foundation (02-protocol-app-split §V).
432
+ *
433
+ * The Cairo selector is derivable from `name` via
434
+ * `starknet.hash.getSelectorFromName(name)` — not stored to avoid
435
+ * duplication and keep the SDK runtime-free of pre-computed hashes.
436
+ */
437
+ interface ServiceEventDeclaration {
438
+ /** Cairo event struct name (e.g. "OrderCreated", "CollectionCreated"). */
439
+ name: string;
440
+ /**
441
+ * Where this event is emitted:
442
+ * - "factory": at the service's `onchain.factoryAddress` (fixed address).
443
+ * Examples: marketplace OrderCreated, factory CollectionCreated.
444
+ * - "instance": at the address of each deployed collection contract
445
+ * (variable; the indexer iterates discovered instances).
446
+ * Examples: ERC-721 Transfer, POP AllowlistUpdated.
447
+ */
448
+ emittedBy: "factory" | "instance";
449
+ /**
450
+ * Polling cadence the indexer should use:
451
+ * - "fast" (default): every indexer tick (~6s). Right for low-volume
452
+ * protocol events like order/factory events.
453
+ * - "slow": a separate slower loop (~2min). Right for
454
+ * high-volume per-instance events like Transfer
455
+ * and AllowlistUpdated — polling them every tick
456
+ * against every known instance is RPC-expensive.
457
+ */
458
+ poll?: "fast" | "slow";
459
+ }
429
460
  /** Declarative description of a service (05-service-model §II).
430
461
  * SDK-resident in v1; on-chain registry in year 2. */
431
462
  interface ServiceDefinition {
@@ -443,6 +474,12 @@ interface ServiceDefinition {
443
474
  /** Drives the dapp asset/collection page variant. */
444
475
  uiVariant: string;
445
476
  capabilities: ServiceCapability[];
477
+ /** Events the indexer should poll + parse for this service.
478
+ * Optional during the year-1 transition — backend hand-coded pollers
479
+ * (medialane-backend/src/mirror/poller.ts) take precedence today.
480
+ * Populated here so consumers and the future data-driven indexer can
481
+ * read what events a service emits without code-spelunking. */
482
+ events?: ServiceEventDeclaration[];
446
483
  metadataSchema?: {
447
484
  requiredTraits?: string[];
448
485
  /** Canonical platform default is "CC BY-SA" (04-licensing-model §III). */
@@ -536,10 +573,21 @@ interface ApiOrder {
536
573
  updatedAt: string;
537
574
  /** Embedded token metadata (name/image/description). Null when not yet indexed. */
538
575
  token: ApiOrderTokenMeta | null;
539
- /** Set when this is a counter-offer listing — points to the original buyer bid. */
576
+ /** Set when this is a counter-offer listing — points to the original buyer bid.
577
+ * Now always emitted by the backend (was conditional); kept optional in the
578
+ * type for back-compat with older response shapes. */
540
579
  parentOrderHash?: string | null;
541
580
  /** Optional seller message accompanying a counter-offer. */
542
581
  counterOfferMessage?: string | null;
582
+ /** True when this order is a bid (ERC-20 offer) AND at least one ACTIVE counter
583
+ * exists with `parentOrderHash = this.orderHash`. Set by endpoints that compute
584
+ * it (currently `GET /v1/orders/user/:address` and `GET /v1/orders/:orderHash`);
585
+ * undefined on endpoints that don't.
586
+ *
587
+ * Use this instead of `status === "COUNTER_OFFERED"` for "this bid has been
588
+ * countered" affordances. The status pattern is being phased out per
589
+ * 01-core-model §V — counter-offers are linked orders, not a lifecycle state. */
590
+ hasActiveCounterOffer?: boolean;
543
591
  }
544
592
  /**
545
593
  * A single OpenSea-compatible ERC-721 attribute.
@@ -5031,6 +5079,10 @@ declare const SERVICES: {
5031
5079
  };
5032
5080
  readonly uiVariant: "standard";
5033
5081
  readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
5082
+ readonly events: [{
5083
+ readonly name: "CollectionCreated";
5084
+ readonly emittedBy: "factory";
5085
+ }];
5034
5086
  readonly metadataSchema: {
5035
5087
  readonly licenseDefault: "CC BY-SA";
5036
5088
  };
@@ -5060,6 +5112,10 @@ declare const SERVICES: {
5060
5112
  };
5061
5113
  readonly uiVariant: "edition";
5062
5114
  readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
5115
+ readonly events: [{
5116
+ readonly name: "CollectionDeployed";
5117
+ readonly emittedBy: "factory";
5118
+ }];
5063
5119
  readonly metadataSchema: {
5064
5120
  readonly licenseDefault: "CC BY-SA";
5065
5121
  };
@@ -5076,6 +5132,14 @@ declare const SERVICES: {
5076
5132
  };
5077
5133
  readonly uiVariant: "pop";
5078
5134
  readonly capabilities: ["claim", "transfer"];
5135
+ readonly events: [{
5136
+ readonly name: "CollectionCreated";
5137
+ readonly emittedBy: "factory";
5138
+ }, {
5139
+ readonly name: "AllowlistUpdated";
5140
+ readonly emittedBy: "instance";
5141
+ readonly poll: "slow";
5142
+ }];
5079
5143
  readonly metadataSchema: {
5080
5144
  readonly licenseDefault: "CC BY-SA";
5081
5145
  };
@@ -5092,6 +5156,14 @@ declare const SERVICES: {
5092
5156
  };
5093
5157
  readonly uiVariant: "drop";
5094
5158
  readonly capabilities: ["claim", "list", "buy", "make_offer", "cancel", "transfer"];
5159
+ readonly events: [{
5160
+ readonly name: "DropCreated";
5161
+ readonly emittedBy: "factory";
5162
+ }, {
5163
+ readonly name: "AllowlistUpdated";
5164
+ readonly emittedBy: "instance";
5165
+ readonly poll: "slow";
5166
+ }];
5095
5167
  readonly metadataSchema: {
5096
5168
  readonly licenseDefault: "CC BY-SA";
5097
5169
  };
@@ -5109,6 +5181,16 @@ declare const SERVICES: {
5109
5181
  };
5110
5182
  readonly uiVariant: "standard";
5111
5183
  readonly capabilities: ["list", "buy", "make_offer", "cancel"];
5184
+ readonly events: [{
5185
+ readonly name: "OrderCreated";
5186
+ readonly emittedBy: "factory";
5187
+ }, {
5188
+ readonly name: "OrderFulfilled";
5189
+ readonly emittedBy: "factory";
5190
+ }, {
5191
+ readonly name: "OrderCancelled";
5192
+ readonly emittedBy: "factory";
5193
+ }];
5112
5194
  };
5113
5195
  readonly "medialane-marketplace-erc1155": {
5114
5196
  readonly id: "medialane-marketplace-erc1155";
@@ -5123,6 +5205,16 @@ declare const SERVICES: {
5123
5205
  };
5124
5206
  readonly uiVariant: "edition";
5125
5207
  readonly capabilities: ["list", "buy", "make_offer", "cancel"];
5208
+ readonly events: [{
5209
+ readonly name: "OrderCreated";
5210
+ readonly emittedBy: "factory";
5211
+ }, {
5212
+ readonly name: "OrderFulfilled";
5213
+ readonly emittedBy: "factory";
5214
+ }, {
5215
+ readonly name: "OrderCancelled";
5216
+ readonly emittedBy: "factory";
5217
+ }];
5126
5218
  };
5127
5219
  readonly "external-erc721": {
5128
5220
  readonly id: "external-erc721";
@@ -5164,9 +5256,24 @@ declare function listServices(): ServiceDefinition[];
5164
5256
  declare function getServicesByCapability(cap: ServiceCapability): ServiceDefinition[];
5165
5257
 
5166
5258
  /**
5167
- * Normalize a Starknet address to a 0x-prefixed 64-character hex string.
5259
+ * Normalize a Starknet address to a 0x-prefixed 64-character lowercase hex
5260
+ * string. Validates the input by routing through `BigInt(...)` — non-numeric
5261
+ * input throws `Invalid Starknet address: "<input>"`.
5262
+ *
5263
+ * The single source of truth for address normalization across Medialane.
5264
+ * `medialane-backend` re-exports this; do not maintain a parallel copy.
5168
5265
  */
5169
5266
  declare function normalizeAddress(address: string): string;
5267
+ /**
5268
+ * Normalize a Starknet felt/hash (tx hash, order hash, etc.) to a 0x-prefixed
5269
+ * 64-character lowercase hex string. Same shape as `normalizeAddress` — kept
5270
+ * as a separate name so the *intent* of each call site is explicit.
5271
+ *
5272
+ * Starknet RPCs and wallets may omit leading zeroes for the same value;
5273
+ * database uniqueness must not treat those textual variants as different
5274
+ * transactions.
5275
+ */
5276
+ declare function normalizeHash(hash: string): string;
5170
5277
  /**
5171
5278
  * Shorten an address to "0x1234...abcd" format.
5172
5279
  */
@@ -5226,17 +5333,17 @@ declare function encodeByteArray(str: string): string[];
5226
5333
  * The shape is identical across ERC-721 and ERC-1155 (nested OfferItem +
5227
5334
  * ConsiderationItem) — only the domain version differs.
5228
5335
  */
5229
- declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5230
- declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5336
+ declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5337
+ declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5231
5338
  /**
5232
5339
  * Build SNIP-12 typed data for an OrderFulfillment struct.
5233
5340
  * ERC-1155 adds a `quantity` field so the contract can verify the partial-fill
5234
5341
  * amount; ERC-721 omits it (always single-fill).
5235
5342
  */
5236
- declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5237
- declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5343
+ declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5344
+ declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5238
5345
  /** OrderCancellation typed data — identical shape across both standards. */
5239
- declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5240
- declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
5346
+ declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5347
+ declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
5241
5348
 
5242
- 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 ServiceId, 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, isServiceId, listServices, normalizeAddress, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
5349
+ 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 ServiceEventDeclaration, type ServiceId, 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, isServiceId, listServices, normalizeAddress, normalizeHash, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
package/dist/index.js CHANGED
@@ -5345,11 +5345,21 @@ var Medialane1155Module = class {
5345
5345
  return build1155CancellationTypedData(params, chainId);
5346
5346
  }
5347
5347
  };
5348
-
5349
- // src/utils/address.ts
5350
5348
  function normalizeAddress(address) {
5351
- const hex = address.replace(/^0x/, "").toLowerCase();
5352
- return "0x" + hex.padStart(64, "0");
5349
+ try {
5350
+ const hex = num.toHex(BigInt(address));
5351
+ return "0x" + hex.slice(2).padStart(64, "0").toLowerCase();
5352
+ } catch {
5353
+ throw new Error(`Invalid Starknet address: "${address}"`);
5354
+ }
5355
+ }
5356
+ function normalizeHash(hash) {
5357
+ try {
5358
+ const hex = num.toHex(BigInt(hash));
5359
+ return "0x" + hex.slice(2).padStart(64, "0").toLowerCase();
5360
+ } catch {
5361
+ throw new Error(`Invalid Starknet hash: "${hash}"`);
5362
+ }
5353
5363
  }
5354
5364
  function shortenAddress(address, chars = 4) {
5355
5365
  const norm = normalizeAddress(address);
@@ -6229,8 +6239,17 @@ var MedialaneClient = class {
6229
6239
  erc1155Collection: new ERC1155CollectionService(this.config)
6230
6240
  };
6231
6241
  if (!this.config.backendUrl) {
6232
- this.api = new Proxy({}, {
6233
- get(_target, prop) {
6242
+ const sentinel = new ApiClient("https://medialane-sdk-no-backend.invalid", this.config.apiKey);
6243
+ const apiMethodNames = new Set(
6244
+ Object.getOwnPropertyNames(ApiClient.prototype).filter(
6245
+ (k) => k !== "constructor" && typeof sentinel[k] === "function"
6246
+ )
6247
+ );
6248
+ this.api = new Proxy(sentinel, {
6249
+ get(target, prop, receiver) {
6250
+ if (typeof prop === "symbol" || !apiMethodNames.has(prop)) {
6251
+ return Reflect.get(target, prop, receiver);
6252
+ }
6234
6253
  return () => {
6235
6254
  throw new Error(
6236
6255
  `backendUrl not configured. Pass backendUrl to MedialaneClient to use .api.${String(prop)}()`
@@ -6270,6 +6289,13 @@ var SERVICES = {
6270
6289
  },
6271
6290
  uiVariant: "standard",
6272
6291
  capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
6292
+ events: [
6293
+ { name: "CollectionCreated", emittedBy: "factory" }
6294
+ // Per-instance ERC-721 Transfer emitted by each deployed collection; not
6295
+ // yet declared here because the indexer polls discovered instances on a
6296
+ // slow schedule. Plan 2026-05-24-data-driven-event-registry.md covers
6297
+ // the migration.
6298
+ ],
6273
6299
  metadataSchema: { licenseDefault: "CC BY-SA" }
6274
6300
  },
6275
6301
  "ip-erc721": {
@@ -6280,6 +6306,8 @@ var SERVICES = {
6280
6306
  provenance: "MEDIALANE",
6281
6307
  uiVariant: "standard",
6282
6308
  capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
6309
+ // No factory — single shared contract. Events declared when the genesis
6310
+ // contract address is wired into onchain.factoryAddress here.
6283
6311
  metadataSchema: { licenseDefault: "CC BY-SA" }
6284
6312
  },
6285
6313
  "mip-erc1155": {
@@ -6295,6 +6323,9 @@ var SERVICES = {
6295
6323
  },
6296
6324
  uiVariant: "edition",
6297
6325
  capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
6326
+ events: [
6327
+ { name: "CollectionDeployed", emittedBy: "factory" }
6328
+ ],
6298
6329
  metadataSchema: { licenseDefault: "CC BY-SA" }
6299
6330
  },
6300
6331
  "pop-protocol": {
@@ -6309,6 +6340,10 @@ var SERVICES = {
6309
6340
  },
6310
6341
  uiVariant: "pop",
6311
6342
  capabilities: ["claim", "transfer"],
6343
+ events: [
6344
+ { name: "CollectionCreated", emittedBy: "factory" },
6345
+ { name: "AllowlistUpdated", emittedBy: "instance", poll: "slow" }
6346
+ ],
6312
6347
  metadataSchema: { licenseDefault: "CC BY-SA" }
6313
6348
  },
6314
6349
  "drop-collection": {
@@ -6323,6 +6358,10 @@ var SERVICES = {
6323
6358
  },
6324
6359
  uiVariant: "drop",
6325
6360
  capabilities: ["claim", "list", "buy", "make_offer", "cancel", "transfer"],
6361
+ events: [
6362
+ { name: "DropCreated", emittedBy: "factory" },
6363
+ { name: "AllowlistUpdated", emittedBy: "instance", poll: "slow" }
6364
+ ],
6326
6365
  metadataSchema: { licenseDefault: "CC BY-SA" }
6327
6366
  },
6328
6367
  "medialane-marketplace-erc721": {
@@ -6337,7 +6376,12 @@ var SERVICES = {
6337
6376
  startBlock: MARKETPLACE_721_START_BLOCK_MAINNET
6338
6377
  },
6339
6378
  uiVariant: "standard",
6340
- capabilities: ["list", "buy", "make_offer", "cancel"]
6379
+ capabilities: ["list", "buy", "make_offer", "cancel"],
6380
+ events: [
6381
+ { name: "OrderCreated", emittedBy: "factory" },
6382
+ { name: "OrderFulfilled", emittedBy: "factory" },
6383
+ { name: "OrderCancelled", emittedBy: "factory" }
6384
+ ]
6341
6385
  },
6342
6386
  "medialane-marketplace-erc1155": {
6343
6387
  id: "medialane-marketplace-erc1155",
@@ -6351,7 +6395,12 @@ var SERVICES = {
6351
6395
  startBlock: MARKETPLACE_1155_START_BLOCK_MAINNET
6352
6396
  },
6353
6397
  uiVariant: "edition",
6354
- capabilities: ["list", "buy", "make_offer", "cancel"]
6398
+ capabilities: ["list", "buy", "make_offer", "cancel"],
6399
+ events: [
6400
+ { name: "OrderCreated", emittedBy: "factory" },
6401
+ { name: "OrderFulfilled", emittedBy: "factory" },
6402
+ { name: "OrderCancelled", emittedBy: "factory" }
6403
+ ]
6355
6404
  },
6356
6405
  "external-erc721": {
6357
6406
  id: "external-erc721",
@@ -6387,6 +6436,6 @@ function getServicesByCapability(cap) {
6387
6436
  );
6388
6437
  }
6389
6438
 
6390
- export { ApiClient, 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, CollectionRegistryABI, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FeeConfigSchema, IPCOLLECTION_CLASS_HASH_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPMarketplaceABI, IPNFT_CLASS_HASH_MAINNET, IPNftABI, 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, 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, buildFeeCall, buildFulfillmentTypedData, buildOrderTypedData, encodeByteArray, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, isServiceId, listServices, normalizeAddress, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
6439
+ export { ApiClient, 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, CollectionRegistryABI, DEFAULT_RPC_URL, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FeeConfigSchema, IPCOLLECTION_CLASS_HASH_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPMarketplaceABI, IPNFT_CLASS_HASH_MAINNET, IPNftABI, 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, 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, buildFeeCall, buildFulfillmentTypedData, buildOrderTypedData, encodeByteArray, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, isServiceId, listServices, normalizeAddress, normalizeHash, parseAmount, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
6391
6440
  //# sourceMappingURL=index.js.map
6392
6441
  //# sourceMappingURL=index.js.map