fix(amm-client)!: align shared quote wire contract

Use canonical ProgramId word arrays, include pool spot movement in standalone swap quotes, and keep quote commitments stable across deadline refreshes.

BREAKING CHANGE: JSON ProgramId values now use eight u32 words. Convert hex or byte representations in host adapters.
This commit is contained in:
Ricardo Guilherme Schmidt
2026-08-10 11:22:44 -03:00
parent ae0bb310b0
commit 43ed4de64f
12 changed files with 411 additions and 130 deletions
+3 -2
View File
@@ -29,8 +29,9 @@ char *amm_client_quote(const char *request_json);
/*
* Raw u128, u64, and signed tick values are decimal JSON strings. Program IDs
* are 64-character lowercase hexadecimal strings. Instruction words are JSON
* u32 arrays. Account IDs use canonical base58 and account data is hexadecimal.
* are JSON arrays of eight u32 words. Hexadecimal and byte layouts are host-adapter-only.
* Instruction words are JSON u32 arrays. Account IDs use canonical base58 and account data is
* hexadecimal.
* Requests may carry schema "amm-client.v1";
* schema-less legacy requests remain accepted. Responses use
* {"schema":"amm-client.v1","ok":true,"value":...} or the same envelope