Created
June 5, 2024 02:58
-
-
Save jeftarmascarenhas/deb2dd71bd26a60e314f984d4190f680 to your computer and use it in GitHub Desktop.
zkTransaction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ZkEVM } from 'zkEVM'; | |
// Cria uma instância do zkEVM | |
const zkEVM = new ZkEVM(); | |
// Define os parâmetros da transação | |
const remetente = '0x123456789abcdef'; | |
const destinatario = '0x987654321fedcba'; | |
const valor = 100; | |
// Gera uma prova zero para a transação | |
const prova = zkEVM.gerarProva(remetente, destinatario, valor); | |
// Envia a transação com a prova zero | |
zkEVM.enviarTransacao(prova); | |
console.log('Transação privada enviada com sucesso!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment