5454import com .cryptomarket .sdk .requests .OrderListRequest ;
5555import com .cryptomarket .sdk .requests .WithdrawRequest ;
5656
57+ import kotlin .OverloadResolutionByLambdaReturnType ;
58+
5759public class CryptomarketRestClientImpl implements CryptomarketRestClient {
5860 CloseableHttpClient httpClient ;
5961 Adapter adapter = new Adapter ();
@@ -912,7 +914,6 @@ public List<Fee> getEstimateWithdrawalFees(List<FeeRequest> feeRequests) throws
912914 return adapter .listFromJson (jsonResponse , Fee .class );
913915 }
914916
915-
916917 @ Override
917918 public List <Fee > getBulkEstimateWithdrawalFees (List <FeeRequest > feeRequests ) throws CryptomarketSDKException {
918919 var payload = adapter .listToJson (feeRequests , FeeRequest .class );
@@ -922,33 +923,42 @@ public List<Fee> getBulkEstimateWithdrawalFees(List<FeeRequest> feeRequests) thr
922923 return adapter .listFromJson (jsonResponse , Fee .class );
923924 }
924925
926+ @ OverloadResolutionByLambdaReturnType
927+ public String getFeesHash () throws CryptomarketSDKException {
928+ String jsonResponse = httpClient .get ("wallet/crypto/fee/withdraw/hash" , null );
929+ return adapter .objectFromJsonValue (jsonResponse , "hash" , String .class );
930+ }
931+
925932 // @Override
926- // public String getEstimateDepositFee(String currency, String amount, String networkCode)
927- // throws CryptomarketSDKException {
928- // return getEstimateDepositFee(new ParamsBuilder()
929- // .currency(currency)
930- // .networkCode(networkCode)
931- // .amount(amount));
933+ // public String getEstimateDepositFee(String currency, String amount, String
934+ // networkCode)
935+ // throws CryptomarketSDKException {
936+ // return getEstimateDepositFee(new ParamsBuilder()
937+ // .currency(currency)
938+ // .networkCode(networkCode)
939+ // .amount(amount));
932940 // }
933941
934942 // @Override
935- // public String getEstimateDepositFee(ParamsBuilder paramsBuilder) throws CryptomarketSDKException {
936- // paramsBuilder.checkRequired(Arrays.asList(
937- // ArgNames.CURRENCY,
938- // ArgNames.AMOUNT));
939- // String jsonResponse = httpClient.get(
940- // "wallet/crypto/fee/deposit/estimate",
941- // paramsBuilder.build());
942- // return adapter.objectFromJsonValue(jsonResponse, "fee", String.class);
943+ // public String getEstimateDepositFee(ParamsBuilder paramsBuilder) throws
944+ // CryptomarketSDKException {
945+ // paramsBuilder.checkRequired(Arrays.asList(
946+ // ArgNames.CURRENCY,
947+ // ArgNames.AMOUNT));
948+ // String jsonResponse = httpClient.get(
949+ // "wallet/crypto/fee/deposit/estimate",
950+ // paramsBuilder.build());
951+ // return adapter.objectFromJsonValue(jsonResponse, "fee", String.class);
943952 // }
944953
945954 // @Override
946- // public List<Fee> getBulkEstimateDepositFees(List<FeeRequest> feeRequests) throws CryptomarketSDKException {
947- // var payload = adapter.listToJson(feeRequests, FeeRequest.class);
948- // String jsonResponse = httpClient.post(
949- // "wallet/crypto/fee/deposit/estimate/bulk",
950- // payload);
951- // return adapter.listFromJson(jsonResponse, Fee.class);
955+ // public List<Fee> getBulkEstimateDepositFees(List<FeeRequest> feeRequests)
956+ // throws CryptomarketSDKException {
957+ // var payload = adapter.listToJson(feeRequests, FeeRequest.class);
958+ // String jsonResponse = httpClient.post(
959+ // "wallet/crypto/fee/deposit/estimate/bulk",
960+ // payload);
961+ // return adapter.listFromJson(jsonResponse, Fee.class);
952962 // }
953963
954964 @ Override
0 commit comments