Cosmcs 0.4.1
See the version list below for details.
dotnet add package Cosmcs --version 0.4.1
NuGet\Install-Package Cosmcs -Version 0.4.1
<PackageReference Include="Cosmcs" Version="0.4.1" />
paket add Cosmcs --version 0.4.1
#r "nuget: Cosmcs, 0.4.1"
// Install Cosmcs as a Cake Addin
#addin nuget:?package=Cosmcs&version=0.4.1
// Install Cosmcs as a Cake Tool
#tool nuget:?package=Cosmcs&version=0.4.1
Cosmcs
A C# client library for Cosmos SDK blockchains for netstandard2.1 with Unity support This is modeled after cosmrs
Build
git submodule sync
./gen_proto.sh
dotnet build
Usage
With EasyClient
Cosmcs.Client.EasyClient
is an easy to use client object
var rpcUrl = "http://localhost:9090";
var chainId = "mychain1";
var prefix = "cosmos";
byte[] privateKey = new byte[32]
{
176, 139, 111, 219, 136, 19, 183,
176, 135, 218, 199, 231, 70, 249,
129, 238, 212, 167, 207, 147, 217,
51, 43, 217, 82, 136, 182, 245,
189, 104, 186, 17
}; // Place byte privateKey here
var ec = new EasyClient(rpcUrl, chainId, privateKey, "cosmos");
// Using pregenerated routes
var authzTxClient = new Cosmos.Authz.V1beta1.MsgClient(ec);
// Using pregenerated queries
var authzQueryClient = new Cosmos.Authz.V1beta1.Query.QueryClient(ec.Channel);
Unity
Due to Unity's lack of support for HTTP/2.0 and the fact that gRPC exclusively utilizes HTTP/2.0, specific options must be provided when initializing EasyClient
. This adjustment allows the internal gRPC channel to utilize gRPC-Web, which is compatible with HTTP/1.x.
Cosmos blockchains start a grpc server on port 9090
and a grpc-web server on port 9091
.
// ...
var rpcUrl = "http://localhost:9091";
var options = new EasyClientOptions{
GrpcChannelOptions = new GrpcChannelOptions{
HttpHandler = new GrpcWebHandler(GrpcWebMode.GrpcWeb, new HttpClientHandler())
}
};
var ec = new EasyClient(rpcUrl, chainId, privateKey, "cosmos", options);
// ...
Examples
For a fully working example with codegeneration see CardchainCs.
License and Development
This is licensed under the GPL-v3 License, part of the DecentralCardgame project and developed by lxgr-linux.
Product | Versions 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- CardanoBech32 (>= 0.9.1)
- Cryptography.ECDSA.Secp256k1 (>= 1.1.3)
- DevHawk.RIPEMD160 (>= 3.0.27)
- Google.Protobuf (>= 3.23.3)
- Grpc.Core (>= 2.46.6)
- Grpc.Net.Client (>= 2.55.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Cosmcs:
Package | Downloads |
---|---|
CardchainCs
A C# client library for cosmos-sdk blockchains |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.5.1 | 119 | 5/7/2024 |
0.5.0 | 106 | 5/3/2024 |
0.5.0-rc1 | 65 | 5/3/2024 |
0.4.4 | 422 | 10/17/2023 |
0.4.3 | 153 | 10/4/2023 |
0.4.2 | 113 | 10/4/2023 |
0.4.1 | 156 | 9/28/2023 |
0.4.0 | 136 | 9/28/2023 |
0.4.0-rc3 | 86 | 9/28/2023 |
0.4.0-rc2 | 85 | 9/27/2023 |
0.4.0-rc1 | 81 | 9/27/2023 |
0.3.2 | 208 | 9/21/2023 |
0.3.1 | 155 | 8/18/2023 |
0.3.0 | 127 | 8/18/2023 |
0.2.7 | 156 | 8/15/2023 |
0.2.5 | 208 | 8/7/2023 |
0.2.4 | 186 | 8/6/2023 |
0.2.3 | 130 | 8/4/2023 |
0.2.2 | 144 | 8/1/2023 |
0.2.1 | 147 | 8/1/2023 |
0.2.0 | 171 | 7/31/2023 |
0.1.1 | 175 | 7/30/2023 |
0.1.0 | 186 | 7/22/2023 |
0.0.17 | 189 | 7/17/2023 |
0.0.16 | 138 | 7/16/2023 |
0.0.15 | 142 | 7/16/2023 |
0.0.14 | 147 | 7/16/2023 |
0.0.13 | 146 | 7/15/2023 |
0.0.10 | 147 | 7/12/2023 |
0.0.6 | 154 | 7/3/2023 |
0.0.5 | 146 | 7/3/2023 |
0.0.4 | 140 | 7/3/2023 |
0.0.3 | 148 | 7/2/2023 |
0.0.2 | 139 | 6/22/2023 |
0.0.1 | 139 | 6/22/2023 |