The AMM Registry contract instance. Keeps track of all AMMs.
The Controller contract instance. Provides some basic flows, like withdraw/deposit.
Get a target FutureVault contract instance.
address of the desired Future.
The Registry contract instance. Keeps track of all utility contracts.
The AMM Router contract instance. Simplifies some processes through AMMs.
The slippage tolerance being used by default on swaps.
The default user which will be used in case no user is passed to certain functions. The initial value will be the result of signer.getAddress()
The network the SDK instance is connected to.
The provider, necessary for fetching data.
Await this propery to use asynchronous props, like Controller.
The signer, necessary for executing transactions.
Keep track of whether the signer or the provider is being used, when creating contract instances.
Add liqidity for the target AMM for a user.
AddLiquidityParams
Fetch the spendable amount by another party(spender) from the owner's tokens on a future vault
The contract/entity to which the allowance is set.
The address of the token contract.
The token owner's wallet address
Approve transactions for a token amount for the target token.
The contract/entity receiving approval for spend.
The address of the token contract.
The amount of tokens to be approved.
Set LPToken approval status for an account.
The AMM on which the approval will happen.
Boolean value of the approval.
Deposit amount to a future vault.
The future to be withdrawn from.
The amount to be withdrawn.
Fetch the AMM of the provided FutureVault instance.
The target Future vault.
Fetch all AMMs
Fetch all FYT contract instances.
Fetch all aggregated Future constructs on an AMM.
Fetch all future vaults.
Fetch an aggregated construct collection of all LPTokenPools.
Fetch all liquidity pools of an AMM.
Fetch an aggregated Future construct by future vault address.
The address of the future to be fetched.
Fetch an aggregated Future construct by future vault index.
The index of the future to be fetched.
Fetch an aggregated construct of an LPTokenPool
The target AMM on which the tokenPool exists.
The pair id of the token pair, 0 or 1.
anything from 0 to the current period index. Default is the current period.
Fetch spot price of a swap route.
The target future on which the spot price is being queried.
APWToken: PT, Underlying or FYT.
APWToken: PT, Underlying or FYT.
Initializes all asynchronous properties, and sets the resulting promise in sdkInstance.ready
Check if the user needs to give approval to an entity, for an amount of a token.
The address of the token.
The amount in question.
The entity of which the approval is being queried.
The owner of the tokens.
Inspect LPToken approval status of an account.
The amm on which to check LPToken approval status.
The user whose approval status is queried.
Remove liquidity from the target AMM for a user.
RemoveLiquidityParams
Swap by controlling the exact amount of tokens passed in.
SwapParams with optional slippageTolerance.
Swap by controlling the exact amount of tokens coming out.
SwapParams with optional slippageTolerance.
Update the spendable amount by another party(spender) from the owner's tokens on a future vault.
The contract/entity for which the allowance will be updated.
The address of the token contract.
The amount of the allowance.
Update default user on an existing APWineSDK instance.
The address of the new user.
Updates the network on an existing APWineSDK instance.
The network on which the SDK instance operates
Updates the provider on an existing APWineSDK instance.
A provider to connect to the ethereum blockchain.
'Set this provider to sdk.signerOrProvider, and re-instantiate contract instances with it.'
Updates the signer on an existing APWineSDK instance.
A transaction signer.
'Set this signer to sdk.signerOrProvider, and re-instantiate contract instances with it.'
Set default slippage tolerance for the SDK instance.
Default slippage to be set.
Switch to provider usage on the sdk instance. This is useful, when the priority is fetching. (utilizing MulticallProvider)
Switch to signer usage on the sdk instance. This is necessary if transactions are to be executed.
Withdraw amount from a future vault.
The future to be withdrawn from.
The amount to be withdrawn.
Generated using TypeDoc, the 11/12/2022
Creates a new APWine SDK instance.