Skip to content

fix(examples): use API to retrieve passcodeEncryptionCode in passphrase recovery - #9387

Open
mohammadalfaiyazbitgo wants to merge 1 commit into
masterfrom
alfaiyaz/WCN-1331-fix-wallet-passphrase-recovery
Open

fix(examples): use API to retrieve passcodeEncryptionCode in passphrase recovery#9387
mohammadalfaiyazbitgo wants to merge 1 commit into
masterfrom
alfaiyaz/WCN-1331-fix-wallet-passphrase-recovery

Conversation

@mohammadalfaiyazbitgo

Copy link
Copy Markdown
Contributor

Summary

  • Replace manual activation code prompt with BitGo API authentication flow
  • Retrieve passcodeEncryptionCode via /wallet/{id}/passcoderecovery endpoint
  • Add coin registration (Btc/Tbtc) and wallet retrieval
  • Add validation step using coin.assertIsValidKey() against encryptedXprv
  • Update script header comments to reflect new flow

Test Plan

  • Verify script prompts for username, password, OTP, wallet ID, and Box D (no activation code prompt)
  • Verify authentication and session unlock work against test environment
  • Verify passcodeEncryptionCode is retrieved from API successfully
  • Verify decrypted passphrase is validated against encryptedXprv
  • All existing tests pass

Ticket

WCN-1331

…se recovery

Replace manual activation code prompt with BitGo API authentication flow.
Retrieve passcodeEncryptionCode via /wallet/{id}/passcoderecovery endpoint.
Add coin registration, wallet retrieval, and key validation step.

WCN-1331

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mohammadalfaiyazbitgo
mohammadalfaiyazbitgo force-pushed the alfaiyaz/WCN-1331-fix-wallet-passphrase-recovery branch from b9d2d86 to 3bb4837 Compare July 29, 2026 23:30
@mohammadalfaiyazbitgo mohammadalfaiyazbitgo changed the title fix(wallet-passphrase-recovery): use API to retrieve passcodeEncryptionCode fix(examples): use API to retrieve passcodeEncryptionCode in passphrase recovery Jul 29, 2026
@mohammadalfaiyazbitgo
mohammadalfaiyazbitgo marked this pull request as ready for review July 29, 2026 23:31
@mohammadalfaiyazbitgo
mohammadalfaiyazbitgo requested a review from a team as a code owner July 29, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant