{"_id":"@metaplex-foundation/mpl-core-das","_rev":"5-1ef5fe793ed45a051c9e7d2e115757ab","name":"@metaplex-foundation/mpl-core-das","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.2":{"name":"@metaplex-foundation/mpl-core-das","version":"0.0.2","author":{"name":"Metaplex Maintainers","email":"contact@metaplex.com"},"license":"Apache-2.0","_id":"@metaplex-foundation/mpl-core-das@0.0.2","maintainers":[{"name":"danenbm","email":"michael@metaplex.com"},{"name":"nhanphan","email":"nhan.phan@gmail.com"},{"name":"blockiosaurus","email":"keith@metaplex.foundation"},{"name":"svc01-metaplex","email":"svc01@metaplex.com"},{"name":"brandontulsi","email":"tulsi.brandon@gmail.com"}],"homepage":"https://metaplex.com","ava":{"require":["dotenv/config"],"typescript":{"compile":false,"rewritePaths":{"src/":"dist/src/","test/":"dist/test/"}}},"dist":{"shasum":"b649dad6be408bacfb72fbd5c19c4ca4df2c5596","tarball":"https://registry.npmjs.org/@metaplex-foundation/mpl-core-das/-/mpl-core-das-0.0.2.tgz","fileCount":17,"integrity":"sha512-rC2j4OuXizYYNcW7wwuj0CGfYIXQhrODVv/WeU+1+qMnZ1qYIl9eE4YcDEv0QH58Htwopp6hRTLHiOrav0iZvw==","signatures":[{"sig":"MEQCIFhgTNxfKvRO2EXig+bQupkKLFzkOKyCCgqrGJz3QEL5AiBzvPx/SvEnK8Cv7Ea6vqJwdmyu54ZMBgHrLvsEiHX8Ng==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33097},"main":"dist/src/index.js","_from":"file:metaplex-foundation-mpl-core-das-0.0.2.tgz","types":"dist/src/index.d.ts","scripts":{"lint":"eslint --ext js,ts,tsx src","test":"ava --timeout 600s","build":"rimraf dist && tsc -p tsconfig.json","format":"prettier --check src test","lint:fix":"eslint --fix --ext js,ts,tsx src","format:fix":"prettier --write src test"},"_npmUser":{"name":"svc01-metaplex","email":"svc01@metaplex.com"},"_resolved":"/tmp/87e49abf3beb508b1cb68ba621d6e61c/metaplex-foundation-mpl-core-das-0.0.2.tgz","_integrity":"sha512-rC2j4OuXizYYNcW7wwuj0CGfYIXQhrODVv/WeU+1+qMnZ1qYIl9eE4YcDEv0QH58Htwopp6hRTLHiOrav0iZvw==","repository":"","_npmVersion":"8.19.4","description":"DAS helpers for MPL Core","directories":{},"_nodeVersion":"16.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.2.0","devDependencies":{"ava":"^6.1.2","dotenv":"^16.4.5","eslint":"^8.57.0","rimraf":"^5.0.5","prettier":"^3.2.5","typescript":"^5.4.4","@ava/typescript":"^4.1.0","eslint-plugin-import":"^2.29.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@metaplex-foundation/umi":"^0.9.1","@typescript-eslint/parser":"^7.5.0","@metaplex-foundation/mpl-core":"1.0.1","eslint-config-airbnb-typescript":"^18.0.0","@typescript-eslint/eslint-plugin":"^7.5.0","@metaplex-foundation/umi-bundle-tests":"^0.9.1","@metaplex-foundation/digital-asset-standard-api":"^1.0.4-alpha.0"},"peerDependencies":{"@metaplex-foundation/umi":">=0.8.2 < 1","@metaplex-foundation/mpl-core":">=1.0.1","@metaplex-foundation/digital-asset-standard-api":">=1.0.4-alpha.0"},"_npmOperationalInternal":{"tmp":"tmp/mpl-core-das_0.0.2_1718140731641_0.7936566798000204","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@metaplex-foundation/mpl-core-das","version":"0.0.3","author":{"name":"Metaplex Maintainers","email":"contact@metaplex.com"},"license":"Apache-2.0","_id":"@metaplex-foundation/mpl-core-das@0.0.3","maintainers":[{"name":"danenbm","email":"michael@metaplex.com"},{"name":"nhanphan","email":"nhan.phan@gmail.com"},{"name":"blockiosaurus","email":"keith@metaplex.foundation"},{"name":"svc01-metaplex","email":"svc01@metaplex.com"},{"name":"brandontulsi","email":"tulsi.brandon@gmail.com"}],"homepage":"https://metaplex.com","ava":{"require":["dotenv/config"],"typescript":{"compile":false,"rewritePaths":{"src/":"dist/src/","test/":"dist/test/"}}},"dist":{"shasum":"342a89d0f7e0ebd18718bc0c89f6e879e53d8477","tarball":"https://registry.npmjs.org/@metaplex-foundation/mpl-core-das/-/mpl-core-das-0.0.3.tgz","fileCount":18,"integrity":"sha512-5rx4R1F8VdSVcO1+sJMw0dhZ3S6E7H8GcWy0n+hTOxvUAIidD57AMoT0JuWuuDtedHO6/XmzueOXQvWFoCSmeA==","signatures":[{"sig":"MEUCIH8WlewM3/t4qUuc3lE54iOQiQr1qwlOp6oLR+MJW8fkAiEAj998X6CDSXWUvSGvKwCdj9+E8AUS0Efnq2Lc8PXTFqk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41387},"main":"dist/src/index.js","_from":"file:metaplex-foundation-mpl-core-das-0.0.3.tgz","types":"dist/src/index.d.ts","scripts":{"lint":"eslint --ext js,ts,tsx src","test":"ava --timeout 600s","build":"rimraf dist && tsc -p tsconfig.json","format":"prettier --check src test","lint:fix":"eslint --fix --ext js,ts,tsx src","format:fix":"prettier --write src test"},"_npmUser":{"name":"svc01-metaplex","email":"svc01@metaplex.com"},"_resolved":"/tmp/9de370aecbbc882f7b561f327c5286df/metaplex-foundation-mpl-core-das-0.0.3.tgz","_integrity":"sha512-5rx4R1F8VdSVcO1+sJMw0dhZ3S6E7H8GcWy0n+hTOxvUAIidD57AMoT0JuWuuDtedHO6/XmzueOXQvWFoCSmeA==","repository":"","_npmVersion":"10.7.0","description":"DAS helpers for MPL Core","directories":{},"_nodeVersion":"18.20.3","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.2.0","devDependencies":{"ava":"^6.1.2","dotenv":"^16.4.5","eslint":"^8.57.0","rimraf":"^5.0.5","prettier":"^3.2.5","typescript":"^5.4.4","@ava/typescript":"^4.1.0","eslint-plugin-import":"^2.29.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@metaplex-foundation/umi":"^0.9.1","@typescript-eslint/parser":"^7.5.0","@metaplex-foundation/mpl-core":"1.0.1","eslint-config-airbnb-typescript":"^18.0.0","@typescript-eslint/eslint-plugin":"^7.5.0","@metaplex-foundation/umi-bundle-tests":"^0.9.1","@metaplex-foundation/digital-asset-standard-api":"^1.0.4"},"peerDependencies":{"@metaplex-foundation/umi":">=0.8.2 < 1","@metaplex-foundation/mpl-core":">=1.0.1","@metaplex-foundation/digital-asset-standard-api":">=1.0.4"},"_npmOperationalInternal":{"tmp":"tmp/mpl-core-das_0.0.3_1720059020209_0.15046704881876716","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@metaplex-foundation/mpl-core-das","version":"0.1.0","author":{"name":"Metaplex Maintainers","email":"contact@metaplex.com"},"license":"Apache-2.0","_id":"@metaplex-foundation/mpl-core-das@0.1.0","maintainers":[{"name":"nhanphan","email":"nhan.phan@gmail.com"},{"name":"brandontulsi","email":"tulsi.brandon@gmail.com"},{"name":"svc01-metaplex","email":"svc01@metaplex.com"},{"name":"danenbm","email":"michael@metaplex.com"},{"name":"blockiosaurus","email":"keith@metaplex.foundation"}],"homepage":"https://metaplex.com","ava":{"require":["dotenv/config"],"typescript":{"compile":false,"rewritePaths":{"src/":"dist/src/","test/":"dist/test/"}}},"dist":{"shasum":"7fadf7a8eafeef87b816daab4e89c87c801235f5","tarball":"https://registry.npmjs.org/@metaplex-foundation/mpl-core-das/-/mpl-core-das-0.1.0.tgz","fileCount":18,"integrity":"sha512-iBPrUaLRxJRJ51iZ4dX3sYP3hKrvL8PlTELRlDHJZibSJuxXHqhZ+tamdqxTC/FdzmRd+JtoE1HyJup5gzgarQ==","signatures":[{"sig":"MEUCIEas+apl9ILHTJs1eKWq11jfDI1VWGMPh4NzSSjMHiSNAiEA2u1ZJ8lvi9NHyHSZIqYhvPfBYRbxovvOXbcrZhIF7qk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53964},"main":"dist/src/index.js","_from":"file:metaplex-foundation-mpl-core-das-0.1.0.tgz","types":"dist/src/index.d.ts","scripts":{"lint":"eslint --ext js,ts,tsx src","test":"ava --timeout 600s","build":"rimraf dist && tsc -p tsconfig.json","format":"prettier --check src test","lint:fix":"eslint --fix --ext js,ts,tsx src","build:docs":"typedoc --entryPointStrategy expand ./src","format:fix":"prettier --write src test"},"_npmUser":{"name":"svc01-metaplex","email":"svc01@metaplex.com"},"_resolved":"/tmp/d02caab9584b453022d36836a182e9d8/metaplex-foundation-mpl-core-das-0.1.0.tgz","_integrity":"sha512-iBPrUaLRxJRJ51iZ4dX3sYP3hKrvL8PlTELRlDHJZibSJuxXHqhZ+tamdqxTC/FdzmRd+JtoE1HyJup5gzgarQ==","repository":"","_npmVersion":"10.8.2","description":"DAS helpers for MPL Core","directories":{},"_nodeVersion":"18.20.8","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.2.0","devDependencies":{"ava":"^6.1.2","dotenv":"^16.4.5","eslint":"^8.57.0","rimraf":"^5.0.5","typedoc":"^0.26.5","prettier":"^3.2.5","typescript":"^5.4.4","@ava/typescript":"^4.1.0","eslint-plugin-import":"^2.29.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@metaplex-foundation/umi":"^1.2.0","@typescript-eslint/parser":"^7.5.0","eslint-config-airbnb-typescript":"^18.0.0","@typescript-eslint/eslint-plugin":"^7.5.0","@metaplex-foundation/umi-bundle-tests":"^1.2.0","@metaplex-foundation/digital-asset-standard-api":"^2.0.0"},"peerDependencies":{"@metaplex-foundation/umi":">=1.2.0","@metaplex-foundation/mpl-core":">=1.4.0","@metaplex-foundation/digital-asset-standard-api":">=2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mpl-core-das_0.1.0_1752223393423_0.5561854037098828","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@metaplex-foundation/mpl-core-das","description":"DAS helpers for MPL Core","license":"Apache-2.0","version":"0.1.1","author":{"name":"Metaplex Maintainers","email":"contact@metaplex.com"},"homepage":"https://metaplex.com","repository":"","main":"dist/src/index.js","types":"dist/src/index.d.ts","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"peerDependencies":{"@metaplex-foundation/digital-asset-standard-api":">=2.0.0","@metaplex-foundation/mpl-core":">=1.8.0","@metaplex-foundation/umi":">=1.2.0"},"devDependencies":{"@ava/typescript":"^4.1.0","@metaplex-foundation/digital-asset-standard-api":"^2.0.0","@metaplex-foundation/umi":"^1.2.0","@metaplex-foundation/umi-bundle-tests":"^1.2.0","@types/node":"^25.5.0","@typescript-eslint/eslint-plugin":"^7.5.0","@typescript-eslint/parser":"^7.5.0","ava":"^6.1.2","dotenv":"^16.4.5","eslint":"^8.57.0","eslint-config-airbnb-typescript":"^18.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.29.1","eslint-plugin-prettier":"^5.1.3","prettier":"^3.2.5","rimraf":"^5.0.5","typedoc":"^0.26.5","typescript":"^5.4.4"},"ava":{"typescript":{"compile":false,"rewritePaths":{"src/":"dist/src/","test/":"dist/test/"}},"require":["dotenv/config"]},"scripts":{"build":"rimraf dist && tsc -p tsconfig.json","build:docs":"typedoc --entryPointStrategy expand ./src","test":"ava --timeout 600s","lint":"eslint --ext js,ts,tsx src","lint:fix":"eslint --fix --ext js,ts,tsx src","format":"prettier --check src test","format:fix":"prettier --write src test"},"_id":"@metaplex-foundation/mpl-core-das@0.1.1","_integrity":"sha512-vCzdPRi5GjIELAx4gFj1mh/l6JPWjcSZxlPSrxR9Z1XMs6DC9TR0l/wFKqEFVEGUagshr7GPleat7K5RuG9+gQ==","_resolved":"/private/var/folders/nk/n5bp6vj973z9_d3qfzr00ljc0000gn/T/2fc05632cbdafd19f6d22cd1a74f2a21/metaplex-foundation-mpl-core-das-0.1.1.tgz","_from":"file:metaplex-foundation-mpl-core-das-0.1.1.tgz","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-vCzdPRi5GjIELAx4gFj1mh/l6JPWjcSZxlPSrxR9Z1XMs6DC9TR0l/wFKqEFVEGUagshr7GPleat7K5RuG9+gQ==","shasum":"b3c56fad096ad78978acecc7e3a933e19f75ddd0","tarball":"https://registry.npmjs.org/@metaplex-foundation/mpl-core-das/-/mpl-core-das-0.1.1.tgz","fileCount":18,"unpackedSize":54152,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICDYKD7WUCY2c730gajL5q8C+eeOpKxxwb9VCA1tJMgTAiEA2xLw6+JU+r6OZm+nto/HXIkiAFCn4gZoV+znC3akFtM="}]},"_npmUser":{"name":"nhanphan","email":"nhan.phan@gmail.com"},"directories":{},"maintainers":[{"name":"danenbm1","email":"michael@metaplex.foundation"},{"name":"nhanphan","email":"nhan.phan@gmail.com"},{"name":"brandontulsi","email":"tulsi.brandon@gmail.com"},{"name":"svc01-metaplex","email":"svc01@metaplex.com"},{"name":"danenbm","email":"michael@metaplex.com"},{"name":"blockiosaurus","email":"keith@metaplex.foundation"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mpl-core-das_0.1.1_1774397023163_0.10349149459787044"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-11T21:18:51.543Z","modified":"2026-03-25T00:03:43.518Z","0.0.2":"2024-06-11T21:18:51.856Z","0.0.3":"2024-07-04T02:10:20.431Z","0.1.0":"2025-07-11T08:43:13.608Z","0.1.1":"2026-03-25T00:03:43.289Z"},"author":{"name":"Metaplex Maintainers","email":"contact@metaplex.com"},"license":"Apache-2.0","homepage":"https://metaplex.com","description":"DAS helpers for MPL Core","maintainers":[{"name":"danenbm1","email":"michael@metaplex.foundation"},{"name":"nhanphan","email":"nhan.phan@gmail.com"},{"name":"brandontulsi","email":"tulsi.brandon@gmail.com"},{"name":"svc01-metaplex","email":"svc01@metaplex.com"},{"name":"danenbm","email":"michael@metaplex.com"},{"name":"blockiosaurus","email":"keith@metaplex.foundation"}],"readme":"# JavaScript client with DAS helpers for Mpl Core\n\nA JavaScript library for getting assets and collections from DAS in the Mpl Core format.\n\n## Getting started\n\n1. First, if you're not already using Umi, [follow these instructions to install the Umi framework](https://github.com/metaplex-foundation/umi/blob/main/docs/installation.md).\n2. Next, install [the DAS](https://github.com/metaplex-foundation/digital-asset-standard-api) client using the package manager of your choice.\n    ```sh\n   npm install @metaplex-foundation/digital-asset-standard-api\n   ```\n3. Install this library.\n    ```sh\n   npm install @metaplex-foundation/mpl-core-das\n   ```\n4. Finally, register the library with your Umi instance.\n   ```ts\n   import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';\n   import { dasApi } from '@metaplex-foundation/digital-asset-standard-api';\n   \n   const umi = createUmi('<your rpc endpoint>');\n   umi.use(dasApi());\n   ```\n5. Examples\n   ```ts\n   import { publicKey } from '@metaplex-foundation/umi';\n   import { das } from '@metaplex-foundation/mpl-core-das';\n   \n   // Search assets\n   const foundAssets = await das.searchAssets(umi, {\n     owner: publicKey('<ownerPublicKey>'),\n     interface: 'MplCoreAsset',\n   });\n   \n   // Search collections\n   const foundCollections = await das.searchCollections(umi, {\n     authority: publicKey('<authorityPublicKey>'),\n   });\n   \n   // Fetch assets by authority\n   const assetsByAuthority = await das.getAssetsByAuthority(umi, {\n     authority: publicKey('<authorityPublicKey>'),\n   });\n   \n   // Fetch assets by owner\n   const assetsByOwner = await das.getAssetsByOwner(umi, {\n     owner: publicKey('<ownerPublicKey>'),\n   });\n   \n   // Fetch assets by collection\n   const assetsByCollection = await das.getAssetsByCollection(umi, {\n     collection: publicKey('<collectionPublicKey>'),\n   });\n   \n   // Fetch collections by authority\n   const collectionsByUpdateAuthority = await das.getCollectionsByUpdateAuthority(umi, {\n     updateAuthority: publicKey('<updateAuthorityPublicKey>'),\n   }); \n   ```\n\n## Plugin Derivations\n\nThis library will automatically derive the plugins in assets inherited from the collection. \n\nRead more about plugin inheritance and precedence [here.](https://developers.metaplex.com/core/plugins)\n\nTo disable automatic derivation:\n\n```ts\nconst assetsByOwner = await das.getAssetsByOwner(umi, {\n  owner: publicKey('<ownerPublicKey>'),\n  skipDerivePlugins: true,\n});\n\n```\n\nYou can also manually derive the plugins for the asset if you have already fetched the collection at a prior time\nusing the `mpl-core` JavaScript SDK like:\n\n\n```js\nimport { deriveAssetPlugins, fetchCollection } from '@metaplex-foundation/mpl-core'\n\n//...\n\nconst collection = await fetchCollection(umi, publicKey('<collectionPublicKey>'))\n\nconst assetsByCollection = await das.getAssetsByCollection(umi, {\n  collection: collection.publicKey,\n  skipDerivePlugins: true,\n});\n\nconst derivedAssets = assetsByCollection.map((asset) => deriveAssetPlugins(asset, collection))\n```\n\n## Using DAS-to-Core type conversions\nIf you are working with not only Core assets, it might be useful to directly access the conversion helpers along side the other DAS asset types when fetching using [@metaplex-foundation/digital-asset-standard-api](https://github.com/metaplex-foundation/digital-asset-standard-api).\n\n\n```js\n// ... standard setup for @metaplex-foundation/digital-asset-standard-api\n\nconst dasAssets = await umi.rpc.getAssetsByOwner({ owner: publicKey('<pubkey>') });\n\n// filter out only core assets\nconst dasCoreAssets = assets.items.filter((a) => a.interface === 'MplCoreAsset')\n\n// convert them to AssetV1 type (actually AssetResult type which will also have the content field populated from DAS)\nconst coreAssets = await das.dasAssetsToCoreAssets(umi, dasCoreAssets)\n\n```\n\n\n## Contributing\n\nCheck out the [Contributing Guide](./CONTRIBUTING.md) to learn more about how to contribute to this library.","readmeFilename":"README.md"}