Module 0x1::sigma_protocol_witness
use 0x1::ristretto255;
Struct Witness
A secret witness consists of a vector $w$ of $k$ scalars
struct Witness has drop
Fields
Function new_secret_witness
Creates a new secret witness from a vector of scalars.
public(friend) fun new_secret_witness(w: vector<ristretto255::Scalar>): sigma_protocol_witness::Witness
Implementation
public(friend) fun new_secret_witness(w: vector<Scalar>): Witness { Witness { w } }
Function length
Returns the length of the witness: i.e., the number of scalars in it.
public(friend) fun length(self: &sigma_protocol_witness::Witness): u64
Function get
Returns the ith scalar in the witness.
public(friend) fun get(self: &sigma_protocol_witness::Witness, i: u64): &ristretto255::Scalar
Function get_scalars
Returns the underling vector of witness scalars.
public(friend) fun get_scalars(self: &sigma_protocol_witness::Witness): &vector<ristretto255::Scalar>
Implementation
public(friend) fun get_scalars(self: &Witness): &vector<Scalar> {
&self.w
}