0.2.26-test.3 • Published 1 year ago

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

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year 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

1 year ago

0.2.26-test.2

1 year ago

0.2.26-test.3

1 year ago

0.2.26

1 year ago

0.2.25

1 year ago

0.2.24

1 year ago

0.2.23

1 year ago

0.2.22

1 year ago

0.2.21

1 year ago

0.2.20

1 year ago

0.2.19

1 year ago

0.2.18

1 year ago

0.2.17

1 year ago

0.2.17-test.1

1 year ago

0.2.16

1 year ago

0.2.15

2 years ago

0.2.14

2 years ago

0.2.14-test.9

2 years ago

0.2.14-test.8

2 years ago

0.2.14-test.7

2 years ago

0.2.14-test.6

2 years ago

0.2.14-test.5

2 years ago

0.2.14-test.4

2 years ago

0.2.14-test.11

2 years ago

0.2.14-test.3

2 years ago

0.2.14-test.12

2 years ago

0.2.14-test.2

2 years ago

0.2.14-test.13

2 years ago

0.2.14-test.1

2 years ago

0.2.18-test.1

1 year ago

0.2.16-test.1

1 year ago

0.2.14-test.10

2 years ago

0.2.13

2 years ago

0.2.12

2 years ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.7

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago