Closed AyushBherwani1998 closed 5 months ago
In the example you're using you have the following values:
secp256k1 ->
importTssKey: "0xc07e62798875a08deda085ca8eb4ccbcafe00a9ab7697cb3a4f4c4aa833364cc",
ed25519 ->
importTssKey: "5P7PPFbB3AYoXZE32GXXyx7LkkoWv3H9KruiHnteba4uCjZ4FWCVNJJxDcRp7TNwhBK93RYJahWUftteGCaZJbTc"
These are invalid and the returned errors are correct.
The key is being converted from a plain hex string (no prefix):
const tssKeyBN = new BN(tssKey, "hex");
Please try again with the following: 1) Generate an secp256k1 private key and serialize the BN to hex, little endian. 2) Generate an ed25519 seed and serialize to hex, big endian.
Okay, I'll try by removing the 0x prefix in the sec1 key, and for ed25519 I think the naming convention is confusing because importTssKey expects the ed25519 seed instead of private key.
Description
loginWithJWT throws error for both key types when passing private key as importTssKey in JWTLoginParams.
Ed25519 KeyType Error
Console
SEC1 KeyType Error
Console
Reproducible steps
ed25519 Sample: https://github.com/Web3Auth/web3auth-core-kit-examples/tree/importTssKey-issue/mpc-core-kit-web/mpc-core-kit-solana
secp256k1 Sample: https://github.com/Web3Auth/web3auth-core-kit-examples/tree/importTssKey-issue/mpc-core-kit-web/quick-starts/mpc-core-kit-vue-quick-start