← Book map

Chapter 03 · Tabs

The minimal path

One details object built from CLI-shaped JSON, one signature, one QR. Read this tab first; it is the template the other eight follow.

Update Identity — what the request carries The identity update details object carries a partial identity, an optional request id, an expiry height, a system, an optional txid, and sign data. requestID expiryHeight systemID identity (PartialIdentity) txid signDataMap flags derived from present fields Flags: 1 signData · 2 expires · 4 requestID · 8 system · 16 txid

FIGURE 3.1 · IdentityUpdateRequestDetails, as used by the simplest tab.

The simplest route, and the template for the rest

updateIdentity.ts is 111 lines: parse three fields, build details, build the request, sign, encode, return. It is the one tab with a CLI equivalent (src/index.ts), which makes it the best place to see the minimum viable path.

The details object is built from CLI-shaped JSON

const details = IdentityUpdateRequestDetails.fromCLIJson(
  params.identityChanges,                     // { name, parent, contentmultimap, … }
  params.requestId                            // { requestid: "i…" }
    ? { requestid: CompactIAddressObject.fromAddress(params.requestId).toJson() }
    : undefined
);

fromCLIJson is the bridge between "the JSON a Verus CLI prints" and the typed details object. It accepts snake_case fields, parses the partial identity, and derives the detail flags from the fields present. That is why this tab's form takes a JSON blob rather than eight separate inputs — it is intentionally a thin skin over the CLI shape.

{ "name": "mylo",
  "parent": "i…",
  "contentmultimap": { "i…key": ["hex…"] } }

What the wallet does with it

An identity update request cannot include a content map entry it does not name. "Leave the rest alone" is the absence of fields, not a boolean you set.

Where it goes wrong

SymptomCause
QR scans, wallet says "invalid request"identityChanges is not an object, or the JSON has snake_case keys the parser rejects
Update applies but nothing changesPartial identity field missing — the bitmask has no bit for it
Signature error at generation timeSigning identity not in the daemon's wallet, or wrong chain for the port

Reading the code

src/routes/requests/updateIdentity.ts
src/index.ts                        # CLI version of the same flow
src/routes/utils.ts                 # buildGenericRequestFromDetails + signRequest