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