starknet.js
starknet.js copied to clipboard
feat(provider): Add Brother ID domain resolution support
Motivation and Resolution
This PR introduces Brother ID integration into Starknet.js, providing methods to interact with .brother domain names. This addition allows developers to easily resolve .brother domains to addresses and vice versa, similar to existing StarknetId functionality.
RPC version
N/A - This feature works with existing RPC implementations.
Usage related changes
- Added new
BrotherIdclass with methods to interact with Brother Identity contracts - Introduced methods to resolve .brother domains:
getBrotherName: Get the primary Brother domain for an addressgetAddressFromBrotherName: Resolve a Brother domain to its addressgetBrotherProfile: Get complete profile information for a Brother domain
- Added utility function
isBrotherDomainto validate .brother domains - Extended the RPC Provider to include Brother ID functionality by default
Development related changes
- Added new source file
src/provider/extensions/brotherId.tswith Brother ID implementation - Updated
src/provider/extensions/default.tsto include BrotherId in the RPC Provider mixin - Added TypeScript interface
BrotherProfilefor structured domain information
Checklist:
- [x] Performed a self-review of the code
- [x] Rebased to the last commit of the target branch (or merged it into my branch)
- [ ] Linked the issues which this PR resolves
- [x] Documented the changes in code (All methods include JSDoc documentation)
- [ ] Updated the tests (Haven't developed tests for this)
- [x] All (existing) tests are passing
gm @tabaktoni, have made some changes, looks correct to me. please take a look and merge if all looks good
hi team, bumping this up! would be glad to get a review
@PhilippeR26
@tabaktoni should have a look soon.
gmgm @tabaktoni could you take a look here
gm @PhilippeR26 @tabaktoni any updates here, could it be merged?
:tada: This PR is included in version 8.5.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: