@neutral-trade/sdk 0.4.19 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,6 +1,55 @@
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 { PublicKey } from "@solana/web3.js";
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)
@@ -177,381 +226,1596 @@ let VaultId = /* @__PURE__ */ function(VaultId$1) {
177
226
  }({});
178
227
 
179
228
  //#endregion
180
- //#region src/constants/vault-ids.devnet.ts
229
+ //#region src/registry/vaults.devnet.json
230
+ var vaults_devnet_default = [
231
+ {
232
+ "vaultId": 100000002,
233
+ "name": "bundle-1",
234
+ "type": "Bundle",
235
+ "category": "Market Neutral",
236
+ "vaultAddress": "HXvKAH4QyYMe7MsxC88pb19MhhYCEDHai87E8tZkmXmB",
237
+ "depositToken": "USDC",
238
+ "pointsMultiplier": 1,
239
+ "pointsEnabled": true
240
+ },
241
+ {
242
+ "vaultId": 100000003,
243
+ "name": "bundle-2",
244
+ "type": "Bundle",
245
+ "category": "Market Neutral",
246
+ "vaultAddress": "6nRRXv7GzreuE1PUgHySf9u6wwzXq61eiQbBpik1fbjy",
247
+ "depositToken": "USDC",
248
+ "pointsMultiplier": 1,
249
+ "pointsEnabled": true
250
+ },
251
+ {
252
+ "vaultId": 100000004,
253
+ "name": "bundle-4",
254
+ "type": "Bundle",
255
+ "category": "Market Neutral",
256
+ "vaultAddress": "8TqrZmyiWQ3F3WysiBaBQC1Nzj1LDn5AR7JjXBYzFxxQ",
257
+ "depositToken": "USDC",
258
+ "pointsMultiplier": 1,
259
+ "pointsEnabled": true
260
+ },
261
+ {
262
+ "vaultId": 100000005,
263
+ "name": "bundle-5",
264
+ "type": "Bundle",
265
+ "category": "Market Neutral",
266
+ "vaultAddress": "J17FgERPmZ9JQNjpaCKb3ZsYseeyrpw3PXFPUrK7zLVa",
267
+ "depositToken": "USDC",
268
+ "pointsMultiplier": 1,
269
+ "pointsEnabled": true
270
+ },
271
+ {
272
+ "vaultId": 100000006,
273
+ "name": "bundle-6",
274
+ "type": "Bundle",
275
+ "category": "Market Neutral",
276
+ "vaultAddress": "3VUBZk5V1KiPBdAj1Zkrnm3w8zriAg8UJ8Z155Ja8xdS",
277
+ "depositToken": "USDC",
278
+ "pointsMultiplier": 1,
279
+ "pointsEnabled": true
280
+ },
281
+ {
282
+ "vaultId": 100000007,
283
+ "name": "bundle-7",
284
+ "type": "Bundle",
285
+ "category": "Market Neutral",
286
+ "vaultAddress": "C2SGzvgoZu754yVNEL8ChAyxePo54CPpuyY3qMkmBSJA",
287
+ "depositToken": "USDC",
288
+ "pointsMultiplier": 1,
289
+ "pointsEnabled": true
290
+ },
291
+ {
292
+ "vaultId": 100000008,
293
+ "name": "bundle-8",
294
+ "type": "Bundle",
295
+ "category": "Market Neutral",
296
+ "vaultAddress": "H3jCQZWkMD3tPjLyzJiVq4unjX45YcN7J45zVPQXaegy",
297
+ "depositToken": "USDC",
298
+ "pointsMultiplier": 1,
299
+ "pointsEnabled": true
300
+ },
301
+ {
302
+ "vaultId": 100000009,
303
+ "name": "bundle-9",
304
+ "type": "Bundle",
305
+ "category": "Market Neutral",
306
+ "vaultAddress": "4kdm7AHWVfXUDE4qErojXDdLGnU7taZN7rcJ11uaLkH1",
307
+ "depositToken": "USDC",
308
+ "pointsMultiplier": 1,
309
+ "pointsEnabled": true
310
+ }
311
+ ];
312
+
313
+ //#endregion
314
+ //#region src/registry/vaults.json
315
+ var vaults_default = [
316
+ {
317
+ "vaultId": 82,
318
+ "name": "Nexus-USDC-Bundle",
319
+ "type": "Bundle",
320
+ "category": "Market Neutral",
321
+ "vaultAddress": "C68A4mAhA9EE4rWq9HmFnq3SPcbNmst6qiBWcna5VDHy",
322
+ "depositToken": "USDC",
323
+ "pointsMultiplier": 1,
324
+ "pointsEnabled": false
325
+ },
326
+ {
327
+ "vaultId": 81,
328
+ "name": "Ethereal-USDE-Bundle",
329
+ "type": "Bundle",
330
+ "category": "Market Neutral",
331
+ "vaultAddress": "HuwbT5aUYkFf8oniumt7XXJ1Y6GQv7EJACv55dAhjt6e",
332
+ "depositToken": "USDE",
333
+ "pointsMultiplier": 1,
334
+ "pointsEnabled": false
335
+ },
336
+ {
337
+ "vaultId": 80,
338
+ "name": "Options-MM-Z",
339
+ "type": "Bundle",
340
+ "category": "Market Neutral",
341
+ "vaultAddress": "3vZKAcd74bzwNYZmsJndYExkGj6ABQwrUoiMtdNfzLZe",
342
+ "depositToken": "USDC",
343
+ "pointsMultiplier": 1,
344
+ "pointsEnabled": false
345
+ },
346
+ {
347
+ "vaultId": 79,
348
+ "name": "Thirdeye-Flagship-USDC-Bundle",
349
+ "type": "Bundle",
350
+ "category": "Directional",
351
+ "vaultAddress": "EjRMd8PwrdoeijMqvXovQdx99EejjM8MpW2KF869asW7",
352
+ "depositToken": "USDC",
353
+ "pointsMultiplier": 1,
354
+ "pointsEnabled": false
355
+ },
356
+ {
357
+ "vaultId": 78,
358
+ "name": "Velox-Cross-USDC-Bundle",
359
+ "type": "Bundle",
360
+ "category": "Market Neutral",
361
+ "vaultAddress": "De47QBuMP7xukYBek5r4ScZF4HEk1kHW34ymKASz3DLt",
362
+ "depositToken": "USDC",
363
+ "pointsMultiplier": 1,
364
+ "pointsEnabled": true
365
+ },
366
+ {
367
+ "vaultId": 77,
368
+ "name": "Hyperithm CTA",
369
+ "type": "Bundle",
370
+ "category": "Directional",
371
+ "vaultAddress": "Ec6uSz5EsffwfXp43pvpz4rf9ttJRFKES4ZSVX7gVVkQ",
372
+ "depositToken": "USDC",
373
+ "pointsMultiplier": 1,
374
+ "pointsEnabled": true
375
+ },
376
+ {
377
+ "vaultId": 76,
378
+ "name": "Master Bundle",
379
+ "type": "Bundle",
380
+ "category": "Master Vault",
381
+ "vaultAddress": "J7qhMAKnB6G5dvoAN9281ufabajKbyGQxxd2bq6R7fPJ",
382
+ "depositToken": "USDC",
383
+ "pointsMultiplier": 2,
384
+ "pointsEnabled": true
385
+ },
386
+ {
387
+ "vaultId": 75,
388
+ "name": "AdverseGuard Alpha",
389
+ "type": "Bundle",
390
+ "category": "Market Neutral",
391
+ "vaultAddress": "46gSEJLNTdDFq7DPjH8RbcTmG1gyw4JCKCr1XfuAfYvh",
392
+ "depositToken": "USDC",
393
+ "pointsMultiplier": 1,
394
+ "pointsEnabled": true
395
+ },
396
+ {
397
+ "vaultId": 74,
398
+ "name": "Multi-Asset Volatility Arbitrage",
399
+ "type": "Bundle",
400
+ "category": "Market Neutral",
401
+ "vaultAddress": "4QBTzqUbn1crLg2PDUGt8abJfqHjeuZkjNLjCCit69ui",
402
+ "depositToken": "USDC",
403
+ "pointsMultiplier": 1,
404
+ "pointsEnabled": true
405
+ },
406
+ {
407
+ "vaultId": 73,
408
+ "name": "Great Debasement",
409
+ "type": "Bundle",
410
+ "category": "Index",
411
+ "vaultAddress": "7jEMJqWsHCkMDqChEuBwFo4yg27TSWFDooB8NorkGcjD",
412
+ "pointsMultiplier": 1,
413
+ "pointsEnabled": false,
414
+ "depositToken": "USDC"
415
+ },
416
+ {
417
+ "vaultId": 72,
418
+ "name": "CTA-Adaptive Alpha",
419
+ "subname": "Atlas Research",
420
+ "type": "Bundle",
421
+ "category": "Directional",
422
+ "vaultAddress": "Eo3m78EQcHnwMyHtxaiz1vw4nwHa85RuGE8jLsrELhxj",
423
+ "depositToken": "USDC",
424
+ "pointsMultiplier": 1,
425
+ "pointsEnabled": true
426
+ },
427
+ {
428
+ "vaultId": 71,
429
+ "name": "Hyperithm Cross-Exchange Arb",
430
+ "type": "Bundle",
431
+ "category": "Market Neutral",
432
+ "vaultAddress": "2bPiNfGc7exUcGkvV5nbsSkuNH3inFU18kgNEkB8fiaT",
433
+ "depositToken": "USDC",
434
+ "pointsMultiplier": 1,
435
+ "pointsEnabled": true
436
+ },
437
+ {
438
+ "vaultId": 70,
439
+ "name": "Lighter LLP",
440
+ "type": "Bundle",
441
+ "category": "Private Credit",
442
+ "vaultAddress": "dvsWTBqogw1cou8ducadzc3YCmUssjrrio8LmMtNWmz",
443
+ "depositToken": "USDC",
444
+ "pointsMultiplier": 1,
445
+ "pointsEnabled": false
446
+ },
447
+ {
448
+ "vaultId": 69,
449
+ "name": "JLP Delta Neutral",
450
+ "subname": "vault-jupiter",
451
+ "type": "Bundle",
452
+ "category": "Market Neutral",
453
+ "vaultAddress": "GiNbTRuRqvVGEEQGZKMjmwX84LrsbqfzVVNtWYbcZPCY",
454
+ "depositToken": "USDC",
455
+ "bundleProgramId": "BUNDeH5A4c47bcEoAjBhN3sCjLgYnRsmt9ibMztqVkC9",
456
+ "pointsMultiplier": 1,
457
+ "pointsEnabled": false
458
+ },
459
+ {
460
+ "vaultId": 68,
461
+ "name": "SOL Super Staking",
462
+ "subname": "Perps",
463
+ "type": "Drift",
464
+ "category": "Yield Enhancement",
465
+ "vaultAddress": "DiZ2RKDmCxMwPy8tEQzeh6dhKDEB9F5yezyJpEYqQyk9",
466
+ "depositToken": "SOL",
467
+ "pointsMultiplier": 1,
468
+ "pointsEnabled": false
469
+ },
470
+ {
471
+ "vaultId": 67,
472
+ "name": "Aster Funding Arb",
473
+ "type": "Bundle",
474
+ "category": "Market Neutral",
475
+ "vaultAddress": "976iyYPcj5obNC25A4SRP3quDLbDPeXLjF1cgUamMKBK",
476
+ "depositToken": "USDT",
477
+ "pointsMultiplier": 1,
478
+ "pointsEnabled": false
479
+ },
480
+ {
481
+ "vaultId": 66,
482
+ "name": "Moon LP",
483
+ "type": "Bundle",
484
+ "category": "Index",
485
+ "vaultAddress": "FMtgtataz4L2efYanxTGpVjg4njNe2j8QLLsnw5zeBPx",
486
+ "depositToken": "USDC",
487
+ "pointsMultiplier": 1,
488
+ "pointsEnabled": false
489
+ },
490
+ {
491
+ "vaultId": 65,
492
+ "name": "JLP Delta Neutral",
493
+ "subname": "Vault-CEX",
494
+ "type": "Bundle",
495
+ "category": "Market Neutral",
496
+ "vaultAddress": "9cMB2bMsLa9hZjRnjxFhg2DM9CLmjabMsGvfQUtdgupk",
497
+ "depositToken": "USDC",
498
+ "pointsMultiplier": 1,
499
+ "pointsEnabled": true
500
+ },
501
+ {
502
+ "vaultId": 64,
503
+ "name": "JLP Delta Neutral",
504
+ "subname": "vip24",
505
+ "type": "Drift",
506
+ "category": "Market Neutral",
507
+ "vaultAddress": "2Z2YH1RAXS8CNJo3QkYpQ4WHGH9jzNQ5m8YunRkY65mf",
508
+ "depositToken": "USDC",
509
+ "pointsMultiplier": 1,
510
+ "pointsEnabled": false
511
+ },
512
+ {
513
+ "vaultId": 63,
514
+ "name": "JLP Delta Neutral",
515
+ "subname": "vip23",
516
+ "type": "Drift",
517
+ "category": "Market Neutral",
518
+ "vaultAddress": "8oZhUFmrA7p3SkVX7o4nFfSLsmt3KfCyW8grFydtvvuj",
519
+ "depositToken": "USDC",
520
+ "pointsMultiplier": 1,
521
+ "pointsEnabled": false
522
+ },
523
+ {
524
+ "vaultId": 62,
525
+ "name": "JLP Delta Neutral",
526
+ "subname": "vip22",
527
+ "type": "Drift",
528
+ "category": "Market Neutral",
529
+ "vaultAddress": "HhhFKvtkbz9v7nDxsFVD8Z3qSY2r9Ncc9rnKopFaGCkb",
530
+ "depositToken": "USDC",
531
+ "pointsMultiplier": 1,
532
+ "pointsEnabled": false
533
+ },
534
+ {
535
+ "vaultId": 61,
536
+ "name": "USDC Max Yield",
537
+ "subname": "Kamino Lending",
538
+ "type": "Kamino",
539
+ "category": "Savings",
540
+ "vaultAddress": "67dqmR76uAbjX6e81A1ganKv3ou31WUMEdeWJkwVfeXy",
541
+ "depositToken": "USDC",
542
+ "pointsMultiplier": 1,
543
+ "pointsEnabled": true
544
+ },
545
+ {
546
+ "vaultId": 60,
547
+ "name": "NT Earn",
548
+ "type": "Bundle",
549
+ "category": "Savings",
550
+ "vaultAddress": "HWjMfYfc7KoPchoEDa5UFyVSpJxY3aV1RAccKvABYb9z",
551
+ "depositToken": "USDC",
552
+ "pointsMultiplier": 1,
553
+ "pointsEnabled": true
554
+ },
555
+ {
556
+ "vaultId": 59,
557
+ "name": "JLP Delta Neutral",
558
+ "subname": "Perena",
559
+ "type": "Drift",
560
+ "category": "Market Neutral",
561
+ "vaultAddress": "9vmBYT7hcjexuHM3iML3buTz3PchvULH5EfAjG12TtRZ",
562
+ "depositToken": "USDC",
563
+ "pointsMultiplier": 1,
564
+ "pointsEnabled": false
565
+ },
566
+ {
567
+ "vaultId": 58,
568
+ "name": "Memes ETF",
569
+ "subname": "Generational Wealth",
570
+ "type": "Drift",
571
+ "category": "Index",
572
+ "vaultAddress": "AHfaqTwFhWiX2DZrYbTivBpbrstNJRyjHG4mFPVpJS5n",
573
+ "depositToken": "USDC",
574
+ "pointsEnabled": false
575
+ },
576
+ {
577
+ "vaultId": 57,
578
+ "name": "JLP Delta Neutral",
579
+ "subname": "vip21",
580
+ "type": "Drift",
581
+ "category": "Market Neutral",
582
+ "vaultAddress": "7qPbUA5HmxjpoxniqoH8r5SZ5dY1hqYXGr8QSZsRXynX",
583
+ "depositToken": "USDC",
584
+ "pointsMultiplier": 1,
585
+ "pointsEnabled": false
586
+ },
587
+ {
588
+ "vaultId": 56,
589
+ "name": "BTC Dominance",
590
+ "type": "Hyperliquid",
591
+ "category": "Bet",
592
+ "vaultAddress": "0x799e0112977c37f8d93a768cf5a2305bdd3ae6f9",
593
+ "depositToken": "USDC",
594
+ "pointsEnabled": false
595
+ },
596
+ {
597
+ "vaultId": 55,
598
+ "name": "Alt Dominance",
599
+ "type": "Hyperliquid",
600
+ "category": "Bet",
601
+ "vaultAddress": "0xb03715bec4514ae7d338fcd85053ca227a1fb823",
602
+ "depositToken": "USDC",
603
+ "pointsEnabled": false
604
+ },
605
+ {
606
+ "vaultId": 54,
607
+ "name": "HYPE / SOL Pairs Trade",
608
+ "type": "Hyperliquid",
609
+ "category": "Bet",
610
+ "vaultAddress": "0xaae8a508a5e39c134a4d6a49d7dce82a17f84651",
611
+ "depositToken": "USDC",
612
+ "pointsEnabled": false
613
+ },
614
+ {
615
+ "vaultId": 53,
616
+ "name": "The Big Short",
617
+ "type": "Hyperliquid",
618
+ "category": "Bet",
619
+ "vaultAddress": "0xb2246d6f3ddeeca74cfd29dc3cce05c1746fcd68",
620
+ "depositToken": "USDC",
621
+ "pointsEnabled": false
622
+ },
623
+ {
624
+ "vaultId": 52,
625
+ "name": "CTA Momentum",
626
+ "subname": "R* Research",
627
+ "type": "Bundle",
628
+ "category": "Directional",
629
+ "vaultAddress": "HDDrsNSYpfHHfr646T4vfZvXDKcbzYYBEGTietGgi7rh",
630
+ "depositToken": "USDC",
631
+ "pointsMultiplier": 1,
632
+ "pointsEnabled": false
633
+ },
634
+ {
635
+ "vaultId": 51,
636
+ "name": "Term Max",
637
+ "type": "Bundle",
638
+ "category": "Private Credit",
639
+ "vaultAddress": "AvK6eRQNXiFfGSibrA96qDEtACkPyoouGrRGseryZFdE",
640
+ "depositToken": "USDC",
641
+ "pointsMultiplier": 1,
642
+ "pointsEnabled": false
643
+ },
644
+ {
645
+ "vaultId": 50,
646
+ "name": "ALP Delta Neutral Forest",
647
+ "type": "Bundle",
648
+ "category": "Market Neutral",
649
+ "vaultAddress": "HELqBHiykXecZqYEHSKFh7mzythQoM8CaXQuR6TESdPB",
650
+ "depositToken": "USDC",
651
+ "pointsEnabled": false
652
+ },
653
+ {
654
+ "vaultId": 49,
655
+ "name": "ALP Delta Neutral",
656
+ "type": "Bundle",
657
+ "category": "Market Neutral",
658
+ "vaultAddress": "5XNsfSeuB3SgknCHrbrv47UgcNNUMoG8CBzUJnwPcSej",
659
+ "depositToken": "USDC",
660
+ "pointsEnabled": false
661
+ },
662
+ {
663
+ "vaultId": 48,
664
+ "name": "Hyperliquid Funding Arb",
665
+ "type": "Bundle",
666
+ "category": "Market Neutral",
667
+ "vaultAddress": "nE1x7KQq2sm3GQrafQUUdBkSPPT52FmiMM9qAS1dgnC",
668
+ "depositToken": "USDC",
669
+ "pointsMultiplier": 1,
670
+ "pointsEnabled": true
671
+ },
672
+ {
673
+ "vaultId": 47,
674
+ "name": "Long BONK, Short PUMP",
675
+ "type": "Drift",
676
+ "category": "Bet",
677
+ "vaultAddress": "7uUJtfVzhu6aXZypsARsAK8sjWsDxWJYUkaNzm3hTgid",
678
+ "depositToken": "USDC",
679
+ "pointsEnabled": false
680
+ },
681
+ {
682
+ "vaultId": 46,
683
+ "name": "Hyper JLP",
684
+ "type": "Drift",
685
+ "category": "Index",
686
+ "vaultAddress": "A1B9MVput3r1jS91iu8ckdDiMSugXbQeEtvJEQsUHsPi",
687
+ "depositToken": "USDC",
688
+ "pointsMultiplier": 1,
689
+ "pointsEnabled": false
690
+ },
691
+ {
692
+ "vaultId": 45,
693
+ "name": "FART Dominance",
694
+ "subname": "Hot Air Rises",
695
+ "type": "Drift",
696
+ "category": "Bet",
697
+ "vaultAddress": "5cbTtvNVg1qc5L5Fcnz9R3X2QsYTtMCwBZRwBbuoEhn5",
698
+ "depositToken": "USDC",
699
+ "pointsEnabled": false
700
+ },
701
+ {
702
+ "vaultId": 44,
703
+ "name": "BTC Dominance",
704
+ "type": "Drift",
705
+ "category": "Bet",
706
+ "vaultAddress": "5BCDLjnQXv92AYySpdEpENgYhABaVf92fym1MYNyhVuo",
707
+ "depositToken": "USDC",
708
+ "pointsEnabled": false
709
+ },
710
+ {
711
+ "vaultId": 43,
712
+ "name": "JLP Delta Neutral",
713
+ "subname": "vip team",
714
+ "type": "Drift",
715
+ "category": "Market Neutral",
716
+ "vaultAddress": "FBYp9toQEqNiGeP8BzyvRD1FUauJBFk5eYUEkgqvigZ5",
717
+ "depositToken": "USDC",
718
+ "pointsEnabled": false
719
+ },
720
+ {
721
+ "vaultId": 42,
722
+ "name": "BTC Savings",
723
+ "subname": "Drawdown Protected",
724
+ "type": "Drift",
725
+ "category": "Savings",
726
+ "vaultAddress": "494C23vX4h7Bhfyz92hScg71PXn9huG9SqY8mFYhRJoK",
727
+ "depositToken": "WBTC",
728
+ "pointsEnabled": false
729
+ },
730
+ {
731
+ "vaultId": 41,
732
+ "name": "ETH Savings",
733
+ "subname": "Drawdown Protected",
734
+ "type": "Drift",
735
+ "category": "Savings",
736
+ "vaultAddress": "8JjFwxduSVCY91s2yBVGgKSAKPwPkuTKEchjRw74Du5w",
737
+ "depositToken": "WETH",
738
+ "pointsEnabled": false
739
+ },
740
+ {
741
+ "vaultId": 40,
742
+ "name": "SOL Savings",
743
+ "subname": "Drawdown Protected",
744
+ "type": "Drift",
745
+ "category": "Savings",
746
+ "vaultAddress": "A6cPV4DrePTUUamBM87MDqK9kBy9vbucjhrCxtxzExK9",
747
+ "depositToken": "SOL",
748
+ "pointsEnabled": false
749
+ },
750
+ {
751
+ "vaultId": 39,
752
+ "name": "USDC Savings",
753
+ "subname": "Drawdown Protected",
754
+ "type": "Drift",
755
+ "category": "Savings",
756
+ "vaultAddress": "4i2L5zvzUM5LXqUYm35Ytv4BGSmnFVTqG5xtFfJesm14",
757
+ "depositToken": "USDC",
758
+ "pointsEnabled": false
759
+ },
760
+ {
761
+ "vaultId": 38,
762
+ "name": "FUEL Maxi",
763
+ "type": "Drift",
764
+ "category": "Airdrop Farming",
765
+ "vaultAddress": "DzaHA2zD7XQhj2Z6tG9YxVtgcvJ4sqzeLYr8dszyQTEq",
766
+ "depositToken": "USDC",
767
+ "pointsEnabled": false
768
+ },
769
+ {
770
+ "vaultId": 37,
771
+ "name": "Inverse JLP DN",
772
+ "subname": "The Big Short",
773
+ "type": "Drift",
774
+ "category": "Bet",
775
+ "vaultAddress": "2csxi2M4uMijHW3CvnHqAYJ9CcLcZbGmDNKSz1qjRAVQ",
776
+ "depositToken": "USDC",
777
+ "pointsEnabled": false
778
+ },
779
+ {
780
+ "vaultId": 36,
781
+ "name": "JLP Delta Neutral",
782
+ "subname": "Neutralized JLP",
783
+ "type": "Drift",
784
+ "category": "Market Neutral",
785
+ "vaultAddress": "CG2zv4wsSetgs6mAucEKnHPwSoZSLYMwGroembTUNeaU",
786
+ "depositToken": "JLP",
787
+ "pointsMultiplier": 1,
788
+ "pointsEnabled": false
789
+ },
790
+ {
791
+ "vaultId": 35,
792
+ "name": "JLP Delta Neutral",
793
+ "subname": "vip20",
794
+ "type": "Drift",
795
+ "category": "Market Neutral",
796
+ "vaultAddress": "AAiykf4cgdFxz4kyRNuCFf9xFwy7c1gHiWacydmi1jLS",
797
+ "depositToken": "USDC",
798
+ "pointsEnabled": false
799
+ },
800
+ {
801
+ "vaultId": 34,
802
+ "name": "JLP Delta Neutral",
803
+ "subname": "vip19",
804
+ "type": "Drift",
805
+ "category": "Market Neutral",
806
+ "vaultAddress": "5DPwSqEfaEsBH4zzZha35TpWRRPnWFfVgYZyK3zNswT7",
807
+ "depositToken": "USDC",
808
+ "pointsMultiplier": 1,
809
+ "pointsEnabled": false
810
+ },
811
+ {
812
+ "vaultId": 33,
813
+ "name": "JLP Delta Neutral",
814
+ "subname": "Project Super",
815
+ "type": "Drift",
816
+ "category": "Market Neutral",
817
+ "vaultAddress": "6un71hP7xhpc8nqWWnbYPiamjAckEGH1A6zzenpGdZLf",
818
+ "depositToken": "USDC",
819
+ "pointsMultiplier": 1,
820
+ "pointsEnabled": false
821
+ },
822
+ {
823
+ "vaultId": 32,
824
+ "name": "JLP Delta Neutral",
825
+ "subname": "vip pool 1",
826
+ "type": "Drift",
827
+ "category": "Market Neutral",
828
+ "vaultAddress": "5FqiXogZCcyZoNeTZzNvywY5s9ZRzNsPPkZ2Q4YRu6ww",
829
+ "depositToken": "USDC",
830
+ "pointsMultiplier": 1,
831
+ "pointsEnabled": false
832
+ },
833
+ {
834
+ "vaultId": 31,
835
+ "name": "JLP Delta Neutral",
836
+ "subname": "Drift-5",
837
+ "type": "Drift",
838
+ "category": "Market Neutral",
839
+ "vaultAddress": "9omhWDzVxpX1vPBxAhJpVao7baoVzZpNib32vozZLxGm",
840
+ "depositToken": "USDC",
841
+ "pointsEnabled": false
842
+ },
843
+ {
844
+ "vaultId": 30,
845
+ "name": "Long SOL, Short ETH",
846
+ "subname": "Solana Flippening",
847
+ "type": "Drift",
848
+ "category": "Bet",
849
+ "vaultAddress": "2zsHAfvD2BpmZbuPhc32dija8cXu8ow6n2yzyZTMvQ8V",
850
+ "depositToken": "USDC",
851
+ "pointsMultiplier": 1,
852
+ "pointsEnabled": false
853
+ },
854
+ {
855
+ "vaultId": 29,
856
+ "name": "JLP Delta Neutral",
857
+ "subname": "Drift-4",
858
+ "type": "Drift",
859
+ "category": "Market Neutral",
860
+ "vaultAddress": "46fQeq1UX5djNkrY5d942inhRHjp1cTZmWBeCUZoqWT3",
861
+ "depositToken": "USDC",
862
+ "pointsMultiplier": 1,
863
+ "pointsEnabled": false
864
+ },
865
+ {
866
+ "vaultId": 28,
867
+ "name": "JLP Delta Neutral",
868
+ "subname": "vip18",
869
+ "type": "Drift",
870
+ "category": "Market Neutral",
871
+ "vaultAddress": "1CUvZgVGaxV6sDUjFrWHyzukWBD2amUi3dQkvh9KKVA",
872
+ "depositToken": "USDC",
873
+ "pointsEnabled": false
874
+ },
875
+ {
876
+ "vaultId": 27,
877
+ "name": "JLP Delta Neutral",
878
+ "subname": "vip17",
879
+ "type": "Drift",
880
+ "category": "Market Neutral",
881
+ "vaultAddress": "3UhqS9P4AhKMrCv7yE1LujgQS2xjFnRhANC5dPf2bZem",
882
+ "depositToken": "USDC",
883
+ "pointsEnabled": false
884
+ },
885
+ {
886
+ "vaultId": 26,
887
+ "name": "BTC Super Staking",
888
+ "subname": "tangem",
889
+ "type": "Drift",
890
+ "category": "Yield Enhancement",
891
+ "vaultAddress": "6E2sh7ygUzXFJAafXX5sMeSj7eK6YkYqpoAzXm7bYtCw",
892
+ "depositToken": "WBTC",
893
+ "pointsMultiplier": 1,
894
+ "pointsEnabled": false
895
+ },
896
+ {
897
+ "vaultId": 25,
898
+ "name": "JLP Delta Neutral",
899
+ "subname": "tangem",
900
+ "type": "Drift",
901
+ "category": "Market Neutral",
902
+ "vaultAddress": "HS2anXrdps1S2DZCHepgzfcoaqSUWBBuuqTRMugJisP2",
903
+ "depositToken": "USDC",
904
+ "pointsMultiplier": 1,
905
+ "pointsEnabled": false
906
+ },
907
+ {
908
+ "vaultId": 24,
909
+ "name": "JLP Delta Neutral",
910
+ "subname": "vip16",
911
+ "type": "Drift",
912
+ "category": "Market Neutral",
913
+ "vaultAddress": "4H3wAK5tkT7G1vFrj6J9jWGvbaqVGkzPPBsp9qyKUYz9",
914
+ "depositToken": "USDC",
915
+ "pointsEnabled": false
916
+ },
917
+ {
918
+ "vaultId": 23,
919
+ "name": "JLP Delta Neutral",
920
+ "subname": "vip15",
921
+ "type": "Drift",
922
+ "category": "Market Neutral",
923
+ "vaultAddress": "AwVR9y8Qw5erzrzE8hcs1j1se86yBwmrRidWb1qzaAy2",
924
+ "depositToken": "USDC",
925
+ "pointsMultiplier": 1,
926
+ "pointsEnabled": false
927
+ },
928
+ {
929
+ "vaultId": 22,
930
+ "name": "JLP Delta Neutral",
931
+ "subname": "vip14",
932
+ "type": "Drift",
933
+ "category": "Market Neutral",
934
+ "vaultAddress": "4iSH214QLwWnJQNwTH6VfH4oNcPccr7HnMmsybjnTtez",
935
+ "depositToken": "USDC",
936
+ "pointsEnabled": false
937
+ },
938
+ {
939
+ "vaultId": 21,
940
+ "name": "SOL Momentum",
941
+ "subname": "CTA-Marco",
942
+ "type": "Drift",
943
+ "category": "Directional",
944
+ "vaultAddress": "DbAX9qNiHrtrngLz8e5nBNWbmeGGVRKUQtxfGdENCFJS",
945
+ "depositToken": "USDC",
946
+ "pointsEnabled": false
947
+ },
948
+ {
949
+ "vaultId": 20,
950
+ "name": "JLP Delta Neutral",
951
+ "subname": "vip13",
952
+ "type": "Drift",
953
+ "category": "Market Neutral",
954
+ "vaultAddress": "9V2LggfMo1EjaBbq3qBRBifD287m8zryrZgTR72grcCp",
955
+ "depositToken": "USDC",
956
+ "pointsEnabled": false
957
+ },
958
+ {
959
+ "vaultId": 19,
960
+ "name": "JLP Delta Neutral",
961
+ "subname": "vip12",
962
+ "type": "Drift",
963
+ "category": "Market Neutral",
964
+ "vaultAddress": "GpMcLVnUqE1RyEB5rRFsFQJGKiPBBXqrpFsdbfUPgbqv",
965
+ "depositToken": "USDC",
966
+ "pointsEnabled": false
967
+ },
968
+ {
969
+ "vaultId": 18,
970
+ "name": "JLP Delta Neutral",
971
+ "subname": "vip11",
972
+ "type": "Drift",
973
+ "category": "Market Neutral",
974
+ "vaultAddress": "HhLwXF15V3MTVG9ucGGmT6mcEuqt2BjHuTCJBi4Zvi4K",
975
+ "depositToken": "USDC",
976
+ "pointsEnabled": false
977
+ },
978
+ {
979
+ "vaultId": 17,
980
+ "name": "USDC Staking",
981
+ "subname": "vip10",
982
+ "type": "Drift",
983
+ "category": "Market Neutral",
984
+ "vaultAddress": "5Wv7V9zLGD3g7JTXfYjpzFEs42kjowXqUHh7wQ5ryVef",
985
+ "depositToken": "USDC",
986
+ "pointsEnabled": false
987
+ },
988
+ {
989
+ "vaultId": 16,
990
+ "name": "JLP Delta Neutral",
991
+ "subname": "Drift-3",
992
+ "type": "Drift",
993
+ "category": "Market Neutral",
994
+ "vaultAddress": "7ngzeBygEksaBvKzHEeihqoLpDpWqTNRMVh2wCyb6NP8",
995
+ "depositToken": "USDC",
996
+ "pointsMultiplier": 1,
997
+ "pointsEnabled": false
998
+ },
999
+ {
1000
+ "vaultId": 15,
1001
+ "name": "SOL Super Staking",
1002
+ "subname": "vip8",
1003
+ "type": "Drift",
1004
+ "category": "Yield Enhancement",
1005
+ "vaultAddress": "CYUyHzu6Z3JyBhfkQpZZwWqa2zpcmzaK1xXS96n8ea1U",
1006
+ "depositToken": "SOL",
1007
+ "pointsEnabled": false
1008
+ },
1009
+ {
1010
+ "vaultId": 14,
1011
+ "name": "JLP Delta Neutral",
1012
+ "subname": "vip7",
1013
+ "type": "Drift",
1014
+ "category": "Market Neutral",
1015
+ "vaultAddress": "HTLvAjqc6Wkzh4i4QNLHhQHZAnrtVvkGyYeyCiUWLe9b",
1016
+ "depositToken": "USDC",
1017
+ "pointsEnabled": false
1018
+ },
1019
+ {
1020
+ "vaultId": 13,
1021
+ "name": "JLP Delta Neutral",
1022
+ "subname": "vip6",
1023
+ "type": "Drift",
1024
+ "category": "Market Neutral",
1025
+ "vaultAddress": "6DFDj66PbPoTC16Sh51MJijoTTMYCbMCVC85tnc5UfQ3",
1026
+ "depositToken": "USDC",
1027
+ "pointsEnabled": false
1028
+ },
1029
+ {
1030
+ "vaultId": 12,
1031
+ "name": "JLP Delta Neutral",
1032
+ "subname": "vip5",
1033
+ "type": "Drift",
1034
+ "category": "Market Neutral",
1035
+ "vaultAddress": "9BMEyctGvajEubk5iCRBnM9fkeTXUhrxaweYq34jZdC8",
1036
+ "depositToken": "USDC",
1037
+ "pointsEnabled": false
1038
+ },
1039
+ {
1040
+ "vaultId": 11,
1041
+ "name": "USDC Basis",
1042
+ "subname": "Perps Basket",
1043
+ "type": "Drift",
1044
+ "category": "Market Neutral",
1045
+ "vaultAddress": "4cvgasNfbJ36yeMVJSkscgL2Yco9dFGdj52Wrg91fmHv",
1046
+ "depositToken": "USDC",
1047
+ "pointsEnabled": false
1048
+ },
1049
+ {
1050
+ "vaultId": 10,
1051
+ "name": "JLP Delta Neutral",
1052
+ "subname": "vip3",
1053
+ "type": "Drift",
1054
+ "category": "Market Neutral",
1055
+ "vaultAddress": "Fd3k4c6Dv7m9673ae87P6duQrftY9UVfwiCxngNbJrUQ",
1056
+ "depositToken": "USDC",
1057
+ "pointsEnabled": false
1058
+ },
1059
+ {
1060
+ "vaultId": 9,
1061
+ "name": "JLP Delta Neutral",
1062
+ "subname": "vip2",
1063
+ "type": "Drift",
1064
+ "category": "Market Neutral",
1065
+ "vaultAddress": "DUW6uWcrsjYmsYDjp9iGDN4JdRa2MqznjuxjKVok5Fsj",
1066
+ "depositToken": "USDC",
1067
+ "pointsMultiplier": 1,
1068
+ "pointsEnabled": false
1069
+ },
1070
+ {
1071
+ "vaultId": 8,
1072
+ "name": "Drift funding arb",
1073
+ "type": "Drift",
1074
+ "category": "Market Neutral",
1075
+ "vaultAddress": "CxL8eQmGhN9LKSoHj7bU95JekFPtyZoUc57mbehb5A56",
1076
+ "depositToken": "USDC",
1077
+ "pointsMultiplier": 1,
1078
+ "pointsEnabled": false
1079
+ },
1080
+ {
1081
+ "vaultId": 7,
1082
+ "name": "JLP Traders Print",
1083
+ "type": "Drift",
1084
+ "category": "Bet",
1085
+ "vaultAddress": "85XuR4kE5yxp1hk91WHAawinXZsuJowxy59STYYpM9pK",
1086
+ "depositToken": "USDC",
1087
+ "pointsEnabled": false
1088
+ },
1089
+ {
1090
+ "vaultId": 6,
1091
+ "name": "ETH Super Staking",
1092
+ "type": "Drift",
1093
+ "category": "Yield Enhancement",
1094
+ "vaultAddress": "ENr5e1BMN5vFUHf4iCCPzR4GjWCKgtHnQcdniRQqMdEL",
1095
+ "depositToken": "WETH",
1096
+ "pointsMultiplier": 1,
1097
+ "pointsEnabled": false
1098
+ },
1099
+ {
1100
+ "vaultId": 5,
1101
+ "name": "JLP Delta Neutral",
1102
+ "subname": "vip1",
1103
+ "type": "Drift",
1104
+ "category": "Market Neutral",
1105
+ "vaultAddress": "CZU38L2NyL6tqFxzYAGYkmkf2JG98tZfZ2CnUapVgXQe",
1106
+ "depositToken": "USDC",
1107
+ "pointsEnabled": false
1108
+ },
1109
+ {
1110
+ "vaultId": 4,
1111
+ "name": "JLP Delta Neutral",
1112
+ "subname": "Drift-2",
1113
+ "type": "Drift",
1114
+ "category": "Market Neutral",
1115
+ "vaultAddress": "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU",
1116
+ "depositToken": "USDC",
1117
+ "pointsMultiplier": 1,
1118
+ "pointsEnabled": false
1119
+ },
1120
+ {
1121
+ "vaultId": 3,
1122
+ "name": "BTC Super Staking",
1123
+ "type": "Drift",
1124
+ "category": "Yield Enhancement",
1125
+ "vaultAddress": "BVddkVtFJLCihbVrtLo8e3iEd9NftuLunaznAxFFW8vf",
1126
+ "depositToken": "WBTC",
1127
+ "pointsMultiplier": 1,
1128
+ "pointsEnabled": false
1129
+ },
1130
+ {
1131
+ "vaultId": 2,
1132
+ "name": "JLP Traders Rekt",
1133
+ "type": "Drift",
1134
+ "category": "Bet",
1135
+ "vaultAddress": "2r81MPMDjGSrbmGRwzDg6aqhe3t3vbKcrYfpes5bXckS",
1136
+ "depositToken": "USDC",
1137
+ "pointsMultiplier": 1,
1138
+ "pointsEnabled": false
1139
+ },
1140
+ {
1141
+ "vaultId": 1,
1142
+ "name": "SOL Super Staking",
1143
+ "type": "Drift",
1144
+ "category": "Yield Enhancement",
1145
+ "vaultAddress": "EuSLjg23BrtwYAk1t4TFe5ArYSXCVXLBqrHRBfWQiTeJ",
1146
+ "depositToken": "SOL",
1147
+ "pointsMultiplier": 1,
1148
+ "pointsEnabled": false
1149
+ },
1150
+ {
1151
+ "vaultId": 0,
1152
+ "name": "JLP Delta Neutral",
1153
+ "subname": "vault-1",
1154
+ "type": "Drift",
1155
+ "category": "Market Neutral",
1156
+ "vaultAddress": "3Nkctq19AW7gs5hkxixUDjS9UVjmCwcNCo7rqPpub87c",
1157
+ "depositToken": "USDC",
1158
+ "driftProgramId": "9Fcn3Fd4d5ocrb12xCUtEvezxcjFEAyHBPfrZDiPt9Qj",
1159
+ "pointsEnabled": false
1160
+ }
1161
+ ];
1162
+
1163
+ //#endregion
1164
+ //#region src/types/tokens.ts
1165
+ let SupportedChain = /* @__PURE__ */ function(SupportedChain$1) {
1166
+ SupportedChain$1["Solana"] = "Solana";
1167
+ SupportedChain$1["Hyperliquid"] = "Hyperliquid";
1168
+ return SupportedChain$1;
1169
+ }({});
1170
+ let SupportedToken = /* @__PURE__ */ function(SupportedToken$1) {
1171
+ SupportedToken$1["USDC"] = "USDC";
1172
+ SupportedToken$1["USDT"] = "USDT";
1173
+ SupportedToken$1["USDE"] = "USDE";
1174
+ SupportedToken$1["SOL"] = "SOL";
1175
+ SupportedToken$1["WBTC"] = "WBTC";
1176
+ SupportedToken$1["WETH"] = "WETH";
1177
+ SupportedToken$1["JLP"] = "JLP";
1178
+ return SupportedToken$1;
1179
+ }({});
1180
+ const tokens = {
1181
+ [SupportedToken.USDC]: {
1182
+ name: "USD Coin",
1183
+ symbol: "USDC",
1184
+ onChain: {
1185
+ [SupportedChain.Solana]: {
1186
+ address: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
1187
+ decimals: 6
1188
+ },
1189
+ [SupportedChain.Hyperliquid]: null
1190
+ }
1191
+ },
1192
+ [SupportedToken.USDT]: {
1193
+ name: "Tether",
1194
+ symbol: "USDT",
1195
+ onChain: {
1196
+ [SupportedChain.Solana]: {
1197
+ address: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
1198
+ decimals: 6
1199
+ },
1200
+ [SupportedChain.Hyperliquid]: null
1201
+ }
1202
+ },
1203
+ [SupportedToken.USDE]: {
1204
+ name: "Ethena USDe",
1205
+ symbol: "USDe",
1206
+ onChain: {
1207
+ [SupportedChain.Solana]: {
1208
+ address: "DEkqHyPN7GMRJ5cArtQFAWefqbZb33Hyf6s5iCwjEonT",
1209
+ decimals: 9
1210
+ },
1211
+ [SupportedChain.Hyperliquid]: null
1212
+ }
1213
+ },
1214
+ [SupportedToken.SOL]: {
1215
+ name: "Wrapped SOL",
1216
+ symbol: "WSOL",
1217
+ onChain: {
1218
+ [SupportedChain.Solana]: {
1219
+ address: "So11111111111111111111111111111111111111112",
1220
+ decimals: 9
1221
+ },
1222
+ [SupportedChain.Hyperliquid]: null
1223
+ }
1224
+ },
1225
+ [SupportedToken.WBTC]: {
1226
+ name: "Wrapped BTC (Wormhole) (WBTC)",
1227
+ symbol: "WBTC",
1228
+ onChain: {
1229
+ [SupportedChain.Solana]: {
1230
+ address: "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh",
1231
+ decimals: 8
1232
+ },
1233
+ [SupportedChain.Hyperliquid]: null
1234
+ }
1235
+ },
1236
+ [SupportedToken.WETH]: {
1237
+ name: "Wrapped ETH (Wormhole) (WETH)",
1238
+ symbol: "WETH",
1239
+ onChain: {
1240
+ [SupportedChain.Solana]: {
1241
+ address: "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs",
1242
+ decimals: 8
1243
+ },
1244
+ [SupportedChain.Hyperliquid]: null
1245
+ }
1246
+ },
1247
+ [SupportedToken.JLP]: {
1248
+ name: "Jupiter Perps LP",
1249
+ symbol: "JLP",
1250
+ onChain: {
1251
+ [SupportedChain.Solana]: {
1252
+ address: "27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4",
1253
+ decimals: 6
1254
+ },
1255
+ [SupportedChain.Hyperliquid]: null
1256
+ }
1257
+ }
1258
+ };
1259
+ /** Devnet SPL mint overrides (`depositToken` still uses `SupportedToken`). */
1260
+ const SOLANA_MINT_OVERRIDES_DEVNET = { [SupportedToken.USDC]: "6a8hWCCa2QDQTqzLUapZwZtgHTox8BsgataN6JVLwdo7" };
181
1261
  /**
182
- * Vault ID constants (DevnetVaultId)
183
- * Auto-generated from the vault registry JSON.
1262
+ * Solana mint address for a supported token, keyed by bundle cluster.
1263
+ * Devnet USDC uses the team mock mint; other tokens use mainnet table until devnet overrides exist.
184
1264
  */
