Replies: 4 comments
-
Improve Return Types on Provider MethodsI find that people often write raw RPC requests instead of using this library and suspect this is because the return types of the interface are just raw json RPC responses anyway. For example, gas prices: https://docs.near.org/api/rpc/gas There appears to be this method: const response = await near.connection.provider.gasPrice(17824600); but the return value is just:
If we are providing an API, this method should parse the response, return an actual type or error appropriately. Not having this results in sloppy code outside of this library. |
Beta Was this translation helpful? Give feedback.
-
Suggestion: Generated type interfaces for Contract instances when ABI is provided.Currently we have to manually type our own interfaces on a per-contract basis. This is an archaic practice. Here is an example |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,I'm thrilled to participate in this discussion aimed at improving the NEAR Protocol. I've been deeply interested in NEAR Protocol and have thoroughly analyzed its core code. I recently came across the announcement about enhancing near-api-js on Telegram. I’d like to suggest introducing a React hooks interface. I look forward to hearing your thoughts and feedback on this proposal. Thank you! |
Beta Was this translation helpful? Give feedback.
-
One thing that'd be great to address are the polyfills and build issues, particularly with Vite
|
Beta Was this translation helpful? Give feedback.
-
The Public Goods team at Pagoda is looking to gather current impressions of
near-api-js
/@near-js
to help inform our upcoming contributions to the interfaceWhat have your friction points been with these libraries?
What additional functionality do you wish they offered?
What are other similar libraries you enjoy using?
Any type of input is welcome, please feel free to share rough thoughts or link to code
Beta Was this translation helpful? Give feedback.
All reactions