Xrpl 11.26.0

dotnet add package Xrpl --version 11.26.0
                    
NuGet\Install-Package Xrpl -Version 11.26.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xrpl" Version="11.26.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xrpl" Version="11.26.0" />
                    
Directory.Packages.props
<PackageReference Include="Xrpl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Xrpl --version 11.26.0
                    
#r "nuget: Xrpl, 11.26.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Xrpl@11.26.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Xrpl&version=11.26.0
                    
Install as a Cake Addin
#tool nuget:?package=Xrpl&version=11.26.0
                    
Install as a Cake Tool

NuGet Badge

XrplCSharp

A pure C# implementation for interacting with the XRP Ledger, the XrplCSharp library simplifies the hardest parts of XRP Ledger interaction, like serialization and transaction signing, by providing native C# methods and models for XRP Ledger transactions and core server API (rippled) objects.

// create a network client
using System.Diagnostics;
using Xrpl.Client;
using Xrpl.Models.Methods;
using Xrpl.Wallet;

var client = new XrplClient("wss://s.altnet.rippletest.net:51233");
await client.Connect();
Debug.WriteLine("CONNECTED");

// create a wallet on the testnet
XrplWallet testWallet = XrplWallet.Generate();
await WalletSugar.FundWallet(client, testWallet);
Debug.WriteLine(testWallet);
// public_key: ED3CC1BBD0952A60088E89FA502921895FC81FBD79CAE9109A8FE2D23659AD5D56
// private_key: -HIDDEN -
// classic_address: rBtXmAdEYcno9LWRnAGfT9qBxCeDvuVRZo

// look up account info
string account = "rBtXmAdEYcno9LWRnAGfT9qBxCeDvuVRZo";
AccountInfoRequest request = new AccountInfoRequest(account);
AccountInfo accountInfo = await client.AccountInfo(request).Typed();
Debug.WriteLine(accountInfo);

Every request also hands back the bytes the node actually sent, beside the typed projection. The typed model is lossy by nature — it drops members it has no property for — so anything that has to show or verify what a node said reads the raw text:

// continuing from the example above
XrplResponse<AccountInfo> response = await client.AccountInfo(request);

AccountInfo typed = response.Result;                // the projection
string asTheNodeSentIt = response.Raw.ToString();   // byte for byte, as the node sent it
string status = response.Status;                    // the envelope reaches you too

Three ways to read the same call, depending on what you need:

AccountInfo info = await client.AccountInfo(request).Typed();   // the projection alone
var (info, raw) = await client.AccountInfo(request);            // both
XrplResponse<AccountInfo> r = await client.AccountInfo(request); // the whole envelope

Installation and supported versions

The Xrpl library is available on NuGet. Install with dotnet:

dotnet add package Xrpl

The library supports .NET 8, .NET 9, and .NET 10.

Features

Use XrplCSharp to build C# applications that leverage the XRP Ledger. The library helps with all aspects of interacting with the XRP Ledger, including:

  • Key and wallet management
  • Serialization
  • Transaction Signing

XrplCSharp also provides:

  • A network client — See xrpl.clients for more information.
  • Methods for inspecting accounts — See XRPL Account Methods for more information.
  • Codecs for encoding and decoding addresses and other objects — See Core Codecs for more information.

Reference Documentation

See the complete XrplCSharp reference documentation.

Usage

The following sections describe some of the most commonly used modules in the XrplCSharp library and provide sample code.

Network client

Use the Xrpl.Client library to create a network client for connecting to the XRP Ledger.

using System.Diagnostics;
using Xrpl.Client;
using Xrpl.Models.Methods;
using Xrpl.Wallet;

var client = new XrplClient("wss://s.altnet.rippletest.net:51233");
await client.Connect();
Debug.WriteLine("CONNECTED");

Manage keys and wallets

Xrpl.Wallet

Use the Xrpl.Wallet module to create a wallet from a given seed or via a Testnet faucet.

To create a wallet from a seed (in this case, the value generated using Xrpl.Keypairs):

using System.Diagnostics;
using Xrpl.Wallet;
// ...
string seed = "s";
XrplWallet wallet = XrplWallet.FromSeed(seed);
Debug.WriteLine(wallet);
// pub_key: ED46949E414A3D6D758D347BAEC9340DC78F7397FEE893132AAF5D56E4D7DE77B0
// priv_key: -HIDDEN-
// classic_address: rG5ZvYsK5BPi9f1Nb8mhFGDTNMJhEhufn6

To create a wallet from a Testnet faucet:

using System.Diagnostics;
using Xrpl.Wallet;
XrplWallet testWallet = XrplWallet.Generate();
await WalletSugar.FundWallet(client, testWallet);
Debug.WriteLine(testWallet.ClassicAddress);
// Classic address: rEQB2hhp3rg7sHj6L8YyR4GG47Cb7pfcuw
Xrpl.Keypairs

Use the Xrpl.Keypairs module to generate seeds and derive keypairs and addresses from those seed values.

