@neutral-trade/sdk 0.4.19 → 1.0.2
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 +27 -98
- package/dist/generated/index.d.mts +2 -0
- package/dist/generated/index.mjs +3 -0
- package/dist/generated-Dz86hd_Y.mjs +10240 -0
- package/dist/idl/index.d.mts +1536 -0
- package/dist/{neutral-trade-core-CHeKdVSh.mjs → idl/index.mjs} +1388 -7497
- package/dist/index-CCGD4ixE.d.mts +3489 -0
- package/dist/index.d.mts +352 -192
- package/dist/index.mjs +1606 -330
- package/package.json +25 -18
- package/dist/internal.d.mts +0 -2
- package/dist/internal.mjs +0 -3
- package/dist/neutral-trade-core-CtFKbCrr.d.mts +0 -4162
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,63 @@
|
|
|
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-CHeKdVSh.mjs";
|
|
2
|
-
import {
|
|
1
|
+
import { $ as NTBUNDLE_ERROR__ORACLE_NOT_UPDATED, $a as PROCESS_DEPOSIT_DISCRIMINATOR, $c as findTargetOracleDataPda, $i as getRemoveStrategyInstruction, $l as fetchAllOracleData, $n as getSetReferrerRateOverrideInstructionDataCodec, $o as getInitializePermissionedBundleDepositorInstructionDataEncoder, $r as getSetKeeperDiscriminatorBytes, $s as getCloseUserBundleAccountInstructionDataCodec, $t as getUpdateOracleInstructionDataCodec, A as NTBUNDLE_ERROR__INVALID_PERMISSIONNED_DEPOSITOR, Aa as getProcessWithdrawalDiscriminatorBytes, Ac as getChangeBundleMasterAdminInstructionDataCodec, Ai as getRequestWithdrawalInstructionAsync, Al as fetchAllMaybeStrategy, An as getSetUserWithdrawalTimingOverrideInstructionDataCodec, Ao as parseNetPendingTransactionsInstruction, Ar as parseSetOracleMaxAgeInstruction, As as getEndDistributionInstructionDataDecoder, At as NTBUNDLE_ERROR__UNAUTHORIZED_ADMIN_ACTION, Au as decodeBundleCreatorAccount, B as NTBUNDLE_ERROR__LEFT_TO_DISTRIBUTE_NOT_ZERO, Ba as getProcessSwitchInstructionAsync, Bc as getApplyFeesToUserInstructionDataEncoder, Bi as getRequestDepositInstructionDataDecoder, Bl as decodeReferrerAccount, Bn as getSetUserReferrerInstructionDataEncoder, Bo as getManagerWithdrawDiscriminatorBytes, Br as getSetMinDepositAmountInstruction, Bs as parseEnableStrategyInstruction, Bt as getNtbundleErrorMessage, Bu as BUNDLE_DISCRIMINATOR, C as NTBUNDLE_ERROR__INVALID_ASSET_ADDRESS, Ca as getReferrerRequestWithdrawInstruction, Cc as getChangeManagerInstructionDataDecoder, Ci as getSetBundleCreatorInstructionDataCodec, Cl as getUserBundleAccountCodec, Cn as getSetWithdrawalRedemptionScheduleInstructionDataDecoder, Co as NET_PENDING_TRANSACTIONS_DISCRIMINATOR, Cr as parseSetOracleUpdateTimeLimitInstruction, Cs as getInitializeBundleInstructionDataEncoder, Ct as NTBUNDLE_ERROR__SWITCH_ALREADY_ACTIVE, Cu as fetchMaybeBundleMasterAccount, D as NTBUNDLE_ERROR__INVALID_ORACLE_BUFFER, Da as getReferrerRequestWithdrawInstructionDataEncoder, Dc as getChangeBundleMasterAdminDiscriminatorBytes, Di as REQUEST_WITHDRAWAL_DISCRIMINATOR, Dl as getUserBundleAccountSize, Dn as getSetUserWithdrawalTimingOverrideDiscriminatorBytes, Do as getNetPendingTransactionsInstructionDataCodec, Dr as getSetOracleMaxAgeInstructionDataCodec, Ds as getEndDistributionInstruction, Dt as NTBUNDLE_ERROR__SWITCH_TARGET_SAME_AS_SOURCE, Du as getBundleMasterAccountEncoder, E as NTBUNDLE_ERROR__INVALID_NEUTRAL_FEE_INCREMENTER, Ea as getReferrerRequestWithdrawInstructionDataDecoder, Ec as CHANGE_BUNDLE_MASTER_ADMIN_DISCRIMINATOR, Ei as parseSetBundleCreatorInstruction, El as getUserBundleAccountEncoder, En as SET_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, Eo as getNetPendingTransactionsInstructionAsync, Er as getSetOracleMaxAgeInstruction, Es as getEndDistributionDiscriminatorBytes, Et as NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNT_MISMATCH, Eu as getBundleMasterAccountDiscriminatorBytes, F as NTBUNDLE_ERROR__INVALID_USER_WITHDRAWAL_TIMING_CONFIG, Fa as getProcessWithdrawalInstructionDataEncoder, Fc as getApplyFeesToUserDiscriminatorBytes, Fi as REQUEST_DEPOSIT_DISCRIMINATOR, Fl as getStrategyDecoder, Fn as getSetUserReferrerDiscriminatorBytes, Fo as getManagerWithdrawWithSplitInstructionDataCodec, Fr as getSetOracleBufferInstructionDataDecoder, Fs as getEnableStrategyInstruction, Ft as NTBUNDLE_ERROR__UNPAUSED_DEPOSITS_WITHDRAWALS, Fu as getBundleCreatorAccountCodec, G as NTBUNDLE_ERROR__MUST_BE_IN_WHITELIST, Ga as PROCESS_REFERRER_WITHDRAWAL_DISCRIMINATOR, Gc as getAddStrategyInstructionAsync, Gi as getRequestBundleSwitchInstruction, Gl as getReferrerAccountCodec, Gn as getSetUserFeeOverrideInstructionAsync, Go as getManagerWithdrawInstructionDataEncoder, Gr as SET_MAX_DEPOSIT_AMOUNT_DISCRIMINATOR, Gs as getDistributeToReceiversInstructionDataCodec, Gt as identifyNtbundleAccount, Gu as fetchMaybeBundle, H as NTBUNDLE_ERROR__MATH_ERROR, Ha as getProcessSwitchInstructionDataDecoder, Hc as ADD_STRATEGY_DISCRIMINATOR, Hi as parseRequestDepositInstruction, Hl as fetchAllReferrerAccount, Hn as SET_USER_FEE_OVERRIDE_DISCRIMINATOR, Ho as getManagerWithdrawInstructionAsync, Hr as getSetMinDepositAmountInstructionDataDecoder, Hs as getDistributeToReceiversDiscriminatorBytes, Ht as NTBUNDLE_PROGRAM_ADDRESS, Hu as fetchAllBundle, I as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_AMOUNT, Ia as parseProcessWithdrawalInstruction, Ic as getApplyFeesToUserInstruction, Ii as getRequestDepositDiscriminatorBytes, Il as getStrategyDiscriminatorBytes, In as getSetUserReferrerInstruction, Io as getManagerWithdrawWithSplitInstructionDataDecoder, Ir as getSetOracleBufferInstructionDataEncoder, Is as getEnableStrategyInstructionAsync, It as NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_HAS_ACTIVITY, Iu as getBundleCreatorAccountDecoder, J as NTBUNDLE_ERROR__NO_PENDING_SWITCH, Ja as getProcessReferrerWithdrawalInstructionAsync, Jc as getAddStrategyInstructionDataEncoder, Ji as getRequestBundleSwitchInstructionDataDecoder, Jl as getReferrerAccountEncoder, Jn as getSetUserFeeOverrideInstructionDataEncoder, Jo as getInitializePermissionedBundleDepositorDiscriminatorBytes, Jr as getSetMaxDepositAmountInstructionDataCodec, Js as parseDistributeToReceiversInstruction, Jt as parseNtbundleInstruction, Ju as getBundleDiscriminatorBytes, K as NTBUNDLE_ERROR__NETTING_ALREADY_DONE, Ka as getProcessReferrerWithdrawalDiscriminatorBytes, Kc as getAddStrategyInstructionDataCodec, Ki as getRequestBundleSwitchInstructionAsync, Kl as getReferrerAccountDecoder, Kn as getSetUserFeeOverrideInstructionDataCodec, Ko as parseManagerWithdrawInstruction, Kr as getSetMaxDepositAmountDiscriminatorBytes, Ks as getDistributeToReceiversInstructionDataDecoder, Kt as identifyNtbundleInstruction, Ku as getBundleCodec, L as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_COOLDOWN_PERIOD, La as PROCESS_SWITCH_DISCRIMINATOR, Lc as getApplyFeesToUserInstructionAsync, Li as getRequestDepositInstruction, Ll as getStrategyEncoder, Ln as getSetUserReferrerInstructionAsync, Lo as getManagerWithdrawWithSplitInstructionDataEncoder, Lr as parseSetOracleBufferInstruction, Ls as getEnableStrategyInstructionDataCodec, Lt as NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_NOT_EMPTY, Lu as getBundleCreatorAccountDiscriminatorBytes, M as NTBUNDLE_ERROR__INVALID_REFERRAL_CONFIG, Ma as getProcessWithdrawalInstructionAsync, Mc as getChangeBundleMasterAdminInstructionDataEncoder, Mi as getRequestWithdrawalInstructionDataDecoder, Ml as fetchMaybeStrategy, Mn as getSetUserWithdrawalTimingOverrideInstructionDataEncoder, Mo as getManagerWithdrawWithSplitDiscriminatorBytes, Mr as getSetOracleBufferDiscriminatorBytes, Ms as parseEndDistributionInstruction, Mt as NTBUNDLE_ERROR__UNAUTHORIZED_KEEPER_ACTION, Mu as fetchAllMaybeBundleCreatorAccount, N as NTBUNDLE_ERROR__INVALID_TWAP_PERIOD, Na as getProcessWithdrawalInstructionDataCodec, Nc as parseChangeBundleMasterAdminInstruction, Ni as getRequestWithdrawalInstructionDataEncoder, Nl as fetchStrategy, Nn as parseSetUserWithdrawalTimingOverrideInstruction, No as getManagerWithdrawWithSplitInstruction, Nr as getSetOracleBufferInstruction, Ns as ENABLE_STRATEGY_DISCRIMINATOR, Nt as NTBUNDLE_ERROR__UNAUTHORIZED_MANAGER_ACTION, Nu as fetchBundleCreatorAccount, O as NTBUNDLE_ERROR__INVALID_ORACLE_MAX_AGE, Oa as parseReferrerRequestWithdrawInstruction, Oc as getChangeBundleMasterAdminInstruction, Oi as getRequestWithdrawalDiscriminatorBytes, Ol as STRATEGY_DISCRIMINATOR, On as getSetUserWithdrawalTimingOverrideInstruction, Oo as getNetPendingTransactionsInstructionDataDecoder, Or as getSetOracleMaxAgeInstructionDataDecoder, Os as getEndDistributionInstructionAsync, Ot as NTBUNDLE_ERROR__TOO_MANY_ALLOCATED_RECEIVERS, Ou as getBundleMasterAccountSize, P as NTBUNDLE_ERROR__INVALID_USER_FEE_CONFIG, Pa as getProcessWithdrawalInstructionDataDecoder, Pc as APPLY_FEES_TO_USER_DISCRIMINATOR, Pi as parseRequestWithdrawalInstruction, Pl as getStrategyCodec, Pn as SET_USER_REFERRER_DISCRIMINATOR, Po as getManagerWithdrawWithSplitInstructionAsync, Pr as getSetOracleBufferInstructionDataCodec, Ps as getEnableStrategyDiscriminatorBytes, Pt as NTBUNDLE_ERROR__UNAUTHORIZED_REFERRER_ACTION, Pu as fetchMaybeBundleCreatorAccount, Q as NTBUNDLE_ERROR__NO_USER_WITHDRAWAL_TIMING_OVERRIDE_TO_CLEAR, Qa as parseProcessReferrerWithdrawalInstruction, Qc as findTargetPendingBundleAssetAuthorityPda, Qi as getRemoveStrategyDiscriminatorBytes, Ql as fetchAllMaybeOracleData, Qn as getSetReferrerRateOverrideInstruction, Qo as getInitializePermissionedBundleDepositorInstructionDataDecoder, Qr as SET_KEEPER_DISCRIMINATOR, Qs as getCloseUserBundleAccountInstructionAsync, Qt as getUpdateOracleInstructionAsync, R as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_DELAY, Ra as getProcessSwitchDiscriminatorBytes, Rc as getApplyFeesToUserInstructionDataCodec, Ri as getRequestDepositInstructionAsync, Rl as getStrategySize, Rn as getSetUserReferrerInstructionDataCodec, Ro as parseManagerWithdrawWithSplitInstruction, Rr as SET_MIN_DEPOSIT_AMOUNT_DISCRIMINATOR, Rs as getEnableStrategyInstructionDataDecoder, Rt as NTBUNDLE_ERROR__WITHDRAWAL_ALREADY_PROCESSED, Ru as getBundleCreatorAccountEncoder, S as NTBUNDLE_ERROR__INVALID_ALLOCATIONS, Sa as getReferrerRequestWithdrawDiscriminatorBytes, Sc as getChangeManagerInstructionDataCodec, Si as getSetBundleCreatorInstructionAsync, Sl as fetchUserBundleAccount, Sn as getSetWithdrawalRedemptionScheduleInstructionDataCodec, So as parsePauseDepositsWithdrawalsInstruction, Sr as getSetOracleUpdateTimeLimitInstructionDataEncoder, Ss as getInitializeBundleInstructionDataDecoder, St as NTBUNDLE_ERROR__STRATEGY_DISABLED, Su as fetchBundleMasterAccount, T as NTBUNDLE_ERROR__INVALID_FEE_SPLIT, Ta as getReferrerRequestWithdrawInstructionDataCodec, Tc as parseChangeManagerInstruction, Ti as getSetBundleCreatorInstructionDataEncoder, Tl as getUserBundleAccountDiscriminatorBytes, Tn as parseSetWithdrawalRedemptionScheduleInstruction, To as getNetPendingTransactionsInstruction, Tr as getSetOracleMaxAgeDiscriminatorBytes, Ts as END_DISTRIBUTION_DISCRIMINATOR, Tt as NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNTS_MISSING, Tu as getBundleMasterAccountDecoder, U as NTBUNDLE_ERROR__MAX_DEPOSIT_AMOUNT_EXCEEDED, Ua as getProcessSwitchInstructionDataEncoder, Uc as getAddStrategyDiscriminatorBytes, Ui as REQUEST_BUNDLE_SWITCH_DISCRIMINATOR, Ul as fetchMaybeReferrerAccount, Un as getSetUserFeeOverrideDiscriminatorBytes, Uo as getManagerWithdrawInstructionDataCodec, Ur as getSetMinDepositAmountInstructionDataEncoder, Us as getDistributeToReceiversInstruction, Ut as NtbundleAccount, Uu as fetchAllMaybeBundle, V as NTBUNDLE_ERROR__MANAGER_SHARES_ZERO, Va as getProcessSwitchInstructionDataCodec, Vc as parseApplyFeesToUserInstruction, Vi as getRequestDepositInstructionDataEncoder, Vl as fetchAllMaybeReferrerAccount, Vn as parseSetUserReferrerInstruction, Vo as getManagerWithdrawInstruction, Vr as getSetMinDepositAmountInstructionDataCodec, Vs as DISTRIBUTE_TO_RECEIVERS_DISCRIMINATOR, Vt as isNtbundleError, Vu as decodeBundle, W as NTBUNDLE_ERROR__MIN_DEPOSIT_AMOUNT_NOT_MET, Wa as parseProcessSwitchInstruction, Wc as getAddStrategyInstruction, Wi as getRequestBundleSwitchDiscriminatorBytes, Wl as fetchReferrerAccount, Wn as getSetUserFeeOverrideInstruction, Wo as getManagerWithdrawInstructionDataDecoder, Wr as parseSetMinDepositAmountInstruction, Ws as getDistributeToReceiversInstructionAsync, Wt as NtbundleInstruction, Wu as fetchBundle, X as NTBUNDLE_ERROR__NO_PENDING_WITHDRAWAL, Xa as getProcessReferrerWithdrawalInstructionDataDecoder, Xc as findUserBundleAccountPda, Xi as parseRequestBundleSwitchInstruction, Xl as ORACLE_DATA_DISCRIMINATOR, Xn as SET_REFERRER_RATE_OVERRIDE_DISCRIMINATOR, Xo as getInitializePermissionedBundleDepositorInstructionAsync, Xr as getSetMaxDepositAmountInstructionDataEncoder, Xs as getCloseUserBundleAccountDiscriminatorBytes, Xt as getUpdateOracleDiscriminatorBytes, Y as NTBUNDLE_ERROR__NO_PENDING_TRANSACTIONS, Ya as getProcessReferrerWithdrawalInstructionDataCodec, Yc as parseAddStrategyInstruction, Yi as getRequestBundleSwitchInstructionDataEncoder, Yl as getReferrerAccountSize, Yn as parseSetUserFeeOverrideInstruction, Yo as getInitializePermissionedBundleDepositorInstruction, Yr as getSetMaxDepositAmountInstructionDataDecoder, Ys as CLOSE_USER_BUNDLE_ACCOUNT_DISCRIMINATOR, Yt as UPDATE_ORACLE_DISCRIMINATOR, Yu as getBundleEncoder, Z as NTBUNDLE_ERROR__NO_USER_FEE_OVERRIDE_TO_CLEAR, Za as getProcessReferrerWithdrawalInstructionDataEncoder, Zc as findTargetUserBundleAccountPda, Zi as REMOVE_STRATEGY_DISCRIMINATOR, Zl as decodeOracleData, Zn as getSetReferrerRateOverrideDiscriminatorBytes, Zo as getInitializePermissionedBundleDepositorInstructionDataCodec, Zr as parseSetMaxDepositAmountInstruction, Zs as getCloseUserBundleAccountInstruction, Zt as getUpdateOracleInstruction, _ as NTBUNDLE_ERROR__EXCESSIVE_PERFORMANCE_FEE, _a as getRefundDepositInstructionDataCodec, _c as getClearUserFeeOverrideInstructionDataEncoder, _i as getSetDelaysInstructionDataEncoder, _l as USER_BUNDLE_ACCOUNT_DISCRIMINATOR, _n as getStartDistributionInstructionDataEncoder, _o as getPauseDepositsWithdrawalsInstruction, _r as SET_ORACLE_UPDATE_TIME_LIMIT_DISCRIMINATOR, _s as INITIALIZE_BUNDLE_DISCRIMINATOR, _t as NTBUNDLE_ERROR__REFERRER_DEPOSIT_TOO_LOW, _u as getBundleTempDataSize, a as NTBUNDLE_ERROR__BUNDLE_IS_PERMISSIONNED, aa as REGISTER_REFERRER_DISCRIMINATOR, ac as getClearUserWithdrawalTimingOverrideInstruction, ai as SET_FEES_DISCRIMINATOR, al as findSourceBundleAssetAuthorityPda, an as getUpdateAllocationsInstruction, ao as getProcessDepositInstructionDataEncoder, ar as getSetReferrerConfigInstruction, as as getInitializeBundleMasterAccountInstructionDataCodec, at as NTBUNDLE_ERROR__PENDING_DEPOSIT_OR_WITHDRAWAL_EXISTS, au as getOracleDataEncoder, b as NTBUNDLE_ERROR__INSUFFICIENT_FUNDS, ba as parseRefundDepositInstruction, bc as getChangeManagerDiscriminatorBytes, bi as getSetBundleCreatorDiscriminatorBytes, bl as fetchAllUserBundleAccount, bn as getSetWithdrawalRedemptionScheduleDiscriminatorBytes, bo as getPauseDepositsWithdrawalsInstructionDataDecoder, br as getSetOracleUpdateTimeLimitInstructionDataCodec, bs as getInitializeBundleInstructionAsync, bt as NTBUNDLE_ERROR__REFILL_AMOUNT_INVALID, bu as fetchAllBundleMasterAccount, c as NTBUNDLE_ERROR__DEPOSITS_EXTRA_IN_PENDINGS_NOT_ZERO, ca as getRegisterReferrerInstructionAsync, cc as getClearUserWithdrawalTimingOverrideInstructionDataDecoder, ci as getSetFeesInstructionDataCodec, cl as findReferrerAccountPda, cn as getUpdateAllocationsInstructionDataDecoder, co as getPerformRefillDiscriminatorBytes, cr as getSetReferrerConfigInstructionDataEncoder, cs as parseInitializeBundleMasterAccountInstruction, ct as NTBUNDLE_ERROR__POD_TOKEN_TOTAL_SUPPLY_ZERO, cu as decodeBundleTempData, d as NTBUNDLE_ERROR__DISTRIBUTION_NOT_STARTED, da as getRegisterReferrerInstructionDataEncoder, dc as CLEAR_USER_FEE_OVERRIDE_DISCRIMINATOR, di as parseSetFeesInstruction, dl as findCloseUserBundleAccountUserBundleAccountPda, dn as START_DISTRIBUTION_DISCRIMINATOR, do as getPerformRefillInstructionDataCodec, dr as getSetReferrerActiveDiscriminatorBytes, ds as getInitializeBundleDepositorInstruction, dt as NTBUNDLE_ERROR__REDEMPTION_AMOUNT_EXCEEDED, du as fetchBundleTempData, ea as getRemoveStrategyInstructionAsync, ec as getCloseUserBundleAccountInstructionDataDecoder, ei as getSetKeeperInstruction, el as findTargetBundleTempDataPda, en as getUpdateOracleInstructionDataDecoder, eo as getProcessDepositDiscriminatorBytes, er as getSetReferrerRateOverrideInstructionDataDecoder, es as parseInitializePermissionedBundleDepositorInstruction, et as NTBUNDLE_ERROR__ORACLE_UPDATE_TOO_FREQUENT, eu as fetchMaybeOracleData, f as NTBUNDLE_ERROR__EMPTY_USER_FEE_CLEAR_REQUEST, fa as parseRegisterReferrerInstruction, fc as getClearUserFeeOverrideDiscriminatorBytes, fi as SET_DELAYS_DISCRIMINATOR, fl as findBundleTempDataPda, fn as getStartDistributionDiscriminatorBytes, fo as getPerformRefillInstructionDataDecoder, fr as getSetReferrerActiveInstruction, fs as getInitializeBundleDepositorInstructionAsync, ft as NTBUNDLE_ERROR__REDEMPTION_AMOUNT_ZERO, fu as fetchMaybeBundleTempData, g as NTBUNDLE_ERROR__EXCESSIVE_MANAGEMENT_FEE, ga as getRefundDepositInstructionAsync, gc as getClearUserFeeOverrideInstructionDataDecoder, gi as getSetDelaysInstructionDataDecoder, gl as findBundleAccountPda, gn as getStartDistributionInstructionDataDecoder, go as getPauseDepositsWithdrawalsDiscriminatorBytes, gr as parseSetReferrerActiveInstruction, gs as parseInitializeBundleDepositorInstruction, gt as NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISSING, gu as getBundleTempDataEncoder, h as NTBUNDLE_ERROR__EXCESSIVE_DEPOSIT_FEE, ha as getRefundDepositInstruction, hc as getClearUserFeeOverrideInstructionDataCodec, hi as getSetDelaysInstructionDataCodec, hl as findBundleAssetAuthorityPda, hn as getStartDistributionInstructionDataCodec, ho as PAUSE_DEPOSITS_WITHDRAWALS_DISCRIMINATOR, hr as getSetReferrerActiveInstructionDataEncoder, hs as getInitializeBundleDepositorInstructionDataEncoder, ht as NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISMATCH, hu as getBundleTempDataDiscriminatorBytes, i as NTBUNDLE_ERROR__AMOUNT_MUST_BE_BELOW_MAX, ia as parseRemoveStrategyInstruction, ic as getClearUserWithdrawalTimingOverrideDiscriminatorBytes, ii as parseSetKeeperInstruction, il as findSourceBundleTempDataPda, in as getUpdateAllocationsDiscriminatorBytes, io as getProcessDepositInstructionDataDecoder, ir as getSetReferrerConfigDiscriminatorBytes, is as getInitializeBundleMasterAccountInstructionAsync, it as NTBUNDLE_ERROR__PENDING_DEPOSIT_EXISTS, iu as getOracleDataDiscriminatorBytes, j as NTBUNDLE_ERROR__INVALID_RECEIVER, ja as getProcessWithdrawalInstruction, jc as getChangeBundleMasterAdminInstructionDataDecoder, ji as getRequestWithdrawalInstructionDataCodec, jl as fetchAllStrategy, jn as getSetUserWithdrawalTimingOverrideInstructionDataDecoder, jo as MANAGER_WITHDRAW_WITH_SPLIT_DISCRIMINATOR, jr as SET_ORACLE_BUFFER_DISCRIMINATOR, js as getEndDistributionInstructionDataEncoder, jt as NTBUNDLE_ERROR__UNAUTHORIZED_BUNDLE_CREATOR, ju as fetchAllBundleCreatorAccount, k as NTBUNDLE_ERROR__INVALID_ORACLE_UPDATE_TIME_LIMIT, ka as PROCESS_WITHDRAWAL_DISCRIMINATOR, kc as getChangeBundleMasterAdminInstructionAsync, ki as getRequestWithdrawalInstruction, kl as decodeStrategy, kn as getSetUserWithdrawalTimingOverrideInstructionAsync, ko as getNetPendingTransactionsInstructionDataEncoder, kr as getSetOracleMaxAgeInstructionDataEncoder, ks as getEndDistributionInstructionDataCodec, kt as NTBUNDLE_ERROR__TOTAL_ASSET_EXCEED_NEW_MAX_DEPOSIT_AMOUNT, ku as BUNDLE_CREATOR_ACCOUNT_DISCRIMINATOR, l as NTBUNDLE_ERROR__DEPOSIT_AMOUNT_ZERO, la as getRegisterReferrerInstructionDataCodec, lc as getClearUserWithdrawalTimingOverrideInstructionDataEncoder, li as getSetFeesInstructionDataDecoder, ll as findPendingBundleAssetAuthorityPda, ln as getUpdateAllocationsInstructionDataEncoder, lo as getPerformRefillInstruction, lr as parseSetReferrerConfigInstruction, ls as INITIALIZE_BUNDLE_DEPOSITOR_DISCRIMINATOR, lt as NTBUNDLE_ERROR__RAW_TRANSFER_RECEIVER, lu as fetchAllBundleTempData, m as NTBUNDLE_ERROR__EQUITY_OUT_OF_BUFFER_BOUND, ma as getRefundDepositDiscriminatorBytes, mc as getClearUserFeeOverrideInstructionAsync, mi as getSetDelaysInstruction, ml as findBundleCreatorAccountPda, mn as getStartDistributionInstructionAsync, mo as parsePerformRefillInstruction, mr as getSetReferrerActiveInstructionDataDecoder, ms as getInitializeBundleDepositorInstructionDataDecoder, mt as NTBUNDLE_ERROR__REFERRAL_ALREADY_SET, mu as getBundleTempDataDecoder, n as NTBUNDLE_ERROR__ALLOCATION_BPS_GREATER_THAN_GLOBAL_ALLOCATION_BPS, na as getRemoveStrategyInstructionDataDecoder, nc as parseCloseUserBundleAccountInstruction, ni as getSetKeeperInstructionDataDecoder, nl as findSourceUserBundleAccountPda, nn as parseUpdateOracleInstruction, no as getProcessDepositInstructionAsync, nr as parseSetReferrerRateOverrideInstruction, ns as getInitializeBundleMasterAccountDiscriminatorBytes, nt as NTBUNDLE_ERROR__PAYER_NOT_AUTHORITY, nu as getOracleDataCodec, o as NTBUNDLE_ERROR__BUNDLE_NOT_PERMISSIONNED, oa as getRegisterReferrerDiscriminatorBytes, oc as getClearUserWithdrawalTimingOverrideInstructionAsync, oi as getSetFeesDiscriminatorBytes, ol as findRequestBundleSwitchUserBundleAccountPda, on as getUpdateAllocationsInstructionAsync, oo as parseProcessDepositInstruction, or as getSetReferrerConfigInstructionDataCodec, os as getInitializeBundleMasterAccountInstructionDataDecoder, ot as NTBUNDLE_ERROR__PENDING_TRANSACTIONS_EXIST, ou as getOracleDataSize, p as NTBUNDLE_ERROR__EMPTY_USER_WITHDRAWAL_TIMING_CLEAR_REQUEST, pa as REFUND_DEPOSIT_DISCRIMINATOR, pc as getClearUserFeeOverrideInstruction, pi as getSetDelaysDiscriminatorBytes, pl as findBundleMasterAccountPda, pn as getStartDistributionInstruction, po as getPerformRefillInstructionDataEncoder, pr as getSetReferrerActiveInstructionDataCodec, ps as getInitializeBundleDepositorInstructionDataCodec, pt as NTBUNDLE_ERROR__REFERRALS_DISABLED, pu as getBundleTempDataCodec, q as NTBUNDLE_ERROR__NETTING_NOT_DONE, qa as getProcessReferrerWithdrawalInstruction, qc as getAddStrategyInstructionDataDecoder, qi as getRequestBundleSwitchInstructionDataCodec, ql as getReferrerAccountDiscriminatorBytes, qn as getSetUserFeeOverrideInstructionDataDecoder, qo as INITIALIZE_PERMISSIONED_BUNDLE_DEPOSITOR_DISCRIMINATOR, qr as getSetMaxDepositAmountInstruction, qs as getDistributeToReceiversInstructionDataEncoder, qt as ntbundleProgram, qu as getBundleDecoder, r as NTBUNDLE_ERROR__ALLOCATION_BPS_IS_ZERO, ra as getRemoveStrategyInstructionDataEncoder, rc as CLEAR_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, ri as getSetKeeperInstructionDataEncoder, rl as findSourceOracleDataPda, rn as UPDATE_ALLOCATIONS_DISCRIMINATOR, ro as getProcessDepositInstructionDataCodec, rr as SET_REFERRER_CONFIG_DISCRIMINATOR, rs as getInitializeBundleMasterAccountInstruction, rt as NTBUNDLE_ERROR__PENDING_DEPOSIT_AMOUNT_ZERO, ru as getOracleDataDecoder, s as NTBUNDLE_ERROR__CALLER_NOT_NEUTRAL_FEE_INCREMENTER, sa as getRegisterReferrerInstruction, sc as getClearUserWithdrawalTimingOverrideInstructionDataCodec, si as getSetFeesInstruction, sl as findReferrerUserBundleAccountPda, sn as getUpdateAllocationsInstructionDataCodec, so as PERFORM_REFILL_DISCRIMINATOR, sr as getSetReferrerConfigInstructionDataDecoder, ss as getInitializeBundleMasterAccountInstructionDataEncoder, st as NTBUNDLE_ERROR__PENDING_WITHDRAWAL_EXISTS, su as BUNDLE_TEMP_DATA_DISCRIMINATOR, t as NTBUNDLE_ERROR__ALLOCATION_AMOUNT_ZERO, ta as getRemoveStrategyInstructionDataCodec, tc as getCloseUserBundleAccountInstructionDataEncoder, ti as getSetKeeperInstructionDataCodec, tl as findStrategyAccountPda, tn as getUpdateOracleInstructionDataEncoder, to as getProcessDepositInstruction, tr as getSetReferrerRateOverrideInstructionDataEncoder, ts as INITIALIZE_BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, tt as NTBUNDLE_ERROR__PAUSED_DEPOSITS_WITHDRAWALS, tu as fetchOracleData, u as NTBUNDLE_ERROR__DISTRIBUTION_ALREADY_STARTED, ua as getRegisterReferrerInstructionDataDecoder, uc as parseClearUserWithdrawalTimingOverrideInstruction, ui as getSetFeesInstructionDataEncoder, ul as findOracleDataPda, un as parseUpdateAllocationsInstruction, uo as getPerformRefillInstructionAsync, ur as SET_REFERRER_ACTIVE_DISCRIMINATOR, us as getInitializeBundleDepositorDiscriminatorBytes, ut as NTBUNDLE_ERROR__RECEIVER_ALREADY_ALLOCATED, uu as fetchAllMaybeBundleTempData, v as NTBUNDLE_ERROR__EXCESSIVE_WITHDRAW_FEE, va as getRefundDepositInstructionDataDecoder, vc as parseClearUserFeeOverrideInstruction, vi as parseSetDelaysInstruction, vl as decodeUserBundleAccount, vn as parseStartDistributionInstruction, vo as getPauseDepositsWithdrawalsInstructionAsync, vr as getSetOracleUpdateTimeLimitDiscriminatorBytes, vs as getInitializeBundleDiscriminatorBytes, vt as NTBUNDLE_ERROR__REFERRER_SHARES_ZERO, vu as BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, w as NTBUNDLE_ERROR__INVALID_ASSET_PRECISION, wa as getReferrerRequestWithdrawInstructionAsync, wc as getChangeManagerInstructionDataEncoder, wi as getSetBundleCreatorInstructionDataDecoder, wl as getUserBundleAccountDecoder, wn as getSetWithdrawalRedemptionScheduleInstructionDataEncoder, wo as getNetPendingTransactionsDiscriminatorBytes, wr as SET_ORACLE_MAX_AGE_DISCRIMINATOR, ws as parseInitializeBundleInstruction, wt as NTBUNDLE_ERROR__SWITCH_ASSET_MINT_MISMATCH, wu as getBundleMasterAccountCodec, x as NTBUNDLE_ERROR__INSUFFICIENT_SHARES_BALANCE, xa as REFERRER_REQUEST_WITHDRAW_DISCRIMINATOR, xc as getChangeManagerInstruction, xi as getSetBundleCreatorInstruction, xl as fetchMaybeUserBundleAccount, xn as getSetWithdrawalRedemptionScheduleInstruction, xo as getPauseDepositsWithdrawalsInstructionDataEncoder, xr as getSetOracleUpdateTimeLimitInstructionDataDecoder, xs as getInitializeBundleInstructionDataCodec, xt as NTBUNDLE_ERROR__STRATEGY_ALREADY_ENABLED, xu as fetchAllMaybeBundleMasterAccount, y as NTBUNDLE_ERROR__INSUFFICIENT_BUNDLE_BALANCE, ya as getRefundDepositInstructionDataEncoder, yc as CHANGE_MANAGER_DISCRIMINATOR, yi as SET_BUNDLE_CREATOR_DISCRIMINATOR, yl as fetchAllMaybeUserBundleAccount, yn as SET_WITHDRAWAL_REDEMPTION_SCHEDULE_DISCRIMINATOR, yo as getPauseDepositsWithdrawalsInstructionDataCodec, yr as getSetOracleUpdateTimeLimitInstruction, ys as getInitializeBundleInstruction, yt as NTBUNDLE_ERROR__REFILL_AMOUNT_EXCEEDED, yu as decodeBundleMasterAccount, z as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_REDEMPTION_SCHEDULE, za as getProcessSwitchInstruction, zc as getApplyFeesToUserInstructionDataDecoder, zi as getRequestDepositInstructionDataCodec, zl as REFERRER_ACCOUNT_DISCRIMINATOR, zn as getSetUserReferrerInstructionDataDecoder, zo as MANAGER_WITHDRAW_DISCRIMINATOR, zr as getSetMinDepositAmountDiscriminatorBytes, zs as getEnableStrategyInstructionDataEncoder, zt as NTBUNDLE_ERROR__WITHDRAWAL_DELAY_NOT_MET, zu as getBundleCreatorAccountSize } from "./generated-Dz86hd_Y.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { getAddressEncoder, getProgramDerivedAddress } from "@solana/kit";
|
|
3
4
|
|
|
5
|
+
//#region src/constants/programs.ts
|
|
6
|
+
const DEFAULT_BUNDLE_PROGRAM_ID_MAINNET = "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
|
|
7
|
+
/**
|
|
8
|
+
* Secondary mainnet ntbundle program id used by vaults that explicitly select it.
|
|
9
|
+
*/
|
|
10
|
+
const BUNDLE_PROGRAM_ID_V2_MAINNET = "BUNDeH5A4c47bcEoAjBhN3sCjLgYnRsmt9ibMztqVkC9";
|
|
11
|
+
const DEFAULT_BUNDLE_PROGRAM_ID_DEVNET = "CcR9whVnaW3STx6LLYotwy5JJXmnC8KDjtRotA3NCL8v";
|
|
12
|
+
function getDefaultBundleProgramIdByCluster(cluster = "mainnet") {
|
|
13
|
+
return cluster === "devnet" ? DEFAULT_BUNDLE_PROGRAM_ID_DEVNET : DEFAULT_BUNDLE_PROGRAM_ID_MAINNET;
|
|
14
|
+
}
|
|
15
|
+
const ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER = {
|
|
16
|
+
mainnet: [DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, BUNDLE_PROGRAM_ID_V2_MAINNET],
|
|
17
|
+
devnet: [DEFAULT_BUNDLE_PROGRAM_ID_DEVNET]
|
|
18
|
+
};
|
|
19
|
+
function isAllowlistedBundleProgramId(programId, cluster) {
|
|
20
|
+
return ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER[cluster].includes(programId);
|
|
21
|
+
}
|
|
22
|
+
function assertAllowlistedBundleProgramId(programId, cluster) {
|
|
23
|
+
if (!isAllowlistedBundleProgramId(programId, cluster)) throw new Error(`Unsupported bundle program id for ${cluster}: ${programId}`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/constants/vault-ids.devnet.ts
|
|
28
|
+
/**
|
|
29
|
+
* Vault ID constants (DevnetVaultId)
|
|
30
|
+
* Auto-generated from the vault registry JSON.
|
|
31
|
+
*/
|
|
32
|
+
let DevnetVaultId = /* @__PURE__ */ function(DevnetVaultId$1) {
|
|
33
|
+
/** bundle-1 */
|
|
34
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_1_100000002"] = 100000002] = "bundle_1_100000002";
|
|
35
|
+
/** bundle-2 */
|
|
36
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_2_100000003"] = 100000003] = "bundle_2_100000003";
|
|
37
|
+
/** bundle-4 */
|
|
38
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_4_100000004"] = 100000004] = "bundle_4_100000004";
|
|
39
|
+
/** bundle-5 */
|
|
40
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_5_100000005"] = 100000005] = "bundle_5_100000005";
|
|
41
|
+
/** bundle-6 */
|
|
42
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_6_100000006"] = 100000006] = "bundle_6_100000006";
|
|
43
|
+
/** bundle-7 */
|
|
44
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_7_100000007"] = 100000007] = "bundle_7_100000007";
|
|
45
|
+
/** bundle-8 */
|
|
46
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_8_100000008"] = 100000008] = "bundle_8_100000008";
|
|
47
|
+
/** bundle-9 */
|
|
48
|
+
DevnetVaultId$1[DevnetVaultId$1["bundle_9_100000009"] = 100000009] = "bundle_9_100000009";
|
|
49
|
+
return DevnetVaultId$1;
|
|
50
|
+
}({});
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
4
53
|
//#region src/constants/vault-ids.ts
|
|
5
54
|
/**
|
|
6
55
|
* Vault ID constants (VaultId)
|
|
7
56
|
* Auto-generated from the vault registry JSON.
|
|
8
57
|
*/
|
|
9
58
|
let VaultId = /* @__PURE__ */ function(VaultId$1) {
|
|
59
|
+
/** CTA-C-USDC-Bundle */
|
|
60
|
+
VaultId$1[VaultId$1["cta_c_usdc_bundle_83"] = 83] = "cta_c_usdc_bundle_83";
|
|
10
61
|
/** Nexus-USDC-Bundle */
|
|
11
62
|
VaultId$1[VaultId$1["nexus_usdc_bundle_82"] = 82] = "nexus_usdc_bundle_82";
|
|
12
63
|
/** Ethereal-USDE-Bundle */
|
|
@@ -177,381 +228,1606 @@ let VaultId = /* @__PURE__ */ function(VaultId$1) {
|
|
|
177
228
|
}({});
|
|
178
229
|
|
|
179
230
|
//#endregion
|
|
180
|
-
//#region src/
|
|
231
|
+
//#region src/registry/vaults.devnet.json
|
|
232
|
+
var vaults_devnet_default = [
|
|
233
|
+
{
|
|
234
|
+
"vaultId": 100000002,
|
|
235
|
+
"name": "bundle-1",
|
|
236
|
+
"type": "Bundle",
|
|
237
|
+
"category": "Market Neutral",
|
|
238
|
+
"vaultAddress": "HXvKAH4QyYMe7MsxC88pb19MhhYCEDHai87E8tZkmXmB",
|
|
239
|
+
"depositToken": "USDC",
|
|
240
|
+
"pointsMultiplier": 1,
|
|
241
|
+
"pointsEnabled": true
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"vaultId": 100000003,
|
|
245
|
+
"name": "bundle-2",
|
|
246
|
+
"type": "Bundle",
|
|
247
|
+
"category": "Market Neutral",
|
|
248
|
+
"vaultAddress": "6nRRXv7GzreuE1PUgHySf9u6wwzXq61eiQbBpik1fbjy",
|
|
249
|
+
"depositToken": "USDC",
|
|
250
|
+
"pointsMultiplier": 1,
|
|
251
|
+
"pointsEnabled": true
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"vaultId": 100000004,
|
|
255
|
+
"name": "bundle-4",
|
|
256
|
+
"type": "Bundle",
|
|
257
|
+
"category": "Market Neutral",
|
|
258
|
+
"vaultAddress": "8TqrZmyiWQ3F3WysiBaBQC1Nzj1LDn5AR7JjXBYzFxxQ",
|
|
259
|
+
"depositToken": "USDC",
|
|
260
|
+
"pointsMultiplier": 1,
|
|
261
|
+
"pointsEnabled": true
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"vaultId": 100000005,
|
|
265
|
+
"name": "bundle-5",
|
|
266
|
+
"type": "Bundle",
|
|
267
|
+
"category": "Market Neutral",
|
|
268
|
+
"vaultAddress": "J17FgERPmZ9JQNjpaCKb3ZsYseeyrpw3PXFPUrK7zLVa",
|
|
269
|
+
"depositToken": "USDC",
|
|
270
|
+
"pointsMultiplier": 1,
|
|
271
|
+
"pointsEnabled": true
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"vaultId": 100000006,
|
|
275
|
+
"name": "bundle-6",
|
|
276
|
+
"type": "Bundle",
|
|
277
|
+
"category": "Market Neutral",
|
|
278
|
+
"vaultAddress": "3VUBZk5V1KiPBdAj1Zkrnm3w8zriAg8UJ8Z155Ja8xdS",
|
|
279
|
+
"depositToken": "USDC",
|
|
280
|
+
"pointsMultiplier": 1,
|
|
281
|
+
"pointsEnabled": true
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"vaultId": 100000007,
|
|
285
|
+
"name": "bundle-7",
|
|
286
|
+
"type": "Bundle",
|
|
287
|
+
"category": "Market Neutral",
|
|
288
|
+
"vaultAddress": "C2SGzvgoZu754yVNEL8ChAyxePo54CPpuyY3qMkmBSJA",
|
|
289
|
+
"depositToken": "USDC",
|
|
290
|
+
"pointsMultiplier": 1,
|
|
291
|
+
"pointsEnabled": true
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"vaultId": 100000008,
|
|
295
|
+
"name": "bundle-8",
|
|
296
|
+
"type": "Bundle",
|
|
297
|
+
"category": "Market Neutral",
|
|
298
|
+
"vaultAddress": "H3jCQZWkMD3tPjLyzJiVq4unjX45YcN7J45zVPQXaegy",
|
|
299
|
+
"depositToken": "USDC",
|
|
300
|
+
"pointsMultiplier": 1,
|
|
301
|
+
"pointsEnabled": true
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"vaultId": 100000009,
|
|
305
|
+
"name": "bundle-9",
|
|
306
|
+
"type": "Bundle",
|
|
307
|
+
"category": "Market Neutral",
|
|
308
|
+
"vaultAddress": "4kdm7AHWVfXUDE4qErojXDdLGnU7taZN7rcJ11uaLkH1",
|
|
309
|
+
"depositToken": "USDC",
|
|
310
|
+
"pointsMultiplier": 1,
|
|
311
|
+
"pointsEnabled": true
|
|
312
|
+
}
|
|
313
|
+
];
|
|
314
|
+
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region src/registry/vaults.json
|
|
317
|
+
var vaults_default = [
|
|
318
|
+
{
|
|
319
|
+
"vaultId": 83,
|
|
320
|
+
"name": "CTA-C-USDC-Bundle",
|
|
321
|
+
"type": "Bundle",
|
|
322
|
+
"category": "Directional",
|
|
323
|
+
"vaultAddress": "G5aMxQTbGWMnYycpfjHpD7Y1muoKBwaB1HtCdpUUcQZp",
|
|
324
|
+
"depositToken": "USDC",
|
|
325
|
+
"pointsMultiplier": 1,
|
|
326
|
+
"pointsEnabled": true
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"vaultId": 82,
|
|
330
|
+
"name": "Nexus-USDC-Bundle",
|
|
331
|
+
"type": "Bundle",
|
|
332
|
+
"category": "Market Neutral",
|
|
333
|
+
"vaultAddress": "C68A4mAhA9EE4rWq9HmFnq3SPcbNmst6qiBWcna5VDHy",
|
|
334
|
+
"depositToken": "USDC",
|
|
335
|
+
"pointsMultiplier": 1,
|
|
336
|
+
"pointsEnabled": true
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"vaultId": 81,
|
|
340
|
+
"name": "Ethereal-USDE-Bundle",
|
|
341
|
+
"type": "Bundle",
|
|
342
|
+
"category": "Market Neutral",
|
|
343
|
+
"vaultAddress": "HuwbT5aUYkFf8oniumt7XXJ1Y6GQv7EJACv55dAhjt6e",
|
|
344
|
+
"depositToken": "USDE",
|
|
345
|
+
"pointsMultiplier": 1,
|
|
346
|
+
"pointsEnabled": false
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"vaultId": 80,
|
|
350
|
+
"name": "Options-MM-Z",
|
|
351
|
+
"type": "Bundle",
|
|
352
|
+
"category": "Market Neutral",
|
|
353
|
+
"vaultAddress": "3vZKAcd74bzwNYZmsJndYExkGj6ABQwrUoiMtdNfzLZe",
|
|
354
|
+
"depositToken": "USDC",
|
|
355
|
+
"pointsMultiplier": 1,
|
|
356
|
+
"pointsEnabled": false
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"vaultId": 79,
|
|
360
|
+
"name": "Thirdeye-Flagship-USDC-Bundle",
|
|
361
|
+
"type": "Bundle",
|
|
362
|
+
"category": "Directional",
|
|
363
|
+
"vaultAddress": "EjRMd8PwrdoeijMqvXovQdx99EejjM8MpW2KF869asW7",
|
|
364
|
+
"depositToken": "USDC",
|
|
365
|
+
"pointsMultiplier": 1,
|
|
366
|
+
"pointsEnabled": false
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"vaultId": 78,
|
|
370
|
+
"name": "Velox-Cross-USDC-Bundle",
|
|
371
|
+
"type": "Bundle",
|
|
372
|
+
"category": "Market Neutral",
|
|
373
|
+
"vaultAddress": "De47QBuMP7xukYBek5r4ScZF4HEk1kHW34ymKASz3DLt",
|
|
374
|
+
"depositToken": "USDC",
|
|
375
|
+
"pointsMultiplier": 1,
|
|
376
|
+
"pointsEnabled": true
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"vaultId": 77,
|
|
380
|
+
"name": "Hyperithm CTA",
|
|
381
|
+
"type": "Bundle",
|
|
382
|
+
"category": "Directional",
|
|
383
|
+
"vaultAddress": "Ec6uSz5EsffwfXp43pvpz4rf9ttJRFKES4ZSVX7gVVkQ",
|
|
384
|
+
"depositToken": "USDC",
|
|
385
|
+
"pointsMultiplier": 1,
|
|
386
|
+
"pointsEnabled": true
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"vaultId": 76,
|
|
390
|
+
"name": "Master Bundle",
|
|
391
|
+
"type": "Bundle",
|
|
392
|
+
"category": "Master Vault",
|
|
393
|
+
"vaultAddress": "J7qhMAKnB6G5dvoAN9281ufabajKbyGQxxd2bq6R7fPJ",
|
|
394
|
+
"depositToken": "USDC",
|
|
395
|
+
"pointsMultiplier": 2,
|
|
396
|
+
"pointsEnabled": true
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"vaultId": 75,
|
|
400
|
+
"name": "AdverseGuard Alpha",
|
|
401
|
+
"type": "Bundle",
|
|
402
|
+
"category": "Market Neutral",
|
|
403
|
+
"vaultAddress": "46gSEJLNTdDFq7DPjH8RbcTmG1gyw4JCKCr1XfuAfYvh",
|
|
404
|
+
"depositToken": "USDC",
|
|
405
|
+
"pointsMultiplier": 1,
|
|
406
|
+
"pointsEnabled": true
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"vaultId": 74,
|
|
410
|
+
"name": "Multi-Asset Volatility Arbitrage",
|
|
411
|
+
"type": "Bundle",
|
|
412
|
+
"category": "Market Neutral",
|
|
413
|
+
"vaultAddress": "4QBTzqUbn1crLg2PDUGt8abJfqHjeuZkjNLjCCit69ui",
|
|
414
|
+
"depositToken": "USDC",
|
|
415
|
+
"pointsMultiplier": 1,
|
|
416
|
+
"pointsEnabled": true
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"vaultId": 73,
|
|
420
|
+
"name": "Great Debasement",
|
|
421
|
+
"type": "Bundle",
|
|
422
|
+
"category": "Index",
|
|
423
|
+
"vaultAddress": "7jEMJqWsHCkMDqChEuBwFo4yg27TSWFDooB8NorkGcjD",
|
|
424
|
+
"pointsMultiplier": 1,
|
|
425
|
+
"pointsEnabled": false,
|
|
426
|
+
"depositToken": "USDC"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"vaultId": 72,
|
|
430
|
+
"name": "CTA-Adaptive Alpha",
|
|
431
|
+
"subname": "Atlas Research",
|
|
432
|
+
"type": "Bundle",
|
|
433
|
+
"category": "Directional",
|
|
434
|
+
"vaultAddress": "Eo3m78EQcHnwMyHtxaiz1vw4nwHa85RuGE8jLsrELhxj",
|
|
435
|
+
"depositToken": "USDC",
|
|
436
|
+
"pointsMultiplier": 1,
|
|
437
|
+
"pointsEnabled": true
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"vaultId": 71,
|
|
441
|
+
"name": "Hyperithm Cross-Exchange Arb",
|
|
442
|
+
"type": "Bundle",
|
|
443
|
+
"category": "Market Neutral",
|
|
444
|
+
"vaultAddress": "2bPiNfGc7exUcGkvV5nbsSkuNH3inFU18kgNEkB8fiaT",
|
|
445
|
+
"depositToken": "USDC",
|
|
446
|
+
"pointsMultiplier": 1,
|
|
447
|
+
"pointsEnabled": true
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"vaultId": 70,
|
|
451
|
+
"name": "Lighter LLP",
|
|
452
|
+
"type": "Bundle",
|
|
453
|
+
"category": "Private Credit",
|
|
454
|
+
"vaultAddress": "dvsWTBqogw1cou8ducadzc3YCmUssjrrio8LmMtNWmz",
|
|
455
|
+
"depositToken": "USDC",
|
|
456
|
+
"pointsMultiplier": 1,
|
|
457
|
+
"pointsEnabled": false
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"vaultId": 69,
|
|
461
|
+
"name": "JLP Delta Neutral",
|
|
462
|
+
"subname": "vault-jupiter",
|
|
463
|
+
"type": "Bundle",
|
|
464
|
+
"category": "Market Neutral",
|
|
465
|
+
"vaultAddress": "GiNbTRuRqvVGEEQGZKMjmwX84LrsbqfzVVNtWYbcZPCY",
|
|
466
|
+
"depositToken": "USDC",
|
|
467
|
+
"bundleProgramId": "BUNDeH5A4c47bcEoAjBhN3sCjLgYnRsmt9ibMztqVkC9",
|
|
468
|
+
"pointsMultiplier": 1,
|
|
469
|
+
"pointsEnabled": false
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"vaultId": 68,
|
|
473
|
+
"name": "SOL Super Staking",
|
|
474
|
+
"subname": "Perps",
|
|
475
|
+
"type": "Drift",
|
|
476
|
+
"category": "Yield Enhancement",
|
|
477
|
+
"vaultAddress": "DiZ2RKDmCxMwPy8tEQzeh6dhKDEB9F5yezyJpEYqQyk9",
|
|
478
|
+
"depositToken": "SOL",
|
|
479
|
+
"pointsMultiplier": 1,
|
|
480
|
+
"pointsEnabled": false
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"vaultId": 67,
|
|
484
|
+
"name": "Aster Funding Arb",
|
|
485
|
+
"type": "Bundle",
|
|
486
|
+
"category": "Market Neutral",
|
|
487
|
+
"vaultAddress": "976iyYPcj5obNC25A4SRP3quDLbDPeXLjF1cgUamMKBK",
|
|
488
|
+
"depositToken": "USDT",
|
|
489
|
+
"pointsMultiplier": 1,
|
|
490
|
+
"pointsEnabled": false
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"vaultId": 66,
|
|
494
|
+
"name": "Moon LP",
|
|
495
|
+
"type": "Bundle",
|
|
496
|
+
"category": "Index",
|
|
497
|
+
"vaultAddress": "FMtgtataz4L2efYanxTGpVjg4njNe2j8QLLsnw5zeBPx",
|
|
498
|
+
"depositToken": "USDC",
|
|
499
|
+
"pointsMultiplier": 1,
|
|
500
|
+
"pointsEnabled": false
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"vaultId": 65,
|
|
504
|
+
"name": "JLP Delta Neutral",
|
|
505
|
+
"subname": "Vault-CEX",
|
|
506
|
+
"type": "Bundle",
|
|
507
|
+
"category": "Market Neutral",
|
|
508
|
+
"vaultAddress": "9cMB2bMsLa9hZjRnjxFhg2DM9CLmjabMsGvfQUtdgupk",
|
|
509
|
+
"depositToken": "USDC",
|
|
510
|
+
"pointsMultiplier": 1,
|
|
511
|
+
"pointsEnabled": true
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"vaultId": 64,
|
|
515
|
+
"name": "JLP Delta Neutral",
|
|
516
|
+
"subname": "vip24",
|
|
517
|
+
"type": "Drift",
|
|
518
|
+
"category": "Market Neutral",
|
|
519
|
+
"vaultAddress": "2Z2YH1RAXS8CNJo3QkYpQ4WHGH9jzNQ5m8YunRkY65mf",
|
|
520
|
+
"depositToken": "USDC",
|
|
521
|
+
"pointsMultiplier": 1,
|
|
522
|
+
"pointsEnabled": false
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"vaultId": 63,
|
|
526
|
+
"name": "JLP Delta Neutral",
|
|
527
|
+
"subname": "vip23",
|
|
528
|
+
"type": "Drift",
|
|
529
|
+
"category": "Market Neutral",
|
|
530
|
+
"vaultAddress": "8oZhUFmrA7p3SkVX7o4nFfSLsmt3KfCyW8grFydtvvuj",
|
|
531
|
+
"depositToken": "USDC",
|
|
532
|
+
"pointsMultiplier": 1,
|
|
533
|
+
"pointsEnabled": false
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"vaultId": 62,
|
|
537
|
+
"name": "JLP Delta Neutral",
|
|
538
|
+
"subname": "vip22",
|
|
539
|
+
"type": "Drift",
|
|
540
|
+
"category": "Market Neutral",
|
|
541
|
+
"vaultAddress": "HhhFKvtkbz9v7nDxsFVD8Z3qSY2r9Ncc9rnKopFaGCkb",
|
|
542
|
+
"depositToken": "USDC",
|
|
543
|
+
"pointsMultiplier": 1,
|
|
544
|
+
"pointsEnabled": false
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"vaultId": 61,
|
|
548
|
+
"name": "USDC Max Yield",
|
|
549
|
+
"subname": "Kamino Lending",
|
|
550
|
+
"type": "Kamino",
|
|
551
|
+
"category": "Savings",
|
|
552
|
+
"vaultAddress": "67dqmR76uAbjX6e81A1ganKv3ou31WUMEdeWJkwVfeXy",
|
|
553
|
+
"depositToken": "USDC",
|
|
554
|
+
"pointsMultiplier": 1,
|
|
555
|
+
"pointsEnabled": true
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"vaultId": 60,
|
|
559
|
+
"name": "NT Earn",
|
|
560
|
+
"type": "Bundle",
|
|
561
|
+
"category": "Savings",
|
|
562
|
+
"vaultAddress": "HWjMfYfc7KoPchoEDa5UFyVSpJxY3aV1RAccKvABYb9z",
|
|
563
|
+
"depositToken": "USDC",
|
|
564
|
+
"pointsMultiplier": 1,
|
|
565
|
+
"pointsEnabled": true
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"vaultId": 59,
|
|
569
|
+
"name": "JLP Delta Neutral",
|
|
570
|
+
"subname": "Perena",
|
|
571
|
+
"type": "Drift",
|
|
572
|
+
"category": "Market Neutral",
|
|
573
|
+
"vaultAddress": "9vmBYT7hcjexuHM3iML3buTz3PchvULH5EfAjG12TtRZ",
|
|
574
|
+
"depositToken": "USDC",
|
|
575
|
+
"pointsMultiplier": 1,
|
|
576
|
+
"pointsEnabled": false
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"vaultId": 58,
|
|
580
|
+
"name": "Memes ETF",
|
|
581
|
+
"subname": "Generational Wealth",
|
|
582
|
+
"type": "Drift",
|
|
583
|
+
"category": "Index",
|
|
584
|
+
"vaultAddress": "AHfaqTwFhWiX2DZrYbTivBpbrstNJRyjHG4mFPVpJS5n",
|
|
585
|
+
"depositToken": "USDC",
|
|
586
|
+
"pointsEnabled": false
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"vaultId": 57,
|
|
590
|
+
"name": "JLP Delta Neutral",
|
|
591
|
+
"subname": "vip21",
|
|
592
|
+
"type": "Drift",
|
|
593
|
+
"category": "Market Neutral",
|
|
594
|
+
"vaultAddress": "7qPbUA5HmxjpoxniqoH8r5SZ5dY1hqYXGr8QSZsRXynX",
|
|
595
|
+
"depositToken": "USDC",
|
|
596
|
+
"pointsMultiplier": 1,
|
|
597
|
+
"pointsEnabled": false
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"vaultId": 56,
|
|
601
|
+
"name": "BTC Dominance",
|
|
602
|
+
"type": "Hyperliquid",
|
|
603
|
+
"category": "Bet",
|
|
604
|
+
"vaultAddress": "0x799e0112977c37f8d93a768cf5a2305bdd3ae6f9",
|
|
605
|
+
"depositToken": "USDC",
|
|
606
|
+
"pointsEnabled": false
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"vaultId": 55,
|
|
610
|
+
"name": "Alt Dominance",
|
|
611
|
+
"type": "Hyperliquid",
|
|
612
|
+
"category": "Bet",
|
|
613
|
+
"vaultAddress": "0xb03715bec4514ae7d338fcd85053ca227a1fb823",
|
|
614
|
+
"depositToken": "USDC",
|
|
615
|
+
"pointsEnabled": false
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"vaultId": 54,
|
|
619
|
+
"name": "HYPE / SOL Pairs Trade",
|
|
620
|
+
"type": "Hyperliquid",
|
|
621
|
+
"category": "Bet",
|
|
622
|
+
"vaultAddress": "0xaae8a508a5e39c134a4d6a49d7dce82a17f84651",
|
|
623
|
+
"depositToken": "USDC",
|
|
624
|
+
"pointsEnabled": false
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"vaultId": 53,
|
|
628
|
+
"name": "The Big Short",
|
|
629
|
+
"type": "Hyperliquid",
|
|
630
|
+
"category": "Bet",
|
|
631
|
+
"vaultAddress": "0xb2246d6f3ddeeca74cfd29dc3cce05c1746fcd68",
|
|
632
|
+
"depositToken": "USDC",
|
|
633
|
+
"pointsEnabled": false
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"vaultId": 52,
|
|
637
|
+
"name": "CTA Momentum",
|
|
638
|
+
"subname": "R* Research",
|
|
639
|
+
"type": "Bundle",
|
|
640
|
+
"category": "Directional",
|
|
641
|
+
"vaultAddress": "HDDrsNSYpfHHfr646T4vfZvXDKcbzYYBEGTietGgi7rh",
|
|
642
|
+
"depositToken": "USDC",
|
|
643
|
+
"pointsMultiplier": 1,
|
|
644
|
+
"pointsEnabled": false
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"vaultId": 51,
|
|
648
|
+
"name": "Term Max",
|
|
649
|
+
"type": "Bundle",
|
|
650
|
+
"category": "Private Credit",
|
|
651
|
+
"vaultAddress": "AvK6eRQNXiFfGSibrA96qDEtACkPyoouGrRGseryZFdE",
|
|
652
|
+
"depositToken": "USDC",
|
|
653
|
+
"pointsMultiplier": 1,
|
|
654
|
+
"pointsEnabled": false
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"vaultId": 50,
|
|
658
|
+
"name": "ALP Delta Neutral Forest",
|
|
659
|
+
"type": "Bundle",
|
|
660
|
+
"category": "Market Neutral",
|
|
661
|
+
"vaultAddress": "HELqBHiykXecZqYEHSKFh7mzythQoM8CaXQuR6TESdPB",
|
|
662
|
+
"depositToken": "USDC",
|
|
663
|
+
"pointsEnabled": false
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"vaultId": 49,
|
|
667
|
+
"name": "ALP Delta Neutral",
|
|
668
|
+
"type": "Bundle",
|
|
669
|
+
"category": "Market Neutral",
|
|
670
|
+
"vaultAddress": "5XNsfSeuB3SgknCHrbrv47UgcNNUMoG8CBzUJnwPcSej",
|
|
671
|
+
"depositToken": "USDC",
|
|
672
|
+
"pointsEnabled": false
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"vaultId": 48,
|
|
676
|
+
"name": "Hyperliquid Funding Arb",
|
|
677
|
+
"type": "Bundle",
|
|
678
|
+
"category": "Market Neutral",
|
|
679
|
+
"vaultAddress": "nE1x7KQq2sm3GQrafQUUdBkSPPT52FmiMM9qAS1dgnC",
|
|
680
|
+
"depositToken": "USDC",
|
|
681
|
+
"pointsMultiplier": 1,
|
|
682
|
+
"pointsEnabled": true
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
"vaultId": 47,
|
|
686
|
+
"name": "Long BONK, Short PUMP",
|
|
687
|
+
"type": "Drift",
|
|
688
|
+
"category": "Bet",
|
|
689
|
+
"vaultAddress": "7uUJtfVzhu6aXZypsARsAK8sjWsDxWJYUkaNzm3hTgid",
|
|
690
|
+
"depositToken": "USDC",
|
|
691
|
+
"pointsEnabled": false
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"vaultId": 46,
|
|
695
|
+
"name": "Hyper JLP",
|
|
696
|
+
"type": "Drift",
|
|
697
|
+
"category": "Index",
|
|
698
|
+
"vaultAddress": "A1B9MVput3r1jS91iu8ckdDiMSugXbQeEtvJEQsUHsPi",
|
|
699
|
+
"depositToken": "USDC",
|
|
700
|
+
"pointsMultiplier": 1,
|
|
701
|
+
"pointsEnabled": false
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"vaultId": 45,
|
|
705
|
+
"name": "FART Dominance",
|
|
706
|
+
"subname": "Hot Air Rises",
|
|
707
|
+
"type": "Drift",
|
|
708
|
+
"category": "Bet",
|
|
709
|
+
"vaultAddress": "5cbTtvNVg1qc5L5Fcnz9R3X2QsYTtMCwBZRwBbuoEhn5",
|
|
710
|
+
"depositToken": "USDC",
|
|
711
|
+
"pointsEnabled": false
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"vaultId": 44,
|
|
715
|
+
"name": "BTC Dominance",
|
|
716
|
+
"type": "Drift",
|
|
717
|
+
"category": "Bet",
|
|
718
|
+
"vaultAddress": "5BCDLjnQXv92AYySpdEpENgYhABaVf92fym1MYNyhVuo",
|
|
719
|
+
"depositToken": "USDC",
|
|
720
|
+
"pointsEnabled": false
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"vaultId": 43,
|
|
724
|
+
"name": "JLP Delta Neutral",
|
|
725
|
+
"subname": "vip team",
|
|
726
|
+
"type": "Drift",
|
|
727
|
+
"category": "Market Neutral",
|
|
728
|
+
"vaultAddress": "FBYp9toQEqNiGeP8BzyvRD1FUauJBFk5eYUEkgqvigZ5",
|
|
729
|
+
"depositToken": "USDC",
|
|
730
|
+
"pointsEnabled": false
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
"vaultId": 42,
|
|
734
|
+
"name": "BTC Savings",
|
|
735
|
+
"subname": "Drawdown Protected",
|
|
736
|
+
"type": "Drift",
|
|
737
|
+
"category": "Savings",
|
|
738
|
+
"vaultAddress": "494C23vX4h7Bhfyz92hScg71PXn9huG9SqY8mFYhRJoK",
|
|
739
|
+
"depositToken": "WBTC",
|
|
740
|
+
"pointsEnabled": false
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"vaultId": 41,
|
|
744
|
+
"name": "ETH Savings",
|
|
745
|
+
"subname": "Drawdown Protected",
|
|
746
|
+
"type": "Drift",
|
|
747
|
+
"category": "Savings",
|
|
748
|
+
"vaultAddress": "8JjFwxduSVCY91s2yBVGgKSAKPwPkuTKEchjRw74Du5w",
|
|
749
|
+
"depositToken": "WETH",
|
|
750
|
+
"pointsEnabled": false
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"vaultId": 40,
|
|
754
|
+
"name": "SOL Savings",
|
|
755
|
+
"subname": "Drawdown Protected",
|
|
756
|
+
"type": "Drift",
|
|
757
|
+
"category": "Savings",
|
|
758
|
+
"vaultAddress": "A6cPV4DrePTUUamBM87MDqK9kBy9vbucjhrCxtxzExK9",
|
|
759
|
+
"depositToken": "SOL",
|
|
760
|
+
"pointsEnabled": false
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"vaultId": 39,
|
|
764
|
+
"name": "USDC Savings",
|
|
765
|
+
"subname": "Drawdown Protected",
|
|
766
|
+
"type": "Drift",
|
|
767
|
+
"category": "Savings",
|
|
768
|
+
"vaultAddress": "4i2L5zvzUM5LXqUYm35Ytv4BGSmnFVTqG5xtFfJesm14",
|
|
769
|
+
"depositToken": "USDC",
|
|
770
|
+
"pointsEnabled": false
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"vaultId": 38,
|
|
774
|
+
"name": "FUEL Maxi",
|
|
775
|
+
"type": "Drift",
|
|
776
|
+
"category": "Airdrop Farming",
|
|
777
|
+
"vaultAddress": "DzaHA2zD7XQhj2Z6tG9YxVtgcvJ4sqzeLYr8dszyQTEq",
|
|
778
|
+
"depositToken": "USDC",
|
|
779
|
+
"pointsEnabled": false
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"vaultId": 37,
|
|
783
|
+
"name": "Inverse JLP DN",
|
|
784
|
+
"subname": "The Big Short",
|
|
785
|
+
"type": "Drift",
|
|
786
|
+
"category": "Bet",
|
|
787
|
+
"vaultAddress": "2csxi2M4uMijHW3CvnHqAYJ9CcLcZbGmDNKSz1qjRAVQ",
|
|
788
|
+
"depositToken": "USDC",
|
|
789
|
+
"pointsEnabled": false
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"vaultId": 36,
|
|
793
|
+
"name": "JLP Delta Neutral",
|
|
794
|
+
"subname": "Neutralized JLP",
|
|
795
|
+
"type": "Drift",
|
|
796
|
+
"category": "Market Neutral",
|
|
797
|
+
"vaultAddress": "CG2zv4wsSetgs6mAucEKnHPwSoZSLYMwGroembTUNeaU",
|
|
798
|
+
"depositToken": "JLP",
|
|
799
|
+
"pointsMultiplier": 1,
|
|
800
|
+
"pointsEnabled": false
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"vaultId": 35,
|
|
804
|
+
"name": "JLP Delta Neutral",
|
|
805
|
+
"subname": "vip20",
|
|
806
|
+
"type": "Drift",
|
|
807
|
+
"category": "Market Neutral",
|
|
808
|
+
"vaultAddress": "AAiykf4cgdFxz4kyRNuCFf9xFwy7c1gHiWacydmi1jLS",
|
|
809
|
+
"depositToken": "USDC",
|
|
810
|
+
"pointsEnabled": false
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"vaultId": 34,
|
|
814
|
+
"name": "JLP Delta Neutral",
|
|
815
|
+
"subname": "vip19",
|
|
816
|
+
"type": "Drift",
|
|
817
|
+
"category": "Market Neutral",
|
|
818
|
+
"vaultAddress": "5DPwSqEfaEsBH4zzZha35TpWRRPnWFfVgYZyK3zNswT7",
|
|
819
|
+
"depositToken": "USDC",
|
|
820
|
+
"pointsMultiplier": 1,
|
|
821
|
+
"pointsEnabled": false
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"vaultId": 33,
|
|
825
|
+
"name": "JLP Delta Neutral",
|
|
826
|
+
"subname": "Project Super",
|
|
827
|
+
"type": "Drift",
|
|
828
|
+
"category": "Market Neutral",
|
|
829
|
+
"vaultAddress": "6un71hP7xhpc8nqWWnbYPiamjAckEGH1A6zzenpGdZLf",
|
|
830
|
+
"depositToken": "USDC",
|
|
831
|
+
"pointsMultiplier": 1,
|
|
832
|
+
"pointsEnabled": false
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"vaultId": 32,
|
|
836
|
+
"name": "JLP Delta Neutral",
|
|
837
|
+
"subname": "vip pool 1",
|
|
838
|
+
"type": "Drift",
|
|
839
|
+
"category": "Market Neutral",
|
|
840
|
+
"vaultAddress": "5FqiXogZCcyZoNeTZzNvywY5s9ZRzNsPPkZ2Q4YRu6ww",
|
|
841
|
+
"depositToken": "USDC",
|
|
842
|
+
"pointsMultiplier": 1,
|
|
843
|
+
"pointsEnabled": false
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"vaultId": 31,
|
|
847
|
+
"name": "JLP Delta Neutral",
|
|
848
|
+
"subname": "Drift-5",
|
|
849
|
+
"type": "Drift",
|
|
850
|
+
"category": "Market Neutral",
|
|
851
|
+
"vaultAddress": "9omhWDzVxpX1vPBxAhJpVao7baoVzZpNib32vozZLxGm",
|
|
852
|
+
"depositToken": "USDC",
|
|
853
|
+
"pointsEnabled": false
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"vaultId": 30,
|
|
857
|
+
"name": "Long SOL, Short ETH",
|
|
858
|
+
"subname": "Solana Flippening",
|
|
859
|
+
"type": "Drift",
|
|
860
|
+
"category": "Bet",
|
|
861
|
+
"vaultAddress": "2zsHAfvD2BpmZbuPhc32dija8cXu8ow6n2yzyZTMvQ8V",
|
|
862
|
+
"depositToken": "USDC",
|
|
863
|
+
"pointsMultiplier": 1,
|
|
864
|
+
"pointsEnabled": false
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"vaultId": 29,
|
|
868
|
+
"name": "JLP Delta Neutral",
|
|
869
|
+
"subname": "Drift-4",
|
|
870
|
+
"type": "Drift",
|
|
871
|
+
"category": "Market Neutral",
|
|
872
|
+
"vaultAddress": "46fQeq1UX5djNkrY5d942inhRHjp1cTZmWBeCUZoqWT3",
|
|
873
|
+
"depositToken": "USDC",
|
|
874
|
+
"pointsMultiplier": 1,
|
|
875
|
+
"pointsEnabled": false
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"vaultId": 28,
|
|
879
|
+
"name": "JLP Delta Neutral",
|
|
880
|
+
"subname": "vip18",
|
|
881
|
+
"type": "Drift",
|
|
882
|
+
"category": "Market Neutral",
|
|
883
|
+
"vaultAddress": "1CUvZgVGaxV6sDUjFrWHyzukWBD2amUi3dQkvh9KKVA",
|
|
884
|
+
"depositToken": "USDC",
|
|
885
|
+
"pointsEnabled": false
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"vaultId": 27,
|
|
889
|
+
"name": "JLP Delta Neutral",
|
|
890
|
+
"subname": "vip17",
|
|
891
|
+
"type": "Drift",
|
|
892
|
+
"category": "Market Neutral",
|
|
893
|
+
"vaultAddress": "3UhqS9P4AhKMrCv7yE1LujgQS2xjFnRhANC5dPf2bZem",
|
|
894
|
+
"depositToken": "USDC",
|
|
895
|
+
"pointsEnabled": false
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"vaultId": 26,
|
|
899
|
+
"name": "BTC Super Staking",
|
|
900
|
+
"subname": "tangem",
|
|
901
|
+
"type": "Drift",
|
|
902
|
+
"category": "Yield Enhancement",
|
|
903
|
+
"vaultAddress": "6E2sh7ygUzXFJAafXX5sMeSj7eK6YkYqpoAzXm7bYtCw",
|
|
904
|
+
"depositToken": "WBTC",
|
|
905
|
+
"pointsMultiplier": 1,
|
|
906
|
+
"pointsEnabled": false
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"vaultId": 25,
|
|
910
|
+
"name": "JLP Delta Neutral",
|
|
911
|
+
"subname": "tangem",
|
|
912
|
+
"type": "Drift",
|
|
913
|
+
"category": "Market Neutral",
|
|
914
|
+
"vaultAddress": "HS2anXrdps1S2DZCHepgzfcoaqSUWBBuuqTRMugJisP2",
|
|
915
|
+
"depositToken": "USDC",
|
|
916
|
+
"pointsMultiplier": 1,
|
|
917
|
+
"pointsEnabled": false
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"vaultId": 24,
|
|
921
|
+
"name": "JLP Delta Neutral",
|
|
922
|
+
"subname": "vip16",
|
|
923
|
+
"type": "Drift",
|
|
924
|
+
"category": "Market Neutral",
|
|
925
|
+
"vaultAddress": "4H3wAK5tkT7G1vFrj6J9jWGvbaqVGkzPPBsp9qyKUYz9",
|
|
926
|
+
"depositToken": "USDC",
|
|
927
|
+
"pointsEnabled": false
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"vaultId": 23,
|
|
931
|
+
"name": "JLP Delta Neutral",
|
|
932
|
+
"subname": "vip15",
|
|
933
|
+
"type": "Drift",
|
|
934
|
+
"category": "Market Neutral",
|
|
935
|
+
"vaultAddress": "AwVR9y8Qw5erzrzE8hcs1j1se86yBwmrRidWb1qzaAy2",
|
|
936
|
+
"depositToken": "USDC",
|
|
937
|
+
"pointsMultiplier": 1,
|
|
938
|
+
"pointsEnabled": false
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"vaultId": 22,
|
|
942
|
+
"name": "JLP Delta Neutral",
|
|
943
|
+
"subname": "vip14",
|
|
944
|
+
"type": "Drift",
|
|
945
|
+
"category": "Market Neutral",
|
|
946
|
+
"vaultAddress": "4iSH214QLwWnJQNwTH6VfH4oNcPccr7HnMmsybjnTtez",
|
|
947
|
+
"depositToken": "USDC",
|
|
948
|
+
"pointsEnabled": false
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"vaultId": 21,
|
|
952
|
+
"name": "SOL Momentum",
|
|
953
|
+
"subname": "CTA-Marco",
|
|
954
|
+
"type": "Drift",
|
|
955
|
+
"category": "Directional",
|
|
956
|
+
"vaultAddress": "DbAX9qNiHrtrngLz8e5nBNWbmeGGVRKUQtxfGdENCFJS",
|
|
957
|
+
"depositToken": "USDC",
|
|
958
|
+
"pointsEnabled": false
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"vaultId": 20,
|
|
962
|
+
"name": "JLP Delta Neutral",
|
|
963
|
+
"subname": "vip13",
|
|
964
|
+
"type": "Drift",
|
|
965
|
+
"category": "Market Neutral",
|
|
966
|
+
"vaultAddress": "9V2LggfMo1EjaBbq3qBRBifD287m8zryrZgTR72grcCp",
|
|
967
|
+
"depositToken": "USDC",
|
|
968
|
+
"pointsEnabled": false
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"vaultId": 19,
|
|
972
|
+
"name": "JLP Delta Neutral",
|
|
973
|
+
"subname": "vip12",
|
|
974
|
+
"type": "Drift",
|
|
975
|
+
"category": "Market Neutral",
|
|
976
|
+
"vaultAddress": "GpMcLVnUqE1RyEB5rRFsFQJGKiPBBXqrpFsdbfUPgbqv",
|
|
977
|
+
"depositToken": "USDC",
|
|
978
|
+
"pointsEnabled": false
|
|
979
|
+
},
|
|
980
|
+
{
|
|
981
|
+
"vaultId": 18,
|
|
982
|
+
"name": "JLP Delta Neutral",
|
|
983
|
+
"subname": "vip11",
|
|
984
|
+
"type": "Drift",
|
|
985
|
+
"category": "Market Neutral",
|
|
986
|
+
"vaultAddress": "HhLwXF15V3MTVG9ucGGmT6mcEuqt2BjHuTCJBi4Zvi4K",
|
|
987
|
+
"depositToken": "USDC",
|
|
988
|
+
"pointsEnabled": false
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"vaultId": 17,
|
|
992
|
+
"name": "USDC Staking",
|
|
993
|
+
"subname": "vip10",
|
|
994
|
+
"type": "Drift",
|
|
995
|
+
"category": "Market Neutral",
|
|
996
|
+
"vaultAddress": "5Wv7V9zLGD3g7JTXfYjpzFEs42kjowXqUHh7wQ5ryVef",
|
|
997
|
+
"depositToken": "USDC",
|
|
998
|
+
"pointsEnabled": false
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
"vaultId": 16,
|
|
1002
|
+
"name": "JLP Delta Neutral",
|
|
1003
|
+
"subname": "Drift-3",
|
|
1004
|
+
"type": "Drift",
|
|
1005
|
+
"category": "Market Neutral",
|
|
1006
|
+
"vaultAddress": "7ngzeBygEksaBvKzHEeihqoLpDpWqTNRMVh2wCyb6NP8",
|
|
1007
|
+
"depositToken": "USDC",
|
|
1008
|
+
"pointsMultiplier": 1,
|
|
1009
|
+
"pointsEnabled": false
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"vaultId": 15,
|
|
1013
|
+
"name": "SOL Super Staking",
|
|
1014
|
+
"subname": "vip8",
|
|
1015
|
+
"type": "Drift",
|
|
1016
|
+
"category": "Yield Enhancement",
|
|
1017
|
+
"vaultAddress": "CYUyHzu6Z3JyBhfkQpZZwWqa2zpcmzaK1xXS96n8ea1U",
|
|
1018
|
+
"depositToken": "SOL",
|
|
1019
|
+
"pointsEnabled": false
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"vaultId": 14,
|
|
1023
|
+
"name": "JLP Delta Neutral",
|
|
1024
|
+
"subname": "vip7",
|
|
1025
|
+
"type": "Drift",
|
|
1026
|
+
"category": "Market Neutral",
|
|
1027
|
+
"vaultAddress": "HTLvAjqc6Wkzh4i4QNLHhQHZAnrtVvkGyYeyCiUWLe9b",
|
|
1028
|
+
"depositToken": "USDC",
|
|
1029
|
+
"pointsEnabled": false
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"vaultId": 13,
|
|
1033
|
+
"name": "JLP Delta Neutral",
|
|
1034
|
+
"subname": "vip6",
|
|
1035
|
+
"type": "Drift",
|
|
1036
|
+
"category": "Market Neutral",
|
|
1037
|
+
"vaultAddress": "6DFDj66PbPoTC16Sh51MJijoTTMYCbMCVC85tnc5UfQ3",
|
|
1038
|
+
"depositToken": "USDC",
|
|
1039
|
+
"pointsEnabled": false
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"vaultId": 12,
|
|
1043
|
+
"name": "JLP Delta Neutral",
|
|
1044
|
+
"subname": "vip5",
|
|
1045
|
+
"type": "Drift",
|
|
1046
|
+
"category": "Market Neutral",
|
|
1047
|
+
"vaultAddress": "9BMEyctGvajEubk5iCRBnM9fkeTXUhrxaweYq34jZdC8",
|
|
1048
|
+
"depositToken": "USDC",
|
|
1049
|
+
"pointsEnabled": false
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"vaultId": 11,
|
|
1053
|
+
"name": "USDC Basis",
|
|
1054
|
+
"subname": "Perps Basket",
|
|
1055
|
+
"type": "Drift",
|
|
1056
|
+
"category": "Market Neutral",
|
|
1057
|
+
"vaultAddress": "4cvgasNfbJ36yeMVJSkscgL2Yco9dFGdj52Wrg91fmHv",
|
|
1058
|
+
"depositToken": "USDC",
|
|
1059
|
+
"pointsEnabled": false
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"vaultId": 10,
|
|
1063
|
+
"name": "JLP Delta Neutral",
|
|
1064
|
+
"subname": "vip3",
|
|
1065
|
+
"type": "Drift",
|
|
1066
|
+
"category": "Market Neutral",
|
|
1067
|
+
"vaultAddress": "Fd3k4c6Dv7m9673ae87P6duQrftY9UVfwiCxngNbJrUQ",
|
|
1068
|
+
"depositToken": "USDC",
|
|
1069
|
+
"pointsEnabled": false
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"vaultId": 9,
|
|
1073
|
+
"name": "JLP Delta Neutral",
|
|
1074
|
+
"subname": "vip2",
|
|
1075
|
+
"type": "Drift",
|
|
1076
|
+
"category": "Market Neutral",
|
|
1077
|
+
"vaultAddress": "DUW6uWcrsjYmsYDjp9iGDN4JdRa2MqznjuxjKVok5Fsj",
|
|
1078
|
+
"depositToken": "USDC",
|
|
1079
|
+
"pointsMultiplier": 1,
|
|
1080
|
+
"pointsEnabled": false
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"vaultId": 8,
|
|
1084
|
+
"name": "Drift funding arb",
|
|
1085
|
+
"type": "Drift",
|
|
1086
|
+
"category": "Market Neutral",
|
|
1087
|
+
"vaultAddress": "CxL8eQmGhN9LKSoHj7bU95JekFPtyZoUc57mbehb5A56",
|
|
1088
|
+
"depositToken": "USDC",
|
|
1089
|
+
"pointsMultiplier": 1,
|
|
1090
|
+
"pointsEnabled": false
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"vaultId": 7,
|
|
1094
|
+
"name": "JLP Traders Print",
|
|
1095
|
+
"type": "Drift",
|
|
1096
|
+
"category": "Bet",
|
|
1097
|
+
"vaultAddress": "85XuR4kE5yxp1hk91WHAawinXZsuJowxy59STYYpM9pK",
|
|
1098
|
+
"depositToken": "USDC",
|
|
1099
|
+
"pointsEnabled": false
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"vaultId": 6,
|
|
1103
|
+
"name": "ETH Super Staking",
|
|
1104
|
+
"type": "Drift",
|
|
1105
|
+
"category": "Yield Enhancement",
|
|
1106
|
+
"vaultAddress": "ENr5e1BMN5vFUHf4iCCPzR4GjWCKgtHnQcdniRQqMdEL",
|
|
1107
|
+
"depositToken": "WETH",
|
|
1108
|
+
"pointsMultiplier": 1,
|
|
1109
|
+
"pointsEnabled": false
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"vaultId": 5,
|
|
1113
|
+
"name": "JLP Delta Neutral",
|
|
1114
|
+
"subname": "vip1",
|
|
1115
|
+
"type": "Drift",
|
|
1116
|
+
"category": "Market Neutral",
|
|
1117
|
+
"vaultAddress": "CZU38L2NyL6tqFxzYAGYkmkf2JG98tZfZ2CnUapVgXQe",
|
|
1118
|
+
"depositToken": "USDC",
|
|
1119
|
+
"pointsEnabled": false
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"vaultId": 4,
|
|
1123
|
+
"name": "JLP Delta Neutral",
|
|
1124
|
+
"subname": "Drift-2",
|
|
1125
|
+
"type": "Drift",
|
|
1126
|
+
"category": "Market Neutral",
|
|
1127
|
+
"vaultAddress": "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU",
|
|
1128
|
+
"depositToken": "USDC",
|
|
1129
|
+
"pointsMultiplier": 1,
|
|
1130
|
+
"pointsEnabled": false
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
"vaultId": 3,
|
|
1134
|
+
"name": "BTC Super Staking",
|
|
1135
|
+
"type": "Drift",
|
|
1136
|
+
"category": "Yield Enhancement",
|
|
1137
|
+
"vaultAddress": "BVddkVtFJLCihbVrtLo8e3iEd9NftuLunaznAxFFW8vf",
|
|
1138
|
+
"depositToken": "WBTC",
|
|
1139
|
+
"pointsMultiplier": 1,
|
|
1140
|
+
"pointsEnabled": false
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"vaultId": 2,
|
|
1144
|
+
"name": "JLP Traders Rekt",
|
|
1145
|
+
"type": "Drift",
|
|
1146
|
+
"category": "Bet",
|
|
1147
|
+
"vaultAddress": "2r81MPMDjGSrbmGRwzDg6aqhe3t3vbKcrYfpes5bXckS",
|
|
1148
|
+
"depositToken": "USDC",
|
|
1149
|
+
"pointsMultiplier": 1,
|
|
1150
|
+
"pointsEnabled": false
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"vaultId": 1,
|
|
1154
|
+
"name": "SOL Super Staking",
|
|
1155
|
+
"type": "Drift",
|
|
1156
|
+
"category": "Yield Enhancement",
|
|
1157
|
+
"vaultAddress": "EuSLjg23BrtwYAk1t4TFe5ArYSXCVXLBqrHRBfWQiTeJ",
|
|
1158
|
+
"depositToken": "SOL",
|
|
1159
|
+
"pointsMultiplier": 1,
|
|
1160
|
+
"pointsEnabled": false
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"vaultId": 0,
|
|
1164
|
+
"name": "JLP Delta Neutral",
|
|
1165
|
+
"subname": "vault-1",
|
|
1166
|
+
"type": "Drift",
|
|
1167
|
+
"category": "Market Neutral",
|
|
1168
|
+
"vaultAddress": "3Nkctq19AW7gs5hkxixUDjS9UVjmCwcNCo7rqPpub87c",
|
|
1169
|
+
"depositToken": "USDC",
|
|
1170
|
+
"driftProgramId": "9Fcn3Fd4d5ocrb12xCUtEvezxcjFEAyHBPfrZDiPt9Qj",
|
|
1171
|
+
"pointsEnabled": false
|
|
1172
|
+
}
|
|
1173
|
+
];
|
|
1174
|
+
|
|
1175
|
+
//#endregion
|
|
1176
|
+
//#region src/types/tokens.ts
|
|
1177
|
+
let SupportedChain = /* @__PURE__ */ function(SupportedChain$1) {
|
|
1178
|
+
SupportedChain$1["Solana"] = "Solana";
|
|
1179
|
+
SupportedChain$1["Hyperliquid"] = "Hyperliquid";
|
|
1180
|
+
return SupportedChain$1;
|
|
1181
|
+
}({});
|
|
1182
|
+
let SupportedToken = /* @__PURE__ */ function(SupportedToken$1) {
|
|
1183
|
+
SupportedToken$1["USDC"] = "USDC";
|
|
1184
|
+
SupportedToken$1["USDT"] = "USDT";
|
|
1185
|
+
SupportedToken$1["USDE"] = "USDE";
|
|
1186
|
+
SupportedToken$1["SOL"] = "SOL";
|
|
1187
|
+
SupportedToken$1["WBTC"] = "WBTC";
|
|
1188
|
+
SupportedToken$1["WETH"] = "WETH";
|
|
1189
|
+
SupportedToken$1["JLP"] = "JLP";
|
|
1190
|
+
return SupportedToken$1;
|
|
1191
|
+
}({});
|
|
1192
|
+
const tokens = {
|
|
1193
|
+
[SupportedToken.USDC]: {
|
|
1194
|
+
name: "USD Coin",
|
|
1195
|
+
symbol: "USDC",
|
|
1196
|
+
onChain: {
|
|
1197
|
+
[SupportedChain.Solana]: {
|
|
1198
|
+
address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
1199
|
+
decimals: 6
|
|
1200
|
+
},
|
|
1201
|
+
[SupportedChain.Hyperliquid]: null
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
[SupportedToken.USDT]: {
|
|
1205
|
+
name: "Tether",
|
|
1206
|
+
symbol: "USDT",
|
|
1207
|
+
onChain: {
|
|
1208
|
+
[SupportedChain.Solana]: {
|
|
1209
|
+
address: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
|
|
1210
|
+
decimals: 6
|
|
1211
|
+
},
|
|
1212
|
+
[SupportedChain.Hyperliquid]: null
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
[SupportedToken.USDE]: {
|
|
1216
|
+
name: "Ethena USDe",
|
|
1217
|
+
symbol: "USDe",
|
|
1218
|
+
onChain: {
|
|
1219
|
+
[SupportedChain.Solana]: {
|
|
1220
|
+
address: "DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT",
|
|
1221
|
+
decimals: 9
|
|
1222
|
+
},
|
|
1223
|
+
[SupportedChain.Hyperliquid]: null
|
|
1224
|
+
}
|
|
1225
|
+
},
|
|
1226
|
+
[SupportedToken.SOL]: {
|
|
1227
|
+
name: "Wrapped SOL",
|
|
1228
|
+
symbol: "WSOL",
|
|
1229
|
+
onChain: {
|
|
1230
|
+
[SupportedChain.Solana]: {
|
|
1231
|
+
address: "So11111111111111111111111111111111111111112",
|
|
1232
|
+
decimals: 9
|
|
1233
|
+
},
|
|
1234
|
+
[SupportedChain.Hyperliquid]: null
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
[SupportedToken.WBTC]: {
|
|
1238
|
+
name: "Wrapped BTC (Wormhole) (WBTC)",
|
|
1239
|
+
symbol: "WBTC",
|
|
1240
|
+
onChain: {
|
|
1241
|
+
[SupportedChain.Solana]: {
|
|
1242
|
+
address: "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh",
|
|
1243
|
+
decimals: 8
|
|
1244
|
+
},
|
|
1245
|
+
[SupportedChain.Hyperliquid]: null
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
[SupportedToken.WETH]: {
|
|
1249
|
+
name: "Wrapped ETH (Wormhole) (WETH)",
|
|
1250
|
+
symbol: "WETH",
|
|
1251
|
+
onChain: {
|
|
1252
|
+
[SupportedChain.Solana]: {
|
|
1253
|
+
address: "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs",
|
|
1254
|
+
decimals: 8
|
|
1255
|
+
},
|
|
1256
|
+
[SupportedChain.Hyperliquid]: null
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
[SupportedToken.JLP]: {
|
|
1260
|
+
name: "Jupiter Perps LP",
|
|
1261
|
+
symbol: "JLP",
|
|
1262
|
+
onChain: {
|
|
1263
|
+
[SupportedChain.Solana]: {
|
|
1264
|
+
address: "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",
|
|
1265
|
+
decimals: 6
|
|
1266
|
+
},
|
|
1267
|
+
[SupportedChain.Hyperliquid]: null
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
/** Devnet SPL mint overrides (`depositToken` still uses `SupportedToken`). */
|
|
1272
|
+
const SOLANA_MINT_OVERRIDES_DEVNET = { [SupportedToken.USDC]: "6a8hWCCa2QDQTqzLUapZwZtgHTox8BsgataN6JVLwdo7" };
|
|
181
1273
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
1274
|
+
* Solana mint address for a supported token, keyed by bundle cluster.
|
|
1275
|
+
* Devnet USDC uses the team mock mint; other tokens use mainnet table until devnet overrides exist.
|
|
184
1276
|
*/
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
1277
|
+
function getSolanaTokenMint(token, cluster = "mainnet") {
|
|
1278
|
+
const row = tokens[token].onChain[SupportedChain.Solana];
|
|
1279
|
+
if (!row) throw new Error(`No Solana mint configured for ${token}`);
|
|
1280
|
+
if (cluster === "devnet") {
|
|
1281
|
+
const override = SOLANA_MINT_OVERRIDES_DEVNET[token];
|
|
1282
|
+
if (override) return override;
|
|
1283
|
+
}
|
|
1284
|
+
return row.address;
|
|
1285
|
+
}
|
|
1286
|
+
/** SPL decimals for `token` (same on mainnet vs devnet for current overrides). */
|
|
1287
|
+
function getSolanaTokenDecimals(token) {
|
|
1288
|
+
const row = tokens[token].onChain[SupportedChain.Solana];
|
|
1289
|
+
if (!row) throw new Error(`No Solana decimals configured for ${token}`);
|
|
1290
|
+
return row.decimals;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
//#endregion
|
|
1294
|
+
//#region src/types/vault-types.ts
|
|
1295
|
+
let VaultType = /* @__PURE__ */ function(VaultType$1) {
|
|
1296
|
+
VaultType$1["Drift"] = "Drift";
|
|
1297
|
+
VaultType$1["Bundle"] = "Bundle";
|
|
1298
|
+
VaultType$1["Hyperliquid"] = "Hyperliquid";
|
|
1299
|
+
VaultType$1["Kamino"] = "Kamino";
|
|
1300
|
+
return VaultType$1;
|
|
1301
|
+
}({});
|
|
1302
|
+
let VaultCategory = /* @__PURE__ */ function(VaultCategory$1) {
|
|
1303
|
+
VaultCategory$1["marketNeutral"] = "Market Neutral";
|
|
1304
|
+
VaultCategory$1["directional"] = "Directional";
|
|
1305
|
+
VaultCategory$1["etf"] = "Index";
|
|
1306
|
+
VaultCategory$1["bet"] = "Bet";
|
|
1307
|
+
VaultCategory$1["savings"] = "Savings";
|
|
1308
|
+
VaultCategory$1["privateCredit"] = "Private Credit";
|
|
1309
|
+
VaultCategory$1["airdropFarming"] = "Airdrop Farming";
|
|
1310
|
+
VaultCategory$1["yieldEnhancement"] = "Yield Enhancement";
|
|
1311
|
+
VaultCategory$1["fundOfFund"] = "Master Vault";
|
|
1312
|
+
return VaultCategory$1;
|
|
203
1313
|
}({});
|
|
1314
|
+
/** Zod schema for validating registry entries */
|
|
1315
|
+
const VaultRegistryEntrySchema = z.object({
|
|
1316
|
+
vaultId: z.number().int().min(0),
|
|
1317
|
+
name: z.string().min(1).max(100),
|
|
1318
|
+
subname: z.string().max(100).optional(),
|
|
1319
|
+
type: z.nativeEnum(VaultType),
|
|
1320
|
+
category: z.nativeEnum(VaultCategory),
|
|
1321
|
+
vaultAddress: z.string().min(32).max(44),
|
|
1322
|
+
depositToken: z.nativeEnum(SupportedToken),
|
|
1323
|
+
driftProgramId: z.string().min(32).max(44).optional(),
|
|
1324
|
+
bundleProgramId: z.string().min(32).max(44).optional(),
|
|
1325
|
+
pointsMultiplier: z.number().min(0).optional(),
|
|
1326
|
+
pointsEnabled: z.boolean().optional()
|
|
1327
|
+
});
|
|
1328
|
+
/** Schema for validating array of registry entries */
|
|
1329
|
+
const VaultRegistryArraySchema = z.array(VaultRegistryEntrySchema).superRefine((vaults$1, ctx) => {
|
|
1330
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1331
|
+
for (const vault of vaults$1) {
|
|
1332
|
+
if (seen.has(vault.vaultId)) ctx.addIssue({
|
|
1333
|
+
code: z.ZodIssueCode.custom,
|
|
1334
|
+
message: `Duplicate vaultId: ${vault.vaultId}`
|
|
1335
|
+
});
|
|
1336
|
+
seen.add(vault.vaultId);
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
204
1339
|
|
|
205
1340
|
//#endregion
|
|
206
|
-
//#region src/
|
|
207
|
-
/**
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
const FEE_EPS = 1e-9;
|
|
216
|
-
function bpsToFeeDecimal(bps) {
|
|
217
|
-
return bps / 1e4;
|
|
218
|
-
}
|
|
219
|
-
function feeDecimalToBps(decimal) {
|
|
220
|
-
return Math.round(decimal * 1e4);
|
|
221
|
-
}
|
|
222
|
-
function bpsToPercentLabel(bps) {
|
|
223
|
-
return (bps / 100).toFixed(4).replace(/\.?0+$/, "");
|
|
224
|
-
}
|
|
225
|
-
function hasFeeOverrideFlag(flags, bit) {
|
|
226
|
-
return (flags & bit) !== 0;
|
|
227
|
-
}
|
|
228
|
-
function buildFeeOverrideMask(flags) {
|
|
229
|
-
let mask = 0;
|
|
230
|
-
if (flags.deposit) mask |= FEE_OVERRIDE.DEPOSIT;
|
|
231
|
-
if (flags.withdrawal) mask |= FEE_OVERRIDE.WITHDRAWAL;
|
|
232
|
-
if (flags.performance) mask |= FEE_OVERRIDE.PERFORMANCE;
|
|
233
|
-
if (flags.management) mask |= FEE_OVERRIDE.MANAGEMENT;
|
|
234
|
-
return mask;
|
|
235
|
-
}
|
|
236
|
-
function formatFeeOverrideFlags(flags) {
|
|
237
|
-
const parts = [];
|
|
238
|
-
if (hasFeeOverrideFlag(flags, FEE_OVERRIDE.DEPOSIT)) parts.push("deposit");
|
|
239
|
-
if (hasFeeOverrideFlag(flags, FEE_OVERRIDE.WITHDRAWAL)) parts.push("withdrawal");
|
|
240
|
-
if (hasFeeOverrideFlag(flags, FEE_OVERRIDE.PERFORMANCE)) parts.push("performance");
|
|
241
|
-
if (hasFeeOverrideFlag(flags, FEE_OVERRIDE.MANAGEMENT)) parts.push("management");
|
|
242
|
-
return parts.length > 0 ? parts.join(", ") : "none";
|
|
243
|
-
}
|
|
244
|
-
function readUserFeeOverrideFields(account) {
|
|
245
|
-
return {
|
|
246
|
-
feeOverrideFlags: toNum(account.feeOverrideFlags ?? account.fee_override_flags),
|
|
247
|
-
customDepositFeeBps: toNum(account.customDepositFeeBps ?? account.custom_deposit_fee_bps),
|
|
248
|
-
customWithdrawalFeeBps: toNum(account.customWithdrawalFeeBps ?? account.custom_withdrawal_fee_bps),
|
|
249
|
-
customPerformanceFeeBps: toNum(account.customPerformanceFeeBps ?? account.custom_performance_fee_bps),
|
|
250
|
-
customManagementFeeBps: toNum(account.customManagementFeeBps ?? account.custom_management_fee_bps)
|
|
251
|
-
};
|
|
1341
|
+
//#region src/constants/vaults.ts
|
|
1342
|
+
/**
|
|
1343
|
+
* Get Bundle Program ID for a vault config
|
|
1344
|
+
* Uses registry value if present, otherwise falls back to cluster default.
|
|
1345
|
+
*/
|
|
1346
|
+
function getBundleProgramId(vault, cluster = "mainnet") {
|
|
1347
|
+
if (vault.type !== VaultType.Bundle) return;
|
|
1348
|
+
if (vault.bundleProgramId) return vault.bundleProgramId;
|
|
1349
|
+
return getDefaultBundleProgramIdByCluster(cluster);
|
|
252
1350
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
1351
|
+
/**
|
|
1352
|
+
* Get Drift Program ID for a vault config.
|
|
1353
|
+
* Uses registry value if present, otherwise defaults to VAULT_PROGRAM_ID
|
|
1354
|
+
*/
|
|
1355
|
+
function getDriftProgramId(vault) {
|
|
1356
|
+
if (vault.type !== VaultType.Drift) return;
|
|
1357
|
+
if (vault.driftProgramId) return vault.driftProgramId;
|
|
1358
|
+
return "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR";
|
|
258
1359
|
}
|
|
259
|
-
|
|
260
|
-
|
|
1360
|
+
/**
|
|
1361
|
+
* Transform a registry entry to VaultConfig with program IDs
|
|
1362
|
+
* - Drift vaults get driftProgramId
|
|
1363
|
+
* - Bundle vaults get bundleProgramId (registry value or cluster default via {@link getBundleProgramId})
|
|
1364
|
+
*/
|
|
1365
|
+
function toVaultConfig(entry, cluster = "mainnet") {
|
|
261
1366
|
return {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
managementFeeBps: toNum(b.managementFeeBps)
|
|
1367
|
+
...entry,
|
|
1368
|
+
driftProgramId: getDriftProgramId(entry),
|
|
1369
|
+
bundleProgramId: getBundleProgramId(entry, cluster)
|
|
266
1370
|
};
|
|
267
1371
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
1372
|
+
/**
|
|
1373
|
+
* Transform an array of registry entries to VaultRegistry
|
|
1374
|
+
* @param entries Registry entries to transform
|
|
1375
|
+
* @param cluster Used to resolve default bundle program id when `bundleProgramId` is omitted in JSON
|
|
1376
|
+
*/
|
|
1377
|
+
function toVaultRegistry(entries, cluster = "mainnet") {
|
|
1378
|
+
return Object.fromEntries(entries.map((entry) => [entry.vaultId, toVaultConfig(entry, cluster)]));
|
|
275
1379
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
1380
|
+
const parsedVaultsMainnet = VaultRegistryArraySchema.parse(vaults_default);
|
|
1381
|
+
const parsedVaultsDevnet = VaultRegistryArraySchema.parse(vaults_devnet_default);
|
|
1382
|
+
const vaultsMainnetRegistry = toVaultRegistry(parsedVaultsMainnet, "mainnet");
|
|
1383
|
+
const vaultsDevnetRegistry = toVaultRegistry(parsedVaultsDevnet, "devnet");
|
|
1384
|
+
/** Mainnet registry (default; backward compatible). */
|
|
1385
|
+
const vaults = vaultsMainnetRegistry;
|
|
1386
|
+
/** Devnet-only vault registry (fixtures / local testing). */
|
|
1387
|
+
const vaultsDevnet = vaultsDevnetRegistry;
|
|
1388
|
+
function getVaultRegistry(cluster) {
|
|
1389
|
+
return cluster === "devnet" ? vaultsDevnetRegistry : vaultsMainnetRegistry;
|
|
1390
|
+
}
|
|
1391
|
+
function isValidVaultAddress(address, cluster = "mainnet") {
|
|
1392
|
+
return Object.values(getVaultRegistry(cluster)).map((vault) => vault.vaultAddress).includes(address);
|
|
1393
|
+
}
|
|
1394
|
+
function getVaultByAddress(address, cluster = "mainnet") {
|
|
1395
|
+
return Object.values(getVaultRegistry(cluster)).find((v) => v.vaultAddress === address);
|
|
283
1396
|
}
|
|
1397
|
+
function getVaultById(vaultId, cluster = "mainnet") {
|
|
1398
|
+
return getVaultRegistry(cluster)[vaultId];
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
//#endregion
|
|
1402
|
+
//#region src/constants/points-vaults.ts
|
|
284
1403
|
/**
|
|
285
|
-
*
|
|
1404
|
+
* Get vaults that earn points, filtered by pointsEnabled !== false.
|
|
1405
|
+
* Returns entries ready for points backend consumption.
|
|
286
1406
|
*/
|
|
287
|
-
function
|
|
288
|
-
|
|
289
|
-
|
|
1407
|
+
function getPointsVaults(registry) {
|
|
1408
|
+
return Object.values(registry).filter((v) => v.pointsEnabled !== false).map((v) => toPointsVaultEntry(v));
|
|
1409
|
+
}
|
|
1410
|
+
function toPointsVaultEntry(entry) {
|
|
290
1411
|
return {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
1412
|
+
vaultId: entry.vaultId,
|
|
1413
|
+
name: entry.subname ? `${entry.name} -- ${entry.subname}` : entry.name,
|
|
1414
|
+
address: entry.vaultAddress,
|
|
1415
|
+
depositToken: entry.depositToken,
|
|
1416
|
+
type: entry.type,
|
|
1417
|
+
multiplier: entry.pointsMultiplier ?? 1,
|
|
1418
|
+
enabled: entry.pointsEnabled !== false,
|
|
1419
|
+
bundleProgramId: entry.bundleProgramId
|
|
295
1420
|
};
|
|
296
1421
|
}
|
|
1422
|
+
|
|
1423
|
+
//#endregion
|
|
1424
|
+
//#region src/extensions/ata.ts
|
|
297
1425
|
/**
|
|
298
|
-
*
|
|
1426
|
+
* SPL Associated Token Account program. Codama cannot derive PDAs owned by an
|
|
1427
|
+
* external program, so this helper is hand-written. It mirrors the hardcoded
|
|
1428
|
+
* derivation the generated `requestDeposit` builder performs internally for
|
|
1429
|
+
* the pending-deposit token account.
|
|
299
1430
|
*/
|
|
300
|
-
|
|
301
|
-
|
|
1431
|
+
const ASSOCIATED_TOKEN_PROGRAM_ADDRESS = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
1432
|
+
const TOKEN_PROGRAM_ADDRESS = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
1433
|
+
/**
|
|
1434
|
+
* Derives the associated token account for `owner` and `mint`.
|
|
1435
|
+
* Works for PDA owners as well (the derivation is curve-agnostic).
|
|
1436
|
+
*/
|
|
1437
|
+
async function findAssociatedTokenPda(seeds) {
|
|
1438
|
+
const addressEncoder = getAddressEncoder();
|
|
1439
|
+
return await getProgramDerivedAddress({
|
|
1440
|
+
programAddress: ASSOCIATED_TOKEN_PROGRAM_ADDRESS,
|
|
1441
|
+
seeds: [
|
|
1442
|
+
addressEncoder.encode(seeds.owner),
|
|
1443
|
+
addressEncoder.encode(seeds.tokenProgram ?? TOKEN_PROGRAM_ADDRESS),
|
|
1444
|
+
addressEncoder.encode(seeds.mint)
|
|
1445
|
+
]
|
|
1446
|
+
});
|
|
302
1447
|
}
|
|
1448
|
+
|
|
1449
|
+
//#endregion
|
|
1450
|
+
//#region src/extensions/math.ts
|
|
1451
|
+
/** Mirrors `BPS_DENOMINATOR` in `constants.rs:12` and its use in `charge_user_fees` at `bundle.rs:693-695`. */
|
|
1452
|
+
const BPS_DENOMINATOR = 10000n;
|
|
1453
|
+
/** Mirrors `SECONDS_IN_YEAR` in `constants.rs:11` and its use in `charge_user_fees` at `bundle.rs:693-695`. */
|
|
1454
|
+
const SECONDS_IN_YEAR = 31536000n;
|
|
1455
|
+
/** Upper bound for the Rust `u64` amounts consumed by `fetch_total_equity` at `bundle.rs:244-257`. */
|
|
1456
|
+
const U64_MAX = 18446744073709551615n;
|
|
303
1457
|
/**
|
|
304
|
-
*
|
|
305
|
-
*
|
|
1458
|
+
* Parses a positive decimal `u64` amount for Rust amount paths such as
|
|
1459
|
+
* `calculate_assets_from_shares` at `bundle.rs:259-270`.
|
|
306
1460
|
*/
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
|
|
1461
|
+
function parseAmountRaw(amountRaw) {
|
|
1462
|
+
const trimmedAmountRaw = amountRaw.trim();
|
|
1463
|
+
if (!/^\d+$/.test(trimmedAmountRaw)) throw new Error("INVALID_AMOUNT_RAW");
|
|
1464
|
+
const amount = BigInt(trimmedAmountRaw);
|
|
1465
|
+
assertValidAmountRaw(amount);
|
|
1466
|
+
return amount;
|
|
310
1467
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
1468
|
+
/**
|
|
1469
|
+
* Enforces the positive Rust `u64` bounds used by amount parameters such as
|
|
1470
|
+
* `total_assets` in `calculate_assets_from_shares` at `bundle.rs:259-270`.
|
|
1471
|
+
*/
|
|
1472
|
+
function assertValidAmountRaw(amountRaw) {
|
|
1473
|
+
if (amountRaw <= 0n || amountRaw > U64_MAX) throw new Error("INVALID_AMOUNT_RAW");
|
|
314
1474
|
}
|
|
315
|
-
|
|
316
|
-
|
|
1475
|
+
/**
|
|
1476
|
+
* Converts a UI float to the integer amount domain used by
|
|
1477
|
+
* `calculate_assets_from_shares` at `bundle.rs:259-270`.
|
|
1478
|
+
*/
|
|
1479
|
+
function humanFloatToAmountRaw(human, decimals) {
|
|
1480
|
+
if (!Number.isFinite(human) || human <= 0 || !Number.isInteger(decimals) || decimals < 0 || decimals > 18) throw new Error("INVALID_HUMAN_AMOUNT");
|
|
1481
|
+
const scaledAmount = human * 10 ** decimals;
|
|
1482
|
+
if (!Number.isFinite(scaledAmount)) throw new Error("INVALID_HUMAN_AMOUNT");
|
|
1483
|
+
const roundedAmount = Math.round(scaledAmount);
|
|
1484
|
+
if (roundedAmount <= 0) throw new Error("INVALID_HUMAN_AMOUNT");
|
|
1485
|
+
const amountRaw = BigInt(roundedAmount);
|
|
1486
|
+
assertValidAmountRaw(amountRaw);
|
|
1487
|
+
return amountRaw;
|
|
317
1488
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
return
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
1489
|
+
/** Mirrors `fetch_total_equity` at `bundle.rs:244-257`. */
|
|
1490
|
+
function totalEquityRaw(args) {
|
|
1491
|
+
return args.bundleUnderlyingBalance + args.averageExternalEquity;
|
|
1492
|
+
}
|
|
1493
|
+
/** Mirrors the share-price calculation in `charge_user_fees` at `bundle.rs:662-670`. */
|
|
1494
|
+
function sharePriceRaw(args) {
|
|
1495
|
+
return args.totalShares > 0n ? args.totalAssets * args.assetPrecision / args.totalShares : args.assetPrecision;
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* Mirrors `calculate_assets_from_shares` at `bundle.rs:259-270`. When
|
|
1499
|
+
* `totalShares` is zero this read-only helper returns zero, while the Rust
|
|
1500
|
+
* function reports a division error.
|
|
1501
|
+
*/
|
|
1502
|
+
function calculateAssetsFromShares(args) {
|
|
1503
|
+
return args.totalShares === 0n ? 0n : args.shares * args.totalAssets / args.totalShares;
|
|
328
1504
|
}
|
|
329
|
-
/**
|
|
330
|
-
|
|
331
|
-
|
|
1505
|
+
/**
|
|
1506
|
+
* Applies the legacy withdrawal-share ratio using the integer division from
|
|
1507
|
+
* `calculate_assets_from_shares` at `bundle.rs:259-270`.
|
|
1508
|
+
*/
|
|
1509
|
+
function computeWithdrawalShares(args) {
|
|
1510
|
+
if (args.totalShares === 0n || args.userShares === 0n) return 0n;
|
|
1511
|
+
const userTokenRaw = args.userShares * args.totalEquity / args.totalShares;
|
|
1512
|
+
if (args.amountRaw >= userTokenRaw) return args.userShares;
|
|
1513
|
+
if (args.totalEquity === 0n) return 0n;
|
|
1514
|
+
const computedShares = args.amountRaw * args.totalShares / args.totalEquity;
|
|
1515
|
+
return computedShares > args.userShares ? args.userShares : computedShares;
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* Returns the UI ratio corresponding to the price calculation in
|
|
1519
|
+
* `charge_user_fees` at `bundle.rs:662-670`. Converting bigints to numbers can
|
|
1520
|
+
* lose precision.
|
|
1521
|
+
*/
|
|
1522
|
+
function calculateOnChainPps(args) {
|
|
1523
|
+
return args.totalShares === 0n ? 0 : Number(args.totalEquity) / Number(args.totalShares);
|
|
332
1524
|
}
|
|
333
1525
|
|
|
334
1526
|
//#endregion
|
|
335
|
-
//#region src/
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
1527
|
+
//#region src/extensions/fees.ts
|
|
1528
|
+
/** Mirrors `FEE_OVERRIDE_DEPOSIT` in `constants.rs:15`. */
|
|
1529
|
+
const FEE_OVERRIDE_DEPOSIT = 1;
|
|
1530
|
+
/** Mirrors `FEE_OVERRIDE_WITHDRAWAL` in `constants.rs:16`. */
|
|
1531
|
+
const FEE_OVERRIDE_WITHDRAWAL = 2;
|
|
1532
|
+
/** Mirrors `FEE_OVERRIDE_PERFORMANCE` in `constants.rs:17`. */
|
|
1533
|
+
const FEE_OVERRIDE_PERFORMANCE = 4;
|
|
1534
|
+
/** Mirrors `FEE_OVERRIDE_MANAGEMENT` in `constants.rs:18`. */
|
|
1535
|
+
const FEE_OVERRIDE_MANAGEMENT = 8;
|
|
1536
|
+
/** Mirrors `resolve_effective_fees` at `bundle.rs:433-457`, including zero-valued overrides. */
|
|
1537
|
+
function resolveEffectiveFees(bundle, user) {
|
|
1538
|
+
return {
|
|
1539
|
+
depositFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_DEPOSIT ? user.customDepositFeeBps : bundle.depositFee,
|
|
1540
|
+
withdrawalFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_WITHDRAWAL ? user.customWithdrawalFeeBps : bundle.withdrawalFee,
|
|
1541
|
+
performanceFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_PERFORMANCE ? user.customPerformanceFeeBps : bundle.performanceFee,
|
|
1542
|
+
managementFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_MANAGEMENT ? user.customManagementFeeBps : bundle.managementFeeBps
|
|
1543
|
+
};
|
|
340
1544
|
}
|
|
341
1545
|
/**
|
|
342
|
-
*
|
|
1546
|
+
* Estimates the user-share deductions in `charge_user_fees` at
|
|
1547
|
+
* `bundle.rs:653-851`. Referral handling at `bundle.rs:767-800` is omitted
|
|
1548
|
+
* because it only divides the same deducted shares between manager and
|
|
1549
|
+
* referrer. If `assetPrecision` is zero, this helper returns a zero fee value;
|
|
1550
|
+
* the Rust function reports a division error at `bundle.rs:829-834`.
|
|
343
1551
|
*/
|
|
344
|
-
function
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
const performanceFeeBps = BigInt(effectiveFees.performanceFeeBps);
|
|
355
|
-
const lastMgmtTs = bnToBigInt(userBundle.lastManagementFeeTimestamp);
|
|
356
|
-
const nowTs = BigInt(nowUnixSeconds);
|
|
1552
|
+
function estimatePendingUserFees(args) {
|
|
1553
|
+
const sharePrice = sharePriceRaw({
|
|
1554
|
+
totalAssets: totalEquityRaw({
|
|
1555
|
+
bundleUnderlyingBalance: args.bundle.bundleUnderlyingBalance,
|
|
1556
|
+
averageExternalEquity: args.oracleData.averageExternalEquity
|
|
1557
|
+
}),
|
|
1558
|
+
totalShares: args.bundle.totalShares,
|
|
1559
|
+
assetPrecision: args.bundle.assetPrecision
|
|
1560
|
+
});
|
|
1561
|
+
const effectiveFees = resolveEffectiveFees(args.bundle, args.userBundle);
|
|
357
1562
|
let managementFeeShares = 0n;
|
|
358
|
-
if (
|
|
359
|
-
const
|
|
360
|
-
|
|
1563
|
+
if (args.userBundle.lastManagementFeeTimestamp > 0n) {
|
|
1564
|
+
const elapsed = BigInt(args.nowUnixSeconds) - args.userBundle.lastManagementFeeTimestamp;
|
|
1565
|
+
const secondsElapsed = elapsed > 0n ? elapsed : 0n;
|
|
1566
|
+
managementFeeShares = args.userBundle.shares * secondsElapsed * BigInt(effectiveFees.managementFeeBps) / (SECONDS_IN_YEAR * BPS_DENOMINATOR);
|
|
361
1567
|
}
|
|
362
|
-
const
|
|
1568
|
+
const hwmValue = args.userBundle.hwmPerShare === 0n ? sharePrice : args.userBundle.hwmPerShare;
|
|
363
1569
|
let performanceFeeShares = 0n;
|
|
364
|
-
if (
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
1570
|
+
if (sharePrice !== 0n && sharePrice > hwmValue) performanceFeeShares = (sharePrice - hwmValue) * args.userBundle.shares * BigInt(effectiveFees.performanceFeeBps) / (sharePrice * BPS_DENOMINATOR);
|
|
1571
|
+
managementFeeShares = managementFeeShares < args.userBundle.shares ? managementFeeShares : args.userBundle.shares;
|
|
1572
|
+
const remainingShares = args.userBundle.shares - managementFeeShares;
|
|
1573
|
+
performanceFeeShares = performanceFeeShares < remainingShares ? performanceFeeShares : remainingShares;
|
|
368
1574
|
const totalFeeShares = managementFeeShares + performanceFeeShares;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
*/
|
|
378
|
-
function calculateOnChainPps({ oracleAverageExternalEquity, bundleUnderlyingBalance, totalShares }) {
|
|
379
|
-
const totalEquity = Number(oracleAverageExternalEquity) + Number(bundleUnderlyingBalance);
|
|
380
|
-
const totalSharesNum = Number(totalShares);
|
|
381
|
-
return totalSharesNum > 0 ? totalEquity / totalSharesNum : 0;
|
|
1575
|
+
const feeValueRaw = args.bundle.assetPrecision === 0n ? 0n : totalFeeShares * sharePrice / args.bundle.assetPrecision;
|
|
1576
|
+
return {
|
|
1577
|
+
managementFeeShares,
|
|
1578
|
+
performanceFeeShares,
|
|
1579
|
+
totalFeeShares,
|
|
1580
|
+
feeValueRaw,
|
|
1581
|
+
sharePrice
|
|
1582
|
+
};
|
|
382
1583
|
}
|
|
1584
|
+
|
|
1585
|
+
//#endregion
|
|
1586
|
+
//#region src/extensions/balances.ts
|
|
383
1587
|
/**
|
|
384
|
-
*
|
|
1588
|
+
* Calculates the raw balance fields returned by the legacy SDK's
|
|
1589
|
+
* `calculateBundleUserBalance`. The legacy helper used floating-point PPS and
|
|
1590
|
+
* `Math.round`; this helper uses the exact integer floor from
|
|
1591
|
+
* `calculate_assets_from_shares` at `bundle.rs:259-270`.
|
|
385
1592
|
*/
|
|
386
|
-
function
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
bundleUnderlyingBalance: BigInt(bundleData.bundleUnderlyingBalance.toString()),
|
|
391
|
-
totalShares: BigInt(bundleData.totalShares.toString())
|
|
1593
|
+
function computeUserBundleBalance(args) {
|
|
1594
|
+
const totalEquity = totalEquityRaw({
|
|
1595
|
+
bundleUnderlyingBalance: args.bundle.bundleUnderlyingBalance,
|
|
1596
|
+
averageExternalEquity: args.oracleData.averageExternalEquity
|
|
392
1597
|
});
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
const feesPaid = Number(userBundle.totalFeeCharged.toString()) / divisor;
|
|
398
|
-
const userEarnings = userBalance - netDeposits;
|
|
399
|
-
const highWaterMark = Math.floor(Number(userBundle.hwmPerShare.toString()) * userSharesNum / divisor) / divisor;
|
|
400
|
-
const pendingFeeToken = estimatePendingBundleFeeToken({
|
|
401
|
-
oracleData,
|
|
402
|
-
bundleData,
|
|
403
|
-
userBundle,
|
|
404
|
-
assetDecimals
|
|
1598
|
+
const balanceRaw = calculateAssetsFromShares({
|
|
1599
|
+
shares: args.userBundle.shares,
|
|
1600
|
+
totalAssets: totalEquity,
|
|
1601
|
+
totalShares: args.bundle.totalShares
|
|
405
1602
|
});
|
|
406
1603
|
return {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
pendingDeposit,
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
1604
|
+
bundleAccount: args.bundleAccount,
|
|
1605
|
+
user: args.user,
|
|
1606
|
+
sharesRaw: args.userBundle.shares,
|
|
1607
|
+
balanceRaw,
|
|
1608
|
+
netDepositsRaw: args.userBundle.netDeposits,
|
|
1609
|
+
earningsRaw: balanceRaw - args.userBundle.netDeposits,
|
|
1610
|
+
pendingDepositRaw: args.userBundle.pendingDeposit,
|
|
1611
|
+
feesPaidRaw: args.userBundle.totalFeeCharged,
|
|
1612
|
+
pendingFees: estimatePendingUserFees({
|
|
1613
|
+
bundle: args.bundle,
|
|
1614
|
+
oracleData: args.oracleData,
|
|
1615
|
+
userBundle: args.userBundle,
|
|
1616
|
+
nowUnixSeconds: args.nowUnixSeconds
|
|
1617
|
+
}),
|
|
1618
|
+
hwmPerShare: args.userBundle.hwmPerShare,
|
|
1619
|
+
totalEquityRaw: totalEquity,
|
|
1620
|
+
totalShares: args.bundle.totalShares,
|
|
1621
|
+
assetPrecision: args.bundle.assetPrecision,
|
|
1622
|
+
assetDecimals: args.bundle.assetDecimals,
|
|
1623
|
+
assetAddress: args.bundle.assetAddress
|
|
422
1624
|
};
|
|
423
1625
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
1626
|
+
/**
|
|
1627
|
+
* Mirrors the three aligned `fetchMultiple` batches in the legacy SDK's
|
|
1628
|
+
* `getBundleBalances`. Duplicate addresses remain in every request array so
|
|
1629
|
+
* each output index corresponds directly to its input request.
|
|
1630
|
+
*/
|
|
1631
|
+
async function fetchUserBundleBalances(rpc, args) {
|
|
1632
|
+
const programAddress = args.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
|
|
1633
|
+
const derivedAddresses = await Promise.all(args.requests.map(async (request) => {
|
|
1634
|
+
const [[oraclePda], [userPda]] = await Promise.all([findOracleDataPda({ bundleAccount: request.bundleAccount }, { programAddress }), findUserBundleAccountPda({
|
|
1635
|
+
userBundleAccountOwner: request.user,
|
|
1636
|
+
bundleAccount: request.bundleAccount
|
|
1637
|
+
}, { programAddress })]);
|
|
1638
|
+
return {
|
|
1639
|
+
oraclePda,
|
|
1640
|
+
userPda
|
|
1641
|
+
};
|
|
1642
|
+
}));
|
|
1643
|
+
const bundleAddresses = args.requests.map((request) => request.bundleAccount);
|
|
1644
|
+
const oraclePdas = derivedAddresses.map(({ oraclePda }) => oraclePda);
|
|
1645
|
+
const userPdas = derivedAddresses.map(({ userPda }) => userPda);
|
|
1646
|
+
const [bundles, oracleDataAccounts, userBundles] = await Promise.all([
|
|
1647
|
+
fetchAllMaybeBundle(rpc, bundleAddresses),
|
|
1648
|
+
fetchAllMaybeOracleData(rpc, oraclePdas),
|
|
1649
|
+
fetchAllMaybeUserBundleAccount(rpc, userPdas)
|
|
1650
|
+
]);
|
|
1651
|
+
const nowUnixSeconds = args.nowUnixSeconds ?? Math.floor(Date.now() / 1e3);
|
|
1652
|
+
return args.requests.map((request, index) => {
|
|
1653
|
+
const bundle = bundles[index];
|
|
1654
|
+
const oracleData = oracleDataAccounts[index];
|
|
1655
|
+
const userBundle = userBundles[index];
|
|
1656
|
+
if (!bundle.exists || !oracleData.exists || !userBundle.exists) return null;
|
|
1657
|
+
return computeUserBundleBalance({
|
|
1658
|
+
bundleAccount: request.bundleAccount,
|
|
1659
|
+
user: request.user,
|
|
1660
|
+
bundle: bundle.data,
|
|
1661
|
+
oracleData: oracleData.data,
|
|
1662
|
+
userBundle: userBundle.data,
|
|
1663
|
+
nowUnixSeconds
|
|
441
1664
|
});
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
for (let i = 0; i < matchingVaults.length; i++) {
|
|
455
|
-
const { vaultId, config } = matchingVaults[i];
|
|
456
|
-
const bundle = bundles[i];
|
|
457
|
-
const oracle = oracles[i];
|
|
458
|
-
const userBundle = users[i];
|
|
459
|
-
if (!bundle || !oracle || !userBundle) {
|
|
460
|
-
result[vaultId] = null;
|
|
461
|
-
continue;
|
|
462
|
-
}
|
|
463
|
-
const assetDecimals = tokens[config.depositToken]?.onChain?.Solana?.decimals || 6;
|
|
464
|
-
const spotPrice = priceMap.get(config.depositToken);
|
|
465
|
-
if (spotPrice === void 0) throw new Error(`Price not found for token ${config.depositToken}. This should not happen as prices are initialized during creation.`);
|
|
466
|
-
result[vaultId] = calculateBundleUserBalance({
|
|
467
|
-
oracleData: oracle,
|
|
468
|
-
bundleData: bundle,
|
|
469
|
-
userBundle,
|
|
470
|
-
assetDecimals,
|
|
471
|
-
spotPrice,
|
|
472
|
-
asset: config.depositToken
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
return result;
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
async function fetchUserBundleBalance(rpc, args) {
|
|
1668
|
+
const [balance] = await fetchUserBundleBalances(rpc, {
|
|
1669
|
+
requests: [{
|
|
1670
|
+
bundleAccount: args.bundleAccount,
|
|
1671
|
+
user: args.user
|
|
1672
|
+
}],
|
|
1673
|
+
programAddress: args.programAddress,
|
|
1674
|
+
nowUnixSeconds: args.nowUnixSeconds
|
|
1675
|
+
});
|
|
1676
|
+
return balance;
|
|
477
1677
|
}
|
|
478
1678
|
|
|
479
1679
|
//#endregion
|
|
480
|
-
//#region src/
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
})
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
1680
|
+
//#region src/extensions/flows.ts
|
|
1681
|
+
/** Mirrors the legacy `buildBundleDepositInstructionsWithVault` flow. */
|
|
1682
|
+
async function buildDepositInstructions(rpc, params) {
|
|
1683
|
+
assertValidAmountRaw(params.amountRaw);
|
|
1684
|
+
const programAddress = params.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
|
|
1685
|
+
const bundle = await fetchMaybeBundle(rpc, params.bundleAccount);
|
|
1686
|
+
if (!bundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
|
|
1687
|
+
const [userBundleAccount] = await findUserBundleAccountPda({
|
|
1688
|
+
userBundleAccountOwner: params.user.address,
|
|
1689
|
+
bundleAccount: params.bundleAccount
|
|
1690
|
+
}, { programAddress });
|
|
1691
|
+
const userBundle = await fetchMaybeUserBundleAccount(rpc, userBundleAccount);
|
|
1692
|
+
const userTokenAccount = params.userTokenAccount ?? (await findAssociatedTokenPda({
|
|
1693
|
+
owner: params.user.address,
|
|
1694
|
+
mint: bundle.data.assetAddress
|
|
1695
|
+
}))[0];
|
|
1696
|
+
const [pendingBundleAssetAuthorityPda, oracleDataPda, bundleTempDataPda] = await Promise.all([
|
|
1697
|
+
findPendingBundleAssetAuthorityPda({ bundleAccount: params.bundleAccount }, { programAddress }),
|
|
1698
|
+
findOracleDataPda({ bundleAccount: params.bundleAccount }, { programAddress }),
|
|
1699
|
+
findBundleTempDataPda({ bundleAccount: params.bundleAccount }, { programAddress })
|
|
1700
|
+
]);
|
|
1701
|
+
const [pendingDepositTokenAccount] = await findAssociatedTokenPda({
|
|
1702
|
+
owner: pendingBundleAssetAuthorityPda[0],
|
|
1703
|
+
mint: bundle.data.assetAddress
|
|
1704
|
+
});
|
|
1705
|
+
const instructions = [];
|
|
1706
|
+
if (!userBundle.exists) instructions.push(await getInitializeBundleDepositorInstructionAsync({
|
|
1707
|
+
payer: params.user,
|
|
1708
|
+
authority: params.user,
|
|
1709
|
+
bundleAccount: params.bundleAccount,
|
|
1710
|
+
userBundleAccount
|
|
1711
|
+
}, { programAddress }));
|
|
1712
|
+
instructions.push(await getRequestDepositInstructionAsync({
|
|
1713
|
+
user: params.user,
|
|
1714
|
+
bundleAccount: params.bundleAccount,
|
|
1715
|
+
userTokenAccount,
|
|
1716
|
+
pendingDepositTokenAccount,
|
|
1717
|
+
treasuryAccount: bundle.data.treasuryAccount,
|
|
1718
|
+
assetAddress: bundle.data.assetAddress,
|
|
1719
|
+
userBundleAccount,
|
|
1720
|
+
oracleData: oracleDataPda[0],
|
|
1721
|
+
bundleTempData: bundleTempDataPda[0],
|
|
1722
|
+
pendingBundleAssetAuthority: pendingBundleAssetAuthorityPda[0],
|
|
1723
|
+
amount: params.amountRaw
|
|
1724
|
+
}, { programAddress }));
|
|
1725
|
+
return instructions;
|
|
1726
|
+
}
|
|
1727
|
+
/**
|
|
1728
|
+
* Mirrors the legacy `buildBundleRequestWithdrawInstructionWithVault` flow.
|
|
1729
|
+
* This helper rejects a zero-share result instead of forwarding it to the
|
|
1730
|
+
* program as the legacy helper did.
|
|
1731
|
+
*/
|
|
1732
|
+
async function buildRequestWithdrawInstruction(rpc, params) {
|
|
1733
|
+
assertValidAmountRaw(params.amountRaw);
|
|
1734
|
+
const programAddress = params.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
|
|
1735
|
+
const [oracleDataPda, userBundleAccountPda, bundleTempDataPda] = await Promise.all([
|
|
1736
|
+
findOracleDataPda({ bundleAccount: params.bundleAccount }, { programAddress }),
|
|
1737
|
+
findUserBundleAccountPda({
|
|
1738
|
+
userBundleAccountOwner: params.user.address,
|
|
1739
|
+
bundleAccount: params.bundleAccount
|
|
1740
|
+
}, { programAddress }),
|
|
1741
|
+
findBundleTempDataPda({ bundleAccount: params.bundleAccount }, { programAddress })
|
|
1742
|
+
]);
|
|
1743
|
+
const [bundle, oracleData, userBundle] = await Promise.all([
|
|
1744
|
+
fetchMaybeBundle(rpc, params.bundleAccount),
|
|
1745
|
+
fetchMaybeOracleData(rpc, oracleDataPda[0]),
|
|
1746
|
+
fetchMaybeUserBundleAccount(rpc, userBundleAccountPda[0])
|
|
1747
|
+
]);
|
|
1748
|
+
if (!bundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
|
|
1749
|
+
if (!oracleData.exists) throw new Error("ORACLE_DATA_NOT_FOUND");
|
|
1750
|
+
if (!userBundle.exists) throw new Error("USER_BUNDLE_ACCOUNT_NOT_FOUND");
|
|
1751
|
+
const sharesAmount = computeWithdrawalShares({
|
|
1752
|
+
amountRaw: params.amountRaw,
|
|
1753
|
+
userShares: userBundle.data.shares,
|
|
1754
|
+
totalEquity: totalEquityRaw({
|
|
1755
|
+
bundleUnderlyingBalance: bundle.data.bundleUnderlyingBalance,
|
|
1756
|
+
averageExternalEquity: oracleData.data.averageExternalEquity
|
|
1757
|
+
}),
|
|
1758
|
+
totalShares: bundle.data.totalShares
|
|
1759
|
+
});
|
|
1760
|
+
if (sharesAmount === 0n) throw new Error("ZERO_WITHDRAWAL_SHARES");
|
|
1761
|
+
return await getRequestWithdrawalInstructionAsync({
|
|
1762
|
+
user: params.user,
|
|
1763
|
+
bundleAccount: params.bundleAccount,
|
|
1764
|
+
userBundleAccount: userBundleAccountPda[0],
|
|
1765
|
+
oracleData: oracleDataPda[0],
|
|
1766
|
+
bundleTempData: bundleTempDataPda[0],
|
|
1767
|
+
sharesAmount
|
|
1768
|
+
}, { programAddress });
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* Mirrors the legacy `buildBundleRequestSwitchInstructionsWithVaults` flow.
|
|
1772
|
+
* This version-locked client does not perform the legacy runtime IDL capability
|
|
1773
|
+
* probe for `request_bundle_switch`.
|
|
1774
|
+
*/
|
|
1775
|
+
async function buildRequestSwitchInstructions(rpc, params) {
|
|
1776
|
+
assertValidAmountRaw(params.amountRaw);
|
|
1777
|
+
const programAddress = params.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
|
|
1778
|
+
if (params.sourceBundleAccount === params.targetBundleAccount) throw new Error("SOURCE_TARGET_IDENTICAL");
|
|
1779
|
+
const [sourceOracleDataPda, sourceUserBundleAccountPda, sourceBundleTempDataPda, targetUserBundleAccountPda] = await Promise.all([
|
|
1780
|
+
findOracleDataPda({ bundleAccount: params.sourceBundleAccount }, { programAddress }),
|
|
1781
|
+
findUserBundleAccountPda({
|
|
1782
|
+
userBundleAccountOwner: params.user.address,
|
|
1783
|
+
bundleAccount: params.sourceBundleAccount
|
|
1784
|
+
}, { programAddress }),
|
|
1785
|
+
findBundleTempDataPda({ bundleAccount: params.sourceBundleAccount }, { programAddress }),
|
|
1786
|
+
findUserBundleAccountPda({
|
|
1787
|
+
userBundleAccountOwner: params.user.address,
|
|
1788
|
+
bundleAccount: params.targetBundleAccount
|
|
1789
|
+
}, { programAddress })
|
|
1790
|
+
]);
|
|
1791
|
+
const [sourceBundle, targetBundle, sourceOracleData, sourceUserBundle, targetUserBundle] = await Promise.all([
|
|
1792
|
+
fetchMaybeBundle(rpc, params.sourceBundleAccount),
|
|
1793
|
+
fetchMaybeBundle(rpc, params.targetBundleAccount),
|
|
1794
|
+
fetchMaybeOracleData(rpc, sourceOracleDataPda[0]),
|
|
1795
|
+
fetchMaybeUserBundleAccount(rpc, sourceUserBundleAccountPda[0]),
|
|
1796
|
+
fetchMaybeUserBundleAccount(rpc, targetUserBundleAccountPda[0])
|
|
1797
|
+
]);
|
|
1798
|
+
if (!sourceBundle.exists || !targetBundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
|
|
1799
|
+
if (!sourceOracleData.exists) throw new Error("ORACLE_DATA_NOT_FOUND");
|
|
1800
|
+
if (!sourceUserBundle.exists) throw new Error("USER_BUNDLE_ACCOUNT_NOT_FOUND");
|
|
1801
|
+
if (sourceBundle.data.assetAddress !== targetBundle.data.assetAddress) throw new Error("ASSET_MINT_MISMATCH");
|
|
1802
|
+
const sharesAmount = computeWithdrawalShares({
|
|
1803
|
+
amountRaw: params.amountRaw,
|
|
1804
|
+
userShares: sourceUserBundle.data.shares,
|
|
1805
|
+
totalEquity: totalEquityRaw({
|
|
1806
|
+
bundleUnderlyingBalance: sourceBundle.data.bundleUnderlyingBalance,
|
|
1807
|
+
averageExternalEquity: sourceOracleData.data.averageExternalEquity
|
|
1808
|
+
}),
|
|
1809
|
+
totalShares: sourceBundle.data.totalShares
|
|
1810
|
+
});
|
|
1811
|
+
if (sharesAmount === 0n) throw new Error("ZERO_WITHDRAWAL_SHARES");
|
|
1812
|
+
const instructions = [];
|
|
1813
|
+
if (!targetUserBundle.exists) instructions.push(await getInitializeBundleDepositorInstructionAsync({
|
|
1814
|
+
payer: params.user,
|
|
1815
|
+
authority: params.user,
|
|
1816
|
+
bundleAccount: params.targetBundleAccount,
|
|
1817
|
+
userBundleAccount: targetUserBundleAccountPda[0]
|
|
1818
|
+
}, { programAddress }));
|
|
1819
|
+
instructions.push(await getRequestBundleSwitchInstructionAsync({
|
|
1820
|
+
user: params.user,
|
|
1821
|
+
bundleAccount: params.sourceBundleAccount,
|
|
1822
|
+
userBundleAccount: sourceUserBundleAccountPda[0],
|
|
1823
|
+
oracleData: sourceOracleDataPda[0],
|
|
1824
|
+
bundleTempData: sourceBundleTempDataPda[0],
|
|
1825
|
+
targetBundleAccount: params.targetBundleAccount,
|
|
1826
|
+
targetUserBundleAccount: targetUserBundleAccountPda[0],
|
|
1827
|
+
sharesAmount
|
|
1828
|
+
}, { programAddress }));
|
|
1829
|
+
return instructions;
|
|
1830
|
+
}
|
|
555
1831
|
|
|
556
1832
|
//#endregion
|
|
557
|
-
export { ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, BUNDLE_PROGRAM_ID_V2_MAINNET, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, DevnetVaultId, FEE_OVERRIDE, NeutralTrade, SEED_ORACLE, SEED_PENDING_AUTH, SEED_TEMP, SEED_USER, SupportedChain, SupportedToken, VaultCategory, VaultId, VaultType, assertAllowlistedBundleProgramId, bpsToFeeDecimal, bpsToPercentLabel, buildBundleDepositInstructions, buildBundleRequestSwitchInstruction, buildBundleRequestWithdrawInstruction, buildFeeOverrideMask, computeDepositFeePreview, computeRequestWithdrawalSharesFromAmountRaw, computeWithdrawFeePreview, createAllowlistedBundleProgram, createBundleProgramById, createDummyWallet, deriveOraclePDA, derivePendingAuthPDA, deriveTempDataPDA, deriveUserPDA, effectiveFeeBpsToDecimals, estimatePendingBundleFeeToken, feeDecimalToBps, formatFeeOverrideFlags, getBundleProgramId, getDefaultBundleProgramIdByCluster, getSolanaTokenDecimals, getSolanaTokenMint, getVaultByAddress, getVaultById, getVaultDepositorAddressSync, getVaultRegistry, hasAnyFeeOverride, hasCustomFeeRate, hasFeeOverrideFlag, humanFloatToAmountRawString, isAllowlistedBundleProgramId, isValidVaultAddress, parseAmountRawToBigInt, readUserFeeOverrideFields, resolveEffectiveFeeBps, resolveEffectiveFeeBpsFromDefaults, resolveEffectiveVaultFees, tokens, vaultFeeDecimalsToBps, vaults, vaultsDevnet };
|
|
1833
|
+
export { ADD_STRATEGY_DISCRIMINATOR, ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, APPLY_FEES_TO_USER_DISCRIMINATOR, ASSOCIATED_TOKEN_PROGRAM_ADDRESS, BPS_DENOMINATOR, BUNDLE_CREATOR_ACCOUNT_DISCRIMINATOR, BUNDLE_DISCRIMINATOR, BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, BUNDLE_PROGRAM_ID_V2_MAINNET, BUNDLE_TEMP_DATA_DISCRIMINATOR, CHANGE_BUNDLE_MASTER_ADMIN_DISCRIMINATOR, CHANGE_MANAGER_DISCRIMINATOR, CLEAR_USER_FEE_OVERRIDE_DISCRIMINATOR, CLEAR_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, CLOSE_USER_BUNDLE_ACCOUNT_DISCRIMINATOR, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, DISTRIBUTE_TO_RECEIVERS_DISCRIMINATOR, DevnetVaultId, ENABLE_STRATEGY_DISCRIMINATOR, END_DISTRIBUTION_DISCRIMINATOR, FEE_OVERRIDE_DEPOSIT, FEE_OVERRIDE_MANAGEMENT, FEE_OVERRIDE_PERFORMANCE, FEE_OVERRIDE_WITHDRAWAL, INITIALIZE_BUNDLE_DEPOSITOR_DISCRIMINATOR, INITIALIZE_BUNDLE_DISCRIMINATOR, INITIALIZE_BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, INITIALIZE_PERMISSIONED_BUNDLE_DEPOSITOR_DISCRIMINATOR, MANAGER_WITHDRAW_DISCRIMINATOR, MANAGER_WITHDRAW_WITH_SPLIT_DISCRIMINATOR, NET_PENDING_TRANSACTIONS_DISCRIMINATOR, NTBUNDLE_ERROR__ALLOCATION_AMOUNT_ZERO, NTBUNDLE_ERROR__ALLOCATION_BPS_GREATER_THAN_GLOBAL_ALLOCATION_BPS, NTBUNDLE_ERROR__ALLOCATION_BPS_IS_ZERO, NTBUNDLE_ERROR__AMOUNT_MUST_BE_BELOW_MAX, NTBUNDLE_ERROR__BUNDLE_IS_PERMISSIONNED, NTBUNDLE_ERROR__BUNDLE_NOT_PERMISSIONNED, NTBUNDLE_ERROR__CALLER_NOT_NEUTRAL_FEE_INCREMENTER, NTBUNDLE_ERROR__DEPOSITS_EXTRA_IN_PENDINGS_NOT_ZERO, NTBUNDLE_ERROR__DEPOSIT_AMOUNT_ZERO, NTBUNDLE_ERROR__DISTRIBUTION_ALREADY_STARTED, NTBUNDLE_ERROR__DISTRIBUTION_NOT_STARTED, NTBUNDLE_ERROR__EMPTY_USER_FEE_CLEAR_REQUEST, NTBUNDLE_ERROR__EMPTY_USER_WITHDRAWAL_TIMING_CLEAR_REQUEST, NTBUNDLE_ERROR__EQUITY_OUT_OF_BUFFER_BOUND, NTBUNDLE_ERROR__EXCESSIVE_DEPOSIT_FEE, NTBUNDLE_ERROR__EXCESSIVE_MANAGEMENT_FEE, NTBUNDLE_ERROR__EXCESSIVE_PERFORMANCE_FEE, NTBUNDLE_ERROR__EXCESSIVE_WITHDRAW_FEE, NTBUNDLE_ERROR__INSUFFICIENT_BUNDLE_BALANCE, NTBUNDLE_ERROR__INSUFFICIENT_FUNDS, NTBUNDLE_ERROR__INSUFFICIENT_SHARES_BALANCE, NTBUNDLE_ERROR__INVALID_ALLOCATIONS, NTBUNDLE_ERROR__INVALID_ASSET_ADDRESS, NTBUNDLE_ERROR__INVALID_ASSET_PRECISION, NTBUNDLE_ERROR__INVALID_FEE_SPLIT, NTBUNDLE_ERROR__INVALID_NEUTRAL_FEE_INCREMENTER, NTBUNDLE_ERROR__INVALID_ORACLE_BUFFER, NTBUNDLE_ERROR__INVALID_ORACLE_MAX_AGE, NTBUNDLE_ERROR__INVALID_ORACLE_UPDATE_TIME_LIMIT, NTBUNDLE_ERROR__INVALID_PERMISSIONNED_DEPOSITOR, NTBUNDLE_ERROR__INVALID_RECEIVER, NTBUNDLE_ERROR__INVALID_REFERRAL_CONFIG, NTBUNDLE_ERROR__INVALID_TWAP_PERIOD, NTBUNDLE_ERROR__INVALID_USER_FEE_CONFIG, NTBUNDLE_ERROR__INVALID_USER_WITHDRAWAL_TIMING_CONFIG, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_AMOUNT, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_COOLDOWN_PERIOD, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_DELAY, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_REDEMPTION_SCHEDULE, NTBUNDLE_ERROR__LEFT_TO_DISTRIBUTE_NOT_ZERO, NTBUNDLE_ERROR__MANAGER_SHARES_ZERO, NTBUNDLE_ERROR__MATH_ERROR, NTBUNDLE_ERROR__MAX_DEPOSIT_AMOUNT_EXCEEDED, NTBUNDLE_ERROR__MIN_DEPOSIT_AMOUNT_NOT_MET, NTBUNDLE_ERROR__MUST_BE_IN_WHITELIST, NTBUNDLE_ERROR__NETTING_ALREADY_DONE, NTBUNDLE_ERROR__NETTING_NOT_DONE, NTBUNDLE_ERROR__NO_PENDING_SWITCH, NTBUNDLE_ERROR__NO_PENDING_TRANSACTIONS, NTBUNDLE_ERROR__NO_PENDING_WITHDRAWAL, NTBUNDLE_ERROR__NO_USER_FEE_OVERRIDE_TO_CLEAR, NTBUNDLE_ERROR__NO_USER_WITHDRAWAL_TIMING_OVERRIDE_TO_CLEAR, NTBUNDLE_ERROR__ORACLE_NOT_UPDATED, NTBUNDLE_ERROR__ORACLE_UPDATE_TOO_FREQUENT, NTBUNDLE_ERROR__PAUSED_DEPOSITS_WITHDRAWALS, NTBUNDLE_ERROR__PAYER_NOT_AUTHORITY, NTBUNDLE_ERROR__PENDING_DEPOSIT_AMOUNT_ZERO, NTBUNDLE_ERROR__PENDING_DEPOSIT_EXISTS, NTBUNDLE_ERROR__PENDING_DEPOSIT_OR_WITHDRAWAL_EXISTS, NTBUNDLE_ERROR__PENDING_TRANSACTIONS_EXIST, NTBUNDLE_ERROR__PENDING_WITHDRAWAL_EXISTS, NTBUNDLE_ERROR__POD_TOKEN_TOTAL_SUPPLY_ZERO, NTBUNDLE_ERROR__RAW_TRANSFER_RECEIVER, NTBUNDLE_ERROR__RECEIVER_ALREADY_ALLOCATED, NTBUNDLE_ERROR__REDEMPTION_AMOUNT_EXCEEDED, NTBUNDLE_ERROR__REDEMPTION_AMOUNT_ZERO, NTBUNDLE_ERROR__REFERRALS_DISABLED, NTBUNDLE_ERROR__REFERRAL_ALREADY_SET, NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISMATCH, NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISSING, NTBUNDLE_ERROR__REFERRER_DEPOSIT_TOO_LOW, NTBUNDLE_ERROR__REFERRER_SHARES_ZERO, NTBUNDLE_ERROR__REFILL_AMOUNT_EXCEEDED, NTBUNDLE_ERROR__REFILL_AMOUNT_INVALID, NTBUNDLE_ERROR__STRATEGY_ALREADY_ENABLED, NTBUNDLE_ERROR__STRATEGY_DISABLED, NTBUNDLE_ERROR__SWITCH_ALREADY_ACTIVE, NTBUNDLE_ERROR__SWITCH_ASSET_MINT_MISMATCH, NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNTS_MISSING, NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNT_MISMATCH, NTBUNDLE_ERROR__SWITCH_TARGET_SAME_AS_SOURCE, NTBUNDLE_ERROR__TOO_MANY_ALLOCATED_RECEIVERS, NTBUNDLE_ERROR__TOTAL_ASSET_EXCEED_NEW_MAX_DEPOSIT_AMOUNT, NTBUNDLE_ERROR__UNAUTHORIZED_ADMIN_ACTION, NTBUNDLE_ERROR__UNAUTHORIZED_BUNDLE_CREATOR, NTBUNDLE_ERROR__UNAUTHORIZED_KEEPER_ACTION, NTBUNDLE_ERROR__UNAUTHORIZED_MANAGER_ACTION, NTBUNDLE_ERROR__UNAUTHORIZED_REFERRER_ACTION, NTBUNDLE_ERROR__UNPAUSED_DEPOSITS_WITHDRAWALS, NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_HAS_ACTIVITY, NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_NOT_EMPTY, NTBUNDLE_ERROR__WITHDRAWAL_ALREADY_PROCESSED, NTBUNDLE_ERROR__WITHDRAWAL_DELAY_NOT_MET, NTBUNDLE_PROGRAM_ADDRESS, NtbundleAccount, NtbundleInstruction, ORACLE_DATA_DISCRIMINATOR, PAUSE_DEPOSITS_WITHDRAWALS_DISCRIMINATOR, PERFORM_REFILL_DISCRIMINATOR, PROCESS_DEPOSIT_DISCRIMINATOR, PROCESS_REFERRER_WITHDRAWAL_DISCRIMINATOR, PROCESS_SWITCH_DISCRIMINATOR, PROCESS_WITHDRAWAL_DISCRIMINATOR, REFERRER_ACCOUNT_DISCRIMINATOR, REFERRER_REQUEST_WITHDRAW_DISCRIMINATOR, REFUND_DEPOSIT_DISCRIMINATOR, REGISTER_REFERRER_DISCRIMINATOR, REMOVE_STRATEGY_DISCRIMINATOR, REQUEST_BUNDLE_SWITCH_DISCRIMINATOR, REQUEST_DEPOSIT_DISCRIMINATOR, REQUEST_WITHDRAWAL_DISCRIMINATOR, SECONDS_IN_YEAR, SET_BUNDLE_CREATOR_DISCRIMINATOR, SET_DELAYS_DISCRIMINATOR, SET_FEES_DISCRIMINATOR, SET_KEEPER_DISCRIMINATOR, SET_MAX_DEPOSIT_AMOUNT_DISCRIMINATOR, SET_MIN_DEPOSIT_AMOUNT_DISCRIMINATOR, SET_ORACLE_BUFFER_DISCRIMINATOR, SET_ORACLE_MAX_AGE_DISCRIMINATOR, SET_ORACLE_UPDATE_TIME_LIMIT_DISCRIMINATOR, SET_REFERRER_ACTIVE_DISCRIMINATOR, SET_REFERRER_CONFIG_DISCRIMINATOR, SET_REFERRER_RATE_OVERRIDE_DISCRIMINATOR, SET_USER_FEE_OVERRIDE_DISCRIMINATOR, SET_USER_REFERRER_DISCRIMINATOR, SET_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, SET_WITHDRAWAL_REDEMPTION_SCHEDULE_DISCRIMINATOR, START_DISTRIBUTION_DISCRIMINATOR, STRATEGY_DISCRIMINATOR, SupportedChain, SupportedToken, TOKEN_PROGRAM_ADDRESS, U64_MAX, UPDATE_ALLOCATIONS_DISCRIMINATOR, UPDATE_ORACLE_DISCRIMINATOR, USER_BUNDLE_ACCOUNT_DISCRIMINATOR, VaultCategory, VaultId, VaultType, assertAllowlistedBundleProgramId, assertValidAmountRaw, buildDepositInstructions, buildRequestSwitchInstructions, buildRequestWithdrawInstruction, calculateAssetsFromShares, calculateOnChainPps, computeUserBundleBalance, computeWithdrawalShares, decodeBundle, decodeBundleCreatorAccount, decodeBundleMasterAccount, decodeBundleTempData, decodeOracleData, decodeReferrerAccount, decodeStrategy, decodeUserBundleAccount, estimatePendingUserFees, fetchAllBundle, fetchAllBundleCreatorAccount, fetchAllBundleMasterAccount, fetchAllBundleTempData, fetchAllMaybeBundle, fetchAllMaybeBundleCreatorAccount, fetchAllMaybeBundleMasterAccount, fetchAllMaybeBundleTempData, fetchAllMaybeOracleData, fetchAllMaybeReferrerAccount, fetchAllMaybeStrategy, fetchAllMaybeUserBundleAccount, fetchAllOracleData, fetchAllReferrerAccount, fetchAllStrategy, fetchAllUserBundleAccount, fetchBundle, fetchBundleCreatorAccount, fetchBundleMasterAccount, fetchBundleTempData, fetchMaybeBundle, fetchMaybeBundleCreatorAccount, fetchMaybeBundleMasterAccount, fetchMaybeBundleTempData, fetchMaybeOracleData, fetchMaybeReferrerAccount, fetchMaybeStrategy, fetchMaybeUserBundleAccount, fetchOracleData, fetchReferrerAccount, fetchStrategy, fetchUserBundleAccount, fetchUserBundleBalance, fetchUserBundleBalances, findAssociatedTokenPda, findBundleAccountPda, findBundleAssetAuthorityPda, findBundleCreatorAccountPda, findBundleMasterAccountPda, findBundleTempDataPda, findCloseUserBundleAccountUserBundleAccountPda, findOracleDataPda, findPendingBundleAssetAuthorityPda, findReferrerAccountPda, findReferrerUserBundleAccountPda, findRequestBundleSwitchUserBundleAccountPda, findSourceBundleAssetAuthorityPda, findSourceBundleTempDataPda, findSourceOracleDataPda, findSourceUserBundleAccountPda, findStrategyAccountPda, findTargetBundleTempDataPda, findTargetOracleDataPda, findTargetPendingBundleAssetAuthorityPda, findTargetUserBundleAccountPda, findUserBundleAccountPda, getAddStrategyDiscriminatorBytes, getAddStrategyInstruction, getAddStrategyInstructionAsync, getAddStrategyInstructionDataCodec, getAddStrategyInstructionDataDecoder, getAddStrategyInstructionDataEncoder, getApplyFeesToUserDiscriminatorBytes, getApplyFeesToUserInstruction, getApplyFeesToUserInstructionAsync, getApplyFeesToUserInstructionDataCodec, getApplyFeesToUserInstructionDataDecoder, getApplyFeesToUserInstructionDataEncoder, getBundleCodec, getBundleCreatorAccountCodec, getBundleCreatorAccountDecoder, getBundleCreatorAccountDiscriminatorBytes, getBundleCreatorAccountEncoder, getBundleCreatorAccountSize, getBundleDecoder, getBundleDiscriminatorBytes, getBundleEncoder, getBundleMasterAccountCodec, getBundleMasterAccountDecoder, getBundleMasterAccountDiscriminatorBytes, getBundleMasterAccountEncoder, getBundleMasterAccountSize, getBundleProgramId, getBundleTempDataCodec, getBundleTempDataDecoder, getBundleTempDataDiscriminatorBytes, getBundleTempDataEncoder, getBundleTempDataSize, getChangeBundleMasterAdminDiscriminatorBytes, getChangeBundleMasterAdminInstruction, getChangeBundleMasterAdminInstructionAsync, getChangeBundleMasterAdminInstructionDataCodec, getChangeBundleMasterAdminInstructionDataDecoder, getChangeBundleMasterAdminInstructionDataEncoder, getChangeManagerDiscriminatorBytes, getChangeManagerInstruction, getChangeManagerInstructionDataCodec, getChangeManagerInstructionDataDecoder, getChangeManagerInstructionDataEncoder, getClearUserFeeOverrideDiscriminatorBytes, getClearUserFeeOverrideInstruction, getClearUserFeeOverrideInstructionAsync, getClearUserFeeOverrideInstructionDataCodec, getClearUserFeeOverrideInstructionDataDecoder, getClearUserFeeOverrideInstructionDataEncoder, getClearUserWithdrawalTimingOverrideDiscriminatorBytes, getClearUserWithdrawalTimingOverrideInstruction, getClearUserWithdrawalTimingOverrideInstructionAsync, getClearUserWithdrawalTimingOverrideInstructionDataCodec, getClearUserWithdrawalTimingOverrideInstructionDataDecoder, getClearUserWithdrawalTimingOverrideInstructionDataEncoder, getCloseUserBundleAccountDiscriminatorBytes, getCloseUserBundleAccountInstruction, getCloseUserBundleAccountInstructionAsync, getCloseUserBundleAccountInstructionDataCodec, getCloseUserBundleAccountInstructionDataDecoder, getCloseUserBundleAccountInstructionDataEncoder, getDefaultBundleProgramIdByCluster, getDistributeToReceiversDiscriminatorBytes, getDistributeToReceiversInstruction, getDistributeToReceiversInstructionAsync, getDistributeToReceiversInstructionDataCodec, getDistributeToReceiversInstructionDataDecoder, getDistributeToReceiversInstructionDataEncoder, getDriftProgramId, getEnableStrategyDiscriminatorBytes, getEnableStrategyInstruction, getEnableStrategyInstructionAsync, getEnableStrategyInstructionDataCodec, getEnableStrategyInstructionDataDecoder, getEnableStrategyInstructionDataEncoder, getEndDistributionDiscriminatorBytes, getEndDistributionInstruction, getEndDistributionInstructionAsync, getEndDistributionInstructionDataCodec, getEndDistributionInstructionDataDecoder, getEndDistributionInstructionDataEncoder, getInitializeBundleDepositorDiscriminatorBytes, getInitializeBundleDepositorInstruction, getInitializeBundleDepositorInstructionAsync, getInitializeBundleDepositorInstructionDataCodec, getInitializeBundleDepositorInstructionDataDecoder, getInitializeBundleDepositorInstructionDataEncoder, getInitializeBundleDiscriminatorBytes, getInitializeBundleInstruction, getInitializeBundleInstructionAsync, getInitializeBundleInstructionDataCodec, getInitializeBundleInstructionDataDecoder, getInitializeBundleInstructionDataEncoder, getInitializeBundleMasterAccountDiscriminatorBytes, getInitializeBundleMasterAccountInstruction, getInitializeBundleMasterAccountInstructionAsync, getInitializeBundleMasterAccountInstructionDataCodec, getInitializeBundleMasterAccountInstructionDataDecoder, getInitializeBundleMasterAccountInstructionDataEncoder, getInitializePermissionedBundleDepositorDiscriminatorBytes, getInitializePermissionedBundleDepositorInstruction, getInitializePermissionedBundleDepositorInstructionAsync, getInitializePermissionedBundleDepositorInstructionDataCodec, getInitializePermissionedBundleDepositorInstructionDataDecoder, getInitializePermissionedBundleDepositorInstructionDataEncoder, getManagerWithdrawDiscriminatorBytes, getManagerWithdrawInstruction, getManagerWithdrawInstructionAsync, getManagerWithdrawInstructionDataCodec, getManagerWithdrawInstructionDataDecoder, getManagerWithdrawInstructionDataEncoder, getManagerWithdrawWithSplitDiscriminatorBytes, getManagerWithdrawWithSplitInstruction, getManagerWithdrawWithSplitInstructionAsync, getManagerWithdrawWithSplitInstructionDataCodec, getManagerWithdrawWithSplitInstructionDataDecoder, getManagerWithdrawWithSplitInstructionDataEncoder, getNetPendingTransactionsDiscriminatorBytes, getNetPendingTransactionsInstruction, getNetPendingTransactionsInstructionAsync, getNetPendingTransactionsInstructionDataCodec, getNetPendingTransactionsInstructionDataDecoder, getNetPendingTransactionsInstructionDataEncoder, getNtbundleErrorMessage, getOracleDataCodec, getOracleDataDecoder, getOracleDataDiscriminatorBytes, getOracleDataEncoder, getOracleDataSize, getPauseDepositsWithdrawalsDiscriminatorBytes, getPauseDepositsWithdrawalsInstruction, getPauseDepositsWithdrawalsInstructionAsync, getPauseDepositsWithdrawalsInstructionDataCodec, getPauseDepositsWithdrawalsInstructionDataDecoder, getPauseDepositsWithdrawalsInstructionDataEncoder, getPerformRefillDiscriminatorBytes, getPerformRefillInstruction, getPerformRefillInstructionAsync, getPerformRefillInstructionDataCodec, getPerformRefillInstructionDataDecoder, getPerformRefillInstructionDataEncoder, getPointsVaults, getProcessDepositDiscriminatorBytes, getProcessDepositInstruction, getProcessDepositInstructionAsync, getProcessDepositInstructionDataCodec, getProcessDepositInstructionDataDecoder, getProcessDepositInstructionDataEncoder, getProcessReferrerWithdrawalDiscriminatorBytes, getProcessReferrerWithdrawalInstruction, getProcessReferrerWithdrawalInstructionAsync, getProcessReferrerWithdrawalInstructionDataCodec, getProcessReferrerWithdrawalInstructionDataDecoder, getProcessReferrerWithdrawalInstructionDataEncoder, getProcessSwitchDiscriminatorBytes, getProcessSwitchInstruction, getProcessSwitchInstructionAsync, getProcessSwitchInstructionDataCodec, getProcessSwitchInstructionDataDecoder, getProcessSwitchInstructionDataEncoder, getProcessWithdrawalDiscriminatorBytes, getProcessWithdrawalInstruction, getProcessWithdrawalInstructionAsync, getProcessWithdrawalInstructionDataCodec, getProcessWithdrawalInstructionDataDecoder, getProcessWithdrawalInstructionDataEncoder, getReferrerAccountCodec, getReferrerAccountDecoder, getReferrerAccountDiscriminatorBytes, getReferrerAccountEncoder, getReferrerAccountSize, getReferrerRequestWithdrawDiscriminatorBytes, getReferrerRequestWithdrawInstruction, getReferrerRequestWithdrawInstructionAsync, getReferrerRequestWithdrawInstructionDataCodec, getReferrerRequestWithdrawInstructionDataDecoder, getReferrerRequestWithdrawInstructionDataEncoder, getRefundDepositDiscriminatorBytes, getRefundDepositInstruction, getRefundDepositInstructionAsync, getRefundDepositInstructionDataCodec, getRefundDepositInstructionDataDecoder, getRefundDepositInstructionDataEncoder, getRegisterReferrerDiscriminatorBytes, getRegisterReferrerInstruction, getRegisterReferrerInstructionAsync, getRegisterReferrerInstructionDataCodec, getRegisterReferrerInstructionDataDecoder, getRegisterReferrerInstructionDataEncoder, getRemoveStrategyDiscriminatorBytes, getRemoveStrategyInstruction, getRemoveStrategyInstructionAsync, getRemoveStrategyInstructionDataCodec, getRemoveStrategyInstructionDataDecoder, getRemoveStrategyInstructionDataEncoder, getRequestBundleSwitchDiscriminatorBytes, getRequestBundleSwitchInstruction, getRequestBundleSwitchInstructionAsync, getRequestBundleSwitchInstructionDataCodec, getRequestBundleSwitchInstructionDataDecoder, getRequestBundleSwitchInstructionDataEncoder, getRequestDepositDiscriminatorBytes, getRequestDepositInstruction, getRequestDepositInstructionAsync, getRequestDepositInstructionDataCodec, getRequestDepositInstructionDataDecoder, getRequestDepositInstructionDataEncoder, getRequestWithdrawalDiscriminatorBytes, getRequestWithdrawalInstruction, getRequestWithdrawalInstructionAsync, getRequestWithdrawalInstructionDataCodec, getRequestWithdrawalInstructionDataDecoder, getRequestWithdrawalInstructionDataEncoder, getSetBundleCreatorDiscriminatorBytes, getSetBundleCreatorInstruction, getSetBundleCreatorInstructionAsync, getSetBundleCreatorInstructionDataCodec, getSetBundleCreatorInstructionDataDecoder, getSetBundleCreatorInstructionDataEncoder, getSetDelaysDiscriminatorBytes, getSetDelaysInstruction, getSetDelaysInstructionDataCodec, getSetDelaysInstructionDataDecoder, getSetDelaysInstructionDataEncoder, getSetFeesDiscriminatorBytes, getSetFeesInstruction, getSetFeesInstructionDataCodec, getSetFeesInstructionDataDecoder, getSetFeesInstructionDataEncoder, getSetKeeperDiscriminatorBytes, getSetKeeperInstruction, getSetKeeperInstructionDataCodec, getSetKeeperInstructionDataDecoder, getSetKeeperInstructionDataEncoder, getSetMaxDepositAmountDiscriminatorBytes, getSetMaxDepositAmountInstruction, getSetMaxDepositAmountInstructionDataCodec, getSetMaxDepositAmountInstructionDataDecoder, getSetMaxDepositAmountInstructionDataEncoder, getSetMinDepositAmountDiscriminatorBytes, getSetMinDepositAmountInstruction, getSetMinDepositAmountInstructionDataCodec, getSetMinDepositAmountInstructionDataDecoder, getSetMinDepositAmountInstructionDataEncoder, getSetOracleBufferDiscriminatorBytes, getSetOracleBufferInstruction, getSetOracleBufferInstructionDataCodec, getSetOracleBufferInstructionDataDecoder, getSetOracleBufferInstructionDataEncoder, getSetOracleMaxAgeDiscriminatorBytes, getSetOracleMaxAgeInstruction, getSetOracleMaxAgeInstructionDataCodec, getSetOracleMaxAgeInstructionDataDecoder, getSetOracleMaxAgeInstructionDataEncoder, getSetOracleUpdateTimeLimitDiscriminatorBytes, getSetOracleUpdateTimeLimitInstruction, getSetOracleUpdateTimeLimitInstructionDataCodec, getSetOracleUpdateTimeLimitInstructionDataDecoder, getSetOracleUpdateTimeLimitInstructionDataEncoder, getSetReferrerActiveDiscriminatorBytes, getSetReferrerActiveInstruction, getSetReferrerActiveInstructionDataCodec, getSetReferrerActiveInstructionDataDecoder, getSetReferrerActiveInstructionDataEncoder, getSetReferrerConfigDiscriminatorBytes, getSetReferrerConfigInstruction, getSetReferrerConfigInstructionDataCodec, getSetReferrerConfigInstructionDataDecoder, getSetReferrerConfigInstructionDataEncoder, getSetReferrerRateOverrideDiscriminatorBytes, getSetReferrerRateOverrideInstruction, getSetReferrerRateOverrideInstructionDataCodec, getSetReferrerRateOverrideInstructionDataDecoder, getSetReferrerRateOverrideInstructionDataEncoder, getSetUserFeeOverrideDiscriminatorBytes, getSetUserFeeOverrideInstruction, getSetUserFeeOverrideInstructionAsync, getSetUserFeeOverrideInstructionDataCodec, getSetUserFeeOverrideInstructionDataDecoder, getSetUserFeeOverrideInstructionDataEncoder, getSetUserReferrerDiscriminatorBytes, getSetUserReferrerInstruction, getSetUserReferrerInstructionAsync, getSetUserReferrerInstructionDataCodec, getSetUserReferrerInstructionDataDecoder, getSetUserReferrerInstructionDataEncoder, getSetUserWithdrawalTimingOverrideDiscriminatorBytes, getSetUserWithdrawalTimingOverrideInstruction, getSetUserWithdrawalTimingOverrideInstructionAsync, getSetUserWithdrawalTimingOverrideInstructionDataCodec, getSetUserWithdrawalTimingOverrideInstructionDataDecoder, getSetUserWithdrawalTimingOverrideInstructionDataEncoder, getSetWithdrawalRedemptionScheduleDiscriminatorBytes, getSetWithdrawalRedemptionScheduleInstruction, getSetWithdrawalRedemptionScheduleInstructionDataCodec, getSetWithdrawalRedemptionScheduleInstructionDataDecoder, getSetWithdrawalRedemptionScheduleInstructionDataEncoder, getSolanaTokenDecimals, getSolanaTokenMint, getStartDistributionDiscriminatorBytes, getStartDistributionInstruction, getStartDistributionInstructionAsync, getStartDistributionInstructionDataCodec, getStartDistributionInstructionDataDecoder, getStartDistributionInstructionDataEncoder, getStrategyCodec, getStrategyDecoder, getStrategyDiscriminatorBytes, getStrategyEncoder, getStrategySize, getUpdateAllocationsDiscriminatorBytes, getUpdateAllocationsInstruction, getUpdateAllocationsInstructionAsync, getUpdateAllocationsInstructionDataCodec, getUpdateAllocationsInstructionDataDecoder, getUpdateAllocationsInstructionDataEncoder, getUpdateOracleDiscriminatorBytes, getUpdateOracleInstruction, getUpdateOracleInstructionAsync, getUpdateOracleInstructionDataCodec, getUpdateOracleInstructionDataDecoder, getUpdateOracleInstructionDataEncoder, getUserBundleAccountCodec, getUserBundleAccountDecoder, getUserBundleAccountDiscriminatorBytes, getUserBundleAccountEncoder, getUserBundleAccountSize, getVaultByAddress, getVaultById, getVaultRegistry, humanFloatToAmountRaw, identifyNtbundleAccount, identifyNtbundleInstruction, isAllowlistedBundleProgramId, isNtbundleError, isValidVaultAddress, ntbundleProgram, parseAddStrategyInstruction, parseAmountRaw, parseApplyFeesToUserInstruction, parseChangeBundleMasterAdminInstruction, parseChangeManagerInstruction, parseClearUserFeeOverrideInstruction, parseClearUserWithdrawalTimingOverrideInstruction, parseCloseUserBundleAccountInstruction, parseDistributeToReceiversInstruction, parseEnableStrategyInstruction, parseEndDistributionInstruction, parseInitializeBundleDepositorInstruction, parseInitializeBundleInstruction, parseInitializeBundleMasterAccountInstruction, parseInitializePermissionedBundleDepositorInstruction, parseManagerWithdrawInstruction, parseManagerWithdrawWithSplitInstruction, parseNetPendingTransactionsInstruction, parseNtbundleInstruction, parsePauseDepositsWithdrawalsInstruction, parsePerformRefillInstruction, parseProcessDepositInstruction, parseProcessReferrerWithdrawalInstruction, parseProcessSwitchInstruction, parseProcessWithdrawalInstruction, parseReferrerRequestWithdrawInstruction, parseRefundDepositInstruction, parseRegisterReferrerInstruction, parseRemoveStrategyInstruction, parseRequestBundleSwitchInstruction, parseRequestDepositInstruction, parseRequestWithdrawalInstruction, parseSetBundleCreatorInstruction, parseSetDelaysInstruction, parseSetFeesInstruction, parseSetKeeperInstruction, parseSetMaxDepositAmountInstruction, parseSetMinDepositAmountInstruction, parseSetOracleBufferInstruction, parseSetOracleMaxAgeInstruction, parseSetOracleUpdateTimeLimitInstruction, parseSetReferrerActiveInstruction, parseSetReferrerConfigInstruction, parseSetReferrerRateOverrideInstruction, parseSetUserFeeOverrideInstruction, parseSetUserReferrerInstruction, parseSetUserWithdrawalTimingOverrideInstruction, parseSetWithdrawalRedemptionScheduleInstruction, parseStartDistributionInstruction, parseUpdateAllocationsInstruction, parseUpdateOracleInstruction, resolveEffectiveFees, sharePriceRaw, toVaultConfig, toVaultRegistry, tokens, totalEquityRaw, vaults, vaultsDevnet };
|