Closed jasondavies closed 4 years ago
Implementation steps:
DataJsonEncoder
from Sigma.
{ name1: value; ... nameN: value }
/script/executeToSigmaTree
ergoLikeContextEncoder
into the ErgoLikeContext
object.ErgoTree
using ScriptApiRoute.compileSource
ErgoProvingInterpreter
(from ergo-wallet) and call reduceToCrypto
method.[ ] serialize the result of the call in Json and return it as the result of the request.
The result in general contains SigmaBoolean
value, for which we don't have Json encoder.
This have to be implemented as subtask
In general, this involves many subsystems, so you may need to dig along these steps. Ping me with questions in comments below if necessary.
To understand which Json to send, for example, you can make ErgoLikeContext and serialize it to Json via ergoLikeContextEncoder.
NOTE: The work should be done using v3.0.3
branch of Sigma.
From morphic on Slack:
I think along with #901, we also need the ability to execute a script in a given target context so that we can generate proofs for the resulting SigmaProp.