Xrpl.BinaryCodec
11.26.0
See the version list below for details.
dotnet add package Xrpl.BinaryCodec --version 11.26.0
NuGet\Install-Package Xrpl.BinaryCodec -Version 11.26.0
<PackageReference Include="Xrpl.BinaryCodec" Version="11.26.0" />
<PackageVersion Include="Xrpl.BinaryCodec" Version="11.26.0" />
<PackageReference Include="Xrpl.BinaryCodec" />
paket add Xrpl.BinaryCodec --version 11.26.0
#r "nuget: Xrpl.BinaryCodec, 11.26.0"
#:package Xrpl.BinaryCodec@11.26.0
#addin nuget:?package=Xrpl.BinaryCodec&version=11.26.0
#tool nuget:?package=Xrpl.BinaryCodec&version=11.26.0
Xrpl.BinaryCodec
Convert XRP Ledger transactions and ledger objects between JSON and the canonical binary format in C#, and build the bytes that a signature covers.
This is a base package of the Xrpl SDK, which already depends on it and signs transactions for you. Install it on its own when you only need serialization. It targets .NET Standard 2.0.
dotnet add package Xrpl.BinaryCodec
Encode and decode a transaction
XrplBinaryCodec.Encode returns the serialized object as a hex string, and Decode turns that string back into JSON:
using System.Text.Json.Nodes;
using Xrpl.BinaryCodec;
JsonObject tx = new JsonObject
{
["TransactionType"] = "Payment",
["Account"] = "rBtXmAdEYcno9LWRnAGfT9qBxCeDvuVRZo",
["Destination"] = "rEqtEHKbinqm18wQSQGstmqg9SFpUELasT",
["Amount"] = "1000000",
["Fee"] = "12",
["Sequence"] = 1,
["SigningPubKey"] = ""
};
string blob = XrplBinaryCodec.Encode(tx);
// 12000024000000016140000000000F424068400000000000000C73008114777029549E95629525730029E0D0D9E4FFE7924C8314A2D0815DD52160FF1979A60C50B00C09ECD669D4
JsonNode decoded = XrplBinaryCodec.Decode(blob);
Prepare a transaction for signing
Signing covers a different byte string than the one you submit. It starts with a hash prefix and leaves out the fields that aren't signed, such as TxnSignature. Continuing from the example above:
string singleSign = XrplBinaryCodec.EncodeForSigning(tx);
// 53545800 followed by the serialized fields
string multiSign = XrplBinaryCodec.EncodeForMultiSigning(tx, "rEqtEHKbinqm18wQSQGstmqg9SFpUELasT");
// 534D5400 followed by the serialized fields and the signer's account ID
To sign the result, pass it to XrplKeypairs.Sign from Xrpl.Keypairs.
More information
| 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 was computed. 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)
- Microsoft.CSharp (>= 4.7.0)
- Portable.BouncyCastle (>= 1.9.0)
- System.Text.Json (>= 8.0.5)
- Xrpl.AddressCodec (>= 11.26.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Xrpl.BinaryCodec:
| Package | Downloads |
|---|---|
|
Xrpl
A C# library to interact with the XRP Ledger (XRPL) blockchain |
|
|
XrplCSharp
A C# library to interact with the XRP Ledger (XRPL) blockchain |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.27.0 | 136 | 11/14/2026 |
| 11.26.0 | 133 | 11/10/2026 |
| 11.25.1 | 504 | 11/6/2026 |
| 11.22.0 | 785 | 11/2/2026 |
| 11.21.0 | 259 | 10/27/2026 |
| 11.20.0 | 153 | 10/25/2026 |
| 11.14.1 | 3,953 | 10/16/2026 |
| 11.14.0 | 440 | 10/13/2026 |
| 11.13.0 | 118 | 10/11/2026 |
| 11.12.0 | 206 | 10/5/2026 |
| 11.9.0 | 566 | 9/27/2026 |
| 11.8.0 | 142 | 9/23/2026 |
| 11.7.0 | 165 | 9/22/2026 |
| 11.6.0 | 157 | 9/21/2026 |
| 11.0.1 | 2,280 | 8/27/2026 |
| 11.0.0 | 492 | 8/26/2026 |
| 10.11.0 | 975 | 8/12/2026 |
| 10.9.0 | 1,083 | 7/17/2026 |
| 10.8.0 | 158 | 7/16/2026 |
| 10.7.0 | 162 | 7/13/2026 |