Read
totalKeys
Get the number of active keys (uint256) for an fid.
keysOf
List all public keys (bytes[]) for an fid.
keyDataOf
Returns the state (uint8) and keyType (uint32) of particular key for an fid.
Write
add
Will revert if called directly. Must be called via the Key Gatewayremove
Removes a public key from the caller’s fid and marks it asRemoved.
removeFor
Remove a key on behalf of another fid by providing a signature. The fid owner must sign an EIP-712Remove message approving the removal. Reverts if the key does not exist or is already removed.
Remove signature
To remove a key on behalf of another account, you must provide an EIP-712 typed signature from the account in the following format:Remove(address owner,bytes key,uint256 nonce,uint256 deadline)
[@farcaster/hub-web]
[Viem]
[helpers.ts]
[signer.ts]
[clients.ts]
Errors
Source
KeyRegistry.sol