Skip to main content
The ID Gateway registers new Farcaster IDs and adds them to the Id Registry. If you want to create a new Farcaster ID, use the ID Gateway.

Read

price

Get the price in wei to register an fid. This includes the price of 1 storage unit. Use the extraStorage parameter to include extra storage units in the total price.

nonces

Get the next unused nonce for an address. Used for generating an EIP-712 Register signature for registerFor.

Write

register

Register a new fid to the caller and pay for storage. The caller must not already own an fid.

registerFor

Register a new fid to a specific address and pay for storage. The receiving address must sign an EIP-712 Register message approving the registration. The receiver must not already own an fid.

Register signature

To register an fid on behalf of another account, you must provide an EIP-712 typed signature from the receiving address in the following format: Register(address to,address recovery,uint256 nonce,uint256 deadline)
[@farcaster/hub-web]
[Viem]
[helpers.ts]
[clients.ts]

Errors

Source

IdGateway.sol