Skip to content

Investin-pro/investin-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Investin SDK

Client SDK for interacting with INVESTIN's smart-contracts

Install

npm i @investin/client-sdk / yarn add @investin/client-sdk 

Using the SDK

To fetch all the funds

const investinClient = new InvestinClient(connection);

const funds = await investinClient.fetchAllFunds();

Token Pricing

Currently the SDK uses coingecko for token prices, if you have a alternative source you can pass them in like so

const prices = // fetching prices logic

const funds = await investinClient.fetchAllFunds(prices);

refer to types.ts for price types

Fetch investor deposits

const investinClient = new InvestinClient(connection);
const investorAddress = new PublicKey("...");
const investments = await investinClient.getInvestmentsByInvestorAddress(investorAddress);

This is very quick implementation and still in progress so PR's or suggestions are much appreciated, you can either create issues for improvements or join our discord and raise them there :)

About

SDK for interacting with Investin contracts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published