lez-programs/apps/amm/client/tests/public_api.rs
Ricardo Guilherme Schmidt 2b97012956
refactor(amm): split client protocol into reusable API
Expose typed Rust request contracts and transport-independent operations for application clients. Keep the existing C ABI as a thin adapter so the AMM UI continues to use the same symbols.
2026-07-15 15:07:36 -03:00

14 lines
480 B
Rust

use amm_client::{config_id, ConfigIdRequest, NEW_POSITION_SCHEMA};
#[test]
fn direct_rust_api_does_not_require_ffi() {
let response = config_id(ConfigIdRequest {
amm_program_id: "0000000000000000000000000000000000000000000000000000000000000000".into(),
})
.expect("valid program ID should produce a response");
assert_eq!(response["status"], "ok");
assert!(response["configId"].is_string());
assert_eq!(NEW_POSITION_SCHEMA, "new-position.v1");
}