Skip to content

feat(provider): Add Brother ID domain resolution support #1313

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

SamrendraS
Copy link

@SamrendraS SamrendraS commented Feb 7, 2025

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:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Linked the issues which this PR resolves
  • Documented the changes in code (All methods include JSDoc documentation)
  • Updated the tests (Haven't developed tests for this)
  • All (existing) tests are passing

Copy link
Member

@tabaktoni tabaktoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right stuff in the right place, without a deep dive into implementation.
LGTM

@SamrendraS
Copy link
Author

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

@SamrendraS SamrendraS changed the title WIP: feat(provider): Add Brother ID domain resolution support feat(provider): Add Brother ID domain resolution support Mar 13, 2025
@SamrendraS
Copy link
Author

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

@PhilippeR26

@PhilippeR26
Copy link
Collaborator

@tabaktoni should have a look soon.

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

Successfully merging this pull request may close these issues.

3 participants