1.6 KiB
Signed request protocols
mesh_client/protocol exports SignedProtocol with SignedProtocolMesh and
SignedProtocolDaochi. These select the two signed-message formats accepted by
the node. The node accepts released Daochi signatures through 2027-11-22; the
client does not retry or negotiate another format after a failed request.
PrepareLogin, PrepareDeviceRegistration and SignTransactionHeader accept
this enum as their final optional argument. Existing calls keep the Mesh format.
Applications that retain released X-Daochi-* requests explicitly pass
.SignedProtocolDaochi to each preparation call. The latter emits the released
daochi-sync-v1, daochi-device-registration-v1 and daochi-tx-v1 bytes, including
the transaction header's matching signature_context.
The same final optional argument is available on BuildLoginMessageHash,
BuildDeviceRegistrationMessage, BuildTransactionMessage and
BuildTransactionHeader. Their method/path, identity, digest, signature and
buffer validation still applies. Invalid protocol values fail and clear output;
preparation rejects them before invoking signing callbacks.
Set Client.signed_protocol before starting a blocking or asynchronous login
or sync to use the same signing format for login, device registration and signed
transactions. A zero-initialized Client uses Mesh. Transport keeps the
X-Mesh-* header names, which the transitional node releases also accept.
Callers that build their own requests supply their own HTTP headers. Account IDs,
key files and encrypted record formats are independent of protocol selection.