-
Notifications
You must be signed in to change notification settings - Fork 114
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
Bns v2 feat #2080
base: develop
Are you sure you want to change the base?
Bns v2 feat #2080
Conversation
|
Hi @Patotking12 thanks for this contribution! Could you point me towards some resources for BNSv2, for example a SIP or similar? |
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
BNS V2 support
As a Stacks developer, I want to be able to interact with the BNS V2 contract through the Stacks API, so that I can build applications that leverage the latest features of the BNS protocol
The BNS protocol has been upgraded to version 2, introducing new features and improvements. To ensure that the Stacks API remains up-to-date and fully functional with the latest BNS contract, we need to implement support for BNS V2.
Developers can now use these new endpoints to interact with the BNS V2 contract, enabling them to:
This update maintains backwards compatibility with existing BNS V1 endpoints while providing new functionality for BNS V2.
const response = await fetch('/v2/prices/namespaces/id'); const price = await response.json(); console.log(price); // { units: "STX", amount: "123456789" }
Type of Change
Does this introduce a breaking change?
No, this PR does not introduce breaking changes. It adds new endpoints and functionality while maintaining compatibility with existing BNS V1 endpoints.
Are documentation updates required?
Testing information
Provide context on how tests should be performed.
Yes
Checklist
npm run test
passes