0.2.26-test.3 • Published 3 years ago

@dappio-wonderland/navigator v0.2.26-test.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Dappio Navigator: The Universal Typescript Client for Instantiating DeFi Protocols

Overview

npm.io

Navigator is a Typescript client for instantiating various of kinds of DeFi protocols. You can use it as a standalone dependency in your own project or together with Dappio Gateway.

Usage

import { PublicKey, Connection } from "@solana/web3.js";
import { raydium, orca, tulip, friktion } from "@dappio/navigator";

const connection = new Connection("https://api.mainnet-beta.solana.com", {
  commitment: "confirmed",
});

// Fetch all Raydium pools
const raydiumPools = await raydium.infos.getAllPools(connection);

// Fetch all Orca pools
const orcaPools = await orca.infos.getAllPools(connection);

// Fetch Raydium pool (RAY-USDC)
const poolId = new PublicKey("6UmmUiYoBjSrhakAobJw8BvkmJtDVxaeBtbt7rxWo1mg");
const raydiumPool = await raydium.infos.getPool(connection, poolId);

// Fetch all Raydium farms
const raydiumFarms = await raydium.infos.getAllFarms(connection);

// Fetch all Orca farms
const orcaFarms = await orca.infos.getAllFarms(connection);

// Fetch Raydium farm (RAY-USDC)
const farmId = new PublicKey("CHYrUBX2RKX8iBg7gYTkccoGNBzP44LdaazMHCLcdEgS");
const raydiumFarm = await raydium.infos.getFarm(connection, farmId);

// Fetch all Tulip vaults
const tulipVaults = await tulip.infos.getAllVaults(connection);

// Fetch all Friktion vaults
const friktionVaults = await friktion.infos.getAllVaults(connection);

// Fetch all Marinade vaults
const marinadeVaults = await marinade.infos.getAllVaults(connection);

// Fetch all Lido vaults
const lidoVaults = await lido.infos.getAllVaults(connection);

Supported Protocols

Check here to see all the supported protocols

Test

Run all tests:

$ yarn run test

Or specifically run test for one specific protocol:

$ yarn run testRaydium
0.2.26-test.1

3 years ago

0.2.26-test.2

3 years ago

0.2.26-test.3

3 years ago

0.2.26

3 years ago

0.2.25

3 years ago

0.2.24

3 years ago

0.2.23

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.20

3 years ago

0.2.19

3 years ago

0.2.18

3 years ago

0.2.17

3 years ago

0.2.17-test.1

3 years ago

0.2.16

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.14-test.9

3 years ago

0.2.14-test.8

3 years ago

0.2.14-test.7

3 years ago

0.2.14-test.6

3 years ago

0.2.14-test.5

3 years ago

0.2.14-test.4

3 years ago

0.2.14-test.11

3 years ago

0.2.14-test.3

3 years ago

0.2.14-test.12

3 years ago

0.2.14-test.2

3 years ago

0.2.14-test.13

3 years ago

0.2.14-test.1

3 years ago

0.2.18-test.1

3 years ago

0.2.16-test.1

3 years ago

0.2.14-test.10

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.2.7

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago