Skip to content

ReceivePolicyReceipt.encode

Encodes decoded fields into a ReceivePolicyReceipt.ReceivePolicyReceipt. Inverse of decode.

TIP-1028

Imports

Named
import { ReceivePolicyReceipt } from 'ox/tempo'

Examples

import { ReceivePolicyReceipt } from 'ox/tempo'
 
const decoded = ReceivePolicyReceipt.decode('0x...')
const receipt = ReceivePolicyReceipt.encode(decoded)

Definition

function encode(
  decoded: Decoded,
): ReceivePolicyReceipt

Source: src/tempo/ReceivePolicyReceipt.ts

Parameters

decoded

The decoded fields.

decoded.blockedAt

  • Type: bigint

Block timestamp when the operation was blocked.

decoded.blockedNonce

  • Type: bigint

Guard nonce assigned when the operation was blocked.

decoded.blockedReason

  • Type: BlockedReason

Reason the operation was blocked.

decoded.kind

  • Type: Kind

Whether the blocked operation was a transfer or mint.

decoded.memo

  • Type: 0x${string}

Application memo.

decoded.originator

  • Type: abitype_Address

Original sender (transfer) or issuer (mint).

decoded.recipient

  • Type: abitype_Address

Addressed recipient (may be a virtual address).

decoded.recoveryAuthority

  • Type: abitype_Address

Recovery authority captured when the operation was blocked.

decoded.token

  • Type: abitype_Address

TIP-20 token holding the blocked funds.

decoded.version

  • Type: number

Receipt layout version.

Return Type

The receive-policy receipt.

ReceivePolicyReceipt.ReceivePolicyReceipt