mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-25 22:21:16 +00:00
Expose the two TWAP oracle-setup instructions as module ops so a pool's price feeds can be seeded from the app. Both chain into the configured oracle, seeded from validated pool state (initial tick read on-chain) — nothing is caller-priced, and each window is a distinct feed account.
78 lines
1.8 KiB
C
78 lines
1.8 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_config_account(const char *request_json);
|
|
|
|
char *amm_pair_ids(const char *request_json);
|
|
|
|
char *amm_resolve_tokens(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_transfer_ownership_plan(const char *request_json);
|
|
|
|
char *amm_create_price_observations_plan(const char *request_json);
|
|
|
|
char *amm_create_oracle_price_account_plan(const char *request_json);
|
|
|
|
char *amm_token_holdings(const char *request_json);
|
|
|
|
char *amm_program_id(const char *request_json);
|
|
|
|
char *amm_fee_tiers(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 */
|