Skip to content

SignatureEnvelope.fromRpc

Converts an RPC-formatted signature envelope to a typed signature envelope.

Imports

Named
import { SignatureEnvelope } from 'ox/tempo'

Examples

import { SignatureEnvelope } from 'ox/tempo'
 
const envelope = SignatureEnvelope.fromRpc({
  r: '0x0',
  s: '0x0',
  yParity: '0x0',
  type: 'secp256k1',
})

Definition

function fromRpc(
  envelope: SignatureEnvelopeRpc,
): SignatureEnvelope

Source: src/tempo/SignatureEnvelope.ts

Parameters

envelope

The RPC signature envelope to convert.

envelope.prehash

  • Type: boolean

envelope.pubKeyX

  • Type: 0x${string}

envelope.pubKeyY

  • Type: 0x${string}

envelope.r

  • Type: 0x${string}

envelope.s

  • Type: 0x${string}

envelope.signature

  • Type: SignatureEnvelopeRpc

envelope.type

  • Type: "keychain"

envelope.userAddress

  • Type: abitype_Address

envelope.v

  • Type: 0x${string}
  • Optional

envelope.webauthnData

  • Type: 0x${string}

Return Type

The signature envelope with bigint values.

SignatureEnvelope