Skip to content

AuthorizationTempo.fromRpc

Converts an AuthorizationTempo.Rpc to an AuthorizationTempo.AuthorizationTempo.

Imports

Named
import { AuthorizationTempo } from 'ox/tempo'

Examples

import { AuthorizationTempo } from 'ox/tempo'
 
const authorization = AuthorizationTempo.fromRpc({
  address: '0x0000000000000000000000000000000000000000',
  chainId: '0x1',
  nonce: '0x1',
  signature: {
    type: 'secp256k1',
    r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',
    s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',
    yParity: '0x0',
  },
})

Definition

function fromRpc(
  authorization: Rpc,
): Signed

Source: src/tempo/AuthorizationTempo.ts

Parameters

authorization

  • Type: Rpc

The RPC-formatted AA Authorization.

authorization.signature

  • Type: SignatureEnvelopeRpc

Return Type

A signed AuthorizationTempo.AuthorizationTempo.

Signed