@neutral-trade/sdk 0.4.13 → 0.4.15
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/dist/index.d.mts +3 -1
- package/dist/index.mjs +3 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/{neutral-trade-core-B7rdV-3e.mjs → neutral-trade-core-C_RJkaGL.mjs} +23 -0
- package/dist/{neutral-trade-core-DHnpUNs2.d.mts → neutral-trade-core-CtFKbCrr.d.mts} +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as UserBundleTempData, B as BundleProgram, C as VaultCategory, D as BundleAccount, E as VaultType, F as getSolanaTokenMint, G as createAllowlistedBundleProgram, H as DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, I as tokens, J as isAllowlistedBundleProgramId, K as createBundleProgramById, L as ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, M as SupportedToken, N as Token, O as OracleData, P as getSolanaTokenDecimals, R as BUNDLE_PROGRAM_ID_V2_MAINNET, S as VaultBalanceData, T as VaultRegistryEntry, U as DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, V as BundleProvider, W as assertAllowlistedBundleProgramId, _ as getVaultRegistry, b as vaultsDevnet, f as NeutralTrade, g as getVaultById, h as getVaultByAddress, j as SupportedChain, k as UserBundleAccount, m as getBundleProgramId, p as NeutralTradeConfig, q as getDefaultBundleProgramIdByCluster, t as NeutralTradeCoreContext, v as isValidVaultAddress, w as VaultRegistry, x as UserBalanceResult, y as vaults$1, z as BundleCluster } from "./neutral-trade-core-
|
|
1
|
+
import { A as UserBundleTempData, B as BundleProgram, C as VaultCategory, D as BundleAccount, E as VaultType, F as getSolanaTokenMint, G as createAllowlistedBundleProgram, H as DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, I as tokens, J as isAllowlistedBundleProgramId, K as createBundleProgramById, L as ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, M as SupportedToken, N as Token, O as OracleData, P as getSolanaTokenDecimals, R as BUNDLE_PROGRAM_ID_V2_MAINNET, S as VaultBalanceData, T as VaultRegistryEntry, U as DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, V as BundleProvider, W as assertAllowlistedBundleProgramId, _ as getVaultRegistry, b as vaultsDevnet, f as NeutralTrade, g as getVaultById, h as getVaultByAddress, j as SupportedChain, k as UserBundleAccount, m as getBundleProgramId, p as NeutralTradeConfig, q as getDefaultBundleProgramIdByCluster, t as NeutralTradeCoreContext, v as isValidVaultAddress, w as VaultRegistry, x as UserBalanceResult, y as vaults$1, z as BundleCluster } from "./neutral-trade-core-CtFKbCrr.mjs";
|
|
2
2
|
import { AnchorProvider, Program, Wallet } from "@coral-xyz/anchor";
|
|
3
3
|
import { Connection, PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
4
4
|
import BN from "bn.js";
|
|
@@ -12,6 +12,8 @@ declare function createDummyWallet(): Wallet;
|
|
|
12
12
|
* Auto-generated from the vault registry JSON.
|
|
13
13
|
*/
|
|
14
14
|
declare enum VaultId {
|
|
15
|
+
/** Ethereal-USDE-Bundle */
|
|
16
|
+
ethereal_usde_bundle_81 = 81,
|
|
15
17
|
/** Options-MM-Z */
|
|
16
18
|
options_mm_z_80 = 80,
|
|
17
19
|
/** Thirdeye-Flagship-USDC-Bundle */
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as VaultCategory, B as DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, C as getBundleProgramId, D as isValidVaultAddress, E as getVaultRegistry, F as getSolanaTokenMint, G as isAllowlistedBundleProgramId, H as createAllowlistedBundleProgram, I as tokens, K as createDummyWallet, L as ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, M as SupportedChain, N as SupportedToken, O as vaults, P as getSolanaTokenDecimals, R as BUNDLE_PROGRAM_ID_V2_MAINNET, S as parseAmountRawToBigInt, T as getVaultById, U as createBundleProgramById, V as assertAllowlistedBundleProgramId, W as getDefaultBundleProgramIdByCluster, _ as derivePendingAuthPDA, a as buildBundleDepositInstructions, b as getVaultDepositorAddressSync, d as computeRequestWithdrawalSharesFromAmountRaw, f as SEED_ORACLE, g as deriveOraclePDA, h as SEED_USER, i as initNeutralTradeCore, j as VaultType, k as vaultsDevnet, m as SEED_TEMP, n as buildRequestWithdrawInstructionForVaultId, o as buildBundleRequestSwitchInstruction, p as SEED_PENDING_AUTH, s as buildBundleRequestWithdrawInstruction, t as buildDepositInstructionsForVaultId, v as deriveTempDataPDA, w as getVaultByAddress, x as humanFloatToAmountRawString, y as deriveUserPDA, z as DEFAULT_BUNDLE_PROGRAM_ID_DEVNET } from "./neutral-trade-core-
|
|
1
|
+
import { A as VaultCategory, B as DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, C as getBundleProgramId, D as isValidVaultAddress, E as getVaultRegistry, F as getSolanaTokenMint, G as isAllowlistedBundleProgramId, H as createAllowlistedBundleProgram, I as tokens, K as createDummyWallet, L as ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, M as SupportedChain, N as SupportedToken, O as vaults, P as getSolanaTokenDecimals, R as BUNDLE_PROGRAM_ID_V2_MAINNET, S as parseAmountRawToBigInt, T as getVaultById, U as createBundleProgramById, V as assertAllowlistedBundleProgramId, W as getDefaultBundleProgramIdByCluster, _ as derivePendingAuthPDA, a as buildBundleDepositInstructions, b as getVaultDepositorAddressSync, d as computeRequestWithdrawalSharesFromAmountRaw, f as SEED_ORACLE, g as deriveOraclePDA, h as SEED_USER, i as initNeutralTradeCore, j as VaultType, k as vaultsDevnet, m as SEED_TEMP, n as buildRequestWithdrawInstructionForVaultId, o as buildBundleRequestSwitchInstruction, p as SEED_PENDING_AUTH, s as buildBundleRequestWithdrawInstruction, t as buildDepositInstructionsForVaultId, v as deriveTempDataPDA, w as getVaultByAddress, x as humanFloatToAmountRawString, y as deriveUserPDA, z as DEFAULT_BUNDLE_PROGRAM_ID_DEVNET } from "./neutral-trade-core-C_RJkaGL.mjs";
|
|
2
2
|
import { PublicKey } from "@solana/web3.js";
|
|
3
3
|
|
|
4
4
|
//#region src/constants/vault-ids.ts
|
|
@@ -7,6 +7,8 @@ import { PublicKey } from "@solana/web3.js";
|
|
|
7
7
|
* Auto-generated from the vault registry JSON.
|
|
8
8
|
*/
|
|
9
9
|
let VaultId = /* @__PURE__ */ function(VaultId$1) {
|
|
10
|
+
/** Ethereal-USDE-Bundle */
|
|
11
|
+
VaultId$1[VaultId$1["ethereal_usde_bundle_81"] = 81] = "ethereal_usde_bundle_81";
|
|
10
12
|
/** Options-MM-Z */
|
|
11
13
|
VaultId$1[VaultId$1["options_mm_z_80"] = 80] = "options_mm_z_80";
|
|
12
14
|
/** Thirdeye-Flagship-USDC-Bundle */
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as initNeutralTradeCore, c as BuildBundleRequestWithdrawInstructionCoreParams, d as buildBundleRequestWithdrawInstructionWithVault, i as getBundleProgramForVault, l as buildBundleDepositInstructionsWithVault, n as buildDepositInstructionsForVaultId, o as BuildBundleDepositInstructionsCoreParams, r as buildRequestWithdrawInstructionForVaultId, s as BuildBundleRequestSwitchInstructionCoreParams, t as NeutralTradeCoreContext, u as buildBundleRequestSwitchInstructionWithVault } from "./neutral-trade-core-
|
|
1
|
+
import { a as initNeutralTradeCore, c as BuildBundleRequestWithdrawInstructionCoreParams, d as buildBundleRequestWithdrawInstructionWithVault, i as getBundleProgramForVault, l as buildBundleDepositInstructionsWithVault, n as buildDepositInstructionsForVaultId, o as BuildBundleDepositInstructionsCoreParams, r as buildRequestWithdrawInstructionForVaultId, s as BuildBundleRequestSwitchInstructionCoreParams, t as NeutralTradeCoreContext, u as buildBundleRequestSwitchInstructionWithVault } from "./neutral-trade-core-CtFKbCrr.mjs";
|
|
2
2
|
export { type BuildBundleDepositInstructionsCoreParams, type BuildBundleRequestSwitchInstructionCoreParams, type BuildBundleRequestWithdrawInstructionCoreParams, type NeutralTradeCoreContext, buildBundleDepositInstructionsWithVault, buildBundleRequestSwitchInstructionWithVault, buildBundleRequestWithdrawInstructionWithVault, buildDepositInstructionsForVaultId, buildRequestWithdrawInstructionForVaultId, getBundleProgramForVault, initNeutralTradeCore };
|
package/dist/internal.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as buildBundleDepositInstructionsWithVault, i as initNeutralTradeCore, l as buildBundleRequestSwitchInstructionWithVault, n as buildRequestWithdrawInstructionForVaultId, r as getBundleProgramForVault, t as buildDepositInstructionsForVaultId, u as buildBundleRequestWithdrawInstructionWithVault } from "./neutral-trade-core-
|
|
1
|
+
import { c as buildBundleDepositInstructionsWithVault, i as initNeutralTradeCore, l as buildBundleRequestSwitchInstructionWithVault, n as buildRequestWithdrawInstructionForVaultId, r as getBundleProgramForVault, t as buildDepositInstructionsForVaultId, u as buildBundleRequestWithdrawInstructionWithVault } from "./neutral-trade-core-C_RJkaGL.mjs";
|
|
2
2
|
|
|
3
3
|
export { buildBundleDepositInstructionsWithVault, buildBundleRequestSwitchInstructionWithVault, buildBundleRequestWithdrawInstructionWithVault, buildDepositInstructionsForVaultId, buildRequestWithdrawInstructionForVaultId, getBundleProgramForVault, initNeutralTradeCore };
|
|
@@ -13362,6 +13362,16 @@ var vaults_devnet_default = [
|
|
|
13362
13362
|
//#endregion
|
|
13363
13363
|
//#region src/registry/vaults.json
|
|
13364
13364
|
var vaults_default = [
|
|
13365
|
+
{
|
|
13366
|
+
"vaultId": 81,
|
|
13367
|
+
"name": "Ethereal-USDE-Bundle",
|
|
13368
|
+
"type": "Bundle",
|
|
13369
|
+
"category": "Market Neutral",
|
|
13370
|
+
"vaultAddress": "HuwbT5aUYkFf8oniumt7XXJ1Y6GQv7EJACv55dAhjt6e",
|
|
13371
|
+
"depositToken": "USDE",
|
|
13372
|
+
"pointsMultiplier": 1,
|
|
13373
|
+
"pointsEnabled": false
|
|
13374
|
+
},
|
|
13365
13375
|
{
|
|
13366
13376
|
"vaultId": 80,
|
|
13367
13377
|
"name": "Options-MM-Z",
|
|
@@ -14199,6 +14209,7 @@ let SupportedChain = /* @__PURE__ */ function(SupportedChain$1) {
|
|
|
14199
14209
|
let SupportedToken = /* @__PURE__ */ function(SupportedToken$1) {
|
|
14200
14210
|
SupportedToken$1["USDC"] = "USDC";
|
|
14201
14211
|
SupportedToken$1["USDT"] = "USDT";
|
|
14212
|
+
SupportedToken$1["USDE"] = "USDE";
|
|
14202
14213
|
SupportedToken$1["SOL"] = "SOL";
|
|
14203
14214
|
SupportedToken$1["WBTC"] = "WBTC";
|
|
14204
14215
|
SupportedToken$1["WETH"] = "WETH";
|
|
@@ -14228,6 +14239,17 @@ const tokens = {
|
|
|
14228
14239
|
[SupportedChain.Hyperliquid]: null
|
|
14229
14240
|
}
|
|
14230
14241
|
},
|
|
14242
|
+
[SupportedToken.USDE]: {
|
|
14243
|
+
name: "Ethena USDe",
|
|
14244
|
+
symbol: "USDe",
|
|
14245
|
+
onChain: {
|
|
14246
|
+
[SupportedChain.Solana]: {
|
|
14247
|
+
address: "DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT",
|
|
14248
|
+
decimals: 9
|
|
14249
|
+
},
|
|
14250
|
+
[SupportedChain.Hyperliquid]: null
|
|
14251
|
+
}
|
|
14252
|
+
},
|
|
14231
14253
|
[SupportedToken.SOL]: {
|
|
14232
14254
|
name: "Wrapped SOL",
|
|
14233
14255
|
symbol: "WSOL",
|
|
@@ -14737,6 +14759,7 @@ async function buildBundleRequestSwitchInstruction({ connection, bundleCluster =
|
|
|
14737
14759
|
const TOKEN_TO_PYTH_FEED_ID = {
|
|
14738
14760
|
[SupportedToken.USDC]: "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
|
|
14739
14761
|
[SupportedToken.USDT]: "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b",
|
|
14762
|
+
[SupportedToken.USDE]: "6ec879b1e9963de5ee97e9c8710b742d6228252a5e2ca12d4ae81d7fe5ee8c5d",
|
|
14740
14763
|
[SupportedToken.SOL]: "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d",
|
|
14741
14764
|
[SupportedToken.WBTC]: "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
|
|
14742
14765
|
[SupportedToken.WETH]: "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
|