toip.tools

interface · Browser and Node

WireRecord

One message on the simulated network, as an observer sees it, plus what its recipient opened.

@toip-tools/trust-coreView source
TypeScriptImport
import { type WireRecord } from "@toip-tools/trust-core";

Declaration

TypeScriptinterface
interface WireRecord {
  seq: number;
  at: string;
  from: string;
  to: string;
  bytes: number;
  /** Hex of the last 24 bytes (ciphertext and signature). The first bytes are the cleartext TSP envelope, the same for every message. */
  head: string;
  raw: Uint8Array;
  undelivered?: true;
  opened?: { by: string; document: TrustTaskDocument<unknown> };
  /** Why the recipient's TSP layer refused it, if it did. */
  refused?: string;
}

Properties

seqrequired
number
atrequired
string
fromrequired
string
torequired
string
bytesrequired
number
headrequired
string

Hex of the last 24 bytes (ciphertext and signature). The first bytes are the cleartext TSP envelope, the same for every message.

rawrequired
Uint8Array<ArrayBufferLike>
undeliveredoptional
true | undefined
openedoptional
{ by: string; document: TrustTaskDocument<unknown>; } | undefined
refusedoptional
string | undefined

Why the recipient's TSP layer refused it, if it did.