Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getTokenAccountsByOwner documentation: clarify required parameters #539

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

TanmayDhobale
Copy link

Problem

The documentation for the getTokenAccountsByOwner RPC method was incorrect, showing only one required parameter when two are actually required. This led to API errors when users omitted the second parameter.

Summary of Changes

  • Updated the introduction to clearly state that two parameters are required
  • Modified the Parameters section to show two required parameters:
    1. The owner's public key (previously incorrectly labeled as "delegate")
    2. An object specifying either mint or programId (previously marked as optional)
  • Added a note emphasizing that the second parameter must include either mint or programId
  • Updated the code sample to demonstrate both mint and programId usage

These changes ensure the documentation accurately reflects the API's requirements, preventing confusion and errors for developers using the getTokenAccountsByOwner method.

Fixes #520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getTokenAccountsByOwner expects at least 2 arguments
1 participant