-
Notifications
You must be signed in to change notification settings - Fork 149
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
feat: add useStarkProfile hook #354
Conversation
✅ Deploy Preview for starknet-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
website/content/demos/starknetid.mdx
Outdated
import { useStarkProfile } from "@starknet-react/core"; | ||
|
||
function MyComponent() { | ||
const [address, setAddress] = useState<string>(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a default profile that's properly setup on testnet? So it will show data out of the box.
@@ -140,3 +158,51 @@ function LookupName() { | |||
</div> | |||
); | |||
} | |||
|
|||
function LookupProfile() { | |||
const [address, setAddress] = useState<string>(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as below
console.log("data", data); | ||
console.log("error", error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log("data", data); | |
console.log("error", error); |
"0x0293eb2ba9862f762bd3036586d5755a782bd22e6f5028320f1d0405fd47bff4", | ||
verifier_pfp: | ||
"0x070aaa20ec4a46da57c932d9fd89ca5e6bb9ca3188d3df361a32306aff7d59c7", | ||
multicall: "", // todo: deploy on mainnet and add address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think before I can merge we need this or the hook won't work.
This PR introduce a new hook
useStarkProfile
which retrieves a user starkname and all data he may have written on his starknet id : his profile picture metadata, his social media verification (twitter id, github id, discord id), and if the user has done his proof of personhood verification.