Skip to content

KeyAuthorization.deserialize

Deserializes an RLP-encoded KeyAuthorization.KeyAuthorization.

Imports

Named
import { KeyAuthorization } from 'ox/tempo'

Examples

import { KeyAuthorization } from 'ox/tempo'
import { Value } from 'ox'
 
const authorization = KeyAuthorization.from({
  address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',
  chainId: 4217n,
  expiry: 1234567890,
  type: 'secp256k1',
  limits: [{
    token: '0x20c0000000000000000000000000000000000001',
    limit: Value.from('10', 6)
  }],
})
 
const serialized = KeyAuthorization.serialize(authorization)
const deserialized = KeyAuthorization.deserialize(serialized)

Definition

function deserialize(
  serialized: Hex.Hex,
): KeyAuthorization

Source: src/tempo/KeyAuthorization.ts

Parameters

serialized

  • Type: Hex.Hex

The RLP-encoded Key Authorization.

Return Type

The KeyAuthorization.KeyAuthorization.

KeyAuthorization.KeyAuthorization