Skip to content

KeyAuthorization.fromRpcUnsigned

Converts unsigned RPC fields before owner signing.

Imports

Named
import { KeyAuthorization } from 'ox/tempo'

Examples

import { KeyAuthorization } from 'ox/tempo'
 
const authorization = KeyAuthorization.fromRpcUnsigned({
  chainId: '0x1',
  expiry: null,
  keyId: '0x2222222222222222222222222222222222222222',
  keyType: 'secp256k1',
})

Definition

function fromRpcUnsigned(
  authorization: UnsignedRpc,
): Unsigned

Source: src/tempo/KeyAuthorization.ts

Parameters

authorization

  • Type: UnsignedRpc

authorization.account

  • Type: abitype_Address

Required parent account binding for a multisig grant.

authorization.allowedCalls

  • Type: readonly RpcCallScope[]
  • Optional

Allowed call scopes (node field: allowedCalls).

authorization.chainId

  • Type: 0x${string}

Chain ID (hex quantity).

authorization.expiry

  • Type: 0x${string}

Expiry timestamp (hex quantity or null).

authorization.fundingPolicy

  • Type: Rpc
  • Optional

Existing policy ID or inline creation.

authorization.isAdmin

  • Type: boolean
  • Optional

Whether this authorization provisions an admin access key (TIP-1049).

authorization.keyId

  • Type: abitype_Address

Key identifier.

authorization.keyType

  • Type: "multisig"

Multisig key type.

authorization.limits

  • Type: readonly RpcTokenLimit[]
  • Optional

Token spending limits.

authorization.signature

  • Type: SignatureRpc

Signature authorizing this key.

authorization.witness

  • Type: 0x${string}
  • Optional

Optional 32-byte witness (hex).

Return Type

Unsigned