Updated on 2026-08-14
This commit is contained in:
parent
1e87d138e1
commit
e7de7d1c7e
95 changed files with 15343 additions and 81 deletions
|
|
@ -18,7 +18,9 @@ public enum Blockchain {
|
|||
Rootstock("RSK", "RBTC", 1.0, R.drawable.tangem2, "Rootstock"),
|
||||
RootstockToken("RskToken", "RBTC", 1.0, R.drawable.tangem2, "Rootstock"),
|
||||
Cardano("CARDANO", "ADA", 1000000.0, R.drawable.tangem2, "Cardano"),
|
||||
Ripple ("XRP", "XRP", 1000000.0, R.drawable.tangem2, "Ripple");
|
||||
Ripple ("XRP", "XRP", 1000000.0, R.drawable.tangem2, "Ripple"),
|
||||
Binance("BINANCE", "BNB", 100000000.0, R.drawable.tangem2, "Binance"),
|
||||
BinanceTestNet("BINANCE/test", "BNB", 100000000.0, R.drawable.tangem2, "Binance Testnet");
|
||||
|
||||
Blockchain(String ID, String currency, double multiplier, int imageResource, String officialName) {
|
||||
mID = ID;
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
package com.tangem.data.network;
|
||||
|
||||
import com.tangem.data.network.model.BinanceAccount;
|
||||
import com.tangem.data.network.model.BinanceError;
|
||||
import com.tangem.data.network.model.BinanceFees;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface BinanceApi {
|
||||
@GET(Server.ApiBinance.Method.ACCOUNT)
|
||||
Call<BinanceAccount> binanceAccount();
|
||||
|
||||
@GET(Server.ApiBinance.Method.FEES)
|
||||
Call<BinanceFees> binanceFees();
|
||||
|
||||
@Headers("Content-Type: text/plain")
|
||||
@POST(Server.ApiBinance.Method.BROADCAST)
|
||||
Call<BinanceError> binanceBroadcast(@Body String txForSend);
|
||||
}
|
||||
|
|
@ -56,16 +56,13 @@ public class Server {
|
|||
}
|
||||
}
|
||||
|
||||
public static class ApiBinance {
|
||||
public static final String URL_BINANCE = ServerURL.API_BINANCE;
|
||||
static final String API_V1 = "api/v1/";
|
||||
|
||||
public static class Method {
|
||||
static final String ACCOUNT = URL_BINANCE + API_V1 + "account";
|
||||
static final String FEES = URL_BINANCE + API_V1 + "fees";
|
||||
static final String BROADCAST = URL_BINANCE + API_V1 + "broadcast";
|
||||
}
|
||||
}
|
||||
// public static class ApiBinance {
|
||||
// public static final String URL_BINANCE = ServerURL.API_BINANCE;
|
||||
//
|
||||
// public static class Method {
|
||||
// static final String API_V1 = URL_BINANCE + "api/v1";
|
||||
// }
|
||||
// }
|
||||
|
||||
public static class ApiBlockcypher {
|
||||
public static final String URL_BLOCKCYPHER = ServerURL.API_BLOCKCYPHER;
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
package com.tangem.data.network;
|
||||
|
||||
public class ServerApiBinance {
|
||||
}
|
||||
|
|
@ -7,6 +7,5 @@ class ServerURL {
|
|||
static final String API_ESTIMATEFEE = "https://estimatefee.com/";
|
||||
static final String API_UPDATE_VERSION = "https://raw.githubusercontent.com/";
|
||||
static final String API_ROOTSTOCK = "https://public-node.rsk.co/";
|
||||
static final String API_BINANCE = "https://testnet-dex.binance.org/";
|
||||
static final String API_BLOCKCYPHER = "https://api.blockcypher.com/";
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package com.tangem.data.network.model
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import java.security.MessageDigest
|
||||
|
||||
data class BinanceAccount(
|
||||
@SerializedName("address")
|
||||
var address: String? = null,
|
||||
|
||||
@SerializedName("sequence")
|
||||
var sequence: Long? = null,
|
||||
|
||||
@SerializedName("balances")
|
||||
var balances: List<BinanceBalance>? = null
|
||||
)
|
||||
|
||||
data class BinanceBalance(
|
||||
@SerializedName("symbol")
|
||||
var symbol: String? = null,
|
||||
|
||||
@SerializedName("free")
|
||||
var free: String? = null
|
||||
)
|
||||
|
||||
data class BinanceFees(
|
||||
@SerializedName("fixed_fee_params")
|
||||
var fixed_fee_params: BinanceFixedFee? = null
|
||||
)
|
||||
|
||||
data class BinanceFixedFee(
|
||||
@SerializedName("msg_type")
|
||||
var msg_type: String? = null,
|
||||
|
||||
@SerializedName("fee")
|
||||
var fee: Long? = null
|
||||
)
|
||||
|
||||
data class BinanceError(
|
||||
@SerializedName("message")
|
||||
var message: String? = null
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue