Complexity: High — 200 pts
Summary
Stellar has two powerful account lifecycle operations not exposed by Freighter or any other wallet UI: createAccount (fund a brand-new Stellar address with the minimum reserve) and accountMerge (close an account, moving all XLM to another address). This issue adds both as utility tools.
Files to Create/Modify
- Create:
src/pages/AccountToolsPage.tsx
- Modify:
src/lib/stellar.ts — add buildCreateAccountTx and buildAccountMergeTx
- Modify:
src/App.tsx — add /account-tools route
- Modify:
src/pages/DashboardPage.tsx — add Account Tools link in footer area
Implementation Notes
stellar.ts
export async function buildCreateAccountTx(sourceAddress, newAccountAddress, startingBalance): Promise<string>
export async function buildAccountMergeTx(sourceAddress, mergeDestination): Promise<string>
Use Operation.createAccount({ destination, startingBalance }) and Operation.accountMerge({ destination }) respectively.
AccountToolsPage — two cards
Fund New Account: address input + starting balance input (minimum 1 XLM), warn if the destination account already exists, "Create Account" button → build/sign/submit, success shows the new account on Stellar Expert.
Merge Account: destination address input, a prominent red warning box explaining the account will be permanently closed and access lost, require the user to type MERGE in a confirmation field before the "Merge Account" button enables, then build/sign/submit. After success, disconnect the wallet since the account no longer exists.
Acceptance Criteria
Screen Recording Requirements
- Open Account Tools page
- Fund New Account: generate a fresh keypair (shown in Stellar Lab), enter address, set 2 XLM → account created and visible on Stellar Expert
- Account Merge: enter destination, type "MERGE" → button enables → sign → account merged, balance transferred → disconnect
Complexity: High — 200 pts
Summary
Stellar has two powerful account lifecycle operations not exposed by Freighter or any other wallet UI:
createAccount(fund a brand-new Stellar address with the minimum reserve) andaccountMerge(close an account, moving all XLM to another address). This issue adds both as utility tools.Files to Create/Modify
src/pages/AccountToolsPage.tsxsrc/lib/stellar.ts— addbuildCreateAccountTxandbuildAccountMergeTxsrc/App.tsx— add/account-toolsroutesrc/pages/DashboardPage.tsx— add Account Tools link in footer areaImplementation Notes
stellar.tsUse
Operation.createAccount({ destination, startingBalance })andOperation.accountMerge({ destination })respectively.AccountToolsPage— two cardsFund New Account: address input + starting balance input (minimum 1 XLM), warn if the destination account already exists, "Create Account" button → build/sign/submit, success shows the new account on Stellar Expert.
Merge Account: destination address input, a prominent red warning box explaining the account will be permanently closed and access lost, require the user to type
MERGEin a confirmation field before the "Merge Account" button enables, then build/sign/submit. After success, disconnect the wallet since the account no longer exists.Acceptance Criteria
Screen Recording Requirements