Nym mixnet and WalletConnect integration — the first steps
This spotlight on work by a recent Nym intern shows how the mixnet can plug in to WalletConnect, securing dApps and wallets.
This spotlight on work by a recent Nym intern shows how the mixnet can plug in to WalletConnect, securing dApps and wallets.
WalletConnect is an open source Web3 protocol that enables secure interactions between dApps and crypto wallets, supporting over 300 wallets. Like most of Web3, communications traffic takes place on the open internet, leaving users vulnerable to surveillance, deanonymisation and attacks.
Languages: 日本 // Türkçe // 中文 // Español // Português // Française // Bahasa Indonesia // Русский
Exploratory work by Nym intern Raoul has demonstrated the feasibility of an integration between WalletConnect and the Nym mixnet to protect WalletConnect traffic at the network layer.
Pattern protection is critical for the future of Web3. Decentralised applications will only become the future of the web if the people using them can be confident their activity is private and secure.
This initial proof of concept shows promising potential for how the mixnet can be plugged in to broader open source wallet protocols, guarding transactions between wallets and dApps against surveillance.
On the dApp side, this exploratory integration is based on the Ethereum-provider tool, while for the wallets, the integration protects the WalletConnect TypeScript SDK for browser-based wallets.
Please note that this is not an end-user integration with full privacy protections, but merely scoping out the possibilities of a future integration. It is a feasibility exercise, forked from the original WalletConnect repo. This proposal includes linking via Node Package Manager, while the chosen dApp uses conventional WalletConnect integration. Relying on this integration for privacy protections is risky for two major reasons:
- Not all dApps integrate WalletConnect in the same way
- The forked repo is already behind the upstream in terms of commits, creating heavy incompatibility issues.
However, the integration does work and therefore its logic is sound, paving the way for more formalised, official integrations to come.
If you are a developer and keen to try this integration yourself, here are the steps:
1. Pick a wallet and application from the 180 wallets and 450 dApps that currently work with WalletConnect.
2. Download the source code of that wallet and dApp.
3. Download walletconnect-utils-nym and walletconnect-monorepo-nym.
4. Run ‘npm link’ on every modified package to create a local, importable version.
5. If the wallet and the dApp rely on the WalletConnect TS SDK and Ethereum-provider, the integration was designed with these tools in mind. Skip step 6.
6. If the wallet and/or the dApp do not rely on WalletConnect TS SDK or Ethereum-provider but a third-party library, go ahead and download the intermediary libraries. Run npm link as required for those intermediaries.
7. Run ‘npm install’ first for the wallet and dApp.
8. Update the dependencies in the source code of the wallet and dApp to use the Nym-powered version, for instance, nym-ethereum-provider or nym-web3wallet.
9. Link the nym-enabled dependencies by running ‘npm link nym-package-name-1 … nym-package-name-n’
10. Optional step: update parameters downflow to include Nym ports.
11. Run one Nym client on the wallet device. The default port for the Nym client should be 1970.
12. Run two Nym clients on the dApp. The default ports for those Nym clients should be 1977 and 1990.
13. Run the Nym-enabled dApp and the Nym-enabled wallet.
14. That’s it!
Keep an eye out on this blog and Nym socials for more integration news. With the release of mixFetch, developers can now plug and play the powerful privacy protections of the Nym mixnet into their projects much more easily.
Huge thanks to Raoul for his important work!
Nym is always seeking promising talent to join the core team as paid interns. If you share the Nym vision of privacy for everyone, get in touch to learn about internship opportunities.
Join the Nym Community
Discord // Telegram // Element // Twitter
Privacy loves company
English // 中文 // Русский // Türkçe // Tiếng Việt // 日本 // Française // Español // Português // 한국인