Class SignerUtilities
Shared utilities for working with signers across multisign and batch signing operations. Contains common functionality used by Signer, BatchSigningHelper, and XrplWallet.
Inheritance
Namespace: Xrpl.Wallet
Assembly: Xrpl.dll
Syntax
public static class SignerUtilities
Methods
| Edit this page View SourceConvertJsonNodeToClrType(JsonNode)
Converts JsonNode objects to CLR types (Dictionary, List, primitives) for proper binary encoding. The XrplBinaryCodec.Encode expects native CLR types, not JsonNode instances.
Declaration
public static object ConvertJsonNodeToClrType(JsonNode node)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonNode | node | The JsonNode to convert. |
Returns
| Type | Description |
|---|---|
| object | A CLR object (Dictionary, List, or primitive). |
DedupeAndSortSigners(JsonArray)
Deduplicates and sorts a Signers array by account ID bytes. Each Signer is keyed by (Account, SigningPubKey, TxnSignature) to remove duplicates. Handles both wrapped ({"Signer": {...}}) and unwrapped formats, preserving the original structure.
Declaration
public static JsonArray DedupeAndSortSigners(JsonArray signers)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonArray | signers | The signers array to deduplicate and sort. |
Returns
| Type | Description |
|---|---|
| JsonArray | A new JsonArray with deduplicated and sorted signers. |
GetAccountIdBytes(string)
Converts an address (classic or X-address) to its account ID bytes for sorting.
Declaration
public static byte[] GetAccountIdBytes(string address)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | The address to convert. |
Returns
| Type | Description |
|---|---|
| byte[] | The account ID bytes. |
NormalizeClassicAddress(string)
Normalizes an address (classic or X-address) to a classic address format.
Declaration
public static string NormalizeClassicAddress(string address)
Parameters
| Type | Name | Description |
|---|---|---|
| string | address | The address to normalize (classic or X-address). |
Returns
| Type | Description |
|---|---|
| string | The classic address format. |
SortSignersArray(JsonArray)
Sorts a Signers array by account ID bytes without deduplication.
Declaration
public static JsonArray SortSignersArray(JsonArray signers)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonArray | signers | The signers array to sort. |
Returns
| Type | Description |
|---|---|
| JsonArray | A new JsonArray with sorted signers. |