从一个本地钱包到交换钱包的波纹交易(例如:crex24)使用java提供错误代码tecDST_TAG_NEEDED

问题描述 投票:1回答:1

我在本地服务器上安装了ripple钱包。我创建了一个钱包并用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"
}
java ripple rippled
1个回答
2
投票

您在crex24.com的帐户需要destination tagXRPL使用类似于account modelETH。不像BTC使用UTXO model

一些交易所需要destination tag的原因是你可能在交易所与其他人分享该地址。例如:

  • Person1的存款地址是:Addr1
  • Person2的存款地址也是Addr1
  • 有人将100XRP存放到Addr1

在上面的情况下,如果是Person1Person2,交易所将无法区分。 所以XRPL引入了destination tag,它看起来与此类似:

  • 交易所使用tfRequireDestTag交易将Addr1true旗帜设置为accountSet
  • Person1的存款地址是:Addr1:1234
  • Person2的存款地址也是Addr1:1235
  • 有人将100XRP存放到Addr1。由于XRPL被设置为tfRequireDestTagtrue拒绝/这是你的情况/
  • 有人将50XRP送到Addr1:1234<-- this one succeeds!
© www.soinside.com 2019 - 2024. All rights reserved.