UseEvm Hook
The useEvm hook is part of the Zky Toolkit, providing Ethereum (EVM) interaction capabilities.
Method Details
const { balance, publicKeys, enabledChains, chain } = useZky();
const [signedTx, setSignedTx] = useState<string>("")
const { signTransaction } = useEvm();
signTransaction({
to: "0xRecipientAddress",
value: BigInt(1000000000000000000),
}, enabledChains[1].id)
.then((signedTx) => {
console.log("Signed Transaction:", signedTx);
})
.catch((error) => {
console.error("Failed to sign transaction:", error);
});Last updated