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

Add a starknet id hook to starknet js #382

Closed
fricoben opened this issue Nov 8, 2022 · 7 comments · Fixed by #400
Closed

Add a starknet id hook to starknet js #382

fricoben opened this issue Nov 8, 2022 · 7 comments · Fixed by #400

Comments

@fricoben
Copy link
Contributor

fricoben commented Nov 8, 2022

Hey I'm ben from starknet id. . We're building the identity service and naming service of starknet.

Some of our partners (realms and cartridge in particular) asked us to make some hooks directly in starknet js to access domain names from a particular address and vice-versa.

Here is an example of the hook we want to make :

const addressToCheck = '0x2fd23d9182193775423497fc0c472e156c57c69e4089a1967fb288a2d84e914';

const domain = address.getDomainFromAddress(addressToCheck, "goerli");

console.log(domain); // Fricoben.stark

In the other sense, we have :

const domainToCheck = 'Fricoben.stark';

const address = address.getDomainFromAddress(domainToCheck, "goerli");

console.log(address); // 0x2fd23d9182193775423497fc0c472e156c57c69e4089a1967fb288a2d84e914

Here is the documentation about dev integration of starknet id.

I discussed this with one of you in starknet.cc and Starknet Building (hello Toni) and we can use a few solutions to make it happen.

  1. I can make the PR Myself
  2. I can use Starknet Id onlydust credit (if you have someone to propose don't hesitate)

Tell me if it's ok for you !

Thank you for your help,
Don't hesitate to ask questions here or on telegram (@fricoben).

@ivpavici
Copy link
Collaborator

ivpavici commented Nov 8, 2022

Hey @0xBenaparte ! I remember this topic!
From my side, I'm ok with you contributing it if you want to... Regarding only dust, I don't have anyone to recommend currently for contribution, but if you have, that is also ok from my side!

@fracek
Copy link
Contributor

fracek commented Nov 8, 2022

This would be good to have in starknet.js! Then it's super easy to add it to starknet-react too to have react hooks.

@fricoben
Copy link
Contributor Author

fricoben commented Nov 8, 2022

Yep we did the wrong way Francesco haha, we should have done it directly here and then do it in starknet-react ;)

@tabaktoni
Copy link
Collaborator

I also think this would be a nice solution +1

@fricoben
Copy link
Contributor Author

Hey Guys,

I'm starting the integration today and when I’m running test I can not access the endpoint with POST and GET transaction (I guess it's normal).

Any advice on how to access it in order to test my functions correctly ? Thanks.

Here is the error that I have when I do npm run test : reason: connect ECONNREFUSED 127.0.0.1:5050.

@ivpavici
Copy link
Collaborator

Here is the error that I have when I do npm run test : reason: connect ECONNREFUSED 127.0.0.1:5050.

We had a chat on telegram regarding this!

@github-actions
Copy link

github-actions bot commented Dec 5, 2022

🎉 This issue has been resolved in version 4.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants