1

我在本地服务器上安装了波纹钱包。我创建了一个钱包并用 20 XRP 激活它。

现在,当我将硬币从我的活动帐户发送到帐户(crex24.com)时,它会给出 tecDST_TAG_NEEDED 错误代码

波纹: http: //127.0.0.1 :5005

代码(使用提交方法):

RestTemplate template = new RestTemplate();
Map<String,Object> mainMap = new HashMap<>();
mainMap.put("secret", "sxxxxxxxxxxx");
mainMap.put("Fee", "1000"); // in drops

Map<String,String> subMap = new HashMap<>();
subMap.put("Account", "raxxxxxxxxx"); // amount will be deducted from this account
subMap.put("Amount", "1000000"); // in drops
subMap.put("Destination", "rdxxxxxxxxx"); // receiver address
subMap.put("TransactionType", "Payment"); // since we are making a  payment request

mainMap.put("tx_json", subMap);

JSONObject json = new JSONObject();
json.put("method", "submit");
json.put("params", new JSONArray(mainMap)); 
String requestData = json.toString();
System.out.println(requestData);
String response = template.postForObject("http://127.0.0.1:5005", requestData,String.class);
System.out.println(response);

错误

{
  "status": 200,
  "message": "Transaction achieved successfully.",
  "data": {
    "result": {
      "deprecated": "Signing support in the 'submit' command has been deprecated and will be removed in a future version of the server. Please migrate to a standalone signing tool.",
      "engine_result": "tecDST_TAG_NEEDED",
      "engine_result_code": 143,
      "engine_result_message": "A destination tag is required.",
      "status": "success",
      "tx_blob": "120000228000000024000000096140000000000F424068400000000000000A7321036CB83FF75DAxxxxxxxxxxxxxxxxxx",
      "tx_json": {
        "Account": "raxxxxxxxxx",
        "Amount": "1000000",
        "Destination": "rdxxxxxxxxx",
        "Fee": "10",
        "Flags": 214482148,
        "Sequence": 9,
        "SigningPubKey": "036Cxxxxxxxxxxxxxxx6",
        "TransactionType": "Payment",
        "TxnSignature": "txxxxxxxxx",
        "hash": "hxxxxxxxxxx"
      }
    }
  },
  "path": "/api/ripple_wallet/makeTransaction"
}
4

1 回答 1

3

您的帐户crex24.com需要destination tag. XRPL用途account model类似于ETH。不像BTCwhich 使用UTXO model.

某些交易所需要的原因destination tag是您可能与交易所中的其他人共享该地址。例如:

  • Person1的存款地址是:Addr1
  • Person2的存款地址也是Addr1
  • 有人存款100XRPAddr1.

在上述情况下,交易所将无法区分它是Person1's 还是Person2's。
因此,XRPL引入的destination tag内容看起来与此类似:

  • Exchange 设置使用accountSet事务tfRequireDestTag标志Addr1true
  • Person1的存款地址是:Addr1:1234
  • Person2的存款地址也是Addr1:1235
  • 有人存款100XRPAddr1. XRPL由于tfRequireDestTag设置为true/This is your case/而拒绝
  • 有人50XRP发给Addr1:1234.<-- this one succeeds!
于 2019-03-18T07:03:54.687 回答