How to store and make transaction with your secret key using vuejs and firebase
Clash Royale CLAN TAG#URR8PPP
How to store and make transaction with your secret key using vuejs and firebase
So i'm creating a XRP wallet and got a nice result using vuejs and firestore viewing your wallets and transactions realtime is nice but sending some XRP to someone would make it complete. Therefore i've come to the hard part: make secure transactions. You guys know that you need a public key and a private/secret key.
So my question is how do i secure the wallets and do i need to make a transaction on the backend so the secret key doesn't leave the room so to speak. Or do i give the secret key back to the client while he makes the transaction. Or is there even a better way to make secure transactions / store the secret key.
this is how a transaction looks like for XRP
api.connect().then(() =>
const payment =
"source":
"address": address,
"maxAmount":
"value": amount,
"currency": currency,
"counterparty": destination
,
"destination":
"address": destination,
"amount":
"value": amount,
"currency": currency,
"counterparty": destination
;
return api.preparePayment(address, payment);
).then(prep =>
const txJSON = prep.txJSON;
return api.sign(txJSON, secret);
).then(sign =>
const signedTransaction = sign.signedTransaction;
//do sms check or email then
return api.submit(signedTransaction);
).then(subm =>
//tx success
).then(() =>
return api.disconnect();
).then(() =>
console.log('done and disconnected.');
).catch(console.error);
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.