185
- let DevnetVaultId = /* @__PURE__ */ function(DevnetVaultId$1) {
186
- /** bundle-1 */
187
- DevnetVaultId$1[DevnetVaultId$1["bundle_1_100000002"] = 100000002] = "bundle_1_100000002";
188
- /** bundle-2 */
189
- DevnetVaultId$1[DevnetVaultId$1["bundle_2_100000003"] = 100000003] = "bundle_2_100000003";
190
- /** bundle-4 */
191
- DevnetVaultId$1[DevnetVaultId$1["bundle_4_100000004"] = 100000004] = "bundle_4_100000004";
192
- /** bundle-5 */
193
- DevnetVaultId$1[DevnetVaultId$1["bundle_5_100000005"] = 100000005] = "bundle_5_100000005";
194
- /** bundle-6 */
195
- DevnetVaultId$1[DevnetVaultId$1["bundle_6_100000006"] = 100000006] = "bundle_6_100000006";
196
- /** bundle-7 */
197
- DevnetVaultId$1[DevnetVaultId$1["bundle_7_100000007"] = 100000007] = "bundle_7_100000007";
198
- /** bundle-8 */
199
- DevnetVaultId$1[DevnetVaultId$1["bundle_8_100000008"] = 100000008] = "bundle_8_100000008";
200
- /** bundle-9 */
201
- DevnetVaultId$1[DevnetVaultId$1["bundle_9_100000009"] = 100000009] = "bundle_9_100000009";
202
- return DevnetVaultId$1;
1265
+ function getSolanaTokenMint(token, cluster = "mainnet") {
1266
+ const row = tokens[token].onChain[SupportedChain.Solana];
1267
+ if (!row) throw new Error(`No Solana mint configured for ${token}`);
1268
+ if (cluster === "devnet") {
1269
+ const override = SOLANA_MINT_OVERRIDES_DEVNET[token];
1270
+ if (override) return override;
1271
+ }
1272
+ return row.address;
1273
+ }
1274
+ /** SPL decimals for `token` (same on mainnet vs devnet for current overrides). */
1275
+ function getSolanaTokenDecimals(token) {
1276
+ const row = tokens[token].onChain[SupportedChain.Solana];
1277
+ if (!row) throw new Error(`No Solana decimals configured for ${token}`);
1278
+ return row.decimals;
1279
+ }
1280
+
1281
+ //#endregion
1282
+ //#region src/types/vault-types.ts
1283
+ let VaultType = /* @__PURE__ */ function(VaultType$1) {
1284
+ VaultType$1["Drift"] = "Drift";
1285
+ VaultType$1["Bundle"] = "Bundle";
1286
+ VaultType$1["Hyperliquid"] = "Hyperliquid";
1287
+ VaultType$1["Kamino"] = "Kamino";
1288
+ return VaultType$1;
1289
+ }({});
1290
+ let VaultCategory = /* @__PURE__ */ function(VaultCategory$1) {
1291
+ VaultCategory$1["marketNeutral"] = "Market Neutral";
1292
+ VaultCategory$1["directional"] = "Directional";
1293
+ VaultCategory$1["etf"] = "Index";
1294
+ VaultCategory$1["bet"] = "Bet";
1295
+ VaultCategory$1["savings"] = "Savings";
1296
+ VaultCategory$1["privateCredit"] = "Private Credit";
1297
+ VaultCategory$1["airdropFarming"] = "Airdrop Farming";
1298
+ VaultCategory$1["yieldEnhancement"] = "Yield Enhancement";
1299
+ VaultCategory$1["fundOfFund"] = "Master Vault";
1300
+ return VaultCategory$1;
203
1301
  }({});
1302
+ /** Zod schema for validating registry entries */
1303
+ const VaultRegistryEntrySchema = z.object({
1304
+ vaultId: z.number().int().min(0),
1305
+ name: z.string().min(1).max(100),
1306
+ subname: z.string().max(100).optional(),
1307
+ type: z.nativeEnum(VaultType),
1308
+ category: z.nativeEnum(VaultCategory),
1309
+ vaultAddress: z.string().min(32).max(44),
1310
+ depositToken: z.nativeEnum(SupportedToken),
1311
+ driftProgramId: z.string().min(32).max(44).optional(),
1312
+ bundleProgramId: z.string().min(32).max(44).optional(),
1313
+ pointsMultiplier: z.number().min(0).optional(),
1314
+ pointsEnabled: z.boolean().optional()
1315
+ });
1316
+ /** Schema for validating array of registry entries */
1317
+ const VaultRegistryArraySchema = z.array(VaultRegistryEntrySchema).superRefine((vaults$1, ctx) => {
1318
+ const seen = /* @__PURE__ */ new Set();
1319
+ for (const vault of vaults$1) {
1320
+ if (seen.has(vault.vaultId)) ctx.addIssue({
1321
+ code: z.ZodIssueCode.custom,
1322
+ message: `Duplicate vaultId: ${vault.vaultId}`
1323
+ });
1324
+ seen.add(vault.vaultId);
1325
+ }
1326
+ });
204
1327
 
205
1328
  //#endregion
206
- //#region src/utils/bundle-fee-override.ts
207
- /** Mirrors `bundle-sc` `FEE_OVERRIDE_*` bit flags. */
208
- const FEE_OVERRIDE = {
209
- DEPOSIT: 1,
210
- WITHDRAWAL: 2,
211
- PERFORMANCE: 4,
212
- MANAGEMENT: 8,
213
- ALL: 15
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
- };
1329
+ //#region src/constants/vaults.ts
1330
+ /**
1331
+ * Get Bundle Program ID for a vault config
1332
+ * Uses registry value if present, otherwise falls back to cluster default.
1333
+ */
1334
+ function getBundleProgramId(vault, cluster = "mainnet") {
1335
+ if (vault.type !== VaultType.Bundle) return;
1336
+ if (vault.bundleProgramId) return vault.bundleProgramId;
1337
+ return getDefaultBundleProgramIdByCluster(cluster);
252
1338
  }
253
- function toNum(value) {
254
- if (typeof value === "number") return value;
255
- if (typeof value === "bigint") return Number(value);
256
- if (typeof value === "object" && value !== null && "toNumber" in value) return value.toNumber();
257
- return Number(String(value ?? 0));
1339
+ /**
1340
+ * Get Drift Program ID for a vault config.
1341
+ * Uses registry value if present, otherwise defaults to VAULT_PROGRAM_ID
1342
+ */
1343
+ function getDriftProgramId(vault) {
1344
+ if (vault.type !== VaultType.Drift) return;
1345
+ if (vault.driftProgramId) return vault.driftProgramId;
1346
+ return "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR";
258
1347
  }
259
- function bundleDefaultFeeBps(bundle) {
260
- const b = bundle;
1348
+ /**
1349
+ * Transform a registry entry to VaultConfig with program IDs
1350
+ * - Drift vaults get driftProgramId
1351
+ * - Bundle vaults get bundleProgramId (registry value or cluster default via {@link getBundleProgramId})
1352
+ */
1353
+ function toVaultConfig(entry, cluster = "mainnet") {
261
1354
  return {
262
- depositFeeBps: toNum(b.depositFee),
263
- withdrawalFeeBps: toNum(b.withdrawalFee),
264
- performanceFeeBps: toNum(b.performanceFee),
265
- managementFeeBps: toNum(b.managementFeeBps)
1355
+ ...entry,
1356
+ driftProgramId: getDriftProgramId(entry),
1357
+ bundleProgramId: getBundleProgramId(entry, cluster)
266
1358
  };
267
1359
  }
268
- function vaultFeeDecimalsToBps(fees) {
269
- return {
270
- depositFeeBps: feeDecimalToBps(fees.dfee),
271
- withdrawalFeeBps: feeDecimalToBps(fees.wfee),
272
- performanceFeeBps: feeDecimalToBps(fees.pfee),
273
- managementFeeBps: feeDecimalToBps(fees.mfee)
274
- };
1360
+ /**
1361
+ * Transform an array of registry entries to VaultRegistry
1362
+ * @param entries Registry entries to transform
1363
+ * @param cluster Used to resolve default bundle program id when `bundleProgramId` is omitted in JSON
1364
+ */
1365
+ function toVaultRegistry(entries, cluster = "mainnet") {
1366
+ return Object.fromEntries(entries.map((entry) => [entry.vaultId, toVaultConfig(entry, cluster)]));
275
1367
  }
276
- function effectiveFeeBpsToDecimals(fees) {
277
- return {
278
- dfee: bpsToFeeDecimal(fees.depositFeeBps),
279
- wfee: bpsToFeeDecimal(fees.withdrawalFeeBps),
280
- pfee: bpsToFeeDecimal(fees.performanceFeeBps),
281
- mfee: bpsToFeeDecimal(fees.managementFeeBps)
282
- };
1368
+ const parsedVaultsMainnet = VaultRegistryArraySchema.parse(vaults_default);
1369
+ const parsedVaultsDevnet = VaultRegistryArraySchema.parse(vaults_devnet_default);
1370
+ const vaultsMainnetRegistry = toVaultRegistry(parsedVaultsMainnet, "mainnet");
1371
+ const vaultsDevnetRegistry = toVaultRegistry(parsedVaultsDevnet, "devnet");
1372
+ /** Mainnet registry (default; backward compatible). */
1373
+ const vaults = vaultsMainnetRegistry;
1374
+ /** Devnet-only vault registry (fixtures / local testing). */
1375
+ const vaultsDevnet = vaultsDevnetRegistry;
1376
+ function getVaultRegistry(cluster) {
1377
+ return cluster === "devnet" ? vaultsDevnetRegistry : vaultsMainnetRegistry;
1378
+ }
1379
+ function isValidVaultAddress(address, cluster = "mainnet") {
1380
+ return Object.values(getVaultRegistry(cluster)).map((vault) => vault.vaultAddress).includes(address);
1381
+ }
1382
+ function getVaultByAddress(address, cluster = "mainnet") {
1383
+ return Object.values(getVaultRegistry(cluster)).find((v) => v.vaultAddress === address);
283
1384
  }
1385
+ function getVaultById(vaultId, cluster = "mainnet") {
1386
+ return getVaultRegistry(cluster)[vaultId];
1387
+ }
1388
+
1389
+ //#endregion
1390
+ //#region src/constants/points-vaults.ts
284
1391
  /**
285
- * Apply per-user fee override flags onto default bps (bundle or vault-config defaults).
1392
+ * Get vaults that earn points, filtered by pointsEnabled !== false.
1393
+ * Returns entries ready for points backend consumption.
286
1394
  */
287
- function resolveEffectiveFeeBpsFromDefaults(defaults, user) {
288
- const flags = toNum(user.feeOverrideFlags);
289
- if (flags === 0) return defaults;
1395
+ function getPointsVaults(registry) {
1396
+ return Object.values(registry).filter((v) => v.pointsEnabled !== false).map((v) => toPointsVaultEntry(v));
1397
+ }
1398
+ function toPointsVaultEntry(entry) {
290
1399
  return {
291
- depositFeeBps: (flags & FEE_OVERRIDE.DEPOSIT) !== 0 ? toNum(user.customDepositFeeBps) : defaults.depositFeeBps,
292
- withdrawalFeeBps: (flags & FEE_OVERRIDE.WITHDRAWAL) !== 0 ? toNum(user.customWithdrawalFeeBps) : defaults.withdrawalFeeBps,
293
- performanceFeeBps: (flags & FEE_OVERRIDE.PERFORMANCE) !== 0 ? toNum(user.customPerformanceFeeBps) : defaults.performanceFeeBps,
294
- managementFeeBps: (flags & FEE_OVERRIDE.MANAGEMENT) !== 0 ? toNum(user.customManagementFeeBps) : defaults.managementFeeBps
1400
+ vaultId: entry.vaultId,
1401
+ name: entry.subname ? `${entry.name} -- ${entry.subname}` : entry.name,
1402
+ address: entry.vaultAddress,
1403
+ depositToken: entry.depositToken,
1404
+ type: entry.type,
1405
+ multiplier: entry.pointsMultiplier ?? 1,
1406
+ enabled: entry.pointsEnabled !== false,
1407
+ bundleProgramId: entry.bundleProgramId
295
1408
  };
296
1409
  }
1410
+
1411
+ //#endregion
1412
+ //#region src/extensions/ata.ts
297
1413
  /**
298
- * Mirror on-chain `resolve_effective_fees`. Returns fee rates in bps.
1414
+ * SPL Associated Token Account program. Codama cannot derive PDAs owned by an
1415
+ * external program, so this helper is hand-written. It mirrors the hardcoded
1416
+ * derivation the generated `requestDeposit` builder performs internally for
1417
+ * the pending-deposit token account.
299
1418
  */
300
- function resolveEffectiveFeeBps(bundle, user) {
301
- return resolveEffectiveFeeBpsFromDefaults(bundleDefaultFeeBps(bundle), user);
1419
+ const ASSOCIATED_TOKEN_PROGRAM_ADDRESS = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
1420
+ const TOKEN_PROGRAM_ADDRESS = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
1421
+ /**
1422
+ * Derives the associated token account for `owner` and `mint`.
1423
+ * Works for PDA owners as well (the derivation is curve-agnostic).
1424
+ */
1425
+ async function findAssociatedTokenPda(seeds) {
1426
+ const addressEncoder = getAddressEncoder();
1427
+ return await getProgramDerivedAddress({
1428
+ programAddress: ASSOCIATED_TOKEN_PROGRAM_ADDRESS,
1429
+ seeds: [
1430
+ addressEncoder.encode(seeds.owner),
1431
+ addressEncoder.encode(seeds.tokenProgram ?? TOKEN_PROGRAM_ADDRESS),
1432
+ addressEncoder.encode(seeds.mint)
1433
+ ]
1434
+ });
302
1435
  }
1436
+
1437
+ //#endregion
1438
+ //#region src/extensions/math.ts
1439
+ /** Mirrors `BPS_DENOMINATOR` in `constants.rs:12` and its use in `charge_user_fees` at `bundle.rs:693-695`. */
1440
+ const BPS_DENOMINATOR = 10000n;
1441
+ /** Mirrors `SECONDS_IN_YEAR` in `constants.rs:11` and its use in `charge_user_fees` at `bundle.rs:693-695`. */
1442
+ const SECONDS_IN_YEAR = 31536000n;
1443
+ /** Upper bound for the Rust `u64` amounts consumed by `fetch_total_equity` at `bundle.rs:244-257`. */
1444
+ const U64_MAX = 18446744073709551615n;
303
1445
  /**
304
- * Resolve effective fees for UI vault config defaults + optional user bundle account.
305
- * Returns decimal fees (`0.01` = 1%).
1446
+ * Parses a positive decimal `u64` amount for Rust amount paths such as
1447
+ * `calculate_assets_from_shares` at `bundle.rs:259-270`.
306
1448
  */
307
- function resolveEffectiveVaultFees(vaultDefaults, user) {
308
- if (!user) return vaultDefaults;
309
- return effectiveFeeBpsToDecimals(resolveEffectiveFeeBpsFromDefaults(vaultFeeDecimalsToBps(vaultDefaults), user));
1449
+ function parseAmountRaw(amountRaw) {
1450
+ const trimmedAmountRaw = amountRaw.trim();
1451
+ if (!/^\d+$/.test(trimmedAmountRaw)) throw new Error("INVALID_AMOUNT_RAW");
1452
+ const amount = BigInt(trimmedAmountRaw);
1453
+ assertValidAmountRaw(amount);
1454
+ return amount;
310
1455
  }
311
- function hasAnyFeeOverride(user) {
312
- if (!user) return false;
313
- return toNum(user.feeOverrideFlags) !== 0;
1456
+ /**
1457
+ * Enforces the positive Rust `u64` bounds used by amount parameters such as
1458
+ * `total_assets` in `calculate_assets_from_shares` at `bundle.rs:259-270`.
1459
+ */
1460
+ function assertValidAmountRaw(amountRaw) {
1461
+ if (amountRaw <= 0n || amountRaw > U64_MAX) throw new Error("INVALID_AMOUNT_RAW");
314
1462
  }
315
- function hasCustomFeeRate(effectiveFees, vaultDefaults) {
316
- return Math.abs(effectiveFees.dfee - vaultDefaults.dfee) > FEE_EPS || Math.abs(effectiveFees.wfee - vaultDefaults.wfee) > FEE_EPS || Math.abs(effectiveFees.pfee - vaultDefaults.pfee) > FEE_EPS || Math.abs(effectiveFees.mfee - vaultDefaults.mfee) > FEE_EPS;
1463
+ /**
1464
+ * Converts a UI float to the integer amount domain used by
1465
+ * `calculate_assets_from_shares` at `bundle.rs:259-270`.
1466
+ */
1467
+ function humanFloatToAmountRaw(human, decimals) {
1468
+ if (!Number.isFinite(human) || human <= 0 || !Number.isInteger(decimals) || decimals < 0 || decimals > 18) throw new Error("INVALID_HUMAN_AMOUNT");
1469
+ const scaledAmount = human * 10 ** decimals;
1470
+ if (!Number.isFinite(scaledAmount)) throw new Error("INVALID_HUMAN_AMOUNT");
1471
+ const roundedAmount = Math.round(scaledAmount);
1472
+ if (roundedAmount <= 0) throw new Error("INVALID_HUMAN_AMOUNT");
1473
+ const amountRaw = BigInt(roundedAmount);
1474
+ assertValidAmountRaw(amountRaw);
1475
+ return amountRaw;
317
1476
  }
318
- function computeDepositFeePreview(grossAmount, depositFeeDecimal) {
319
- if (grossAmount <= 0 || depositFeeDecimal <= 0) return {
320
- feeAmount: 0,
321
- netAmount: grossAmount
322
- };
323
- const feeAmount = grossAmount * depositFeeDecimal;
324
- return {
325
- feeAmount,
326
- netAmount: grossAmount - feeAmount
327
- };
1477
+ /** Mirrors `fetch_total_equity` at `bundle.rs:244-257`. */
1478
+ function totalEquityRaw(args) {
1479
+ return args.bundleUnderlyingBalance + args.averageExternalEquity;
1480
+ }
1481
+ /** Mirrors the share-price calculation in `charge_user_fees` at `bundle.rs:662-670`. */
1482
+ function sharePriceRaw(args) {
1483
+ return args.totalShares > 0n ? args.totalAssets * args.assetPrecision / args.totalShares : args.assetPrecision;
1484
+ }
1485
+ /**
1486
+ * Mirrors `calculate_assets_from_shares` at `bundle.rs:259-270`. When
1487
+ * `totalShares` is zero this read-only helper returns zero, while the Rust
1488
+ * function reports a division error.
1489
+ */
1490
+ function calculateAssetsFromShares(args) {
1491
+ return args.totalShares === 0n ? 0n : args.shares * args.totalAssets / args.totalShares;
328
1492
  }
329
- /** Same linear preview as deposit: fee = gross × rate, net = gross − fee. */
330
- function computeWithdrawFeePreview(grossAmount, withdrawalFeeDecimal) {
331
- return computeDepositFeePreview(grossAmount, withdrawalFeeDecimal);
1493
+ /**
1494
+ * Applies the legacy withdrawal-share ratio using the integer division from
1495
+ * `calculate_assets_from_shares` at `bundle.rs:259-270`.
1496
+ */
1497
+ function computeWithdrawalShares(args) {
1498
+ if (args.totalShares === 0n || args.userShares === 0n) return 0n;
1499
+ const userTokenRaw = args.userShares * args.totalEquity / args.totalShares;
1500
+ if (args.amountRaw >= userTokenRaw) return args.userShares;
1501
+ if (args.totalEquity === 0n) return 0n;
1502
+ const computedShares = args.amountRaw * args.totalShares / args.totalEquity;
1503
+ return computedShares > args.userShares ? args.userShares : computedShares;
1504
+ }
1505
+ /**
1506
+ * Returns the UI ratio corresponding to the price calculation in
1507
+ * `charge_user_fees` at `bundle.rs:662-670`. Converting bigints to numbers can
1508
+ * lose precision.
1509
+ */
1510
+ function calculateOnChainPps(args) {
1511
+ return args.totalShares === 0n ? 0 : Number(args.totalEquity) / Number(args.totalShares);
332
1512
  }
333
1513
 
334
1514
  //#endregion
335
- //#region src/utils/bundle.ts
336
- const SECONDS_PER_YEAR = 365n * 24n * 60n * 60n;
337
- function bnToBigInt(v) {
338
- if (v == null) return 0n;
339
- return BigInt(v.toString());
1515
+ //#region src/extensions/fees.ts
1516
+ /** Mirrors `FEE_OVERRIDE_DEPOSIT` in `constants.rs:15`. */
1517
+ const FEE_OVERRIDE_DEPOSIT = 1;
1518
+ /** Mirrors `FEE_OVERRIDE_WITHDRAWAL` in `constants.rs:16`. */
1519
+ const FEE_OVERRIDE_WITHDRAWAL = 2;
1520
+ /** Mirrors `FEE_OVERRIDE_PERFORMANCE` in `constants.rs:17`. */
1521
+ const FEE_OVERRIDE_PERFORMANCE = 4;
1522
+ /** Mirrors `FEE_OVERRIDE_MANAGEMENT` in `constants.rs:18`. */
1523
+ const FEE_OVERRIDE_MANAGEMENT = 8;
1524
+ /** Mirrors `resolve_effective_fees` at `bundle.rs:433-457`, including zero-valued overrides. */
1525
+ function resolveEffectiveFees(bundle, user) {
1526
+ return {
1527
+ depositFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_DEPOSIT ? user.customDepositFeeBps : bundle.depositFee,
1528
+ withdrawalFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_WITHDRAWAL ? user.customWithdrawalFeeBps : bundle.withdrawalFee,
1529
+ performanceFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_PERFORMANCE ? user.customPerformanceFeeBps : bundle.performanceFee,
1530
+ managementFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_MANAGEMENT ? user.customManagementFeeBps : bundle.managementFeeBps
1531
+ };
340
1532
  }
341
1533
  /**
342
- * Estimated unpaid bundle fees in deposit token (mgmt + performance), matching on-chain `charge_user_fees`.
1534
+ * Estimates the user-share deductions in `charge_user_fees` at
1535
+ * `bundle.rs:653-851`. Referral handling at `bundle.rs:767-800` is omitted
1536
+ * because it only divides the same deducted shares between manager and
1537
+ * referrer. If `assetPrecision` is zero, this helper returns a zero fee value;
1538
+ * the Rust function reports a division error at `bundle.rs:829-834`.
343
1539
  */
344
- function estimatePendingBundleFeeToken({ oracleData, bundleData, userBundle, assetDecimals, nowUnixSeconds = Math.floor(Date.now() / 1e3) }) {
345
- const userShares = bnToBigInt(userBundle.shares);
346
- if (userShares <= 0n) return 0;
347
- const totalShares = bnToBigInt(bundleData.totalShares);
348
- const totalAssets = bnToBigInt(oracleData.averageExternalEquity) + bnToBigInt(bundleData.bundleUnderlyingBalance);
349
- const extra = bundleData;
350
- const assetPrec = extra.assetPrecision != null ? BigInt(extra.assetPrecision.toString()) : BigInt(10 ** assetDecimals);
351
- const sharePrice = totalShares > 0n ? totalAssets * assetPrec / totalShares : assetPrec;
352
- const effectiveFees = resolveEffectiveFeeBps(bundleData, userBundle);
353
- const managementFeeBps = BigInt(effectiveFees.managementFeeBps);
354
- const performanceFeeBps = BigInt(effectiveFees.performanceFeeBps);
355
- const lastMgmtTs = bnToBigInt(userBundle.lastManagementFeeTimestamp);
356
- const nowTs = BigInt(nowUnixSeconds);
1540
+ function estimatePendingUserFees(args) {
1541
+ const sharePrice = sharePriceRaw({
1542
+ totalAssets: totalEquityRaw({
1543
+ bundleUnderlyingBalance: args.bundle.bundleUnderlyingBalance,
1544
+ averageExternalEquity: args.oracleData.averageExternalEquity
1545
+ }),
1546
+ totalShares: args.bundle.totalShares,
1547
+ assetPrecision: args.bundle.assetPrecision
1548
+ });
1549
+ const effectiveFees = resolveEffectiveFees(args.bundle, args.userBundle);
357
1550
  let managementFeeShares = 0n;
358
- if (lastMgmtTs > 0n && managementFeeBps > 0n) {
359
- const secondsElapsed = nowTs > lastMgmtTs ? nowTs - lastMgmtTs : 0n;
360
- if (secondsElapsed > 0n) managementFeeShares = userShares * secondsElapsed * managementFeeBps / (SECONDS_PER_YEAR * 10000n);
1551
+ if (args.userBundle.lastManagementFeeTimestamp > 0n) {
1552
+ const elapsed = BigInt(args.nowUnixSeconds) - args.userBundle.lastManagementFeeTimestamp;
1553
+ const secondsElapsed = elapsed > 0n ? elapsed : 0n;
1554
+ managementFeeShares = args.userBundle.shares * secondsElapsed * BigInt(effectiveFees.managementFeeBps) / (SECONDS_IN_YEAR * BPS_DENOMINATOR);
361
1555
  }
362
- const hwmPerShare = bnToBigInt(userBundle.hwmPerShare);
1556
+ const hwmValue = args.userBundle.hwmPerShare === 0n ? sharePrice : args.userBundle.hwmPerShare;
363
1557
  let performanceFeeShares = 0n;
364
- if (performanceFeeBps > 0n && sharePrice > 0n) {
365
- const hwmValue = hwmPerShare === 0n ? sharePrice : hwmPerShare;
366
- if (sharePrice > hwmValue) performanceFeeShares = (sharePrice - hwmValue) * userShares * performanceFeeBps / (sharePrice * 10000n);
367
- }
1558
+ if (sharePrice !== 0n && sharePrice > hwmValue) performanceFeeShares = (sharePrice - hwmValue) * args.userBundle.shares * BigInt(effectiveFees.performanceFeeBps) / (sharePrice * BPS_DENOMINATOR);
1559
+ managementFeeShares = managementFeeShares < args.userBundle.shares ? managementFeeShares : args.userBundle.shares;
1560
+ const remainingShares = args.userBundle.shares - managementFeeShares;
1561
+ performanceFeeShares = performanceFeeShares < remainingShares ? performanceFeeShares : remainingShares;
368
1562
  const totalFeeShares = managementFeeShares + performanceFeeShares;
369
- if (totalFeeShares === 0n) return 0;
370
- const feeValueRaw = totalFeeShares * sharePrice / assetPrec;
371
- const divisor = 10 ** assetDecimals;
372
- return Number(feeValueRaw) / divisor;
373
- }
374
- /**
375
- * Calculate on-chain PPS for Bundle vault
376
- * Formula: (Oracle Average External Equity + USDC on Bundle PDA) / Total Shares
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;
1563
+ const feeValueRaw = args.bundle.assetPrecision === 0n ? 0n : totalFeeShares * sharePrice / args.bundle.assetPrecision;
1564
+ return {
1565
+ managementFeeShares,
1566
+ performanceFeeShares,
1567
+ totalFeeShares,
1568
+ feeValueRaw,
1569
+ sharePrice
1570
+ };
382
1571
  }
1572
+
1573
+ //#endregion
1574
+ //#region src/extensions/balances.ts
383
1575
  /**
384
- * Calculate Bundle vault user balance from on-chain data
1576
+ * Calculates the raw balance fields returned by the legacy SDK's
1577
+ * `calculateBundleUserBalance`. The legacy helper used floating-point PPS and
1578
+ * `Math.round`; this helper uses the exact integer floor from
1579
+ * `calculate_assets_from_shares` at `bundle.rs:259-270`.
385
1580
  */
386
- function calculateBundleUserBalance({ oracleData, bundleData, userBundle, assetDecimals, spotPrice, asset }) {
387
- const divisor = 10 ** assetDecimals;
388
- const onChainPps = calculateOnChainPps({
389
- oracleAverageExternalEquity: BigInt(oracleData.averageExternalEquity.toString()),
390
- bundleUnderlyingBalance: BigInt(bundleData.bundleUnderlyingBalance.toString()),
391
- totalShares: BigInt(bundleData.totalShares.toString())
1581
+ function computeUserBundleBalance(args) {
1582
+ const totalEquity = totalEquityRaw({
1583
+ bundleUnderlyingBalance: args.bundle.bundleUnderlyingBalance,
1584
+ averageExternalEquity: args.oracleData.averageExternalEquity
392
1585
  });
393
- const userSharesNum = Number(userBundle.shares.toString());
394
- const userBalance = Math.round(userSharesNum * onChainPps) / divisor;
395
- const netDeposits = Number(userBundle.netDeposits.toString()) / divisor;
396
- const pendingDeposit = Number(userBundle.pendingDeposit.toString()) / divisor;
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
1586
+ const balanceRaw = calculateAssetsFromShares({
1587
+ shares: args.userBundle.shares,
1588
+ totalAssets: totalEquity,
1589
+ totalShares: args.bundle.totalShares
405
1590
  });
406
1591
  return {
407
- balanceToken: userBalance,
408
- balanceUsd: userBalance * spotPrice,
409
- netEarnings: userEarnings,
410
- netEarningsUsd: userEarnings * spotPrice,
411
- totalDeposit: userBalance + pendingDeposit,
412
- totalDepositUsd: (userBalance + pendingDeposit) * spotPrice,
413
- pendingDeposit,
414
- highWaterMark: highWaterMark + pendingDeposit,
415
- feesPaid,
416
- pendingFee: pendingFeeToken,
417
- pendingFeeUsd: pendingFeeToken * spotPrice,
418
- spotPrice,
419
- vaultShares: userSharesNum,
420
- netDeposit: netDeposits,
421
- asset
1592
+ bundleAccount: args.bundleAccount,
1593
+ user: args.user,
1594
+ sharesRaw: args.userBundle.shares,
1595
+ balanceRaw,
1596
+ netDepositsRaw: args.userBundle.netDeposits,
1597
+ earningsRaw: balanceRaw - args.userBundle.netDeposits,
1598
+ pendingDepositRaw: args.userBundle.pendingDeposit,
1599
+ feesPaidRaw: args.userBundle.totalFeeCharged,
1600
+ pendingFees: estimatePendingUserFees({
1601
+ bundle: args.bundle,
1602
+ oracleData: args.oracleData,
1603
+ userBundle: args.userBundle,
1604
+ nowUnixSeconds: args.nowUnixSeconds
1605
+ }),
1606
+ hwmPerShare: args.userBundle.hwmPerShare,
1607
+ totalEquityRaw: totalEquity,
1608
+ totalShares: args.bundle.totalShares,
1609
+ assetPrecision: args.bundle.assetPrecision,
1610
+ assetDecimals: args.bundle.assetDecimals,
1611
+ assetAddress: args.bundle.assetAddress
422
1612
  };
423
1613
  }
424
- async function getBundleBalances({ vaultIds, userAddress, vaults: vaults$1, bundlePrograms, bundleCluster = "mainnet", priceMap }) {
425
- const result = {};
426
- const userPublicKey = new PublicKey(userAddress);
427
- const matchingVaultsByProgram = {};
428
- for (const vaultId of vaultIds) {
429
- const config = vaults$1[vaultId];
430
- if (!config) continue;
431
- const expectedProgramId = getBundleProgramId(config, bundleCluster);
432
- if (!expectedProgramId) continue;
433
- if (!bundlePrograms[expectedProgramId]) {
434
- result[vaultId] = null;
435
- continue;
436
- }
437
- if (!matchingVaultsByProgram[expectedProgramId]) matchingVaultsByProgram[expectedProgramId] = [];
438
- matchingVaultsByProgram[expectedProgramId].push({
439
- vaultId,
440
- config
1614
+ /**
1615
+ * Mirrors the three aligned `fetchMultiple` batches in the legacy SDK's
1616
+ * `getBundleBalances`. Duplicate addresses remain in every request array so
1617
+ * each output index corresponds directly to its input request.
1618
+ */
1619
+ async function fetchUserBundleBalances(rpc, args) {
1620
+ const programAddress = args.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
1621
+ const derivedAddresses = await Promise.all(args.requests.map(async (request) => {
1622
+ const [[oraclePda], [userPda]] = await Promise.all([findOracleDataPda({ bundleAccount: request.bundleAccount }, { programAddress }), findUserBundleAccountPda({
1623
+ userBundleAccountOwner: request.user,
1624
+ bundleAccount: request.bundleAccount
1625
+ }, { programAddress })]);
1626
+ return {
1627
+ oraclePda,
1628
+ userPda
1629
+ };
1630
+ }));
1631
+ const bundleAddresses = args.requests.map((request) => request.bundleAccount);
1632
+ const oraclePdas = derivedAddresses.map(({ oraclePda }) => oraclePda);
1633
+ const userPdas = derivedAddresses.map(({ userPda }) => userPda);
1634
+ const [bundles, oracleDataAccounts, userBundles] = await Promise.all([
1635
+ fetchAllMaybeBundle(rpc, bundleAddresses),
1636
+ fetchAllMaybeOracleData(rpc, oraclePdas),
1637
+ fetchAllMaybeUserBundleAccount(rpc, userPdas)
1638
+ ]);
1639
+ const nowUnixSeconds = args.nowUnixSeconds ?? Math.floor(Date.now() / 1e3);
1640
+ return args.requests.map((request, index) => {
1641
+ const bundle = bundles[index];
1642
+ const oracleData = oracleDataAccounts[index];
1643
+ const userBundle = userBundles[index];
1644
+ if (!bundle.exists || !oracleData.exists || !userBundle.exists) return null;
1645
+ return computeUserBundleBalance({
1646
+ bundleAccount: request.bundleAccount,
1647
+ user: request.user,
1648
+ bundle: bundle.data,
1649
+ oracleData: oracleData.data,
1650
+ userBundle: userBundle.data,
1651
+ nowUnixSeconds
441
1652
  });
442
- }
443
- for (const [programId, matchingVaults] of Object.entries(matchingVaultsByProgram)) {
444
- const bundleProgram = bundlePrograms[programId];
445
- if (!bundleProgram) continue;
446
- const bundlePDAs = matchingVaults.map(({ config }) => new PublicKey(config.vaultAddress));
447
- const oraclePDAs = bundlePDAs.map((bundlePDA) => deriveOraclePDA(bundlePDA, bundleProgram.programId));
448
- const userPDAs = bundlePDAs.map((bundlePDA) => deriveUserPDA(userPublicKey, bundlePDA, bundleProgram.programId));
449
- const [bundles, oracles, users] = await Promise.all([
450
- bundleProgram.account.bundle.fetchMultiple(bundlePDAs),
451
- bundleProgram.account.oracleData.fetchMultiple(oraclePDAs),
452
- bundleProgram.account.userBundleAccount.fetchMultiple(userPDAs)
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;
1653
+ });
1654
+ }
1655
+ async function fetchUserBundleBalance(rpc, args) {
1656
+ const [balance] = await fetchUserBundleBalances(rpc, {
1657
+ requests: [{
1658
+ bundleAccount: args.bundleAccount,
1659
+ user: args.user
1660
+ }],
1661
+ programAddress: args.programAddress,
1662
+ nowUnixSeconds: args.nowUnixSeconds
1663
+ });
1664
+ return balance;
477
1665
  }
478
1666
 
479
1667
  //#endregion
480
- //#region src/NeutralTrade.ts
481
- var NeutralTrade = class NeutralTrade {
482
- connection;
483
- bundlePrograms;
484
- bundleCluster;
485
- /** Built-in vault configurations for the selected cluster. */
486
- vaults;
487
- /** Price map for deposit tokens */
488
- priceMap;
489
- constructor(core, bundleCluster) {
490
- this.connection = core.connection;
491
- this.bundlePrograms = core.bundlePrograms;
492
- this.bundleCluster = bundleCluster;
493
- this.vaults = core.vaults;
494
- this.priceMap = core.priceMap;
495
- }
496
- static async initCore(config) {
497
- return initNeutralTradeCore(config);
498
- }
499
- static async create(config) {
500
- return new NeutralTrade(await this.initCore(config), config.bundleCluster ?? "mainnet");
501
- }
502
- /**
503
- * Get user balance for Bundle vaults only.
504
- * Drift vault IDs are ignored (no keys in the result).
505
- */
506
- async getUserBalanceByVaultIds({ vaultIds, userAddress }) {
507
- const bundleVaultIds = vaultIds.filter((id) => {
508
- const config = this.vaults[id];
509
- return config && config.type === VaultType.Bundle;
510
- });
511
- if (bundleVaultIds.length === 0) return {};
512
- return await getBundleBalances({
513
- vaultIds: bundleVaultIds,
514
- userAddress,
515
- vaults: this.vaults,
516
- bundlePrograms: this.bundlePrograms,
517
- bundleCluster: this.bundleCluster,
518
- priceMap: this.priceMap
519
- });
520
- }
521
- /**
522
- * Build deposit instructions (`initializeBundleDepositor` when needed, then `requestDeposit`).
523
- * Uses the built-in vault registry only.
524
- */
525
- async buildDepositInstructions({ vaultId, userAddress, amountRaw }) {
526
- if (!this.vaults[vaultId]) throw new Error(`Vault config not found for vaultId ${vaultId}`);
527
- return buildDepositInstructionsForVaultId({
528
- connection: this.connection,
529
- bundlePrograms: this.bundlePrograms,
530
- vaults: this.vaults,
531
- priceMap: this.priceMap
532
- }, this.bundleCluster, {
533
- vaultId,
534
- userAddress,
535
- amountRaw
536
- });
537
- }
538
- /**
539
- * Build request-withdraw instruction. Uses the built-in vault registry only.
540
- */
541
- async buildRequestWithdrawInstruction({ vaultId, userAddress, amountRaw }) {
542
- if (!this.vaults[vaultId]) throw new Error(`Vault config not found for vaultId ${vaultId}`);
543
- return buildRequestWithdrawInstructionForVaultId({
544
- connection: this.connection,
545
- bundlePrograms: this.bundlePrograms,
546
- vaults: this.vaults,
547
- priceMap: this.priceMap
548
- }, this.bundleCluster, {
549
- vaultId,
550
- userAddress,
551
- amountRaw
552
- });
553
- }
554
- };
1668
+ //#region src/extensions/flows.ts
1669
+ /** Mirrors the legacy `buildBundleDepositInstructionsWithVault` flow. */
1670
+ async function buildDepositInstructions(rpc, params) {
1671
+ assertValidAmountRaw(params.amountRaw);
1672
+ const programAddress = params.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
1673
+ const bundle = await fetchMaybeBundle(rpc, params.bundleAccount);
1674
+ if (!bundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
1675
+ const [userBundleAccount] = await findUserBundleAccountPda({
1676
+ userBundleAccountOwner: params.user.address,
1677
+ bundleAccount: params.bundleAccount
1678
+ }, { programAddress });
1679
+ const userBundle = await fetchMaybeUserBundleAccount(rpc, userBundleAccount);
1680
+ const userTokenAccount = params.userTokenAccount ?? (await findAssociatedTokenPda({
1681
+ owner: params.user.address,
1682
+ mint: bundle.data.assetAddress
1683
+ }))[0];
1684
+ const [pendingBundleAssetAuthorityPda, oracleDataPda, bundleTempDataPda] = await Promise.all([
1685
+ findPendingBundleAssetAuthorityPda({ bundleAccount: params.bundleAccount }, { programAddress }),
1686
+ findOracleDataPda({ bundleAccount: params.bundleAccount }, { programAddress }),
1687
+ findBundleTempDataPda({ bundleAccount: params.bundleAccount }, { programAddress })
1688
+ ]);
1689
+ const [pendingDepositTokenAccount] = await findAssociatedTokenPda({
1690
+ owner: pendingBundleAssetAuthorityPda[0],
1691
+ mint: bundle.data.assetAddress
1692
+ });
1693
+ const instructions = [];
1694
+ if (!userBundle.exists) instructions.push(await getInitializeBundleDepositorInstructionAsync({
1695
+ payer: params.user,
1696
+ authority: params.user,
1697
+ bundleAccount: params.bundleAccount,
1698
+ userBundleAccount
1699
+ }, { programAddress }));
1700
+ instructions.push(await getRequestDepositInstructionAsync({
1701
+ user: params.user,
1702
+ bundleAccount: params.bundleAccount,
1703
+ userTokenAccount,
1704
+ pendingDepositTokenAccount,
1705
+ treasuryAccount: bundle.data.treasuryAccount,
1706
+ assetAddress: bundle.data.assetAddress,
1707
+ userBundleAccount,
1708
+ oracleData: oracleDataPda[0],
1709
+ bundleTempData: bundleTempDataPda[0],
1710
+ pendingBundleAssetAuthority: pendingBundleAssetAuthorityPda[0],
1711
+ amount: params.amountRaw
1712
+ }, { programAddress }));
1713
+ return instructions;
1714
+ }
1715
+ /**
1716
+ * Mirrors the legacy `buildBundleRequestWithdrawInstructionWithVault` flow.
1717
+ * This helper rejects a zero-share result instead of forwarding it to the
1718
+ * program as the legacy helper did.
1719
+ */
1720
+ async function buildRequestWithdrawInstruction(rpc, params) {
1721
+ assertValidAmountRaw(params.amountRaw);
1722
+ const programAddress = params.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
1723
+ const [oracleDataPda, userBundleAccountPda, bundleTempDataPda] = await Promise.all([
1724
+ findOracleDataPda({ bundleAccount: params.bundleAccount }, { programAddress }),
1725
+ findUserBundleAccountPda({
1726
+ userBundleAccountOwner: params.user.address,
1727
+ bundleAccount: params.bundleAccount
1728
+ }, { programAddress }),
1729
+ findBundleTempDataPda({ bundleAccount: params.bundleAccount }, { programAddress })
1730
+ ]);
1731
+ const [bundle, oracleData, userBundle] = await Promise.all([
1732
+ fetchMaybeBundle(rpc, params.bundleAccount),
1733
+ fetchMaybeOracleData(rpc, oracleDataPda[0]),
1734
+ fetchMaybeUserBundleAccount(rpc, userBundleAccountPda[0])
1735
+ ]);
1736
+ if (!bundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
1737
+ if (!oracleData.exists) throw new Error("ORACLE_DATA_NOT_FOUND");
1738
+ if (!userBundle.exists) throw new Error("USER_BUNDLE_ACCOUNT_NOT_FOUND");
1739
+ const sharesAmount = computeWithdrawalShares({
1740
+ amountRaw: params.amountRaw,
1741
+ userShares: userBundle.data.shares,
1742
+ totalEquity: totalEquityRaw({
1743
+ bundleUnderlyingBalance: bundle.data.bundleUnderlyingBalance,
1744
+ averageExternalEquity: oracleData.data.averageExternalEquity
1745
+ }),
1746
+ totalShares: bundle.data.totalShares
1747
+ });
1748
+ if (sharesAmount === 0n) throw new Error("ZERO_WITHDRAWAL_SHARES");
1749
+ return await getRequestWithdrawalInstructionAsync({
1750
+ user: params.user,
1751
+ bundleAccount: params.bundleAccount,
1752
+ userBundleAccount: userBundleAccountPda[0],
1753
+ oracleData: oracleDataPda[0],
1754
+ bundleTempData: bundleTempDataPda[0],
1755
+ sharesAmount
1756
+ }, { programAddress });
1757
+ }
1758
+ /**
1759
+ * Mirrors the legacy `buildBundleRequestSwitchInstructionsWithVaults` flow.
1760
+ * This version-locked client does not perform the legacy runtime IDL capability
1761
+ * probe for `request_bundle_switch`.
1762
+ */
1763
+ async function buildRequestSwitchInstructions(rpc, params) {
1764
+ assertValidAmountRaw(params.amountRaw);
1765
+ const programAddress = params.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
1766
+ if (params.sourceBundleAccount === params.targetBundleAccount) throw new Error("SOURCE_TARGET_IDENTICAL");
1767
+ const [sourceOracleDataPda, sourceUserBundleAccountPda, sourceBundleTempDataPda, targetUserBundleAccountPda] = await Promise.all([
1768
+ findOracleDataPda({ bundleAccount: params.sourceBundleAccount }, { programAddress }),
1769
+ findUserBundleAccountPda({
1770
+ userBundleAccountOwner: params.user.address,
1771
+ bundleAccount: params.sourceBundleAccount
1772
+ }, { programAddress }),
1773
+ findBundleTempDataPda({ bundleAccount: params.sourceBundleAccount }, { programAddress }),
1774
+ findUserBundleAccountPda({
1775
+ userBundleAccountOwner: params.user.address,
1776
+ bundleAccount: params.targetBundleAccount
1777
+ }, { programAddress })
1778
+ ]);
1779
+ const [sourceBundle, targetBundle, sourceOracleData, sourceUserBundle, targetUserBundle] = await Promise.all([
1780
+ fetchMaybeBundle(rpc, params.sourceBundleAccount),
1781
+ fetchMaybeBundle(rpc, params.targetBundleAccount),
1782
+ fetchMaybeOracleData(rpc, sourceOracleDataPda[0]),
1783
+ fetchMaybeUserBundleAccount(rpc, sourceUserBundleAccountPda[0]),
1784
+ fetchMaybeUserBundleAccount(rpc, targetUserBundleAccountPda[0])
1785
+ ]);
1786
+ if (!sourceBundle.exists || !targetBundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
1787
+ if (!sourceOracleData.exists) throw new Error("ORACLE_DATA_NOT_FOUND");
1788
+ if (!sourceUserBundle.exists) throw new Error("USER_BUNDLE_ACCOUNT_NOT_FOUND");
1789
+ if (sourceBundle.data.assetAddress !== targetBundle.data.assetAddress) throw new Error("ASSET_MINT_MISMATCH");
1790
+ const sharesAmount = computeWithdrawalShares({
1791
+ amountRaw: params.amountRaw,
1792
+ userShares: sourceUserBundle.data.shares,
1793
+ totalEquity: totalEquityRaw({
1794
+ bundleUnderlyingBalance: sourceBundle.data.bundleUnderlyingBalance,
1795
+ averageExternalEquity: sourceOracleData.data.averageExternalEquity
1796
+ }),
1797
+ totalShares: sourceBundle.data.totalShares
1798
+ });
1799
+ if (sharesAmount === 0n) throw new Error("ZERO_WITHDRAWAL_SHARES");
1800
+ const instructions = [];
1801
+ if (!targetUserBundle.exists) instructions.push(await getInitializeBundleDepositorInstructionAsync({
1802
+ payer: params.user,
1803
+ authority: params.user,
1804
+ bundleAccount: params.targetBundleAccount,
1805
+ userBundleAccount: targetUserBundleAccountPda[0]
1806
+ }, { programAddress }));
1807
+ instructions.push(await getRequestBundleSwitchInstructionAsync({
1808
+ user: params.user,
1809
+ bundleAccount: params.sourceBundleAccount,
1810
+ userBundleAccount: sourceUserBundleAccountPda[0],
1811
+ oracleData: sourceOracleDataPda[0],
1812
+ bundleTempData: sourceBundleTempDataPda[0],
1813
+ targetBundleAccount: params.targetBundleAccount,
1814
+ targetUserBundleAccount: targetUserBundleAccountPda[0],
1815
+ sharesAmount
1816
+ }, { programAddress }));
1817
+ return instructions;
1818
+ }
555
1819
 
556
1820
  //#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 };
1821
+ 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 };