Workers Auto Approve
Implement missing exchangeKey cryptography for react-native
As part of the WCIP-2 (WalletConnect/WCIPs#2) the exchangeKey flow will be refactored to include a 2-stage procedure that includes a signing challenge and a key update to complete the exchangeKey successfully.
The proposal has been implemented on the `exchange-key-refactor` branch in this repo and it already includes the cryptography library interface required to perform this procedure.
From PR #118, you can see the file changes to the `core`, `browser`, `react-native` packages are completed but the `react-native` package is still missing the cryptographic methods.
The `browser` library was able to use an existing library called `eth-crypto` but this library is not supported in the `react-native` library.
Implement the missing cryptographic methods present in the `nativeCrypto.ts` file required for the new exchangeKey flow on the `exchange-key-refactor` branch.
The methods are `generateKeyPair`, `encryptWithPublicKey`, `decryptWithPrivateKey`, `sign`, and `recoverPublicKey`.
Refer to lines 157 to 196 [here](https://github.com/WalletConnect/walletconnect-monorepo/blob/1e4d0d1b7598baadad46a1aefc8e0a4abfdb97bc/packages/react-native/src/nativeCrypto.ts#L157).
### Potential Solution 1
Fork `eth-crypto` library and make it react-native compatible. Check the issue is described on their repo [here](https://github.com/pubkey/eth-crypto/issues/25).
### Potential Solution 2
Use a different library (eg. crypto node module polyfill from tradle/react-native-crypto) that matches the same cryptographic methods as the ones used from `eth-crypto`. These methods involve key pair generation, encrypt, decrypt, sign and recover with Secp256k1. For more details, please consult the source code for `eth-crypto` library [here](https://github.com/pubkey/eth-crypto)
When forking this repository to submit a PR, please use `exchange-key-refactor` branch as base and submit a PR agaisnt it.
To test the react-native enviroment, you can use `walletconnect-developer-app` library found [here](https://github.com/walletconnect/walletconnect-developer-app). Run the app from `debug` branch and you will find a folder called `walletconnect` under `src` which is copy of the source code from `walletconnect-monorepo` on the `exchange-key-refactor` branch.
For any other questions, please reach out directly to me @pedrouid on Github / Telegram / Discord.
Setup your profile
Tell us a little about you:
No results found for
Type to search skills..
Required [[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email: