@haven-fi/solauto-sdk 1.0.176 → 1.0.177
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/constants/generalAccounts.d.ts.map +1 -1
- package/dist/constants/generalAccounts.js +0 -1
- package/dist/constants/solautoConstants.d.ts +0 -1
- package/dist/constants/solautoConstants.d.ts.map +1 -1
- package/dist/constants/solautoConstants.js +3 -3
- package/dist/generated/errors/solauto.d.ts +8 -26
- package/dist/generated/errors/solauto.d.ts.map +1 -1
- package/dist/generated/errors/solauto.js +26 -59
- package/dist/jupiter-sdk/accounts/index.d.ts +9 -0
- package/dist/jupiter-sdk/accounts/index.d.ts.map +1 -0
- package/dist/jupiter-sdk/accounts/index.js +24 -0
- package/dist/jupiter-sdk/accounts/tokenLedger.d.ts +32 -0
- package/dist/jupiter-sdk/accounts/tokenLedger.d.ts.map +1 -0
- package/dist/jupiter-sdk/accounts/tokenLedger.js +68 -0
- package/dist/jupiter-sdk/errors/index.d.ts +9 -0
- package/dist/jupiter-sdk/errors/index.d.ts.map +1 -0
- package/dist/jupiter-sdk/errors/index.js +24 -0
- package/dist/jupiter-sdk/errors/jupiter.d.ts +127 -0
- package/dist/jupiter-sdk/errors/jupiter.d.ts.map +1 -0
- package/dist/jupiter-sdk/errors/jupiter.js +229 -0
- package/dist/jupiter-sdk/index.d.ts +14 -0
- package/dist/jupiter-sdk/index.d.ts.map +1 -0
- package/dist/jupiter-sdk/index.js +29 -0
- package/dist/jupiter-sdk/instructions/aldrinSwap.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/aldrinSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/aldrinSwap.js +95 -0
- package/dist/jupiter-sdk/instructions/aldrinV2Swap.d.ts +30 -0
- package/dist/jupiter-sdk/instructions/aldrinV2Swap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/aldrinV2Swap.js +100 -0
- package/dist/jupiter-sdk/instructions/balansolSwap.d.ts +34 -0
- package/dist/jupiter-sdk/instructions/balansolSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/balansolSwap.js +130 -0
- package/dist/jupiter-sdk/instructions/claim.d.ts +25 -0
- package/dist/jupiter-sdk/instructions/claim.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/claim.js +64 -0
- package/dist/jupiter-sdk/instructions/claimToken.d.ts +31 -0
- package/dist/jupiter-sdk/instructions/claimToken.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/claimToken.js +93 -0
- package/dist/jupiter-sdk/instructions/cloneSwap.d.ts +34 -0
- package/dist/jupiter-sdk/instructions/cloneSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/cloneSwap.js +120 -0
- package/dist/jupiter-sdk/instructions/createOpenOrders.d.ts +24 -0
- package/dist/jupiter-sdk/instructions/createOpenOrders.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/createOpenOrders.js +76 -0
- package/dist/jupiter-sdk/instructions/createProgramOpenOrders.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/createProgramOpenOrders.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/createProgramOpenOrders.js +86 -0
- package/dist/jupiter-sdk/instructions/createTokenAccount.d.ts +27 -0
- package/dist/jupiter-sdk/instructions/createTokenAccount.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/createTokenAccount.js +70 -0
- package/dist/jupiter-sdk/instructions/createTokenLedger.d.ts +21 -0
- package/dist/jupiter-sdk/instructions/createTokenLedger.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/createTokenLedger.js +62 -0
- package/dist/jupiter-sdk/instructions/cremaSwap.d.ts +33 -0
- package/dist/jupiter-sdk/instructions/cremaSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/cremaSwap.js +119 -0
- package/dist/jupiter-sdk/instructions/cropperSwap.d.ts +30 -0
- package/dist/jupiter-sdk/instructions/cropperSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/cropperSwap.js +103 -0
- package/dist/jupiter-sdk/instructions/cykuraSwap.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/cykuraSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/cykuraSwap.js +99 -0
- package/dist/jupiter-sdk/instructions/deltafiSwap.d.ts +31 -0
- package/dist/jupiter-sdk/instructions/deltafiSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/deltafiSwap.js +109 -0
- package/dist/jupiter-sdk/instructions/dradexSwap.d.ts +35 -0
- package/dist/jupiter-sdk/instructions/dradexSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/dradexSwap.js +121 -0
- package/dist/jupiter-sdk/instructions/exactOutRoute.d.ts +42 -0
- package/dist/jupiter-sdk/instructions/exactOutRoute.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/exactOutRoute.js +109 -0
- package/dist/jupiter-sdk/instructions/goosefxSwap.d.ts +33 -0
- package/dist/jupiter-sdk/instructions/goosefxSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/goosefxSwap.js +115 -0
- package/dist/jupiter-sdk/instructions/goosefxV2Swap.d.ts +38 -0
- package/dist/jupiter-sdk/instructions/goosefxV2Swap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/goosefxV2Swap.js +140 -0
- package/dist/jupiter-sdk/instructions/heliumTreasuryManagementRedeemV0.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/heliumTreasuryManagementRedeemV0.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/heliumTreasuryManagementRedeemV0.js +91 -0
- package/dist/jupiter-sdk/instructions/index.d.ts +72 -0
- package/dist/jupiter-sdk/instructions/index.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/index.js +87 -0
- package/dist/jupiter-sdk/instructions/invariantSwap.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/invariantSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/invariantSwap.js +95 -0
- package/dist/jupiter-sdk/instructions/lifinitySwap.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/lifinitySwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/lifinitySwap.js +113 -0
- package/dist/jupiter-sdk/instructions/lifinityV2Swap.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/lifinityV2Swap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/lifinityV2Swap.js +113 -0
- package/dist/jupiter-sdk/instructions/marcoPoloSwap.d.ts +36 -0
- package/dist/jupiter-sdk/instructions/marcoPoloSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/marcoPoloSwap.js +137 -0
- package/dist/jupiter-sdk/instructions/marinadeDeposit.d.ts +36 -0
- package/dist/jupiter-sdk/instructions/marinadeDeposit.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/marinadeDeposit.js +144 -0
- package/dist/jupiter-sdk/instructions/marinadeUnstake.d.ts +30 -0
- package/dist/jupiter-sdk/instructions/marinadeUnstake.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/marinadeUnstake.js +105 -0
- package/dist/jupiter-sdk/instructions/mercurialSwap.d.ts +25 -0
- package/dist/jupiter-sdk/instructions/mercurialSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/mercurialSwap.js +76 -0
- package/dist/jupiter-sdk/instructions/meteoraDlmmSwap.d.ts +34 -0
- package/dist/jupiter-sdk/instructions/meteoraDlmmSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/meteoraDlmmSwap.js +119 -0
- package/dist/jupiter-sdk/instructions/meteoraSwap.d.ts +34 -0
- package/dist/jupiter-sdk/instructions/meteoraSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/meteoraSwap.js +120 -0
- package/dist/jupiter-sdk/instructions/moonshotWrappedBuy.d.ts +33 -0
- package/dist/jupiter-sdk/instructions/moonshotWrappedBuy.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/moonshotWrappedBuy.js +119 -0
- package/dist/jupiter-sdk/instructions/moonshotWrappedSell.d.ts +31 -0
- package/dist/jupiter-sdk/instructions/moonshotWrappedSell.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/moonshotWrappedSell.js +106 -0
- package/dist/jupiter-sdk/instructions/obricSwap.d.ts +31 -0
- package/dist/jupiter-sdk/instructions/obricSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/obricSwap.js +106 -0
- package/dist/jupiter-sdk/instructions/oneIntroSwap.d.ts +30 -0
- package/dist/jupiter-sdk/instructions/oneIntroSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/oneIntroSwap.js +100 -0
- package/dist/jupiter-sdk/instructions/openBookV2Swap.d.ts +35 -0
- package/dist/jupiter-sdk/instructions/openBookV2Swap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/openBookV2Swap.js +125 -0
- package/dist/jupiter-sdk/instructions/perpsAddLiquidity.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/perpsAddLiquidity.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/perpsAddLiquidity.js +110 -0
- package/dist/jupiter-sdk/instructions/perpsRemoveLiquidity.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/perpsRemoveLiquidity.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/perpsRemoveLiquidity.js +110 -0
- package/dist/jupiter-sdk/instructions/perpsSwap.d.ts +34 -0
- package/dist/jupiter-sdk/instructions/perpsSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/perpsSwap.js +120 -0
- package/dist/jupiter-sdk/instructions/perpsV2AddLiquidity.d.ts +33 -0
- package/dist/jupiter-sdk/instructions/perpsV2AddLiquidity.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/perpsV2AddLiquidity.js +115 -0
- package/dist/jupiter-sdk/instructions/perpsV2RemoveLiquidity.d.ts +33 -0
- package/dist/jupiter-sdk/instructions/perpsV2RemoveLiquidity.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/perpsV2RemoveLiquidity.js +112 -0
- package/dist/jupiter-sdk/instructions/perpsV2Swap.d.ts +36 -0
- package/dist/jupiter-sdk/instructions/perpsV2Swap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/perpsV2Swap.js +130 -0
- package/dist/jupiter-sdk/instructions/phoenixSwap.d.ts +27 -0
- package/dist/jupiter-sdk/instructions/phoenixSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/phoenixSwap.js +89 -0
- package/dist/jupiter-sdk/instructions/pumpdotfunWrappedBuy.d.ts +34 -0
- package/dist/jupiter-sdk/instructions/pumpdotfunWrappedBuy.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/pumpdotfunWrappedBuy.js +123 -0
- package/dist/jupiter-sdk/instructions/pumpdotfunWrappedSell.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/pumpdotfunWrappedSell.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/pumpdotfunWrappedSell.js +107 -0
- package/dist/jupiter-sdk/instructions/raydiumClmmSwap.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/raydiumClmmSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/raydiumClmmSwap.js +102 -0
- package/dist/jupiter-sdk/instructions/raydiumClmmSwapV2.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/raydiumClmmSwapV2.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/raydiumClmmSwapV2.js +117 -0
- package/dist/jupiter-sdk/instructions/raydiumCpSwap.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/raydiumCpSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/raydiumCpSwap.js +116 -0
- package/dist/jupiter-sdk/instructions/raydiumSwap.d.ts +36 -0
- package/dist/jupiter-sdk/instructions/raydiumSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/raydiumSwap.js +134 -0
- package/dist/jupiter-sdk/instructions/route.d.ts +40 -0
- package/dist/jupiter-sdk/instructions/route.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/route.js +99 -0
- package/dist/jupiter-sdk/instructions/routeWithTokenLedger.d.ts +39 -0
- package/dist/jupiter-sdk/instructions/routeWithTokenLedger.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/routeWithTokenLedger.js +103 -0
- package/dist/jupiter-sdk/instructions/saberAddDecimals.d.ts +26 -0
- package/dist/jupiter-sdk/instructions/saberAddDecimals.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/saberAddDecimals.js +81 -0
- package/dist/jupiter-sdk/instructions/saberSwap.d.ts +28 -0
- package/dist/jupiter-sdk/instructions/saberSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/saberSwap.js +87 -0
- package/dist/jupiter-sdk/instructions/senchaSwap.d.ts +28 -0
- package/dist/jupiter-sdk/instructions/senchaSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/senchaSwap.js +90 -0
- package/dist/jupiter-sdk/instructions/serumSwap.d.ts +34 -0
- package/dist/jupiter-sdk/instructions/serumSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/serumSwap.js +122 -0
- package/dist/jupiter-sdk/instructions/setTokenLedger.d.ts +20 -0
- package/dist/jupiter-sdk/instructions/setTokenLedger.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/setTokenLedger.js +46 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsExactOutRoute.d.ts +46 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsExactOutRoute.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsExactOutRoute.js +120 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsRoute.d.ts +46 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsRoute.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsRoute.js +120 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsRouteWithTokenLedger.d.ts +45 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsRouteWithTokenLedger.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/sharedAccountsRouteWithTokenLedger.js +126 -0
- package/dist/jupiter-sdk/instructions/stabbleStableSwap.d.ts +31 -0
- package/dist/jupiter-sdk/instructions/stabbleStableSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/stabbleStableSwap.js +101 -0
- package/dist/jupiter-sdk/instructions/stabbleWeightedSwap.d.ts +31 -0
- package/dist/jupiter-sdk/instructions/stabbleWeightedSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/stabbleWeightedSwap.js +101 -0
- package/dist/jupiter-sdk/instructions/stepSwap.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/stepSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/stepSwap.js +98 -0
- package/dist/jupiter-sdk/instructions/symmetrySwap.d.ts +32 -0
- package/dist/jupiter-sdk/instructions/symmetrySwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/symmetrySwap.js +114 -0
- package/dist/jupiter-sdk/instructions/tokenSwap.d.ts +29 -0
- package/dist/jupiter-sdk/instructions/tokenSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/tokenSwap.js +98 -0
- package/dist/jupiter-sdk/instructions/tokenSwapV2.d.ts +33 -0
- package/dist/jupiter-sdk/instructions/tokenSwapV2.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/tokenSwapV2.js +114 -0
- package/dist/jupiter-sdk/instructions/whirlpoolSwap.d.ts +31 -0
- package/dist/jupiter-sdk/instructions/whirlpoolSwap.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/whirlpoolSwap.js +104 -0
- package/dist/jupiter-sdk/instructions/whirlpoolSwapV2.d.ts +35 -0
- package/dist/jupiter-sdk/instructions/whirlpoolSwapV2.d.ts.map +1 -0
- package/dist/jupiter-sdk/instructions/whirlpoolSwapV2.js +119 -0
- package/dist/jupiter-sdk/programs/index.d.ts +9 -0
- package/dist/jupiter-sdk/programs/index.d.ts.map +1 -0
- package/dist/jupiter-sdk/programs/index.js +24 -0
- package/dist/jupiter-sdk/programs/jupiter.d.ts +13 -0
- package/dist/jupiter-sdk/programs/jupiter.d.ts.map +1 -0
- package/dist/jupiter-sdk/programs/jupiter.js +36 -0
- package/dist/jupiter-sdk/shared/index.d.ts +54 -0
- package/dist/jupiter-sdk/shared/index.d.ts.map +1 -0
- package/dist/jupiter-sdk/shared/index.js +69 -0
- package/dist/jupiter-sdk/types/accountsType.d.ts +15 -0
- package/dist/jupiter-sdk/types/accountsType.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/accountsType.js +22 -0
- package/dist/jupiter-sdk/types/amountWithSlippage.d.ts +18 -0
- package/dist/jupiter-sdk/types/amountWithSlippage.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/amountWithSlippage.js +17 -0
- package/dist/jupiter-sdk/types/index.d.ts +15 -0
- package/dist/jupiter-sdk/types/index.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/index.js +30 -0
- package/dist/jupiter-sdk/types/remainingAccountsInfo.d.ts +17 -0
- package/dist/jupiter-sdk/types/remainingAccountsInfo.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/remainingAccountsInfo.js +15 -0
- package/dist/jupiter-sdk/types/remainingAccountsSlice.d.ts +19 -0
- package/dist/jupiter-sdk/types/remainingAccountsSlice.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/remainingAccountsSlice.js +18 -0
- package/dist/jupiter-sdk/types/routePlanStep.d.ts +23 -0
- package/dist/jupiter-sdk/types/routePlanStep.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/routePlanStep.js +20 -0
- package/dist/jupiter-sdk/types/side.d.ts +15 -0
- package/dist/jupiter-sdk/types/side.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/side.js +20 -0
- package/dist/jupiter-sdk/types/swap.d.ts +372 -0
- package/dist/jupiter-sdk/types/swap.d.ts.map +1 -0
- package/dist/jupiter-sdk/types/swap.js +188 -0
- package/dist/transactions/transactionUtils.d.ts +5 -0
- package/dist/transactions/transactionUtils.d.ts.map +1 -1
- package/dist/transactions/transactionUtils.js +46 -4
- package/dist/transactions/transactionsManager.d.ts +2 -1
- package/dist/transactions/transactionsManager.d.ts.map +1 -1
- package/dist/transactions/transactionsManager.js +12 -20
- package/package.json +1 -1
- package/src/constants/generalAccounts.ts +0 -3
- package/src/constants/solautoConstants.ts +1 -2
- package/src/generated/errors/solauto.ts +30 -88
- package/src/jupiter-sdk/accounts/index.ts +9 -0
- package/src/jupiter-sdk/accounts/tokenLedger.ts +146 -0
- package/src/jupiter-sdk/errors/index.ts +9 -0
- package/src/jupiter-sdk/errors/jupiter.ts +282 -0
- package/src/jupiter-sdk/index.ts +14 -0
- package/src/jupiter-sdk/instructions/aldrinSwap.ts +165 -0
- package/src/jupiter-sdk/instructions/aldrinV2Swap.ts +171 -0
- package/src/jupiter-sdk/instructions/balansolSwap.ts +211 -0
- package/src/jupiter-sdk/instructions/claim.ts +128 -0
- package/src/jupiter-sdk/instructions/claimToken.ts +171 -0
- package/src/jupiter-sdk/instructions/cloneSwap.ts +195 -0
- package/src/jupiter-sdk/instructions/createOpenOrders.ts +148 -0
- package/src/jupiter-sdk/instructions/createProgramOpenOrders.ts +170 -0
- package/src/jupiter-sdk/instructions/createTokenAccount.ts +152 -0
- package/src/jupiter-sdk/instructions/createTokenLedger.ts +128 -0
- package/src/jupiter-sdk/instructions/cremaSwap.ts +193 -0
- package/src/jupiter-sdk/instructions/cropperSwap.ts +174 -0
- package/src/jupiter-sdk/instructions/cykuraSwap.ts +169 -0
- package/src/jupiter-sdk/instructions/deltafiSwap.ts +181 -0
- package/src/jupiter-sdk/instructions/dradexSwap.ts +200 -0
- package/src/jupiter-sdk/instructions/exactOutRoute.ts +208 -0
- package/src/jupiter-sdk/instructions/goosefxSwap.ts +189 -0
- package/src/jupiter-sdk/instructions/goosefxV2Swap.ts +222 -0
- package/src/jupiter-sdk/instructions/heliumTreasuryManagementRedeemV0.ts +169 -0
- package/src/jupiter-sdk/instructions/index.ts +72 -0
- package/src/jupiter-sdk/instructions/invariantSwap.ts +168 -0
- package/src/jupiter-sdk/instructions/lifinitySwap.ts +186 -0
- package/src/jupiter-sdk/instructions/lifinityV2Swap.ts +189 -0
- package/src/jupiter-sdk/instructions/marcoPoloSwap.ts +223 -0
- package/src/jupiter-sdk/instructions/marinadeDeposit.ts +230 -0
- package/src/jupiter-sdk/instructions/marinadeUnstake.ts +182 -0
- package/src/jupiter-sdk/instructions/mercurialSwap.ts +145 -0
- package/src/jupiter-sdk/instructions/meteoraDlmmSwap.ts +193 -0
- package/src/jupiter-sdk/instructions/meteoraSwap.ts +195 -0
- package/src/jupiter-sdk/instructions/moonshotWrappedBuy.ts +201 -0
- package/src/jupiter-sdk/instructions/moonshotWrappedSell.ts +186 -0
- package/src/jupiter-sdk/instructions/obricSwap.ts +178 -0
- package/src/jupiter-sdk/instructions/oneIntroSwap.ts +171 -0
- package/src/jupiter-sdk/instructions/openBookV2Swap.ts +207 -0
- package/src/jupiter-sdk/instructions/perpsAddLiquidity.ts +186 -0
- package/src/jupiter-sdk/instructions/perpsRemoveLiquidity.ts +188 -0
- package/src/jupiter-sdk/instructions/perpsSwap.ts +195 -0
- package/src/jupiter-sdk/instructions/perpsV2AddLiquidity.ts +194 -0
- package/src/jupiter-sdk/instructions/perpsV2RemoveLiquidity.ts +193 -0
- package/src/jupiter-sdk/instructions/perpsV2Swap.ts +207 -0
- package/src/jupiter-sdk/instructions/phoenixSwap.ts +157 -0
- package/src/jupiter-sdk/instructions/pumpdotfunWrappedBuy.ts +209 -0
- package/src/jupiter-sdk/instructions/pumpdotfunWrappedSell.ts +190 -0
- package/src/jupiter-sdk/instructions/raydiumClmmSwap.ts +175 -0
- package/src/jupiter-sdk/instructions/raydiumClmmSwapV2.ts +193 -0
- package/src/jupiter-sdk/instructions/raydiumCpSwap.ts +189 -0
- package/src/jupiter-sdk/instructions/raydiumSwap.ts +211 -0
- package/src/jupiter-sdk/instructions/route.ts +189 -0
- package/src/jupiter-sdk/instructions/routeWithTokenLedger.ts +201 -0
- package/src/jupiter-sdk/instructions/saberAddDecimals.ts +151 -0
- package/src/jupiter-sdk/instructions/saberSwap.ts +156 -0
- package/src/jupiter-sdk/instructions/senchaSwap.ts +159 -0
- package/src/jupiter-sdk/instructions/serumSwap.ts +200 -0
- package/src/jupiter-sdk/instructions/setTokenLedger.ts +106 -0
- package/src/jupiter-sdk/instructions/sharedAccountsExactOutRoute.ts +226 -0
- package/src/jupiter-sdk/instructions/sharedAccountsRoute.ts +225 -0
- package/src/jupiter-sdk/instructions/sharedAccountsRouteWithTokenLedger.ts +231 -0
- package/src/jupiter-sdk/instructions/stabbleStableSwap.ts +176 -0
- package/src/jupiter-sdk/instructions/stabbleWeightedSwap.ts +178 -0
- package/src/jupiter-sdk/instructions/stepSwap.ts +168 -0
- package/src/jupiter-sdk/instructions/symmetrySwap.ts +187 -0
- package/src/jupiter-sdk/instructions/tokenSwap.ts +168 -0
- package/src/jupiter-sdk/instructions/tokenSwapV2.ts +185 -0
- package/src/jupiter-sdk/instructions/whirlpoolSwap.ts +179 -0
- package/src/jupiter-sdk/instructions/whirlpoolSwapV2.ts +194 -0
- package/src/jupiter-sdk/programs/index.ts +9 -0
- package/src/jupiter-sdk/programs/jupiter.ts +52 -0
- package/src/jupiter-sdk/shared/index.ts +117 -0
- package/src/jupiter-sdk/types/accountsType.ts +25 -0
- package/src/jupiter-sdk/types/amountWithSlippage.ts +34 -0
- package/src/jupiter-sdk/types/index.ts +15 -0
- package/src/jupiter-sdk/types/remainingAccountsInfo.ts +34 -0
- package/src/jupiter-sdk/types/remainingAccountsSlice.ts +33 -0
- package/src/jupiter-sdk/types/routePlanStep.ts +39 -0
- package/src/jupiter-sdk/types/side.ts +23 -0
- package/src/jupiter-sdk/types/swap.ts +566 -0
- package/src/transactions/transactionUtils.ts +72 -5
- package/src/transactions/transactionsManager.ts +26 -29
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generalAccounts.d.ts","sourceRoot":"","sources":["../../src/constants/generalAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,YAAY,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"generalAccounts.d.ts","sourceRoot":"","sources":["../../src/constants/generalAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,mBAAmB,WAAgE,CAAC;AACjG,eAAO,MAAM,eAAe,WAA+D,CAAC"}
|
@@ -3,6 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SOLAUTO_MANAGER = exports.SOLAUTO_FEES_WALLET = exports.USD_DECIMALS = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.USD_DECIMALS = 9;
|
6
|
-
// TODO
|
7
6
|
exports.SOLAUTO_FEES_WALLET = new web3_js_1.PublicKey("AprYCPiVeKMCgjQ2ZufwChMzvQ5kFjJo2ekTLSkXsQDm");
|
8
7
|
exports.SOLAUTO_MANAGER = new web3_js_1.PublicKey("MNGRcX4nc7quPdzBbNKJ4ScK5EE73JnwJVGxuJXhHCY");
|
@@ -10,6 +10,5 @@ export declare const PRICES: {
|
|
10
10
|
};
|
11
11
|
};
|
12
12
|
export declare const SOLAUTO_LUT = "9D4xwZwDf46n9ft5gQxZzq3rBbdRXsXojKQLZbBdskPY";
|
13
|
-
export declare const JUPITER_PROGRAM_ID = "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
|
14
13
|
export declare const STANDARD_LUT_ACCOUNTS: string[];
|
15
14
|
//# sourceMappingURL=solautoConstants.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solautoConstants.d.ts","sourceRoot":"","sources":["../../src/constants/solautoConstants.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"solautoConstants.d.ts","sourceRoot":"","sources":["../../src/constants/solautoConstants.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,YAAY,QAAQ,CAAC;AAElC,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAQpC,eAAO,MAAM,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;KAAE,CAAA;CAAO,CAAC;AAE9E,eAAO,MAAM,WAAW,iDAAiD,CAAC;AAE1E,eAAO,MAAM,qBAAqB,UAWjC,CAAC"}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.STANDARD_LUT_ACCOUNTS = exports.
|
3
|
+
exports.STANDARD_LUT_ACCOUNTS = exports.SOLAUTO_LUT = exports.PRICES = exports.MIN_BOOST_GAP_BPS = exports.MIN_REPAY_GAP_BPS = exports.MIN_POSITION_STATE_FRESHNESS_SECS = exports.DEFAULT_LIMIT_GAP_BPS = exports.BASIS_POINTS = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
const spl_token_1 = require("@solana/spl-token");
|
6
6
|
// import { JitoRpcConnection } from "jito-ts";
|
7
7
|
const generated_1 = require("../generated");
|
8
8
|
const generalAccounts_1 = require("./generalAccounts");
|
9
|
+
const jupiter_sdk_1 = require("../jupiter-sdk");
|
9
10
|
exports.BASIS_POINTS = 10000;
|
10
11
|
exports.DEFAULT_LIMIT_GAP_BPS = 1000;
|
11
12
|
exports.MIN_POSITION_STATE_FRESHNESS_SECS = 5;
|
@@ -18,7 +19,6 @@ exports.MIN_BOOST_GAP_BPS = 50;
|
|
18
19
|
// );
|
19
20
|
exports.PRICES = {};
|
20
21
|
exports.SOLAUTO_LUT = "9D4xwZwDf46n9ft5gQxZzq3rBbdRXsXojKQLZbBdskPY";
|
21
|
-
exports.JUPITER_PROGRAM_ID = "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
|
22
22
|
exports.STANDARD_LUT_ACCOUNTS = [
|
23
23
|
web3_js_1.PublicKey.default.toString(),
|
24
24
|
generated_1.SOLAUTO_PROGRAM_ID,
|
@@ -29,5 +29,5 @@ exports.STANDARD_LUT_ACCOUNTS = [
|
|
29
29
|
web3_js_1.SYSVAR_CLOCK_PUBKEY.toString(),
|
30
30
|
web3_js_1.SYSVAR_RENT_PUBKEY.toString(),
|
31
31
|
web3_js_1.SYSVAR_INSTRUCTIONS_PUBKEY.toString(),
|
32
|
-
|
32
|
+
jupiter_sdk_1.JUPITER_PROGRAM_ID
|
33
33
|
];
|
@@ -12,48 +12,30 @@ export declare class IncorrectAccountsError extends ProgramError {
|
|
12
12
|
readonly code: number;
|
13
13
|
constructor(program: Program, cause?: Error);
|
14
14
|
}
|
15
|
-
/** FailedAccountDeserialization: Failed to deserialize account data
|
15
|
+
/** FailedAccountDeserialization: Failed to deserialize account data */
|
16
16
|
export declare class FailedAccountDeserializationError extends ProgramError {
|
17
17
|
readonly name: string;
|
18
18
|
readonly code: number;
|
19
19
|
constructor(program: Program, cause?: Error);
|
20
20
|
}
|
21
|
-
/** InvalidPositionSettings: Invalid position settings
|
21
|
+
/** InvalidPositionSettings: Invalid position settings provided */
|
22
22
|
export declare class InvalidPositionSettingsError extends ProgramError {
|
23
23
|
readonly name: string;
|
24
24
|
readonly code: number;
|
25
25
|
constructor(program: Program, cause?: Error);
|
26
26
|
}
|
27
|
-
/** InvalidDCASettings: Invalid DCA
|
27
|
+
/** InvalidDCASettings: Invalid DCA configuration provided */
|
28
28
|
export declare class InvalidDCASettingsError extends ProgramError {
|
29
29
|
readonly name: string;
|
30
30
|
readonly code: number;
|
31
31
|
constructor(program: Program, cause?: Error);
|
32
32
|
}
|
33
|
-
/** InvalidAutomationData: Invalid automation
|
33
|
+
/** InvalidAutomationData: Invalid automation settings provided */
|
34
34
|
export declare class InvalidAutomationDataError extends ProgramError {
|
35
35
|
readonly name: string;
|
36
36
|
readonly code: number;
|
37
37
|
constructor(program: Program, cause?: Error);
|
38
38
|
}
|
39
|
-
/** StaleProtocolData: Stale protocol data. Refresh instruction must be invoked before taking a protocol action */
|
40
|
-
export declare class StaleProtocolDataError extends ProgramError {
|
41
|
-
readonly name: string;
|
42
|
-
readonly code: number;
|
43
|
-
constructor(program: Program, cause?: Error);
|
44
|
-
}
|
45
|
-
/** UnableToRebalance: Unable to adjust position to the desired utilization rate */
|
46
|
-
export declare class UnableToRebalanceError extends ProgramError {
|
47
|
-
readonly name: string;
|
48
|
-
readonly code: number;
|
49
|
-
constructor(program: Program, cause?: Error);
|
50
|
-
}
|
51
|
-
/** ExceededValidUtilizationRate: Desired action brought the utilization rate to an unsafe amount */
|
52
|
-
export declare class ExceededValidUtilizationRateError extends ProgramError {
|
53
|
-
readonly name: string;
|
54
|
-
readonly code: number;
|
55
|
-
constructor(program: Program, cause?: Error);
|
56
|
-
}
|
57
39
|
/** InvalidRebalanceCondition: Invalid position condition to rebalance */
|
58
40
|
export declare class InvalidRebalanceConditionError extends ProgramError {
|
59
41
|
readonly name: string;
|
@@ -66,14 +48,14 @@ export declare class InstructionIsCPIError extends ProgramError {
|
|
66
48
|
readonly code: number;
|
67
49
|
constructor(program: Program, cause?: Error);
|
68
50
|
}
|
69
|
-
/**
|
70
|
-
export declare class
|
51
|
+
/** IncorrectInstructions: Incorrect set of instructions in the transaction */
|
52
|
+
export declare class IncorrectInstructionsError extends ProgramError {
|
71
53
|
readonly name: string;
|
72
54
|
readonly code: number;
|
73
55
|
constructor(program: Program, cause?: Error);
|
74
56
|
}
|
75
|
-
/**
|
76
|
-
export declare class
|
57
|
+
/** IncorrectDebtAdjustment: Incorrect swap amount provided. Likely due to high price volatility */
|
58
|
+
export declare class IncorrectDebtAdjustmentError extends ProgramError {
|
77
59
|
readonly name: string;
|
78
60
|
readonly code: number;
|
79
61
|
constructor(program: Program, cause?: Error);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solauto.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/solauto.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASjE,0FAA0F;AAC1F,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,SAAkB,IAAI,EAAE,MAAM,CAAuB;IAErD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAO;gBAEhB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;CAO5C;AAID,
|
1
|
+
{"version":3,"file":"solauto.d.ts","sourceRoot":"","sources":["../../../src/generated/errors/solauto.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASjE,0FAA0F;AAC1F,qBAAa,sBAAuB,SAAQ,YAAY;IACtD,SAAkB,IAAI,EAAE,MAAM,CAAuB;IAErD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAO;gBAEhB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;CAO5C;AAID,uEAAuE;AACvE,qBAAa,iCAAkC,SAAQ,YAAY;IACjE,SAAkB,IAAI,EAAE,MAAM,CAAkC;IAEhE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAO;gBAEhB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;CAG5C;AAOD,kEAAkE;AAClE,qBAAa,4BAA6B,SAAQ,YAAY;IAC5D,SAAkB,IAAI,EAAE,MAAM,CAA6B;IAE3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAO;gBAEhB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;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AAE,MAAM,EACZ,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE,KAAK,GACZ,YAAY,GAAG,IAAI,CAGrB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE,KAAK,GACZ,YAAY,GAAG,IAAI,CAGrB"}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* @see https://github.com/metaplex-foundation/kinobi
|
8
8
|
*/
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.
|
10
|
+
exports.IncorrectDebtAdjustmentError = exports.IncorrectInstructionsError = exports.InstructionIsCPIError = exports.InvalidRebalanceConditionError = exports.InvalidAutomationDataError = exports.InvalidDCASettingsError = exports.InvalidPositionSettingsError = exports.FailedAccountDeserializationError = exports.IncorrectAccountsError = void 0;
|
11
11
|
exports.getSolautoErrorFromCode = getSolautoErrorFromCode;
|
12
12
|
exports.getSolautoErrorFromName = getSolautoErrorFromName;
|
13
13
|
const umi_1 = require("@metaplex-foundation/umi");
|
@@ -24,10 +24,10 @@ class IncorrectAccountsError extends umi_1.ProgramError {
|
|
24
24
|
exports.IncorrectAccountsError = IncorrectAccountsError;
|
25
25
|
codeToErrorMap.set(0x0, IncorrectAccountsError);
|
26
26
|
nameToErrorMap.set('IncorrectAccounts', IncorrectAccountsError);
|
27
|
-
/** FailedAccountDeserialization: Failed to deserialize account data
|
27
|
+
/** FailedAccountDeserialization: Failed to deserialize account data */
|
28
28
|
class FailedAccountDeserializationError extends umi_1.ProgramError {
|
29
29
|
constructor(program, cause) {
|
30
|
-
super('Failed to deserialize account data
|
30
|
+
super('Failed to deserialize account data', program, cause);
|
31
31
|
this.name = 'FailedAccountDeserialization';
|
32
32
|
this.code = 0x1; // 1
|
33
33
|
}
|
@@ -35,10 +35,10 @@ class FailedAccountDeserializationError extends umi_1.ProgramError {
|
|
35
35
|
exports.FailedAccountDeserializationError = FailedAccountDeserializationError;
|
36
36
|
codeToErrorMap.set(0x1, FailedAccountDeserializationError);
|
37
37
|
nameToErrorMap.set('FailedAccountDeserialization', FailedAccountDeserializationError);
|
38
|
-
/** InvalidPositionSettings: Invalid position settings
|
38
|
+
/** InvalidPositionSettings: Invalid position settings provided */
|
39
39
|
class InvalidPositionSettingsError extends umi_1.ProgramError {
|
40
40
|
constructor(program, cause) {
|
41
|
-
super('Invalid position settings
|
41
|
+
super('Invalid position settings provided', program, cause);
|
42
42
|
this.name = 'InvalidPositionSettings';
|
43
43
|
this.code = 0x2; // 2
|
44
44
|
}
|
@@ -46,10 +46,10 @@ class InvalidPositionSettingsError extends umi_1.ProgramError {
|
|
46
46
|
exports.InvalidPositionSettingsError = InvalidPositionSettingsError;
|
47
47
|
codeToErrorMap.set(0x2, InvalidPositionSettingsError);
|
48
48
|
nameToErrorMap.set('InvalidPositionSettings', InvalidPositionSettingsError);
|
49
|
-
/** InvalidDCASettings: Invalid DCA
|
49
|
+
/** InvalidDCASettings: Invalid DCA configuration provided */
|
50
50
|
class InvalidDCASettingsError extends umi_1.ProgramError {
|
51
51
|
constructor(program, cause) {
|
52
|
-
super('Invalid DCA
|
52
|
+
super('Invalid DCA configuration provided', program, cause);
|
53
53
|
this.name = 'InvalidDCASettings';
|
54
54
|
this.code = 0x3; // 3
|
55
55
|
}
|
@@ -57,10 +57,10 @@ class InvalidDCASettingsError extends umi_1.ProgramError {
|
|
57
57
|
exports.InvalidDCASettingsError = InvalidDCASettingsError;
|
58
58
|
codeToErrorMap.set(0x3, InvalidDCASettingsError);
|
59
59
|
nameToErrorMap.set('InvalidDCASettings', InvalidDCASettingsError);
|
60
|
-
/** InvalidAutomationData: Invalid automation
|
60
|
+
/** InvalidAutomationData: Invalid automation settings provided */
|
61
61
|
class InvalidAutomationDataError extends umi_1.ProgramError {
|
62
62
|
constructor(program, cause) {
|
63
|
-
super('Invalid automation
|
63
|
+
super('Invalid automation settings provided', program, cause);
|
64
64
|
this.name = 'InvalidAutomationData';
|
65
65
|
this.code = 0x4; // 4
|
66
66
|
}
|
@@ -68,83 +68,50 @@ class InvalidAutomationDataError extends umi_1.ProgramError {
|
|
68
68
|
exports.InvalidAutomationDataError = InvalidAutomationDataError;
|
69
69
|
codeToErrorMap.set(0x4, InvalidAutomationDataError);
|
70
70
|
nameToErrorMap.set('InvalidAutomationData', InvalidAutomationDataError);
|
71
|
-
/** StaleProtocolData: Stale protocol data. Refresh instruction must be invoked before taking a protocol action */
|
72
|
-
class StaleProtocolDataError extends umi_1.ProgramError {
|
73
|
-
constructor(program, cause) {
|
74
|
-
super('Stale protocol data. Refresh instruction must be invoked before taking a protocol action', program, cause);
|
75
|
-
this.name = 'StaleProtocolData';
|
76
|
-
this.code = 0x5; // 5
|
77
|
-
}
|
78
|
-
}
|
79
|
-
exports.StaleProtocolDataError = StaleProtocolDataError;
|
80
|
-
codeToErrorMap.set(0x5, StaleProtocolDataError);
|
81
|
-
nameToErrorMap.set('StaleProtocolData', StaleProtocolDataError);
|
82
|
-
/** UnableToRebalance: Unable to adjust position to the desired utilization rate */
|
83
|
-
class UnableToRebalanceError extends umi_1.ProgramError {
|
84
|
-
constructor(program, cause) {
|
85
|
-
super('Unable to adjust position to the desired utilization rate', program, cause);
|
86
|
-
this.name = 'UnableToRebalance';
|
87
|
-
this.code = 0x6; // 6
|
88
|
-
}
|
89
|
-
}
|
90
|
-
exports.UnableToRebalanceError = UnableToRebalanceError;
|
91
|
-
codeToErrorMap.set(0x6, UnableToRebalanceError);
|
92
|
-
nameToErrorMap.set('UnableToRebalance', UnableToRebalanceError);
|
93
|
-
/** ExceededValidUtilizationRate: Desired action brought the utilization rate to an unsafe amount */
|
94
|
-
class ExceededValidUtilizationRateError extends umi_1.ProgramError {
|
95
|
-
constructor(program, cause) {
|
96
|
-
super('Desired action brought the utilization rate to an unsafe amount', program, cause);
|
97
|
-
this.name = 'ExceededValidUtilizationRate';
|
98
|
-
this.code = 0x7; // 7
|
99
|
-
}
|
100
|
-
}
|
101
|
-
exports.ExceededValidUtilizationRateError = ExceededValidUtilizationRateError;
|
102
|
-
codeToErrorMap.set(0x7, ExceededValidUtilizationRateError);
|
103
|
-
nameToErrorMap.set('ExceededValidUtilizationRate', ExceededValidUtilizationRateError);
|
104
71
|
/** InvalidRebalanceCondition: Invalid position condition to rebalance */
|
105
72
|
class InvalidRebalanceConditionError extends umi_1.ProgramError {
|
106
73
|
constructor(program, cause) {
|
107
74
|
super('Invalid position condition to rebalance', program, cause);
|
108
75
|
this.name = 'InvalidRebalanceCondition';
|
109
|
-
this.code =
|
76
|
+
this.code = 0x5; // 5
|
110
77
|
}
|
111
78
|
}
|
112
79
|
exports.InvalidRebalanceConditionError = InvalidRebalanceConditionError;
|
113
|
-
codeToErrorMap.set(
|
80
|
+
codeToErrorMap.set(0x5, InvalidRebalanceConditionError);
|
114
81
|
nameToErrorMap.set('InvalidRebalanceCondition', InvalidRebalanceConditionError);
|
115
82
|
/** InstructionIsCPI: Unable to invoke instruction through a CPI */
|
116
83
|
class InstructionIsCPIError extends umi_1.ProgramError {
|
117
84
|
constructor(program, cause) {
|
118
85
|
super('Unable to invoke instruction through a CPI', program, cause);
|
119
86
|
this.name = 'InstructionIsCPI';
|
120
|
-
this.code =
|
87
|
+
this.code = 0x6; // 6
|
121
88
|
}
|
122
89
|
}
|
123
90
|
exports.InstructionIsCPIError = InstructionIsCPIError;
|
124
|
-
codeToErrorMap.set(
|
91
|
+
codeToErrorMap.set(0x6, InstructionIsCPIError);
|
125
92
|
nameToErrorMap.set('InstructionIsCPI', InstructionIsCPIError);
|
126
|
-
/** RebalanceAbuse: Too many rebalance instruction invocations in the same transaction */
|
127
|
-
class RebalanceAbuseError extends umi_1.ProgramError {
|
128
|
-
constructor(program, cause) {
|
129
|
-
super('Too many rebalance instruction invocations in the same transaction', program, cause);
|
130
|
-
this.name = 'RebalanceAbuse';
|
131
|
-
this.code = 0xa; // 10
|
132
|
-
}
|
133
|
-
}
|
134
|
-
exports.RebalanceAbuseError = RebalanceAbuseError;
|
135
|
-
codeToErrorMap.set(0xa, RebalanceAbuseError);
|
136
|
-
nameToErrorMap.set('RebalanceAbuse', RebalanceAbuseError);
|
137
93
|
/** IncorrectInstructions: Incorrect set of instructions in the transaction */
|
138
94
|
class IncorrectInstructionsError extends umi_1.ProgramError {
|
139
95
|
constructor(program, cause) {
|
140
96
|
super('Incorrect set of instructions in the transaction', program, cause);
|
141
97
|
this.name = 'IncorrectInstructions';
|
142
|
-
this.code =
|
98
|
+
this.code = 0x7; // 7
|
143
99
|
}
|
144
100
|
}
|
145
101
|
exports.IncorrectInstructionsError = IncorrectInstructionsError;
|
146
|
-
codeToErrorMap.set(
|
102
|
+
codeToErrorMap.set(0x7, IncorrectInstructionsError);
|
147
103
|
nameToErrorMap.set('IncorrectInstructions', IncorrectInstructionsError);
|
104
|
+
/** IncorrectDebtAdjustment: Incorrect swap amount provided. Likely due to high price volatility */
|
105
|
+
class IncorrectDebtAdjustmentError extends umi_1.ProgramError {
|
106
|
+
constructor(program, cause) {
|
107
|
+
super('Incorrect swap amount provided. Likely due to high price volatility', program, cause);
|
108
|
+
this.name = 'IncorrectDebtAdjustment';
|
109
|
+
this.code = 0x8; // 8
|
110
|
+
}
|
111
|
+
}
|
112
|
+
exports.IncorrectDebtAdjustmentError = IncorrectDebtAdjustmentError;
|
113
|
+
codeToErrorMap.set(0x8, IncorrectDebtAdjustmentError);
|
114
|
+
nameToErrorMap.set('IncorrectDebtAdjustment', IncorrectDebtAdjustmentError);
|
148
115
|
/**
|
149
116
|
* Attempts to resolve a custom program error from the provided error code.
|
150
117
|
* @category Errors
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
export * from './tokenLedger';
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jupiter-sdk/accounts/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,eAAe,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
14
|
+
}
|
15
|
+
Object.defineProperty(o, k2, desc);
|
16
|
+
}) : (function(o, m, k, k2) {
|
17
|
+
if (k2 === undefined) k2 = k;
|
18
|
+
o[k2] = m[k];
|
19
|
+
}));
|
20
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
21
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
22
|
+
};
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
24
|
+
__exportStar(require("./tokenLedger"), exports);
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
import { Account, Context, Pda, PublicKey, RpcAccount, RpcGetAccountOptions, RpcGetAccountsOptions } from '@metaplex-foundation/umi';
|
9
|
+
import { Serializer } from '@metaplex-foundation/umi/serializers';
|
10
|
+
export type TokenLedger = Account<TokenLedgerAccountData>;
|
11
|
+
export type TokenLedgerAccountData = {
|
12
|
+
discriminator: Array<number>;
|
13
|
+
tokenAccount: PublicKey;
|
14
|
+
amount: bigint;
|
15
|
+
};
|
16
|
+
export type TokenLedgerAccountDataArgs = {
|
17
|
+
tokenAccount: PublicKey;
|
18
|
+
amount: number | bigint;
|
19
|
+
};
|
20
|
+
export declare function getTokenLedgerAccountDataSerializer(): Serializer<TokenLedgerAccountDataArgs, TokenLedgerAccountData>;
|
21
|
+
export declare function deserializeTokenLedger(rawAccount: RpcAccount): TokenLedger;
|
22
|
+
export declare function fetchTokenLedger(context: Pick<Context, 'rpc'>, publicKey: PublicKey | Pda, options?: RpcGetAccountOptions): Promise<TokenLedger>;
|
23
|
+
export declare function safeFetchTokenLedger(context: Pick<Context, 'rpc'>, publicKey: PublicKey | Pda, options?: RpcGetAccountOptions): Promise<TokenLedger | null>;
|
24
|
+
export declare function fetchAllTokenLedger(context: Pick<Context, 'rpc'>, publicKeys: Array<PublicKey | Pda>, options?: RpcGetAccountsOptions): Promise<TokenLedger[]>;
|
25
|
+
export declare function safeFetchAllTokenLedger(context: Pick<Context, 'rpc'>, publicKeys: Array<PublicKey | Pda>, options?: RpcGetAccountsOptions): Promise<TokenLedger[]>;
|
26
|
+
export declare function getTokenLedgerGpaBuilder(context: Pick<Context, 'rpc' | 'programs'>): import("@metaplex-foundation/umi").GpaBuilder<TokenLedger, {
|
27
|
+
discriminator: Array<number>;
|
28
|
+
tokenAccount: PublicKey;
|
29
|
+
amount: number | bigint;
|
30
|
+
}>;
|
31
|
+
export declare function getTokenLedgerSize(): number;
|
32
|
+
//# sourceMappingURL=tokenLedger.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tokenLedger.d.ts","sourceRoot":"","sources":["../../../src/j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O,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,WAAW,EAAE,CAAC,CASxB;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,EAC7B,UAAU,EAAE,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC,EAClC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,WAAW,EAAE,CAAC,CAQxB;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,UAAU,CAAC;mBAQvB,KAAK,CAAC,MAAM,CAAC;kBACd,SAAS;YACf,MAAM,GAAG,MAAM;GAQ5B;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.getTokenLedgerAccountDataSerializer = getTokenLedgerAccountDataSerializer;
|
11
|
+
exports.deserializeTokenLedger = deserializeTokenLedger;
|
12
|
+
exports.fetchTokenLedger = fetchTokenLedger;
|
13
|
+
exports.safeFetchTokenLedger = safeFetchTokenLedger;
|
14
|
+
exports.fetchAllTokenLedger = fetchAllTokenLedger;
|
15
|
+
exports.safeFetchAllTokenLedger = safeFetchAllTokenLedger;
|
16
|
+
exports.getTokenLedgerGpaBuilder = getTokenLedgerGpaBuilder;
|
17
|
+
exports.getTokenLedgerSize = getTokenLedgerSize;
|
18
|
+
const umi_1 = require("@metaplex-foundation/umi");
|
19
|
+
const serializers_1 = require("@metaplex-foundation/umi/serializers");
|
20
|
+
function getTokenLedgerAccountDataSerializer() {
|
21
|
+
return (0, serializers_1.mapSerializer)((0, serializers_1.struct)([
|
22
|
+
['discriminator', (0, serializers_1.array)((0, serializers_1.u8)(), { size: 8 })],
|
23
|
+
['tokenAccount', (0, serializers_1.publicKey)()],
|
24
|
+
['amount', (0, serializers_1.u64)()],
|
25
|
+
], { description: 'TokenLedgerAccountData' }), (value) => ({
|
26
|
+
...value,
|
27
|
+
discriminator: [156, 247, 9, 188, 54, 108, 85, 77],
|
28
|
+
}));
|
29
|
+
}
|
30
|
+
function deserializeTokenLedger(rawAccount) {
|
31
|
+
return (0, umi_1.deserializeAccount)(rawAccount, getTokenLedgerAccountDataSerializer());
|
32
|
+
}
|
33
|
+
async function fetchTokenLedger(context, publicKey, options) {
|
34
|
+
const maybeAccount = await context.rpc.getAccount((0, umi_1.publicKey)(publicKey, false), options);
|
35
|
+
(0, umi_1.assertAccountExists)(maybeAccount, 'TokenLedger');
|
36
|
+
return deserializeTokenLedger(maybeAccount);
|
37
|
+
}
|
38
|
+
async function safeFetchTokenLedger(context, publicKey, options) {
|
39
|
+
const maybeAccount = await context.rpc.getAccount((0, umi_1.publicKey)(publicKey, false), options);
|
40
|
+
return maybeAccount.exists ? deserializeTokenLedger(maybeAccount) : null;
|
41
|
+
}
|
42
|
+
async function fetchAllTokenLedger(context, publicKeys, options) {
|
43
|
+
const maybeAccounts = await context.rpc.getAccounts(publicKeys.map((key) => (0, umi_1.publicKey)(key, false)), options);
|
44
|
+
return maybeAccounts.map((maybeAccount) => {
|
45
|
+
(0, umi_1.assertAccountExists)(maybeAccount, 'TokenLedger');
|
46
|
+
return deserializeTokenLedger(maybeAccount);
|
47
|
+
});
|
48
|
+
}
|
49
|
+
async function safeFetchAllTokenLedger(context, publicKeys, options) {
|
50
|
+
const maybeAccounts = await context.rpc.getAccounts(publicKeys.map((key) => (0, umi_1.publicKey)(key, false)), options);
|
51
|
+
return maybeAccounts
|
52
|
+
.filter((maybeAccount) => maybeAccount.exists)
|
53
|
+
.map((maybeAccount) => deserializeTokenLedger(maybeAccount));
|
54
|
+
}
|
55
|
+
function getTokenLedgerGpaBuilder(context) {
|
56
|
+
const programId = context.programs.getPublicKey('jupiter', 'JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4');
|
57
|
+
return (0, umi_1.gpaBuilder)(context, programId)
|
58
|
+
.registerFields({
|
59
|
+
discriminator: [0, (0, serializers_1.array)((0, serializers_1.u8)(), { size: 8 })],
|
60
|
+
tokenAccount: [8, (0, serializers_1.publicKey)()],
|
61
|
+
amount: [40, (0, serializers_1.u64)()],
|
62
|
+
})
|
63
|
+
.deserializeUsing((account) => deserializeTokenLedger(account))
|
64
|
+
.whereField('discriminator', [156, 247, 9, 188, 54, 108, 85, 77]);
|
65
|
+
}
|
66
|
+
function getTokenLedgerSize() {
|
67
|
+
return 48;
|
68
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
export * from './jupiter';
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jupiter-sdk/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,WAAW,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This code was AUTOGENERATED using the kinobi library.
|
4
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
5
|
+
* to add features, then rerun kinobi to update it.
|
6
|
+
*
|
7
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
8
|
+
*/
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
14
|
+
}
|
15
|
+
Object.defineProperty(o, k2, desc);
|
16
|
+
}) : (function(o, m, k, k2) {
|
17
|
+
if (k2 === undefined) k2 = k;
|
18
|
+
o[k2] = m[k];
|
19
|
+
}));
|
20
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
21
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
22
|
+
};
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
24
|
+
__exportStar(require("./jupiter"), exports);
|
@@ -0,0 +1,127 @@
|
|
1
|
+
/**
|
2
|
+
* This code was AUTOGENERATED using the kinobi library.
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
4
|
+
* to add features, then rerun kinobi to update it.
|
5
|
+
*
|
6
|
+
* @see https://github.com/metaplex-foundation/kinobi
|
7
|
+
*/
|
8
|
+
import { Program, ProgramError } from '@metaplex-foundation/umi';
|
9
|
+
/** EmptyRoute: Empty route */
|
10
|
+
export declare class EmptyRouteError extends ProgramError {
|
11
|
+
readonly name: string;
|
12
|
+
readonly code: number;
|
13
|
+
constructor(program: Program, cause?: Error);
|
14
|
+
}
|
15
|
+
/** SlippageToleranceExceeded: Slippage tolerance exceeded */
|
16
|
+
export declare class SlippageToleranceExceededError extends ProgramError {
|
17
|
+
readonly name: string;
|
18
|
+
readonly code: number;
|
19
|
+
constructor(program: Program, cause?: Error);
|
20
|
+
}
|
21
|
+
/** InvalidCalculation: Invalid calculation */
|
22
|
+
export declare class InvalidCalculationError extends ProgramError {
|
23
|
+
readonly name: string;
|
24
|
+
readonly code: number;
|
25
|
+
constructor(program: Program, cause?: Error);
|
26
|
+
}
|
27
|
+
/** MissingPlatformFeeAccount: Missing platform fee account */
|
28
|
+
export declare class MissingPlatformFeeAccountError extends ProgramError {
|
29
|
+
readonly name: string;
|
30
|
+
readonly code: number;
|
31
|
+
constructor(program: Program, cause?: Error);
|
32
|
+
}
|
33
|
+
/** InvalidSlippage: Invalid slippage */
|
34
|
+
export declare class InvalidSlippageError extends ProgramError {
|
35
|
+
readonly name: string;
|
36
|
+
readonly code: number;
|
37
|
+
constructor(program: Program, cause?: Error);
|
38
|
+
}
|
39
|
+
/** NotEnoughPercent: Not enough percent to 100 */
|
40
|
+
export declare class NotEnoughPercentError extends ProgramError {
|
41
|
+
readonly name: string;
|
42
|
+
readonly code: number;
|
43
|
+
constructor(program: Program, cause?: Error);
|
44
|
+
}
|
45
|
+
/** InvalidInputIndex: Token input index is invalid */
|
46
|
+
export declare class InvalidInputIndexError extends ProgramError {
|
47
|
+
readonly name: string;
|
48
|
+
readonly code: number;
|
49
|
+
constructor(program: Program, cause?: Error);
|
50
|
+
}
|
51
|
+
/** InvalidOutputIndex: Token output index is invalid */
|
52
|
+
export declare class InvalidOutputIndexError extends ProgramError {
|
53
|
+
readonly name: string;
|
54
|
+
readonly code: number;
|
55
|
+
constructor(program: Program, cause?: Error);
|
56
|
+
}
|
57
|
+
/** NotEnoughAccountKeys: Not Enough Account keys */
|
58
|
+
export declare class NotEnoughAccountKeysError extends ProgramError {
|
59
|
+
readonly name: string;
|
60
|
+
readonly code: number;
|
61
|
+
constructor(program: Program, cause?: Error);
|
62
|
+
}
|
63
|
+
/** NonZeroMinimumOutAmountNotSupported: Non zero minimum out amount not supported */
|
64
|
+
export declare class NonZeroMinimumOutAmountNotSupportedError extends ProgramError {
|
65
|
+
readonly name: string;
|
66
|
+
readonly code: number;
|
67
|
+
constructor(program: Program, cause?: Error);
|
68
|
+
}
|
69
|
+
/** InvalidRoutePlan: Invalid route plan */
|
70
|
+
export declare class InvalidRoutePlanError extends ProgramError {
|
71
|
+
readonly name: string;
|
72
|
+
readonly code: number;
|
73
|
+
constructor(program: Program, cause?: Error);
|
74
|
+
}
|
75
|
+
/** InvalidReferralAuthority: Invalid referral authority */
|
76
|
+
export declare class InvalidReferralAuthorityError extends ProgramError {
|
77
|
+
readonly name: string;
|
78
|
+
readonly code: number;
|
79
|
+
constructor(program: Program, cause?: Error);
|
80
|
+
}
|
81
|
+
/** LedgerTokenAccountDoesNotMatch: Token account doesn't match the ledger */
|
82
|
+
export declare class LedgerTokenAccountDoesNotMatchError extends ProgramError {
|
83
|
+
readonly name: string;
|
84
|
+
readonly code: number;
|
85
|
+
constructor(program: Program, cause?: Error);
|
86
|
+
}
|
87
|
+
/** InvalidTokenLedger: Invalid token ledger */
|
88
|
+
export declare class InvalidTokenLedgerError extends ProgramError {
|
89
|
+
readonly name: string;
|
90
|
+
readonly code: number;
|
91
|
+
constructor(program: Program, cause?: Error);
|
92
|
+
}
|
93
|
+
/** IncorrectTokenProgramID: Token program ID is invalid */
|
94
|
+
export declare class IncorrectTokenProgramIDError extends ProgramError {
|
95
|
+
readonly name: string;
|
96
|
+
readonly code: number;
|
97
|
+
constructor(program: Program, cause?: Error);
|
98
|
+
}
|
99
|
+
/** TokenProgramNotProvided: Token program not provided */
|
100
|
+
export declare class TokenProgramNotProvidedError extends ProgramError {
|
101
|
+
readonly name: string;
|
102
|
+
readonly code: number;
|
103
|
+
constructor(program: Program, cause?: Error);
|
104
|
+
}
|
105
|
+
/** SwapNotSupported: Swap not supported */
|
106
|
+
export declare class SwapNotSupportedError extends ProgramError {
|
107
|
+
readonly name: string;
|
108
|
+
readonly code: number;
|
109
|
+
constructor(program: Program, cause?: Error);
|
110
|
+
}
|
111
|
+
/** ExactOutAmountNotMatched: Exact out amount doesn't match */
|
112
|
+
export declare class ExactOutAmountNotMatchedError extends ProgramError {
|
113
|
+
readonly name: string;
|
114
|
+
readonly code: number;
|
115
|
+
constructor(program: Program, cause?: Error);
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Attempts to resolve a custom program error from the provided error code.
|
119
|
+
* @category Errors
|
120
|
+
*/
|
121
|
+
export declare function getJupiterErrorFromCode(code: number, program: Program, cause?: Error): ProgramError | null;
|
122
|
+
/**
|
123
|
+
* Attempts to resolve a custom program error from the provided error name, i.e. 'Unauthorized'.
|
124
|
+
* @category Errors
|
125
|
+
*/
|
126
|
+
export declare function getJupiterErrorFromName(name: string, program: Program, cause?: Error): ProgramError | null;
|
127
|
+
//# sourceMappingURL=jupiter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jupiter.d.ts","sourceRoot":"","sources":["../../../src/jupiter-sdk/errors/jupiter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASjE,8BAA8B;AAC9B,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,SAAkB,IAAI,EAAE,MAAM,CAAgB;IAE9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;gBAEnB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;CAG5C;AAID,6DAA6D;AAC7D,qBAAa,8BAA+B,SAAQ,YAAY;IAC9D,SAAkB,IAAI,EAAE,MAAM,CAA+B;IAE7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;gBAEnB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;CAG5C;AAID,8CAA8C;AAC9C,qBAAa,uBAAwB,SAAQ,YAAY;IACvD,SAAkB,IAAI,EAAE,MAAM,CAAwB;IAEtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;gBAEnB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,KAAK;CAG5C;AAID,8DAA8D;AAC9D,qBAAa,8BAA+B,SAAQ,YAAY;IAC9D,SAAkB,IAAI,EAAE,MAAM,CAA+B;IAE7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;gBAEnB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EA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