Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/investin-pro/investin-sdk
SDK for interacting with Investin contracts
https://github.com/investin-pro/investin-sdk
solana web3
Last synced: 15 days ago
JSON representation
SDK for interacting with Investin contracts
- Host: GitHub
- URL: https://github.com/investin-pro/investin-sdk
- Owner: Investin-pro
- Created: 2021-12-18T12:18:36.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-29T10:27:32.000Z (over 2 years ago)
- Last Synced: 2025-01-17T18:20:17.864Z (19 days ago)
- Topics: solana, web3
- Language: TypeScript
- Homepage: https://www.investin.pro
- Size: 254 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 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 logicconst funds = await investinClient.fetchAllFunds(prices);
```
refer to [types.ts](./src/types.ts#L21) 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](https://discord.gg/g9ZdSakETa) and raise them there :)*