Core Extension SDK
Core DAS API Extension
The @metaplex-foundation/mpl-core-das package is a DAS API extension for MPL Core that returns the correct types for use with the MPL Core SDKs. It also automatically derives plugins inherited from the collection and provides DAS-to-Core type conversions.
See Getting Started for installation and setup.
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.
