WalletConnect.Core 1.6.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package WalletConnect.Core --version 1.6.1
NuGet\Install-Package WalletConnect.Core -Version 1.6.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WalletConnect.Core" Version="1.6.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WalletConnect.Core --version 1.6.1
#r "nuget: WalletConnect.Core, 1.6.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install WalletConnect.Core as a Cake Addin
#addin nuget:?package=WalletConnect.Core&version=1.6.1

// Install WalletConnect.Core as a Cake Tool
#tool nuget:?package=WalletConnect.Core&version=1.6.1

WalletConnectSharp

WalletConnectSharp is an implementation of the WalletConnect protocol (currently only v1) using .NET and (optinoally) NEthereum. This library implements the WalletConnect Technical Specification in .NET to allow C# dApps makers to add support for the open WalletConnect protocol.

⚠️ This is the core library: This library does not include a default Transport. Consider using WalletConnect.Desktop if you are not writing a custom Transport ⚠️

Usage

First you must define the ClientMeta you would like to send along with your connect request. This is what is shown in the Wallet UI

var metadata = new ClientMeta()
{
    Description = "This is a test of the Nethereum.WalletConnect feature",
    Icons = new[] {"https://app.warriders.com/favicon.ico"},
    Name = "WalletConnect Test",
    URL = "https://app.warriders.com"
};    

Once you have the metadata, you can create the WalletConnect object

var walletConnect = new WalletConnect(metadata);
Console.WriteLine(walletConnect.URI);

This will print the wc connect code into the console. You can transform this text into a QR code or use it for deep linking. Once you have the wc link displayed to the user, you can then call Connect(). The Connect() function will block until either a successful or rejected session response

var walletConnectData = await walletConnect.Connect();

This function returns a Task<WCSessionData> object, so it can be awaited if your using async/await. The WCSessionData has data about the current session (accounts, chainId, etc..)

Console.WriteLine(walletConnectData.accounts[0]);
Console.WriteLine(walletConnectData.chainId);

Connecting with NEthereum

With the above, you have enough to use the base WalletConnect protocol. However, this library comes with an NEthereum provider implementation. To use it, you simply invoke CreateProvider(url) or CreateProvider(IClient). You are required to specify an additional RPC URL or a custom IClient because the WalletConnect protocol does not perform read operations (eth_call, eth_estimateGas, etc..), so you must provide either an Infura Project ID, a node's HTTP url for HttpProvider or a custom IClient.

Here is an example

var web3 = new Web3(walletConnect.CreateProvider(new Uri("https://mainnet.infura.io/v3/<infruaId>"));
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on WalletConnect.Core:

Package Downloads
WalletConnect.Sign

A port of the TypeScript SDK to C#. A complete implementation of the WalletConnect v2 protocol that can be used to connect to external wallets or connect a wallet to an external Dapp

WalletConnect.Desktop

A lightweight C# implementation of the WalletConnect protocol that can be used to connect to external wallets or connect a wallet to an external Dapp. Use this package for desktop applications

WalletConnect.Auth

A port of the TypeScript SDK to C#. A complete implementation of the WalletConnect v2 protocol that can be used to connect to external wallets or connect a wallet to an external Dapp

WalletConnect.Web3Wallet

A port of the TypeScript SDK to C#. A complete implementation of the WalletConnect v2 protocol that can be used to connect to external wallets or connect a wallet to an external Dapp

WalletConnect.NEthereum

An NEthereum extension to access the WalletConnect protocol through a Web3 Provider. A lightweight C# implementation of the WalletConnect protocol that can be used to connect to external wallets or connect a wallet to an external Dapp

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.5 53 4/17/2024
2.3.4 102 4/16/2024
2.3.3 147 4/15/2024
2.3.2 158 4/12/2024
2.3.1 154 3/28/2024
2.3.0 277 3/19/2024
2.2.0 387 1/22/2024
2.1.7 351 12/21/2023
2.1.6 1,036 11/15/2023
2.1.5 179 11/10/2023
2.1.4 180 11/6/2023
2.1.3 170 10/26/2023
2.1.2 216 10/23/2023
2.1.1 1,107 10/17/2023
2.1.0 902 9/12/2023
2.0.6 342 7/10/2023
2.0.5 567 6/13/2023
2.0.4 234 5/23/2023
2.0.3 744 2/22/2023
1.7.2 1,029 10/3/2022
1.7.1 1,396 6/1/2022
1.7.0 962 5/4/2022
1.6.9 577 4/28/2022
1.6.8 576 4/28/2022
1.6.7 542 4/28/2022
1.6.6 547 3/25/2022
1.6.5 607 10/22/2021
1.6.2 696 8/24/2021
1.6.1 435 8/18/2021
1.6.0 447 8/18/2021