Read
nonces
Returns the next available nonce for an address. Used for generating EIP-712 signatures in addFor.Write
add
Add a new key for the caller’s fid and set its state toAdded. Revert if the key is already registered.
addFor
Add a key on behalf of another fid by providing a signature. The owner must sign an EIP-712Add message approving the key. Reverts if the key is already registered.
Add signature
To add a key on behalf of another account, you must provide an EIP-712 typed signature from the account in the following format:Add(address owner,uint32 keyType,bytes key,uint8 metadataType,bytes metadata,uint256 nonce,uint256 deadline)
[@farcaster/hub-web]
[Viem]
[helpers.ts]
[metadata.ts]
[signer.ts]
[clients.ts]
Errors
Source
KeyGateway.sol