Skip to content

ValidatorData.getSignPayload

Gets the payload to use for signing ERC-191 formatted data with an intended validator.

Imports

Named
import { ValidatorData } from 'ox'

Examples

import { Hex, Secp256k1, ValidatorData } from 'ox'
 
const payload = ValidatorData.getSignPayload({ 
  data: Hex.fromString('hello world'), 
  validator: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045', 
})
 
const signature = Secp256k1.sign({ payload, privateKey: '0x...' })

Definition

function getSignPayload(
  value: getSignPayload.Value,
): Hex.Hex

Source: src/core/ValidatorData.ts

Parameters

value

  • Type: getSignPayload.Value

The data to get the sign payload for.

value.data

  • Type: 0x${string} | Uint8Array

value.validator

  • Type: abitype_Address

Return Type

The payload to use for signing.

Hex.Hex