@medialane/sdk 0.11.0 → 0.12.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 CHANGED
@@ -4326,11 +4326,12 @@ var ApiClient = class {
4326
4326
  );
4327
4327
  }
4328
4328
  // ─── Collections ───────────────────────────────────────────────────────────
4329
- getCollections(page = 1, limit = 20, isKnown, sort, source) {
4329
+ getCollections(page = 1, limit = 20, isKnown, sort, source, service) {
4330
4330
  const params = new URLSearchParams({ page: String(page), limit: String(limit) });
4331
4331
  if (isKnown !== void 0) params.set("isKnown", String(isKnown));
4332
4332
  if (sort) params.set("sort", sort);
4333
4333
  if (source) params.set("source", source);
4334
+ if (service) params.set("service", service);
4334
4335
  return this.get(`/v1/collections?${params}`);
4335
4336
  }
4336
4337
  getCollectionsByOwner(owner, page = 1, limit = 50) {
@@ -5053,6 +5054,114 @@ var MedialaneClient = class {
5053
5054
  // src/types/api.ts
5054
5055
  var OPEN_LICENSES = ["CC0", "CC BY", "CC BY-SA", "CC BY-NC"];
5055
5056
 
5057
+ // src/services/registry.ts
5058
+ var SERVICES = {
5059
+ "mip-erc721": {
5060
+ id: "mip-erc721",
5061
+ displayName: "IP Collection",
5062
+ description: "Tokenize intellectual property as a per-creator ERC-721 collection.",
5063
+ standard: "ERC721",
5064
+ provenance: "MEDIALANE",
5065
+ onchain: {
5066
+ factoryAddress: COLLECTION_721_CONTRACT_MAINNET,
5067
+ startBlock: INDEXER_START_BLOCK_MAINNET
5068
+ },
5069
+ uiVariant: "standard",
5070
+ capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
5071
+ metadataSchema: { licenseDefault: "CC BY-SA" }
5072
+ },
5073
+ "ip-erc721": {
5074
+ id: "ip-erc721",
5075
+ displayName: "Programmable IP (genesis)",
5076
+ description: "One shared ERC-721 contract; many wallets mint genesis pieces.",
5077
+ standard: "ERC721",
5078
+ provenance: "MEDIALANE",
5079
+ uiVariant: "standard",
5080
+ capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
5081
+ metadataSchema: { licenseDefault: "CC BY-SA" }
5082
+ },
5083
+ "mip-erc1155": {
5084
+ id: "mip-erc1155",
5085
+ displayName: "NFT Editions",
5086
+ description: "Per-creator ERC-1155 collection; creator mints editions.",
5087
+ standard: "ERC1155",
5088
+ provenance: "MEDIALANE",
5089
+ onchain: {
5090
+ factoryAddress: ERC1155_FACTORY_CONTRACT_MAINNET,
5091
+ classHash: ERC1155_COLLECTION_CLASS_HASH_MAINNET,
5092
+ startBlock: MARKETPLACE_1155_START_BLOCK_MAINNET
5093
+ },
5094
+ uiVariant: "edition",
5095
+ capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"],
5096
+ metadataSchema: { licenseDefault: "CC BY-SA" }
5097
+ },
5098
+ "pop-protocol": {
5099
+ id: "pop-protocol",
5100
+ displayName: "POP Protocol",
5101
+ description: "Soulbound proof-of-presence collectibles per event.",
5102
+ standard: "ERC721",
5103
+ provenance: "MEDIALANE",
5104
+ onchain: {
5105
+ factoryAddress: POP_FACTORY_CONTRACT_MAINNET,
5106
+ classHash: POP_COLLECTION_CLASS_HASH_MAINNET
5107
+ },
5108
+ uiVariant: "pop",
5109
+ capabilities: ["claim", "transfer"],
5110
+ metadataSchema: { licenseDefault: "CC BY-SA" }
5111
+ },
5112
+ "drop-collection": {
5113
+ id: "drop-collection",
5114
+ displayName: "Collection Drop",
5115
+ description: "Sequential mint with claim windows + allowlist.",
5116
+ standard: "ERC721",
5117
+ provenance: "MEDIALANE",
5118
+ onchain: {
5119
+ factoryAddress: DROP_FACTORY_CONTRACT_MAINNET,
5120
+ classHash: DROP_COLLECTION_CLASS_HASH_MAINNET
5121
+ },
5122
+ uiVariant: "drop",
5123
+ capabilities: ["claim", "list", "buy", "make_offer", "cancel", "transfer"],
5124
+ metadataSchema: { licenseDefault: "CC BY-SA" }
5125
+ },
5126
+ "medialane-marketplace-erc721": {
5127
+ id: "medialane-marketplace-erc721",
5128
+ displayName: "Medialane Marketplace (ERC-721)",
5129
+ description: "ERC-721 order matching venue.",
5130
+ standard: "ERC721",
5131
+ provenance: "MEDIALANE",
5132
+ onchain: {
5133
+ factoryAddress: MARKETPLACE_721_CONTRACT_MAINNET,
5134
+ classHash: MARKETPLACE_721_CLASS_HASH_MAINNET,
5135
+ startBlock: MARKETPLACE_721_START_BLOCK_MAINNET
5136
+ },
5137
+ uiVariant: "standard",
5138
+ capabilities: ["list", "buy", "make_offer", "cancel"]
5139
+ },
5140
+ "medialane-marketplace-erc1155": {
5141
+ id: "medialane-marketplace-erc1155",
5142
+ displayName: "Medialane Marketplace (ERC-1155)",
5143
+ description: "ERC-1155 order matching venue.",
5144
+ standard: "ERC1155",
5145
+ provenance: "MEDIALANE",
5146
+ onchain: {
5147
+ factoryAddress: MARKETPLACE_1155_CONTRACT_MAINNET,
5148
+ classHash: MARKETPLACE_1155_CLASS_HASH_MAINNET,
5149
+ startBlock: MARKETPLACE_1155_START_BLOCK_MAINNET
5150
+ },
5151
+ uiVariant: "edition",
5152
+ capabilities: ["list", "buy", "make_offer", "cancel"]
5153
+ }
5154
+ };
5155
+ function getService(id) {
5156
+ return id ? SERVICES[id] : void 0;
5157
+ }
5158
+ function listServices() {
5159
+ return Object.values(SERVICES);
5160
+ }
5161
+ function getServicesByCapability(cap) {
5162
+ return Object.values(SERVICES).filter((s) => s.capabilities.includes(cap));
5163
+ }
5164
+
5056
5165
  exports.ApiClient = ApiClient;
5057
5166
  exports.COLLECTION_1155_CLASS_HASH_MAINNET = COLLECTION_1155_CLASS_HASH_MAINNET;
5058
5167
  exports.COLLECTION_1155_CONTRACT_MAINNET = COLLECTION_1155_CONTRACT_MAINNET;
@@ -5107,8 +5216,11 @@ exports.buildOrderTypedData = buildOrderTypedData;
5107
5216
  exports.encodeByteArray = encodeByteArray;
5108
5217
  exports.formatAmount = formatAmount;
5109
5218
  exports.getListableTokens = getListableTokens;
5219
+ exports.getService = getService;
5220
+ exports.getServicesByCapability = getServicesByCapability;
5110
5221
  exports.getTokenByAddress = getTokenByAddress;
5111
5222
  exports.getTokenBySymbol = getTokenBySymbol;
5223
+ exports.listServices = listServices;
5112
5224
  exports.normalizeAddress = normalizeAddress;
5113
5225
  exports.parseAmount = parseAmount;
5114
5226
  exports.resolveConfig = resolveConfig;