Skip to content

Signature.fromLegacy

Converts a Signature.Legacy into a Signature.Signature.

Imports

Named
import { Signature } from 'ox'

Examples

import { Signature } from 'ox'
 
const legacy = Signature.fromLegacy({ r: 1n, s: 2n, v: 28 })
{ r: 1n, s: 2n, yParity: 1 }

Definition

function fromLegacy(
  signature: Signature.Legacy,
): Signature

Source: src/core/Signature.ts

Parameters

signature

The Signature.Legacy to convert.

signature.r

  • Type: bigintType

signature.s

  • Type: bigintType

signature.v

  • Type: numberType

Return Type

The converted Signature.Signature.

Signature