Skip to content

Commit 8e7fde9

Browse files
committed
fix: multicurve tests
1 parent 6953287 commit 8e7fde9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/multiCurveTest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("multiCurveTest", () => {
3636
web3AuthNetwork,
3737
baseUrl: "http://localhost:3000",
3838
uxMode: "nodejs",
39-
tssLibs : [dklslib, frostLib, frostBip340lib],
39+
supportedKeyTypes: [KeyType.secp256k1, KeyType.ed25519],
4040
storage: storageInstance,
4141
manualSync,
4242
});
@@ -46,6 +46,7 @@ describe("multiCurveTest", () => {
4646
const message = "message to sign";
4747

4848
const hash = keccak_256(message);
49+
instance.addTssLibs([dklslib]);
4950
const result = await instance.signECDSA(Buffer.from(hash), {hashed: true})
5051
const {r, s } = sigToRSV(result);
5152

@@ -55,12 +56,14 @@ describe("multiCurveTest", () => {
5556
}, bytesToHex(hash), bytesToHex(instance.getPubKey(KeyType.secp256k1, false)))
5657
expect(validsecp256k1).eq(true);
5758

59+
instance.addTssLibs([frostBip340lib]);
5860
const result2 = await instance.signBip340( Buffer.from(utf8ToBytes(message)), {hashed: false})
5961

6062
const validb340 = bip340.verify(bytesToHex(result2), bytesToHex(utf8ToBytes(message)), bytesToHex(instance.getPubKeyBip340()));
6163
expect(validb340).eq(true);
6264

6365

66+
instance.addTssLibs([frostLib]);
6467
const result3 = await instance.signEd25519(Buffer.from(message), { hashed: false })
6568
const valided25519 = ed25519.verify(bytesToHex(result3), bytesToHex(Buffer.from(message)), bytesToHex( new Uint8Array(instance.getPubKeyEd25519()) ) )
6669
expect(valided25519).eq(true);

0 commit comments

Comments
 (0)