@verified-network/verified-sdk
Version:
An SDK to develop applications on the Verified Network
126 lines (125 loc) • 5.47 kB
TypeScript
import { VerifiedContract, Options } from "../index";
import { VerifiedWallet } from "../../wallet";
export default class LiquidityContract extends VerifiedContract {
contractAddress: string;
constructor(signer: VerifiedWallet, contractNetworkAddress: string);
_getMeeQuote(paymentTokenAddress: string, functionName: string, args: any[], apiKey?: string, rpcUrl?: string, isReactNative?: boolean): Promise<{
tokenAddress: string;
amount: string;
amountInWei: string;
amouuntValue: string;
chainId: number;
functionName: string;
}>;
/**
Specifies list of supported tokens that can be invested in the Verified Liquidity token
@param _tokens array of supported token addresses
*/
supportTokens(_tokens: string, _name: string, _feed: string, options?: Options): any;
/**
Checks if a specified token is supported for investing in the Verified Liquidity token
@param _token token that is supported for investment
*/
checkSupportForToken(_token: string, options?: Options): any;
/**
Sets distribution contract to receive distribution of returns from
@param _distributionContract address of distribution contract
*/
setDistribution(_distributionContract: string, options?: Options): any;
/**
Checks NAV for Verified Liquidity token
*/
getNAVPrice(): any;
/**
Removes support for token for investing in the Verified Liquidity token
@param _token token that is supported for investment
*/
removeToken(_token: string, options?: Options): any;
/**
* Returns list of supported liquidity tokens (eg, VITTA, USDC, DAI)
* @returns array of struct of tokens
*/
getSupportedTokens(): any;
/**
Registers a liquidity platform (eg, DEX) where Verified Liquidity tokens can be used to underwrite investments
@param _liquidityPlatform address of the market making platform
*/
registerPlatform(_platform: string, _name: string, options?: Options): any;
/**
Used by external apps (eg, exchange, wallet) to buy Verified Liquidity token
@param _token address of token used by investor to buy the VITTA
@param _amount amount of token that is transferred from investor to this VITTA issuing contract's account for the investor
*/
buy(_token: string, _amount: string, options?: Options): any;
/**
Fetches investors in VITTA
*/
getInvestors(): any;
/**
Fetches registered platforms
*/
getPlatforms(): any;
/**
Fetches investment detail for specific investor in VITTA
@param _investor address of investor
@param _token address of token invested by investor
*/
getInvestment(_investor: string, _token: string, options?: Options): any;
/**
Used by VITTA holder to withdraw staked liquidity for underwriting investments
@param _fromStake amount of VITTA staked
*/
withdraw(_fromStake: string, options?: Options): any;
/**
* Adds asset manager to manage liquidity
* @param _platform address of market making platform (eg Balancer)
* @param _manager address of asset manager
* @param options
* @returns none
*/
addManager(_platform: string, _manager: string, options?: Options): any;
/**
* Removes asset manager managing liquidity
* @param _platform address of market making platform (eg Balancer)
* @param _manager address of asset manager
* @param options
* @returns none
*/
removeManager(_platform: string, _manager: string, options?: Options): any;
/**
* Fetches asset managers
* @param _platform address of market making platform
* @param options
* @returns array of asset manager addresses
*/
getManagers(_platform: string, options?: Options): any;
/**
* Gets return on investment performance of market making platform
* @param _platform address of market making platform
* @param options
* @returns uint256 unstakedLiquidity,
uint256 balancePlatformLiquidity,
uint256 platformLiquidityProvided,
uint256 platformCommissionsEarned
*/
getPlatformPerformance(_platform: string, options?: Options): any;
/**
* Gets return on investment performance for asset manager
* @param _platform address of market making platform (eg Balancer)
* @param _manager address of asset manager
* @param options
* @returns uint256 managerLiquidityProvided,
uint256 managerCommissionsEarned
*/
getManagerPerformance(_platform: string, _token: string, _manager: string, options?: Options): any;
/**
* Provides liquidity to asset managers on platform
* @param _platform address of market making platform
* @param _manager address of asset manager
* @param _liquidity amount of liquidity to provision to asset manager on platform
* @param options
* @returns none
*/
provideLiquidity(_platform: string, _manager: string, _liquidity: string, _token: string, options?: Options): any;
notifyIssue(callback: any): object;
}