@meteora-ag/zap-sdk 1.2.0 → 1.3.1

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
  };
@@ -546,12 +546,15 @@ type Zap$1 = {
546
546
  {
547
547
  name: "transferHookMultiReward";
548
548
  fields: ["u8"];
549
+ },
550
+ {
551
+ name: "transferHookReferral";
549
552
  }
550
553
  ];
551
554
  };
552
555
  },
553
556
  {
554
- name: "baseFeeStruct";
557
+ name: "baseFeeInfo";
555
558
  serialization: "bytemuck";
556
559
  repr: {
557
560
  kind: "c";
@@ -560,33 +563,31 @@ type Zap$1 = {
560
563
  kind: "struct";
561
564
  fields: [
562
565
  {
563
- name: "cliffFeeNumerator";
564
- type: "u64";
565
- },
566
- {
567
- name: "baseFeeMode";
568
- type: "u8";
569
- },
570
- {
571
- name: "padding0";
566
+ name: "data";
572
567
  type: {
573
- array: ["u8", 5];
568
+ array: ["u8", 32];
574
569
  };
575
- },
576
- {
577
- name: "firstFactor";
578
- type: "u16";
579
- },
570
+ }
571
+ ];
572
+ };
573
+ },
574
+ {
575
+ name: "baseFeeStruct";
576
+ serialization: "bytemuck";
577
+ repr: {
578
+ kind: "c";
579
+ };
580
+ type: {
581
+ kind: "struct";
582
+ fields: [
580
583
  {
581
- name: "secondFactor";
584
+ name: "baseFeeInfo";
582
585
  type: {
583
- array: ["u8", 8];
586
+ defined: {
587
+ name: "baseFeeInfo";
588
+ };
584
589
  };
585
590
  },
586
- {
587
- name: "thirdFactor";
588
- type: "u64";
589
- },
590
591
  {
591
592
  name: "padding1";
592
593
  type: "u64";
@@ -887,9 +888,13 @@ type Zap$1 = {
887
888
  type: "pubkey";
888
889
  },
889
890
  {
890
- name: "partner";
891
- docs: ["partner"];
892
- type: "pubkey";
891
+ name: "padding0";
892
+ docs: [
893
+ "padding, previously partner pubkey, be careful when using this field"
894
+ ];
895
+ type: {
896
+ array: ["u8", 32];
897
+ };
893
898
  },
894
899
  {
895
900
  name: "liquidity";
@@ -897,7 +902,7 @@ type Zap$1 = {
897
902
  type: "u128";
898
903
  },
899
904
  {
900
- name: "padding";
905
+ name: "padding1";
901
906
  docs: [
902
907
  "padding, previous reserve amount, be careful to use that field"
903
908
  ];
@@ -914,14 +919,8 @@ type Zap$1 = {
914
919
  type: "u64";
915
920
  },
916
921
  {
917
- name: "partnerAFee";
918
- docs: ["partner a fee"];
919
- type: "u64";
920
- },
921
- {
922
- name: "partnerBFee";
923
- docs: ["partner b fee"];
924
- type: "u64";
922
+ name: "padding2";
923
+ type: "u128";
925
924
  },
926
925
  {
927
926
  name: "sqrtMinPrice";
@@ -966,7 +965,7 @@ type Zap$1 = {
966
965
  {
967
966
  name: "collectFeeMode";
968
967
  docs: [
969
- "0 is collect fee in both token, 1 only collect fee in token a, 2 only collect fee in token b"
968
+ "0 is collect fee in both token, 1 only collect fee only in token b"
970
969
  ];
971
970
  type: "u8";
972
971
  },
@@ -976,14 +975,14 @@ type Zap$1 = {
976
975
  type: "u8";
977
976
  },
978
977
  {
979
- name: "version";
978
+ name: "feeVersion";
980
979
  docs: [
981
- "pool version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
980
+ "pool fee version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
982
981
  ];
983
982
  type: "u8";
984
983
  },
985
984
  {
986
- name: "padding0";
985
+ name: "padding3";
987
986
  docs: ["padding"];
988
987
  type: "u8";
989
988
  },
@@ -1020,10 +1019,34 @@ type Zap$1 = {
1020
1019
  type: "pubkey";
1021
1020
  },
1022
1021
  {
1023
- name: "padding1";
1022
+ name: "tokenAAmount";
1023
+ docs: ["token a amount"];
1024
+ type: "u64";
1025
+ },
1026
+ {
1027
+ name: "tokenBAmount";
1028
+ docs: ["token b amount"];
1029
+ type: "u64";
1030
+ },
1031
+ {
1032
+ name: "layoutVersion";
1033
+ docs: [
1034
+ "layout version: version 0: haven't track token_a_amount and token_b_amount, version 1: track token_a_amount and token_b_amount"
1035
+ ];
1036
+ type: "u8";
1037
+ },
1038
+ {
1039
+ name: "padding4";
1024
1040
  docs: ["Padding for further use"];
1025
1041
  type: {
1026
- array: ["u64", 6];
1042
+ array: ["u8", 7];
1043
+ };
1044
+ },
1045
+ {
1046
+ name: "padding5";
1047
+ docs: ["Padding for further use"];
1048
+ type: {
1049
+ array: ["u64", 3];
1027
1050
  };
1028
1051
  },
1029
1052
  {
@@ -1049,8 +1072,7 @@ type Zap$1 = {
1049
1072
  "Information regarding fee charges",
1050
1073
  "trading_fee = amount * trade_fee_numerator / denominator",
1051
1074
  "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"
1075
+ "referral_fee = protocol_fee * referral_percentage / 100"
1054
1076
  ];
1055
1077
  serialization: "bytemuck";
1056
1078
  repr: {
@@ -1083,8 +1105,8 @@ type Zap$1 = {
1083
1105
  type: "u8";
1084
1106
  },
1085
1107
  {
1086
- name: "partnerFeePercent";
1087
- docs: ["partner fee"];
1108
+ name: "padding0";
1109
+ docs: ["padding for future use"];
1088
1110
  type: "u8";
1089
1111
  },
1090
1112
  {
@@ -1093,12 +1115,19 @@ type Zap$1 = {
1093
1115
  type: "u8";
1094
1116
  },
1095
1117
  {
1096
- name: "padding0";
1118
+ name: "padding1";
1097
1119
  docs: ["padding"];
1098
1120
  type: {
1099
- array: ["u8", 5];
1121
+ array: ["u8", 3];
1100
1122
  };
1101
1123
  },
1124
+ {
1125
+ name: "compoundingFeeBps";
1126
+ docs: [
1127
+ "compounding fee bps, only non-zero in CollectFeeMode::Compounding"
1128
+ ];
1129
+ type: "u16";
1130
+ },
1102
1131
  {
1103
1132
  name: "dynamicFee";
1104
1133
  docs: ["dynamic fee"];
@@ -1109,11 +1138,8 @@ type Zap$1 = {
1109
1138
  };
1110
1139
  },
1111
1140
  {
1112
- name: "padding1";
1113
- docs: ["padding"];
1114
- type: {
1115
- array: ["u64", 2];
1116
- };
1141
+ name: "initSqrtPrice";
1142
+ type: "u128";
1117
1143
  }
1118
1144
  ];
1119
1145
  };
@@ -1144,12 +1170,10 @@ type Zap$1 = {
1144
1170
  type: "u64";
1145
1171
  },
1146
1172
  {
1147
- name: "totalPartnerAFee";
1148
- type: "u64";
1149
- },
1150
- {
1151
- name: "totalPartnerBFee";
1152
- type: "u64";
1173
+ name: "padding0";
1174
+ type: {
1175
+ array: ["u64", 2];
1176
+ };
1153
1177
  },
1154
1178
  {
1155
1179
  name: "totalPosition";
@@ -1523,44 +1547,6 @@ type Zap$1 = {
1523
1547
  }
1524
1548
  ];
1525
1549
  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
1550
  {
1565
1551
  name: "maxBasisPoint";
1566
1552
  type: "u16";
@@ -2258,6 +2244,14 @@ declare function getDammV2RemainingAccounts(poolAddress: PublicKey, user: Public
2258
2244
  isWritable: boolean;
2259
2245
  pubkey: PublicKey;
2260
2246
  }>>;
2247
+ /**
2248
+ * Returns true if the pool is single-sided with only tokenA
2249
+ */
2250
+ declare function isSingleSidedA(poolState: PoolState): boolean;
2251
+ /**
2252
+ * Returns true if the pool is single-sided with only tokenB
2253
+ */
2254
+ declare function isSingleSidedB(poolState: PoolState): boolean;
2261
2255
  /**
2262
2256
  * Creates payload data for DAMM V2 swap instruction
2263
2257
  * @param amountIn - The input amount for the swap
@@ -3111,6 +3105,9 @@ var types = [
3111
3105
  fields: [
3112
3106
  "u8"
3113
3107
  ]
3108
+ },
3109
+ {
3110
+ name: "TransferHookReferral"
3114
3111
  }
3115
3112
  ]
3116
3113
  }
@@ -4321,4 +4318,4 @@ var idl = {
4321
4318
  constants: constants
4322
4319
  };
4323
4320
 
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 };
4321
+ 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
  };
@@ -546,12 +546,15 @@ type Zap$1 = {
546
546
  {
547
547
  name: "transferHookMultiReward";
548
548
  fields: ["u8"];
549
+ },
550
+ {
551
+ name: "transferHookReferral";
549
552
  }
550
553
  ];
551
554
  };
552
555
  },
553
556
  {
554
- name: "baseFeeStruct";
557
+ name: "baseFeeInfo";
555
558
  serialization: "bytemuck";
556
559
  repr: {
557
560
  kind: "c";
@@ -560,33 +563,31 @@ type Zap$1 = {
560
563
  kind: "struct";
561
564
  fields: [
562
565
  {
563
- name: "cliffFeeNumerator";
564
- type: "u64";
565
- },
566
- {
567
- name: "baseFeeMode";
568
- type: "u8";
569
- },
570
- {
571
- name: "padding0";
566
+ name: "data";
572
567
  type: {
573
- array: ["u8", 5];
568
+ array: ["u8", 32];
574
569
  };
575
- },
576
- {
577
- name: "firstFactor";
578
- type: "u16";
579
- },
570
+ }
571
+ ];
572
+ };
573
+ },
574
+ {
575
+ name: "baseFeeStruct";
576
+ serialization: "bytemuck";
577
+ repr: {
578
+ kind: "c";
579
+ };
580
+ type: {
581
+ kind: "struct";
582
+ fields: [
580
583
  {
581
- name: "secondFactor";
584
+ name: "baseFeeInfo";
582
585
  type: {
583
- array: ["u8", 8];
586
+ defined: {
587
+ name: "baseFeeInfo";
588
+ };
584
589
  };
585
590
  },
586
- {
587
- name: "thirdFactor";
588
- type: "u64";
589
- },
590
591
  {
591
592
  name: "padding1";
592
593
  type: "u64";
@@ -887,9 +888,13 @@ type Zap$1 = {
887
888
  type: "pubkey";
888
889
  },
889
890
  {
890
- name: "partner";
891
- docs: ["partner"];
892
- type: "pubkey";
891
+ name: "padding0";
892
+ docs: [
893
+ "padding, previously partner pubkey, be careful when using this field"
894
+ ];
895
+ type: {
896
+ array: ["u8", 32];
897
+ };
893
898
  },
894
899
  {
895
900
  name: "liquidity";
@@ -897,7 +902,7 @@ type Zap$1 = {
897
902
  type: "u128";
898
903
  },
899
904
  {
900
- name: "padding";
905
+ name: "padding1";
901
906
  docs: [
902
907
  "padding, previous reserve amount, be careful to use that field"
903
908
  ];
@@ -914,14 +919,8 @@ type Zap$1 = {
914
919
  type: "u64";
915
920
  },
916
921
  {
917
- name: "partnerAFee";
918
- docs: ["partner a fee"];
919
- type: "u64";
920
- },
921
- {
922
- name: "partnerBFee";
923
- docs: ["partner b fee"];
924
- type: "u64";
922
+ name: "padding2";
923
+ type: "u128";
925
924
  },
926
925
  {
927
926
  name: "sqrtMinPrice";
@@ -966,7 +965,7 @@ type Zap$1 = {
966
965
  {
967
966
  name: "collectFeeMode";
968
967
  docs: [
969
- "0 is collect fee in both token, 1 only collect fee in token a, 2 only collect fee in token b"
968
+ "0 is collect fee in both token, 1 only collect fee only in token b"
970
969
  ];
971
970
  type: "u8";
972
971
  },
@@ -976,14 +975,14 @@ type Zap$1 = {
976
975
  type: "u8";
977
976
  },
978
977
  {
979
- name: "version";
978
+ name: "feeVersion";
980
979
  docs: [
981
- "pool version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
980
+ "pool fee version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"
982
981
  ];
983
982
  type: "u8";
984
983
  },
985
984
  {
986
- name: "padding0";
985
+ name: "padding3";
987
986
  docs: ["padding"];
988
987
  type: "u8";
989
988
  },
@@ -1020,10 +1019,34 @@ type Zap$1 = {
1020
1019
  type: "pubkey";
1021
1020
  },
1022
1021
  {
1023
- name: "padding1";
1022
+ name: "tokenAAmount";
1023
+ docs: ["token a amount"];
1024
+ type: "u64";
1025
+ },
1026
+ {
1027
+ name: "tokenBAmount";
1028
+ docs: ["token b amount"];
1029
+ type: "u64";
1030
+ },
1031
+ {
1032
+ name: "layoutVersion";
1033
+ docs: [
1034
+ "layout version: version 0: haven't track token_a_amount and token_b_amount, version 1: track token_a_amount and token_b_amount"
1035
+ ];
1036
+ type: "u8";
1037
+ },
1038
+ {
1039
+ name: "padding4";
1024
1040
  docs: ["Padding for further use"];
1025
1041
  type: {
1026
- array: ["u64", 6];
1042
+ array: ["u8", 7];
1043
+ };
1044
+ },
1045
+ {
1046
+ name: "padding5";
1047
+ docs: ["Padding for further use"];
1048
+ type: {
1049
+ array: ["u64", 3];
1027
1050
  };
1028
1051
  },
1029
1052
  {
@@ -1049,8 +1072,7 @@ type Zap$1 = {
1049
1072
  "Information regarding fee charges",
1050
1073
  "trading_fee = amount * trade_fee_numerator / denominator",
1051
1074
  "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"
1075
+ "referral_fee = protocol_fee * referral_percentage / 100"
1054
1076
  ];
1055
1077
  serialization: "bytemuck";
1056
1078
  repr: {
@@ -1083,8 +1105,8 @@ type Zap$1 = {
1083
1105
  type: "u8";
1084
1106
  },
1085
1107
  {
1086
- name: "partnerFeePercent";
1087
- docs: ["partner fee"];
1108
+ name: "padding0";
1109
+ docs: ["padding for future use"];
1088
1110
  type: "u8";
1089
1111
  },
1090
1112
  {
@@ -1093,12 +1115,19 @@ type Zap$1 = {
1093
1115
  type: "u8";
1094
1116
  },
1095
1117
  {
1096
- name: "padding0";
1118
+ name: "padding1";
1097
1119
  docs: ["padding"];
1098
1120
  type: {
1099
- array: ["u8", 5];
1121
+ array: ["u8", 3];
1100
1122
  };
1101
1123
  },
1124
+ {
1125
+ name: "compoundingFeeBps";
1126
+ docs: [
1127
+ "compounding fee bps, only non-zero in CollectFeeMode::Compounding"
1128
+ ];
1129
+ type: "u16";
1130
+ },
1102
1131
  {
1103
1132
  name: "dynamicFee";
1104
1133
  docs: ["dynamic fee"];
@@ -1109,11 +1138,8 @@ type Zap$1 = {
1109
1138
  };
1110
1139
  },
1111
1140
  {
1112
- name: "padding1";
1113
- docs: ["padding"];
1114
- type: {
1115
- array: ["u64", 2];
1116
- };
1141
+ name: "initSqrtPrice";
1142
+ type: "u128";
1117
1143
  }
1118
1144
  ];
1119
1145
  };
@@ -1144,12 +1170,10 @@ type Zap$1 = {
1144
1170
  type: "u64";
1145
1171
  },
1146
1172
  {
1147
- name: "totalPartnerAFee";
1148
- type: "u64";
1149
- },
1150
- {
1151
- name: "totalPartnerBFee";
1152
- type: "u64";
1173
+ name: "padding0";
1174
+ type: {
1175
+ array: ["u64", 2];
1176
+ };
1153
1177
  },
1154
1178
  {
1155
1179
  name: "totalPosition";
@@ -1523,44 +1547,6 @@ type Zap$1 = {
1523
1547
  }
1524
1548
  ];
1525
1549
  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
1550
  {
1565
1551
  name: "maxBasisPoint";
1566
1552
  type: "u16";
@@ -2258,6 +2244,14 @@ declare function getDammV2RemainingAccounts(poolAddress: PublicKey, user: Public
2258
2244
  isWritable: boolean;
2259
2245
  pubkey: PublicKey;
2260
2246
  }>>;
2247
+ /**
2248
+ * Returns true if the pool is single-sided with only tokenA
2249
+ */
2250
+ declare function isSingleSidedA(poolState: PoolState): boolean;
2251
+ /**
2252
+ * Returns true if the pool is single-sided with only tokenB
2253
+ */
2254
+ declare function isSingleSidedB(poolState: PoolState): boolean;
2261
2255
  /**
2262
2256
  * Creates payload data for DAMM V2 swap instruction
2263
2257
  * @param amountIn - The input amount for the swap
@@ -3111,6 +3105,9 @@ var types = [
3111
3105
  fields: [
3112
3106
  "u8"
3113
3107
  ]
3108
+ },
3109
+ {
3110
+ name: "TransferHookReferral"
3114
3111
  }
3115
3112
  ]
3116
3113
  }
@@ -4321,4 +4318,4 @@ var idl = {
4321
4318
  constants: constants
4322
4319
  };
4323
4320
 
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 };
4321
+ 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 };