|
| 1 | +import { SignerTransaction, InitiatorSigner, SupportedNetwork } from "../../util/commonTypes"; |
| 2 | +import { PoolReserves, V1PoolInfo } from "../../util/pool/poolTypes"; |
| 3 | +import { V1_1AddLiquidityQuote, V1_1AddLiquidityExecution } from "./types"; |
| 4 | +/** |
| 5 | + * Get a quote for how many liquidity tokens a deposit of asset1In and asset2In is worth at this |
| 6 | + * moment. This does not execute any transactions. |
| 7 | + * |
| 8 | + * @param params.pool Information for the pool. |
| 9 | + * @param params.reserves Pool reserves. |
| 10 | + * @param params.asset1In The quantity of the first asset being deposited. |
| 11 | + * @param params.asset2In The quantity of the second asset being deposited. |
| 12 | + */ |
| 13 | +export declare function getQuote({ pool, reserves, asset1In, asset2In }: { |
| 14 | + pool: V1PoolInfo; |
| 15 | + reserves: PoolReserves; |
| 16 | + asset1In: number | bigint; |
| 17 | + asset2In: number | bigint; |
| 18 | +}): V1_1AddLiquidityQuote; |
| 19 | +export declare function generateTxns({ client, network, poolAddress, asset1In, asset2In, poolTokenOut, slippage, initiatorAddr }: { |
| 20 | + client: any; |
| 21 | + network: SupportedNetwork; |
| 22 | + poolAddress: string; |
| 23 | + asset1In: AssetWithIdAndAmount; |
| 24 | + asset2In: AssetWithIdAndAmount; |
| 25 | + poolTokenOut: AssetWithIdAndAmount; |
| 26 | + slippage: number; |
| 27 | + initiatorAddr: string; |
| 28 | +}): Promise<SignerTransaction[]>; |
| 29 | +export declare function signTxns({ pool, txGroup, initiatorSigner }: { |
| 30 | + pool: V1PoolInfo; |
| 31 | + txGroup: SignerTransaction[]; |
| 32 | + initiatorSigner: InitiatorSigner; |
| 33 | +}): Promise<Uint8Array[]>; |
| 34 | +/** |
| 35 | + * Execute adding liquidity operation with the desired quantities. |
| 36 | + * |
| 37 | + * @param params.client An Algodv2 client. |
| 38 | + * @param params.pool Information for the pool. |
| 39 | + * @param params.initiatorAddr The address of the account performing the add liquidity operation. |
| 40 | + */ |
| 41 | +export declare function execute({ client, pool, txGroup, signedTxns, initiatorAddr }: { |
| 42 | + client: any; |
| 43 | + pool: V1PoolInfo; |
| 44 | + txGroup: SignerTransaction[]; |
| 45 | + signedTxns: Uint8Array[]; |
| 46 | + initiatorAddr: string; |
| 47 | +}): Promise<V1_1AddLiquidityExecution>; |
0 commit comments