@neutral-trade/sdk 0.1.1

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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-PRESENT Neutral Trade
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # @neutral-trade/sdk
2
+
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
+ [![License][license-src]][license-href]
6
+
7
+ TypeScript SDK for [Neutral Trade](https://neutral.trade) vaults.
8
+
9
+ 📚 **[Documentation](https://sdk.neutral.trade)**
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ # npm
15
+ npm install @neutral-trade/sdk
16
+
17
+ # yarn
18
+ yarn add @neutral-trade/sdk
19
+
20
+ # pnpm
21
+ pnpm add @neutral-trade/sdk
22
+
23
+ # bun
24
+ bun add @neutral-trade/sdk
25
+ ```
26
+
27
+ All dependencies are bundled with the SDK, so no additional peer dependencies are required.
28
+
29
+ ## Quick Start
30
+
31
+ ```typescript
32
+ import { NeutralTrade, VaultId } from '@neutral-trade/sdk'
33
+
34
+ // Initialize the SDK
35
+ const sdk = await NeutralTrade.create({
36
+ rpcUrl: 'YOUR_RPC_URL_HERE'
37
+ })
38
+
39
+ // Get user balance for specific vaults
40
+ const balances = await sdk.getUserBalanceByVaultIds({
41
+ vaultIds: [VaultId.solnl, VaultId.btcnl],
42
+ userAddress: 'YOUR_WALLET_ADDRESS'
43
+ })
44
+
45
+ console.log(balances)
46
+ ```
47
+
48
+ ## Available Vaults
49
+
50
+ The SDK supports both **Drift** and **Bundle** vault types. Use the `VaultId` enum to reference vaults:
51
+
52
+ ```typescript
53
+ import { VaultId } from '@neutral-trade/sdk'
54
+
55
+ // Drift Vaults
56
+ VaultId.solnl // SOL Neutral Long
57
+ VaultId.btcnl // BTC Neutral Long
58
+ VaultId.jlpdnv1 // JLP DN V1
59
+
60
+ // Bundle Vaults
61
+ VaultId.hlfundingarb // HL Funding Arbitrage
62
+ VaultId.alpdn // ALP DN
63
+ ```
64
+
65
+ See the [documentation](https://sdk.neutral.trade) for the complete list of available vaults.
66
+
67
+ ## Examples
68
+
69
+ Check out the [examples](./examples) directory for more usage examples.
70
+
71
+ ## License
72
+
73
+ [MIT](./LICENSE)
74
+
75
+ <!-- Badges -->
76
+
77
+ [npm-version-src]: https://img.shields.io/npm/v/@neutral-trade/sdk?style=flat&colorA=080f12&colorB=1fa669
78
+ [npm-version-href]: https://npmjs.com/package/@neutral-trade/sdk
79
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@neutral-trade/sdk?style=flat&colorA=080f12&colorB=1fa669
80
+ [npm-downloads-href]: https://npmjs.com/package/@neutral-trade/sdk
81
+ [license-src]: https://img.shields.io/github/license/neutral-trade/sdk.svg?style=flat&colorA=080f12&colorB=1fa669
82
+ [license-href]: https://github.com/neutral-trade/sdk/blob/main/LICENSE