POST /Agent/Xmpp/SendXmlMessage; there is no POST /Agent/Legal/SendProposal server resource.
Lifecycle
Follow the lifecycle
- Create a contract from an approved template with
Legal/CreateContract. Assign each approved Legal Identity to its exact role. - Have the initiating party retrieve and review the returned contract, then sign its assigned role.
- Send a
contractProposalstanza to the counterparty’s bare or full JID. Asent: trueresponse confirms sending, not receipt or acceptance. - Confirm the counterparty received the matching
contractIdandrole, then retrieve the contract withLegal/GetContract. - Show the counterparty the exact returned human-readable contract. Treat explicit user confirmation as the acceptance boundary.
- Sign the counterparty’s role with
Legal/SignContract. - Retrieve the contract again and verify the state required by the template. Confirm every required role signature instead of treating a successful HTTP response as completion.
Construct a contract signature
Use the algorithm metadata stored withkeyId:
HTTP-Host must match the request header exactly, including a non-default port. Generate nonce from at least 32 random bytes, Base64-encode it, and never reuse it.