Chapter 09 · Tabs
A query rather than a signature request: a list of VDXF keys, an optional signer, and a full/partial data mode.
FIGURE 9.1 · UserDataRequestDetails as wired by the form.
Where the data packet asks for a signature on data the requester already has, user data asks the identity to return data it holds. The distinction is the flags and the payload: here the payload is a list of VDXF keys, not a blob.
const details = new UserDataRequestDetails({
requestID, signer, requestedKeys, searchDataKey, …
});
// the constructor's setFlags() derives 1/2/4 from the fields present
buildSearchDataKey(keyAddress, keyValue) produces the
Array<{[key: string]: string}> form the details object expects, so a request can target
a specific key/value pair rather than a whole namespace. The form exposes a single key, but the
primitive takes an array.
| Mode | Meaning |
|---|---|
FULL_DATA (1) | Return complete objects for the requested keys |
PARTIAL_DATA (2) | Return only the named fields |
The route builds the details and wraps it with an optional recipient auth detail, exactly like the data packet. Response handling is the caller's problem: the request asks, the wallet answers to the configured response URI.
src/routes/requests/userData.ts parseRequestedKeys / buildSearchDataKey buildRecipientAuthDetails / buildUserDataRequest generateUserDataQr __tests__/userData.test.js # concrete expected output