1.3.6 • Published 2 years ago

@investin/client-sdk v1.3.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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 :)

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.31

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago