Ripple.MultiSupport
1.1.0
Prefix Reserved
dotnet add package Ripple.MultiSupport --version 1.1.0
NuGet\Install-Package Ripple.MultiSupport -Version 1.1.0
<PackageReference Include="Ripple.MultiSupport" Version="1.1.0" />
<PackageVersion Include="Ripple.MultiSupport" Version="1.1.0" />
<PackageReference Include="Ripple.MultiSupport" />
paket add Ripple.MultiSupport --version 1.1.0
#r "nuget: Ripple.MultiSupport, 1.1.0"
#:package Ripple.MultiSupport@1.1.0
#addin nuget:?package=Ripple.MultiSupport&version=1.1.0
#tool nuget:?package=Ripple.MultiSupport&version=1.1.0
Ripple.MultiSupport
A C# library for XRPL wallet generation, address validation, offline signing, XRP payments, history, incoming-payment monitoring and account deletion. Targets .NET Standard 2.0 (including ASP.NET Web Forms on .NET Framework 4.7.2+) and .NET 8.
NuGet · Web Forms sample · XRPL documentation
Installation
dotnet add package Ripple.MultiSupport
API
| Client | Method | Purpose |
|---|---|---|
RippleClient |
GenerateAddress() |
Create a wallet with its address and seed |
ValidateAddress(address) |
Check classic-address encoding and checksum | |
SignTransaction(transaction) |
Sign locally; return a hexadecimal tx_blob |
|
XrplClient |
GetAccountAsync(address) |
Read validated balance, sequence and reserve estimates |
GetFeeAsync() |
Read the current fee estimate for a normal single-signed XRP payment, in XRP | |
GetNetworkInfoAsync() |
Read network ID (when reported), validated ledger and XRP reserve requirements | |
GetPaymentQuoteAsync(sender, request) |
Validate and estimate debit, remaining balance and maximum payment without signing | |
SendXrpAsync(seed, request) |
Sign and submit a direct XRP payment; wait for its result | |
GetAccountDeleteQuoteAsync(sender, request) |
Check deletion eligibility, fee and remaining XRP transfer without signing | |
DeleteAccountAsync(seed, request) / GetAccountDeleteAsync(receipt) |
Delete an eligible account or recover its saved result | |
GetTransactionAsync(hash) / GetTransactionAsync(receipt) |
Query status; a saved receipt also allows proven expiry checks | |
GetPaymentsAsync(address, request) |
Read validated incoming/outgoing XRP payment history | |
WatchIncomingPaymentsAsync(address, callback, options, token) |
Monitor successful incoming XRP payments with checkpoint recovery | |
XAddressCodec |
Encode(classicAddress, tag, isTestNetwork) / Decode(xAddress) / IsValid(xAddress) |
Convert and validate XLS-5 addresses; null and zero tags remain distinct |
All async operations accept a CancellationToken. The payment client uses the
account's master seed.
Send XRP
In an async method, supply your funded Testnet account's seed, destination,
cancellationToken, and a durable persistReceipt callback of type
Func<PaymentReceipt, CancellationToken, Task> from your application:
using System;
using Ripple;
using (var client = new XrplClient(new XrplClientOptions
{
RpcEndpoint = new Uri("https://testnet.xrpl-labs.com/"),
WebSocketEndpoint = new Uri("wss://testnet.xrpl-labs.com/")
}))
{
var result = await client.SendXrpAsync(seed, new XrpPaymentRequest
{
Destination = destination,
AmountXrp = 1m,
OnPreparedAsync = persistReceipt
}, cancellationToken);
}
The example uses Testnet. Configure matching HTTP/WebSocket endpoints for
your network.
Keep one shared client for the application's lifetime and dispose it at shutdown;
multiple processes/workers need host-side coordination for the same sender.
The built-in HTTP and WebSocket transports reject redirects; configure the final endpoint URLs.
A caller-supplied HttpClient controls its own redirect and transport policy.
Payment handling
GetFeeAsync()reads a current estimate without submitting anything. It can exceedMaxFeeXrp;SendXrpAsyncreads the fee again and enforces that limit.- Sending and quoting accept X-address destinations and verify Mainnet/Testnet/Devnet
identity before signing. Conflicting tags are rejected. Read/account APIs and
ValidateAddressretain classic-address behavior; decode X-addresses for those calls. - Keep seeds secret.
SignTransactiontakes an object containingSeedand signs locally. ItsAmount/Feefields use integer strings in drops (1 XRP = 1,000,000 drops).AmountXrp/MaxFeeXrpuse decimal XRP, with at most six decimal places and no silent rounding.DestinationTag = 0is valid; optionalMemotext is limited to 1000 UTF-8 bytes. - Persist the JSON-serializable
PaymentReceiptinOnPreparedAsync, before broadcast, linked to your unique business operation. It contains no seed. If persistence fails, nothing is submitted. After restart, reconcile all saved unresolved receipts before sending more payments. - Only
Succeededis a validated success.Failedcan still charge a fee.Expiredrequires complete ledger-history proof.Pending/Unknownrequire recovery withGetTransactionAsync(savedReceipt, token)using the same RPC endpoint before creating a replacement payment. A hash-only query cannot prove expiry; the initial submission code is provisional. - Validation/preflight errors throw. Once submission begins, transport failures,
cancellation or timeout retain the receipt with an indeterminate result.
Inspect
Status,DiagnosticandError(Kind,Method,RpcCode,HttpStatusCode) before deciding what to do next. - For history, follow
ContinuationTokenand checkRequestedRangeAvailable. Monitoring delivers successful, validated incoming XRP payments at least once. CreditDeliveredAmountXrp; atomically deduplicate by network/hash with the balance update. PersistSaveCheckpointAsynccheckpoints and resume withCheckpointafter restart. WithoutCheckpoint/FromLedger, monitoring starts with new ledgers. Callback failures stop monitoring and may cause replay.
Account deletion
Use AccountDeleteRequest with a different, funded Destination and optional
DestinationTag. Check GetAccountDeleteQuoteAsync for BlockingReasons.
Deletion transfers the whole remaining balance, including releasable reserve,
minus the fee; it does not return the full reserve without cost.
The fee is the network's owner reserve and has a separate request-level
MaxFeeXrp (default 0.2). Conditions are checked again before signing;
submission uses fail_hard. A validated failure can still charge the fee.
Persist AccountDeleteReceipt in OnPreparedAsync before submission, just as
for payments. Reconcile unresolved receipts with GetAccountDeleteAsync on the
same endpoint after restart, before using that sender again. Credit
ReturnedAmountXrp only after Succeeded. Ledger history and the account's keys
are retained; the address can be funded again. See the
official deletion requirements.
ASP.NET Web Forms
Use .NET Framework 4.7.2+, an async page (Async="true") and
RegisterAsyncTask(new PageAsyncTask(...)). Use await rather than
.Result/.Wait(). Run monitoring under a host-managed lifetime; IIS recycling or
shutdown stops it, so resume from a persisted checkpoint. Web Forms uses the
netstandard2.0 assembly; .NET 8 apps use the net8.0 assembly.
Build and test
With the .NET 8 SDK or a newer compatible SDK, run from the repository root:
dotnet build Ripple.csproj --configuration Release -p:GeneratePackageOnBuild=false
dotnet test Ripple.sln --configuration Release -p:GeneratePackageOnBuild=false
The full test suite requires Windows/.NET Framework for its net472 target.
To run only .NET 8, add --framework net8.0 to the test command.
Tests cover API compatibility, signed bytes, amounts, payment recovery and monitoring.
License
Apache License 2.0. See NOTICE for third-party attribution; both files are included in the NuGet package.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 was computed. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Chaos.NaCl.Standard (>= 1.0.0)
- Newtonsoft.Json (>= 13.0.3)
- Portable.BouncyCastle (>= 1.9.0)
- RIPEMD (>= 4.3.0)
- System.Net.Http (>= 4.3.4)
- System.Private.Uri (>= 4.3.2)
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Cng (>= 5.0.0)
- System.Text.RegularExpressions (>= 4.3.1)
-
net8.0
- Chaos.NaCl.Standard (>= 1.0.0)
- Newtonsoft.Json (>= 13.0.3)
- Portable.BouncyCastle (>= 1.9.0)
- RIPEMD (>= 4.3.0)
- System.Formats.Asn1 (>= 6.0.1)
- System.Net.Http (>= 4.3.4)
- System.Private.Uri (>= 4.3.2)
- System.Security.Cryptography.Algorithms (>= 4.3.1)
- System.Security.Cryptography.Cng (>= 5.0.0)
- System.Text.RegularExpressions (>= 4.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.