Skip to content
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

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

SamrendraS
Copy link

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 (Tests need to be added)
  • All tests are passing

Copy link
Collaborator

@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

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.

2 participants