mpl-bubblegum
mpl-bubblegum copied to clipboard
Inconsistency between DAS API Documentation and Actual Implementation
Description
There is a significant discrepancy between the documented Digital Asset Standard (DAS) API methods and the actual implementation in the @metaplex-foundation/umi
package. The documentation suggests the existence of methods like getAsset
, getAssetProof
, and getAssetsByOwner
on the umi.rpc
object, but these methods are not present in the actual RpcInterface
.
Steps to Reproduce
- Install the latest version of
@metaplex-foundation/umi
and@metaplex-foundation/digital-asset-standard-api
. - Register the DAS API as per the documentation:
import { dasApi } from '@metaplex-foundation/digital-asset-standard-api'; umi.use(dasApi());
- Attempt to use the DAS API methods as documented:
const rpcAsset = await umi.rpc.getAsset(assetId); const rpcAssetProof = await umi.rpc.getAssetProof(assetId); const rpcAssetList = await umi.rpc.getAssetsByOwner({ owner: ownerAddress });
Expected Behavior
The umi.rpc
object should contain the methods getAsset
, getAssetProof
, and getAssetsByOwner
as described in the documentation.
Actual Behavior
TypeScript throws errors indicating that these methods do not exist on the RpcInterface
.
Environment
- Node.js version: 18.20.4
- TypeScript version: 5.5.4
- @metaplex-foundation/umi version: 0.9.2
- @metaplex-foundation/digital-asset-standard-api version: 1.0.4
Additional Context
The documentation at (Fetching Compressed NFTs)[https://developers.metaplex.com/bubblegum/fetch-cnfts] suggests these methods should be available after registering the DAS API plugin. However, the actual implementation does not match this documentation, leading to confusion and implementation difficulties.
Possible Solutions
- Update the
RpcInterface
to include these DAS API methods. - Update the documentation to accurately reflect the current implementation and provide clear instructions on how to use the DAS API methods if they are implemented differently.
- If these methods are intended to be used differently, provide clear examples in the documentation.