Skip to main content

index/functions/fixpointPrefixFor.md

fixpointPrefixFor(dto): string

The @gala-chain/connect-style prefix the gSwap web app puts in the body of an EIP-712 write: the EIP-191 header whose number counts the prefix string ITSELF plus the body (the UTF-8 length of getPayloadToSign({ ...dto, prefix })), found by fixpoint because adding the prefix changes the length (a body of 99 bytes settles on 101).

It is NOT a personal-sign prefix (a personal-sign write with this value recovers a phantom signer; use personalSignPrefixFor). Under EIP-712 the field is an untyped extra that the typed-data hash ignores and the backend recomputes, so it only exists to keep the submitted body byte-identical to what the gSwap web app has always sent.

Parameters​

ParameterType
dtoRecord<string, unknown>

Returns​

string