test-securo
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

Logo

contributions welcome

A complete and seamless Securo Library for interacting with Securo utilities in Javascript.

Features

Installation

  npm i test-securo

Usage

  /// ESM6
  import { Securo } from "test-securo";

How to perform Index Fund

  • To get products
  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)
  // ...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!

Sandbox Mode

  // ...continue
  const securo = new Securo("APIKEY", "SECRETKEY");
  securo.sandboxMode(); // Just add this to activate sandbox mode
  const getIndexProducts = securo.indexFund.getProducts();
  // That's all!

Documentation

Index Funds

  • 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]

DeX Swap

  • getSupportedTokens("chain") - Return supported tokens of a chain - Reference
  • 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

Fiat-To-Crypto

  • To be updated

[Documentation - Coming soon]

Socials

Twitter LinkedIn

Readme

Keywords

Package Sidebar

Install

npm i test-securo

Weekly Downloads

5

Version

1.0.7

License

ISC

Unpacked Size

21.8 kB

Total Files

5

Last publish

Collaborators

  • mlyk1234