Skip to content

hexToCompactSignature

Parses a hex formatted compact signature into a structured ("split") compact signature.

Import

import { hexToCompactSignature } from 'viem'

Usage

import { hexToCompactSignature } from 'viem'
 
hexToCompactSignature('0x9328da16089fcba9bececa81663203989f2df5fe1faa6291a45381c81bd17f76939c6d6b623b42da56557e5e734a43dc83345ddfadec52cbe24d0cc64f550793') 
/**
 * {
 *   r: '0x9328da16089fcba9bececa81663203989f2df5fe1faa6291a45381c81bd17f76',
 *   yParityAndS: '0x939c6d6b623b42da56557e5e734a43dc83345ddfadec52cbe24d0cc64f550793'
 * }
 */

Returns

CompactSignature

The structured ("split") compact signature.

Parameters

signatureHex

The compact signature in hex format.