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

Possibly incorrect and confusing JSDoc for near-api-js/lib/account.d.ts #1040

Open
ryancwalsh opened this issue Dec 6, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ryancwalsh
Copy link

Hi team! 😃 ⋈ Ⓝ

Describe the bug
I'm wondering if the JSDoc in node_modules/near-api-js/lib/account.d.ts might be incorrect. It doesn't match what is written at https://docs.near.org/concepts/basics/accounts/access-keys (which the JSDoc itself links to).

In particular, I'm looking at the methodNames and amount arguments, which say:

* @param methodNames The method names on the contract that should be allowed to be called. Pass null for no method names and '' or [] for any method names.
* @param amount Payment in yoctoⓃ that is sent to the contract during this function call
  1. Because of https://docs.near.org/concepts/basics/accounts/access-keys, I was surprised that amount wasn't called allowance, with this description:

allowance: The amount of Ⓝ allowed to spend on gas (Optional). If omitted, the key will only be allowed to call view methods (read-only).

  1. I've tried passing null for methodNames, and I think it behaves the same as when I pass []. I.e. Either way, the output of const keys = await account.getAccessKeys(); shows [] for methodNames.

Can you please let me know if I'm misunderstanding? Thanks!

@ryancwalsh ryancwalsh added the bug Something isn't working label Dec 6, 2022
@github-project-automation github-project-automation bot moved this to Backlog 🥶 in DevRel Jun 10, 2024
@thisisjoshford thisisjoshford removed this from DevRel Oct 31, 2024
@github-project-automation github-project-automation bot moved this to NEW❗ in DevTools Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: NEW❗
Development

No branches or pull requests

1 participant