Skip to main content
Waher.Networking.XMPP.Contracts.ContractsClient is the protocol client behind Neuron’s contract and Legal Identity workflows. It runs over an authenticated XMPP connection.

Capability groups

Event-based and task-based APIs

The library retains callback overloads for event-driven clients and provides async task helpers for common operations. Prefer task-based APIs in new code and keep the XMPP client’s lifetime longer than an individual request. Conceptual flow:
Overload signatures vary by library version; compile against the same dependency version used by the target Neuron.

Connection events

Subscribe to contract proposal, petition, state-change, and signature events before initiating workflows. Event handlers must be idempotent and should fetch the current object rather than trusting an event payload as complete state.

Error handling

Distinguish transport/IQ errors from a valid response that reports a rejected identity, invalid parameter, or disallowed lifecycle transition. Log contract ID, provider, operation, and stanza error condition—never private keys or protected parameter plaintext.