Files
xahaud/include
Nicholas Dudfield 9b7a9668e5 feat: json-tx -- submit ascii-signed json directly
introduces a signing scheme where the signature covers the raw utf-8
bytes of a tx_json_str the client produced, rather than the classical
binary signing payload. clients need no codec library: dump json,
sign bytes, post.

protocol:
* new sfJsonTxBody VL field (notSigning) carrying the exact ascii bytes
* new featureJsonTx amendment gating the new sign path
* STTx::checkSign routes to jsonTx::checkSignature when the amendment
  is active and the body is present
* passesLocalChecks runs jsonTx::checkStructuralEquivalence so the body
  must parse to the same canonical fields as the tx itself

helper:
* include/xrpl/protocol/JsonTx.h -- hasBody / body / bodyHash
  (sha512half over the body) / checkSignature / checkStructuralEquivalence

rpc:
* submit_json_tx handler: { tx_json_str, signature } -> verify ascii sig,
  stuff body + sig into the tx, forceValidity(SigGoodOnly), route through
  the normal processTransaction flow. gated on featureJsonTx.

tests:
* ripple.app.JsonTx: feature gate, basic roundtrip, invalid params,
  invalid json, bad signature, sig-over-different-bytes, wrong pubkey,
  helper unit tests including structural-equivalence tamper case.
2026-04-24 20:55:46 +07:00
..