Show / Hide Table of Contents

Namespace Xrpl.Wallet

Classes

BatchSigningHelper

Helper methods for batch transaction signing operations. For general signer utilities, see SignerUtilities.

LoanSigningHelper

Helper for LoanSet multi-party signing (XLS-66d). LoanSet carries two signatures: the submitter (Account) signs the transaction itself (TxnSignature), and the counterparty provides a CounterpartySignature (inner STObject with SigningPubKey + TxnSignature, or Signers).

The roles are not tied to broker and borrower. The counterparty is the Counterparty field, or the LoanBroker's owner when the field is omitted; one of Account and the counterparty must be the broker owner, and the other one is the borrower (rippled LoanSet::preclaim and LoanSet::checkSign). Either the broker owner submits and the borrower co-signs, or the borrower submits and the broker owner co-signs.

Three signing patterns (analogous to Batch V1/V2/V3):

V1 — Automatic (both keys available):

var result = LoanSigningHelper.SignLoanSet(loanTx, submitterWallet, counterpartyWallet);
await client.SubmitRequest(result.TxBlob);

V2 — Parallel (keys on separate devices, sign independently):

// Device A (counterparty):
var counterpartySig = counterpartyWallet.SignAsLoanCounterparty(preparedTxJson);
// Device B (submitter):
var submitterSig = submitterWallet.Sign(preparedTxJson);
// Combiner:
var combined = LoanSigningHelper.CombineLoanSignatures(submitterSig.TxBlob, counterpartySig.TxBlob);
await client.SubmitRequest(combined);

V3 — Sequential (counterparty signs first, passes to the submitter):

// Counterparty signs, adds CounterpartySignature:
var withCounterparty = counterpartyWallet.SignAsLoanCounterparty(preparedTxJson);
// Submitter receives the partially signed blob, adds TxnSignature:
var final = LoanSigningHelper.SubmitterSign(withCounterparty.TxBlob, submitterWallet);
await client.SubmitRequest(final.TxBlob);

Multisig counterparty (a counterparty with a SignerList): each signer of the counterparty's list produces a portable Signer entry with the standard multisign call, and the composer places them under CounterpartySignature.Signers (rippled verifies them against the counterparty's SignerList over the same multisign preimage as tx.Signers). Autofill with the signer count so the fee covers them (rippled LoanSet::calculateBaseFee charges one base fee per counterparty signer):

var prepared = LoanSigningHelper.PrepareForSigning(await client.Autofill(loanTx.ToDictionary(), signersCount: 2), submitterWallet);
var submitterPart = submitterWallet.Sign(prepared);
var part1 = signer1.Sign(prepared, multisign: true);
var part2 = signer2.Sign(prepared, multisign: true);
// ledger-driven routing (looks up the counterparty's SignerList):
var composed = await client.ComposeSignatures(new[] { submitterPart.TxBlob, part1.TxBlob, part2.TxBlob });
// or offline, naming the counterparty's signers:
var offline = LoanSigningHelper.CombineLoanSignatures(new[] { submitterPart.TxBlob, part1.TxBlob, part2.TxBlob }, new[] { signer1.ClassicAddress, signer2.ClassicAddress });

SignatureComposer

Composes a fully signed transaction from partially signed blobs (#43). Devices sign with whatever keys they hold — single main signature, sponsor or counterparty co-signature, or portable multisig Signer entries — and the composer routes everything into the right sections. Which section an entry belongs to is still decided here, by account, but it is no longer only the composer's business: since rippled's fixCleanup3_4_0 an entry in SponsorSignature.Signers or CounterpartySignature.Signers covers different bytes than one in tx.Signers, so the signer had to know its side already. It works that out from the transaction in every shape but one - see SignatureRole - and routing an entry into a section its signer did not sign for now produces a signature the node rejects rather than a portable one.

SignatureResult

Signer

SignerUtilities

Shared utilities for working with signers across multisign and batch signing operations. Contains common functionality used by Signer, BatchSigningHelper, and XrplWallet.

SignerUtilities.ByteArrayComparer

Comparer for byte arrays used in sorting by account ID.

SponsorSigningHelper

Helper for sponsored transaction signing (XLS-68). A sponsored transaction carries the common fields Sponsor and SponsorFlags (spfSponsorFee = 1, spfSponsorReserve = 2) and, when the sponsorship requires it, the sponsor's co-signature: SponsorSignature (inner STObject with SigningPubKey + TxnSignature over the same transaction, under the sponsor's own prefix).

Signing patterns (analogous to LoanSet broker/counterparty):

V1 — Automatic (both keys available):

var result = SponsorSigningHelper.SignSponsored(preparedTx, submitterWallet, sponsorWallet);
await client.SubmitRequest(result.TxBlob);

V2 — Parallel (keys on separate devices):

var sponsorSig = sponsorWallet.SignAsSponsor(preparedTx);
var submitterSig = submitterWallet.Sign(preparedTx);
var combined = SponsorSigningHelper.CombineSponsorSignatures(submitterSig.TxBlob, sponsorSig.TxBlob);

V3 — Sequential (sponsor signs first, passes to submitter):

var withSponsor = sponsorWallet.SignAsSponsor(preparedTx);
var final = SponsorSigningHelper.SubmitterSign(withSponsor.TxBlob, submitterWallet);

WalletSugar

WalletSugar.FaucetAccount

WalletSugar.FaucetNetwork

WalletSugar.FaucetWallet

WalletSugar.Funded

XChainAttestationSigner

Witness-side signing of XLS-38 bridge attestations. A witness that saw an XChainCommit or XChainCreateAccountCommit on one chain attests it on the other by submitting XChainAddClaimAttestation / XChainAddAccountCreateAttestation carrying its public key and a signature over the attested facts. The signed message is the canonical serialization of an STObject holding exactly those facts (rippled AttestationClaim::message / AttestationCreateAccount::message): no hash prefix, no transaction fields, so the same bytes verify regardless of which account submits the attestation transaction.

XrplSigningKey

A signing key that holds its private key in a byte array and clears it on Dispose(), for an application that keeps keys encrypted at rest and decrypts one only for the signatures it needs.

XrplWallet

XummExtension

Extension methods for working with XRPL Secret Numbers format. Secret Numbers encode 16 bytes of entropy into 8 groups of 6 digits each, where 5 digits represent entropy and the 6th digit is a position-dependent checksum. This format is language-agnostic and allows real-time typo detection. See XLS-12d specification: https://github.com/XRPLF/XRPL-Standards/issues/15

Enums

SignatureRole

Which signature of a transaction a key is producing.

TextWalletKdf

In this article
Back to top Generated by DocFX