Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 testpasses