Chapter 06 · Transport
Build, wrap, serialise, hash, sign, encode, parse, verify. Every request you will read follows this sequence, and most bugs live in the boundary between step six and seven.
FIGURE 6.1 · Two parties, one buffer.
GenericRequest, which sets flags from the fields present.createdAt, salt, or a Challenge.toBuffer() and hashed.VerifiableSignatureData carries.
The signature is a field of the envelope, so it changes the bytes. That is fine as long as the
verifier knows which bytes were signed: with GenericEnvelope the signature is computed
over the envelope hash without the signature field, and the flag tells the parser whether to
expect it. Getting that boundary wrong is the most common way to produce a request that a wallet
accepts structurally but refuses cryptographically.
The library does not look up identities. The verifier must ask a node (or its own index) what the
signing identity's primary address and revocation status were at a given height, then check the
signature against that. system_id and the block height in the challenge hash are what
make that check replay-resistant.
src/vdxf/classes/Request.ts:42 # getChallengeHash — height participates src/vdxf/classes/VerifiableSignatureData.ts src/vdxf/classes/Challenge.ts # toSha256 src/vdxf/classes/CompactAddressObject.ts # compact identity references