feat(sdk-coin-xrp): add AccountDelete#8761
Merged
Merged
Conversation
kisslove-dewangan
approved these changes
May 13, 2026
Contributor
kisslove-dewangan
left a comment
There was a problem hiding this comment.
lgtm, based on codeowners
Contributor
mukeshsp
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: CSHLD-716
Summary
Adds support for the XRPL
AccountDeletetransaction type to the XRP SDK, enablingfull reserve withdrawal recovery via the Wallet Recovery Wizard.(PR: BitGo/wallet-recovery-wizard#709)
Problem
XRP accounts hold a base reserve (1.2 XRP on mainnet, 0.2 XRP on testnet) that
standard
Paymentrecovery transactions cannot access. Users with compromised orabandoned wallets were unable to recover this locked balance.
Solution
Implement the XRPL
AccountDeletetransaction type, which permanently deletes anaccount and transfers its entire balance including the base reserve to a
destination address.
Changes
sdk-coreenum.ts— AddedTransactionType.AccountDelete = 65to the shared transaction type enumsdk-coin-xrp— Builder layeriface.ts— AddedAccountDeletetoXrpTransactionTypeenum, extendedXrpTransactionunion type, added
reserveWithdrawal?: booleantoRecoveryOptionsandTxDataaccountDeleteBuilder.ts(new) — Builder forAccountDeletetransactions, handlesdestination address and optional destination tag
transactionBuilderFactory.ts— WiredgetAccountDeleteBuilder()and routing infrom()transaction.ts— Added serialisation (toJson), explanation(
explainAccountDeleteTransaction), input/output extraction, and type mapping forAccountDeleteindex.ts— ExportedAccountDeleteBuildersdk-coin-xrp— Recovery layerxrp.ts— AddedreserveWithdrawalbranch inrecover()with the followingprecondition checks before building the
AccountDeletetransaction:SignerListSequence + 256 ≤ currentLedgerSupports all three recovery modes: fully signed (non-KRS), half-signed (KRS), and
unsigned sweep.
Tests
test/resources/xrp.ts— Added mock fixtures:accountlinesResponseEmpty,accountObjectsResponse,accountObjectsResponseBlocking,destAccountInfoResponse,destAccountInfoNotFoundtest/unit/transactionBuilder/accountDeleteBuilder.ts(new) — 6 unit testscovering build with/without destination tag, round-trip rebuild from raw, and
error cases for missing sender/destination
test/unit/xrp.ts— 5 new tests for therecover()AccountDelete path coveringfully signed, unsigned sweep, and all 3 precondition failure cases
Testing
Verified end-to-end on XRPL testnet via Wallet Recovery Wizard — transaction
broadcast with
tesSUCCESS, account deleted and full balance (including reserve)transferred to destination.