refactor(amm-client)!: keep transport parsing in hosts

Remove the generic sequencer-response adapter and reuse the transaction order mapper.

BREAKING CHANGE: account_snapshot_from_sequencer_response and its quote JSON operation are removed. Hosts must normalize RPC responses into canonical account snapshots before calling amm_client.
This commit is contained in:
Ricardo Guilherme Schmidt
2026-08-10 11:22:44 -03:00
parent 43ed4de64f
commit d8e2ae3d85
8 changed files with 36 additions and 252 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ char *amm_client_plan(const char *request_json);
* Accepts a tagged UTF-8 JSON request and returns an owned UTF-8 JSON envelope.
* Supported operation tags include protocol constants; config and pair discovery;
* pair inspection; caller-order opening preparation; economic quote/preparation
* operations; reserve synchronization; oracle-price initialization; raw sequencer
* account normalization; and human-price Q64.64 conversion.
* operations; reserve synchronization; oracle-price initialization; and human-price Q64.64
* conversion. Hosts normalize RPC and wallet responses before calling this API.
* Snapshot-bound prepare_*_transaction operations belong to amm_client_plan.
* See docs/wire-api.md for fields.
* Release the result with amm_client_free.