The default threshold of the tKey is two (needs a minimum 2 for quorum).
Can I change this to 3 (or n in the general) ? How do I code this?
thanks
The default threshold of the tKey is two (needs a minimum 2 for quorum).
Can I change this to 3 (or n in the general) ? How do I code this?
thanks
You can set the threshold using code below
const newThreshold = 3;
const pubPoly = tkey.metadata.getLatestPublicPolynomial();
const polyID = pubPoly.getPolynomialID();
const shareIndexes = tkey.metadata.getShareIndexesForPolynomial(polyID);
const results = await tkey._refreshShares( newThreshold, shareIndexes, polyID );
Please be aware that if user have less that threshold key, they will not able to reconstruct their private key. Update threshold carefully.
Thanks @cherngwoei
I will try this, but I do have questions to clarify:
You can only called it after tkey.reconstruct()
as long as the private key is reconstructed, you can refresh as you wanted