test-securo
Version:
test securo
83 lines (67 loc) • 3.07 kB
Markdown

[](https://github.com/daoventures)
- Index Fund Integration [Reference](https://securo.readme.io/reference/index-funds-overview)
- DeX Swap Integration [Reference](https://securo.readme.io/reference/dexswap-overview)
- Liquidity Provider Integration [Reference](https://securo.readme.io/reference/create-liquidity-session)
- Fiat-To-Crypto Integration [Reference](https://securo.readme.io/reference/payment-overview)
```bash
npm i test-securo
```
```javascript
/// ESM6
import { Securo } from "test-securo";
```
- To get products
```javascript
const securo = new Securo("APIKEY", "SECRETKEY");
const getIndexProducts = securo.indexFund.getProducts();
// This will return all available Index Fund Products
```
- To invest in LCI (Low-Risk Crypto Index)
```javascript
// ...continue
const body: IIndexFund = {
product: "LCI",
type: "deposit",
amount: "10",
userEmail: "developer@mail.com",
successURL: "http://localhost:3000/complete",
cancelURL: "http://localhost:3000/"
};
const getIndexProducts = securo.indexFund.createSession(body);
// That's all!
```
```javascript
// ...continue
const securo = new Securo("APIKEY", "SECRETKEY");
securo.sandboxMode(); // Just add this to activate sandbox mode
const getIndexProducts = securo.indexFund.getProducts();
// That's all!
```
- getProducts() - Return all indexes product
- getPriceOf("Product_Name") - Return price of a index
- getPoolValueOf("Product_Name") - Return pool value of index
- createSession(body) - Invest to a specific index [See Usage above]
- getSupportedTokens("chain") - Return supported tokens of a chain - [Reference](https://securo.readme.io/reference/dexswap-overview)
- getSupportedPools("chain") - Return supported pools of a chain
- getTokenPrice("token_symbol") - Return supported token price
- getTokenAddress("token_symbol") - Return token address
- getEstimatedSwap(..., ..., ...) - Return estimated swap fees
- getLiquidity(..., ..., ...) - Return liquidity pool value
- createSwapSession(body) - Instantiate swapping session
- createLiquiditySession(body) - Instantiate deposit/withdraw into liquidity provider session
- To be updated
[]
[](https://twitter.com/securo_dev)
[](https://www.linkedin.com/company/securo-dev/)