@raydium-io/raydium-sdk-v2 0.0.22-alpha → 0.0.24-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 -2
- 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/layout.d.ts +6 -6
- 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/cpmm.js +1 -1
- package/lib/raydium/cpmm/cpmm.js.map +1 -1
- package/lib/raydium/cpmm/cpmm.mjs +1 -1
- package/lib/raydium/cpmm/cpmm.mjs.map +1 -1
- package/lib/raydium/cpmm/index.d.ts +1 -1
- package/lib/raydium/cpmm/layout.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/layout.d.ts +2 -2
- 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/index.d.ts +3 -3
- 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/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-97f3539d.d.ts → raydium-54450191.d.ts} +3 -3
- package/lib/{type-2bed92a9.d.ts → type-322fdce2.d.ts} +9 -15
- package/lib/{type-485c1df6.d.ts → type-5c2ec3f0.d.ts} +1 -1
- package/package.json +1 -1
- package/src/api/api.ts +2 -2
- package/src/api/type.ts +0 -6
- package/src/raydium/cpmm/cpmm.ts +3 -1
|
@@ -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 {
|
|
3
|
+
export { bC as LpToken, bB as SplToken, bz as TokenInfo, bA as TokenJson } from '../../type-322fdce2.js';
|
|
4
4
|
export { parseTokenInfo, solToWSolToken, 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-322fdce2.js';
|
|
3
|
+
export { j as default } from '../../raydium-54450191.js';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '@solana/spl-token';
|
|
6
6
|
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-5c2ec3f0.js';
|
|
24
24
|
import '../clmm/layout.js';
|
|
25
25
|
import '../cpmm/type.js';
|
|
26
26
|
import '../cpmm/curve/calculator.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { bC as LpToken, bB as SplToken, bz as TokenInfo, bA as TokenJson } from '../../type-322fdce2.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 {
|
|
3
|
+
import { bz as TokenInfo, a9 as BigNumberish, c1 as TokenAmount, e as ApiV3Token } from '../../type-322fdce2.js';
|
|
4
4
|
import { Token } from '../../module/token.js';
|
|
5
5
|
import 'bn.js';
|
|
6
6
|
import '../../common/txTool/txType.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-322fdce2.js';
|
|
6
6
|
import '@solana/spl-token';
|
|
7
7
|
import '../../common/txTool/txType.js';
|
|
8
8
|
import '../../common/owner.js';
|
|
@@ -14,5 +14,5 @@ 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-5c2ec3f0.js';
|
|
18
18
|
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-322fdce2.js';
|
|
4
4
|
import { ReturnTypeMakeSwapInstruction, ComputeAmountOutLayout } from './type.js';
|
|
5
5
|
import '@solana/spl-token';
|
|
6
6
|
import '../../common/txTool/txType.js';
|
|
@@ -13,7 +13,7 @@ import '../../marshmallow/index.js';
|
|
|
13
13
|
import '../../marshmallow/buffer-layout.js';
|
|
14
14
|
import '../../common/logger.js';
|
|
15
15
|
import '../../module/currency.js';
|
|
16
|
-
import '../../type-
|
|
16
|
+
import '../../type-5c2ec3f0.js';
|
|
17
17
|
import '../clmm/layout.js';
|
|
18
18
|
|
|
19
19
|
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-54450191.js';
|
|
3
3
|
import './type.js';
|
|
4
|
-
import '../../type-
|
|
4
|
+
import '../../type-322fdce2.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-5c2ec3f0.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 {
|
|
3
|
+
import { bK as TransferAmountFee, c6 as Price, c5 as Percent, c1 as TokenAmount, n as ApiV3PoolInfoItem, w as PoolKeys } from '../../type-322fdce2.js';
|
|
4
4
|
import { Token } from '../../module/token.js';
|
|
5
|
-
import { c as ClmmPoolInfo } from '../../type-
|
|
5
|
+
import { c as ClmmPoolInfo } from '../../type-5c2ec3f0.js';
|
|
6
6
|
import '@solana/spl-token';
|
|
7
7
|
import '../../common/txTool/txType.js';
|
|
8
8
|
import '../../common/owner.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 {
|
|
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-322fdce2.js';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '../common/txTool/txType.js';
|
|
6
6
|
import '../common/owner.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-54450191.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-322fdce2.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-5c2ec3f0.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-54450191.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-322fdce2.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-5c2ec3f0.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 {
|
|
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, 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-322fdce2.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-5c2ec3f0.js';
|
|
14
14
|
import { ClmmPositionLayout } from './raydium/clmm/layout.js';
|
|
15
15
|
import { CreateCpmmPoolParam, CreateCpmmPoolAddress, AddCpmmLiquidityParams, WithdrawCpmmLiquidityParams, CpmmSwapParams } from './raydium/cpmm/type.js';
|
|
16
16
|
import { CpmmPoolInfoLayout } from './raydium/cpmm/layout.js';
|
|
@@ -294,11 +294,11 @@ declare class Utils1216 extends ModuleBase {
|
|
|
294
294
|
perLpLoss: BN__default;
|
|
295
295
|
totalClaimedAmount: BN__default;
|
|
296
296
|
}[], "", {
|
|
297
|
+
status: number;
|
|
297
298
|
padding: BN__default[];
|
|
298
299
|
bump: number;
|
|
299
300
|
endTime: BN__default;
|
|
300
301
|
openTime: BN__default;
|
|
301
|
-
status: number;
|
|
302
302
|
ammId: PublicKey;
|
|
303
303
|
tokenInfo: {
|
|
304
304
|
mintDecimals: number;
|
|
@@ -843,37 +843,37 @@ declare type FarmStateV6 = GetStructureSchema<FarmStateLayoutV6>;
|
|
|
843
843
|
declare type FarmState = FarmStateV3 | FarmStateV5 | FarmStateV6;
|
|
844
844
|
declare type FarmStateLayout = FarmStateLayoutV3 | FarmStateLayoutV5 | FarmStateLayoutV6;
|
|
845
845
|
declare const farmLedgerLayoutV3_1: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
846
|
-
state: BN__default;
|
|
847
846
|
id: PublicKey;
|
|
847
|
+
state: BN__default;
|
|
848
848
|
owner: PublicKey;
|
|
849
849
|
deposited: BN__default;
|
|
850
850
|
rewardDebts: BN__default[];
|
|
851
851
|
}>;
|
|
852
852
|
declare const farmLedgerLayoutV3_2: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
853
|
-
state: BN__default;
|
|
854
853
|
id: PublicKey;
|
|
854
|
+
state: BN__default;
|
|
855
855
|
owner: PublicKey;
|
|
856
856
|
deposited: BN__default;
|
|
857
857
|
rewardDebts: BN__default[];
|
|
858
858
|
voteLockedBalance: BN__default;
|
|
859
859
|
}>;
|
|
860
860
|
declare const farmLedgerLayoutV5_1: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
861
|
-
state: BN__default;
|
|
862
861
|
id: PublicKey;
|
|
862
|
+
state: BN__default;
|
|
863
863
|
owner: PublicKey;
|
|
864
864
|
deposited: BN__default;
|
|
865
865
|
rewardDebts: BN__default[];
|
|
866
866
|
}>;
|
|
867
867
|
declare const farmLedgerLayoutV5_2: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
868
|
-
state: BN__default;
|
|
869
868
|
id: PublicKey;
|
|
869
|
+
state: BN__default;
|
|
870
870
|
owner: PublicKey;
|
|
871
871
|
deposited: BN__default;
|
|
872
872
|
rewardDebts: BN__default[];
|
|
873
873
|
}>;
|
|
874
874
|
declare const farmLedgerLayoutV6_1: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
875
|
-
state: BN__default;
|
|
876
875
|
id: PublicKey;
|
|
876
|
+
state: BN__default;
|
|
877
877
|
owner: PublicKey;
|
|
878
878
|
deposited: BN__default;
|
|
879
879
|
rewardDebts: BN__default[];
|
|
@@ -894,7 +894,7 @@ declare const dwLayout: Structure<number | BN__default, "", {
|
|
|
894
894
|
instruction: number;
|
|
895
895
|
amount: BN__default;
|
|
896
896
|
}>;
|
|
897
|
-
declare const VoterVotingMintConfig: Structure<
|
|
897
|
+
declare const VoterVotingMintConfig: Structure<number[] | PublicKey | BN__default | BN__default[], "", {
|
|
898
898
|
mint: PublicKey;
|
|
899
899
|
grantAuthority: PublicKey;
|
|
900
900
|
baselineVoteWeightScaledFactor: BN__default;
|
|
@@ -904,7 +904,7 @@ declare const VoterVotingMintConfig: Structure<PublicKey | number[] | BN__defaul
|
|
|
904
904
|
reserved1: number[];
|
|
905
905
|
reserved2: BN__default[];
|
|
906
906
|
}>;
|
|
907
|
-
declare const VoterRegistrar: Structure<number |
|
|
907
|
+
declare const VoterRegistrar: Structure<number | number[] | PublicKey | Buffer | BN__default | BN__default[] | {
|
|
908
908
|
mint: PublicKey;
|
|
909
909
|
grantAuthority: PublicKey;
|
|
910
910
|
baselineVoteWeightScaledFactor: BN__default;
|
|
@@ -959,7 +959,7 @@ declare const VoterDepositEntry: Structure<number | boolean | number[] | BN__def
|
|
|
959
959
|
allowClawback: boolean;
|
|
960
960
|
votingMintConfigIdx: number;
|
|
961
961
|
}>;
|
|
962
|
-
declare const Voter: Structure<number |
|
|
962
|
+
declare const Voter: Structure<number | number[] | PublicKey | Buffer | {
|
|
963
963
|
reserved: number[];
|
|
964
964
|
lockup: {
|
|
965
965
|
startTime: BN__default;
|
|
@@ -1079,12 +1079,6 @@ declare enum JupTokenType {
|
|
|
1079
1079
|
Strict = "strict"
|
|
1080
1080
|
}
|
|
1081
1081
|
declare type PoolsApiReturn = ApiV3PageIns<ApiV3PoolInfoItem>;
|
|
1082
|
-
interface SearchPoolsApiReturn {
|
|
1083
|
-
hasNextPage: boolean;
|
|
1084
|
-
data: ApiV3PoolInfoItem[];
|
|
1085
|
-
bestUse: "id" | "mint" | null;
|
|
1086
|
-
search: string;
|
|
1087
|
-
}
|
|
1088
1082
|
interface TransferFeeDataBaseType {
|
|
1089
1083
|
transferFeeConfigAuthority: string;
|
|
1090
1084
|
withdrawWithheldAuthority: string;
|
|
@@ -1418,4 +1412,4 @@ declare type FarmPositionData = Record<string, Record<string, Record<string, {
|
|
|
1418
1412
|
version: "V1" | "V2";
|
|
1419
1413
|
}>>>;
|
|
1420
1414
|
|
|
1421
|
-
export {
|
|
1415
|
+
export { Rounding as $, ApiPoolInfoV4 as A, FarmRewardTypeV6Key as B, CpmmKeys as C, RewardKeyInfoV345 as D, RewardKeyInfoV6 as E, FarmRewardInfoV6 as F, FormatFarmKeyOutV345 as G, FormatFarmKeyOutV6 as H, FormatFarmKeyOut as I, JupTokenType as J, RewardInfoV345 as K, LiquidityVersion as L, RewardInfoV6 as M, FarmTagsItem as N, FormatFarmInfoOutBase as O, PoolsApiReturn as P, FormatFarmInfoOutV345 as Q, RpcItemA as R, FormatFarmInfoOutV6 as S, TransferFeeDataBaseType as T, FormatFarmInfoOut as U, AvailabilityCheckAPI3 as V, OwnerCreatedFarmInfo as W, OwnerIdoInfo as X, IdoKeysData as Y, ApiStakePool as Z, FarmPositionData as _, ApiStakePoolInfo as a, FarmLedgerLayoutV6_1 as a$, BN_ZERO as a0, BN_ONE as a1, BN_TWO as a2, BN_THREE as a3, BN_FIVE as a4, BN_TEN as a5, BN_100 as a6, BN_1000 as a7, BN_10000 as a8, BigNumberish as a9, realFarmStateV3Layout as aA, realFarmStateV5Layout as aB, realFarmV6Layout as aC, farmStateV3Layout as aD, farmStateV5Layout as aE, farmStateV6Layout as aF, farmRewardTimeInfoLayout as aG, farmRewardLayout as aH, farmRewardRestartLayout as aI, farmAddRewardLayout as aJ, FarmStateLayoutV3 as aK, FarmStateLayoutV5 as aL, FarmStateLayoutV6 as aM, FarmStateV3 as aN, FarmStateV5 as aO, FarmStateV6 as aP, FarmState as aQ, FarmStateLayout as aR, farmLedgerLayoutV3_1 as aS, farmLedgerLayoutV3_2 as aT, farmLedgerLayoutV5_1 as aU, farmLedgerLayoutV5_2 as aV, farmLedgerLayoutV6_1 as aW, FarmLedgerLayoutV3_1 as aX, FarmLedgerLayoutV3_2 as aY, FarmLedgerLayoutV5_1 as aZ, FarmLedgerLayoutV5_2 as a_, Numberish as aa, parseBigNumberish as ab, tenExponential as ac, parseNumberInfo as ad, divCeil as ae, shakeFractionDecimal as af, toBN as ag, toFraction as ah, toPercent as ai, toTokenPrice as aj, toUsdCurrency as ak, toTotalPrice as al, decimalToFraction as am, isDecimal as an, recursivelyDecimalToFraction as ao, AddInstructionParam as ap, TxBuildData as aq, TxV0BuildData as ar, ExecuteParam as as, MultiTxBuildData as at, MultiTxV0BuildData as au, MakeMultiTxData as av, MakeTxData as aw, TxBuilder as ax, associatedLedgerAccountLayout as ay, withdrawRewardLayout as az, ApiClmmConfigInfo as b, unionArr as b$, FarmLedgerLayout as b0, FarmLedgerV3_1 as b1, FarmLedgerV3_2 as b2, FarmLedgerV5_1 as b3, FarmLedgerV5_2 as b4, FarmLedgerV6_1 as b5, FarmLedger as b6, dwLayout as b7, VoterVotingMintConfig as b8, VoterRegistrar as b9, TokenJson as bA, SplToken as bB, LpToken as bC, SignAllTransactions as bD, MakeTransaction as bE, MakeV0Transaction as bF, MakeMultiTransaction as bG, InstructionReturn as bH, ComputeBudgetConfig as bI, LoadParams as bJ, TransferAmountFee as bK, GetTransferAmountFee as bL, ReturnTypeFetchMultipleMintInfo as bM, ReturnTypeFetchMultipleMintInfos as bN, ReplaceType as bO, MayArray as bP, MayDeepArray as bQ, MayFunction as bR, ArrayItem as bS, ExactPartial as bT, ExactRequired as bU, SKeyof as bV, GetValue as bW, SOR as bX, Fallback as bY, Cover as bZ, UnionCover as b_, VoterLockup as ba, VoterDepositEntry as bb, Voter as bc, RewardType as bd, APIRewardInfo as be, RewardInfoWithKey as bf, FarmRewardInfo as bg, FarmRewardInfoConfig as bh, RewardInfoKey as bi, FarmPoolInfoV6 as bj, CreateFarm as bk, CreateFarmExtInfo as bl, UpdateFarmReward as bm, UpdateFarmRewards as bn, FarmDWParam as bo, FarmPoolKeys as bp, FarmVersion as bq, FARM_LOCK_MINT as br, FARM_LOCK_VAULT as bs, FARM_VERSION_TO_STATE_LAYOUT as bt, FARM_VERSION_TO_LEDGER_LAYOUT as bu, isValidFarmVersion as bv, validateFarmRewards as bw, poolTypeV6 as bx, FARM_PROGRAM_TO_VERSION as by, TokenInfo as bz, ApiClmmPoolsItemStatistics as c, splitNumber as c0, TokenAmount as c1, CurrencyAmount as c2, Fraction as c3, _100_PERCENT as c4, Percent as c5, Price as c6, ApiV3PageIns as d, ApiV3Token as e, ApiV3TokenRes as f, ApiV3PoolInfoCountItem as g, PoolFarmRewardInfo as h, PoolRewardInfoItem as i, ApiV3PoolInfoBaseItem as j, ApiV3PoolInfoConcentratedItem as k, ApiV3PoolInfoStandardItem as l, ApiV3PoolInfoStandardItemCpmm as m, ApiV3PoolInfoItem as n, PoolFetchType as o, FetchPoolParams as p, Point as q, LiquidityLineApi as r, AmmV4Keys as s, AmmV5Keys as t, ClmmRewardType as u, ClmmKeys as v, PoolKeys as w, ApiClmmConfigV3 as x, RpcItemB as y, RpcType as z };
|
|
@@ -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,
|
|
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-322fdce2.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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ApiV3Token,
|
|
9
9
|
FetchPoolParams,
|
|
10
10
|
PoolsApiReturn,
|
|
11
|
-
|
|
11
|
+
ApiV3PoolInfoItem,
|
|
12
12
|
JupTokenType,
|
|
13
13
|
PoolKeys,
|
|
14
14
|
FormatFarmInfoOut,
|
|
@@ -187,7 +187,7 @@ export class Api {
|
|
|
187
187
|
return res.data;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
async fetchPoolById(props: { ids: string }): Promise<
|
|
190
|
+
async fetchPoolById(props: { ids: string }): Promise<ApiV3PoolInfoItem[]> {
|
|
191
191
|
const { ids } = props;
|
|
192
192
|
const res = await this.api.get((this.urlConfigs.POOL_SEARCH_BY_ID || API_URLS.POOL_SEARCH_BY_ID) + `?ids=${ids}`);
|
|
193
193
|
return res.data;
|
package/src/api/type.ts
CHANGED
|
@@ -118,12 +118,6 @@ export enum JupTokenType {
|
|
|
118
118
|
Strict = "strict",
|
|
119
119
|
}
|
|
120
120
|
export type PoolsApiReturn = ApiV3PageIns<ApiV3PoolInfoItem>;
|
|
121
|
-
export interface SearchPoolsApiReturn {
|
|
122
|
-
hasNextPage: boolean;
|
|
123
|
-
data: ApiV3PoolInfoItem[];
|
|
124
|
-
bestUse: "id" | "mint" | null;
|
|
125
|
-
search: string;
|
|
126
|
-
}
|
|
127
121
|
|
|
128
122
|
export interface TransferFeeDataBaseType {
|
|
129
123
|
transferFeeConfigAuthority: string;
|
package/src/raydium/cpmm/cpmm.ts
CHANGED
|
@@ -82,7 +82,9 @@ export default class CpmmModule extends ModuleBase {
|
|
|
82
82
|
...params
|
|
83
83
|
}: CreateCpmmPoolParam<T>): Promise<MakeTxData<T, { address: CreateCpmmPoolAddress }>> {
|
|
84
84
|
const payer = ownerInfo.feePayer || this.scope.owner?.publicKey;
|
|
85
|
-
const isFront = params.mintA.address
|
|
85
|
+
const isFront = new BN(new PublicKey(params.mintA.address).toBuffer()).lte(
|
|
86
|
+
new BN(new PublicKey(params.mintB.address).toBuffer()),
|
|
87
|
+
);
|
|
86
88
|
|
|
87
89
|
const [mintA, mintB] = isFront ? [params.mintA, params.mintB] : [params.mintB, params.mintA];
|
|
88
90
|
const [mintAAmount, mintBAmount] = isFront
|