Wallet Address Format Conventions

  • TRON wallet addresses are case-sensitive for letters.
  • ETH wallet addresses use lowercase letters.

API Request Header

Attribute NameRequired/OptionalTypeDescription
Content-TypeRequiredStringmultipart/form-data
X-API-KEYRequiredStringAssigned API-KEY by the platform.

API Format Conventions

All request parameters must be constructed in the form of form-data, encrypted using RSA public key, and submitted in Base64 encoding. The encrypted data should be submitted as the data parameter.

Additionally, the data parameter in the response is also encrypted, and developers need to decrypt it to obtain the plaintext content.

Request Format

Content-Disposition: form-data; name="data"

U2FsdGVkX1+... (EncryptedString)

Encryption Process

  • Use the RSA public key provided by the platform to encrypt the request parameters.

  • The encrypted data must be Base64-encoded and submitted as the data parameter.

Decryption Process

  • After the platform receives the encrypted data parameter, it will decrypt it using the corresponding private key.

  • The data parameter in the response is also encrypted, and developers need to decrypt it using the public key to retrieve the plaintext.


Java Encryption Code Example

Below is an example of using an RSA public key to encrypt data in Java:

import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;

public class RSAEncrypt {
    public static String encryptByPublicKeyForOut(String data, String publicKey) throws Exception {
        // Decode the public key string
        X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey));
        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
        PublicKey publicK = keyFactory.generatePublic(x509EncodedKeySpec);

        // Initialize the cipher
        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
        cipher.init(Cipher.ENCRYPT_MODE, publicK);

        byte[] dataByte = data.getBytes();
        int inputLen = dataByte.length;
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        int offSet = 0;
        byte[] cache;
        int i = 0;

        // Encrypt in segments
        while (inputLen - offSet > 0) {
            if (inputLen - offSet > 117) {
                cache = cipher.doFinal(dataByte, offSet, 117);
            } else {
                cache = cipher.doFinal(dataByte, offSet, inputLen - offSet);
            }
            out.write(cache, 0, cache.length);
            i++;
            offSet = i * 117;
        }

        byte[] encryptedData = out.toByteArray();
        out.close();

        // Base64-encode the encrypted result
        return Base64.getEncoder().encodeToString(encryptedData);
    }
}

Java Decryption Code Example

Below is an example of using an RSA public key to decrypt response data in Java:

import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;

public class RSADecrypt {
    public static String decryptByPublicKeyForOut(String data, String publicKey) throws Exception {
        // Decode the public key string
        X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey));
        KeyFactory keyFactory = KeyFactory.getInstance("RSA");
        PublicKey publicK = keyFactory.generatePublic(x509EncodedKeySpec);

        // Initialize the cipher
        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
        cipher.init(Cipher.DECRYPT_MODE, publicK);

        byte[] encryptedData = Base64.getDecoder().decode(data);
        int inputLen = encryptedData.length;
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        int offSet = 0;
        byte[] cache;
        int i = 0;

        // Decrypt in segments
        while (inputLen - offSet > 0) {
            if (inputLen - offSet > 128) {
                cache = cipher.doFinal(encryptedData, offSet, 128);
            } else {
                cache = cipher.doFinal(encryptedData, offSet, inputLen - offSet);
            }
            out.write(cache, 0, cache.length);
            i++;
            offSet = i * 128;
        }

        byte[] decryptedData = out.toByteArray();
        out.close();

        // Return the decrypted plaintext
        return new String(decryptedData);
    }
}

Notes

  • Public/Private Key Management: The platform will assign an RSA public key to each merchant. Please store it securely to prevent leaks. The private key is strictly managed by the platform, and merchants do not need to manage it.

  • Base64 Encoding: The results of encryption and decryption must be Base64-encoded to ensure data integrity during transmission.


Supported Tokens

TokenChainSupport Status

USDT

TRC20✅ Supported

USDT

ERC20✅ Supported

USDT

BEP20⏳ Under Development

PHT

TRC20✅ Supported

PHT

ERC20✅ Supported

USDC

ERC20✅ Supported

USDC

BEP20⏳ Under Development

ETH

ERC20⏳ Under Development

ETH

BEP20⏳ Under Development

Risk Scoring Reference

  • 🟢 Low Risk: 0 ~ 30, no risk or low risk.

  • 🟡 Medium Risk: 31 ~ 64, may have transactions with medium or high-risk addresses.

  • 🟠 High Risk: 65 ~ 84, recommended to isolate.

  • 🔴 Severe Risk: 85 ~ 100, immediate isolation is recommended.