I need a specific function from monero source

Hello, so basically I fucked up and send a transaction to a subaddress as if it where a normal address… (long story short, I generated a main address from a subaddress)

Now of course the funds are stuck and to access them I would need to use the function

device_default::get_subaddress_secret_key

Which is burried in the monero source in monero/src/device/device_default.cpp

Now I have no idea how c++ works or how the variables work.. let alone how memory management works.

The idea was to monero/tests/unit_tests/device.cpp

And just inject my code into one of the tests so it writes down the result in a text file and I can just define the secret key (the string of the private view key, and then after that a string of the private spend key which should work the same) and the index of the subaddress and then import those 2 as a main address in the wallet.

The problem is I don't have any idea how to do this.

Any help would be appriciated.

submitted by /u/n1c39uy
[link] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *