Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .claude/agents/EXTERNAL-INTEGRATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,47 +112,6 @@ extension UpholdClient {
}
```

### CrowdNode Staking Integration
**Files**: `DashWallet/Sources/Models/CrowdNode/`
**Pattern**: Transaction-based API with web interface

**API Integration:**
```swift
class CrowdNodeWebService {
func createAccount(email: String) async throws -> CrowdNodeAccount {
let endpoint = CrowdNodeEndpoint.createAccount
let request = CreateAccountRequest(email: email)
return try await httpClient.post(endpoint, body: request)
}

func getStakingInfo() async throws -> StakingInfo {
return try await httpClient.get(.stakingInfo)
}
}
```

**Transaction Monitoring:**
```swift
class TransactionObserver {
func observeTransactions() {
NotificationCenter.default.addObserver(
forName: .DSWalletBalanceDidChangeNotification,
object: nil,
queue: .main
) { [weak self] notification in
self?.handleBalanceChange(notification)
}
}

private func handleBalanceChange(_ notification: Notification) {
// Check for CrowdNode-related transactions
if let crowdNodeTx = identifyCrowdNodeTransaction() {
updateStakingStatus(crowdNodeTx)
}
}
}
```

## Third-Party Libraries

### Networking Stack
Expand Down
10 changes: 0 additions & 10 deletions .claude/agents/PROJECT-FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,6 @@ This document provides comprehensive information about the key functions, APIs,
- Topper payment method integration
- Asset conversion and payment processing

### CrowdNode Staking
**File**: `DashWallet/Sources/Models/CrowdNode/CrowdNode.swift`
- `CrowdNode` - Staking service integration
- Account creation and management
- Staking rewards tracking

**File**: `DashWallet/Sources/Models/CrowdNode/Services/CrowdNodeWebService.swift`
- HTTP client for CrowdNode API
- Transaction monitoring and status updates

## Navigation and UI Patterns

### Main Navigation Flow
Expand Down
3 changes: 1 addition & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ the frozen upgrade-time mnemonic import contract.

- **No DashSync runtime**: do not restore the pod, direct imports, `DWEnvironment`, or live `DS*` wallet/transaction/identity objects. Read wallet state through the app-owned SwiftDashSDK boundaries.
- **Sync gating**: never gate on SPV `state == .synced` — dash-spv's steady state when fully synced is `waitForEvents` at progress ≈ 1.0 (`.synced` is a transient window). Gate on `SyncingActivityMonitor` (`.syncDone`).
- **Sends**: every spend goes through `WalletSendService` (standard) or `SwiftDashSDKTransactionSender` (selected-input / sweep). Never call `CoreTransactionBuilder` from UI code. `prepare*` never broadcasts; broadcast happens only on explicit confirm.
- **Sends**: every spend goes through `WalletSendService` (standard) or `SwiftDashSDKTransactionSender` (sweep). Never call `CoreTransactionBuilder` from UI code. `prepare*` never broadcasts; broadcast happens only on explicit confirm.
- **Mnemonic ownership**: stored as plain keychain bytes via SwiftDashSDK `WalletStorage` (the iOS keychain is the security boundary — there is no PIN-encryption layer). Creation/import/migration route through `SwiftDashSDKHost`; deletion routes through `SwiftDashSDKWalletWiper`. The migrator supports multiple wallets and never deletes DashSync-owned `org.dashfoundation.dash` entries. Don't add ad-hoc `WalletStorage()` readers or choose the first mnemonic — resolve the active wallet through `SwiftDashSDKHost` / `WalletEnvironment.activeWalletId(for:)`.
- **CrowdNode release posture**: temporarily suspend/hide CrowdNode for the migration release. Its implementation is already app/SDK-owned, so it does not block DashSync teardown and must not regain a DashSync fallback.
- **Platform release pin**: temporary local integration branches are development-only. Upstream all required changes and make the final migration/release build consume platform `v5.0-dev` at 5.0.0-rc.4 (`5b41ca376b`, what testnet runs) or a later commit with the same `v13.rs`/`v14.rs`, or a later line whose protocol 14 is the one testnet runs (`v5.1-dev` at `d4750290ff` has the same `v13.rs`/`v14.rs` as 5.0.0-rc.4), or an explicitly selected release SHA/tag. Not `v4.2-dev`: its pre-release protocol 14 differs, and the testnet pin in `SwiftDashSDKHost.platformVersion(for:)` builds transitions from the linked SDK's v14.
- **Mainnet is the fresh-install default**: `WalletEnvironment.networkKind` returns `.mainnet` when `CURRENT_CHAIN_TYPE_KEY` is absent, in ALL build configurations; testnet requires an explicit in-app switch, which writes the key. (This reverses the temporary testnet default of 2026-07-03, taken while mainnet Platform DAPI was unreachable — revisited by the owner 2026-08-07.) An install that never used the switcher moves to mainnet on its next launch. When touching this, verify mainnet Platform DAPI is actually reachable in the SDK build being shipped.

Expand Down
2 changes: 1 addition & 1 deletion DASHSYNC_KEY_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ The SDK wiper deletes SDK-owned mnemonics and managed-wallet state through a
manager bound to each wallet's mainnet/testnet store. It reports success only
after the global SDK mnemonic inventory is empty.

PIN removal, metadata deletion, app/global preference reset, CrowdNode cleanup,
PIN removal, metadata deletion, app/global preference reset,
active-wallet registry cleanup, and runtime teardown happen only after that
success point and before the serial-queue completion barrier fires. A failed
full wipe preserves those app-owned stores so the user can retry. Per-wallet
Expand Down
Loading
Loading