I encountered an issue where the getTokenAccountsByDelegate
method is not available on the Connection object after performing a clean install of the @solana/web3.js
library. I can see the method is available on github here: https://github.com/solana-labs/solana-web3.js/blob/843e2fe231410e2d555ac10a360c7d7b6a9bbc91/packages/rpc-api/src/getTokenAccountsByDelegate.ts
Add a comment
|
1 Answer
As you've noted, that RPC method isn't part of the current released version of web3.js Connection class. Ref here of available methods.
It might be part of web3.js once the Technological preview is out but I'm not sure.
Otherwise, you might want to check out the standalone npm package for that method here https://www.npmjs.com/package/@solana/rpc-api/v/experimental
npm i @solana/rpc-api@2.0.0-preview.3.20240607183617.843e2fe231410e2d555ac10a360c7d7b6a9bbc91