Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assert(json && typeof json === 'object');
this.C2 = BN.fromJSON(json.C2);
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}
fromJSON(json) {
assert(json && typeof json === 'object');
this.C2 = BN.fromJSON(json.C2);
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}
fromJSON(json) {
assert(json && typeof json === 'object');
this.C2 = BN.fromJSON(json.C2);
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}
fromJSON(json) {
assert(json && typeof json === 'object');
this.C2 = BN.fromJSON(json.C2);
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}
fromJSON(json) {
assert(json && typeof json === 'object');
this.C2 = BN.fromJSON(json.C2);
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
fromJSON(json) {
assert(json && typeof json === 'object');
this.C2 = BN.fromJSON(json.C2);
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}
fromJSON(json) {
assert(json && typeof json === 'object');
this.C2 = BN.fromJSON(json.C2);
this.C3 = BN.fromJSON(json.C3);
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}
assert((json.shifts >>> 0) === json.shifts);
assert((json.bitsPerWindow >>> 0) === json.bitsPerWindow);
assert((json.bits >>> 0) === json.bits);
assert((json.pointsPerSubcomb >>> 0) === json.pointsPerSubcomb);
assert(Array.isArray(json.items));
this.pointsPerAdd = json.pointsPerAdd;
this.addsPerShift = json.addsPerShift;
this.shifts = json.shifts;
this.bitsPerWindow = json.bitsPerWindow;
this.bits = json.bits;
this.pointsPerSubcomb = json.pointsPerSubcomb;
this.size = json.items.length;
for (const item of json.items)
this.items.push(BN.fromJSON(item));
return this;
}
this.t = BN.fromJSON(json.t);
this.chal = BN.fromJSON(json.chal);
this.ell = BN.fromJSON(json.ell);
this.Aq = BN.fromJSON(json.Aq);
this.Bq = BN.fromJSON(json.Bq);
this.Cq = BN.fromJSON(json.Cq);
this.Dq = BN.fromJSON(json.Dq);
this.Eq = BN.fromJSON(json.Eq);
this.z_w = BN.fromJSON(json.z_w);
this.z_w2 = BN.fromJSON(json.z_w2);
this.z_s1 = BN.fromJSON(json.z_s1);
this.z_a = BN.fromJSON(json.z_a);
this.z_an = BN.fromJSON(json.z_an);
this.z_s1w = BN.fromJSON(json.z_s1w);
this.z_sa = BN.fromJSON(json.z_sa);
this.z_s2 = BN.fromJSON(json.z_s2);
return this;
}