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.
To install using Nuget run
Install-Package stellar-dotnet-sdk or install the Nuget package from Visual Studio.
- 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
- 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
- Create Account
- Path Payment
- Manage Offer
- Create Passive Offer
- Set Options
- Change Trust
- Allow Trust
- Account Merge
- Manage Data
- Paging (Limit, Cursor, Sorting)
- Rate Limiting (Limit, Remaining, Reset)
- Response Format (Links, Embedded Resourced, Attributes, Pages, Streaming)
- Bump Sequence
For some examples on how to use this library, take a look at the Get Started docs in the developers site.
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!
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.
dotnetcore-stellar-sdk is licensed under an Apache-2.0 license. See the LICENSE file for details.