index/functions/eip712DomainFor.md
eip712DomainFor(
chainId):EIP712DomainValue
Builds the EIP-712 domain from the wallet's LIVE eth_chainId result: a wallet hashes whatever
domain it is handed, and MetaMask refuses a chainId that differs from its active network, so
a hardcoded 1 breaks every wallet that is not on Mainnet.
The backend recovers the signer from the domain the payload carries (live-proven for chain
ids 1, 56 and 11155111), so following the wallet is correct on every network.
chain id eip712 domain value eth
Parameters
| Parameter | Type | Description |
|---|---|---|
chainId | unknown | The raw eth_chainId result: a 0x hex string (the JSON-RPC form) or an integer. |
chain id eth
Returns
eip712 domain value
Throws
GalaSDKError (INVALID_CHAIN_ID) when the wallet answers with anything else.
invalid chain id