sigma_protocol_witness - [mainnet]
use 0x1::ristretto255;
Structs
Witness
A secret witness consists of a vector of scalars
struct Witness has drop
Fields
Functions
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 } }
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
Implementation
public(friend) fun length(self: &Witness): u64 {
self.w.length()
}
get
Returns the ith scalar in the witness.
public(friend) fun get(self: &sigma_protocol_witness::Witness, i: u64): &ristretto255::Scalar
Implementation
public(friend) fun get(self: &Witness, i: u64): &Scalar {
&self.w[i]
}
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
}