You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 month ago | |
---|---|---|
.. | ||
Runtime | 1 month ago | |
LICENSE | 1 month ago | |
LICENSE.meta | 1 month ago | |
README.md | 1 month ago | |
README.md.meta | 1 month ago | |
Runtime.meta | 1 month ago | |
package.json | 1 month ago | |
package.json.meta | 1 month ago |
README.md
WalletConnectUnity Nethereum
This Unity package provides a simple way to integrate WalletConnect with Nethereum.
Usage
// Nethereum's Web3 instance
var web3 = new Web3();
// Instance of WalletConnect singleton
var walletConnect = WalletConnect.Instance;
// Interceptor that will route requests requiring signing to the wallet connected with WalletConnect
var walletConnectUnityInterceptor = new WalletConnectUnityInterceptor(walletConnect);
// Assign the interceptor to the Web3 instance
web3.Client.OverridingRequestInterceptor = walletConnectUnityInterceptor;
// Use the Web3 instance as usual
// This `personal_sign` request will be routed to the wallet connected with WalletConnect
var encodedMessage = new HexUTF8String("Hello WalletConnect!");
var result = await web3.Eth.AccountSigning.PersonalSign.SendRequestAsync(encodedMessage);