Zklogin Signature is not valid: Signature is not valid: General cryptographic error: Groth16 proof verify failed #1
-
|
Zklogin Signature is not valid: Signature is not valid: General cryptographic error: Groth16 proof verify failed |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
To provide a more precise fix, I would need to understand the context of the code and any specific issues you're encountering. However, based on the code snippet you shared, here are some potential improvements and corrections: Type Definitions: Ensure you are using appropriate types for the variables. The use of any is generally discouraged in TypeScript. Error Handling: Consider adding error handling to manage any exceptions that may arise during the transaction process. Formatting: Make sure the code is consistently formatted for better readability. Here's a modified version of your code with some improvements: private async transact(tx: TransactionType) {
try {
const keypair = AuthService.getEd25519Keypair();
const sender = AuthService.e.walletAddress(); // Ensure this method exists
tx.setSender(sender); // Ensure sender is correctly set
const { bytes, signature: userSignature } = await tx.sign({
client: SUI_CLIENT,
signer: keypair,
});
const zkLoginSignature = await AuthService.generateZkLoginSignature(userSignature);
return SUI_CLIENT.executeTransactionBlock({
transactionBlock: bytes,
signature: zkLoginSignature,
});
} catch (error) {
console.error("Transaction failed:", error);
throw new Error("Transaction execution failed");
}
} |
Beta Was this translation helpful? Give feedback.

To provide a more precise fix, I would need to understand the context of the code and any specific issues you're encountering. However, based on the code snippet you shared, here are some potential improvements and corrections:
Type Definitions: Ensure you are using appropriate types for the variables. The use of any is generally discouraged in TypeScript.
Error Handling: Consider adding error handling to manage any exceptions that may arise during the transaction process.
Formatting: Make sure the code is consistently formatted for better readability.
Here's a modified version of your code with some improvements: