PersonalMessage.getSignPayload
Gets the payload to use for signing an ERC-191 formatted personal message.
Imports
Named
import { PersonalMessage } from 'ox'
Examples
import { Hex, PersonalMessage, Secp256k1 } from 'ox'
const payload = PersonalMessage.getSignPayload(Hex.fromString('hello world'))
const signature = Secp256k1.sign({ payload, privateKey: '0x...' })
Definition
function getSignPayload(
data: Hex.Hex | Bytes.Bytes,
): Hex.Hex
Source: src/PersonalMessage.ts
Parameters
data
- Type:
Hex.Hex | Bytes.Bytes
The data to get the sign payload for.
Return Type
The payload to use for signing.
Hex.Hex
Error Type
PersonalMessage.getSignPayload.ErrorType