Closed pedropregueiro closed 11 months ago
The registry does not send these events by itself, they have to come from the user. I checked the hubs, and they've correctly picked up the proofs for both these users: e.g.
hub> res = await rpcClient.getUserNameProofsByFid({fid: 189922})
Ok { value: { proofs: [ [Object] ] } }
34.125.44.148:2283 hub> res.value.proofs[0].name.toString()
'flotski'
See example here:
Oh, there was no mention of this in the docs: https://docs.farcaster.xyz/protocol/fnames.html. Could be good to add something there for clients handling fresh registrations.
Curious, what will happen if a user tries to set the username via hub and there are no proofs there yet?
Also, I transferred one of the accounts with error to a different wallet this am, before submitting the user data change to the hub, so now I have a username proof for 189276 but from the wrong wallet. Any way to sort this one out without moving the fid back to that wallet or waiting ~28 days?
Good point. I'll update the docs.
Curious, what will happen if a user tries to set the username via hub and there are no proofs there yet?
The hub will not accept the message. Validation fails.
Also, I transferred one of the accounts with error to a different wallet this am, before submitting the user data change to the hub, so now I have a username proof for 189276 but from the wrong wallet. Any way to sort this one out without moving the fid back to that wallet or waiting ~28 days?
Sorry what do you mean? Did you transfer the fid to a different wallet? Or the name to a different fid?
Transferring fids to other wallets does not impact existing fname proofs (until new owner submits a more recent proof). Transferring name to a different fid would mean that you either have to set the username on the hub using the new fid, or register a new name to the old fid.
Oh, there was no mention of this in the docs: https://docs.farcaster.xyz/protocol/fnames.html. Could be good to add something there for clients handling fresh registrations.
Updated fname docs https://github.com/farcasterxyz/www/pull/71
Sorry what do you mean? Did you transfer the fid to a different wallet? Or the name to a different fid?
I first had that fid on wallet A and used the fname registry to create proof and register a new username X. However, I didn't submit the new username to the hub at the time. In the meantime, I transferred that same fid to wallet B.
Now, if I query the fname registry, the username X is still attached to wallet A, and the proof submitted was also created from wallet A. I'd assume I wouldn't be able to set the username in the hub from wallet B.
Fwiw I tested this now and was able to submit a set username message to the hub signed by wallet B's signer. Not sure if expected behaviour. If so, then ignore me.
I see a few users who registered new usernames via farcord, but they never show up on Warpcast. Instead, the fid is shown.
However the registration went through successfully, their username comes up in Neynar apis, and even warpcast redirects username links correctly (e.g. https://warpcast.com/prego)
Here are 2 examples:
And some sample code using wagmi/viem for wallet account:
Am I missing any steps here?
I also noticed that the hub's
GetUserDataByFid
response is not sending back the event with type6
with username, which makes me think either the registry is not sending the events to the hub OR I need to send them myself 🤷