starknet.js icon indicating copy to clipboard operation
starknet.js copied to clipboard

feat(provider): Add Brother ID domain resolution support

Open SamrendraS opened this issue 10 months ago • 4 comments

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 BrotherId class with methods to interact with Brother Identity contracts
  • Introduced methods to resolve .brother domains:
    • getBrotherName: Get the primary Brother domain for an address
    • getAddressFromBrotherName: Resolve a Brother domain to its address
    • getBrotherProfile: Get complete profile information for a Brother domain
  • Added utility function isBrotherDomain to 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.ts with Brother ID implementation
  • Updated src/provider/extensions/default.ts to include BrotherId in the RPC Provider mixin
  • Added TypeScript interface BrotherProfile for 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

SamrendraS avatar Feb 07 '25 07:02 SamrendraS

gm @tabaktoni, have made some changes, looks correct to me. please take a look and merge if all looks good

SamrendraS avatar Mar 13 '25 15:03 SamrendraS

hi team, bumping this up! would be glad to get a review

@PhilippeR26

SamrendraS avatar Apr 04 '25 12:04 SamrendraS

@tabaktoni should have a look soon.

PhilippeR26 avatar Apr 04 '25 12:04 PhilippeR26

gmgm @tabaktoni could you take a look here

SamrendraS avatar May 26 '25 15:05 SamrendraS

gm @PhilippeR26 @tabaktoni any updates here, could it be merged?

SamrendraS avatar Aug 06 '25 09:08 SamrendraS

:tada: This PR is included in version 8.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Aug 18 '25 17:08 github-actions[bot]