我在本地服务器上安装了ripple钱包。我创建了一个钱包并用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"
}
您在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
交易将Addr1
的true
旗帜设置为accountSetPerson1
的存款地址是:Addr1:1234
Person2
的存款地址也是Addr1:1235
100XRP
存放到Addr1
。由于XRPL
被设置为tfRequireDestTag
,true
拒绝/这是你的情况/50XRP
送到Addr1:1234
。 <-- this one succeeds!