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

Feature Request: Enhance TypeScript Type Safety for nimiq-client RPC #3172

Open
blouflashdb opened this issue Dec 2, 2024 · 0 comments
Open

Comments

@blouflashdb
Copy link

Description

I am currently utilizing a community-maintained TypeScript RPC client for interacting with the Nimiq Albatross network. However, I've encountered issues with incorrect typings for some response types. Additionally, when new RPC endpoints with different responses are added to the nimiq-client, it necessitates manual updates to the typings in the third-party package.

Proposed Solution

To address these challenges and improve the developer experience, I propose the creation of a dedicated typings package based on the nimiq-client RPC server. This package would automatically publish to npm (similar to @nimiq/core) after every release. By doing so, third-party packages can achieve end-to-end type safety, ensuring that all typings remain up-to-date with the latest RPC endpoints and responses.

Benefits

  • Enhanced Type Safety: Developers building on top of Nimiq via TypeScript will benefit from accurate and up-to-date typings, reducing runtime errors and improving code reliability.
  • Improved Developer Experience: Automating the publication of typings ensures that developers do not need to manually update typings for new RPC endpoints, streamlining the development process.
  • Seamless Integration: The typings could be integrated directly into @nimiq/core, eliminating the need for a separate package and simplifying dependency management.

Offer to Contribute

I would love to help implement this feature request, but I would need some more context on how to achieve this solution. Any guidance or resources you can provide would be greatly appreciated.

Thank you for considering this feature request. I believe it will greatly benefit the Nimiq developer community.

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

No branches or pull requests

1 participant