Client.Proving
A proving context. Stores information about the commitment values and is used for the binding_sig. A context should created with init
, passed to spend_proof
for all inputs and output_proof
for all outputs, passed to make_binding_sig
and finally freed with free
. *
val with_proving_ctx : (t -> 'a) -> 'a
val ar_random : unit -> ar
val spend_sig :
Spending_key.t ->
ar ->
CV.t ->
Nullifier.t ->
UTXO.rk ->
UTXO.spend_proof ->
string ->
UTXO.spend_sig
String is the anti-replay. *
val spend_proof :
t ->
Viewing_key.t ->
Spending_key.t ->
Viewing_key.address ->
Rcm.t ->
ar ->
amount:int64 ->
root:Hash.t ->
witness:Stdlib.Bytes.t ->
CV.t * UTXO.rk * UTXO.spend_proof
val output_proof :
t ->
DH.esk ->
Viewing_key.address ->
Rcm.t ->
amount:int64 ->
CV.t * UTXO.output_proof
val make_binding_sig :
t ->
UTXO.input list ->
UTXO.output list ->
balance:int64 ->
bound_data:string ->
string ->
UTXO.binding_sig
See spec section 4.12 *