@neutral-trade/sdk 1.0.2 → 1.0.4
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/generated/index.d.mts +2 -2
- package/dist/generated/index.mjs +2 -2
- package/dist/{generated-Dz86hd_Y.mjs → generated-PNArbjle.mjs} +178 -63
- package/dist/idl/index.d.mts +164 -4
- package/dist/idl/index.mjs +168 -49
- package/dist/{index-CCGD4ixE.d.mts → index-CVQfAU4i.d.mts} +72 -29
- package/dist/index.d.mts +241 -15
- package/dist/index.mjs +521 -26
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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";
|
|
1
|
+
import { $ as NTBUNDLE_ERROR__NO_USER_WITHDRAWAL_TIMING_OVERRIDE_TO_CLEAR, $a as PROCESS_REFERRER_WITHDRAWAL_DISCRIMINATOR, $c as getAddStrategyInstructionAsync, $i as getRequestBundleSwitchInstruction, $l as getReferrerAccountCodec, $n as getSetReferrerRateOverrideInstruction, $o as getManagerWithdrawInstructionDataEncoder, $r as SET_MAX_DEPOSIT_AMOUNT_DISCRIMINATOR, $s as getDistributeToReceiversInstructionDataCodec, $t as getUpdateOracleInstructionAsync, $u as fetchMaybeBundle, A as NTBUNDLE_ERROR__INVALID_PERMISSIONNED_DEPOSITOR, Aa as getReferrerRequestWithdrawDiscriminatorBytes, Ac as getChangeManagerInstructionDataCodec, Ai as getSetBundleCreatorInstructionAsync, Al as fetchUserBundleAccount, An as getSetUserWithdrawalTimingOverrideInstructionAsync, Ao as parsePauseDepositsWithdrawalsInstruction, Ar as getSetOracleUpdateTimeLimitInstructionDataEncoder, As as getInitializeBundleInstructionDataDecoder, At as NTBUNDLE_ERROR__TOTAL_ASSET_EXCEED_NEW_MAX_DEPOSIT_AMOUNT, Au as fetchBundleMasterAccount, B as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_REDEMPTION_SCHEDULE, Ba as getProcessWithdrawalInstructionAsync, Bc as getChangeBundleMasterAdminInstructionDataEncoder, Bi as getRequestWithdrawalInstructionDataDecoder, Bl as fetchMaybeStrategy, Bn as getSetUserReferrerInstructionDataDecoder, Bo as getManagerWithdrawWithSplitDiscriminatorBytes, Br as getSetOracleBufferDiscriminatorBytes, Bs as parseEndDistributionInstruction, Bt as NTBUNDLE_ERROR__WITHDRAWAL_DELAY_NOT_MET, Bu as fetchAllMaybeBundleCreatorAccount, C as NTBUNDLE_ERROR__INVALID_ASSET_ADDRESS, Ca as getRefundDepositInstruction, Cc as getClearUserFeeOverrideInstructionDataCodec, Ci as getSetDelaysInstructionDataCodec, Cl as findBundleAssetAuthorityPda, Cn as getSetWithdrawalRedemptionScheduleInstructionDataCodec, Co as PAUSE_DEPOSITS_WITHDRAWALS_DISCRIMINATOR, Cr as getSetReferralTierConfigInstructionDataEncoder, Cs as getInitializeBundleDepositorInstructionDataEncoder, Ct as NTBUNDLE_ERROR__STRATEGY_DISABLED, Cu as getBundleTempDataDiscriminatorBytes, D as NTBUNDLE_ERROR__INVALID_ORACLE_BUFFER, Da as getRefundDepositInstructionDataEncoder, Dc as CHANGE_MANAGER_DISCRIMINATOR, Di as SET_BUNDLE_CREATOR_DISCRIMINATOR, Dl as fetchAllMaybeUserBundleAccount, Dn as SET_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, Do as getPauseDepositsWithdrawalsInstructionDataCodec, Dr as getSetOracleUpdateTimeLimitInstruction, Ds as getInitializeBundleInstruction, Dt as NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNT_MISMATCH, Du as decodeBundleMasterAccount, E as NTBUNDLE_ERROR__INVALID_NEUTRAL_FEE_INCREMENTER, Ea as getRefundDepositInstructionDataDecoder, Ec as parseClearUserFeeOverrideInstruction, Ei as parseSetDelaysInstruction, El as decodeUserBundleAccount, En as parseSetWithdrawalRedemptionScheduleInstruction, Eo as getPauseDepositsWithdrawalsInstructionAsync, Er as getSetOracleUpdateTimeLimitDiscriminatorBytes, Es as getInitializeBundleDiscriminatorBytes, Et as NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNTS_MISSING, Eu as BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, F as NTBUNDLE_ERROR__INVALID_USER_FEE_CONFIG, Fa as getReferrerRequestWithdrawInstructionDataEncoder, Fc as getChangeBundleMasterAdminDiscriminatorBytes, Fi as REQUEST_WITHDRAWAL_DISCRIMINATOR, Fl as getUserBundleAccountSize, Fn as SET_USER_REFERRER_DISCRIMINATOR, Fo as getNetPendingTransactionsInstructionDataCodec, Fr as getSetOracleMaxAgeInstructionDataCodec, Fs as getEndDistributionInstruction, Ft as NTBUNDLE_ERROR__UNAUTHORIZED_REFERRER_ACTION, Fu as getBundleMasterAccountEncoder, G as NTBUNDLE_ERROR__MIN_DEPOSIT_AMOUNT_NOT_MET, Ga as PROCESS_SWITCH_DISCRIMINATOR, Gc as getApplyFeesToUserInstructionAsync, Gi as getRequestDepositInstruction, Gl as getStrategyEncoder, Gn as getSetUserFeeOverrideInstruction, Go as getManagerWithdrawWithSplitInstructionDataEncoder, Gr as parseSetOracleBufferInstruction, Gs as getEnableStrategyInstructionDataCodec, Gt as NtbundleInstruction, Gu as getBundleCreatorAccountDiscriminatorBytes, H as NTBUNDLE_ERROR__MANAGER_SHARES_ZERO, Ha as getProcessWithdrawalInstructionDataDecoder, Hc as APPLY_FEES_TO_USER_DISCRIMINATOR, Hi as parseRequestWithdrawalInstruction, Hl as getStrategyCodec, Hn as parseSetUserReferrerInstruction, Ho as getManagerWithdrawWithSplitInstructionAsync, Hr as getSetOracleBufferInstructionDataCodec, Hs as getEnableStrategyDiscriminatorBytes, Ht as isNtbundleError, Hu as fetchMaybeBundleCreatorAccount, I as NTBUNDLE_ERROR__INVALID_USER_WITHDRAWAL_TIMING_CONFIG, Ia as parseReferrerRequestWithdrawInstruction, Ic as getChangeBundleMasterAdminInstruction, Ii as getRequestWithdrawalDiscriminatorBytes, Il as STRATEGY_DISCRIMINATOR, In as getSetUserReferrerDiscriminatorBytes, Io as getNetPendingTransactionsInstructionDataDecoder, Ir as getSetOracleMaxAgeInstructionDataDecoder, Is as getEndDistributionInstructionAsync, It as NTBUNDLE_ERROR__UNPAUSED_DEPOSITS_WITHDRAWALS, Iu as getBundleMasterAccountSize, J as NTBUNDLE_ERROR__NETTING_NOT_DONE, Ja as getProcessSwitchInstructionAsync, Jc as getApplyFeesToUserInstructionDataEncoder, Ji as getRequestDepositInstructionDataDecoder, Jl as decodeReferrerAccount, Jn as getSetUserFeeOverrideInstructionDataDecoder, Jo as getManagerWithdrawDiscriminatorBytes, Jr as getSetMinDepositAmountInstruction, Js as parseEnableStrategyInstruction, Jt as ntbundleProgram, Ju as BUNDLE_DISCRIMINATOR, K as NTBUNDLE_ERROR__MUST_BE_IN_WHITELIST, Ka as getProcessSwitchDiscriminatorBytes, Kc as getApplyFeesToUserInstructionDataCodec, Ki as getRequestDepositInstructionAsync, Kl as getStrategySize, Kn as getSetUserFeeOverrideInstructionAsync, Ko as parseManagerWithdrawWithSplitInstruction, Kr as SET_MIN_DEPOSIT_AMOUNT_DISCRIMINATOR, Ks as getEnableStrategyInstructionDataDecoder, Kt as identifyNtbundleAccount, Ku as getBundleCreatorAccountEncoder, L as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_AMOUNT, La as PROCESS_WITHDRAWAL_DISCRIMINATOR, Lc as getChangeBundleMasterAdminInstructionAsync, Li as getRequestWithdrawalInstruction, Ll as decodeStrategy, Ln as getSetUserReferrerInstruction, Lo as getNetPendingTransactionsInstructionDataEncoder, Lr as getSetOracleMaxAgeInstructionDataEncoder, Ls as getEndDistributionInstructionDataCodec, Lt as NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_HAS_ACTIVITY, Lu as BUNDLE_CREATOR_ACCOUNT_DISCRIMINATOR, M as NTBUNDLE_ERROR__INVALID_REFERRAL_CONFIG, Ma as getReferrerRequestWithdrawInstructionAsync, Mc as getChangeManagerInstructionDataEncoder, Mi as getSetBundleCreatorInstructionDataDecoder, Ml as getUserBundleAccountDecoder, Mn as getSetUserWithdrawalTimingOverrideInstructionDataDecoder, Mo as getNetPendingTransactionsDiscriminatorBytes, Mr as SET_ORACLE_MAX_AGE_DISCRIMINATOR, Ms as parseInitializeBundleInstruction, Mt as NTBUNDLE_ERROR__UNAUTHORIZED_BUNDLE_CREATOR, Mu as getBundleMasterAccountCodec, N as NTBUNDLE_ERROR__INVALID_REFERRAL_TIER_CONFIG, Na as getReferrerRequestWithdrawInstructionDataCodec, Nc as parseChangeManagerInstruction, Ni as getSetBundleCreatorInstructionDataEncoder, Nl as getUserBundleAccountDiscriminatorBytes, Nn as getSetUserWithdrawalTimingOverrideInstructionDataEncoder, No as getNetPendingTransactionsInstruction, Nr as getSetOracleMaxAgeDiscriminatorBytes, Ns as END_DISTRIBUTION_DISCRIMINATOR, Nt as NTBUNDLE_ERROR__UNAUTHORIZED_KEEPER_ACTION, Nu as getBundleMasterAccountDecoder, O as NTBUNDLE_ERROR__INVALID_ORACLE_MAX_AGE, Oa as parseRefundDepositInstruction, Oc as getChangeManagerDiscriminatorBytes, Oi as getSetBundleCreatorDiscriminatorBytes, Ol as fetchAllUserBundleAccount, On as getSetUserWithdrawalTimingOverrideDiscriminatorBytes, Oo as getPauseDepositsWithdrawalsInstructionDataDecoder, Or as getSetOracleUpdateTimeLimitInstructionDataCodec, Os as getInitializeBundleInstructionAsync, Ot as NTBUNDLE_ERROR__SWITCH_TARGET_SAME_AS_SOURCE, Ou as fetchAllBundleMasterAccount, P as NTBUNDLE_ERROR__INVALID_TWAP_PERIOD, Pa as getReferrerRequestWithdrawInstructionDataDecoder, Pc as CHANGE_BUNDLE_MASTER_ADMIN_DISCRIMINATOR, Pi as parseSetBundleCreatorInstruction, Pl as getUserBundleAccountEncoder, Pn as parseSetUserWithdrawalTimingOverrideInstruction, Po as getNetPendingTransactionsInstructionAsync, Pr as getSetOracleMaxAgeInstruction, Ps as getEndDistributionDiscriminatorBytes, Pt as NTBUNDLE_ERROR__UNAUTHORIZED_MANAGER_ACTION, Pu as getBundleMasterAccountDiscriminatorBytes, Q as NTBUNDLE_ERROR__NO_USER_FEE_OVERRIDE_TO_CLEAR, Qa as parseProcessSwitchInstruction, Qc as getAddStrategyInstruction, Qi as getRequestBundleSwitchDiscriminatorBytes, Ql as fetchReferrerAccount, Qn as getSetReferrerRateOverrideDiscriminatorBytes, Qo as getManagerWithdrawInstructionDataDecoder, Qr as parseSetMinDepositAmountInstruction, Qs as getDistributeToReceiversInstructionAsync, Qt as getUpdateOracleInstruction, Qu as fetchBundle, R as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_COOLDOWN_PERIOD, Ra as getProcessWithdrawalDiscriminatorBytes, Rc as getChangeBundleMasterAdminInstructionDataCodec, Ri as getRequestWithdrawalInstructionAsync, Rl as fetchAllMaybeStrategy, Rn as getSetUserReferrerInstructionAsync, Ro as parseNetPendingTransactionsInstruction, Rr as parseSetOracleMaxAgeInstruction, Rs as getEndDistributionInstructionDataDecoder, Rt as NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_NOT_EMPTY, Ru as decodeBundleCreatorAccount, S as NTBUNDLE_ERROR__INVALID_ALLOCATIONS, Sa as getRefundDepositDiscriminatorBytes, Sc as getClearUserFeeOverrideInstructionAsync, Si as getSetDelaysInstruction, Sl as findBundleCreatorAccountPda, Sn as getSetWithdrawalRedemptionScheduleInstruction, So as parsePerformRefillInstruction, Sr as getSetReferralTierConfigInstructionDataDecoder, Ss as getInitializeBundleDepositorInstructionDataDecoder, St as NTBUNDLE_ERROR__STRATEGY_ALREADY_ENABLED, Su as getBundleTempDataDecoder, T as NTBUNDLE_ERROR__INVALID_FEE_SPLIT, Ta as getRefundDepositInstructionDataCodec, Tc as getClearUserFeeOverrideInstructionDataEncoder, Ti as getSetDelaysInstructionDataEncoder, Tl as USER_BUNDLE_ACCOUNT_DISCRIMINATOR, Tn as getSetWithdrawalRedemptionScheduleInstructionDataEncoder, To as getPauseDepositsWithdrawalsInstruction, Tr as SET_ORACLE_UPDATE_TIME_LIMIT_DISCRIMINATOR, Ts as INITIALIZE_BUNDLE_DISCRIMINATOR, Tt as NTBUNDLE_ERROR__SWITCH_ASSET_MINT_MISMATCH, Tu as getBundleTempDataSize, U as NTBUNDLE_ERROR__MATH_ERROR, Ua as getProcessWithdrawalInstructionDataEncoder, Uc as getApplyFeesToUserDiscriminatorBytes, Ui as REQUEST_DEPOSIT_DISCRIMINATOR, Ul as getStrategyDecoder, Un as SET_USER_FEE_OVERRIDE_DISCRIMINATOR, Uo as getManagerWithdrawWithSplitInstructionDataCodec, Ur as getSetOracleBufferInstructionDataDecoder, Us as getEnableStrategyInstruction, Ut as NTBUNDLE_PROGRAM_ADDRESS, Uu as getBundleCreatorAccountCodec, V as NTBUNDLE_ERROR__LEFT_TO_DISTRIBUTE_NOT_ZERO, Va as getProcessWithdrawalInstructionDataCodec, Vc as parseChangeBundleMasterAdminInstruction, Vi as getRequestWithdrawalInstructionDataEncoder, Vl as fetchStrategy, Vn as getSetUserReferrerInstructionDataEncoder, Vo as getManagerWithdrawWithSplitInstruction, Vr as getSetOracleBufferInstruction, Vs as ENABLE_STRATEGY_DISCRIMINATOR, Vt as getNtbundleErrorMessage, Vu as fetchBundleCreatorAccount, W as NTBUNDLE_ERROR__MAX_DEPOSIT_AMOUNT_EXCEEDED, Wa as parseProcessWithdrawalInstruction, Wc as getApplyFeesToUserInstruction, Wi as getRequestDepositDiscriminatorBytes, Wl as getStrategyDiscriminatorBytes, Wn as getSetUserFeeOverrideDiscriminatorBytes, Wo as getManagerWithdrawWithSplitInstructionDataDecoder, Wr as getSetOracleBufferInstructionDataEncoder, Ws as getEnableStrategyInstructionAsync, Wt as NtbundleAccount, Wu as getBundleCreatorAccountDecoder, X as NTBUNDLE_ERROR__NO_PENDING_TRANSACTIONS, Xa as getProcessSwitchInstructionDataDecoder, Xc as ADD_STRATEGY_DISCRIMINATOR, Xi as parseRequestDepositInstruction, Xl as fetchAllReferrerAccount, Xn as parseSetUserFeeOverrideInstruction, Xo as getManagerWithdrawInstructionAsync, Xr as getSetMinDepositAmountInstructionDataDecoder, Xs as getDistributeToReceiversDiscriminatorBytes, Xt as UPDATE_ORACLE_DISCRIMINATOR, Xu as fetchAllBundle, Y as NTBUNDLE_ERROR__NO_PENDING_SWITCH, Ya as getProcessSwitchInstructionDataCodec, Yc as parseApplyFeesToUserInstruction, Yi as getRequestDepositInstructionDataEncoder, Yl as fetchAllMaybeReferrerAccount, Yn as getSetUserFeeOverrideInstructionDataEncoder, Yo as getManagerWithdrawInstruction, Yr as getSetMinDepositAmountInstructionDataCodec, Ys as DISTRIBUTE_TO_RECEIVERS_DISCRIMINATOR, Yt as parseNtbundleInstruction, Yu as decodeBundle, Z as NTBUNDLE_ERROR__NO_PENDING_WITHDRAWAL, Za as getProcessSwitchInstructionDataEncoder, Zc as getAddStrategyDiscriminatorBytes, Zi as REQUEST_BUNDLE_SWITCH_DISCRIMINATOR, Zl as fetchMaybeReferrerAccount, Zn as SET_REFERRER_RATE_OVERRIDE_DISCRIMINATOR, Zo as getManagerWithdrawInstructionDataCodec, Zr as getSetMinDepositAmountInstructionDataEncoder, Zs as getDistributeToReceiversInstruction, Zt as getUpdateOracleDiscriminatorBytes, Zu as fetchAllMaybeBundle, _ as NTBUNDLE_ERROR__EXCESSIVE_PERFORMANCE_FEE, _a as getRegisterReferrerInstructionDataCodec, _c as getClearUserWithdrawalTimingOverrideInstructionDataEncoder, _i as getSetFeesInstructionDataDecoder, _l as findPendingBundleAssetAuthorityPda, _n as getStartDistributionInstructionDataDecoder, _o as getPerformRefillInstruction, _r as parseSetReferrerActiveInstruction, _s as INITIALIZE_BUNDLE_DEPOSITOR_DISCRIMINATOR, _t as NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISSING, _u as fetchAllBundleTempData, a as NTBUNDLE_ERROR__BUNDLE_IS_PERMISSIONNED, aa as REMOVE_STRATEGY_DISCRIMINATOR, ac as getCloseUserBundleAccountInstruction, ad as getReferralTierDecoder, ai as parseSetMaxDepositAmountInstruction, al as findTargetUserBundleAccountPda, an as getUpdateAllocationsDiscriminatorBytes, ao as getProcessReferrerWithdrawalInstructionDataEncoder, ar as getSetReferrerConfigDiscriminatorBytes, as as getInitializePermissionedBundleDepositorInstructionDataCodec, at as NTBUNDLE_ERROR__PENDING_DEPOSIT_EXISTS, au as decodeOracleData, b as NTBUNDLE_ERROR__INSUFFICIENT_FUNDS, ba as parseRegisterReferrerInstruction, bc as getClearUserFeeOverrideDiscriminatorBytes, bi as SET_DELAYS_DISCRIMINATOR, bl as findBundleTempDataPda, bn as SET_WITHDRAWAL_REDEMPTION_SCHEDULE_DISCRIMINATOR, bo as getPerformRefillInstructionDataDecoder, br as getSetReferralTierConfigInstruction, bs as getInitializeBundleDepositorInstructionAsync, bt as NTBUNDLE_ERROR__REFILL_AMOUNT_EXCEEDED, bu as fetchMaybeBundleTempData, c as NTBUNDLE_ERROR__DEPOSITS_EXTRA_IN_PENDINGS_NOT_ZERO, ca as getRemoveStrategyInstructionAsync, cc as getCloseUserBundleAccountInstructionDataDecoder, ci as getSetKeeperInstruction, cl as findTargetBundleTempDataPda, cn as getUpdateAllocationsInstructionDataCodec, co as getProcessDepositDiscriminatorBytes, cr as getSetReferrerConfigInstructionDataDecoder, cs as parseInitializePermissionedBundleDepositorInstruction, ct as NTBUNDLE_ERROR__PENDING_WITHDRAWAL_EXISTS, cu as fetchMaybeOracleData, d as NTBUNDLE_ERROR__DISTRIBUTION_NOT_STARTED, da as getRemoveStrategyInstructionDataEncoder, dc as CLEAR_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, di as getSetKeeperInstructionDataEncoder, dl as findSourceOracleDataPda, dn as parseUpdateAllocationsInstruction, do as getProcessDepositInstructionDataCodec, dr as SET_REFERRER_ACTIVE_DISCRIMINATOR, ds as getInitializeBundleMasterAccountInstruction, dt as NTBUNDLE_ERROR__RECEIVER_ALREADY_ALLOCATED, du as getOracleDataDecoder, ea as getRequestBundleSwitchInstructionAsync, ec as getDistributeToReceiversInstructionDataDecoder, ed as getBundleCodec, ei as getSetMaxDepositAmountDiscriminatorBytes, el as getAddStrategyInstructionDataCodec, en as getUpdateOracleInstructionDataCodec, eo as getProcessReferrerWithdrawalDiscriminatorBytes, er as getSetReferrerRateOverrideInstructionDataCodec, es as parseManagerWithdrawInstruction, et as NTBUNDLE_ERROR__ORACLE_NOT_UPDATED, eu as getReferrerAccountDecoder, f as NTBUNDLE_ERROR__EMPTY_USER_FEE_CLEAR_REQUEST, fa as parseRemoveStrategyInstruction, fc as getClearUserWithdrawalTimingOverrideDiscriminatorBytes, fi as parseSetKeeperInstruction, fl as findSourceBundleTempDataPda, fn as START_DISTRIBUTION_DISCRIMINATOR, fo as getProcessDepositInstructionDataDecoder, fr as getSetReferrerActiveDiscriminatorBytes, fs as getInitializeBundleMasterAccountInstructionAsync, ft as NTBUNDLE_ERROR__REDEMPTION_AMOUNT_EXCEEDED, fu as getOracleDataDiscriminatorBytes, g as NTBUNDLE_ERROR__EXCESSIVE_MANAGEMENT_FEE, ga as getRegisterReferrerInstructionAsync, gc as getClearUserWithdrawalTimingOverrideInstructionDataDecoder, gi as getSetFeesInstructionDataCodec, gl as findReferrerAccountPda, gn as getStartDistributionInstructionDataCodec, go as getPerformRefillDiscriminatorBytes, gr as getSetReferrerActiveInstructionDataEncoder, gs as parseInitializeBundleMasterAccountInstruction, gt as NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISMATCH, gu as decodeBundleTempData, h as NTBUNDLE_ERROR__EXCESSIVE_DEPOSIT_FEE, ha as getRegisterReferrerInstruction, hc as getClearUserWithdrawalTimingOverrideInstructionDataCodec, hi as getSetFeesInstruction, hl as findReferrerUserBundleAccountPda, hn as getStartDistributionInstructionAsync, ho as PERFORM_REFILL_DISCRIMINATOR, hr as getSetReferrerActiveInstructionDataDecoder, hs as getInitializeBundleMasterAccountInstructionDataEncoder, ht as NTBUNDLE_ERROR__REFERRAL_ALREADY_SET, hu as BUNDLE_TEMP_DATA_DISCRIMINATOR, i as NTBUNDLE_ERROR__AMOUNT_MUST_BE_BELOW_MAX, ia as parseRequestBundleSwitchInstruction, ic as getCloseUserBundleAccountDiscriminatorBytes, id as getReferralTierCodec, ii as getSetMaxDepositAmountInstructionDataEncoder, il as findUserBundleAccountPda, in as UPDATE_ALLOCATIONS_DISCRIMINATOR, io as getProcessReferrerWithdrawalInstructionDataDecoder, ir as SET_REFERRER_CONFIG_DISCRIMINATOR, is as getInitializePermissionedBundleDepositorInstructionAsync, it as NTBUNDLE_ERROR__PENDING_DEPOSIT_AMOUNT_ZERO, iu as ORACLE_DATA_DISCRIMINATOR, j as NTBUNDLE_ERROR__INVALID_RECEIVER, ja as getReferrerRequestWithdrawInstruction, jc as getChangeManagerInstructionDataDecoder, ji as getSetBundleCreatorInstructionDataCodec, jl as getUserBundleAccountCodec, jn as getSetUserWithdrawalTimingOverrideInstructionDataCodec, jo as NET_PENDING_TRANSACTIONS_DISCRIMINATOR, jr as parseSetOracleUpdateTimeLimitInstruction, js as getInitializeBundleInstructionDataEncoder, jt as NTBUNDLE_ERROR__UNAUTHORIZED_ADMIN_ACTION, ju as fetchMaybeBundleMasterAccount, k as NTBUNDLE_ERROR__INVALID_ORACLE_UPDATE_TIME_LIMIT, ka as REFERRER_REQUEST_WITHDRAW_DISCRIMINATOR, kc as getChangeManagerInstruction, ki as getSetBundleCreatorInstruction, kl as fetchMaybeUserBundleAccount, kn as getSetUserWithdrawalTimingOverrideInstruction, ko as getPauseDepositsWithdrawalsInstructionDataEncoder, kr as getSetOracleUpdateTimeLimitInstructionDataDecoder, ks as getInitializeBundleInstructionDataCodec, kt as NTBUNDLE_ERROR__TOO_MANY_ALLOCATED_RECEIVERS, ku as fetchAllMaybeBundleMasterAccount, l as NTBUNDLE_ERROR__DEPOSIT_AMOUNT_ZERO, la as getRemoveStrategyInstructionDataCodec, lc as getCloseUserBundleAccountInstructionDataEncoder, li as getSetKeeperInstructionDataCodec, ll as findStrategyAccountPda, ln as getUpdateAllocationsInstructionDataDecoder, lo as getProcessDepositInstruction, lr as getSetReferrerConfigInstructionDataEncoder, ls as INITIALIZE_BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, lt as NTBUNDLE_ERROR__POD_TOKEN_TOTAL_SUPPLY_ZERO, lu as fetchOracleData, m as NTBUNDLE_ERROR__EQUITY_OUT_OF_BUFFER_BOUND, ma as getRegisterReferrerDiscriminatorBytes, mc as getClearUserWithdrawalTimingOverrideInstructionAsync, mi as getSetFeesDiscriminatorBytes, ml as findRequestBundleSwitchUserBundleAccountPda, mn as getStartDistributionInstruction, mo as parseProcessDepositInstruction, mr as getSetReferrerActiveInstructionDataCodec, ms as getInitializeBundleMasterAccountInstructionDataDecoder, mt as NTBUNDLE_ERROR__REFERRALS_DISABLED, mu as getOracleDataSize, n as NTBUNDLE_ERROR__ALLOCATION_BPS_GREATER_THAN_GLOBAL_ALLOCATION_BPS, na as getRequestBundleSwitchInstructionDataDecoder, nc as parseDistributeToReceiversInstruction, nd as getBundleDiscriminatorBytes, ni as getSetMaxDepositAmountInstructionDataCodec, nl as getAddStrategyInstructionDataEncoder, nn as getUpdateOracleInstructionDataEncoder, no as getProcessReferrerWithdrawalInstructionAsync, nr as getSetReferrerRateOverrideInstructionDataEncoder, ns as getInitializePermissionedBundleDepositorDiscriminatorBytes, nt as NTBUNDLE_ERROR__PAUSED_DEPOSITS_WITHDRAWALS, nu as getReferrerAccountEncoder, o as NTBUNDLE_ERROR__BUNDLE_NOT_PERMISSIONNED, oa as getRemoveStrategyDiscriminatorBytes, oc as getCloseUserBundleAccountInstructionAsync, od as getReferralTierEncoder, oi as SET_KEEPER_DISCRIMINATOR, ol as findTargetPendingBundleAssetAuthorityPda, on as getUpdateAllocationsInstruction, oo as parseProcessReferrerWithdrawalInstruction, or as getSetReferrerConfigInstruction, os as getInitializePermissionedBundleDepositorInstructionDataDecoder, ot as NTBUNDLE_ERROR__PENDING_DEPOSIT_OR_WITHDRAWAL_EXISTS, ou as fetchAllMaybeOracleData, p as NTBUNDLE_ERROR__EMPTY_USER_WITHDRAWAL_TIMING_CLEAR_REQUEST, pa as REGISTER_REFERRER_DISCRIMINATOR, pc as getClearUserWithdrawalTimingOverrideInstruction, pi as SET_FEES_DISCRIMINATOR, pl as findSourceBundleAssetAuthorityPda, pn as getStartDistributionDiscriminatorBytes, po as getProcessDepositInstructionDataEncoder, pr as getSetReferrerActiveInstruction, ps as getInitializeBundleMasterAccountInstructionDataCodec, pt as NTBUNDLE_ERROR__REDEMPTION_AMOUNT_ZERO, pu as getOracleDataEncoder, q as NTBUNDLE_ERROR__NETTING_ALREADY_DONE, qa as getProcessSwitchInstruction, qc as getApplyFeesToUserInstructionDataDecoder, qi as getRequestDepositInstructionDataCodec, ql as REFERRER_ACCOUNT_DISCRIMINATOR, qn as getSetUserFeeOverrideInstructionDataCodec, qo as MANAGER_WITHDRAW_DISCRIMINATOR, qr as getSetMinDepositAmountDiscriminatorBytes, qs as getEnableStrategyInstructionDataEncoder, qt as identifyNtbundleInstruction, qu as getBundleCreatorAccountSize, r as NTBUNDLE_ERROR__ALLOCATION_BPS_IS_ZERO, ra as getRequestBundleSwitchInstructionDataEncoder, rc as CLOSE_USER_BUNDLE_ACCOUNT_DISCRIMINATOR, rd as getBundleEncoder, ri as getSetMaxDepositAmountInstructionDataDecoder, rl as parseAddStrategyInstruction, rn as parseUpdateOracleInstruction, ro as getProcessReferrerWithdrawalInstructionDataCodec, rr as parseSetReferrerRateOverrideInstruction, rs as getInitializePermissionedBundleDepositorInstruction, rt as NTBUNDLE_ERROR__PAYER_NOT_AUTHORITY, ru as getReferrerAccountSize, s as NTBUNDLE_ERROR__CALLER_NOT_NEUTRAL_FEE_INCREMENTER, sa as getRemoveStrategyInstruction, sc as getCloseUserBundleAccountInstructionDataCodec, si as getSetKeeperDiscriminatorBytes, sl as findTargetOracleDataPda, sn as getUpdateAllocationsInstructionAsync, so as PROCESS_DEPOSIT_DISCRIMINATOR, sr as getSetReferrerConfigInstructionDataCodec, ss as getInitializePermissionedBundleDepositorInstructionDataEncoder, st as NTBUNDLE_ERROR__PENDING_TRANSACTIONS_EXIST, su as fetchAllOracleData, t as NTBUNDLE_ERROR__ALLOCATION_AMOUNT_ZERO, ta as getRequestBundleSwitchInstructionDataCodec, tc as getDistributeToReceiversInstructionDataEncoder, td as getBundleDecoder, ti as getSetMaxDepositAmountInstruction, tl as getAddStrategyInstructionDataDecoder, tn as getUpdateOracleInstructionDataDecoder, to as getProcessReferrerWithdrawalInstruction, tr as getSetReferrerRateOverrideInstructionDataDecoder, ts as INITIALIZE_PERMISSIONED_BUNDLE_DEPOSITOR_DISCRIMINATOR, tt as NTBUNDLE_ERROR__ORACLE_UPDATE_TOO_FREQUENT, tu as getReferrerAccountDiscriminatorBytes, u as NTBUNDLE_ERROR__DISTRIBUTION_ALREADY_STARTED, ua as getRemoveStrategyInstructionDataDecoder, uc as parseCloseUserBundleAccountInstruction, ui as getSetKeeperInstructionDataDecoder, ul as findSourceUserBundleAccountPda, un as getUpdateAllocationsInstructionDataEncoder, uo as getProcessDepositInstructionAsync, ur as parseSetReferrerConfigInstruction, us as getInitializeBundleMasterAccountDiscriminatorBytes, ut as NTBUNDLE_ERROR__RAW_TRANSFER_RECEIVER, uu as getOracleDataCodec, v as NTBUNDLE_ERROR__EXCESSIVE_WITHDRAW_FEE, va as getRegisterReferrerInstructionDataDecoder, vc as parseClearUserWithdrawalTimingOverrideInstruction, vi as getSetFeesInstructionDataEncoder, vl as findOracleDataPda, vn as getStartDistributionInstructionDataEncoder, vo as getPerformRefillInstructionAsync, vr as SET_REFERRAL_TIER_CONFIG_DISCRIMINATOR, vs as getInitializeBundleDepositorDiscriminatorBytes, vt as NTBUNDLE_ERROR__REFERRER_DEPOSIT_TOO_LOW, vu as fetchAllMaybeBundleTempData, w as NTBUNDLE_ERROR__INVALID_ASSET_PRECISION, wa as getRefundDepositInstructionAsync, wc as getClearUserFeeOverrideInstructionDataDecoder, wi as getSetDelaysInstructionDataDecoder, wl as findBundleAccountPda, wn as getSetWithdrawalRedemptionScheduleInstructionDataDecoder, wo as getPauseDepositsWithdrawalsDiscriminatorBytes, wr as parseSetReferralTierConfigInstruction, ws as parseInitializeBundleDepositorInstruction, wt as NTBUNDLE_ERROR__SWITCH_ALREADY_ACTIVE, wu as getBundleTempDataEncoder, x as NTBUNDLE_ERROR__INSUFFICIENT_SHARES_BALANCE, xa as REFUND_DEPOSIT_DISCRIMINATOR, xc as getClearUserFeeOverrideInstruction, xi as getSetDelaysDiscriminatorBytes, xl as findBundleMasterAccountPda, xn as getSetWithdrawalRedemptionScheduleDiscriminatorBytes, xo as getPerformRefillInstructionDataEncoder, xr as getSetReferralTierConfigInstructionDataCodec, xs as getInitializeBundleDepositorInstructionDataCodec, xt as NTBUNDLE_ERROR__REFILL_AMOUNT_INVALID, xu as getBundleTempDataCodec, y as NTBUNDLE_ERROR__INSUFFICIENT_BUNDLE_BALANCE, ya as getRegisterReferrerInstructionDataEncoder, yc as CLEAR_USER_FEE_OVERRIDE_DISCRIMINATOR, yi as parseSetFeesInstruction, yl as findCloseUserBundleAccountUserBundleAccountPda, yn as parseStartDistributionInstruction, yo as getPerformRefillInstructionDataCodec, yr as getSetReferralTierConfigDiscriminatorBytes, ys as getInitializeBundleDepositorInstruction, yt as NTBUNDLE_ERROR__REFERRER_SHARES_ZERO, yu as fetchBundleTempData, z as NTBUNDLE_ERROR__INVALID_WITHDRAWAL_DELAY, za as getProcessWithdrawalInstruction, zc as getChangeBundleMasterAdminInstructionDataDecoder, zi as getRequestWithdrawalInstructionDataCodec, zl as fetchAllStrategy, zn as getSetUserReferrerInstructionDataCodec, zo as MANAGER_WITHDRAW_WITH_SPLIT_DISCRIMINATOR, zr as SET_ORACLE_BUFFER_DISCRIMINATOR, zs as getEndDistributionInstructionDataEncoder, zt as NTBUNDLE_ERROR__WITHDRAWAL_ALREADY_PROCESSED, zu as fetchAllBundleCreatorAccount } from "./generated-PNArbjle.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { getAddressEncoder, getProgramDerivedAddress } from "@solana/kit";
|
|
3
|
+
import { address, getAddressEncoder, getProgramDerivedAddress } from "@solana/kit";
|
|
4
4
|
|
|
5
5
|
//#region src/constants/programs.ts
|
|
6
6
|
const DEFAULT_BUNDLE_PROGRAM_ID_MAINNET = "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
|
|
@@ -353,7 +353,7 @@ var vaults_default = [
|
|
|
353
353
|
"vaultAddress": "3vZKAcd74bzwNYZmsJndYExkGj6ABQwrUoiMtdNfzLZe",
|
|
354
354
|
"depositToken": "USDC",
|
|
355
355
|
"pointsMultiplier": 1,
|
|
356
|
-
"pointsEnabled":
|
|
356
|
+
"pointsEnabled": true
|
|
357
357
|
},
|
|
358
358
|
{
|
|
359
359
|
"vaultId": 79,
|
|
@@ -1388,11 +1388,11 @@ const vaultsDevnet = vaultsDevnetRegistry;
|
|
|
1388
1388
|
function getVaultRegistry(cluster) {
|
|
1389
1389
|
return cluster === "devnet" ? vaultsDevnetRegistry : vaultsMainnetRegistry;
|
|
1390
1390
|
}
|
|
1391
|
-
function isValidVaultAddress(address, cluster = "mainnet") {
|
|
1392
|
-
return Object.values(getVaultRegistry(cluster)).map((vault) => vault.vaultAddress).includes(address);
|
|
1391
|
+
function isValidVaultAddress(address$1, cluster = "mainnet") {
|
|
1392
|
+
return Object.values(getVaultRegistry(cluster)).map((vault) => vault.vaultAddress).includes(address$1);
|
|
1393
1393
|
}
|
|
1394
|
-
function getVaultByAddress(address, cluster = "mainnet") {
|
|
1395
|
-
return Object.values(getVaultRegistry(cluster)).find((v) => v.vaultAddress === address);
|
|
1394
|
+
function getVaultByAddress(address$1, cluster = "mainnet") {
|
|
1395
|
+
return Object.values(getVaultRegistry(cluster)).find((v) => v.vaultAddress === address$1);
|
|
1396
1396
|
}
|
|
1397
1397
|
function getVaultById(vaultId, cluster = "mainnet") {
|
|
1398
1398
|
return getVaultRegistry(cluster)[vaultId];
|
|
@@ -1450,6 +1450,8 @@ async function findAssociatedTokenPda(seeds) {
|
|
|
1450
1450
|
//#region src/extensions/math.ts
|
|
1451
1451
|
/** Mirrors `BPS_DENOMINATOR` in `constants.rs:12` and its use in `charge_user_fees` at `bundle.rs:693-695`. */
|
|
1452
1452
|
const BPS_DENOMINATOR = 10000n;
|
|
1453
|
+
/** Maximum deposit fee accepted by `set_fees` and user fee overrides. */
|
|
1454
|
+
const MAX_DEPOSIT_FEE_BPS = 5e3;
|
|
1453
1455
|
/** Mirrors `SECONDS_IN_YEAR` in `constants.rs:11` and its use in `charge_user_fees` at `bundle.rs:693-695`. */
|
|
1454
1456
|
const SECONDS_IN_YEAR = 31536000n;
|
|
1455
1457
|
/** Upper bound for the Rust `u64` amounts consumed by `fetch_total_equity` at `bundle.rs:244-257`. */
|
|
@@ -1473,6 +1475,20 @@ function assertValidAmountRaw(amountRaw) {
|
|
|
1473
1475
|
if (amountRaw <= 0n || amountRaw > U64_MAX) throw new Error("INVALID_AMOUNT_RAW");
|
|
1474
1476
|
}
|
|
1475
1477
|
/**
|
|
1478
|
+
* Returns the smallest gross deposit whose net amount meets
|
|
1479
|
+
* `minimumNetAmount`, using the ceiling fee calculation from
|
|
1480
|
+
* `calculate_fee_amount_ceil` at `bundle.rs:299-310`.
|
|
1481
|
+
*/
|
|
1482
|
+
function calculateGrossDepositAmount(args) {
|
|
1483
|
+
if (args.minimumNetAmount < 0n || args.minimumNetAmount > U64_MAX) throw new Error("INVALID_NET_DEPOSIT_AMOUNT");
|
|
1484
|
+
if (!Number.isInteger(args.depositFeeBps) || args.depositFeeBps < 0 || args.depositFeeBps > MAX_DEPOSIT_FEE_BPS) throw new Error("INVALID_DEPOSIT_FEE_BPS");
|
|
1485
|
+
if (args.minimumNetAmount === 0n) return 0n;
|
|
1486
|
+
const netBps = BPS_DENOMINATOR - BigInt(args.depositFeeBps);
|
|
1487
|
+
const grossAmount = (args.minimumNetAmount * BPS_DENOMINATOR + netBps - 1n) / netBps;
|
|
1488
|
+
if (grossAmount > U64_MAX) throw new Error("GROSS_DEPOSIT_AMOUNT_EXCEEDS_U64");
|
|
1489
|
+
return grossAmount;
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1476
1492
|
* Converts a UI float to the integer amount domain used by
|
|
1477
1493
|
* `calculate_assets_from_shares` at `bundle.rs:259-270`.
|
|
1478
1494
|
*/
|
|
@@ -1503,6 +1519,24 @@ function calculateAssetsFromShares(args) {
|
|
|
1503
1519
|
return args.totalShares === 0n ? 0n : args.shares * args.totalAssets / args.totalShares;
|
|
1504
1520
|
}
|
|
1505
1521
|
/**
|
|
1522
|
+
* Mirrors `calculate_withdrawal_cooldown_time` at `bundle.rs:220-238`.
|
|
1523
|
+
* The program converts the integer inputs to `f64`; `Number` follows the same
|
|
1524
|
+
* IEEE-754 binary64 arithmetic before the result is rounded up.
|
|
1525
|
+
*/
|
|
1526
|
+
function estimateWithdrawalCooldownSeconds(args) {
|
|
1527
|
+
if (args.totalShares === 0n) return args.withdrawalTMax;
|
|
1528
|
+
const scaledRatio = (Number(args.sharesAmount) / Number(args.totalShares)) ** args.withdrawalCurve;
|
|
1529
|
+
const processingSeconds = Number(args.withdrawalTMin) + Number(args.withdrawalTMax - args.withdrawalTMin) * scaledRatio;
|
|
1530
|
+
return BigInt(Math.ceil(processingSeconds));
|
|
1531
|
+
}
|
|
1532
|
+
/** Mirrors the availability clamp at `referrer_request_withdraw.rs:70-81`. */
|
|
1533
|
+
function estimateWithdrawalAvailableTimestamp(args) {
|
|
1534
|
+
const cooldownEndTimestamp = args.nowUnixSeconds + args.cooldownSeconds;
|
|
1535
|
+
if (args.withdrawalRedemptionRequestCutoffTs === 0n) return cooldownEndTimestamp;
|
|
1536
|
+
const policyUnlockTimestamp = args.nowUnixSeconds <= args.withdrawalRedemptionRequestCutoffTs ? args.withdrawalRedemptionUnlockCurrentCycleTs : args.withdrawalRedemptionUnlockNextCycleTs;
|
|
1537
|
+
return cooldownEndTimestamp > policyUnlockTimestamp ? cooldownEndTimestamp : policyUnlockTimestamp;
|
|
1538
|
+
}
|
|
1539
|
+
/**
|
|
1506
1540
|
* Applies the legacy withdrawal-share ratio using the integer division from
|
|
1507
1541
|
* `calculate_assets_from_shares` at `bundle.rs:259-270`.
|
|
1508
1542
|
*/
|
|
@@ -1525,15 +1559,60 @@ function calculateOnChainPps(args) {
|
|
|
1525
1559
|
|
|
1526
1560
|
//#endregion
|
|
1527
1561
|
//#region src/extensions/fees.ts
|
|
1528
|
-
/** Mirrors `FEE_OVERRIDE_DEPOSIT`
|
|
1562
|
+
/** Mirrors the onchain `FEE_OVERRIDE_DEPOSIT` flag. */
|
|
1529
1563
|
const FEE_OVERRIDE_DEPOSIT = 1;
|
|
1530
|
-
/** Mirrors `FEE_OVERRIDE_WITHDRAWAL`
|
|
1564
|
+
/** Mirrors the onchain `FEE_OVERRIDE_WITHDRAWAL` flag. */
|
|
1531
1565
|
const FEE_OVERRIDE_WITHDRAWAL = 2;
|
|
1532
|
-
/** Mirrors `FEE_OVERRIDE_PERFORMANCE`
|
|
1566
|
+
/** Mirrors the onchain `FEE_OVERRIDE_PERFORMANCE` flag. */
|
|
1533
1567
|
const FEE_OVERRIDE_PERFORMANCE = 4;
|
|
1534
|
-
/** Mirrors `FEE_OVERRIDE_MANAGEMENT`
|
|
1568
|
+
/** Mirrors the onchain `FEE_OVERRIDE_MANAGEMENT` flag. */
|
|
1535
1569
|
const FEE_OVERRIDE_MANAGEMENT = 8;
|
|
1536
|
-
/** Mirrors
|
|
1570
|
+
/** Mirrors the onchain `REFERRAL_OVERRIDE_PFEE` flag. */
|
|
1571
|
+
const REFERRAL_OVERRIDE_PFEE = 1;
|
|
1572
|
+
/** Mirrors the onchain `REFERRAL_OVERRIDE_MFEE` flag. */
|
|
1573
|
+
const REFERRAL_OVERRIDE_MFEE = 2;
|
|
1574
|
+
/** Maximum number of entries accepted by `set_referral_tier_config`. */
|
|
1575
|
+
const MAX_REFERRAL_TIERS = 5;
|
|
1576
|
+
/** Resolves the bundle schedule before applying any per-referrer override. */
|
|
1577
|
+
function resolveBundleReferralRates(bundle, referredNetDeposits) {
|
|
1578
|
+
const activeTierCount = Math.min(bundle.tierCount, bundle.referralTiers.length, MAX_REFERRAL_TIERS);
|
|
1579
|
+
let resolvedRates = {
|
|
1580
|
+
referralPfeeBps: 0,
|
|
1581
|
+
referralMfeeBps: 0,
|
|
1582
|
+
referralTierIndex: void 0
|
|
1583
|
+
};
|
|
1584
|
+
for (let tierIndex = 0; tierIndex < activeTierCount; tierIndex += 1) {
|
|
1585
|
+
const referralTier = bundle.referralTiers[tierIndex];
|
|
1586
|
+
if (referralTier === void 0 || referredNetDeposits < referralTier.threshold) break;
|
|
1587
|
+
resolvedRates = {
|
|
1588
|
+
referralPfeeBps: referralTier.pfeeBps,
|
|
1589
|
+
referralMfeeBps: referralTier.mfeeBps,
|
|
1590
|
+
referralTierIndex: tierIndex
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
return resolvedRates;
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* Resolves the live rates used by fee settlement. An empty schedule resolves
|
|
1597
|
+
* to zero. A partial override replaces only its flagged component; a full
|
|
1598
|
+
* override bypasses the tier schedule.
|
|
1599
|
+
*/
|
|
1600
|
+
function resolveEffectiveReferralRates(bundle, referrerAccount) {
|
|
1601
|
+
if (referrerAccount !== void 0 && (referrerAccount.rateOverrideFlags & (REFERRAL_OVERRIDE_PFEE | REFERRAL_OVERRIDE_MFEE)) === (REFERRAL_OVERRIDE_PFEE | REFERRAL_OVERRIDE_MFEE)) return {
|
|
1602
|
+
referralPfeeBps: referrerAccount.customPfeeBps,
|
|
1603
|
+
referralMfeeBps: referrerAccount.customMfeeBps,
|
|
1604
|
+
referralTierIndex: void 0
|
|
1605
|
+
};
|
|
1606
|
+
const bundleRates = resolveBundleReferralRates(bundle, referrerAccount?.referredNetDeposits ?? 0n);
|
|
1607
|
+
const pfeeOverridden = referrerAccount !== void 0 && (referrerAccount.rateOverrideFlags & REFERRAL_OVERRIDE_PFEE) !== 0;
|
|
1608
|
+
const mfeeOverridden = referrerAccount !== void 0 && (referrerAccount.rateOverrideFlags & REFERRAL_OVERRIDE_MFEE) !== 0;
|
|
1609
|
+
return {
|
|
1610
|
+
referralPfeeBps: pfeeOverridden ? referrerAccount.customPfeeBps : bundleRates.referralPfeeBps,
|
|
1611
|
+
referralMfeeBps: mfeeOverridden ? referrerAccount.customMfeeBps : bundleRates.referralMfeeBps,
|
|
1612
|
+
referralTierIndex: bundleRates.referralTierIndex
|
|
1613
|
+
};
|
|
1614
|
+
}
|
|
1615
|
+
/** Mirrors onchain `resolve_effective_fees`, including zero-valued overrides. */
|
|
1537
1616
|
function resolveEffectiveFees(bundle, user) {
|
|
1538
1617
|
return {
|
|
1539
1618
|
depositFeeBps: user.feeOverrideFlags & FEE_OVERRIDE_DEPOSIT ? user.customDepositFeeBps : bundle.depositFee,
|
|
@@ -1543,11 +1622,11 @@ function resolveEffectiveFees(bundle, user) {
|
|
|
1543
1622
|
};
|
|
1544
1623
|
}
|
|
1545
1624
|
/**
|
|
1546
|
-
* Estimates the user-share deductions
|
|
1547
|
-
*
|
|
1548
|
-
*
|
|
1549
|
-
*
|
|
1550
|
-
*
|
|
1625
|
+
* Estimates the user-share deductions calculated by `charge_user_fees_at_time`.
|
|
1626
|
+
* Referral handling is omitted because it only divides the same deducted
|
|
1627
|
+
* shares between manager and referrer. If `assetPrecision` is zero, this helper
|
|
1628
|
+
* returns a zero fee value; onchain settlement rejects zero asset precision
|
|
1629
|
+
* during its value calculations.
|
|
1551
1630
|
*/
|
|
1552
1631
|
function estimatePendingUserFees(args) {
|
|
1553
1632
|
const sharePrice = sharePriceRaw({
|
|
@@ -1677,9 +1756,8 @@ async function fetchUserBundleBalance(rpc, args) {
|
|
|
1677
1756
|
}
|
|
1678
1757
|
|
|
1679
1758
|
//#endregion
|
|
1680
|
-
//#region src/extensions/
|
|
1681
|
-
|
|
1682
|
-
async function buildDepositInstructions(rpc, params) {
|
|
1759
|
+
//#region src/extensions/deposit.ts
|
|
1760
|
+
async function buildDepositInstructionContext(rpc, params) {
|
|
1683
1761
|
assertValidAmountRaw(params.amountRaw);
|
|
1684
1762
|
const programAddress = params.programAddress ?? NTBUNDLE_PROGRAM_ADDRESS;
|
|
1685
1763
|
const bundle = await fetchMaybeBundle(rpc, params.bundleAccount);
|
|
@@ -1702,14 +1780,13 @@ async function buildDepositInstructions(rpc, params) {
|
|
|
1702
1780
|
owner: pendingBundleAssetAuthorityPda[0],
|
|
1703
1781
|
mint: bundle.data.assetAddress
|
|
1704
1782
|
});
|
|
1705
|
-
const
|
|
1706
|
-
if (!userBundle.exists) instructions.push(await getInitializeBundleDepositorInstructionAsync({
|
|
1783
|
+
const initializeInstruction = userBundle.exists ? void 0 : await getInitializeBundleDepositorInstructionAsync({
|
|
1707
1784
|
payer: params.user,
|
|
1708
1785
|
authority: params.user,
|
|
1709
1786
|
bundleAccount: params.bundleAccount,
|
|
1710
1787
|
userBundleAccount
|
|
1711
|
-
}, { programAddress })
|
|
1712
|
-
|
|
1788
|
+
}, { programAddress });
|
|
1789
|
+
const requestInstruction = await getRequestDepositInstructionAsync({
|
|
1713
1790
|
user: params.user,
|
|
1714
1791
|
bundleAccount: params.bundleAccount,
|
|
1715
1792
|
userTokenAccount,
|
|
@@ -1721,7 +1798,24 @@ async function buildDepositInstructions(rpc, params) {
|
|
|
1721
1798
|
bundleTempData: bundleTempDataPda[0],
|
|
1722
1799
|
pendingBundleAssetAuthority: pendingBundleAssetAuthorityPda[0],
|
|
1723
1800
|
amount: params.amountRaw
|
|
1724
|
-
}, { programAddress })
|
|
1801
|
+
}, { programAddress });
|
|
1802
|
+
return {
|
|
1803
|
+
bundle: bundle.data,
|
|
1804
|
+
userBundleAccount,
|
|
1805
|
+
userBundle: userBundle.exists ? userBundle.data : void 0,
|
|
1806
|
+
initializeInstruction,
|
|
1807
|
+
requestInstruction
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
//#endregion
|
|
1812
|
+
//#region src/extensions/flows.ts
|
|
1813
|
+
/** Mirrors the legacy `buildBundleDepositInstructionsWithVault` flow. */
|
|
1814
|
+
async function buildDepositInstructions(rpc, params) {
|
|
1815
|
+
const context = await buildDepositInstructionContext(rpc, params);
|
|
1816
|
+
const instructions = [];
|
|
1817
|
+
if (context.initializeInstruction) instructions.push(context.initializeInstruction);
|
|
1818
|
+
instructions.push(context.requestInstruction);
|
|
1725
1819
|
return instructions;
|
|
1726
1820
|
}
|
|
1727
1821
|
/**
|
|
@@ -1830,4 +1924,405 @@ async function buildRequestSwitchInstructions(rpc, params) {
|
|
|
1830
1924
|
}
|
|
1831
1925
|
|
|
1832
1926
|
//#endregion
|
|
1833
|
-
export { ADD_STRATEGY_DISCRIMINATOR, ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, APPLY_FEES_TO_USER_DISCRIMINATOR, ASSOCIATED_TOKEN_PROGRAM_ADDRESS, BPS_DENOMINATOR, BUNDLE_CREATOR_ACCOUNT_DISCRIMINATOR, BUNDLE_DISCRIMINATOR, BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, BUNDLE_PROGRAM_ID_V2_MAINNET, BUNDLE_TEMP_DATA_DISCRIMINATOR, CHANGE_BUNDLE_MASTER_ADMIN_DISCRIMINATOR, CHANGE_MANAGER_DISCRIMINATOR, CLEAR_USER_FEE_OVERRIDE_DISCRIMINATOR, CLEAR_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, CLOSE_USER_BUNDLE_ACCOUNT_DISCRIMINATOR, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, DISTRIBUTE_TO_RECEIVERS_DISCRIMINATOR, DevnetVaultId, ENABLE_STRATEGY_DISCRIMINATOR, END_DISTRIBUTION_DISCRIMINATOR, FEE_OVERRIDE_DEPOSIT, FEE_OVERRIDE_MANAGEMENT, FEE_OVERRIDE_PERFORMANCE, FEE_OVERRIDE_WITHDRAWAL, INITIALIZE_BUNDLE_DEPOSITOR_DISCRIMINATOR, INITIALIZE_BUNDLE_DISCRIMINATOR, INITIALIZE_BUNDLE_MASTER_ACCOUNT_DISCRIMINATOR, INITIALIZE_PERMISSIONED_BUNDLE_DEPOSITOR_DISCRIMINATOR, MANAGER_WITHDRAW_DISCRIMINATOR, MANAGER_WITHDRAW_WITH_SPLIT_DISCRIMINATOR, NET_PENDING_TRANSACTIONS_DISCRIMINATOR, NTBUNDLE_ERROR__ALLOCATION_AMOUNT_ZERO, NTBUNDLE_ERROR__ALLOCATION_BPS_GREATER_THAN_GLOBAL_ALLOCATION_BPS, NTBUNDLE_ERROR__ALLOCATION_BPS_IS_ZERO, NTBUNDLE_ERROR__AMOUNT_MUST_BE_BELOW_MAX, NTBUNDLE_ERROR__BUNDLE_IS_PERMISSIONNED, NTBUNDLE_ERROR__BUNDLE_NOT_PERMISSIONNED, NTBUNDLE_ERROR__CALLER_NOT_NEUTRAL_FEE_INCREMENTER, NTBUNDLE_ERROR__DEPOSITS_EXTRA_IN_PENDINGS_NOT_ZERO, NTBUNDLE_ERROR__DEPOSIT_AMOUNT_ZERO, NTBUNDLE_ERROR__DISTRIBUTION_ALREADY_STARTED, NTBUNDLE_ERROR__DISTRIBUTION_NOT_STARTED, NTBUNDLE_ERROR__EMPTY_USER_FEE_CLEAR_REQUEST, NTBUNDLE_ERROR__EMPTY_USER_WITHDRAWAL_TIMING_CLEAR_REQUEST, NTBUNDLE_ERROR__EQUITY_OUT_OF_BUFFER_BOUND, NTBUNDLE_ERROR__EXCESSIVE_DEPOSIT_FEE, NTBUNDLE_ERROR__EXCESSIVE_MANAGEMENT_FEE, NTBUNDLE_ERROR__EXCESSIVE_PERFORMANCE_FEE, NTBUNDLE_ERROR__EXCESSIVE_WITHDRAW_FEE, NTBUNDLE_ERROR__INSUFFICIENT_BUNDLE_BALANCE, NTBUNDLE_ERROR__INSUFFICIENT_FUNDS, NTBUNDLE_ERROR__INSUFFICIENT_SHARES_BALANCE, NTBUNDLE_ERROR__INVALID_ALLOCATIONS, NTBUNDLE_ERROR__INVALID_ASSET_ADDRESS, NTBUNDLE_ERROR__INVALID_ASSET_PRECISION, NTBUNDLE_ERROR__INVALID_FEE_SPLIT, NTBUNDLE_ERROR__INVALID_NEUTRAL_FEE_INCREMENTER, NTBUNDLE_ERROR__INVALID_ORACLE_BUFFER, NTBUNDLE_ERROR__INVALID_ORACLE_MAX_AGE, NTBUNDLE_ERROR__INVALID_ORACLE_UPDATE_TIME_LIMIT, NTBUNDLE_ERROR__INVALID_PERMISSIONNED_DEPOSITOR, NTBUNDLE_ERROR__INVALID_RECEIVER, NTBUNDLE_ERROR__INVALID_REFERRAL_CONFIG, NTBUNDLE_ERROR__INVALID_TWAP_PERIOD, NTBUNDLE_ERROR__INVALID_USER_FEE_CONFIG, NTBUNDLE_ERROR__INVALID_USER_WITHDRAWAL_TIMING_CONFIG, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_AMOUNT, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_COOLDOWN_PERIOD, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_DELAY, NTBUNDLE_ERROR__INVALID_WITHDRAWAL_REDEMPTION_SCHEDULE, NTBUNDLE_ERROR__LEFT_TO_DISTRIBUTE_NOT_ZERO, NTBUNDLE_ERROR__MANAGER_SHARES_ZERO, NTBUNDLE_ERROR__MATH_ERROR, NTBUNDLE_ERROR__MAX_DEPOSIT_AMOUNT_EXCEEDED, NTBUNDLE_ERROR__MIN_DEPOSIT_AMOUNT_NOT_MET, NTBUNDLE_ERROR__MUST_BE_IN_WHITELIST, NTBUNDLE_ERROR__NETTING_ALREADY_DONE, NTBUNDLE_ERROR__NETTING_NOT_DONE, NTBUNDLE_ERROR__NO_PENDING_SWITCH, NTBUNDLE_ERROR__NO_PENDING_TRANSACTIONS, NTBUNDLE_ERROR__NO_PENDING_WITHDRAWAL, NTBUNDLE_ERROR__NO_USER_FEE_OVERRIDE_TO_CLEAR, NTBUNDLE_ERROR__NO_USER_WITHDRAWAL_TIMING_OVERRIDE_TO_CLEAR, NTBUNDLE_ERROR__ORACLE_NOT_UPDATED, NTBUNDLE_ERROR__ORACLE_UPDATE_TOO_FREQUENT, NTBUNDLE_ERROR__PAUSED_DEPOSITS_WITHDRAWALS, NTBUNDLE_ERROR__PAYER_NOT_AUTHORITY, NTBUNDLE_ERROR__PENDING_DEPOSIT_AMOUNT_ZERO, NTBUNDLE_ERROR__PENDING_DEPOSIT_EXISTS, NTBUNDLE_ERROR__PENDING_DEPOSIT_OR_WITHDRAWAL_EXISTS, NTBUNDLE_ERROR__PENDING_TRANSACTIONS_EXIST, NTBUNDLE_ERROR__PENDING_WITHDRAWAL_EXISTS, NTBUNDLE_ERROR__POD_TOKEN_TOTAL_SUPPLY_ZERO, NTBUNDLE_ERROR__RAW_TRANSFER_RECEIVER, NTBUNDLE_ERROR__RECEIVER_ALREADY_ALLOCATED, NTBUNDLE_ERROR__REDEMPTION_AMOUNT_EXCEEDED, NTBUNDLE_ERROR__REDEMPTION_AMOUNT_ZERO, NTBUNDLE_ERROR__REFERRALS_DISABLED, NTBUNDLE_ERROR__REFERRAL_ALREADY_SET, NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISMATCH, NTBUNDLE_ERROR__REFERRER_ACCOUNT_MISSING, NTBUNDLE_ERROR__REFERRER_DEPOSIT_TOO_LOW, NTBUNDLE_ERROR__REFERRER_SHARES_ZERO, NTBUNDLE_ERROR__REFILL_AMOUNT_EXCEEDED, NTBUNDLE_ERROR__REFILL_AMOUNT_INVALID, NTBUNDLE_ERROR__STRATEGY_ALREADY_ENABLED, NTBUNDLE_ERROR__STRATEGY_DISABLED, NTBUNDLE_ERROR__SWITCH_ALREADY_ACTIVE, NTBUNDLE_ERROR__SWITCH_ASSET_MINT_MISMATCH, NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNTS_MISSING, NTBUNDLE_ERROR__SWITCH_TARGET_ACCOUNT_MISMATCH, NTBUNDLE_ERROR__SWITCH_TARGET_SAME_AS_SOURCE, NTBUNDLE_ERROR__TOO_MANY_ALLOCATED_RECEIVERS, NTBUNDLE_ERROR__TOTAL_ASSET_EXCEED_NEW_MAX_DEPOSIT_AMOUNT, NTBUNDLE_ERROR__UNAUTHORIZED_ADMIN_ACTION, NTBUNDLE_ERROR__UNAUTHORIZED_BUNDLE_CREATOR, NTBUNDLE_ERROR__UNAUTHORIZED_KEEPER_ACTION, NTBUNDLE_ERROR__UNAUTHORIZED_MANAGER_ACTION, NTBUNDLE_ERROR__UNAUTHORIZED_REFERRER_ACTION, NTBUNDLE_ERROR__UNPAUSED_DEPOSITS_WITHDRAWALS, NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_HAS_ACTIVITY, NTBUNDLE_ERROR__USER_BUNDLE_ACCOUNT_NOT_EMPTY, NTBUNDLE_ERROR__WITHDRAWAL_ALREADY_PROCESSED, NTBUNDLE_ERROR__WITHDRAWAL_DELAY_NOT_MET, NTBUNDLE_PROGRAM_ADDRESS, NtbundleAccount, NtbundleInstruction, ORACLE_DATA_DISCRIMINATOR, PAUSE_DEPOSITS_WITHDRAWALS_DISCRIMINATOR, PERFORM_REFILL_DISCRIMINATOR, PROCESS_DEPOSIT_DISCRIMINATOR, PROCESS_REFERRER_WITHDRAWAL_DISCRIMINATOR, PROCESS_SWITCH_DISCRIMINATOR, PROCESS_WITHDRAWAL_DISCRIMINATOR, REFERRER_ACCOUNT_DISCRIMINATOR, REFERRER_REQUEST_WITHDRAW_DISCRIMINATOR, REFUND_DEPOSIT_DISCRIMINATOR, REGISTER_REFERRER_DISCRIMINATOR, REMOVE_STRATEGY_DISCRIMINATOR, REQUEST_BUNDLE_SWITCH_DISCRIMINATOR, REQUEST_DEPOSIT_DISCRIMINATOR, REQUEST_WITHDRAWAL_DISCRIMINATOR, SECONDS_IN_YEAR, SET_BUNDLE_CREATOR_DISCRIMINATOR, SET_DELAYS_DISCRIMINATOR, SET_FEES_DISCRIMINATOR, SET_KEEPER_DISCRIMINATOR, SET_MAX_DEPOSIT_AMOUNT_DISCRIMINATOR, SET_MIN_DEPOSIT_AMOUNT_DISCRIMINATOR, SET_ORACLE_BUFFER_DISCRIMINATOR, SET_ORACLE_MAX_AGE_DISCRIMINATOR, SET_ORACLE_UPDATE_TIME_LIMIT_DISCRIMINATOR, SET_REFERRER_ACTIVE_DISCRIMINATOR, SET_REFERRER_CONFIG_DISCRIMINATOR, SET_REFERRER_RATE_OVERRIDE_DISCRIMINATOR, SET_USER_FEE_OVERRIDE_DISCRIMINATOR, SET_USER_REFERRER_DISCRIMINATOR, SET_USER_WITHDRAWAL_TIMING_OVERRIDE_DISCRIMINATOR, SET_WITHDRAWAL_REDEMPTION_SCHEDULE_DISCRIMINATOR, START_DISTRIBUTION_DISCRIMINATOR, STRATEGY_DISCRIMINATOR, SupportedChain, SupportedToken, TOKEN_PROGRAM_ADDRESS, U64_MAX, UPDATE_ALLOCATIONS_DISCRIMINATOR, UPDATE_ORACLE_DISCRIMINATOR, USER_BUNDLE_ACCOUNT_DISCRIMINATOR, VaultCategory, VaultId, VaultType, assertAllowlistedBundleProgramId, assertValidAmountRaw, buildDepositInstructions, buildRequestSwitchInstructions, buildRequestWithdrawInstruction, calculateAssetsFromShares, calculateOnChainPps, computeUserBundleBalance, computeWithdrawalShares, decodeBundle, decodeBundleCreatorAccount, decodeBundleMasterAccount, decodeBundleTempData, decodeOracleData, decodeReferrerAccount, decodeStrategy, decodeUserBundleAccount, estimatePendingUserFees, fetchAllBundle, fetchAllBundleCreatorAccount, fetchAllBundleMasterAccount, fetchAllBundleTempData, fetchAllMaybeBundle, fetchAllMaybeBundleCreatorAccount, fetchAllMaybeBundleMasterAccount, fetchAllMaybeBundleTempData, fetchAllMaybeOracleData, fetchAllMaybeReferrerAccount, fetchAllMaybeStrategy, fetchAllMaybeUserBundleAccount, fetchAllOracleData, fetchAllReferrerAccount, fetchAllStrategy, fetchAllUserBundleAccount, fetchBundle, fetchBundleCreatorAccount, fetchBundleMasterAccount, fetchBundleTempData, fetchMaybeBundle, fetchMaybeBundleCreatorAccount, fetchMaybeBundleMasterAccount, fetchMaybeBundleTempData, fetchMaybeOracleData, fetchMaybeReferrerAccount, fetchMaybeStrategy, fetchMaybeUserBundleAccount, fetchOracleData, fetchReferrerAccount, fetchStrategy, fetchUserBundleAccount, fetchUserBundleBalance, fetchUserBundleBalances, findAssociatedTokenPda, findBundleAccountPda, findBundleAssetAuthorityPda, findBundleCreatorAccountPda, findBundleMasterAccountPda, findBundleTempDataPda, findCloseUserBundleAccountUserBundleAccountPda, findOracleDataPda, findPendingBundleAssetAuthorityPda, findReferrerAccountPda, findReferrerUserBundleAccountPda, findRequestBundleSwitchUserBundleAccountPda, findSourceBundleAssetAuthorityPda, findSourceBundleTempDataPda, findSourceOracleDataPda, findSourceUserBundleAccountPda, findStrategyAccountPda, findTargetBundleTempDataPda, findTargetOracleDataPda, findTargetPendingBundleAssetAuthorityPda, findTargetUserBundleAccountPda, findUserBundleAccountPda, getAddStrategyDiscriminatorBytes, getAddStrategyInstruction, getAddStrategyInstructionAsync, getAddStrategyInstructionDataCodec, getAddStrategyInstructionDataDecoder, getAddStrategyInstructionDataEncoder, getApplyFeesToUserDiscriminatorBytes, getApplyFeesToUserInstruction, getApplyFeesToUserInstructionAsync, getApplyFeesToUserInstructionDataCodec, getApplyFeesToUserInstructionDataDecoder, getApplyFeesToUserInstructionDataEncoder, getBundleCodec, getBundleCreatorAccountCodec, getBundleCreatorAccountDecoder, getBundleCreatorAccountDiscriminatorBytes, getBundleCreatorAccountEncoder, getBundleCreatorAccountSize, getBundleDecoder, getBundleDiscriminatorBytes, getBundleEncoder, getBundleMasterAccountCodec, getBundleMasterAccountDecoder, getBundleMasterAccountDiscriminatorBytes, getBundleMasterAccountEncoder, getBundleMasterAccountSize, getBundleProgramId, getBundleTempDataCodec, getBundleTempDataDecoder, getBundleTempDataDiscriminatorBytes, getBundleTempDataEncoder, getBundleTempDataSize, getChangeBundleMasterAdminDiscriminatorBytes, getChangeBundleMasterAdminInstruction, getChangeBundleMasterAdminInstructionAsync, getChangeBundleMasterAdminInstructionDataCodec, getChangeBundleMasterAdminInstructionDataDecoder, getChangeBundleMasterAdminInstructionDataEncoder, getChangeManagerDiscriminatorBytes, getChangeManagerInstruction, getChangeManagerInstructionDataCodec, getChangeManagerInstructionDataDecoder, getChangeManagerInstructionDataEncoder, getClearUserFeeOverrideDiscriminatorBytes, getClearUserFeeOverrideInstruction, getClearUserFeeOverrideInstructionAsync, getClearUserFeeOverrideInstructionDataCodec, getClearUserFeeOverrideInstructionDataDecoder, getClearUserFeeOverrideInstructionDataEncoder, getClearUserWithdrawalTimingOverrideDiscriminatorBytes, getClearUserWithdrawalTimingOverrideInstruction, getClearUserWithdrawalTimingOverrideInstructionAsync, getClearUserWithdrawalTimingOverrideInstructionDataCodec, getClearUserWithdrawalTimingOverrideInstructionDataDecoder, getClearUserWithdrawalTimingOverrideInstructionDataEncoder, getCloseUserBundleAccountDiscriminatorBytes, getCloseUserBundleAccountInstruction, getCloseUserBundleAccountInstructionAsync, getCloseUserBundleAccountInstructionDataCodec, getCloseUserBundleAccountInstructionDataDecoder, getCloseUserBundleAccountInstructionDataEncoder, getDefaultBundleProgramIdByCluster, getDistributeToReceiversDiscriminatorBytes, getDistributeToReceiversInstruction, getDistributeToReceiversInstructionAsync, getDistributeToReceiversInstructionDataCodec, getDistributeToReceiversInstructionDataDecoder, getDistributeToReceiversInstructionDataEncoder, getDriftProgramId, getEnableStrategyDiscriminatorBytes, getEnableStrategyInstruction, getEnableStrategyInstructionAsync, getEnableStrategyInstructionDataCodec, getEnableStrategyInstructionDataDecoder, getEnableStrategyInstructionDataEncoder, getEndDistributionDiscriminatorBytes, getEndDistributionInstruction, getEndDistributionInstructionAsync, getEndDistributionInstructionDataCodec, getEndDistributionInstructionDataDecoder, getEndDistributionInstructionDataEncoder, getInitializeBundleDepositorDiscriminatorBytes, getInitializeBundleDepositorInstruction, getInitializeBundleDepositorInstructionAsync, getInitializeBundleDepositorInstructionDataCodec, getInitializeBundleDepositorInstructionDataDecoder, getInitializeBundleDepositorInstructionDataEncoder, getInitializeBundleDiscriminatorBytes, getInitializeBundleInstruction, getInitializeBundleInstructionAsync, getInitializeBundleInstructionDataCodec, getInitializeBundleInstructionDataDecoder, getInitializeBundleInstructionDataEncoder, getInitializeBundleMasterAccountDiscriminatorBytes, getInitializeBundleMasterAccountInstruction, getInitializeBundleMasterAccountInstructionAsync, getInitializeBundleMasterAccountInstructionDataCodec, getInitializeBundleMasterAccountInstructionDataDecoder, getInitializeBundleMasterAccountInstructionDataEncoder, getInitializePermissionedBundleDepositorDiscriminatorBytes, getInitializePermissionedBundleDepositorInstruction, getInitializePermissionedBundleDepositorInstructionAsync, getInitializePermissionedBundleDepositorInstructionDataCodec, getInitializePermissionedBundleDepositorInstructionDataDecoder, getInitializePermissionedBundleDepositorInstructionDataEncoder, getManagerWithdrawDiscriminatorBytes, getManagerWithdrawInstruction, getManagerWithdrawInstructionAsync, getManagerWithdrawInstructionDataCodec, getManagerWithdrawInstructionDataDecoder, getManagerWithdrawInstructionDataEncoder, getManagerWithdrawWithSplitDiscriminatorBytes, getManagerWithdrawWithSplitInstruction, getManagerWithdrawWithSplitInstructionAsync, getManagerWithdrawWithSplitInstructionDataCodec, getManagerWithdrawWithSplitInstructionDataDecoder, getManagerWithdrawWithSplitInstructionDataEncoder, getNetPendingTransactionsDiscriminatorBytes, getNetPendingTransactionsInstruction, getNetPendingTransactionsInstructionAsync, getNetPendingTransactionsInstructionDataCodec, getNetPendingTransactionsInstructionDataDecoder, getNetPendingTransactionsInstructionDataEncoder, getNtbundleErrorMessage, getOracleDataCodec, getOracleDataDecoder, getOracleDataDiscriminatorBytes, getOracleDataEncoder, getOracleDataSize, getPauseDepositsWithdrawalsDiscriminatorBytes, getPauseDepositsWithdrawalsInstruction, getPauseDepositsWithdrawalsInstructionAsync, getPauseDepositsWithdrawalsInstructionDataCodec, getPauseDepositsWithdrawalsInstructionDataDecoder, getPauseDepositsWithdrawalsInstructionDataEncoder, getPerformRefillDiscriminatorBytes, getPerformRefillInstruction, getPerformRefillInstructionAsync, getPerformRefillInstructionDataCodec, getPerformRefillInstructionDataDecoder, getPerformRefillInstructionDataEncoder, getPointsVaults, getProcessDepositDiscriminatorBytes, getProcessDepositInstruction, getProcessDepositInstructionAsync, getProcessDepositInstructionDataCodec, getProcessDepositInstructionDataDecoder, getProcessDepositInstructionDataEncoder, getProcessReferrerWithdrawalDiscriminatorBytes, getProcessReferrerWithdrawalInstruction, getProcessReferrerWithdrawalInstructionAsync, getProcessReferrerWithdrawalInstructionDataCodec, getProcessReferrerWithdrawalInstructionDataDecoder, getProcessReferrerWithdrawalInstructionDataEncoder, getProcessSwitchDiscriminatorBytes, getProcessSwitchInstruction, getProcessSwitchInstructionAsync, getProcessSwitchInstructionDataCodec, getProcessSwitchInstructionDataDecoder, getProcessSwitchInstructionDataEncoder, getProcessWithdrawalDiscriminatorBytes, getProcessWithdrawalInstruction, getProcessWithdrawalInstructionAsync, getProcessWithdrawalInstructionDataCodec, getProcessWithdrawalInstructionDataDecoder, getProcessWithdrawalInstructionDataEncoder, getReferrerAccountCodec, getReferrerAccountDecoder, getReferrerAccountDiscriminatorBytes, getReferrerAccountEncoder, getReferrerAccountSize, getReferrerRequestWithdrawDiscriminatorBytes, getReferrerRequestWithdrawInstruction, getReferrerRequestWithdrawInstructionAsync, getReferrerRequestWithdrawInstructionDataCodec, getReferrerRequestWithdrawInstructionDataDecoder, getReferrerRequestWithdrawInstructionDataEncoder, getRefundDepositDiscriminatorBytes, getRefundDepositInstruction, getRefundDepositInstructionAsync, getRefundDepositInstructionDataCodec, getRefundDepositInstructionDataDecoder, getRefundDepositInstructionDataEncoder, getRegisterReferrerDiscriminatorBytes, getRegisterReferrerInstruction, getRegisterReferrerInstructionAsync, getRegisterReferrerInstructionDataCodec, getRegisterReferrerInstructionDataDecoder, getRegisterReferrerInstructionDataEncoder, getRemoveStrategyDiscriminatorBytes, getRemoveStrategyInstruction, getRemoveStrategyInstructionAsync, getRemoveStrategyInstructionDataCodec, getRemoveStrategyInstructionDataDecoder, getRemoveStrategyInstructionDataEncoder, getRequestBundleSwitchDiscriminatorBytes, getRequestBundleSwitchInstruction, getRequestBundleSwitchInstructionAsync, getRequestBundleSwitchInstructionDataCodec, getRequestBundleSwitchInstructionDataDecoder, getRequestBundleSwitchInstructionDataEncoder, getRequestDepositDiscriminatorBytes, getRequestDepositInstruction, getRequestDepositInstructionAsync, getRequestDepositInstructionDataCodec, getRequestDepositInstructionDataDecoder, getRequestDepositInstructionDataEncoder, getRequestWithdrawalDiscriminatorBytes, getRequestWithdrawalInstruction, getRequestWithdrawalInstructionAsync, getRequestWithdrawalInstructionDataCodec, getRequestWithdrawalInstructionDataDecoder, getRequestWithdrawalInstructionDataEncoder, getSetBundleCreatorDiscriminatorBytes, getSetBundleCreatorInstruction, getSetBundleCreatorInstructionAsync, getSetBundleCreatorInstructionDataCodec, getSetBundleCreatorInstructionDataDecoder, getSetBundleCreatorInstructionDataEncoder, getSetDelaysDiscriminatorBytes, getSetDelaysInstruction, getSetDelaysInstructionDataCodec, getSetDelaysInstructionDataDecoder, getSetDelaysInstructionDataEncoder, getSetFeesDiscriminatorBytes, getSetFeesInstruction, getSetFeesInstructionDataCodec, getSetFeesInstructionDataDecoder, getSetFeesInstructionDataEncoder, getSetKeeperDiscriminatorBytes, getSetKeeperInstruction, getSetKeeperInstructionDataCodec, getSetKeeperInstructionDataDecoder, getSetKeeperInstructionDataEncoder, getSetMaxDepositAmountDiscriminatorBytes, getSetMaxDepositAmountInstruction, getSetMaxDepositAmountInstructionDataCodec, getSetMaxDepositAmountInstructionDataDecoder, getSetMaxDepositAmountInstructionDataEncoder, getSetMinDepositAmountDiscriminatorBytes, getSetMinDepositAmountInstruction, getSetMinDepositAmountInstructionDataCodec, getSetMinDepositAmountInstructionDataDecoder, getSetMinDepositAmountInstructionDataEncoder, getSetOracleBufferDiscriminatorBytes, getSetOracleBufferInstruction, getSetOracleBufferInstructionDataCodec, getSetOracleBufferInstructionDataDecoder, getSetOracleBufferInstructionDataEncoder, getSetOracleMaxAgeDiscriminatorBytes, getSetOracleMaxAgeInstruction, getSetOracleMaxAgeInstructionDataCodec, getSetOracleMaxAgeInstructionDataDecoder, getSetOracleMaxAgeInstructionDataEncoder, getSetOracleUpdateTimeLimitDiscriminatorBytes, getSetOracleUpdateTimeLimitInstruction, getSetOracleUpdateTimeLimitInstructionDataCodec, getSetOracleUpdateTimeLimitInstructionDataDecoder, getSetOracleUpdateTimeLimitInstructionDataEncoder, getSetReferrerActiveDiscriminatorBytes, getSetReferrerActiveInstruction, getSetReferrerActiveInstructionDataCodec, getSetReferrerActiveInstructionDataDecoder, getSetReferrerActiveInstructionDataEncoder, getSetReferrerConfigDiscriminatorBytes, getSetReferrerConfigInstruction, getSetReferrerConfigInstructionDataCodec, getSetReferrerConfigInstructionDataDecoder, getSetReferrerConfigInstructionDataEncoder, getSetReferrerRateOverrideDiscriminatorBytes, getSetReferrerRateOverrideInstruction, getSetReferrerRateOverrideInstructionDataCodec, getSetReferrerRateOverrideInstructionDataDecoder, getSetReferrerRateOverrideInstructionDataEncoder, getSetUserFeeOverrideDiscriminatorBytes, getSetUserFeeOverrideInstruction, getSetUserFeeOverrideInstructionAsync, getSetUserFeeOverrideInstructionDataCodec, getSetUserFeeOverrideInstructionDataDecoder, getSetUserFeeOverrideInstructionDataEncoder, getSetUserReferrerDiscriminatorBytes, getSetUserReferrerInstruction, getSetUserReferrerInstructionAsync, getSetUserReferrerInstructionDataCodec, getSetUserReferrerInstructionDataDecoder, getSetUserReferrerInstructionDataEncoder, getSetUserWithdrawalTimingOverrideDiscriminatorBytes, getSetUserWithdrawalTimingOverrideInstruction, getSetUserWithdrawalTimingOverrideInstructionAsync, getSetUserWithdrawalTimingOverrideInstructionDataCodec, getSetUserWithdrawalTimingOverrideInstructionDataDecoder, getSetUserWithdrawalTimingOverrideInstructionDataEncoder, getSetWithdrawalRedemptionScheduleDiscriminatorBytes, getSetWithdrawalRedemptionScheduleInstruction, getSetWithdrawalRedemptionScheduleInstructionDataCodec, getSetWithdrawalRedemptionScheduleInstructionDataDecoder, getSetWithdrawalRedemptionScheduleInstructionDataEncoder, getSolanaTokenDecimals, getSolanaTokenMint, getStartDistributionDiscriminatorBytes, getStartDistributionInstruction, getStartDistributionInstructionAsync, getStartDistributionInstructionDataCodec, getStartDistributionInstructionDataDecoder, getStartDistributionInstructionDataEncoder, getStrategyCodec, getStrategyDecoder, getStrategyDiscriminatorBytes, getStrategyEncoder, getStrategySize, getUpdateAllocationsDiscriminatorBytes, getUpdateAllocationsInstruction, getUpdateAllocationsInstructionAsync, getUpdateAllocationsInstructionDataCodec, getUpdateAllocationsInstructionDataDecoder, getUpdateAllocationsInstructionDataEncoder, getUpdateOracleDiscriminatorBytes, getUpdateOracleInstruction, getUpdateOracleInstructionAsync, getUpdateOracleInstructionDataCodec, getUpdateOracleInstructionDataDecoder, getUpdateOracleInstructionDataEncoder, getUserBundleAccountCodec, getUserBundleAccountDecoder, getUserBundleAccountDiscriminatorBytes, getUserBundleAccountEncoder, getUserBundleAccountSize, getVaultByAddress, getVaultById, getVaultRegistry, humanFloatToAmountRaw, identifyNtbundleAccount, identifyNtbundleInstruction, isAllowlistedBundleProgramId, isNtbundleError, isValidVaultAddress, ntbundleProgram, parseAddStrategyInstruction, parseAmountRaw, parseApplyFeesToUserInstruction, parseChangeBundleMasterAdminInstruction, parseChangeManagerInstruction, parseClearUserFeeOverrideInstruction, parseClearUserWithdrawalTimingOverrideInstruction, parseCloseUserBundleAccountInstruction, parseDistributeToReceiversInstruction, parseEnableStrategyInstruction, parseEndDistributionInstruction, parseInitializeBundleDepositorInstruction, parseInitializeBundleInstruction, parseInitializeBundleMasterAccountInstruction, parseInitializePermissionedBundleDepositorInstruction, parseManagerWithdrawInstruction, parseManagerWithdrawWithSplitInstruction, parseNetPendingTransactionsInstruction, parseNtbundleInstruction, parsePauseDepositsWithdrawalsInstruction, parsePerformRefillInstruction, parseProcessDepositInstruction, parseProcessReferrerWithdrawalInstruction, parseProcessSwitchInstruction, parseProcessWithdrawalInstruction, parseReferrerRequestWithdrawInstruction, parseRefundDepositInstruction, parseRegisterReferrerInstruction, parseRemoveStrategyInstruction, parseRequestBundleSwitchInstruction, parseRequestDepositInstruction, parseRequestWithdrawalInstruction, parseSetBundleCreatorInstruction, parseSetDelaysInstruction, parseSetFeesInstruction, parseSetKeeperInstruction, parseSetMaxDepositAmountInstruction, parseSetMinDepositAmountInstruction, parseSetOracleBufferInstruction, parseSetOracleMaxAgeInstruction, parseSetOracleUpdateTimeLimitInstruction, parseSetReferrerActiveInstruction, parseSetReferrerConfigInstruction, parseSetReferrerRateOverrideInstruction, parseSetUserFeeOverrideInstruction, parseSetUserReferrerInstruction, parseSetUserWithdrawalTimingOverrideInstruction, parseSetWithdrawalRedemptionScheduleInstruction, parseStartDistributionInstruction, parseUpdateAllocationsInstruction, parseUpdateOracleInstruction, resolveEffectiveFees, sharePriceRaw, toVaultConfig, toVaultRegistry, tokens, totalEquityRaw, vaults, vaultsDevnet };
|
|
1927
|
+
//#region src/extensions/referrals.ts
|
|
1928
|
+
/**
|
|
1929
|
+
* Builders preflight durable account state that would deterministically fail
|
|
1930
|
+
* or silently no-op. Transient keeper-cycle state, including pause windows and
|
|
1931
|
+
* oracle freshness, remains authoritative onchain because it can race a build.
|
|
1932
|
+
*/
|
|
1933
|
+
const DEFAULT_PUBLIC_KEY = "11111111111111111111111111111111";
|
|
1934
|
+
/**
|
|
1935
|
+
* Converts the signed aggregate from one `ReferrerAccount` read into exact
|
|
1936
|
+
* basis-point progress between two product-supplied tier thresholds.
|
|
1937
|
+
*/
|
|
1938
|
+
function calculateReferrerTierProgress(args) {
|
|
1939
|
+
if (args.currentTierMinimum < 0n || args.nextTierMinimum <= args.currentTierMinimum) throw new Error("INVALID_REFERRER_TIER_THRESHOLDS");
|
|
1940
|
+
const progressFloor = args.referredNetDeposits > args.currentTierMinimum ? args.referredNetDeposits : args.currentTierMinimum;
|
|
1941
|
+
const progressCeiling = progressFloor < args.nextTierMinimum ? progressFloor : args.nextTierMinimum;
|
|
1942
|
+
const tierSpan = args.nextTierMinimum - args.currentTierMinimum;
|
|
1943
|
+
const progressBps = Number((progressCeiling - args.currentTierMinimum) * BPS_DENOMINATOR / tierSpan);
|
|
1944
|
+
const remainingNetDeposits = args.referredNetDeposits >= args.nextTierMinimum ? 0n : args.nextTierMinimum - args.referredNetDeposits;
|
|
1945
|
+
return {
|
|
1946
|
+
...args,
|
|
1947
|
+
remainingNetDeposits,
|
|
1948
|
+
progressBps,
|
|
1949
|
+
isComplete: remainingNetDeposits === 0n
|
|
1950
|
+
};
|
|
1951
|
+
}
|
|
1952
|
+
/** Resolves current/next tier display state directly from one bundle read. */
|
|
1953
|
+
function calculateReferrerTierScheduleProgress(args) {
|
|
1954
|
+
if (!Number.isInteger(args.tierCount) || args.tierCount < 0 || args.tierCount > MAX_REFERRAL_TIERS || args.tierCount > args.referralTiers.length) throw new Error("INVALID_REFERRAL_TIER_SCHEDULE");
|
|
1955
|
+
const referralTiers = args.referralTiers.slice(0, args.tierCount);
|
|
1956
|
+
for (let tierIndex = 0; tierIndex < referralTiers.length; tierIndex += 1) {
|
|
1957
|
+
const referralTier = referralTiers[tierIndex];
|
|
1958
|
+
const previousTier = referralTiers[tierIndex - 1];
|
|
1959
|
+
if (referralTier === void 0 || referralTier.threshold < 0n || previousTier !== void 0 && referralTier.threshold <= previousTier.threshold) throw new Error("INVALID_REFERRAL_TIER_SCHEDULE");
|
|
1960
|
+
}
|
|
1961
|
+
let currentTierIndex;
|
|
1962
|
+
for (let tierIndex = 0; tierIndex < referralTiers.length; tierIndex += 1) {
|
|
1963
|
+
const referralTier = referralTiers[tierIndex];
|
|
1964
|
+
if (referralTier === void 0 || args.referredNetDeposits < referralTier.threshold) break;
|
|
1965
|
+
currentTierIndex = tierIndex;
|
|
1966
|
+
}
|
|
1967
|
+
const nextTierIndex = currentTierIndex === void 0 ? referralTiers.length > 0 ? 0 : void 0 : currentTierIndex + 1 < referralTiers.length ? currentTierIndex + 1 : void 0;
|
|
1968
|
+
const currentTier = currentTierIndex === void 0 ? void 0 : referralTiers[currentTierIndex];
|
|
1969
|
+
const nextTier = nextTierIndex === void 0 ? void 0 : referralTiers[nextTierIndex];
|
|
1970
|
+
if (nextTier === void 0) return {
|
|
1971
|
+
referredNetDeposits: args.referredNetDeposits,
|
|
1972
|
+
currentTierIndex,
|
|
1973
|
+
currentTier,
|
|
1974
|
+
nextTierIndex,
|
|
1975
|
+
nextTier,
|
|
1976
|
+
remainingNetDeposits: 0n,
|
|
1977
|
+
progressBps: currentTier === void 0 ? 0 : Number(BPS_DENOMINATOR),
|
|
1978
|
+
isHighestTier: currentTier !== void 0
|
|
1979
|
+
};
|
|
1980
|
+
const remainingNetDeposits = args.referredNetDeposits >= nextTier.threshold ? 0n : nextTier.threshold - args.referredNetDeposits;
|
|
1981
|
+
let progressBps = 0;
|
|
1982
|
+
const currentThreshold = currentTier?.threshold ?? 0n;
|
|
1983
|
+
const tierSpan = nextTier.threshold - currentThreshold;
|
|
1984
|
+
if (tierSpan > 0n && args.referredNetDeposits > currentThreshold) {
|
|
1985
|
+
const progress = args.referredNetDeposits - currentThreshold;
|
|
1986
|
+
progressBps = Number((progress < tierSpan ? progress : tierSpan) * BPS_DENOMINATOR / tierSpan);
|
|
1987
|
+
}
|
|
1988
|
+
return {
|
|
1989
|
+
referredNetDeposits: args.referredNetDeposits,
|
|
1990
|
+
currentTierIndex,
|
|
1991
|
+
currentTier,
|
|
1992
|
+
nextTierIndex,
|
|
1993
|
+
nextTier,
|
|
1994
|
+
remainingNetDeposits,
|
|
1995
|
+
progressBps,
|
|
1996
|
+
isHighestTier: false
|
|
1997
|
+
};
|
|
1998
|
+
}
|
|
1999
|
+
var BuilderDepositAmountTooLowError = class extends Error {
|
|
2000
|
+
requiredGrossDepositAmount;
|
|
2001
|
+
constructor(requiredGrossDepositAmount) {
|
|
2002
|
+
super("BUILDER_DEPOSIT_AMOUNT_TOO_LOW");
|
|
2003
|
+
this.name = "BuilderDepositAmountTooLowError";
|
|
2004
|
+
this.requiredGrossDepositAmount = requiredGrossDepositAmount;
|
|
2005
|
+
}
|
|
2006
|
+
};
|
|
2007
|
+
function resolveBundleVault(vault, programAddressOverride) {
|
|
2008
|
+
if (typeof vault === "string") return {
|
|
2009
|
+
bundleAccount: address(vault),
|
|
2010
|
+
programAddress: programAddressOverride ?? NTBUNDLE_PROGRAM_ADDRESS
|
|
2011
|
+
};
|
|
2012
|
+
if (vault.type !== void 0 && vault.type !== "Bundle") throw new Error("UNSUPPORTED_VAULT_TYPE");
|
|
2013
|
+
return {
|
|
2014
|
+
bundleAccount: address(vault.vaultAddress),
|
|
2015
|
+
programAddress: programAddressOverride ?? (vault.bundleProgramId ? address(vault.bundleProgramId) : NTBUNDLE_PROGRAM_ADDRESS)
|
|
2016
|
+
};
|
|
2017
|
+
}
|
|
2018
|
+
async function resolveReferrer(params) {
|
|
2019
|
+
if (params.referrer !== void 0) return params.referrer;
|
|
2020
|
+
const code = params.code.trim();
|
|
2021
|
+
if (code.length === 0) throw new Error("INVALID_REFERRER_CODE");
|
|
2022
|
+
return await params.resolveCode(code);
|
|
2023
|
+
}
|
|
2024
|
+
async function resolveReferrerState(rpc, params) {
|
|
2025
|
+
const [[referrerAccountAddress], [referrerUserBundleAccountAddress]] = await Promise.all([findReferrerAccountPda({
|
|
2026
|
+
bundleAccount: params.bundleAccount,
|
|
2027
|
+
referrer: params.referrer
|
|
2028
|
+
}, { programAddress: params.programAddress }), findUserBundleAccountPda({
|
|
2029
|
+
userBundleAccountOwner: params.referrer,
|
|
2030
|
+
bundleAccount: params.bundleAccount
|
|
2031
|
+
}, { programAddress: params.programAddress })]);
|
|
2032
|
+
const [referrerAccount, referrerUserBundleAccount] = await Promise.all([fetchMaybeReferrerAccount(rpc, referrerAccountAddress), fetchMaybeUserBundleAccount(rpc, referrerUserBundleAccountAddress)]);
|
|
2033
|
+
return {
|
|
2034
|
+
referrerAccountAddress,
|
|
2035
|
+
referrerUserBundleAccountAddress,
|
|
2036
|
+
referrerAccount,
|
|
2037
|
+
referrerUserBundleAccount
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2040
|
+
function assertValidReferrer(bundle, referrer) {
|
|
2041
|
+
if (!bundle.referrerEnabled) throw new Error("REFERRALS_DISABLED");
|
|
2042
|
+
if (referrer === DEFAULT_PUBLIC_KEY || referrer === bundle.manager) throw new Error("INVALID_REFERRER");
|
|
2043
|
+
}
|
|
2044
|
+
function assertVirginUserBundleAccount(userBundle) {
|
|
2045
|
+
if (userBundle.referrer !== DEFAULT_PUBLIC_KEY) throw new Error("REFERRAL_ALREADY_SET");
|
|
2046
|
+
if (userBundle.shares !== 0n || userBundle.pendingDeposit !== 0n || userBundle.pendingShares !== 0n || userBundle.estimatedPendingWithdrawalValue !== 0n || userBundle.netDeposits !== 0n || userBundle.totalFeeCharged !== 0n || userBundle.lastDepositTimestamp !== 0n) throw new Error("USER_BUNDLE_ACCOUNT_HAS_ACTIVITY");
|
|
2047
|
+
}
|
|
2048
|
+
function assertEligibleReferrerForAttribution(args) {
|
|
2049
|
+
if (!args.referrerAccount) throw new Error("REFERRER_NOT_REGISTERED");
|
|
2050
|
+
if (!args.referrerAccount.active) throw new Error("REFERRER_DEACTIVATED");
|
|
2051
|
+
if (!args.referrerUserBundle || args.referrerUserBundle.netDeposits < args.bundle.referrerMinDepositAmount) throw new Error("REFERRER_DEPOSIT_TOO_LOW");
|
|
2052
|
+
}
|
|
2053
|
+
function calculateNetDepositAmount(grossDepositAmount, depositFeeBps) {
|
|
2054
|
+
return grossDepositAmount - (grossDepositAmount * BigInt(depositFeeBps) + BPS_DENOMINATOR - 1n) / BPS_DENOMINATOR;
|
|
2055
|
+
}
|
|
2056
|
+
function getEffectiveDepositFeeBps(bundle, userBundle) {
|
|
2057
|
+
if (userBundle && (userBundle.feeOverrideFlags & FEE_OVERRIDE_DEPOSIT) !== 0) return userBundle.customDepositFeeBps;
|
|
2058
|
+
return bundle.depositFee;
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* Derives `ReferrerAccount` from the referrer stored for a user. Builders,
|
|
2062
|
+
* keepers, and apps can use this path instead of reproducing PDA seeds.
|
|
2063
|
+
*/
|
|
2064
|
+
async function deriveReferrerAccountForUser(params) {
|
|
2065
|
+
const resolvedVault = resolveBundleVault(params.vault, params.programAddress);
|
|
2066
|
+
return await findReferrerAccountPda({
|
|
2067
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2068
|
+
referrer: params.referrer
|
|
2069
|
+
}, { programAddress: resolvedVault.programAddress });
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* Reads raw referrer state and the two eligibility verdicts used by partner
|
|
2073
|
+
* onboarding surfaces. Missing referrer accounts are represented in the
|
|
2074
|
+
* result; only a missing bundle is an error.
|
|
2075
|
+
*/
|
|
2076
|
+
async function fetchReferrerStatus(rpc, params) {
|
|
2077
|
+
const resolvedVault = resolveBundleVault(params.vault, params.programAddress);
|
|
2078
|
+
const [bundle, referrerState] = await Promise.all([fetchMaybeBundle(rpc, resolvedVault.bundleAccount), resolveReferrerState(rpc, {
|
|
2079
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2080
|
+
referrer: params.referrer,
|
|
2081
|
+
programAddress: resolvedVault.programAddress
|
|
2082
|
+
})]);
|
|
2083
|
+
if (!bundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
|
|
2084
|
+
const referrerAccount = referrerState.referrerAccount.exists ? referrerState.referrerAccount.data : void 0;
|
|
2085
|
+
const referrerUserBundleAccount = referrerState.referrerUserBundleAccount.exists ? referrerState.referrerUserBundleAccount.data : void 0;
|
|
2086
|
+
const rates = resolveEffectiveReferralRates(bundle.data, referrerAccount);
|
|
2087
|
+
const registered = referrerAccount !== void 0;
|
|
2088
|
+
const active = referrerAccount?.active ?? false;
|
|
2089
|
+
const netDeposits = referrerUserBundleAccount?.netDeposits ?? 0n;
|
|
2090
|
+
const pendingDeposit = referrerUserBundleAccount?.pendingDeposit ?? 0n;
|
|
2091
|
+
const hasUserBundleAccount = referrerUserBundleAccount !== void 0;
|
|
2092
|
+
const meetsMinDeposit = netDeposits >= bundle.data.referrerMinDepositAmount;
|
|
2093
|
+
const meetsMinDepositAfterNetting = netDeposits + pendingDeposit >= bundle.data.referrerMinDepositAmount;
|
|
2094
|
+
return {
|
|
2095
|
+
registered,
|
|
2096
|
+
active,
|
|
2097
|
+
hasUserBundleAccount,
|
|
2098
|
+
netDeposits,
|
|
2099
|
+
pendingDeposit,
|
|
2100
|
+
referralsEnabled: bundle.data.referrerEnabled,
|
|
2101
|
+
referrerMinDepositAmount: bundle.data.referrerMinDepositAmount,
|
|
2102
|
+
effectiveReferralPfeeBps: rates.referralPfeeBps,
|
|
2103
|
+
effectiveReferralMfeeBps: rates.referralMfeeBps,
|
|
2104
|
+
effectiveReferralTierIndex: rates.referralTierIndex,
|
|
2105
|
+
accruedPfeeShares: referrerAccount?.accruedPfeeShares ?? 0n,
|
|
2106
|
+
accruedMfeeShares: referrerAccount?.accruedMfeeShares ?? 0n,
|
|
2107
|
+
referredNetDeposits: referrerAccount?.referredNetDeposits ?? 0n,
|
|
2108
|
+
pendingWithdrawShares: referrerAccount?.pendingWithdrawShares ?? 0n,
|
|
2109
|
+
estimatedPendingWithdrawalValue: referrerAccount?.estimatedPendingWithdrawalValue ?? 0n,
|
|
2110
|
+
withdrawalAvailableTimestamp: referrerAccount?.withdrawalAvailableTimestamp ?? 0n,
|
|
2111
|
+
meetsMinDeposit,
|
|
2112
|
+
meetsMinDepositAfterNetting,
|
|
2113
|
+
canBindNewUsers: registered && active && bundle.data.referrerEnabled && hasUserBundleAccount && meetsMinDeposit,
|
|
2114
|
+
needsReactivation: registered && !active
|
|
2115
|
+
};
|
|
2116
|
+
}
|
|
2117
|
+
/**
|
|
2118
|
+
* Builds the only valid first-deposit ordering: initialize (when needed),
|
|
2119
|
+
* bind the referrer, then request the deposit. Fee settlement uses the
|
|
2120
|
+
* referrer's live effective rates, including later tier-schedule and override
|
|
2121
|
+
* changes that raise, lower, or zero either component.
|
|
2122
|
+
*
|
|
2123
|
+
* The returned instructions belong in one transaction. A user account with
|
|
2124
|
+
* any prior activity cannot be attributed under the current program rules.
|
|
2125
|
+
* The builder also fetches the referrer's registration and depositor accounts
|
|
2126
|
+
* to verify active status and the net-deposit threshold.
|
|
2127
|
+
* Deterministic eligibility failures use stable error messages; deposits below
|
|
2128
|
+
* the vault minimum throw `BuilderDepositAmountTooLowError`.
|
|
2129
|
+
*/
|
|
2130
|
+
async function buildAttributedDepositTx(rpc, params) {
|
|
2131
|
+
assertValidAmountRaw(params.amount);
|
|
2132
|
+
const resolvedVault = resolveBundleVault(params.vault, params.programAddress);
|
|
2133
|
+
const [referrer, depositContext] = await Promise.all([resolveReferrer(params), buildDepositInstructionContext(rpc, {
|
|
2134
|
+
user: params.user,
|
|
2135
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2136
|
+
amountRaw: params.amount,
|
|
2137
|
+
userTokenAccount: params.userTokenAccount,
|
|
2138
|
+
programAddress: resolvedVault.programAddress
|
|
2139
|
+
})]);
|
|
2140
|
+
if (params.amount < depositContext.bundle.minDepositAmount) throw new BuilderDepositAmountTooLowError(depositContext.bundle.minDepositAmount);
|
|
2141
|
+
assertValidReferrer(depositContext.bundle, referrer);
|
|
2142
|
+
if (referrer === params.user.address) throw new Error("INVALID_REFERRER");
|
|
2143
|
+
if (depositContext.userBundle) assertVirginUserBundleAccount(depositContext.userBundle);
|
|
2144
|
+
const referrerState = await resolveReferrerState(rpc, {
|
|
2145
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2146
|
+
referrer,
|
|
2147
|
+
programAddress: resolvedVault.programAddress
|
|
2148
|
+
});
|
|
2149
|
+
assertEligibleReferrerForAttribution({
|
|
2150
|
+
bundle: depositContext.bundle,
|
|
2151
|
+
referrerAccount: referrerState.referrerAccount.exists ? referrerState.referrerAccount.data : void 0,
|
|
2152
|
+
referrerUserBundle: referrerState.referrerUserBundleAccount.exists ? referrerState.referrerUserBundleAccount.data : void 0
|
|
2153
|
+
});
|
|
2154
|
+
const setUserReferrerInstruction = await getSetUserReferrerInstructionAsync({
|
|
2155
|
+
user: params.user,
|
|
2156
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2157
|
+
userBundleAccount: depositContext.userBundleAccount,
|
|
2158
|
+
referrerAccount: referrerState.referrerAccountAddress,
|
|
2159
|
+
referrerUserBundleAccount: referrerState.referrerUserBundleAccountAddress
|
|
2160
|
+
}, { programAddress: resolvedVault.programAddress });
|
|
2161
|
+
const instructions = [];
|
|
2162
|
+
if (depositContext.initializeInstruction) instructions.push(depositContext.initializeInstruction);
|
|
2163
|
+
instructions.push(setUserReferrerInstruction, depositContext.requestInstruction);
|
|
2164
|
+
return instructions;
|
|
2165
|
+
}
|
|
2166
|
+
/**
|
|
2167
|
+
* Builds referrer registration as one transaction when current net deposits
|
|
2168
|
+
* already meet the vault requirement. Otherwise it returns a deposit step and
|
|
2169
|
+
* a registration step that must be submitted after keeper netting processes
|
|
2170
|
+
* the deposit. A caller-specified `depositAmount` is never increased silently.
|
|
2171
|
+
*
|
|
2172
|
+
* A zero `referrerMinDepositAmount` is the capital-light configuration: a new
|
|
2173
|
+
* partner can initialize and register atomically without depositing. With a
|
|
2174
|
+
* nonzero minimum, `netDeposits` changes only during keeper processing, so an
|
|
2175
|
+
* unqualified partner cannot deposit and register in the same transaction.
|
|
2176
|
+
* The generated gross amount covers both the effective deposit fee and the
|
|
2177
|
+
* vault's ordinary minimum deposit amount. `depositInstructions` is empty when
|
|
2178
|
+
* an existing pending net deposit already covers the referral minimum. An
|
|
2179
|
+
* existing inactive registration throws `REFERRER_DEACTIVATED` because the
|
|
2180
|
+
* registration instruction handler does not reactivate it.
|
|
2181
|
+
*/
|
|
2182
|
+
async function buildBuilderRegistrationTx(rpc, params) {
|
|
2183
|
+
if (params.depositAmount !== void 0) assertValidAmountRaw(params.depositAmount);
|
|
2184
|
+
const resolvedVault = resolveBundleVault(params.vault, params.programAddress);
|
|
2185
|
+
const [bundle, referrerState] = await Promise.all([fetchMaybeBundle(rpc, resolvedVault.bundleAccount), resolveReferrerState(rpc, {
|
|
2186
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2187
|
+
referrer: params.referrer.address,
|
|
2188
|
+
programAddress: resolvedVault.programAddress
|
|
2189
|
+
})]);
|
|
2190
|
+
if (!bundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
|
|
2191
|
+
assertValidReferrer(bundle.data, params.referrer.address);
|
|
2192
|
+
if (referrerState.referrerAccount.exists && !referrerState.referrerAccount.data.active) throw new Error("REFERRER_DEACTIVATED");
|
|
2193
|
+
const userBundle = referrerState.referrerUserBundleAccount.exists ? referrerState.referrerUserBundleAccount.data : void 0;
|
|
2194
|
+
const currentNetDeposits = userBundle?.netDeposits ?? 0n;
|
|
2195
|
+
const referrerMinDepositAmount = bundle.data.referrerMinDepositAmount;
|
|
2196
|
+
const registrationInstruction = await getRegisterReferrerInstructionAsync({
|
|
2197
|
+
referrer: params.referrer,
|
|
2198
|
+
referrerAccount: referrerState.referrerAccountAddress,
|
|
2199
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2200
|
+
referrerUserBundleAccount: referrerState.referrerUserBundleAccountAddress
|
|
2201
|
+
}, { programAddress: resolvedVault.programAddress });
|
|
2202
|
+
if (currentNetDeposits >= referrerMinDepositAmount) {
|
|
2203
|
+
if (params.depositAmount !== void 0 && params.depositAmount < bundle.data.minDepositAmount) throw new BuilderDepositAmountTooLowError(bundle.data.minDepositAmount);
|
|
2204
|
+
const instructions = [];
|
|
2205
|
+
if (params.depositAmount !== void 0) {
|
|
2206
|
+
const depositContext = await buildDepositInstructionContext(rpc, {
|
|
2207
|
+
user: params.referrer,
|
|
2208
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2209
|
+
amountRaw: params.depositAmount,
|
|
2210
|
+
userTokenAccount: params.userTokenAccount,
|
|
2211
|
+
programAddress: resolvedVault.programAddress
|
|
2212
|
+
});
|
|
2213
|
+
if (depositContext.initializeInstruction) instructions.push(depositContext.initializeInstruction);
|
|
2214
|
+
instructions.push(depositContext.requestInstruction);
|
|
2215
|
+
} else if (!userBundle) instructions.push(await getInitializeBundleDepositorInstructionAsync({
|
|
2216
|
+
payer: params.referrer,
|
|
2217
|
+
authority: params.referrer,
|
|
2218
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2219
|
+
userBundleAccount: referrerState.referrerUserBundleAccountAddress
|
|
2220
|
+
}, { programAddress: resolvedVault.programAddress }));
|
|
2221
|
+
instructions.push(registrationInstruction);
|
|
2222
|
+
return {
|
|
2223
|
+
kind: "single-transaction",
|
|
2224
|
+
instructions
|
|
2225
|
+
};
|
|
2226
|
+
}
|
|
2227
|
+
const pendingNetDeposit = userBundle?.pendingDeposit ?? 0n;
|
|
2228
|
+
const remainingNetDeposit = currentNetDeposits + pendingNetDeposit >= referrerMinDepositAmount ? 0n : referrerMinDepositAmount - currentNetDeposits - pendingNetDeposit;
|
|
2229
|
+
const effectiveDepositFeeBps = getEffectiveDepositFeeBps(bundle.data, userBundle);
|
|
2230
|
+
const grossAmountForReferralMinimum = calculateGrossDepositAmount({
|
|
2231
|
+
minimumNetAmount: remainingNetDeposit,
|
|
2232
|
+
depositFeeBps: effectiveDepositFeeBps
|
|
2233
|
+
});
|
|
2234
|
+
const requiredGrossDepositAmount = grossAmountForReferralMinimum === 0n && params.depositAmount === void 0 ? 0n : grossAmountForReferralMinimum > bundle.data.minDepositAmount ? grossAmountForReferralMinimum : bundle.data.minDepositAmount;
|
|
2235
|
+
if (params.depositAmount !== void 0 && params.depositAmount < requiredGrossDepositAmount) throw new BuilderDepositAmountTooLowError(requiredGrossDepositAmount);
|
|
2236
|
+
const grossDepositAmount = params.depositAmount ?? requiredGrossDepositAmount;
|
|
2237
|
+
const depositInstructions = [];
|
|
2238
|
+
if (grossDepositAmount > 0n) {
|
|
2239
|
+
const depositContext = await buildDepositInstructionContext(rpc, {
|
|
2240
|
+
user: params.referrer,
|
|
2241
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2242
|
+
amountRaw: grossDepositAmount,
|
|
2243
|
+
userTokenAccount: params.userTokenAccount,
|
|
2244
|
+
programAddress: resolvedVault.programAddress
|
|
2245
|
+
});
|
|
2246
|
+
if (depositContext.initializeInstruction) depositInstructions.push(depositContext.initializeInstruction);
|
|
2247
|
+
depositInstructions.push(depositContext.requestInstruction);
|
|
2248
|
+
if (currentNetDeposits + pendingNetDeposit + calculateNetDepositAmount(grossDepositAmount, effectiveDepositFeeBps) < referrerMinDepositAmount) throw new BuilderDepositAmountTooLowError(requiredGrossDepositAmount);
|
|
2249
|
+
}
|
|
2250
|
+
return {
|
|
2251
|
+
kind: "netting-required",
|
|
2252
|
+
depositInstructions,
|
|
2253
|
+
registrationInstructions: [registrationInstruction],
|
|
2254
|
+
grossDepositAmount,
|
|
2255
|
+
requiredGrossDepositAmount,
|
|
2256
|
+
referrerMinDepositAmount
|
|
2257
|
+
};
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Builds the partner-signed request that moves all accrued referral shares
|
|
2261
|
+
* into the keeper settlement queue. Deactivation does not remove claim rights.
|
|
2262
|
+
* Pause windows and oracle freshness remain transaction-time checks.
|
|
2263
|
+
*/
|
|
2264
|
+
async function buildReferrerWithdrawRequestTx(rpc, params) {
|
|
2265
|
+
const resolvedVault = resolveBundleVault(params.vault, params.programAddress);
|
|
2266
|
+
const [[referrerAccountAddress], [oracleDataAddress], [bundleTempDataAddress]] = await Promise.all([
|
|
2267
|
+
findReferrerAccountPda({
|
|
2268
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2269
|
+
referrer: params.referrer.address
|
|
2270
|
+
}, { programAddress: resolvedVault.programAddress }),
|
|
2271
|
+
findOracleDataPda({ bundleAccount: resolvedVault.bundleAccount }, { programAddress: resolvedVault.programAddress }),
|
|
2272
|
+
findBundleTempDataPda({ bundleAccount: resolvedVault.bundleAccount }, { programAddress: resolvedVault.programAddress })
|
|
2273
|
+
]);
|
|
2274
|
+
const [bundle, referrerAccount, oracleData] = await Promise.all([
|
|
2275
|
+
fetchMaybeBundle(rpc, resolvedVault.bundleAccount),
|
|
2276
|
+
fetchMaybeReferrerAccount(rpc, referrerAccountAddress),
|
|
2277
|
+
fetchMaybeOracleData(rpc, oracleDataAddress)
|
|
2278
|
+
]);
|
|
2279
|
+
if (!bundle.exists) throw new Error("BUNDLE_ACCOUNT_NOT_FOUND");
|
|
2280
|
+
if (!referrerAccount.exists) throw new Error("REFERRER_NOT_REGISTERED");
|
|
2281
|
+
if (referrerAccount.data.bundle !== resolvedVault.bundleAccount) throw new Error("REFERRER_ACCOUNT_MISMATCH");
|
|
2282
|
+
if (referrerAccount.data.estimatedPendingWithdrawalValue !== 0n) throw new Error("WITHDRAWAL_ALREADY_PENDING");
|
|
2283
|
+
const sharesToWithdraw = referrerAccount.data.accruedPfeeShares + referrerAccount.data.accruedMfeeShares;
|
|
2284
|
+
if (sharesToWithdraw === 0n) throw new Error("NO_ACCRUED_REFERRAL_SHARES");
|
|
2285
|
+
if (bundle.data.totalShares === 0n) throw new Error("WITHDRAWAL_VALUE_TOO_SMALL");
|
|
2286
|
+
if (!oracleData.exists) throw new Error("ORACLE_DATA_NOT_FOUND");
|
|
2287
|
+
const estimatedWithdrawalValueRaw = calculateAssetsFromShares({
|
|
2288
|
+
shares: sharesToWithdraw,
|
|
2289
|
+
totalAssets: totalEquityRaw({
|
|
2290
|
+
bundleUnderlyingBalance: bundle.data.bundleUnderlyingBalance,
|
|
2291
|
+
averageExternalEquity: oracleData.data.averageExternalEquity
|
|
2292
|
+
}),
|
|
2293
|
+
totalShares: bundle.data.totalShares
|
|
2294
|
+
});
|
|
2295
|
+
if (estimatedWithdrawalValueRaw === 0n) throw new Error("WITHDRAWAL_VALUE_TOO_SMALL");
|
|
2296
|
+
let estimatedAvailableTimestamp;
|
|
2297
|
+
if (params.nowUnixSeconds !== void 0) {
|
|
2298
|
+
const cooldownSeconds = estimateWithdrawalCooldownSeconds({
|
|
2299
|
+
sharesAmount: sharesToWithdraw,
|
|
2300
|
+
totalShares: bundle.data.totalShares,
|
|
2301
|
+
withdrawalTMin: bundle.data.withdrawalTMin,
|
|
2302
|
+
withdrawalTMax: bundle.data.withdrawalTMax,
|
|
2303
|
+
withdrawalCurve: bundle.data.withdrawalCurve
|
|
2304
|
+
});
|
|
2305
|
+
estimatedAvailableTimestamp = estimateWithdrawalAvailableTimestamp({
|
|
2306
|
+
nowUnixSeconds: BigInt(params.nowUnixSeconds),
|
|
2307
|
+
cooldownSeconds,
|
|
2308
|
+
withdrawalRedemptionRequestCutoffTs: bundle.data.withdrawalRedemptionRequestCutoffTs,
|
|
2309
|
+
withdrawalRedemptionUnlockCurrentCycleTs: bundle.data.withdrawalRedemptionUnlockCurrentCycleTs,
|
|
2310
|
+
withdrawalRedemptionUnlockNextCycleTs: bundle.data.withdrawalRedemptionUnlockNextCycleTs
|
|
2311
|
+
});
|
|
2312
|
+
}
|
|
2313
|
+
return {
|
|
2314
|
+
instructions: [await getReferrerRequestWithdrawInstructionAsync({
|
|
2315
|
+
referrer: params.referrer,
|
|
2316
|
+
bundleAccount: resolvedVault.bundleAccount,
|
|
2317
|
+
oracleData: oracleDataAddress,
|
|
2318
|
+
bundleTempData: bundleTempDataAddress,
|
|
2319
|
+
referrerAccount: referrerAccountAddress
|
|
2320
|
+
}, { programAddress: resolvedVault.programAddress })],
|
|
2321
|
+
sharesToWithdraw,
|
|
2322
|
+
estimatedWithdrawalValueRaw,
|
|
2323
|
+
estimatedAvailableTimestamp
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
//#endregion
|
|
2328
|
+
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, BuilderDepositAmountTooLowError, 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, MAX_DEPOSIT_FEE_BPS, MAX_REFERRAL_TIERS, 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_REFERRAL_TIER_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, REFERRAL_OVERRIDE_MFEE, REFERRAL_OVERRIDE_PFEE, 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_REFERRAL_TIER_CONFIG_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, buildAttributedDepositTx, buildBuilderRegistrationTx, buildDepositInstructions, buildReferrerWithdrawRequestTx, buildRequestSwitchInstructions, buildRequestWithdrawInstruction, calculateAssetsFromShares, calculateGrossDepositAmount, calculateOnChainPps, calculateReferrerTierProgress, calculateReferrerTierScheduleProgress, computeUserBundleBalance, computeWithdrawalShares, decodeBundle, decodeBundleCreatorAccount, decodeBundleMasterAccount, decodeBundleTempData, decodeOracleData, decodeReferrerAccount, decodeStrategy, decodeUserBundleAccount, deriveReferrerAccountForUser, estimatePendingUserFees, estimateWithdrawalAvailableTimestamp, estimateWithdrawalCooldownSeconds, 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, fetchReferrerStatus, 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, getReferralTierCodec, getReferralTierDecoder, getReferralTierEncoder, 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, getSetReferralTierConfigDiscriminatorBytes, getSetReferralTierConfigInstruction, getSetReferralTierConfigInstructionDataCodec, getSetReferralTierConfigInstructionDataDecoder, getSetReferralTierConfigInstructionDataEncoder, 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, parseSetReferralTierConfigInstruction, parseSetReferrerActiveInstruction, parseSetReferrerConfigInstruction, parseSetReferrerRateOverrideInstruction, parseSetUserFeeOverrideInstruction, parseSetUserReferrerInstruction, parseSetUserWithdrawalTimingOverrideInstruction, parseSetWithdrawalRedemptionScheduleInstruction, parseStartDistributionInstruction, parseUpdateAllocationsInstruction, parseUpdateOracleInstruction, resolveBundleReferralRates, resolveEffectiveFees, resolveEffectiveReferralRates, sharePriceRaw, toVaultConfig, toVaultRegistry, tokens, totalEquityRaw, vaults, vaultsDevnet };
|