@raydium-io/raydium-sdk-v2 0.0.41-alpha → 0.0.43-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 +2 -1
- package/lib/api/api.js +1 -1
- package/lib/api/api.js.map +1 -1
- package/lib/api/api.mjs +1 -1
- package/lib/api/api.mjs.map +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/index.js +1 -1
- package/lib/api/index.js.map +1 -1
- package/lib/api/index.mjs +1 -1
- package/lib/api/index.mjs.map +1 -1
- package/lib/api/type.d.ts +1 -1
- package/lib/api/type.js.map +1 -1
- package/lib/api/type.mjs.map +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 +3 -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 +3 -3
- package/lib/raydium/clmm/index.d.ts +3 -3
- package/lib/raydium/clmm/instrument.d.ts +2 -2
- 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 +3 -3
- package/lib/raydium/cpmm/index.d.ts +1 -1
- 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 +3 -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 +3 -3
- package/lib/raydium/ido/index.d.ts +3 -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 +3 -3
- package/lib/raydium/liquidity/type.d.ts +1 -1
- package/lib/raydium/liquidity/utils.d.ts +1 -1
- package/lib/raydium/marketV2/createMarket.d.ts +3 -3
- package/lib/raydium/marketV2/createMarket.js +1 -1
- package/lib/raydium/marketV2/createMarket.js.map +1 -1
- package/lib/raydium/marketV2/createMarket.mjs +1 -1
- package/lib/raydium/marketV2/createMarket.mjs.map +1 -1
- package/lib/raydium/marketV2/index.d.ts +3 -3
- package/lib/raydium/marketV2/index.js +1 -1
- package/lib/raydium/marketV2/index.js.map +1 -1
- package/lib/raydium/marketV2/index.mjs +1 -1
- package/lib/raydium/marketV2/index.mjs.map +1 -1
- package/lib/raydium/moduleBase.d.ts +3 -3
- package/lib/raydium/raydium.d.ts +3 -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/token/constant.d.ts +1 -1
- package/lib/raydium/token/index.d.ts +1 -1
- package/lib/raydium/token/token.d.ts +3 -3
- package/lib/raydium/token/token.js +1 -1
- package/lib/raydium/token/token.js.map +1 -1
- package/lib/raydium/token/token.mjs +1 -1
- package/lib/raydium/token/token.mjs.map +1 -1
- 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 +3 -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 +3 -3
- package/lib/raydium/utils1216/utils1216.d.ts +3 -3
- package/lib/{raydium-d05441b6.d.ts → raydium-0396913e.d.ts} +4 -2
- package/lib/{type-08d7cf11.d.ts → type-085c771c.d.ts} +1 -1
- package/lib/{type-15746482.d.ts → type-9fe71e3c.d.ts} +1 -0
- package/package.json +1 -1
- package/src/api/api.ts +1 -6
- package/src/api/type.ts +1 -0
- package/src/raydium/marketV2/createMarket.ts +26 -12
- package/src/raydium/token/token.ts +6 -1
|
@@ -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-9fe71e3c.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 } 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-9fe71e3c.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 { ComputeAmountOutAmmLayout, ComputeAmountOutLayout, ComputeAmountOutRouteLayout, 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-9fe71e3c.js';
|
|
6
6
|
import '@solana/spl-token';
|
|
7
7
|
import '../../solana/type.js';
|
|
8
8
|
import '../../common/txTool/txType.js';
|
|
@@ -15,5 +15,5 @@ import '../../marshmallow/index.js';
|
|
|
15
15
|
import '../../marshmallow/buffer-layout.js';
|
|
16
16
|
import '../../common/logger.js';
|
|
17
17
|
import '../../module/currency.js';
|
|
18
|
-
import '../../type-
|
|
18
|
+
import '../../type-085c771c.js';
|
|
19
19
|
import '../clmm/layout.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-9fe71e3c.js';
|
|
4
4
|
import { ReturnTypeMakeSwapInstruction, ComputeAmountOutLayout } from './type.js';
|
|
5
5
|
import '@solana/spl-token';
|
|
6
6
|
import '../../solana/type.js';
|
|
@@ -14,7 +14,7 @@ import '../../marshmallow/index.js';
|
|
|
14
14
|
import '../../marshmallow/buffer-layout.js';
|
|
15
15
|
import '../../common/logger.js';
|
|
16
16
|
import '../../module/currency.js';
|
|
17
|
-
import '../../type-
|
|
17
|
+
import '../../type-085c771c.js';
|
|
18
18
|
import '../clmm/layout.js';
|
|
19
19
|
|
|
20
20
|
declare function route1Instruction(programId: PublicKey, poolInfoA: ApiV3PoolInfoItem, poolKeyA: PoolKeys, poolKeyB: PoolKeys, userSourceToken: PublicKey, userRouteToken: PublicKey, userPdaAccount: PublicKey, ownerWallet: PublicKey, inputMint: PublicKey, amountIn: BN__default, amountOut: BN__default, tickArrayA?: PublicKey[]): TransactionInstruction;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@solana/web3.js';
|
|
2
|
-
export { i as default } from '../../raydium-
|
|
2
|
+
export { i as default } from '../../raydium-0396913e.js';
|
|
3
3
|
import './type.js';
|
|
4
|
-
import '../../type-
|
|
4
|
+
import '../../type-9fe71e3c.js';
|
|
5
5
|
import '../../api/api.js';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import '../../solana/type.js';
|
|
@@ -21,7 +21,7 @@ import '../../module/currency.js';
|
|
|
21
21
|
import '../account/types.js';
|
|
22
22
|
import '../account/layout.js';
|
|
23
23
|
import '../liquidity/type.js';
|
|
24
|
-
import '../../type-
|
|
24
|
+
import '../../type-085c771c.js';
|
|
25
25
|
import '../clmm/layout.js';
|
|
26
26
|
import '../cpmm/type.js';
|
|
27
27
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
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, c6 as Price, c5 as Percent, c1 as TokenAmount, n as ApiV3PoolInfoItem, w as PoolKeys } from '../../type-
|
|
3
|
+
import { bK as TransferAmountFee, c6 as Price, c5 as Percent, c1 as TokenAmount, n as ApiV3PoolInfoItem, w as PoolKeys } from '../../type-9fe71e3c.js';
|
|
4
4
|
import { Token } from '../../module/token.js';
|
|
5
|
-
import { c as ClmmPoolInfo } from '../../type-
|
|
5
|
+
import { c as ClmmPoolInfo } from '../../type-085c771c.js';
|
|
6
6
|
import '@solana/spl-token';
|
|
7
7
|
import '../../solana/type.js';
|
|
8
8
|
import '../../common/txTool/txType.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-9fe71e3c.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-0396913e.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-9fe71e3c.js';
|
|
7
7
|
import 'bn.js';
|
|
8
8
|
import '@solana/spl-token';
|
|
9
9
|
import '../../common/txTool/txType.js';
|
|
@@ -20,7 +20,7 @@ import '../../api/url.js';
|
|
|
20
20
|
import '../account/types.js';
|
|
21
21
|
import '../account/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
|
-
import '../../type-
|
|
23
|
+
import '../../type-085c771c.js';
|
|
24
24
|
import '../clmm/layout.js';
|
|
25
25
|
import '../cpmm/type.js';
|
|
26
26
|
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-0396913e.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-9fe71e3c.js';
|
|
10
10
|
import '@solana/spl-token';
|
|
11
11
|
import '../../common/txTool/txType.js';
|
|
12
12
|
import '../../common/owner.js';
|
|
@@ -20,7 +20,7 @@ import '../../api/url.js';
|
|
|
20
20
|
import '../account/types.js';
|
|
21
21
|
import '../account/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
|
-
import '../../type-
|
|
23
|
+
import '../../type-085c771c.js';
|
|
24
24
|
import '../clmm/layout.js';
|
|
25
25
|
import '../cpmm/type.js';
|
|
26
26
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PublicKey, Commitment, Connection, Transaction, Signer, TransactionInstruction, Keypair, EpochInfo } 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, C as CpmmKeys, bL as GetTransferAmountFee, X as OwnerIdoInfo, Y as IdoKeysData, bJ as LoadParams, J as JupTokenType, bz as TokenInfo, e as ApiV3Token, 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, C as CpmmKeys, bL as GetTransferAmountFee, X as OwnerIdoInfo, Y as IdoKeysData, bJ as LoadParams, J as JupTokenType, bz as TokenInfo, e as ApiV3Token, bD as SignAllTransactions, V as AvailabilityCheckAPI3, f as ApiV3TokenRes } from './type-9fe71e3c.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,7 @@ 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 } from './raydium/liquidity/type.js';
|
|
13
|
-
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 } from './type-
|
|
13
|
+
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 } from './type-085c771c.js';
|
|
14
14
|
import { ClmmPositionLayout, PositionInfoLayout, PoolInfoLayout } from './raydium/clmm/layout.js';
|
|
15
15
|
import { CpmmConfigInfoInterface, CreateCpmmPoolParam, CreateCpmmPoolAddress, AddCpmmLiquidityParams, WithdrawCpmmLiquidityParams, CpmmSwapParams, ComputePairAmountParams } from './raydium/cpmm/type.js';
|
|
16
16
|
import { CpmmPoolInfoLayout } from './raydium/cpmm/layout.js';
|
|
@@ -439,6 +439,7 @@ declare class TokenModule extends ModuleBase {
|
|
|
439
439
|
private _tokenMap;
|
|
440
440
|
private _blackTokenMap;
|
|
441
441
|
private _mintGroup;
|
|
442
|
+
private _whiteMap;
|
|
442
443
|
private _extraTokenList;
|
|
443
444
|
constructor(params: ModuleBaseProps);
|
|
444
445
|
load(params?: LoadParams & {
|
|
@@ -451,6 +452,7 @@ declare class TokenModule extends ModuleBase {
|
|
|
451
452
|
official: Set<string>;
|
|
452
453
|
jup: Set<string>;
|
|
453
454
|
};
|
|
455
|
+
get whiteListMap(): Set<string>;
|
|
454
456
|
/** === util functions === */
|
|
455
457
|
getTokenInfo(mint: string | PublicKey): Promise<ApiV3Token>;
|
|
456
458
|
}
|
|
@@ -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-9fe71e3c.js';
|
|
5
5
|
import { TxVersion } from './common/txTool/txType.js';
|
|
6
6
|
import { ClmmPositionLayout } from './raydium/clmm/layout.js';
|
|
7
7
|
|
package/package.json
CHANGED
package/src/api/api.ts
CHANGED
|
@@ -163,7 +163,7 @@ export class Api {
|
|
|
163
163
|
return this.api.get(this.urlConfigs.RPCS || API_URLS.RPCS);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
async getTokenList(): Promise<{ mintList: ApiV3Token[]; blacklist: ApiV3Token[] }> {
|
|
166
|
+
async getTokenList(): Promise<{ mintList: ApiV3Token[]; blacklist: ApiV3Token[]; whiteList: string[] }> {
|
|
167
167
|
const res = await this.api.get(this.urlConfigs.TOKEN_LIST || API_URLS.TOKEN_LIST);
|
|
168
168
|
return res.data;
|
|
169
169
|
}
|
|
@@ -244,11 +244,6 @@ export class Api {
|
|
|
244
244
|
];
|
|
245
245
|
const [baseMint, quoteMint] = mint2 && mint1 > mint2 ? [mint2, mint1] : [mint1, mint2];
|
|
246
246
|
|
|
247
|
-
console.log(
|
|
248
|
-
123123555,
|
|
249
|
-
`?mint1=${baseMint}&mint2=${quoteMint}&poolType=${type}&poolSortField=${sort}&sortType=${order}&pageSize=100&page=${page}`,
|
|
250
|
-
);
|
|
251
|
-
|
|
252
247
|
const res = await this.api.get(
|
|
253
248
|
(this.urlConfigs.POOL_SEARCH_MINT || API_URLS.POOL_SEARCH_MINT) +
|
|
254
249
|
`?mint1=${baseMint}&mint2=${quoteMint}&poolType=${type}&poolSortField=${sort}&sortType=${order}&pageSize=100&page=${page}`,
|
package/src/api/type.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { MakeMultiTxData, TxBuildData, TxV0BuildData } from "@/common/txTool/txT
|
|
|
7
7
|
import { generatePubKey } from "../account/util";
|
|
8
8
|
import { BN_ZERO } from "@/common/bignumber";
|
|
9
9
|
import { makeCreateMarketInstruction } from "./instrument";
|
|
10
|
-
import { ComputeBudgetConfig } from "@/raydium/type";
|
|
10
|
+
import { ComputeBudgetConfig, MakeMultiTransaction } from "@/raydium/type";
|
|
11
11
|
|
|
12
12
|
interface ExtInfo {
|
|
13
13
|
address: {
|
|
@@ -105,29 +105,30 @@ export default class MarketV2 extends ModuleBase {
|
|
|
105
105
|
},
|
|
106
106
|
});
|
|
107
107
|
const txBuilder = this.createTxBuilder();
|
|
108
|
-
txBuilder.addCustomComputeBudget(computeBudgetConfig);
|
|
108
|
+
// txBuilder.addCustomComputeBudget(computeBudgetConfig);
|
|
109
109
|
txBuilder.addInstruction({
|
|
110
110
|
instructions: allTxArr[0].transaction.instructions,
|
|
111
111
|
signers: allTxArr[0].signer,
|
|
112
112
|
});
|
|
113
113
|
|
|
114
|
-
const extraTxBuildData: any[] = [];
|
|
114
|
+
// const extraTxBuildData: any[] = [];
|
|
115
115
|
|
|
116
116
|
for await (const txData of allTxArr.slice(1, allTxArr.length)) {
|
|
117
|
-
const extraTxBuilder = this.createTxBuilder();
|
|
118
|
-
extraTxBuilder.addCustomComputeBudget(computeBudgetConfig);
|
|
119
|
-
|
|
117
|
+
// const extraTxBuilder = this.createTxBuilder();
|
|
118
|
+
// extraTxBuilder.addCustomComputeBudget(computeBudgetConfig);
|
|
119
|
+
txBuilder.addInstruction({
|
|
120
120
|
instructions: txData.transaction.instructions,
|
|
121
121
|
signers: txData.signer,
|
|
122
122
|
instructionTypes: txData.instructionTypes,
|
|
123
123
|
});
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
|
|
125
|
+
// const build = await extraTxBuilder.versionBuild({ txVersion });
|
|
126
|
+
// extraTxBuildData.push(build);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
if (txVersion === TxVersion.V0)
|
|
130
|
+
return txBuilder.sizeCheckBuildV0({
|
|
131
|
+
computeBudgetConfig,
|
|
131
132
|
address: {
|
|
132
133
|
marketId: market.publicKey,
|
|
133
134
|
requestQueue: requestQueue.publicKey,
|
|
@@ -139,8 +140,21 @@ export default class MarketV2 extends ModuleBase {
|
|
|
139
140
|
baseMint: new PublicKey(baseInfo.mint),
|
|
140
141
|
quoteMin: new PublicKey(quoteInfo.mint),
|
|
141
142
|
},
|
|
143
|
+
}) as Promise<MakeMultiTxData<T, ExtInfo>>;
|
|
144
|
+
|
|
145
|
+
return txBuilder.sizeCheckBuild({
|
|
146
|
+
computeBudgetConfig,
|
|
147
|
+
address: {
|
|
148
|
+
marketId: market.publicKey,
|
|
149
|
+
requestQueue: requestQueue.publicKey,
|
|
150
|
+
eventQueue: eventQueue.publicKey,
|
|
151
|
+
bids: bids.publicKey,
|
|
152
|
+
asks: asks.publicKey,
|
|
153
|
+
baseVault: baseVault.publicKey,
|
|
154
|
+
quoteVault: quoteVault.publicKey,
|
|
155
|
+
baseMint: new PublicKey(baseInfo.mint),
|
|
156
|
+
quoteMin: new PublicKey(quoteInfo.mint),
|
|
142
157
|
},
|
|
143
|
-
txVersion,
|
|
144
158
|
}) as Promise<MakeMultiTxData<T, ExtInfo>>;
|
|
145
159
|
}
|
|
146
160
|
}
|
|
@@ -19,6 +19,7 @@ export default class TokenModule extends ModuleBase {
|
|
|
19
19
|
jup: new Set(),
|
|
20
20
|
extra: new Set(),
|
|
21
21
|
};
|
|
22
|
+
private _whiteMap: Set<string> = new Set();
|
|
22
23
|
private _extraTokenList: TokenInfo[] = [];
|
|
23
24
|
|
|
24
25
|
constructor(params: ModuleBaseProps) {
|
|
@@ -28,13 +29,14 @@ export default class TokenModule extends ModuleBase {
|
|
|
28
29
|
public async load(params?: LoadParams & { type?: JupTokenType }): Promise<void> {
|
|
29
30
|
this.checkDisabled();
|
|
30
31
|
const { forceUpdate = false, type = JupTokenType.Strict } = params || {};
|
|
31
|
-
const { mintList, blacklist } = await this.scope.fetchV3TokenList(forceUpdate);
|
|
32
|
+
const { mintList, blacklist, whiteList } = await this.scope.fetchV3TokenList(forceUpdate);
|
|
32
33
|
const jup = await this.scope.fetchJupTokenList(type, forceUpdate);
|
|
33
34
|
// reset all data
|
|
34
35
|
this._tokenList = [];
|
|
35
36
|
this._tokenMap = new Map();
|
|
36
37
|
this._blackTokenMap = new Map();
|
|
37
38
|
this._mintGroup = { official: new Set(), jup: new Set(), extra: new Set() };
|
|
39
|
+
this._whiteMap = new Set(whiteList);
|
|
38
40
|
|
|
39
41
|
this._tokenMap.set(SOL_INFO.address, SOL_INFO);
|
|
40
42
|
this._mintGroup.official.add(SOL_INFO.address);
|
|
@@ -97,6 +99,9 @@ export default class TokenModule extends ModuleBase {
|
|
|
97
99
|
get mintGroup(): { official: Set<string>; jup: Set<string> } {
|
|
98
100
|
return this._mintGroup;
|
|
99
101
|
}
|
|
102
|
+
get whiteListMap(): Set<string> {
|
|
103
|
+
return this._whiteMap;
|
|
104
|
+
}
|
|
100
105
|
|
|
101
106
|
/** === util functions === */
|
|
102
107
|
|