@raydium-io/raydium-sdk-v2 0.1.22-alpha → 0.1.23-alpha
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/lib/api/api.d.ts +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/type.d.ts +1 -1
- package/lib/common/accountInfo.d.ts +1 -1
- package/lib/common/bignumber.d.ts +1 -1
- package/lib/common/fractionUtil.d.ts +1 -1
- package/lib/common/index.d.ts +1 -1
- package/lib/common/transfer.d.ts +1 -1
- package/lib/common/txTool/txTool.d.ts +1 -1
- package/lib/common/txTool/txUtils.d.ts +1 -1
- package/lib/common/utility.d.ts +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/module/amount.d.ts +1 -1
- package/lib/module/fraction.d.ts +1 -1
- package/lib/module/index.d.ts +1 -1
- package/lib/module/percent.d.ts +1 -1
- package/lib/module/price.d.ts +1 -1
- package/lib/raydium/account/account.d.ts +4 -3
- package/lib/raydium/account/index.d.ts +1 -1
- package/lib/raydium/account/instruction.d.ts +1 -1
- package/lib/raydium/account/types.d.ts +1 -1
- package/lib/raydium/account/util.d.ts +1 -1
- package/lib/raydium/clmm/clmm.d.ts +4 -3
- package/lib/raydium/clmm/index.d.ts +4 -3
- package/lib/raydium/clmm/instrument.d.ts +2 -2
- package/lib/raydium/clmm/layout.d.ts +10 -10
- package/lib/raydium/clmm/type.d.ts +2 -2
- package/lib/raydium/clmm/utils/math.d.ts +2 -2
- package/lib/raydium/clmm/utils/pool.d.ts +2 -2
- package/lib/raydium/clmm/utils/position.d.ts +2 -2
- package/lib/raydium/clmm/utils/tick.d.ts +2 -2
- package/lib/raydium/clmm/utils/tickQuery.d.ts +2 -2
- package/lib/raydium/clmm/utils/tickarrayBitmap.d.ts +2 -2
- package/lib/raydium/cpmm/cpmm.d.ts +4 -3
- package/lib/raydium/cpmm/index.d.ts +1 -1
- package/lib/raydium/cpmm/layout.d.ts +2 -2
- package/lib/raydium/cpmm/type.d.ts +1 -1
- package/lib/raydium/farm/config.d.ts +1 -1
- package/lib/raydium/farm/farm.d.ts +4 -3
- package/lib/raydium/farm/index.d.ts +1 -1
- package/lib/raydium/farm/instruction.d.ts +1 -1
- package/lib/raydium/farm/layout.d.ts +1 -1
- package/lib/raydium/farm/type.d.ts +1 -1
- package/lib/raydium/farm/util.d.ts +1 -1
- package/lib/raydium/ido/ido.d.ts +4 -3
- package/lib/raydium/ido/index.d.ts +4 -3
- package/lib/raydium/ido/instruction.d.ts +1 -1
- package/lib/raydium/ido/type.d.ts +1 -1
- package/lib/raydium/index.d.ts +3 -3
- package/lib/raydium/index.js +1 -1
- package/lib/raydium/index.js.map +1 -1
- package/lib/raydium/index.mjs +1 -1
- package/lib/raydium/index.mjs.map +1 -1
- package/lib/raydium/liquidity/index.d.ts +1 -1
- package/lib/raydium/liquidity/instruction.d.ts +1 -1
- package/lib/raydium/liquidity/liquidity.d.ts +4 -3
- package/lib/raydium/liquidity/liquidity.js +1 -1
- package/lib/raydium/liquidity/liquidity.js.map +1 -1
- package/lib/raydium/liquidity/liquidity.mjs +1 -1
- package/lib/raydium/liquidity/liquidity.mjs.map +1 -1
- package/lib/raydium/liquidity/type.d.ts +2 -1
- package/lib/raydium/liquidity/type.js.map +1 -1
- package/lib/raydium/liquidity/utils.d.ts +1 -1
- package/lib/raydium/marketV2/createMarket.d.ts +4 -3
- package/lib/raydium/marketV2/index.d.ts +4 -3
- package/lib/raydium/moduleBase.d.ts +4 -3
- package/lib/raydium/raydium.d.ts +4 -3
- package/lib/raydium/raydium.js +1 -1
- package/lib/raydium/raydium.js.map +1 -1
- package/lib/raydium/raydium.mjs +1 -1
- package/lib/raydium/raydium.mjs.map +1 -1
- package/lib/raydium/serum/layout.d.ts +1 -1
- package/lib/raydium/token/constant.d.ts +1 -1
- package/lib/raydium/token/index.d.ts +1 -1
- package/lib/raydium/token/token.d.ts +4 -3
- package/lib/raydium/token/type.d.ts +1 -1
- package/lib/raydium/token/utils.d.ts +1 -1
- package/lib/raydium/tradeV2/index.d.ts +2 -2
- package/lib/raydium/tradeV2/instrument.d.ts +2 -2
- package/lib/raydium/tradeV2/trade.d.ts +4 -3
- package/lib/raydium/tradeV2/type.d.ts +2 -2
- package/lib/raydium/type.d.ts +1 -1
- package/lib/raydium/utils1216/index.d.ts +4 -3
- package/lib/raydium/utils1216/utils1216.d.ts +4 -3
- package/lib/{raydium-c9108dcc.d.ts → raydium-276d396e.d.ts} +7 -6
- package/lib/{type-c00e03bd.d.ts → type-00b215cb.d.ts} +4 -4
- package/lib/{type-0d4eb827.d.ts → type-25c99d71.d.ts} +1 -1
- package/package.json +1 -1
- package/src/raydium/liquidity/liquidity.ts +4 -3
- package/src/raydium/liquidity/type.ts +1 -0
|
@@ -3,7 +3,7 @@ import * as BN from 'bn.js';
|
|
|
3
3
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
4
4
|
import { GetStructureSchema } from '../../marshmallow/buffer-layout.js';
|
|
5
5
|
|
|
6
|
-
declare const MARKET_STATE_LAYOUT_V3: Structure<_solana_web3_js.PublicKey |
|
|
6
|
+
declare const MARKET_STATE_LAYOUT_V3: Structure<Buffer | _solana_web3_js.PublicKey | BN, "", {
|
|
7
7
|
baseMint: _solana_web3_js.PublicKey;
|
|
8
8
|
quoteMint: _solana_web3_js.PublicKey;
|
|
9
9
|
baseLotSize: BN;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { SOL_INFO, TOKEN_WSOL } from './constant.js';
|
|
2
2
|
export { SPL_MINT_LAYOUT, SplMintLayout } from './layout.js';
|
|
3
|
-
export { bC as LpToken, bB as SplToken, bz as TokenInfo, bA as TokenJson } from '../../type-
|
|
3
|
+
export { bC as LpToken, bB as SplToken, bz as TokenInfo, bA as TokenJson } from '../../type-00b215cb.js';
|
|
4
4
|
export { parseTokenInfo, solToWSolToken, toApiV3Token, toFeeConfig, toToken, toTokenAmount, toTokenInfo, wSolToSolToken } from './utils.js';
|
|
5
5
|
import '@solana/web3.js';
|
|
6
6
|
import 'bn.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@solana/web3.js';
|
|
2
|
-
import '../../type-
|
|
3
|
-
export { j as default } from '../../raydium-
|
|
2
|
+
import '../../type-00b215cb.js';
|
|
3
|
+
export { j as default } from '../../raydium-276d396e.js';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '@solana/spl-token';
|
|
6
6
|
import '../../solana/type.js';
|
|
@@ -21,7 +21,8 @@ import '../account/types.js';
|
|
|
21
21
|
import '../account/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
|
-
import '
|
|
24
|
+
import '../liquidity/stable.js';
|
|
25
|
+
import '../../type-25c99d71.js';
|
|
25
26
|
import '../clmm/layout.js';
|
|
26
27
|
import '../cpmm/type.js';
|
|
27
28
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { bC as LpToken, bB as SplToken, bz as TokenInfo, bA as TokenJson } from '../../type-
|
|
1
|
+
export { bC as LpToken, bB as SplToken, bz as TokenInfo, bA as TokenJson } from '../../type-00b215cb.js';
|
|
2
2
|
import '../../module/token.js';
|
|
3
3
|
import '@solana/web3.js';
|
|
4
4
|
import 'bn.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection, PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { RawMint, TransferFeeConfig } from '@solana/spl-token';
|
|
3
|
-
import { bz as TokenInfo, a9 as BigNumberish, c1 as TokenAmount, e as ApiV3Token } from '../../type-
|
|
3
|
+
import { bz as TokenInfo, a9 as BigNumberish, c1 as TokenAmount, e as ApiV3Token } from '../../type-00b215cb.js';
|
|
4
4
|
import { Token } from '../../module/token.js';
|
|
5
5
|
import 'bn.js';
|
|
6
6
|
import '../../solana/type.js';
|
|
@@ -2,7 +2,7 @@ export { makeSwapInstruction, route1Instruction, route2Instruction, routeInstruc
|
|
|
2
2
|
export { BasicPoolInfo, ComputeAmountOutAmmLayout, ComputeAmountOutLayout, ComputeAmountOutRouteLayout, ComputePoolType, ComputeRoutePathType, MakeSwapInstructionParam, PoolAccountInfoV4, ReturnTypeFetchMultipleInfo, ReturnTypeGetAddLiquidityDefaultPool, ReturnTypeGetAllRoute, ReturnTypeMakeSwapInstruction, ReturnTypeMakeSwapTransaction, RoutePathType } from './type.js';
|
|
3
3
|
import '@solana/web3.js';
|
|
4
4
|
import 'bn.js';
|
|
5
|
-
import '../../type-
|
|
5
|
+
import '../../type-00b215cb.js';
|
|
6
6
|
import '@solana/spl-token';
|
|
7
7
|
import '../../solana/type.js';
|
|
8
8
|
import '../../common/txTool/txType.js';
|
|
@@ -17,7 +17,7 @@ import '../../common/logger.js';
|
|
|
17
17
|
import '../../module/currency.js';
|
|
18
18
|
import '../liquidity/type.js';
|
|
19
19
|
import '../liquidity/layout.js';
|
|
20
|
-
import '../../type-
|
|
20
|
+
import '../../type-25c99d71.js';
|
|
21
21
|
import '../clmm/layout.js';
|
|
22
22
|
import '../cpmm/type.js';
|
|
23
23
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
2
2
|
import BN__default from 'bn.js';
|
|
3
|
-
import { n as ApiV3PoolInfoItem, w as PoolKeys } from '../../type-
|
|
3
|
+
import { n as ApiV3PoolInfoItem, w as PoolKeys } from '../../type-00b215cb.js';
|
|
4
4
|
import { ComputePoolType, MakeSwapInstructionParam, ReturnTypeMakeSwapInstruction } from './type.js';
|
|
5
5
|
import '@solana/spl-token';
|
|
6
6
|
import '../../solana/type.js';
|
|
@@ -16,7 +16,7 @@ import '../../common/logger.js';
|
|
|
16
16
|
import '../../module/currency.js';
|
|
17
17
|
import '../liquidity/type.js';
|
|
18
18
|
import '../liquidity/layout.js';
|
|
19
|
-
import '../../type-
|
|
19
|
+
import '../../type-25c99d71.js';
|
|
20
20
|
import '../clmm/layout.js';
|
|
21
21
|
import '../cpmm/type.js';
|
|
22
22
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '@solana/web3.js';
|
|
2
2
|
import '../../common/txTool/txType.js';
|
|
3
|
-
import '../../type-
|
|
4
|
-
export { i as default } from '../../raydium-
|
|
3
|
+
import '../../type-00b215cb.js';
|
|
4
|
+
export { i as default } from '../../raydium-276d396e.js';
|
|
5
5
|
import 'bn.js';
|
|
6
6
|
import '../liquidity/type.js';
|
|
7
|
-
import '../../type-
|
|
7
|
+
import '../../type-25c99d71.js';
|
|
8
8
|
import './type.js';
|
|
9
9
|
import '../cpmm/type.js';
|
|
10
10
|
import '@solana/spl-token';
|
|
@@ -23,6 +23,7 @@ import 'axios';
|
|
|
23
23
|
import '../../api/url.js';
|
|
24
24
|
import '../account/types.js';
|
|
25
25
|
import '../account/layout.js';
|
|
26
|
+
import '../liquidity/stable.js';
|
|
26
27
|
import '../clmm/layout.js';
|
|
27
28
|
import '../liquidity/layout.js';
|
|
28
29
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PublicKey, Keypair, Signer, TransactionInstruction, Transaction } from '@solana/web3.js';
|
|
2
2
|
import BN__default from 'bn.js';
|
|
3
|
-
import { bK as TransferAmountFee, c1 as TokenAmount, w as PoolKeys, n as ApiV3PoolInfoItem } from '../../type-
|
|
3
|
+
import { bK as TransferAmountFee, c1 as TokenAmount, w as PoolKeys, n as ApiV3PoolInfoItem } from '../../type-00b215cb.js';
|
|
4
4
|
import Decimal from 'decimal.js';
|
|
5
5
|
import { Token } from '../../module/token.js';
|
|
6
6
|
import { ComputeAmountOutParam } from '../liquidity/type.js';
|
|
7
|
-
import { d as ComputeClmmPoolInfo } from '../../type-
|
|
7
|
+
import { d as ComputeClmmPoolInfo } from '../../type-25c99d71.js';
|
|
8
8
|
import { CpmmComputeData } from '../cpmm/type.js';
|
|
9
9
|
import '@solana/spl-token';
|
|
10
10
|
import '../../solana/type.js';
|
package/lib/raydium/type.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@solana/web3.js';
|
|
2
2
|
import '@solana/spl-token';
|
|
3
|
-
export { bS as ArrayItem, bI as ComputeBudgetConfig, bZ as Cover, bT as ExactPartial, bU as ExactRequired, bY as Fallback, bL as GetTransferAmountFee, bW as GetValue, bH as InstructionReturn, bJ as LoadParams, bG as MakeMultiTransaction, bE as MakeTransaction, bF as MakeV0Transaction, bP as MayArray, bQ as MayDeepArray, bR as MayFunction, bO as ReplaceType, bM as ReturnTypeFetchMultipleMintInfo, bN as ReturnTypeFetchMultipleMintInfos, bV as SKeyof, bX as SOR, bD as SignAllTransactions, bK as TransferAmountFee, b_ as UnionCover, b$ as unionArr } from '../type-
|
|
3
|
+
export { bS as ArrayItem, bI as ComputeBudgetConfig, bZ as Cover, bT as ExactPartial, bU as ExactRequired, bY as Fallback, bL as GetTransferAmountFee, bW as GetValue, bH as InstructionReturn, bJ as LoadParams, bG as MakeMultiTransaction, bE as MakeTransaction, bF as MakeV0Transaction, bP as MayArray, bQ as MayDeepArray, bR as MayFunction, bO as ReplaceType, bM as ReturnTypeFetchMultipleMintInfo, bN as ReturnTypeFetchMultipleMintInfos, bV as SKeyof, bX as SOR, bD as SignAllTransactions, bK as TransferAmountFee, b_ as UnionCover, b$ as unionArr } from '../type-00b215cb.js';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '../solana/type.js';
|
|
6
6
|
import '../common/txTool/txType.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-
|
|
1
|
+
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-276d396e.js';
|
|
2
2
|
import '@solana/web3.js';
|
|
3
3
|
import '../../api/api.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import '../../solana/type.js';
|
|
6
|
-
import '../../type-
|
|
6
|
+
import '../../type-00b215cb.js';
|
|
7
7
|
import 'bn.js';
|
|
8
8
|
import '@solana/spl-token';
|
|
9
9
|
import '../../common/txTool/txType.js';
|
|
@@ -21,7 +21,8 @@ import '../account/types.js';
|
|
|
21
21
|
import '../account/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
|
-
import '
|
|
24
|
+
import '../liquidity/stable.js';
|
|
25
|
+
import '../../type-25c99d71.js';
|
|
25
26
|
import '../clmm/layout.js';
|
|
26
27
|
import '../cpmm/type.js';
|
|
27
28
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import '../../marshmallow/index.js';
|
|
2
2
|
import '@solana/web3.js';
|
|
3
3
|
import 'bn.js';
|
|
4
|
-
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-
|
|
4
|
+
export { S as SHOW_INFO, d as canClaimErrorType, U as default } from '../../raydium-276d396e.js';
|
|
5
5
|
import '../../marshmallow/buffer-layout.js';
|
|
6
6
|
import '../../api/api.js';
|
|
7
7
|
import 'axios';
|
|
8
8
|
import '../../solana/type.js';
|
|
9
|
-
import '../../type-
|
|
9
|
+
import '../../type-00b215cb.js';
|
|
10
10
|
import '@solana/spl-token';
|
|
11
11
|
import '../../common/txTool/txType.js';
|
|
12
12
|
import '../../common/owner.js';
|
|
@@ -21,7 +21,8 @@ import '../account/types.js';
|
|
|
21
21
|
import '../account/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
|
-
import '
|
|
24
|
+
import '../liquidity/stable.js';
|
|
25
|
+
import '../../type-25c99d71.js';
|
|
25
26
|
import '../clmm/layout.js';
|
|
26
27
|
import '../cpmm/type.js';
|
|
27
28
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PublicKey, Commitment, EpochInfo, Connection, Transaction, Signer, TransactionInstruction, Keypair } from '@solana/web3.js';
|
|
2
2
|
import { Api } from './api/api.js';
|
|
3
|
-
import { ax as TxBuilder, ap as AddInstructionParam, a9 as BigNumberish, bk as CreateFarm, aw as MakeTxData, bl as CreateFarmExtInfo, bm as UpdateFarmReward, bn as UpdateFarmRewards, bo as FarmDWParam, U as FormatFarmInfoOut, bI as ComputeBudgetConfig, av as MakeMultiTxData, l as ApiV3PoolInfoStandardItem, c5 as Percent, c1 as TokenAmount, s as AmmV4Keys, t as AmmV5Keys, k as ApiV3PoolInfoConcentratedItem, S as FormatFarmInfoOutV6, v as ClmmKeys, bE as MakeTransaction, bN as ReturnTypeFetchMultipleMintInfos, C as CpmmKeys, bL as GetTransferAmountFee, w as PoolKeys, e as ApiV3Token, X as OwnerIdoInfo, Y as IdoKeysData, bJ as LoadParams, J as JupTokenType, bz as TokenInfo, bD as SignAllTransactions, V as AvailabilityCheckAPI3, f as ApiV3TokenRes } from './type-
|
|
3
|
+
import { ax as TxBuilder, ap as AddInstructionParam, a9 as BigNumberish, bk as CreateFarm, aw as MakeTxData, bl as CreateFarmExtInfo, bm as UpdateFarmReward, bn as UpdateFarmRewards, bo as FarmDWParam, U as FormatFarmInfoOut, bI as ComputeBudgetConfig, av as MakeMultiTxData, l as ApiV3PoolInfoStandardItem, c5 as Percent, c1 as TokenAmount, s as AmmV4Keys, t as AmmV5Keys, k as ApiV3PoolInfoConcentratedItem, S as FormatFarmInfoOutV6, v as ClmmKeys, bE as MakeTransaction, bN as ReturnTypeFetchMultipleMintInfos, C as CpmmKeys, bL as GetTransferAmountFee, w as PoolKeys, e as ApiV3Token, X as OwnerIdoInfo, Y as IdoKeysData, bJ as LoadParams, J as JupTokenType, bz as TokenInfo, bD as SignAllTransactions, V as AvailabilityCheckAPI3, f as ApiV3TokenRes } from './type-00b215cb.js';
|
|
4
4
|
import { API_URL_CONFIG } from './api/url.js';
|
|
5
5
|
import { Owner } from './common/owner.js';
|
|
6
6
|
import { Cluster } from './solana/type.js';
|
|
@@ -10,7 +10,8 @@ import { TxVersion } from './common/txTool/txType.js';
|
|
|
10
10
|
import BN__default from 'bn.js';
|
|
11
11
|
import Decimal from 'decimal.js';
|
|
12
12
|
import { AddLiquidityParams, RemoveParams, CreatePoolParam, CreatePoolAddress, ComputeAmountOutParam, SwapParam, AmmRpcData } from './raydium/liquidity/type.js';
|
|
13
|
-
import {
|
|
13
|
+
import { StableLayout } from './raydium/liquidity/stable.js';
|
|
14
|
+
import { m as CreateConcentratedPool, O as OpenPositionFromBase, p as OpenPositionFromBaseExtInfo, q as OpenPositionFromLiquidity, r as OpenPositionFromLiquidityExtInfo, I as IncreasePositionFromLiquidity, M as ManipulateLiquidityExtInfo, n as IncreasePositionFromBase, D as DecreaseLiquidity, B as ClosePositionExtInfo, s as InitRewardParams, E as InitRewardExtInfo, t as InitRewardsParams, u as SetRewardParams, v as SetRewardsParams, w as CollectRewardParams, x as CollectRewardsParams, H as HarvestAllRewardsParams, F as ClmmRpcData, d as ComputeClmmPoolInfo, l as ReturnTypeFetchMultiplePoolTickArrays } from './type-25c99d71.js';
|
|
14
15
|
import { ClmmPositionLayout, PositionInfoLayout, PoolInfoLayout } from './raydium/clmm/layout.js';
|
|
15
16
|
import { CpmmRpcData, CpmmComputeData, CreateCpmmPoolParam, CreateCpmmPoolAddress, AddCpmmLiquidityParams, WithdrawCpmmLiquidityParams, CpmmSwapParams, ComputePairAmountParams } from './raydium/cpmm/type.js';
|
|
16
17
|
import { ComputeAmountOutLayout, BasicPoolInfo, ReturnTypeGetAllRoute, ComputeRoutePathType, ComputePoolType, ReturnTypeFetchMultipleInfo } from './raydium/tradeV2/type.js';
|
|
@@ -115,7 +116,7 @@ declare class Farm extends ModuleBase {
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
declare class LiquidityModule extends ModuleBase {
|
|
118
|
-
|
|
119
|
+
stableLayout: StableLayout;
|
|
119
120
|
constructor(params: ModuleBaseProps);
|
|
120
121
|
initLayout(): Promise<void>;
|
|
121
122
|
load(): Promise<void>;
|
|
@@ -167,7 +168,7 @@ declare class LiquidityModule extends ModuleBase {
|
|
|
167
168
|
priceImpact: Decimal;
|
|
168
169
|
fee: BN__default;
|
|
169
170
|
};
|
|
170
|
-
swap<T extends TxVersion>({ poolInfo, amountIn, amountOut, inputMint, fixedSide, txVersion, computeBudgetConfig, }: SwapParam<T>): Promise<MakeTxData<T>>;
|
|
171
|
+
swap<T extends TxVersion>({ poolInfo, poolKeys: propPoolKeys, amountIn, amountOut, inputMint, fixedSide, txVersion, computeBudgetConfig, }: SwapParam<T>): Promise<MakeTxData<T>>;
|
|
171
172
|
getRpcPoolInfo(poolId: string): Promise<AmmRpcData>;
|
|
172
173
|
getRpcPoolInfos(poolIds: (string | PublicKey)[], config?: {
|
|
173
174
|
batchRequest?: boolean;
|
|
@@ -391,7 +392,7 @@ interface SHOW_INFO {
|
|
|
391
392
|
declare type canClaimErrorType = "outOfOperationalTime" | "alreadyClaimIt" | undefined;
|
|
392
393
|
declare class Utils1216 extends ModuleBase {
|
|
393
394
|
static CLAIMED_NUM: number;
|
|
394
|
-
static POOL_LAYOUT: Structure<number |
|
|
395
|
+
static POOL_LAYOUT: Structure<number | Buffer | PublicKey | BN__default | BN__default[] | {
|
|
395
396
|
mintDecimals: number;
|
|
396
397
|
mintAddress: PublicKey;
|
|
397
398
|
mintVault: PublicKey;
|
|
@@ -412,7 +413,7 @@ declare class Utils1216 extends ModuleBase {
|
|
|
412
413
|
totalClaimedAmount: BN__default;
|
|
413
414
|
}[];
|
|
414
415
|
}>;
|
|
415
|
-
static OWNER_LAYOUT: Structure<number |
|
|
416
|
+
static OWNER_LAYOUT: Structure<number | Buffer | PublicKey | BN__default | BN__default[] | {
|
|
416
417
|
mintAddress: PublicKey;
|
|
417
418
|
debtAmount: BN__default;
|
|
418
419
|
claimedAmount: BN__default;
|
|
@@ -661,7 +661,7 @@ declare const realFarmStateV3Layout: Structure<PublicKey | BN__default, "", {
|
|
|
661
661
|
lastSlot: BN__default;
|
|
662
662
|
perSlotReward: BN__default;
|
|
663
663
|
}>;
|
|
664
|
-
declare const realFarmStateV5Layout: Structure<number |
|
|
664
|
+
declare const realFarmStateV5Layout: Structure<number | Buffer | PublicKey | BN__default, "", {
|
|
665
665
|
state: BN__default;
|
|
666
666
|
nonce: BN__default;
|
|
667
667
|
lpVault: PublicKey;
|
|
@@ -905,7 +905,7 @@ declare const dwLayout: Structure<number | BN__default, "", {
|
|
|
905
905
|
instruction: number;
|
|
906
906
|
amount: BN__default;
|
|
907
907
|
}>;
|
|
908
|
-
declare const VoterVotingMintConfig: Structure<number[] |
|
|
908
|
+
declare const VoterVotingMintConfig: Structure<PublicKey | number[] | BN__default | BN__default[], "", {
|
|
909
909
|
mint: PublicKey;
|
|
910
910
|
grantAuthority: PublicKey;
|
|
911
911
|
baselineVoteWeightScaledFactor: BN__default;
|
|
@@ -915,7 +915,7 @@ declare const VoterVotingMintConfig: Structure<number[] | PublicKey | BN__defaul
|
|
|
915
915
|
reserved1: number[];
|
|
916
916
|
reserved2: BN__default[];
|
|
917
917
|
}>;
|
|
918
|
-
declare const VoterRegistrar: Structure<number |
|
|
918
|
+
declare const VoterRegistrar: Structure<number | Buffer | PublicKey | number[] | BN__default | BN__default[] | {
|
|
919
919
|
mint: PublicKey;
|
|
920
920
|
grantAuthority: PublicKey;
|
|
921
921
|
baselineVoteWeightScaledFactor: BN__default;
|
|
@@ -970,7 +970,7 @@ declare const VoterDepositEntry: Structure<number | boolean | number[] | BN__def
|
|
|
970
970
|
allowClawback: boolean;
|
|
971
971
|
votingMintConfigIdx: number;
|
|
972
972
|
}>;
|
|
973
|
-
declare const Voter: Structure<number |
|
|
973
|
+
declare const Voter: Structure<number | Buffer | PublicKey | number[] | {
|
|
974
974
|
reserved: number[];
|
|
975
975
|
lockup: {
|
|
976
976
|
startTime: BN__default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PublicKey, Transaction, Signer, Keypair, TransactionInstruction, EpochInfo } from '@solana/web3.js';
|
|
2
2
|
import BN__default from 'bn.js';
|
|
3
3
|
import Decimal from 'decimal.js';
|
|
4
|
-
import { k as ApiV3PoolInfoConcentratedItem, b as ApiClmmConfigInfo, e as ApiV3Token, bL as GetTransferAmountFee, bK as TransferAmountFee, c6 as Price, c5 as Percent, c1 as TokenAmount, bI as ComputeBudgetConfig, c3 as Fraction, bz as TokenInfo, v as ClmmKeys } from './type-
|
|
4
|
+
import { k as ApiV3PoolInfoConcentratedItem, b as ApiClmmConfigInfo, e as ApiV3Token, bL as GetTransferAmountFee, bK as TransferAmountFee, c6 as Price, c5 as Percent, c1 as TokenAmount, bI as ComputeBudgetConfig, c3 as Fraction, bz as TokenInfo, v as ClmmKeys } from './type-00b215cb.js';
|
|
5
5
|
import { TxVersion } from './common/txTool/txType.js';
|
|
6
6
|
import { ClmmPositionLayout, PoolInfoLayout } from './raydium/clmm/layout.js';
|
|
7
7
|
|
package/package.json
CHANGED
|
@@ -55,7 +55,7 @@ import BN from "bn.js";
|
|
|
55
55
|
import Decimal from "decimal.js";
|
|
56
56
|
|
|
57
57
|
export default class LiquidityModule extends ModuleBase {
|
|
58
|
-
|
|
58
|
+
public stableLayout: StableLayout;
|
|
59
59
|
|
|
60
60
|
constructor(params: ModuleBaseProps) {
|
|
61
61
|
super(params);
|
|
@@ -741,7 +741,7 @@ export default class LiquidityModule extends ModuleBase {
|
|
|
741
741
|
}
|
|
742
742
|
|
|
743
743
|
const [reserveIn, reserveOut] = reserves;
|
|
744
|
-
const isVersion4 = poolInfo.
|
|
744
|
+
const isVersion4 = poolInfo.version === 4;
|
|
745
745
|
let currentPrice: Decimal;
|
|
746
746
|
if (isVersion4) {
|
|
747
747
|
currentPrice = new Decimal(reserveOut.toString()).div(reserveIn.toString());
|
|
@@ -823,6 +823,7 @@ export default class LiquidityModule extends ModuleBase {
|
|
|
823
823
|
|
|
824
824
|
public async swap<T extends TxVersion>({
|
|
825
825
|
poolInfo,
|
|
826
|
+
poolKeys: propPoolKeys,
|
|
826
827
|
amountIn,
|
|
827
828
|
amountOut,
|
|
828
829
|
inputMint,
|
|
@@ -865,7 +866,7 @@ export default class LiquidityModule extends ModuleBase {
|
|
|
865
866
|
});
|
|
866
867
|
txBuilder.addInstruction(accountOutIns);
|
|
867
868
|
|
|
868
|
-
const poolKeys = await this.getAmmPoolKeys(poolInfo.id);
|
|
869
|
+
const poolKeys = propPoolKeys || (await this.getAmmPoolKeys(poolInfo.id));
|
|
869
870
|
let version = 4;
|
|
870
871
|
if (poolInfo.pooltype.includes("StablePool")) version = 5;
|
|
871
872
|
|