Skip to content

Signature.fromRpc

Converts a Signature.Rpc into a Signature.Signature.

Imports

Named
import { Signature } from 'ox'

Examples

import { Signature } from 'ox'
 
const signature = Signature.fromRpc({
  r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',
  s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',
  yParity: '0x0',
})

Definition

function fromRpc(
  signature: {
    r: Hex.Hex;
    s: Hex.Hex;
    yParity?: Hex.Hex | undefined;
    v?: Hex.Hex | undefined;
},
): Signature

Source: src/core/Signature.ts

Parameters

signature

  • Type: { r: Hex.Hex; s: Hex.Hex; yParity?: Hex.Hex | undefined; v?: Hex.Hex | undefined; }

The Signature.Rpc to convert.

Return Type

The converted Signature.Signature.

Signature