# WalletConnectSharp Core
WalletConnectSharp is an implementation of the [WalletConnect](https://walletconnect.org/) protocol (currently only v1) using .NET and (optinoally) NEthereum. This library implements the [WalletConnect Technical Specification](https://docs.walletconnect.org/tech-spec) in .NET to allow C# dApps makers to add support for the open [WalletConnect](https://walletconnect.org/) protocol. This branch of the repo includes only the core library, which can be cloned as a submodule in other projects
#### :warning: **This is beta software**: This software is currently in beta and under development. Please proceed with caution, and open a new issue if you encounter a bug :warning:
## 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
```csharp
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
```csharp
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
```csharp
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..)
```csharp
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
```csharp
var web3 = new Web3(walletConnect.CreateProvider(new Uri("https://mainnet.infura.io/v3/<infruaId>"));
```
没有合适的资源?快使用搜索试试~ 我知道了~
Web3 Elden Ring 教程代码 - Web3游戏编程_C#_代码_下载
共3615个文件
meta:1957个
cs:1257个
png:81个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 84 浏览量
2022-06-23
17:42:53
上传
评论
收藏 172.46MB ZIP 举报
温馨提示
使用 Unity 和 Moralis 在 Elden Ring 克隆了一场 Boss 战。您将学习如何将 Web3 元素添加到游戏中,因此 Boss 掉落的战利品将是 ERC-721 和 ERC-20 代币。 具体来说,我们将首先了解战利品系统是如何创建的。然后,如何将这些战利品转换为 ERC 代币,最后,如何检索现在的链上数据以在游戏菜单中将其可视化。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
Web3 Elden Ring 教程代码 - Web3游戏编程_C#_代码_下载
(3615个子文件)
UniTask.asmdef 1KB
UniTask.Addressables.asmdef 537B
UniTask.TextMeshPro.asmdef 531B
UniTask.DOTween.asmdef 521B
Moralis.Web3UnitySdk.asmdef 433B
Moralis.Web3UnitySdk.Editor.asmdef 418B
WalletConnectSharp.Unity.asmdef 414B
UniTask.Editor.asmdef 368B
UniTask.Linq.asmdef 343B
Nethereum.asmdef 341B
endel.nativewebsocket.asmdef 39B
New Terrain.asset 5.92MB
TerrainData_984456c3-d32f-475f-a118-27bb19f92a65.asset 5.43MB
TerrainData_6dc76592-a48a-4163-91df-c29ec1a99c66.asset 5.43MB
TerrainData_832163fb-b19c-4118-97c2-cf0a3b224fca.asset 5.42MB
TerrainData_ff4b5190-b520-4d46-b960-ee1d0967df26.asset 5.41MB
TerrainData_d3c37e8d-6092-48f4-b81e-93b97326e4d2.asset 5.41MB
TerrainData_88efe361-6f68-4188-bcd0-e9554ca440b9.asset 5.39MB
TerrainData_c82c1fc5-a7ad-4f88-a7ff-c071a4dae8e5.asset 5.39MB
TerrainData_445999c2-5240-4b5c-9394-4cacb62d7eec.asset 5.39MB
LightingData.asset 3.33MB
LiberationSans SDF.asset 2.15MB
Agmena Pro Regular SDF.asset 2.05MB
Agmena Pro Regular SDF.asset 2.05MB
Mantinia Regular SDF.asset 2.05MB
ProjectSettings.asset 22KB
EmojiOne.asset 13KB
InputManager.asset 10KB
LiberationSans SDF - Fallback.asset 9KB
Default Style Sheet.asset 5KB
QualitySettings.asset 4KB
URP-HighFidelity-Renderer.asset 3KB
GraphicsSettings.asset 3KB
URP-Balanced-Renderer.asset 2KB
URP-HighFidelity.asset 2KB
URP-Performant.asset 2KB
URP-Balanced.asset 2KB
Physics2DSettings.asset 2KB
ReadMe.asset 2KB
ReadMe.asset 2KB
URP-Performant-Renderer.asset 2KB
EditorUserSettings.asset 2KB
TMP Settings.asset 2KB
DynamicsManager.asset 1KB
NavMeshAreas.asset 1KB
MemorySettings.asset 1KB
EditorSettings.asset 1KB
PackageManagerSettings.asset 1003B
UnityConnectSettings.asset 901B
UniversalRenderPipelineGlobalSettings.asset 842B
MoralisServerSettings.asset 751B
GameInputSettings.asset 730B
TagManager.asset 527B
ShaderGraphSettings.asset 463B
RiderScriptEditorPersistedState.asset 438B
AudioManager.asset 413B
URPProjectSettings.asset 410B
EditorBuildSettings.asset 360B
VFXManager.asset 308B
TimeManager.asset 202B
VersionControlSettings.asset 188B
XRSettings.asset 158B
PresetManager.asset 146B
ClusterInputManager.asset 114B
TMPro_Mobile.cginc 5KB
TMPro_Surface.cginc 3KB
TMPro_Properties.cginc 3KB
TMPro.cginc 2KB
VS_indirect.cginc 2KB
boot.config 0B
Paladin_Anim_Controller.controller 31KB
Creature_Anim_Controller.controller 15KB
CombineLatest.cs 431KB
SupportedWalletList.cs 215KB
UniTask.WhenAll.Generated.cs 207KB
UniTask.WhenAny.Generated.cs 200KB
MonoBehaviourMessagesTriggers.cs 147KB
BigInteger.cs 143KB
MinMax.cs 118KB
Tween.cs 55KB
TokenApi.cs 52KB
TokenApi.cs 52KB
Average.cs 51KB
GroupBy.cs 44KB
Sum.cs 43KB
UnityRPCRequests.cs 42KB
MoralisQuery.cs 41KB
KeccakDigest.cs 40KB
SelectMany.cs 38KB
GameInput.cs 35KB
Moralis.cs 35KB
UnityAsyncExtensions.cs 33KB
MoralisLiveQueryClient.cs 30KB
UnityAsyncExtensions.uGUI.cs 30KB
Join.cs 30KB
Where.cs 29KB
UniTaskExtensions.cs 29KB
UniTaskCompletionSource.cs 29KB
Select.cs 28KB
GroupJoin.cs 27KB
共 3615 条
- 1
- 2
- 3
- 4
- 5
- 6
- 37
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- keil2 + proteus + 8051.exe
- 1961ee27df03bd4595d28e24b00dde4e_744c805f7e4fb4d40fa3f695bfbab035_8(1).c
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- windows注册表编辑工具
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- 校园通行码预约管理系统20240522075502
- 车类型数据集6250张VOC+YOLO格式.zip
- The PyTorch implementation of STGCN.STGCN-main.zip
- 092300108.cpp
- 车类型数据集6000张VOC+YOLO格式.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功