Giter Club home page Giter Club logo

dotnet-stellar-sdk's Introduction


dotnet-stellar-sdk

Stellar API SDK for .NET 6


Explore the docs »

Report Bug · Request Feature · Report Security Vulnerability

Table of Contents

About The Project

dotnet-stellar-sdk is a .NET 6 library for communicating with a Stellar Horizon server. It is used for building Stellar apps.

This project originated as a full port of the official Java SDK API

Installation

The stellar-dotnet-sdk library is bundled in a NuGet Package.

Visual Studio

JetBrains Rider

Other

Usage

Check the Tutorials page to get started.

In case of doubts or issues, you can ask for help here:

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/

XDR Generation

In order to generate the XDR Files automatically in C# a custom XDR Generator must be used.

You can find the latest working generator here: https://github.com/fracek/xdrgen/tree/csharp

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.

Example

  1. Install custom XDR generator:
    git clone https://github.com/stellar/xdrgen
    cd xdrgen
    git checkout csharp
    rake install
    
  2. Regenerate .cs files from .x files:
    cd dotnet-stellar-sdk/
    xdrgen -o=./stellar-dotnet-sdk-xdr/generated -l=csharp -n=stellar_dotnet_sdk.xdr ./stellar-dotnet-sdk-xdr/*.x
    
  3. Reformat .cs files using dotnet-format:
    dotnet format
    

Contributors

License

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

Acknowledgements

  • Stellar Development Foundation

dotnet-stellar-sdk's People

Contributors

elucidsoft avatar kirbyrawr avatar fracek avatar michaeljmonte avatar emalamisura-c2m avatar jopmiddelkamp avatar guywhoknowstheguy avatar cuongph87 avatar leighmcculloch avatar chancity avatar farukterzioglu avatar hrocky99 avatar dependabot[bot] avatar mootz12 avatar jaglinux avatar raymens avatar brewaa avatar

Stargazers

Dashelldot avatar Ebere Abanonu avatar  avatar Christian Rogobete avatar  avatar

Watchers

Dashelldot avatar Ebere Abanonu avatar

dotnet-stellar-sdk's Issues

nsec.cryptography

the latest update appears to have removed the RandomGenerator which breaks WebAuthentication.cs

Automate the SDK version numbering

For now for each release we have to bump the version in the csproj file manually. Would be nice if we can make it automated, preferably with some Github Actions.

Horizon v2.31.0 and RPC v21.4.0 changes

Please add support to your SDK for the following API changes.

Horizon Changes

Horizon v2.31.0 made the following changes:

  • New endpoint: POST /transactions_async allows asynchronous transaction submission (code: stellar/go#5188).
  • Error schema change: POST /transactions now includes a the hash in its timeout response, which may or may not require code changes depending on how your SDK handles transaction submission errors (code: stellar/go#5328).

Soroban RPC Changes

RPC v21.4.0 added the following endpoints:

  • getTransactions, which returns pages of transaction details (code: stellar/soroban-rpc#174).
  • getFeeStats, which returns aggregated fee statistics over a few ledgers (code: stellar/soroban-rpc#172).
  • getVersionInfo, which returns detailed information about the software versions the RPC server is running (code: stellar/soroban-rpc#132). Please keep in mind that this endpoint accidentally used snake_case for response fields and it will be updated to camelCase (see soroban-rpc#164) as part of Protocol 22's breaking changes when the time comes.

Reference

Protocol 21 SDK Support

Protocol 21 SDK Support

Once voted in, the release of Protocol 21 will introduce following new CAPs:

  • CAP-51: Smart Contract Host Functionality
  • CAP-53: Separate host functions to extend the TTL for contract instance and contract code
  • CAP-54: Soroban refined VM instantiation cost model
  • CAP-55 : Soroban streamlined linking
  • CAP-56: Soroban intra-transaction module caching

XDR changes:

XDR update stellar/stellar-xdr#184 - stellar/stellar-xdr@1a04392

Reference Implementations:
js-sdk - stellar/js-stellar-base#738

Soroban API Changes:

Breaking Changes:

Non Breaking changes:

New optional field in SimulateTransactionResponse which indicates how the state (ledger entries) will change as a result of the transaction execution.

StateDiff       []LedgerEntryDiff            `json:"stateDiff,omitempty"`   

type LedgerEntryDiff struct {
	Before string `json:"before,omitempty"` // LedgerEntry XDR in base64
	After  string `json:"after,omitempty"`  // LedgerEntry XDR in base64
}

New Ledger Range and Ledger Retention Window in getHealth Response

type HealthCheckResult struct {
	Status                string `json:"status"`
	LatestLedger          uint32 `json:"latestLedger"` // New
	OldestLedger          uint32 `json:"oldestLedger"` // New
	LedgerRetentionWindow uint32 `json:"ledgerRetentionWindow"` // New
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.