Skip to content

tarik1603/dotnet-stellar-sdk

 
 

dotnet-stellar-sdk

Build status codecov CodeFactor NuGet Badge

Stellar API SDK for .NET Core 2.x and .NET Standard 2.0

The .NET Core Stellar Sdk library provides APIs to build transactions and connect to Horizon.

Read more about Stellar

This project is a full port of the official Java SDK API. It is fully functional and all of the original Java Unit Tests were also ported and are passing.

XDR

NuGet Badge

If you only need the XDR objects in a .NET Standard NuGet package, then you can get those here: https://www.nuget.org/packages/stellar-dotnet-sdk-xdr/

Quick Start

To install using Nuget run Install-Package stellar-dotnet-sdk or install the Nuget package from Visual Studio.

If you have questions or need help on how to do something please use the Stellar Stack Exchange.

Capabilities

  • Accounts - Create, Query, Payment, Path Payment, Manage Offer, Create Passive Offer, Set Options, Change Trust, Allow Trust, Account Merge, Inflation, Manage Data, Paging (Limit, Cursor, Sorting)
  • Assets - CreateNonNativeAsset types (AlphaNum4, AlphaNum12), XDR Conversion
  • All Assets - This endpoint represents all assets. It will give you all the assets in the system along with various statistics about each.
  • Distributed Exchange - Orderbook, Passive Offers
  • Federation
  • Inflation - Inflation Operation
  • Ledger Create, Query, Paging (Limit, Cursor, Sorting)
  • Multisignature - Allows multiple signature per transaction, Thresholds, ed25519 signature scheme, Transaction Signing, Allow Trust, Set Options, Hash, Envelopes
  • Stellar.toml - Supports the Stellar TOML format.
  • Testnet - Supports Network switching from Public to Testnet
  • Trade Aggregations - Trade Aggregations are catered specifically for developers of trading clients. They facilitate efficient gathering of historical trade data. This is done by dividing a given time range into segments and aggregate statistics, for a given asset pair (base, counter) over each of these segments.
  • Transactions - Source Accounmt, Fee, Sequence Number, Supported Operations (see below), Signatures (multiple), Memo (Text, Id, Hash, Return)
  • XDR - Full XDR Support, Custom XDRGenerator, Supports .x files

Supported Operations

Documentation

Read the API Reference Documentation for more information about the API. For more guidance Stellar.org has documentation that is specific to their Javascript API but usage is very similar.

Basic Usage

For some examples on how to use this library, take a look at the Get Started docs in the developers site.

Demo Application

In the root of the solution there is a console application called TestConsole, it connects to the Horizon TestNet and pulls down some data. The TestNet can be cleared at any moment so the keys it uses may not be valid. You can use the Stellar Laboratory to setup an account on TestNet and to play around with data between the TestNet and the API. You can also use the API to create an account, and Laboratory to validate the results, vice versa!

XDR Generation

In order to generate the XDR Files automatically in C# a custom XDR Generator must be used. We created a fork of xdrgen that does this located here: https://github.com/michaeljmonte/xdrgen

You can use that version of xdrgen to regenerate the XDR files from the .x files located from the source of the original API SDK for Horizon.

Contributors

License

dotnetcore-stellar-sdk is licensed under an Apache-2.0 license. See the LICENSE file for details.

About

Stellar API SDK for .NET Core 2.x and .NET Standard 2.0

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 95.5%
  • RPC 3.5%
  • CSS 0.5%
  • Shell 0.2%
  • Logos 0.2%
  • JavaScript 0.1%