svub / nunya

GNU General Public License v3.0
2 stars 0 forks source link

Secret Contract Public Key #6

Open ltfschoen opened 6 days ago

ltfschoen commented 6 days ago

How to obtain the uploaded and instantiated Secret contract's private key and public key?

How to return the Secret contract public key from the Secret contract instantiate function that currently returns Ok(Response::default()), and what Response and how to access the Task (requestId) since its not in the instantiate arguments. Do we have to create a function that gets handled through try_handle to do that, then provide it with the callback?

ltfschoen commented 6 days ago

Seanrad responded: implementation here, where we query the public key (you could also update the logic to view the private key) https://github.com/writersblockchain/aes-encrypt/blob/afa384d69aaddd92b50323fe1b9324f1342a5c0e/src/contract.rs#L198