我在本地服务器上安装了涟漪钱包。我创建了一个钱包,并用20 XRP激活了它。
现在,当我从活动帐户中的硬币发送到crex24.com的帐户时,它会给出tecDST_TAG_NEEDED错误代码
代码(使用提交方法):
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"
}
答案 0 :(得分:1)
您在crex24.com
上的帐户需要一个destination tag
。
XRPL
使用account model
类似于ETH
。与BTC
使用UTXO model
不同。
某些交易所要求destination tag
的原因是您可能正在与交易所中的其他人共享该地址。例如:
Person1
的存款地址是:Addr1
Person2
的存款地址也是Addr1
100XRP
存入Addr1
。在上述情况下,交易所无法区分是Person1
还是Person2
。
因此XRPL
引入了destination tag
,它看起来类似于以下内容:
tfRequireDestTag
的{{1}}标志设置为Addr1
true
的存款地址是:Person1
Addr1:1234
的存款地址也是Person2
Addr1:1235
存入100XRP
。由于Addr1
被设置为XRPL
,tfRequireDestTag
拒绝了/这是您的情况/ true
发送到50XRP
。 Addr1:1234