Skip to content

Commit

Permalink
feat: resolves V1 and V2 collection items
Browse files Browse the repository at this point in the history
  • Loading branch information
Julieta11 authored and aleortega committed Aug 11, 2023
1 parent 14bf432 commit 8d08835
Show file tree
Hide file tree
Showing 7 changed files with 653 additions and 474 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ const parsed = await parseUrn("urn:decentraland:sepolia:LAND:-10,-13?atBlock=151

- `decentraland:off-chain:{registry}:{name}`: Resolve static offchain assets (i.e. base wearables, not in any blockchain)
- `decentraland:{network}:collections-v1:{contract(0x[a-fA-F0-9]+)}:{name}`: Resolve an ethereum wearables collection asset by contract address (v1)
- `decentraland:{network}:collections-v1:{contract(0x[a-fA-F0-9]+)}:{name}:{tokenId}`: Resolve an ethereum wearable item from collections v1 by contract address and token id
- `decentraland:{network}:collections-v1:{collection-name}:{name}`: Resolve an ethereum wearables collection asset by collection name (wearables API) (v1)
- `decentraland:{network}:collections-v1:{collection-name}:{name}:{tokenId}`: Resolve an ethereum wearable item from collections v1 by collection name and token id
- `decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{id}`: Resolve an ethereum wearables collection asset by contract address (v2)
- `decentraland:{network}:collections-v2:{contract(0x[a-fA-F0-9]+)}:{id}:{tokenId}`: Resolve an ethereum wearable item from collections v2 by contract address and token id
- `decentraland:{network}:LAND:{x},{y}`: Resolves the ethereum asset of a LAND position.
- `decentraland:{network}:LAND:{tokenId}`: Resolves the ethereum asset of a LAND by tokenId.
- `decentraland:{network}:collections-thirdparty:{thirdPartyName}:{collectionId}:{itemId}`: Resolves the ethereum asset of an item of a third party collection, currently only supported on polygon
Expand Down
14 changes: 13 additions & 1 deletion etc/urn-resolver.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ export type BlockchainCollectionV1Asset = {
collectionName: string | null;
};

// @public (undocumented)
export type BlockchainCollectionV1Item = Omit<BlockchainCollectionV1Asset, 'type'> & {
type: 'blockchain-collection-v1-item';
tokenId: string;
};

// @public (undocumented)
export type BlockchainCollectionV2 = BaseBlockchainAsset & {
namespace: 'decentraland';
Expand All @@ -80,14 +86,20 @@ export type BlockchainCollectionV2Asset = BaseBlockchainAsset & {
id: string;
};

// @public (undocumented)
export type BlockchainCollectionV2Item = Omit<BlockchainCollectionV2Asset, 'type'> & {
type: 'blockchain-collection-v2-item';
tokenId: string;
};

// @public (undocumented)
export type BlockchainLandAsset = BlockchainAsset & {
x: number;
y: number;
};

// @public (undocumented)
export type DecentralandAssetIdentifier = BlockchainAsset | OffChainAsset | EntityV3Asset | BlockchainCollectionV1Asset | BlockchainCollectionV2Asset | BlockchainLandAsset | BlockchainCollectionV1 | BlockchainCollectionV2 | BlockchainCollectionThirdPartyName | BlockchainCollectionThirdPartyCollection | BlockchainCollectionThirdParty;
export type DecentralandAssetIdentifier = BlockchainAsset | OffChainAsset | EntityV3Asset | BlockchainCollectionV1Asset | BlockchainCollectionV1Item | BlockchainCollectionV2Asset | BlockchainCollectionV2Item | BlockchainLandAsset | BlockchainCollectionV1 | BlockchainCollectionV2 | BlockchainCollectionThirdPartyName | BlockchainCollectionThirdPartyCollection | BlockchainCollectionThirdParty;

// @public (undocumented)
export type EntityV3Asset = {
Expand Down
Loading

0 comments on commit 8d08835

Please sign in to comment.