You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending Ether to a phone number with user verification via SMS.
3
3
4
4
## Project Overview
5
5
Sending ether to mobile phone number. Receiver doesn’t even need to have a wallet, but simply needs to open the web app, follow simple steps and receive ether using one of the possible ways.
6
6
7
7
## Demo
8
-
Play with the demo at https://eth2phone.github.io/ . The demo app supports Ropsten network right now.
8
+
Play with the demo at https://eth2phone.github.io/ . The demo app supports Ropsten and Mainnet networks right now.
1. Sender generates verification private-public key pair. Sender transfers ether to smart contract and assigns verification public key. On withdrawal smart-contract verifies that receiver's address is signed by the verification private key.
17
-
2. Sender encrypts verification private key with random secret code and sends encrypted keystore data to verification server.
18
-
3. Sender passes the secret code to receiver by the way he chooses (voice, sms, e-mail, etc.)
19
-
4. Receiver types in his phone number and the secret code. Hashed phone verification request is sent to server. (So not at any point in time verification server has the verification private key.)
20
-
5. Server sends the verification code via SMS to the phone entered.
21
-
6 Receiver gets the code from SMS and types it in. If the code is correct, server returns encrypted keystore data to receiver.
22
-
7. Receiver decrypts keystore data with the secret code provided by sender and gets verification private key. Receiver signs address to transfer to ether with verfication private key. Receiver sends signed address to verification server. Verification server tries to withdraw ether through smart-contract to signed address. If signature is correct, the transaction is executed and receiver gets the ether.
23
-
24
-
## Running on Ropsten
25
-
You should be good to go if you set Metamask to point at the correct network.
2. Sender deposits ether to escrow smart contract and assigns transit public key to the deposit. On withdrawal escrow smart-contract verifies that receiver's address is signed by the transit private key.
19
+
3. Sender encrypts transit private key with random secret code and sends encrypted transit private key to verification server.
20
+
4. Sender passes the secret code to receiver by the way he chooses (voice, sms, e-mail, etc.)
21
+
22
+
### Receive
23
+

24
+
1. Receiver types in his phone number and the secret code. Hashed phone verification request is sent to server. (So not at any point in time verification server has the transit private key.)
25
+
2. Server sends the verification code via SMS to the phone entered.
26
+
3. Receiver gets the code from SMS and types it in. If the code is correct, server returns encrypted transit private key to receiver.
27
+
4. Receiver decrypts the transit private key with the secret code provided by sender and gets the transit private key. Receiver signs address of his choice with the transit private key. Receiver sends signed address to verification server.
28
+
5. Verification server tries to withdraw ether from escrow smart-contract to signed address. If signature is correct, the transaction is executed and receiver gets the ether.
29
+
30
+
## Running on Ropsten or Mainnet
31
+
Works best with Trust Wallet on mobile. You can also use a browser with Metamask on desktop.
26
32
Load https://eth2phone.github.io/ and use the app.
27
33
34
+
28
35
## Code structure
29
36
`./src/controllers/SenderController` - controller for handling sender's requests
30
37
@@ -34,9 +41,10 @@ Load https://eth2phone.github.io/ and use the app.
34
41
35
42
`./src/services/TransferService` - service for handling interaction with Transfer models stored in MongoDB
36
43
37
-
`./src/services/VerifiedProxyService` - service for handling interaction with VerifiedProxy Contract.
44
+
`./src/services/EscrowContratService - service for handling interaction with Ethereum blockchain via e2pEscrow Contract.
45
+
38
46
39
47
This repo contains NodeJS server code for handling SMS-authentication. Front-end code + smart-contracts are located in the separate repository - https://github.com/Dobrokhvalov/eth2phone
0 commit comments