Here's an example of how to generate a seed value and derive an XRP Ledger "classic" address from that seed.

using System.Diagnostics;
using Xrpl.Wallet;
// ...
XrplWallet wallet = XrplWallet.Generate();
string publicKey = wallet.PublicKey;
string privateKey = wallet.PrivateKey;
Debug.WriteLine("Here's the public key:");
Debug.WriteLine(publicKey);
Debug.WriteLine("Here's the private key:");
Debug.WriteLine(privateKey);
Debug.WriteLine("Store this in a secure place!");

Serialize and sign transactions

To securely submit transactions to the XRP Ledger, you need to first serialize data from JSON and other formats into the XRP Ledger's canonical format, then to authorize the transaction by digitally signing it with the account's private key. The XrplCSharp library provides several methods to simplify this process.

using System.Diagnostics;
using Xrpl.Models.Transactions;
using Xrpl.Models.Methods;
using Xrpl.Sugar;

string classicAddress = "rBtXmAdEYcno9LWRnAGfT9qBxCeDvuVRZo";
AccountInfoRequest request = new AccountInfoRequest(wallet.ClassicAddress);
AccountInfo accountInfo = await client.AccountInfo(request).Typed();

Payment tx = new Payment()
{
    Account = wallet.ClassicAddress,
    Destination = "rEqtEHKbinqm18wQSQGstmqg9SFpUELasT",
    Amount = new Xrpl.Models.Common.Currency { ValueAsXrp = 1 },
};

TransactionSummary response = await client.SubmitAndWait(tx, wallet);
Debug.WriteLine(response);
Get fee from the XRP Ledger

In most cases, you can specify the minimum transaction cost of "10" for the fee field unless you have a strong reason not to. But if you want to get the current load-balanced transaction cost from the network, you can use the Fees function:

using System.Diagnostics;
using Xrpl.Models.Methods;
FeeRequest feeRequest = new FeeRequest();
Fee fee = await client.Fee(feeRequest).Typed();
Debug.WriteLine(fee);
// 10
Read transaction history through the I interfaces

A transaction that comes back from the ledger — account_tx, tx, SubmitAndWait — is a response type: NFTokenCreateOfferResponse, not NFTokenCreateOffer. Matching on the request type compiles, warns about nothing and finds nothing:

foreach (TransactionSummary summary in history.Transactions)
{
    if (summary.Transaction is NFTokenCreateOffer request) { }  // never matches
    if (summary.Transaction is INFTokenCreateOffer offer)       // this is the one
    {
        Debug.WriteLine(offer.NFTokenID);
    }
}

Request and response types come in pairs that share an I interface — use those to read what the ledger sent, and the request types only to send. Every pair has one, with no exceptions, and a unit test holds the SDK to that.

Contributing

If you want to contribute to this project, see CONTRIBUTING.md.

Mailing Lists

We have a low-traffic mailing list for announcements of new XrplCSharp releases. (About 1 email per week)

If you're using the XRP Ledger in production, you should run a rippled server and subscribe to the ripple-server mailing list as well.

License

The XrplCSharp library is licensed under the Apache License 2.0. See LICENSE for more information.

Repository Credit

This project is originally based on work by Chris Williams, and descends from the XrplCSharp C# port by Denis Angell (Transia-RnD).

Currently maintained and developed by StaticBit-io.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Xrpl:

Package Downloads
Xrpl.X402

x402 (HTTP 402) agentic payments client for the XRP Ledger (XRPL exact scheme). Detects HTTP 402 challenges, builds and locally signs an XRPL Payment (XRP or RLUSD/IOU), and retries with a PAYMENT-SIGNATURE header. Verified live against the t54 facilitator.

Xrpl.PaymentGateway

Background XRP Ledger payment monitor: destination tag allocation, exactly-once recording, catch-up after disconnects, health and reconciliation.

Xrpl.X402.AspNetCore

ASP.NET Core server middleware (x402 require_payment) for accepting XRPL agentic payments. Adds a RequirePayment endpoint filter plus ledger-settling and t54 facilitators that verify and settle x402 PAYMENT-SIGNATUREs on the XRP Ledger.

StockSharp.Xrpl

Xrpl

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.26.0 42 11/10/2026
11.25.1 251 11/6/2026
11.25.0 72 11/6/2026
11.24.0 338 11/4/2026
11.23.0 178 11/3/2026
11.22.0 148 11/2/2026
11.21.0 218 10/27/2026
11.20.1 98 10/26/2026
11.20.0 129 10/25/2026
11.19.0 205 10/25/2026
11.18.1 111 10/24/2026
11.18.0 117 10/24/2026
11.17.0 96 10/22/2026
11.16.0 750 10/19/2026
11.15.0 2,021 10/19/2026
11.14.1 179 10/16/2026
11.14.0 426 10/13/2026
11.13.0 102 10/11/2026
11.12.0 213 10/5/2026
11.11.0 462 9/30/2026
Loading failed