@algofi/amm-v0
Version:
The official JavaScript SDK for the Algofi AMM
73 lines (72 loc) • 2.62 kB
TypeScript
export declare const ALGO_ASSET_ID = 1;
export declare enum Network {
MAINNET = 0,
TESTNET = 1
}
export declare enum PoolType {
CONSTANT_PRODUCT_LOW_FEE = 0,
CONSTANT_PRODUCT_HIGH_FEE = 1,
NANOSWAP = 2
}
export declare enum PoolStatus {
UNINITIALIZED = 0,
ACTIVE = 1
}
export declare function getValidatorIndex(network: Network, poolType: PoolType): number;
export declare function getApprovalProgramByType(network: Network, poolType: PoolType): Uint8Array;
export declare function getClearStateProgram(network: Network): Uint8Array;
export declare function getManagerApplicationId(network: Network, poolType: PoolType): number;
export declare function getSwapFee(network: Network, poolType: PoolType): number;
export declare function getUSDCAssetId(network: Network): number;
export declare function getSTBLAssetId(network: Network): number;
export declare const MANAGER_STRINGS: {
flash_loan_fee: string;
max_flash_loan_ratio: string;
registered_asset_1_id: string;
registered_asset_2_id: string;
registered_pool_id: string;
reserve_factor: string;
validator_index: string;
};
export declare const POOL_STRINGS: {
asset1_id: string;
asset_1_to_asset_2_exchange: string;
asset2_id: string;
balance_1: string;
balance_2: string;
cumsum_fees_asset1: string;
cumsum_fees_asset2: string;
cumsum_time_weighted_asset1_to_asset2_price: string;
cumsum_time_weighted_asset2_to_asset1_price: string;
cumsum_volume_asset1: string;
cumsum_volume_asset2: string;
cumsum_volume_weighted_asset1_to_asset2_price: string;
cumsum_volume_weighted_asset2_to_asset1_price: string;
flash_loan_fee: string;
latest_time: string;
lp_circulation: string;
lp_id: string;
max_flash_loan_ratio: string;
reserve_factor: string;
initialized: string;
initial_amplification_factor: string;
future_amplification_factor: string;
initial_amplification_factor_time: string;
future_amplification_factor_time: string;
ramp_amplification_factor: string;
update_swap_fee: string;
schedule_swap_fee_update: string;
swap_fee_pct_scaled: string;
next_swap_fee_pct_scaled: string;
swap_fee_update_time: string;
burn_asset1_out: string;
burn_asset2_out: string;
flash_loan: string;
pool: string;
redeem_pool_asset1_residual: string;
redeem_pool_asset2_residual: string;
redeem_swap_residual: string;
swap_exact_for: string;
swap_for_exact: string;
initialize_pool: string;
};