RsTx supports Stealth Addresses for Ethereum
- Create a new master key-pair
- Transfer funds to a master public key
- Receive funds sent to a master public key
The RsTx architecture consists of the following repositories:
- Rust Client to implement the logic
- Smart contracts to communicate the nonce point
- Subgraph to query Ethereum blockchain
RsTx implements stealth addresses based on the Diffie-Hellman key agreement protocol. The implementation follows the mechanism described here.
Both sender and recipient must have an already generated key-pair. The recipient's key-pair will act as a base (master) key, used to calculate the new one-time keys.
After a successful transfer, the sender must communicate the Nonce point
(which is logged after a transfer) to the recipient. The recipient later uses this point to generate the key for the received funds. Without the nonce point, it is not possible to generate the new key.
Once a transfer has been made, the nonce_point
is broadcasted to the RsTx Smart Contract along with a bytes encoded encrypted form of the recipient's address. The encrypted_recipient
is used by the recipients in their client to catch or ignore the new RsTx transactions.
Senders can simply run the scan
command, with an additional block number filter to query RsTx transactions. The GraphQL schema is generated using The Graph Protocol, and the subgraphs can be found here in the RsTx Subgraph repository.
- Clone this repository
git clone git@github.com:roynalnaruto/rs_tx_subgraph.git
- Get graph node for local development: Instructions here
- Install dependencies and generate schema
yarn && yarn codegen
- Get Ganache and run
npm install -g ganache-cli
ganache-cli -a=20
- Create subgraph
yarn create-local
- Deploy subgraph
yarn deploy-local