@crypticdot/defituna-api 1.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # DefiTuna SDK
2
+
3
+ ## Overview
4
+ This package provides developers with high-level functionalities for interacting with the DefiTuna Program on Solana.
5
+
6
+ ## Key Features
7
+ - **TunaApiClient**: The package includes a client for DefiTuna's public API. This allows to fetch the latest data from DefiTuna's on-chain program in a fast and efficient way without using Solana's RPC.
8
+
9
+ ## Installation
10
+ ```bash
11
+ # NPM
12
+ npm install @crypticdot/defituna-api
13
+ # Yarn
14
+ yarn add @crypticdot/defituna-api
15
+ # PNPM
16
+ pnpm add @crypticdot/defituna-api
17
+ ```
18
+
19
+ ## Usage
20
+ Here are some basic examples of how to use the package.
21
+
22
+ ## Initializing the API client
23
+ ```tsx
24
+ import { TunaApiClient } from "@crypticdot/defituna-api";
25
+
26
+ export const ApiClient = new TunaApiClient("https://api.defituna.com/api");
27
+ ```
28
+
29
+ ## Fetching user's positions
30
+ ```tsx
31
+ const userTunaPositions = await ApiClient.getUserTunaPositions("CYCf8sBj4zLZheRovh37rWLe7pK8Yn5G7nb4SeBmgfMG");
32
+ ```