❗️❗️Note that setting the number of required responses to less than the threshold will cause Lit.Actions.signEcdsa to fail when running executeJs because ECDSA requires a minimum number of participants (the threshold) to collaboratively generate a valid signature. If fewer nodes participate, the signature cannot be formed, leading to a failure.
eg.
❌ Not good
const res = await devEnv.litNodeClient.executeJs({
sessionSigs: eoaSessionSigs,
code: `(async () => {
const sigShare = await LitActions.signEcdsa({ <== 👈 Signing using ECDSA
toSign: dataToSign,
publicKey,
sigName: "sig",
});
})();`,
jsParams: {
dataToSign: alice.loveLetter,
publicKey: alice.pkp.publicKey,
},
numResponsesRequired: 1, <=== ❌ This will fail, eg. need at least 5 if we have connected to 9 nodes
});
✅ This is good
const res = await devEnv.litNodeClient.executeJs({
sessionSigs: eoaSessionSigs,
code: `(async () => {
console.log("testing"); <=== 👈 Only console.logging
})();`,
jsParams: {
dataToSign: alice.loveLetter,
publicKey: alice.pkp.publicKey,
},
numResponsesRequired: 1, <=== ✅ Das ist gut
});
Description
numResponsesRequired
param toexecuteJs
.❗️❗️Note that setting the number of required responses to less than the threshold will cause
Lit.Actions.signEcdsa
to fail when runningexecuteJs
because ECDSA requires a minimum number of participants (the threshold) to collaboratively generate a valid signature. If fewer nodes participate, the signature cannot be formed, leading to a failure.eg.
❌ Not good
✅ This is good