Core Extension
Core DAS API Extension
In addition to the general DAS SDK an extension for MPL Core has been created that directly returns you the correct types to further use with the MPL Core SDKs. It also automatically derives the plugins in assets inherited from the collection and provides functions for DAS-to-Core type conversions.
Fetching
The Core DAS API Extension supports the following methods:
getAsset
: Returns the information of a compressed/standard asset including metadata and owner.getCollection
: Returns the merkle tree proof information for a compressed asset.getAssetsByAuthority
: Returns the list of assets given an authority address.getAssetsByCollection
: Return the list of assets given a group (key, value) pair. For example this can be used to get all assets in a collection.getAssetsByOwner
: Return the list of assets given an owner address.searchAssets
: Return the list of assets given a search criteria.searchCollections
: Return the list of collections given a search criteria.
Type Conversion
In addition to that it also provides functions to convert the usual DAS Asset type to Core Assets and Core Collections:
dasAssetsToCoreAssets
: Convert a DAS Asset to Core Asset TypedasAssetsToCoreCollection
: Convert a DAS Asset to Core Collection Type
Plugin Derivations
This library will automatically derive the plugins in assets inherited from the collection. Read more about general plugin inheritance and precedence on the Core plugin page.
If you want to deactivate the derivation or implement it manually the Plugin Derivation Page should be helpful.