Chapter 10 · Synthesis
Envelope is transport, detail is request, signature is proof. With that sentence and a code sketch, the whole surface collapses into one model.
FIGURE 10.1 · The lifecycle in one line.
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
| Decision | Class / field | Consequence |
|---|---|---|
| What am I asking? | *RequestDetails | Which flags and payload exist |
| How does the answer come back? | responseURIs, encryptResponseToAddress | Callback channel and confidentiality |
| Is this unique? | createdAt, salt, challenge | Replay resistance |
| Who is asking? | signature, appOrDelegatedID | Authority and delegation |
| Which chain? | FLAG_IS_TESTNET, systemID | VRSCTEST vs VRSC semantics |
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.
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