I'm trying to build a Monero transaction using the mymonero-core
library. So far I've been following the code from the tests, however I'm not quite sure what to do with the "rct" part of the previous output. Here (ref)
the rct in constructed as the string concatenation of outpk[i],mask[i],amount[i]
, which is possible because the used transaction 9d37c7fdeab91abfd1e7e120f5c49eac17b7ac04a97a0c93b51c172115df21ea
has all these fields:
""rct_signatures"": { ""type"": 3, ""txnFee"": 327860000, ""ecdhInfo"": [ { ""mask"": ""889e4a48335cbbf163ca9cd0299df86f28818ebb45960e0dd00e3f1a0549a704"", ""amount"": ""9b07dcf00b7bf6cbdf269da3d9772af2ae377e1f58f13158359f6c96bfd2e50d"" }, { ""mask"": ""b5b234ccdd70beca8b1fc8de4f2ceb1374e0f1fd8810849e7f11316c2cc06306"", ""amount"": ""0008ffa5ac9827b776993468df21af8c963d12148622354f950cbe1369a92a0c"" }], ""outPk"": [ ""3ef9880e8fed3f5222096938a6bc773d2a12cbbc9caf30d12bc6a216b4fad70b"", ""86a2c9f1f8e66848cd99bfda7a14d4ac6c3525d06947e21e4e55fe42a368507e""] },
In my case however the transaction which I want to use UTXOs from has this structure
""rct_signatures"": { ""type"": 4, ""txnFee"": 30790000, ""ecdhInfo"": [ { ""amount"": ""54dd48f41f3670f3"" }, { ""amount"": ""c0c11a7c62dc0f68"" }], ""outPk"": [ ""f4449d60fbc9087f9dcfa856537b4d2d02433454ba5245d4d46ea36ea5922c46"", ""29660983d695b61492d9a213c150da443997f8c9397e2910a07717fbda87f64d""] },
So the mask
is missing and amount
has a different format. How do I build RCT for those?
4
?)? https://github.com/monero-project/monero/blob/master/src/crypto/crypto.cpp#L515 it's really hard to find any docs or code samples for it – Oleg Golovkov May 04 '20 at 15:44spendable_amount can't be 0
which I assume come from the fact that I don't build a proper rct (since other parts look good). My final goal is to build a valid tx string that I could later broadcast via the daemon given the valid UTXO (posted in the question) and the spend key for it – Oleg Golovkov May 04 '20 at 16:11