← Book map

Chapter 10 · Synthesis

The lifecycle on one page

Envelope is transport, detail is request, signature is proof. With that sentence and a code sketch, the whole surface collapses into one model.

One request, end to end The builder picks a detail class, wraps it in an ordinal object, places it in a generic request, signs the envelope, encodes it as a deeplink, and the wallet parses and acts on it. BUILD → WRAP → SIGN → ENCODE → PARSE → ACT detailsauth / update ordinal objecttype byte GenericRequestflags + details signVerifiableSignatureData deeplink / QRbase64url wallet parse + act THE ONE THING TO REMEMBER The envelope is a transport; the detail is the request; the signature is the proof. The chain never sees any of these classes — it sees the transaction the wallet builds from them.

FIGURE 10.1 · The lifecycle in one line.

A working sketch

This is the minimum that produces a real generic request. It compiles against the package as cloned; the only external dependency is a signer (omitted deliberately).

import { BN } from "bn.js";
import {
  GenericRequest,
  AuthenticationRequestOrdinalVDXFObject,
  AuthenticationRequestDetails,
  RequestURI,
} from "verus-typescript-primitives";

const auth = new AuthenticationRequestOrdinalVDXFObject({
  data: new AuthenticationRequestDetails({
    expiryTime: new BN(Math.floor(Date.now() / 1000) + 300),
  }),
});

const request = new GenericRequest({
  details: [auth],
  responseURIs: [RequestURI.fromUriString("https://example.com/callback")],
  createdAt: new BN(Math.floor(Date.now() / 1000)),
});

const qr = request.toQrString();          // what the scanner reads
const link = request.toWalletDeeplinkUri(); // verus://1/<base64url>
const bytes = request.toBuffer();         // what actually gets hashed and signed

What each decision point maps to

DecisionClass / fieldConsequence
What am I asking?*RequestDetailsWhich flags and payload exist
How does the answer come back?responseURIs, encryptResponseToAddressCallback channel and confidentiality
Is this unique?createdAt, salt, challengeReplay resistance
Who is asking?signature, appOrDelegatedIDAuthority and delegation
Which chain?FLAG_IS_TESTNET, systemIDVRSCTEST vs VRSC semantics

The mental model, in one paragraph

A VDXF request is a signed, versioned, self-describing buffer. The envelope carries the envelope's own bookkeeping; the details array carries one or more typed request objects; the signature binds the two to an identity at a block height. Transport (QR, deeplink, HTTPS POST) is interchangeable. If you can name the detail class, the flags it sets, and what signed those bytes, you understand the request.

Where to go next

debugging a parse?          → chapter 13 (compactSize vs varint), then 02
debugging a signature?      → chapter 03 (hash order), then 04
building a request?         → chapters 05, 06, then 07
reading an identity?        → chapter 12 (bitmask, content multimap)
wondering where txs come from? → chapter 11