@meteora-ag/zap-sdk 1.2.0 → 1.3.0

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/dist/index.d.mts CHANGED
@@ -16,7 +16,7 @@ type Zap$1 = {
16
16
  address: "zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMiz";
17
17
  metadata: {
18
18
  name: "zap";
19
- version: "0.2.0";
19
+ version: "0.2.2";
20
20
  spec: "0.1.0";
21
21
  description: "Created with Anchor";
22
22
  };
@@ -551,7 +551,7 @@ type Zap$1 = {
551
551
  };
552
552
  },
553
553
  {
554
- name: "baseFeeStruct";
554
+ name: "baseFeeInfo";
555
555
  serialization: "bytemuck";
556
556
  repr: {
557
557
  kind: "c";
@@ -560,33 +560,31 @@ type Zap$1 = {
560
560
  kind: "struct";
561
561
  fields: [
562
562
  {
563
- name: "cliffFeeNumerator";
564
- type: "u64";
565
- },
566
- {
567
- name: "baseFeeMode";
568
- type: "u8";
569
- },
570
- {
571
- name: "padding0";
563
+ name: "data";
572
564
  type: {
573
- array: ["u8", 5];
565
+ array: ["u8", 32];
574
566
  };
575
- },
576
- {
577
- name: "firstFactor";
578
- type: "u16";
579
- },
567
+ }
568
+ ];
569
+ };
570
+ },
571
+ {
572
+ name: "baseFeeStruct";
573
+ serialization: "bytemuck";
574
+ repr: {
575
+ kind: "c";
576
+ };
577
+ type: {
578
+ kind: "struct";
579
+ fields: [
580
580
  {
581
- name: "secondFactor";
581
+ name: "baseFeeInfo";
582
582
  type: {
583
- array: ["u8", 8];
583
+ defined: {
584
+ name: "baseFeeInfo";
585
+ };
584
586
  };
585
587
  },
586
- {
587
- name: "thirdFactor";
588
- type: "u64";
589
- },
590
588
  {
591
589
  name: "padding1";
592
590
  type: "u64";
@@ -887,9 +885,13 @@ type Zap$1 = {
887
885
  type: "pubkey";
888
886
  },
889
887
  {
890
- name: "partner";
891
- docs: ["partner"];
892
- type: "pubkey";
888
+ name: "padding0";
889
+ docs: [
890
+ "padding, previously partner pubkey, be careful when using this field"
891
+ ];
892
+ type: {
893
+ array: ["u8", 32];
894
+ };
893
895
  },
894
896
  {
895
897
  name: "liquidity";
@@ -897,7 +899,7 @@ type Zap$1 = {
897
899
  type: "u128";
898
900
  },
899
901
  {
900
- name: "padding";
902
+ name: "padding1";
901
903
  docs: [
902
904
  "padding, previous reserve amount, be careful to use that field"
903
905
  ];
@@ -914,14 +916,8 @@ type Zap$1 = {
914
916
  type: "u64";
915
917
  },
916
918
  {
917
- name: "partnerAFee";
918
- docs: ["partner a fee"];
919
- type: "u64";
920
- },
921
- {
922
- name: "partnerBFee";
923
- docs: ["partner b fee"];
924
- type: "u64";
919
+ name: "padding2";
920
+ type: "u128";
925
921
  },
926
922
  {
927
923
  name: "sqrtMinPrice";
@@ -966,7 +962,7 @@ type Zap$1 = {
966
962
  {
967
963
  name: "collectFeeMode";
968
964
  docs: [
969
- "0 is collect fee in both token, 1 only collect fee in token a, 2 only collect fee in token b"
965
+ "0 is collect fee in both token, 1 only collect fee only in token b"
970
966
  ];
971
967
  type: "u8";
972
968
  },
@@ -976,14 +972,14 @@ type Zap$1 = {
976
972
  type: "u8";
977
973
  },
978
974
  {
979
- name: "version";
975
+ name: "feeVersion";
980
976
  docs: [
981
- "pool version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
977
+ "pool fee version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
982
978
  ];
983
979
  type: "u8";
984
980
  },
985
981
  {
986
- name: "padding0";
982
+ name: "padding3";
987
983
  docs: ["padding"];
988
984
  type: "u8";
989
985
  },
@@ -1020,10 +1016,34 @@ type Zap$1 = {
1020
1016
  type: "pubkey";
1021
1017
  },
1022
1018
  {
1023
- name: "padding1";
1019
+ name: "tokenAAmount";
1020
+ docs: ["token a amount"];
1021
+ type: "u64";
1022
+ },
1023
+ {
1024
+ name: "tokenBAmount";
1025
+ docs: ["token b amount"];
1026
+ type: "u64";
1027
+ },
1028
+ {
1029
+ name: "layoutVersion";
1030
+ docs: [
1031
+ "layout version: version 0: haven't track token_a_amount and token_b_amount, version 1: track token_a_amount and token_b_amount"
1032
+ ];
1033
+ type: "u8";
1034
+ },
1035
+ {
1036
+ name: "padding4";
1024
1037
  docs: ["Padding for further use"];
1025
1038
  type: {
1026
- array: ["u64", 6];
1039
+ array: ["u8", 7];
1040
+ };
1041
+ },
1042
+ {
1043
+ name: "padding5";
1044
+ docs: ["Padding for further use"];
1045
+ type: {
1046
+ array: ["u64", 3];
1027
1047
  };
1028
1048
  },
1029
1049
  {
@@ -1049,8 +1069,7 @@ type Zap$1 = {
1049
1069
  "Information regarding fee charges",
1050
1070
  "trading_fee = amount * trade_fee_numerator / denominator",
1051
1071
  "protocol_fee = trading_fee * protocol_fee_percentage / 100",
1052
- "referral_fee = protocol_fee * referral_percentage / 100",
1053
- "partner_fee = (protocol_fee - referral_fee) * partner_fee_percentage / denominator"
1072
+ "referral_fee = protocol_fee * referral_percentage / 100"
1054
1073
  ];
1055
1074
  serialization: "bytemuck";
1056
1075
  repr: {
@@ -1083,8 +1102,8 @@ type Zap$1 = {
1083
1102
  type: "u8";
1084
1103
  },
1085
1104
  {
1086
- name: "partnerFeePercent";
1087
- docs: ["partner fee"];
1105
+ name: "padding0";
1106
+ docs: ["padding for future use"];
1088
1107
  type: "u8";
1089
1108
  },
1090
1109
  {
@@ -1093,12 +1112,19 @@ type Zap$1 = {
1093
1112
  type: "u8";
1094
1113
  },
1095
1114
  {
1096
- name: "padding0";
1115
+ name: "padding1";
1097
1116
  docs: ["padding"];
1098
1117
  type: {
1099
- array: ["u8", 5];
1118
+ array: ["u8", 3];
1100
1119
  };
1101
1120
  },
1121
+ {
1122
+ name: "compoundingFeeBps";
1123
+ docs: [
1124
+ "compounding fee bps, only non-zero in CollectFeeMode::Compounding"
1125
+ ];
1126
+ type: "u16";
1127
+ },
1102
1128
  {
1103
1129
  name: "dynamicFee";
1104
1130
  docs: ["dynamic fee"];
@@ -1109,11 +1135,8 @@ type Zap$1 = {
1109
1135
  };
1110
1136
  },
1111
1137
  {
1112
- name: "padding1";
1113
- docs: ["padding"];
1114
- type: {
1115
- array: ["u64", 2];
1116
- };
1138
+ name: "initSqrtPrice";
1139
+ type: "u128";
1117
1140
  }
1118
1141
  ];
1119
1142
  };
@@ -1144,12 +1167,10 @@ type Zap$1 = {
1144
1167
  type: "u64";
1145
1168
  },
1146
1169
  {
1147
- name: "totalPartnerAFee";
1148
- type: "u64";
1149
- },
1150
- {
1151
- name: "totalPartnerBFee";
1152
- type: "u64";
1170
+ name: "padding0";
1171
+ type: {
1172
+ array: ["u64", 2];
1173
+ };
1153
1174
  },
1154
1175
  {
1155
1176
  name: "totalPosition";
@@ -1523,44 +1544,6 @@ type Zap$1 = {
1523
1544
  }
1524
1545
  ];
1525
1546
  constants: [
1526
- {
1527
- name: "dammV2";
1528
- type: "pubkey";
1529
- value: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
1530
- },
1531
- {
1532
- name: "dammV2SwapDisc";
1533
- type: {
1534
- array: ["u8", 8];
1535
- };
1536
- value: "[248, 198, 158, 145, 225, 117, 135, 200]";
1537
- },
1538
- {
1539
- name: "dlmmSwap2Disc";
1540
- type: {
1541
- array: ["u8", 8];
1542
- };
1543
- value: "[65, 75, 63, 76, 235, 91, 91, 136]";
1544
- },
1545
- {
1546
- name: "jupV6";
1547
- type: "pubkey";
1548
- value: "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
1549
- },
1550
- {
1551
- name: "jupV6RouteDisc";
1552
- type: {
1553
- array: ["u8", 8];
1554
- };
1555
- value: "[229, 23, 203, 151, 122, 227, 173, 42]";
1556
- },
1557
- {
1558
- name: "jupV6SharedAccountRouteDisc";
1559
- type: {
1560
- array: ["u8", 8];
1561
- };
1562
- value: "[193, 32, 155, 51, 65, 214, 156, 129]";
1563
- },
1564
1547
  {
1565
1548
  name: "maxBasisPoint";
1566
1549
  type: "u16";
@@ -2258,6 +2241,14 @@ declare function getDammV2RemainingAccounts(poolAddress: PublicKey, user: Public
2258
2241
  isWritable: boolean;
2259
2242
  pubkey: PublicKey;
2260
2243
  }>>;
2244
+ /**
2245
+ * Returns true if the pool is single-sided with only tokenA
2246
+ */
2247
+ declare function isSingleSidedA(poolState: PoolState): boolean;
2248
+ /**
2249
+ * Returns true if the pool is single-sided with only tokenB
2250
+ */
2251
+ declare function isSingleSidedB(poolState: PoolState): boolean;
2261
2252
  /**
2262
2253
  * Creates payload data for DAMM V2 swap instruction
2263
2254
  * @param amountIn - The input amount for the swap
@@ -4321,4 +4312,4 @@ var idl = {
4321
4312
  constants: constants
4322
4313
  };
4323
4314
 
4324
- export { AMOUNT_IN_DAMM_V2_OFFSET, AMOUNT_IN_DLMM_OFFSET, AMOUNT_IN_JUP_V6_REVERSE_OFFSET, AccountsType, BIN_ARRAY_INDEX_BOUND, DAMM_V2_PROGRAM_ID, DAMM_V2_SWAP_DISCRIMINATOR, DEFAULT_JUPITER_API_URL, DLMM_PROGRAM_ID, DLMM_SWAP_DISCRIMINATOR, type DlmmDirectEstimateResult, type DlmmDirectRebalanceEstimate, type DlmmDirectRebalanceEstimateContext, type DlmmDirectSwapEstimate, type DlmmDirectSwapEstimateContext, DlmmDirectSwapQuoteRoute, type DlmmIndirectSwapEstimate, type DlmmIndirectSwapEstimateContext, type DlmmIndirectSwapEstimateResult, DlmmSingleSided, DlmmSwapType, type EstimateDlmmDirectSwapParams, type EstimateDlmmIndirectSwapParams, type EstimateDlmmRebalanceSwapParams, type GetZapInDammV2DirectPoolParams, type GetZapInDammV2IndirectPoolParams, type GetZapInDlmmDirectParams, type GetZapInDlmmIndirectParams, JUP_V6_PROGRAM_ID, type JupiterInstruction, type JupiterQuoteResponse, type JupiterRoutePlan, type JupiterSwapInstructionResponse, MEMO_PROGRAM_ID, type ProgramStrategyType, type RebalanceDlmmPositionParams, type RebalanceDlmmPositionResponse, SwapExternalType, type SwapQuoteResult, ZAP_PROGRAM_ID, Zap, type ZapConfig, idl as ZapIdl, type ZapInDammV2DirectPoolParam, type ZapInDammV2IndirectPoolParam, ZapInDammV2PoolSwapRoute, type ZapInDammV2Response, type ZapInDlmmDirectPoolParam, type ZapInDlmmIndirectPoolParam, type ZapInDlmmResponse, type ZapOutParameters, type ZapOutParams, type ZapOutThroughDammV2Params, type ZapOutThroughDlmmParams, type ZapOutThroughJupiterParams, type ZapProgram, type Zap$1 as ZapTypes, buildJupiterSwapTransaction, convertAccountTypeToNumber, convertLamportsToUiAmount, convertUiAmountToLamports, createDammV2SwapPayload, createDlmmSwapPayload, deriveDammV2EventAuthority, deriveDammV2PoolAuthority, deriveDlmmEventAuthority, deriveLedgerAccount, estimateDlmmDirectSwap, estimateDlmmIndirectSwap, estimateDlmmRebalanceSwap, filterOutCloseSplTokenAccountInstructions, getBinArrayBitmapExtension, getBitFromBinArrayIndexInBitmapExtension, getDammV2Pool, getDammV2RemainingAccounts, getDlmmRemainingAccounts, getExtraAccountMetasForTransferHook, getJupiterQuote, getJupiterSwapInstruction, getLbPairState, getNextBinArrayIndexWithLiquidity, getOrCreateATAInstruction, getTokenAccountBalance, getTokenProgramFromMint, toProgramStrategyType, unwrapSOLInstruction, wrapSOLInstruction };
4315
+ export { AMOUNT_IN_DAMM_V2_OFFSET, AMOUNT_IN_DLMM_OFFSET, AMOUNT_IN_JUP_V6_REVERSE_OFFSET, AccountsType, BIN_ARRAY_INDEX_BOUND, DAMM_V2_PROGRAM_ID, DAMM_V2_SWAP_DISCRIMINATOR, DEFAULT_JUPITER_API_URL, DLMM_PROGRAM_ID, DLMM_SWAP_DISCRIMINATOR, type DlmmDirectEstimateResult, type DlmmDirectRebalanceEstimate, type DlmmDirectRebalanceEstimateContext, type DlmmDirectSwapEstimate, type DlmmDirectSwapEstimateContext, DlmmDirectSwapQuoteRoute, type DlmmIndirectSwapEstimate, type DlmmIndirectSwapEstimateContext, type DlmmIndirectSwapEstimateResult, DlmmSingleSided, DlmmSwapType, type EstimateDlmmDirectSwapParams, type EstimateDlmmIndirectSwapParams, type EstimateDlmmRebalanceSwapParams, type GetZapInDammV2DirectPoolParams, type GetZapInDammV2IndirectPoolParams, type GetZapInDlmmDirectParams, type GetZapInDlmmIndirectParams, JUP_V6_PROGRAM_ID, type JupiterInstruction, type JupiterQuoteResponse, type JupiterRoutePlan, type JupiterSwapInstructionResponse, MEMO_PROGRAM_ID, type ProgramStrategyType, type RebalanceDlmmPositionParams, type RebalanceDlmmPositionResponse, SwapExternalType, type SwapQuoteResult, ZAP_PROGRAM_ID, Zap, type ZapConfig, idl as ZapIdl, type ZapInDammV2DirectPoolParam, type ZapInDammV2IndirectPoolParam, ZapInDammV2PoolSwapRoute, type ZapInDammV2Response, type ZapInDlmmDirectPoolParam, type ZapInDlmmIndirectPoolParam, type ZapInDlmmResponse, type ZapOutParameters, type ZapOutParams, type ZapOutThroughDammV2Params, type ZapOutThroughDlmmParams, type ZapOutThroughJupiterParams, type ZapProgram, type Zap$1 as ZapTypes, buildJupiterSwapTransaction, convertAccountTypeToNumber, convertLamportsToUiAmount, convertUiAmountToLamports, createDammV2SwapPayload, createDlmmSwapPayload, deriveDammV2EventAuthority, deriveDammV2PoolAuthority, deriveDlmmEventAuthority, deriveLedgerAccount, estimateDlmmDirectSwap, estimateDlmmIndirectSwap, estimateDlmmRebalanceSwap, filterOutCloseSplTokenAccountInstructions, getBinArrayBitmapExtension, getBitFromBinArrayIndexInBitmapExtension, getDammV2Pool, getDammV2RemainingAccounts, getDlmmRemainingAccounts, getExtraAccountMetasForTransferHook, getJupiterQuote, getJupiterSwapInstruction, getLbPairState, getNextBinArrayIndexWithLiquidity, getOrCreateATAInstruction, getTokenAccountBalance, getTokenProgramFromMint, isSingleSidedA, isSingleSidedB, toProgramStrategyType, unwrapSOLInstruction, wrapSOLInstruction };
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ type Zap$1 = {
16
16
  address: "zapvX9M3uf5pvy4wRPAbQgdQsM1xmuiFnkfHKPvwMiz";
17
17
  metadata: {
18
18
  name: "zap";
19
- version: "0.2.0";
19
+ version: "0.2.2";
20
20
  spec: "0.1.0";
21
21
  description: "Created with Anchor";
22
22
  };
@@ -551,7 +551,7 @@ type Zap$1 = {
551
551
  };
552
552
  },
553
553
  {
554
- name: "baseFeeStruct";
554
+ name: "baseFeeInfo";
555
555
  serialization: "bytemuck";
556
556
  repr: {
557
557
  kind: "c";
@@ -560,33 +560,31 @@ type Zap$1 = {
560
560
  kind: "struct";
561
561
  fields: [
562
562
  {
563
- name: "cliffFeeNumerator";
564
- type: "u64";
565
- },
566
- {
567
- name: "baseFeeMode";
568
- type: "u8";
569
- },
570
- {
571
- name: "padding0";
563
+ name: "data";
572
564
  type: {
573
- array: ["u8", 5];
565
+ array: ["u8", 32];
574
566
  };
575
- },
576
- {
577
- name: "firstFactor";
578
- type: "u16";
579
- },
567
+ }
568
+ ];
569
+ };
570
+ },
571
+ {
572
+ name: "baseFeeStruct";
573
+ serialization: "bytemuck";
574
+ repr: {
575
+ kind: "c";
576
+ };
577
+ type: {
578
+ kind: "struct";
579
+ fields: [
580
580
  {
581
- name: "secondFactor";
581
+ name: "baseFeeInfo";
582
582
  type: {
583
- array: ["u8", 8];
583
+ defined: {
584
+ name: "baseFeeInfo";
585
+ };
584
586
  };
585
587
  },
586
- {
587
- name: "thirdFactor";
588
- type: "u64";
589
- },
590
588
  {
591
589
  name: "padding1";
592
590
  type: "u64";
@@ -887,9 +885,13 @@ type Zap$1 = {
887
885
  type: "pubkey";
888
886
  },
889
887
  {
890
- name: "partner";
891
- docs: ["partner"];
892
- type: "pubkey";
888
+ name: "padding0";
889
+ docs: [
890
+ "padding, previously partner pubkey, be careful when using this field"
891
+ ];
892
+ type: {
893
+ array: ["u8", 32];
894
+ };
893
895
  },
894
896
  {
895
897
  name: "liquidity";
@@ -897,7 +899,7 @@ type Zap$1 = {
897
899
  type: "u128";
898
900
  },
899
901
  {
900
- name: "padding";
902
+ name: "padding1";
901
903
  docs: [
902
904
  "padding, previous reserve amount, be careful to use that field"
903
905
  ];
@@ -914,14 +916,8 @@ type Zap$1 = {
914
916
  type: "u64";
915
917
  },
916
918
  {
917
- name: "partnerAFee";
918
- docs: ["partner a fee"];
919
- type: "u64";
920
- },
921
- {
922
- name: "partnerBFee";
923
- docs: ["partner b fee"];
924
- type: "u64";
919
+ name: "padding2";
920
+ type: "u128";
925
921
  },
926
922
  {
927
923
  name: "sqrtMinPrice";
@@ -966,7 +962,7 @@ type Zap$1 = {
966
962
  {
967
963
  name: "collectFeeMode";
968
964
  docs: [
969
- "0 is collect fee in both token, 1 only collect fee in token a, 2 only collect fee in token b"
965
+ "0 is collect fee in both token, 1 only collect fee only in token b"
970
966
  ];
971
967
  type: "u8";
972
968
  },
@@ -976,14 +972,14 @@ type Zap$1 = {
976
972
  type: "u8";
977
973
  },
978
974
  {
979
- name: "version";
975
+ name: "feeVersion";
980
976
  docs: [
981
- "pool version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
977
+ "pool fee version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
982
978
  ];
983
979
  type: "u8";
984
980
  },
985
981
  {
986
- name: "padding0";
982
+ name: "padding3";
987
983
  docs: ["padding"];
988
984
  type: "u8";
989
985
  },
@@ -1020,10 +1016,34 @@ type Zap$1 = {
1020
1016
  type: "pubkey";
1021
1017
  },
1022
1018
  {
1023
- name: "padding1";
1019
+ name: "tokenAAmount";
1020
+ docs: ["token a amount"];
1021
+ type: "u64";
1022
+ },
1023
+ {
1024
+ name: "tokenBAmount";
1025
+ docs: ["token b amount"];
1026
+ type: "u64";
1027
+ },
1028
+ {
1029
+ name: "layoutVersion";
1030
+ docs: [
1031
+ "layout version: version 0: haven't track token_a_amount and token_b_amount, version 1: track token_a_amount and token_b_amount"
1032
+ ];
1033
+ type: "u8";
1034
+ },
1035
+ {
1036
+ name: "padding4";
1024
1037
  docs: ["Padding for further use"];
1025
1038
  type: {
1026
- array: ["u64", 6];
1039
+ array: ["u8", 7];
1040
+ };
1041
+ },
1042
+ {
1043
+ name: "padding5";
1044
+ docs: ["Padding for further use"];
1045
+ type: {
1046
+ array: ["u64", 3];
1027
1047
  };
1028
1048
  },
1029
1049
  {
@@ -1049,8 +1069,7 @@ type Zap$1 = {
1049
1069
  "Information regarding fee charges",
1050
1070
  "trading_fee = amount * trade_fee_numerator / denominator",
1051
1071
  "protocol_fee = trading_fee * protocol_fee_percentage / 100",
1052
- "referral_fee = protocol_fee * referral_percentage / 100",
1053
- "partner_fee = (protocol_fee - referral_fee) * partner_fee_percentage / denominator"
1072
+ "referral_fee = protocol_fee * referral_percentage / 100"
1054
1073
  ];
1055
1074
  serialization: "bytemuck";
1056
1075
  repr: {
@@ -1083,8 +1102,8 @@ type Zap$1 = {
1083
1102
  type: "u8";
1084
1103
  },
1085
1104
  {
1086
- name: "partnerFeePercent";
1087
- docs: ["partner fee"];
1105
+ name: "padding0";
1106
+ docs: ["padding for future use"];
1088
1107
  type: "u8";
1089
1108
  },
1090
1109
  {
@@ -1093,12 +1112,19 @@ type Zap$1 = {
1093
1112
  type: "u8";
1094
1113
  },
1095
1114
  {
1096
- name: "padding0";
1115
+ name: "padding1";
1097
1116
  docs: ["padding"];
1098
1117
  type: {
1099
- array: ["u8", 5];
1118
+ array: ["u8", 3];
1100
1119
  };
1101
1120
  },
1121
+ {
1122
+ name: "compoundingFeeBps";
1123
+ docs: [
1124
+ "compounding fee bps, only non-zero in CollectFeeMode::Compounding"
1125
+ ];
1126
+ type: "u16";
1127
+ },
1102
1128
  {
1103
1129
  name: "dynamicFee";
1104
1130
  docs: ["dynamic fee"];
@@ -1109,11 +1135,8 @@ type Zap$1 = {
1109
1135
  };
1110
1136
  },
1111
1137
  {
1112
- name: "padding1";
1113
- docs: ["padding"];
1114
- type: {
1115
- array: ["u64", 2];
1116
- };
1138
+ name: "initSqrtPrice";
1139
+ type: "u128";
1117
1140
  }
1118
1141
  ];
1119
1142
  };
@@ -1144,12 +1167,10 @@ type Zap$1 = {
1144
1167
  type: "u64";
1145
1168
  },
1146
1169
  {
1147
- name: "totalPartnerAFee";
1148
- type: "u64";
1149
- },
1150
- {
1151
- name: "totalPartnerBFee";
1152
- type: "u64";
1170
+ name: "padding0";
1171
+ type: {
1172
+ array: ["u64", 2];
1173
+ };
1153
1174
  },
1154
1175
  {
1155
1176
  name: "totalPosition";
@@ -1523,44 +1544,6 @@ type Zap$1 = {
1523
1544
  }
1524
1545
  ];
1525
1546
  constants: [
1526
- {
1527
- name: "dammV2";
1528
- type: "pubkey";
1529
- value: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
1530
- },
1531
- {
1532
- name: "dammV2SwapDisc";
1533
- type: {
1534
- array: ["u8", 8];
1535
- };
1536
- value: "[248, 198, 158, 145, 225, 117, 135, 200]";
1537
- },
1538
- {
1539
- name: "dlmmSwap2Disc";
1540
- type: {
1541
- array: ["u8", 8];
1542
- };
1543
- value: "[65, 75, 63, 76, 235, 91, 91, 136]";
1544
- },
1545
- {
1546
- name: "jupV6";
1547
- type: "pubkey";
1548
- value: "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4";
1549
- },
1550
- {
1551
- name: "jupV6RouteDisc";
1552
- type: {
1553
- array: ["u8", 8];
1554
- };
1555
- value: "[229, 23, 203, 151, 122, 227, 173, 42]";
1556
- },
1557
- {
1558
- name: "jupV6SharedAccountRouteDisc";
1559
- type: {
1560
- array: ["u8", 8];
1561
- };
1562
- value: "[193, 32, 155, 51, 65, 214, 156, 129]";
1563
- },
1564
1547
  {
1565
1548
  name: "maxBasisPoint";
1566
1549
  type: "u16";
@@ -2258,6 +2241,14 @@ declare function getDammV2RemainingAccounts(poolAddress: PublicKey, user: Public
2258
2241
  isWritable: boolean;
2259
2242
  pubkey: PublicKey;
2260
2243
  }>>;
2244
+ /**
2245
+ * Returns true if the pool is single-sided with only tokenA
2246
+ */
2247
+ declare function isSingleSidedA(poolState: PoolState): boolean;
2248
+ /**
2249
+ * Returns true if the pool is single-sided with only tokenB
2250
+ */
2251
+ declare function isSingleSidedB(poolState: PoolState): boolean;
2261
2252
  /**
2262
2253
  * Creates payload data for DAMM V2 swap instruction
2263
2254
  * @param amountIn - The input amount for the swap
@@ -4321,4 +4312,4 @@ var idl = {
4321
4312
  constants: constants
4322
4313
  };
4323
4314
 
4324
- export { AMOUNT_IN_DAMM_V2_OFFSET, AMOUNT_IN_DLMM_OFFSET, AMOUNT_IN_JUP_V6_REVERSE_OFFSET, AccountsType, BIN_ARRAY_INDEX_BOUND, DAMM_V2_PROGRAM_ID, DAMM_V2_SWAP_DISCRIMINATOR, DEFAULT_JUPITER_API_URL, DLMM_PROGRAM_ID, DLMM_SWAP_DISCRIMINATOR, type DlmmDirectEstimateResult, type DlmmDirectRebalanceEstimate, type DlmmDirectRebalanceEstimateContext, type DlmmDirectSwapEstimate, type DlmmDirectSwapEstimateContext, DlmmDirectSwapQuoteRoute, type DlmmIndirectSwapEstimate, type DlmmIndirectSwapEstimateContext, type DlmmIndirectSwapEstimateResult, DlmmSingleSided, DlmmSwapType, type EstimateDlmmDirectSwapParams, type EstimateDlmmIndirectSwapParams, type EstimateDlmmRebalanceSwapParams, type GetZapInDammV2DirectPoolParams, type GetZapInDammV2IndirectPoolParams, type GetZapInDlmmDirectParams, type GetZapInDlmmIndirectParams, JUP_V6_PROGRAM_ID, type JupiterInstruction, type JupiterQuoteResponse, type JupiterRoutePlan, type JupiterSwapInstructionResponse, MEMO_PROGRAM_ID, type ProgramStrategyType, type RebalanceDlmmPositionParams, type RebalanceDlmmPositionResponse, SwapExternalType, type SwapQuoteResult, ZAP_PROGRAM_ID, Zap, type ZapConfig, idl as ZapIdl, type ZapInDammV2DirectPoolParam, type ZapInDammV2IndirectPoolParam, ZapInDammV2PoolSwapRoute, type ZapInDammV2Response, type ZapInDlmmDirectPoolParam, type ZapInDlmmIndirectPoolParam, type ZapInDlmmResponse, type ZapOutParameters, type ZapOutParams, type ZapOutThroughDammV2Params, type ZapOutThroughDlmmParams, type ZapOutThroughJupiterParams, type ZapProgram, type Zap$1 as ZapTypes, buildJupiterSwapTransaction, convertAccountTypeToNumber, convertLamportsToUiAmount, convertUiAmountToLamports, createDammV2SwapPayload, createDlmmSwapPayload, deriveDammV2EventAuthority, deriveDammV2PoolAuthority, deriveDlmmEventAuthority, deriveLedgerAccount, estimateDlmmDirectSwap, estimateDlmmIndirectSwap, estimateDlmmRebalanceSwap, filterOutCloseSplTokenAccountInstructions, getBinArrayBitmapExtension, getBitFromBinArrayIndexInBitmapExtension, getDammV2Pool, getDammV2RemainingAccounts, getDlmmRemainingAccounts, getExtraAccountMetasForTransferHook, getJupiterQuote, getJupiterSwapInstruction, getLbPairState, getNextBinArrayIndexWithLiquidity, getOrCreateATAInstruction, getTokenAccountBalance, getTokenProgramFromMint, toProgramStrategyType, unwrapSOLInstruction, wrapSOLInstruction };
4315
+ export { AMOUNT_IN_DAMM_V2_OFFSET, AMOUNT_IN_DLMM_OFFSET, AMOUNT_IN_JUP_V6_REVERSE_OFFSET, AccountsType, BIN_ARRAY_INDEX_BOUND, DAMM_V2_PROGRAM_ID, DAMM_V2_SWAP_DISCRIMINATOR, DEFAULT_JUPITER_API_URL, DLMM_PROGRAM_ID, DLMM_SWAP_DISCRIMINATOR, type DlmmDirectEstimateResult, type DlmmDirectRebalanceEstimate, type DlmmDirectRebalanceEstimateContext, type DlmmDirectSwapEstimate, type DlmmDirectSwapEstimateContext, DlmmDirectSwapQuoteRoute, type DlmmIndirectSwapEstimate, type DlmmIndirectSwapEstimateContext, type DlmmIndirectSwapEstimateResult, DlmmSingleSided, DlmmSwapType, type EstimateDlmmDirectSwapParams, type EstimateDlmmIndirectSwapParams, type EstimateDlmmRebalanceSwapParams, type GetZapInDammV2DirectPoolParams, type GetZapInDammV2IndirectPoolParams, type GetZapInDlmmDirectParams, type GetZapInDlmmIndirectParams, JUP_V6_PROGRAM_ID, type JupiterInstruction, type JupiterQuoteResponse, type JupiterRoutePlan, type JupiterSwapInstructionResponse, MEMO_PROGRAM_ID, type ProgramStrategyType, type RebalanceDlmmPositionParams, type RebalanceDlmmPositionResponse, SwapExternalType, type SwapQuoteResult, ZAP_PROGRAM_ID, Zap, type ZapConfig, idl as ZapIdl, type ZapInDammV2DirectPoolParam, type ZapInDammV2IndirectPoolParam, ZapInDammV2PoolSwapRoute, type ZapInDammV2Response, type ZapInDlmmDirectPoolParam, type ZapInDlmmIndirectPoolParam, type ZapInDlmmResponse, type ZapOutParameters, type ZapOutParams, type ZapOutThroughDammV2Params, type ZapOutThroughDlmmParams, type ZapOutThroughJupiterParams, type ZapProgram, type Zap$1 as ZapTypes, buildJupiterSwapTransaction, convertAccountTypeToNumber, convertLamportsToUiAmount, convertUiAmountToLamports, createDammV2SwapPayload, createDlmmSwapPayload, deriveDammV2EventAuthority, deriveDammV2PoolAuthority, deriveDlmmEventAuthority, deriveLedgerAccount, estimateDlmmDirectSwap, estimateDlmmIndirectSwap, estimateDlmmRebalanceSwap, filterOutCloseSplTokenAccountInstructions, getBinArrayBitmapExtension, getBitFromBinArrayIndexInBitmapExtension, getDammV2Pool, getDammV2RemainingAccounts, getDlmmRemainingAccounts, getExtraAccountMetasForTransferHook, getJupiterQuote, getJupiterSwapInstruction, getLbPairState, getNextBinArrayIndexWithLiquidity, getOrCreateATAInstruction, getTokenAccountBalance, getTokenProgramFromMint, isSingleSidedA, isSingleSidedB, toProgramStrategyType, unwrapSOLInstruction, wrapSOLInstruction };