@raydium-io/raydium-sdk-v2 0.1.15-alpha → 0.1.16-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 +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/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 +6 -6
- 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/index.js +1 -1
- package/lib/raydium/tradeV2/index.js.map +1 -1
- package/lib/raydium/tradeV2/index.mjs +1 -1
- package/lib/raydium/tradeV2/index.mjs.map +1 -1
- package/lib/raydium/tradeV2/instrument.d.ts +2 -2
- package/lib/raydium/tradeV2/instrument.js +1 -1
- package/lib/raydium/tradeV2/instrument.js.map +1 -1
- package/lib/raydium/tradeV2/instrument.mjs +1 -1
- package/lib/raydium/tradeV2/instrument.mjs.map +1 -1
- package/lib/raydium/tradeV2/trade.d.ts +3 -3
- package/lib/raydium/tradeV2/trade.js +1 -1
- package/lib/raydium/tradeV2/trade.js.map +1 -1
- package/lib/raydium/tradeV2/trade.mjs +1 -1
- package/lib/raydium/tradeV2/trade.mjs.map +1 -1
- 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-16aedf49.d.ts → raydium-959c1e92.d.ts} +3 -3
- package/lib/{type-e5e9d9c5.d.ts → type-5ab8207d.d.ts} +1 -1
- package/lib/{type-8af08a0b.d.ts → type-9a74e7ee.d.ts} +8 -8
- package/package.json +1 -1
- package/src/raydium/tradeV2/instrument.ts +34 -33
|
@@ -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-9a74e7ee.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-5ab8207d.js';
|
|
8
8
|
import '@solana/spl-token';
|
|
9
9
|
import '../../solana/type.js';
|
|
10
10
|
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-9a74e7ee.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-959c1e92.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-9a74e7ee.js';
|
|
7
7
|
import 'bn.js';
|
|
8
8
|
import '@solana/spl-token';
|
|
9
9
|
import '../../common/txTool/txType.js';
|
|
@@ -21,7 +21,7 @@ import '../account/types.js';
|
|
|
21
21
|
import '../account/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
|
-
import '../../type-
|
|
24
|
+
import '../../type-5ab8207d.js';
|
|
25
25
|
import '../clmm/layout.js';
|
|
26
26
|
import '../cpmm/type.js';
|
|
27
27
|
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-959c1e92.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-9a74e7ee.js';
|
|
10
10
|
import '@solana/spl-token';
|
|
11
11
|
import '../../common/txTool/txType.js';
|
|
12
12
|
import '../../common/owner.js';
|
|
@@ -21,7 +21,7 @@ import '../account/types.js';
|
|
|
21
21
|
import '../account/layout.js';
|
|
22
22
|
import '../liquidity/type.js';
|
|
23
23
|
import '../liquidity/layout.js';
|
|
24
|
-
import '../../type-
|
|
24
|
+
import '../../type-5ab8207d.js';
|
|
25
25
|
import '../clmm/layout.js';
|
|
26
26
|
import '../cpmm/type.js';
|
|
27
27
|
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, e as ApiV3Token, w as PoolKeys, 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, e as ApiV3Token, w as PoolKeys, 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-9a74e7ee.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, AmmRpcData } 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, F as ClmmRpcData, d as ComputeClmmPoolInfo, l as ReturnTypeFetchMultiplePoolTickArrays } 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, F as ClmmRpcData, d as ComputeClmmPoolInfo, l as ReturnTypeFetchMultiplePoolTickArrays } from './type-5ab8207d.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';
|
|
@@ -384,11 +384,11 @@ declare class Utils1216 extends ModuleBase {
|
|
|
384
384
|
perLpLoss: BN__default;
|
|
385
385
|
totalClaimedAmount: BN__default;
|
|
386
386
|
}[], "", {
|
|
387
|
-
status: number;
|
|
388
387
|
padding: BN__default[];
|
|
389
388
|
bump: number;
|
|
390
389
|
endTime: BN__default;
|
|
391
390
|
openTime: BN__default;
|
|
391
|
+
status: number;
|
|
392
392
|
ammId: PublicKey;
|
|
393
393
|
tokenInfo: {
|
|
394
394
|
mintDecimals: number;
|
|
@@ -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-9a74e7ee.js';
|
|
5
5
|
import { TxVersion } from './common/txTool/txType.js';
|
|
6
6
|
import { ClmmPositionLayout, PoolInfoLayout } from './raydium/clmm/layout.js';
|
|
7
7
|
|
|
@@ -854,37 +854,37 @@ declare type FarmStateV6 = GetStructureSchema<FarmStateLayoutV6>;
|
|
|
854
854
|
declare type FarmState = FarmStateV3 | FarmStateV5 | FarmStateV6;
|
|
855
855
|
declare type FarmStateLayout = FarmStateLayoutV3 | FarmStateLayoutV5 | FarmStateLayoutV6;
|
|
856
856
|
declare const farmLedgerLayoutV3_1: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
857
|
-
id: PublicKey;
|
|
858
857
|
state: BN__default;
|
|
858
|
+
id: PublicKey;
|
|
859
859
|
owner: PublicKey;
|
|
860
860
|
deposited: BN__default;
|
|
861
861
|
rewardDebts: BN__default[];
|
|
862
862
|
}>;
|
|
863
863
|
declare const farmLedgerLayoutV3_2: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
864
|
-
id: PublicKey;
|
|
865
864
|
state: BN__default;
|
|
865
|
+
id: PublicKey;
|
|
866
866
|
owner: PublicKey;
|
|
867
867
|
deposited: BN__default;
|
|
868
868
|
rewardDebts: BN__default[];
|
|
869
869
|
voteLockedBalance: BN__default;
|
|
870
870
|
}>;
|
|
871
871
|
declare const farmLedgerLayoutV5_1: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
872
|
-
id: PublicKey;
|
|
873
872
|
state: BN__default;
|
|
873
|
+
id: PublicKey;
|
|
874
874
|
owner: PublicKey;
|
|
875
875
|
deposited: BN__default;
|
|
876
876
|
rewardDebts: BN__default[];
|
|
877
877
|
}>;
|
|
878
878
|
declare const farmLedgerLayoutV5_2: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
879
|
-
id: PublicKey;
|
|
880
879
|
state: BN__default;
|
|
880
|
+
id: PublicKey;
|
|
881
881
|
owner: PublicKey;
|
|
882
882
|
deposited: BN__default;
|
|
883
883
|
rewardDebts: BN__default[];
|
|
884
884
|
}>;
|
|
885
885
|
declare const farmLedgerLayoutV6_1: Structure<PublicKey | BN__default | BN__default[], "", {
|
|
886
|
-
id: PublicKey;
|
|
887
886
|
state: BN__default;
|
|
887
|
+
id: PublicKey;
|
|
888
888
|
owner: PublicKey;
|
|
889
889
|
deposited: BN__default;
|
|
890
890
|
rewardDebts: BN__default[];
|
|
@@ -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 | number[] |
|
|
918
|
+
declare const VoterRegistrar: Structure<number | PublicKey | number[] | Buffer | 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 | number[] |
|
|
973
|
+
declare const Voter: Structure<number | PublicKey | number[] | Buffer | {
|
|
974
974
|
reserved: number[];
|
|
975
975
|
lockup: {
|
|
976
976
|
startTime: BN__default;
|
package/package.json
CHANGED
|
@@ -258,8 +258,38 @@ function makeInnerInsKey(
|
|
|
258
258
|
userOutAccount: PublicKey,
|
|
259
259
|
remainingAccount: PublicKey[] | undefined,
|
|
260
260
|
): AccountMeta[] {
|
|
261
|
-
if (itemPool.version === 4
|
|
262
|
-
const poolKey = jsonInfo2PoolKeys(itemPoolKey as
|
|
261
|
+
if (itemPool.version === 4) {
|
|
262
|
+
const poolKey = jsonInfo2PoolKeys(itemPoolKey as AmmV4Keys);
|
|
263
|
+
|
|
264
|
+
return [
|
|
265
|
+
{ pubkey: poolKey.programId, isSigner: false, isWritable: false },
|
|
266
|
+
{ pubkey: userInAccount, isSigner: false, isWritable: true },
|
|
267
|
+
{ pubkey: userOutAccount, isSigner: false, isWritable: true },
|
|
268
|
+
|
|
269
|
+
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
270
|
+
{ pubkey: poolKey.authority, isSigner: false, isWritable: false },
|
|
271
|
+
{ pubkey: poolKey.marketProgramId, isSigner: false, isWritable: false },
|
|
272
|
+
{ pubkey: poolKey.marketAuthority, isSigner: false, isWritable: true },
|
|
273
|
+
|
|
274
|
+
{ pubkey: poolKey.openOrders, isSigner: false, isWritable: true },
|
|
275
|
+
{ pubkey: poolKey.vault.A, isSigner: false, isWritable: true },
|
|
276
|
+
{ pubkey: poolKey.vault.B, isSigner: false, isWritable: true },
|
|
277
|
+
{ pubkey: poolKey.marketId, isSigner: false, isWritable: true },
|
|
278
|
+
{ pubkey: poolKey.marketBids, isSigner: false, isWritable: true },
|
|
279
|
+
{ pubkey: poolKey.marketAsks, isSigner: false, isWritable: true },
|
|
280
|
+
{ pubkey: poolKey.marketEventQueue, isSigner: false, isWritable: true },
|
|
281
|
+
...(poolKey.marketProgramId.toString() === "srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX"
|
|
282
|
+
? [
|
|
283
|
+
{ pubkey: poolKey.marketBaseVault, isSigner: false, isWritable: true },
|
|
284
|
+
{ pubkey: poolKey.marketQuoteVault, isSigner: false, isWritable: true },
|
|
285
|
+
]
|
|
286
|
+
: [
|
|
287
|
+
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
288
|
+
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
289
|
+
]),
|
|
290
|
+
];
|
|
291
|
+
} else if (itemPool.version === 5) {
|
|
292
|
+
const poolKey = jsonInfo2PoolKeys(itemPoolKey as AmmV4Keys);
|
|
263
293
|
|
|
264
294
|
return [
|
|
265
295
|
{ pubkey: poolKey.programId, isSigner: false, isWritable: false },
|
|
@@ -293,8 +323,7 @@ function makeInnerInsKey(
|
|
|
293
323
|
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
294
324
|
{ pubkey: baseIn ? poolKey.vault.A : poolKey.vault.B, isSigner: false, isWritable: true },
|
|
295
325
|
{ pubkey: baseIn ? poolKey.vault.B : poolKey.vault.A, isSigner: false, isWritable: true },
|
|
296
|
-
|
|
297
|
-
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
326
|
+
{ pubkey: itemPool.observationId, isSigner: false, isWritable: true },
|
|
298
327
|
...(poolKey.mintA.programId.equals(TOKEN_2022_PROGRAM_ID) || poolKey.mintB.programId.equals(TOKEN_2022_PROGRAM_ID)
|
|
299
328
|
? [
|
|
300
329
|
{ pubkey: TOKEN_2022_PROGRAM_ID, isSigner: false, isWritable: false },
|
|
@@ -311,35 +340,7 @@ function makeInnerInsKey(
|
|
|
311
340
|
},
|
|
312
341
|
];
|
|
313
342
|
} else {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
return [
|
|
317
|
-
{ pubkey: poolKey.programId, isSigner: false, isWritable: false },
|
|
318
|
-
{ pubkey: userInAccount, isSigner: false, isWritable: true },
|
|
319
|
-
{ pubkey: userOutAccount, isSigner: false, isWritable: true },
|
|
320
|
-
|
|
321
|
-
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
322
|
-
{ pubkey: poolKey.authority, isSigner: false, isWritable: false },
|
|
323
|
-
{ pubkey: poolKey.marketProgramId, isSigner: false, isWritable: false },
|
|
324
|
-
{ pubkey: poolKey.marketAuthority, isSigner: false, isWritable: false },
|
|
325
|
-
|
|
326
|
-
{ pubkey: poolKey.openOrders, isSigner: false, isWritable: true },
|
|
327
|
-
{ pubkey: poolKey.vault.A, isSigner: false, isWritable: true },
|
|
328
|
-
{ pubkey: poolKey.vault.B, isSigner: false, isWritable: true },
|
|
329
|
-
{ pubkey: poolKey.marketId, isSigner: false, isWritable: true },
|
|
330
|
-
{ pubkey: poolKey.marketBids, isSigner: false, isWritable: true },
|
|
331
|
-
{ pubkey: poolKey.marketAsks, isSigner: false, isWritable: true },
|
|
332
|
-
{ pubkey: poolKey.marketEventQueue, isSigner: false, isWritable: true },
|
|
333
|
-
...(poolKey.marketProgramId.toString() === "srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX"
|
|
334
|
-
? [
|
|
335
|
-
{ pubkey: poolKey.marketBaseVault, isSigner: false, isWritable: true },
|
|
336
|
-
{ pubkey: poolKey.marketQuoteVault, isSigner: false, isWritable: true },
|
|
337
|
-
]
|
|
338
|
-
: [
|
|
339
|
-
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
340
|
-
{ pubkey: poolKey.id, isSigner: false, isWritable: true },
|
|
341
|
-
]),
|
|
342
|
-
];
|
|
343
|
+
throw Error("make swap ins error");
|
|
343
344
|
}
|
|
344
345
|
}
|
|
345
346
|
|