Open codewithmide opened 2 months ago
Hey! I have seen a similar behaviour today which was caused by specific tsconfig settings. E.g. this tsconfig is working totally fine:
{
"compilerOptions": {
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"module": "commonjs", /* Specify what module code is generated. */
"rootDir": "./src", /* Specify the root folder within your source files. */
"outDir": "./dist", /* Specify an output folder for all emitted files. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
"strict": true, /* Enable all strict type-checking options. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}
are you able to share yours? I am currently looking to find out which specific settings are causing it to mitigate it.
Thank you!
{
"compilerOptions": {
"outDir": "dist",
"target": "es2022",
"moduleResolution": "Bundler",
"module": "ES2022",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": false,
"strict": true,
"skipLibCheck": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
Hi @MarkSackerberg I am having the same issue as @codewithmide too, this is my tsconfig.json
file , maybe it has something to so with ESmodules?
also these are my dependencies
"devDependencies": {
"@digitak/esrun": "^3.2.24",
"@types/bn.js": "^5.1.6",
"@types/chai": "^4.3.3",
"@types/mocha": "^9.1.1",
"@types/node": "^20.5.7",
"chai": "^4.3.6",
"esrun": "^3.2.26",
"mocha": "^10.0.0",
"prettier": "^3.0.3",
"ts-mocha": "^10.0.0",
"typescript": "^5.2.2"
},
"dependencies": {
"@coral-xyz/anchor": "^0.30.1",
"@metaplex-foundation/mpl-bubblegum": "^4.2.0",
"@metaplex-foundation/mpl-token-metadata": "3.2.1",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@metaplex-foundation/umi-uploader-irys": "^0.10.0-beta.0",
"@solana-developers/helpers": "^2.5.5",
"@solana/spl-account-compression": "^0.2.1",
"@solana/spl-token": "^0.4.8",
"@solana/web3.js": "^1.95.3",
"bn.js": "^5.2.1",
"bs58": "^6.0.0",
"dotenv": "^16.4.5",
"node-fetch": "^3.3.2"
}
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 likegetAsset
,getAssetProof
, andgetAssetsByOwner
on theumi.rpc
object, but these methods are not present in the actualRpcInterface
.Steps to Reproduce
@metaplex-foundation/umi
and@metaplex-foundation/digital-asset-standard-api
.Expected Behavior
The
umi.rpc
object should contain the methodsgetAsset
,getAssetProof
, andgetAssetsByOwner
as described in the documentation.Actual Behavior
TypeScript throws errors indicating that these methods do not exist on the
RpcInterface
.Environment
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
RpcInterface
to include these DAS API methods.