@medialane/sdk 0.20.0 → 0.21.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.cjs +58 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -8
- package/dist/index.d.ts +104 -8
- package/dist/index.js +58 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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). */
|
|
@@ -5031,6 +5068,10 @@ declare const SERVICES: {
|
|
|
5031
5068
|
};
|
|
5032
5069
|
readonly uiVariant: "standard";
|
|
5033
5070
|
readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
|
|
5071
|
+
readonly events: [{
|
|
5072
|
+
readonly name: "CollectionCreated";
|
|
5073
|
+
readonly emittedBy: "factory";
|
|
5074
|
+
}];
|
|
5034
5075
|
readonly metadataSchema: {
|
|
5035
5076
|
readonly licenseDefault: "CC BY-SA";
|
|
5036
5077
|
};
|
|
@@ -5060,6 +5101,10 @@ declare const SERVICES: {
|
|
|
5060
5101
|
};
|
|
5061
5102
|
readonly uiVariant: "edition";
|
|
5062
5103
|
readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
|
|
5104
|
+
readonly events: [{
|
|
5105
|
+
readonly name: "CollectionDeployed";
|
|
5106
|
+
readonly emittedBy: "factory";
|
|
5107
|
+
}];
|
|
5063
5108
|
readonly metadataSchema: {
|
|
5064
5109
|
readonly licenseDefault: "CC BY-SA";
|
|
5065
5110
|
};
|
|
@@ -5076,6 +5121,14 @@ declare const SERVICES: {
|
|
|
5076
5121
|
};
|
|
5077
5122
|
readonly uiVariant: "pop";
|
|
5078
5123
|
readonly capabilities: ["claim", "transfer"];
|
|
5124
|
+
readonly events: [{
|
|
5125
|
+
readonly name: "CollectionCreated";
|
|
5126
|
+
readonly emittedBy: "factory";
|
|
5127
|
+
}, {
|
|
5128
|
+
readonly name: "AllowlistUpdated";
|
|
5129
|
+
readonly emittedBy: "instance";
|
|
5130
|
+
readonly poll: "slow";
|
|
5131
|
+
}];
|
|
5079
5132
|
readonly metadataSchema: {
|
|
5080
5133
|
readonly licenseDefault: "CC BY-SA";
|
|
5081
5134
|
};
|
|
@@ -5092,6 +5145,14 @@ declare const SERVICES: {
|
|
|
5092
5145
|
};
|
|
5093
5146
|
readonly uiVariant: "drop";
|
|
5094
5147
|
readonly capabilities: ["claim", "list", "buy", "make_offer", "cancel", "transfer"];
|
|
5148
|
+
readonly events: [{
|
|
5149
|
+
readonly name: "DropCreated";
|
|
5150
|
+
readonly emittedBy: "factory";
|
|
5151
|
+
}, {
|
|
5152
|
+
readonly name: "AllowlistUpdated";
|
|
5153
|
+
readonly emittedBy: "instance";
|
|
5154
|
+
readonly poll: "slow";
|
|
5155
|
+
}];
|
|
5095
5156
|
readonly metadataSchema: {
|
|
5096
5157
|
readonly licenseDefault: "CC BY-SA";
|
|
5097
5158
|
};
|
|
@@ -5109,6 +5170,16 @@ declare const SERVICES: {
|
|
|
5109
5170
|
};
|
|
5110
5171
|
readonly uiVariant: "standard";
|
|
5111
5172
|
readonly capabilities: ["list", "buy", "make_offer", "cancel"];
|
|
5173
|
+
readonly events: [{
|
|
5174
|
+
readonly name: "OrderCreated";
|
|
5175
|
+
readonly emittedBy: "factory";
|
|
5176
|
+
}, {
|
|
5177
|
+
readonly name: "OrderFulfilled";
|
|
5178
|
+
readonly emittedBy: "factory";
|
|
5179
|
+
}, {
|
|
5180
|
+
readonly name: "OrderCancelled";
|
|
5181
|
+
readonly emittedBy: "factory";
|
|
5182
|
+
}];
|
|
5112
5183
|
};
|
|
5113
5184
|
readonly "medialane-marketplace-erc1155": {
|
|
5114
5185
|
readonly id: "medialane-marketplace-erc1155";
|
|
@@ -5123,6 +5194,16 @@ declare const SERVICES: {
|
|
|
5123
5194
|
};
|
|
5124
5195
|
readonly uiVariant: "edition";
|
|
5125
5196
|
readonly capabilities: ["list", "buy", "make_offer", "cancel"];
|
|
5197
|
+
readonly events: [{
|
|
5198
|
+
readonly name: "OrderCreated";
|
|
5199
|
+
readonly emittedBy: "factory";
|
|
5200
|
+
}, {
|
|
5201
|
+
readonly name: "OrderFulfilled";
|
|
5202
|
+
readonly emittedBy: "factory";
|
|
5203
|
+
}, {
|
|
5204
|
+
readonly name: "OrderCancelled";
|
|
5205
|
+
readonly emittedBy: "factory";
|
|
5206
|
+
}];
|
|
5126
5207
|
};
|
|
5127
5208
|
readonly "external-erc721": {
|
|
5128
5209
|
readonly id: "external-erc721";
|
|
@@ -5164,9 +5245,24 @@ declare function listServices(): ServiceDefinition[];
|
|
|
5164
5245
|
declare function getServicesByCapability(cap: ServiceCapability): ServiceDefinition[];
|
|
5165
5246
|
|
|
5166
5247
|
/**
|
|
5167
|
-
* Normalize a Starknet address to a 0x-prefixed 64-character hex
|
|
5248
|
+
* Normalize a Starknet address to a 0x-prefixed 64-character lowercase hex
|
|
5249
|
+
* string. Validates the input by routing through `BigInt(...)` — non-numeric
|
|
5250
|
+
* input throws `Invalid Starknet address: "<input>"`.
|
|
5251
|
+
*
|
|
5252
|
+
* The single source of truth for address normalization across Medialane.
|
|
5253
|
+
* `medialane-backend` re-exports this; do not maintain a parallel copy.
|
|
5168
5254
|
*/
|
|
5169
5255
|
declare function normalizeAddress(address: string): string;
|
|
5256
|
+
/**
|
|
5257
|
+
* Normalize a Starknet felt/hash (tx hash, order hash, etc.) to a 0x-prefixed
|
|
5258
|
+
* 64-character lowercase hex string. Same shape as `normalizeAddress` — kept
|
|
5259
|
+
* as a separate name so the *intent* of each call site is explicit.
|
|
5260
|
+
*
|
|
5261
|
+
* Starknet RPCs and wallets may omit leading zeroes for the same value;
|
|
5262
|
+
* database uniqueness must not treat those textual variants as different
|
|
5263
|
+
* transactions.
|
|
5264
|
+
*/
|
|
5265
|
+
declare function normalizeHash(hash: string): string;
|
|
5170
5266
|
/**
|
|
5171
5267
|
* Shorten an address to "0x1234...abcd" format.
|
|
5172
5268
|
*/
|
|
@@ -5226,17 +5322,17 @@ declare function encodeByteArray(str: string): string[];
|
|
|
5226
5322
|
* The shape is identical across ERC-721 and ERC-1155 (nested OfferItem +
|
|
5227
5323
|
* ConsiderationItem) — only the domain version differs.
|
|
5228
5324
|
*/
|
|
5229
|
-
declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5230
|
-
declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5325
|
+
declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5326
|
+
declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5231
5327
|
/**
|
|
5232
5328
|
* Build SNIP-12 typed data for an OrderFulfillment struct.
|
|
5233
5329
|
* ERC-1155 adds a `quantity` field so the contract can verify the partial-fill
|
|
5234
5330
|
* amount; ERC-721 omits it (always single-fill).
|
|
5235
5331
|
*/
|
|
5236
|
-
declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5237
|
-
declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5332
|
+
declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5333
|
+
declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5238
5334
|
/** 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;
|
|
5335
|
+
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5336
|
+
declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5241
5337
|
|
|
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 };
|
|
5338
|
+
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). */
|
|
@@ -5031,6 +5068,10 @@ declare const SERVICES: {
|
|
|
5031
5068
|
};
|
|
5032
5069
|
readonly uiVariant: "standard";
|
|
5033
5070
|
readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
|
|
5071
|
+
readonly events: [{
|
|
5072
|
+
readonly name: "CollectionCreated";
|
|
5073
|
+
readonly emittedBy: "factory";
|
|
5074
|
+
}];
|
|
5034
5075
|
readonly metadataSchema: {
|
|
5035
5076
|
readonly licenseDefault: "CC BY-SA";
|
|
5036
5077
|
};
|
|
@@ -5060,6 +5101,10 @@ declare const SERVICES: {
|
|
|
5060
5101
|
};
|
|
5061
5102
|
readonly uiVariant: "edition";
|
|
5062
5103
|
readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
|
|
5104
|
+
readonly events: [{
|
|
5105
|
+
readonly name: "CollectionDeployed";
|
|
5106
|
+
readonly emittedBy: "factory";
|
|
5107
|
+
}];
|
|
5063
5108
|
readonly metadataSchema: {
|
|
5064
5109
|
readonly licenseDefault: "CC BY-SA";
|
|
5065
5110
|
};
|
|
@@ -5076,6 +5121,14 @@ declare const SERVICES: {
|
|
|
5076
5121
|
};
|
|
5077
5122
|
readonly uiVariant: "pop";
|
|
5078
5123
|
readonly capabilities: ["claim", "transfer"];
|
|
5124
|
+
readonly events: [{
|
|
5125
|
+
readonly name: "CollectionCreated";
|
|
5126
|
+
readonly emittedBy: "factory";
|
|
5127
|
+
}, {
|
|
5128
|
+
readonly name: "AllowlistUpdated";
|
|
5129
|
+
readonly emittedBy: "instance";
|
|
5130
|
+
readonly poll: "slow";
|
|
5131
|
+
}];
|
|
5079
5132
|
readonly metadataSchema: {
|
|
5080
5133
|
readonly licenseDefault: "CC BY-SA";
|
|
5081
5134
|
};
|
|
@@ -5092,6 +5145,14 @@ declare const SERVICES: {
|
|
|
5092
5145
|
};
|
|
5093
5146
|
readonly uiVariant: "drop";
|
|
5094
5147
|
readonly capabilities: ["claim", "list", "buy", "make_offer", "cancel", "transfer"];
|
|
5148
|
+
readonly events: [{
|
|
5149
|
+
readonly name: "DropCreated";
|
|
5150
|
+
readonly emittedBy: "factory";
|
|
5151
|
+
}, {
|
|
5152
|
+
readonly name: "AllowlistUpdated";
|
|
5153
|
+
readonly emittedBy: "instance";
|
|
5154
|
+
readonly poll: "slow";
|
|
5155
|
+
}];
|
|
5095
5156
|
readonly metadataSchema: {
|
|
5096
5157
|
readonly licenseDefault: "CC BY-SA";
|
|
5097
5158
|
};
|
|
@@ -5109,6 +5170,16 @@ declare const SERVICES: {
|
|
|
5109
5170
|
};
|
|
5110
5171
|
readonly uiVariant: "standard";
|
|
5111
5172
|
readonly capabilities: ["list", "buy", "make_offer", "cancel"];
|
|
5173
|
+
readonly events: [{
|
|
5174
|
+
readonly name: "OrderCreated";
|
|
5175
|
+
readonly emittedBy: "factory";
|
|
5176
|
+
}, {
|
|
5177
|
+
readonly name: "OrderFulfilled";
|
|
5178
|
+
readonly emittedBy: "factory";
|
|
5179
|
+
}, {
|
|
5180
|
+
readonly name: "OrderCancelled";
|
|
5181
|
+
readonly emittedBy: "factory";
|
|
5182
|
+
}];
|
|
5112
5183
|
};
|
|
5113
5184
|
readonly "medialane-marketplace-erc1155": {
|
|
5114
5185
|
readonly id: "medialane-marketplace-erc1155";
|
|
@@ -5123,6 +5194,16 @@ declare const SERVICES: {
|
|
|
5123
5194
|
};
|
|
5124
5195
|
readonly uiVariant: "edition";
|
|
5125
5196
|
readonly capabilities: ["list", "buy", "make_offer", "cancel"];
|
|
5197
|
+
readonly events: [{
|
|
5198
|
+
readonly name: "OrderCreated";
|
|
5199
|
+
readonly emittedBy: "factory";
|
|
5200
|
+
}, {
|
|
5201
|
+
readonly name: "OrderFulfilled";
|
|
5202
|
+
readonly emittedBy: "factory";
|
|
5203
|
+
}, {
|
|
5204
|
+
readonly name: "OrderCancelled";
|
|
5205
|
+
readonly emittedBy: "factory";
|
|
5206
|
+
}];
|
|
5126
5207
|
};
|
|
5127
5208
|
readonly "external-erc721": {
|
|
5128
5209
|
readonly id: "external-erc721";
|
|
@@ -5164,9 +5245,24 @@ declare function listServices(): ServiceDefinition[];
|
|
|
5164
5245
|
declare function getServicesByCapability(cap: ServiceCapability): ServiceDefinition[];
|
|
5165
5246
|
|
|
5166
5247
|
/**
|
|
5167
|
-
* Normalize a Starknet address to a 0x-prefixed 64-character hex
|
|
5248
|
+
* Normalize a Starknet address to a 0x-prefixed 64-character lowercase hex
|
|
5249
|
+
* string. Validates the input by routing through `BigInt(...)` — non-numeric
|
|
5250
|
+
* input throws `Invalid Starknet address: "<input>"`.
|
|
5251
|
+
*
|
|
5252
|
+
* The single source of truth for address normalization across Medialane.
|
|
5253
|
+
* `medialane-backend` re-exports this; do not maintain a parallel copy.
|
|
5168
5254
|
*/
|
|
5169
5255
|
declare function normalizeAddress(address: string): string;
|
|
5256
|
+
/**
|
|
5257
|
+
* Normalize a Starknet felt/hash (tx hash, order hash, etc.) to a 0x-prefixed
|
|
5258
|
+
* 64-character lowercase hex string. Same shape as `normalizeAddress` — kept
|
|
5259
|
+
* as a separate name so the *intent* of each call site is explicit.
|
|
5260
|
+
*
|
|
5261
|
+
* Starknet RPCs and wallets may omit leading zeroes for the same value;
|
|
5262
|
+
* database uniqueness must not treat those textual variants as different
|
|
5263
|
+
* transactions.
|
|
5264
|
+
*/
|
|
5265
|
+
declare function normalizeHash(hash: string): string;
|
|
5170
5266
|
/**
|
|
5171
5267
|
* Shorten an address to "0x1234...abcd" format.
|
|
5172
5268
|
*/
|
|
@@ -5226,17 +5322,17 @@ declare function encodeByteArray(str: string): string[];
|
|
|
5226
5322
|
* The shape is identical across ERC-721 and ERC-1155 (nested OfferItem +
|
|
5227
5323
|
* ConsiderationItem) — only the domain version differs.
|
|
5228
5324
|
*/
|
|
5229
|
-
declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5230
|
-
declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5325
|
+
declare function buildOrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5326
|
+
declare function build1155OrderTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5231
5327
|
/**
|
|
5232
5328
|
* Build SNIP-12 typed data for an OrderFulfillment struct.
|
|
5233
5329
|
* ERC-1155 adds a `quantity` field so the contract can verify the partial-fill
|
|
5234
5330
|
* amount; ERC-721 omits it (always single-fill).
|
|
5235
5331
|
*/
|
|
5236
|
-
declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5237
|
-
declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
5332
|
+
declare function buildFulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5333
|
+
declare function build1155FulfillmentTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5238
5334
|
/** 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;
|
|
5335
|
+
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5336
|
+
declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5241
5337
|
|
|
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 };
|
|
5338
|
+
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
|
-
|
|
5352
|
-
|
|
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
|
-
|
|
6233
|
-
|
|
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
|