Skip to content

theHour/dotnet-stellar-sdk

 
 

Repository files navigation

dotnet-stellar-sdk

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

Build Status NuGet Badge

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.

Quick Start

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

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
  • 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
  • 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.

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

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 96.7%
  • RPC 3.1%
  • Other 0.2%