mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-26 06:31:19 +00:00
Two naming cleanups on the create-pool quote, aligning it with the add / remove counterparts (per modules/amm/INTERFACE.md). Pure renames — no behavior change. - `liquidityQuote` → `createPoolQuote` across the stack: the FFI op (`liquidity_quote` → `create_pool_quote`, `LiquidityQuoteRequest` → `CreatePoolQuoteRequest`, `amm_liquidity_quote` → `amm_create_pool_quote`, cbindgen header regenerated), the module method, the AmmUiBackend slot, and the QML call site. It really is the create-pool quote — `addLiquidityQuote` / `removeLiquidityQuote` are the other branches — so the old name misled. - `initialPriceRealRaw` → `priceRaw` (request field `initial_price_real_raw` → `price_raw`): drops the legacy "Real" and unifies the price key with the add / remove quotes, which already return `priceRaw`. Create, add, and remove quotes now all speak `priceRaw`; the create-vs-add routing in NewPositionFlow keys on `request.priceRaw`.
70 lines
1.5 KiB
C
70 lines
1.5 KiB
C
#ifndef AMM_FFI_H
|
|
#define AMM_FFI_H
|
|
|
|
#pragma once
|
|
|
|
/* Generated by cbindgen. Do not edit. */
|
|
|
|
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif // __cplusplus
|
|
|
|
char *amm_config_id(const char *request_json);
|
|
|
|
char *amm_token_ids(const char *request_json);
|
|
|
|
char *amm_pair_ids(const char *request_json);
|
|
|
|
char *amm_context(const char *request_json);
|
|
|
|
char *amm_swap_pair(const char *request_json);
|
|
|
|
char *amm_resolve_pool(const char *request_json);
|
|
|
|
char *amm_pool_id(const char *request_json);
|
|
|
|
char *amm_swap_exact_in_quote(const char *request_json);
|
|
|
|
char *amm_swap_exact_out_quote(const char *request_json);
|
|
|
|
char *amm_swap_exact_in_plan(const char *request_json);
|
|
|
|
char *amm_swap_exact_out_plan(const char *request_json);
|
|
|
|
char *amm_create_pool_quote(const char *request_json);
|
|
|
|
char *amm_create_pool_plan(const char *request_json);
|
|
|
|
char *amm_add_liquidity_quote(const char *request_json);
|
|
|
|
char *amm_add_liquidity_plan(const char *request_json);
|
|
|
|
char *amm_remove_liquidity_quote(const char *request_json);
|
|
|
|
char *amm_remove_liquidity_plan(const char *request_json);
|
|
|
|
char *amm_sync_reserves_plan(const char *request_json);
|
|
|
|
char *amm_token_holdings(const char *request_json);
|
|
|
|
char *amm_program_id(const char *request_json);
|
|
|
|
/**
|
|
* Releases a string returned by an `amm_*` operation.
|
|
*
|
|
* # Safety
|
|
* `value` must be null or a pointer returned by this library that has not been freed.
|
|
*/
|
|
void amm_free(char *value);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif // __cplusplus
|
|
|
|
#endif /* AMM_FFI_H */
|