-
Start Ganache server
-
Connect Metamask wallet to Ganache Server
-
In terminal, run “truffle migrate” (to migrate smart contracts)
-
In terminal, run “npm start” (to deploy webapp)
-
Webapp is running on localhost:3000
Web3
JSEncrypt
React
Ganache
Truffle
Python libs for keygen
rsa
json
src/components/Chat.js
-
decryptMessage(cipherText,acc, bits): Decrypts CipherText at each layer
-
async didReceiveMessageBinded(event): Receives, Decrypts and routes intermediate cipherText
-
encryptMessage(message,acc, bits): Encrypts using public key of specified node
-
makeOnion(nodes): Append next node address and re-encrypt recursively to create onion CipherText
-
async didSendMessage(message,is_user_msg): Receives, Encrypts and makes onion CipherText to be forwarded
-
async sendEtherIfAsked(cur_node,next_node,message): Recieves and routes ethereum using onion route
- connect to all the available wallet addresses available in Ganache
- send messages between these addresses
- store all the messages in the smart contract in order to fetch them back when the page is reloaded
- monitor the state of the blockchain in real time when the transactions are executed
- send ethereum between the addresses