i installed ripple wallet on my local server. i created one wallet and activate it with 20 XRP.
Now when i send coin from my active account to account(of crex24.com) then it gives tecDST_TAG_NEEDED error code
Ripple : http://127.0.0.1:5005
Code (using submit method):
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);
Error
{
"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"
}
Your account on
crex24.comrequires adestination tag.XRPLusesaccount modelsimilar toETH. UnlikeBTCwhich uses anUTXO model.The reason some exchanges require
destination tagis that you might be sharing that address with some other person on the exchange. e.g:Person1's deposit address is:Addr1Person2's deposit address is alsoAddr1100XRPtoAddr1.In the case above the exchange wouldn't be able to differentiate if it was
Person1's orPerson2's.So the
XRPLintroduceddestination tagwhich would look something similar to this:tfRequireDestTagflag of theAddr1totrueusing accountSet transactionPerson1's deposit address is:Addr1:1234Person2's deposit address is alsoAddr1:1235100XRPtoAddr1.XRPLrefuses due totfRequireDestTagbeing set totrue/This is your case/50XRPtoAddr1:1234.<-- this one succeeds!