/ project / architecture / machine / ACDC_Implementation_Plan_v1.0.cspec
ACDC_Implementation_Plan_v1.0.cspec
   1  # AC|DC NETWORK
   2  # UI/UX IMPLEMENTATION PLAN
   3  
   4  **Version:** 1.0
   5  **Date:** January 14, 2027
   6  **Purpose:** Implementation specification for claude-code
   7  **Status:** Ready for Implementation
   8  
   9  ---
  10  
  11  # PART I: OVERVIEW
  12  
  13  ## Objective
  14  
  15  Build the complete AC|DC Network UI/UX toolset including wallet applications, operator consoles, public utilities, and supporting infrastructure.
  16  
  17  ## Reference Documents
  18  
  19  ```
  20  REQUIRED READING:
  21  ├── ACDC_UI_UX_Specification_v1.0.cspec    (UI/UX decisions)
  22  ├── ALPHA_DELTA_Functional_Specification_v2.1.md (protocol spec)
  23  └── Canonical repos: BlockBlox-MD/snarkOS, BlockBlox-MD/snarkVM
  24  ```
  25  
  26  ## Brand
  27  
  28  ```
  29  NAME: AC|DC Network
  30  DOMAIN: ac-dc.network
  31  CHAINS: Alpha Chain (ALPHA) | Delta Chain (DELTA)
  32  TOKENS: ALPHA (AX), DELTA (DX), sAX
  33  NAME SERVICE: *.blox
  34  ```
  35  
  36  ---
  37  
  38  # PART II: REPOSITORY STRUCTURE
  39  
  40  ## New Repositories
  41  
  42  ```
  43  BlockBlox-MD/
  44  ├── wallet-core              # Rust cryptographic library
  45  ├── acdc-wallet              # Consumer wallet (all platforms)
  46  ├── acdc-governor            # Institutional console
  47  ├── acdc-messenger           # Notification companion
  48  ├── acdc-cli                 # Command-line tools
  49  ├── acdc-scanner             # Block explorer
  50  ├── acdc-docs                # Developer portal
  51  ├── acdc-i18n                # Localization resources
  52  ├── acdc-design              # Design tokens & components
  53  └── acdc-contracts           # On-chain contracts (name service, etc.)
  54  ```
  55  
  56  ---
  57  
  58  # PART III: WALLET-CORE LIBRARY
  59  
  60  ## Purpose
  61  
  62  Central Rust library handling all cryptographic operations. All platforms depend on this.
  63  
  64  ## Structure
  65  
  66  ```
  67  wallet-core/
  68  ├── src/
  69  │   ├── mnemonic/            # BIP39 seed phrase
  70  │   ├── derivation/          # Multi-curve key derivation
  71  │   ├── payment_code/        # Aleo-native payment codes
  72  │   ├── stealth/             # Stealth address generation
  73  │   ├── transaction/         # Transaction construction
  74  │   ├── signing/             # Signatures including adaptor
  75  │   ├── recovery/            # Shamir + Social recovery
  76  │   ├── backup/              # IPFS encrypted backup
  77  │   ├── device_mesh/         # 2FA device mesh
  78  │   └── ffi/                 # Platform bindings
  79  └── tests/
  80  ```
  81  
  82  ## Derivation Specification
  83  
  84  ```
  85  PATH FORMAT:
  86  m / 47' / [BLOX]' / account' / class' / index
  87  
  88  COIN TYPE: [BLOX] = TBD (register with SLIP-44)
  89  
  90  CLASSES:
  91  ├── 0' → ALPHA private addresses
  92  ├── 1' → DELTA trading addresses (public)
  93  ├── 2' → DELTA DX addresses (private)
  94  ├── 3' → Reserved
  95  └── backup' → Backup encryption key (m/47'/[BLOX]'/backup'/0')
  96  
  97  CURVES:
  98  ├── BLS12-377: ALPHA/DELTA native (classes 0', 1', 2')
  99  ├── secp256k1: BTC, ETH (separate derivation)
 100  └── ed25519: SOL (separate derivation)
 101  ```
 102  
 103  ## Payment Code Specification
 104  
 105  ```
 106  FORMAT (80 bytes):
 107  ├── Version (1 byte): 0x01
 108  ├── Features (1 byte): Bitfield for address classes
 109  ├── View Key Component (32 bytes)
 110  ├── Spend Key Component (32 bytes)
 111  ├── Diversifier (11 bytes)
 112  └── Checksum (4 bytes): Blake2s truncated
 113  
 114  ENCODING: Bech32m
 115  HRP: acdc1
 116  EXAMPLE: acdc1qxp72k9wd5clhm8yvqtnjfk4zqwqglz8v7qwc5r...
 117  ```
 118  
 119  ## Swap Code Specification
 120  
 121  ```
 122  FORMAT:
 123  ├── Version (1 byte)
 124  ├── Swap ID (16 bytes)
 125  ├── Maker address (32 bytes)
 126  ├── Offer asset + amount
 127  ├── Request asset + amount
 128  ├── Expiry timestamp (8 bytes)
 129  ├── Maker adaptor pubkey (32 bytes)
 130  └── Checksum (4 bytes)
 131  
 132  ENCODING: Bech32m
 133  HRP: swap1
 134  ```
 135  
 136  ## Backup Encryption
 137  
 138  ```
 139  DERIVATION:
 140  seed → m/47'/[BLOX]'/backup'/0' → backup_key
 141  
 142  ENCRYPTION:
 143  ├── Algorithm: AES-256-GCM
 144  ├── Key: backup_key
 145  ├── Nonce: Random 12 bytes per backup
 146  └── AAD: Version + timestamp
 147  
 148  STORAGE:
 149  ├── Upload encrypted blob to IPFS → CID
 150  ├── Store CID on DELTA chain at backup address
 151  └── Backup address derived from same path
 152  ```
 153  
 154  ## FFI Targets
 155  
 156  ```
 157  PLATFORMS:
 158  ├── iOS: Swift via C bindings (cbindgen)
 159  ├── Android: Kotlin via JNI (jni-rs)
 160  ├── Desktop: Direct Rust (Tauri)
 161  ├── Web: WASM (wasm-bindgen)
 162  └── CLI: Direct Rust
 163  ```
 164  
 165  ---
 166  
 167  # PART IV: DESIGN SYSTEM
 168  
 169  ## Token Files
 170  
 171  ```
 172  acdc-design/
 173  ├── tokens/
 174  │   ├── colors.json
 175  │   ├── typography.json
 176  │   ├── spacing.json
 177  │   ├── borders.json
 178  │   ├── shadows.json
 179  │   └── animation.json
 180  ├── themes/
 181  │   ├── light.json
 182  │   ├── dark.json
 183  │   ├── high-contrast.json
 184  │   └── testnet.json
 185  └── components/
 186      └── [component specs]
 187  ```
 188  
 189  ## Color Tokens
 190  
 191  ```
 192  BRAND:
 193  ├── alpha-primary:     #6366F1 (Indigo)
 194  ├── alpha-light:       #A5B4FC
 195  ├── alpha-dark:        #4338CA
 196  ├── delta-primary:     #10B981 (Emerald)
 197  ├── delta-light:       #6EE7B7
 198  └── delta-dark:        #059669
 199  
 200  SEMANTIC:
 201  ├── success:           #22C55E
 202  ├── warning:           #F59E0B
 203  ├── error:             #EF4444
 204  └── info:              #3B82F6
 205  
 206  TRADING:
 207  ├── long-buy:          #22C55E
 208  └── short-sell:        #EF4444
 209  
 210  PRIVACY:
 211  ├── private:           #6366F1
 212  └── public:            #F59E0B
 213  
 214  TESTNET:
 215  ├── testnet-primary:   #F97316 (Orange)
 216  └── testnet-secondary: #FBBF24 (Amber)
 217  ```
 218  
 219  ## Typography
 220  
 221  ```
 222  FAMILIES:
 223  ├── sans:    Inter, system-ui, sans-serif
 224  ├── mono:    JetBrains Mono, Consolas, monospace
 225  └── display: Inter (tight tracking)
 226  
 227  SCALE (px):
 228  ├── xs:   12
 229  ├── sm:   14
 230  ├── base: 16
 231  ├── lg:   18
 232  ├── xl:   20
 233  ├── 2xl:  24
 234  ├── 3xl:  30
 235  ├── 4xl:  36
 236  └── 5xl:  48
 237  
 238  WEIGHTS:
 239  ├── normal:   400
 240  ├── medium:   500
 241  ├── semibold: 600
 242  └── bold:     700
 243  ```
 244  
 245  ## Spacing
 246  
 247  ```
 248  BASE: 4px
 249  
 250  SCALE:
 251  ├── 0:    0px
 252  ├── 0.5:  2px
 253  ├── 1:    4px
 254  ├── 2:    8px
 255  ├── 3:    12px
 256  ├── 4:    16px
 257  ├── 5:    20px
 258  ├── 6:    24px
 259  ├── 8:    32px
 260  ├── 10:   40px
 261  ├── 12:   48px
 262  ├── 16:   64px
 263  ├── 20:   80px
 264  └── 24:   96px
 265  ```
 266  
 267  ## Animation
 268  
 269  ```
 270  DURATIONS:
 271  ├── instant:  0ms
 272  ├── fast:     100ms
 273  ├── normal:   200ms
 274  ├── slow:     300ms
 275  └── slower:   500ms
 276  
 277  EASINGS:
 278  ├── default:  cubic-bezier(0.4, 0, 0.2, 1)
 279  ├── in:       cubic-bezier(0.4, 0, 1, 1)
 280  ├── out:      cubic-bezier(0, 0, 0.2, 1)
 281  └── bounce:   cubic-bezier(0.34, 1.56, 0.64, 1)
 282  
 283  REDUCED MOTION:
 284  └── Replace all motion with instant opacity
 285  ```
 286  
 287  ---
 288  
 289  # PART V: LOCALIZATION
 290  
 291  ## Structure
 292  
 293  ```
 294  acdc-i18n/
 295  ├── _meta.json              # Language definitions
 296  ├── namespaces/
 297  │   ├── common.json
 298  │   ├── wallet.json
 299  │   ├── trading.json
 300  │   ├── governance.json
 301  │   ├── onboarding.json
 302  │   ├── settings.json
 303  │   ├── errors.json
 304  │   └── scanner.json
 305  └── tools/
 306      ├── extract.js
 307      ├── validate.js
 308      ├── ai-translate.js
 309      └── export-review.js
 310  ```
 311  
 312  ## String Format
 313  
 314  ```
 315  {
 316    "key": "unique.namespace.identifier",
 317    "source": "English text",
 318    "context": "Usage description for translators",
 319    "max_length": number | null,
 320    "placeholders": ["var1", "var2"],
 321    "translations": {
 322      "lang-code": {
 323        "text": "Translated text",
 324        "status": "ai | reviewed | certified"
 325      }
 326    }
 327  }
 328  ```
 329  
 330  ## Launch Languages (20)
 331  
 332  ```
 333  LTR:
 334  ├── en (English) - Source
 335  ├── zh-CN (Chinese Simplified)
 336  ├── hi (Hindi)
 337  ├── es (Spanish)
 338  ├── fr (French)
 339  ├── bn (Bengali)
 340  ├── pt (Portuguese)
 341  ├── ru (Russian)
 342  ├── ja (Japanese)
 343  ├── id (Indonesian)
 344  ├── de (German)
 345  ├── ko (Korean)
 346  ├── tr (Turkish)
 347  ├── vi (Vietnamese)
 348  ├── it (Italian)
 349  ├── th (Thai)
 350  ├── pl (Polish)
 351  └── nl (Dutch)
 352  
 353  RTL:
 354  ├── ar (Arabic)
 355  └── he (Hebrew)
 356  ```
 357  
 358  ## Layout Adaptation
 359  
 360  ```
 361  RTL LANGUAGES:
 362  ├── Mirror layout horizontally
 363  ├── Navigation on right
 364  ├── Text align right
 365  └── Numbers remain LTR
 366  
 367  TEXT EXPANSION:
 368  ├── Design for 1.5x English length
 369  ├── Use flexible containers
 370  └── Respect max_length constraints
 371  ```
 372  
 373  ---
 374  
 375  # PART VI: WALLET APPLICATION
 376  
 377  ## Platform Structure
 378  
 379  ```
 380  acdc-wallet/
 381  ├── core/                   # Shared wallet-core bindings
 382  ├── shared/                 # Shared React components
 383  │   ├── components/
 384  │   ├── hooks/
 385  │   ├── stores/
 386  │   └── utils/
 387  ├── platforms/
 388  │   ├── ios/                # Swift + SwiftUI
 389  │   ├── android/            # Kotlin + Compose
 390  │   ├── desktop/            # Tauri + React
 391  │   └── web/                # React + WASM
 392  └── e2e/                    # End-to-end tests
 393  ```
 394  
 395  ## Screen Inventory
 396  
 397  ```
 398  ONBOARDING:
 399  ├── welcome
 400  ├── seed-generate
 401  ├── seed-verify
 402  ├── setup-complete
 403  └── progressive-setup (nag screens)
 404      ├── add-backup-device
 405      ├── add-recovery-method
 406      ├── register-name
 407      └── select-persona
 408  
 409  WALLET:
 410  ├── home (three pockets view)
 411  ├── alpha-pocket
 412  │   ├── send
 413  │   ├── receive
 414  │   └── mint-sax
 415  ├── dx-pocket
 416  │   ├── stake
 417  │   ├── unstake
 418  │   └── history
 419  ├── sax-pocket
 420  │   ├── trade
 421  │   ├── redeem
 422  │   └── off-ramp
 423  ├── external-chains
 424  │   ├── chain-detail
 425  │   ├── send
 426  │   ├── receive
 427  │   └── swap
 428  └── imported-wallets
 429  
 430  TRADING:
 431  ├── simple-mode
 432  ├── pro-mode
 433  ├── market-maker-mode
 434  ├── order-entry
 435  ├── position-detail
 436  └── swap
 437      ├── public-orderbook
 438      ├── private-swap-code
 439      └── swap-detail
 440  
 441  GOVERNANCE (conditional):
 442  ├── proposals-list
 443  ├── proposal-detail
 444  ├── vote
 445  └── history
 446  
 447  VALIDATOR/PROVER (conditional):
 448  ├── status
 449  ├── rewards
 450  └── history
 451  
 452  SETTINGS:
 453  ├── account-switcher
 454  ├── security
 455  │   ├── device-mesh
 456  │   ├── recovery
 457  │   └── 2fa
 458  ├── backup
 459  ├── preferences
 460  ├── accessibility
 461  ├── analytics
 462  ├── network (testnet toggle)
 463  ├── release-channel
 464  └── about
 465  
 466  HELP:
 467  ├── ai-assistant
 468  └── community-link
 469  ```
 470  
 471  ## State Management
 472  
 473  ```
 474  GLOBAL STORES:
 475  ├── AccountStore (multi-account, active account)
 476  ├── WalletStore (balances, addresses per account)
 477  ├── TransactionStore (history, pending)
 478  ├── SettingsStore (preferences, theme)
 479  ├── NetworkStore (mainnet/testnet, connection status)
 480  └── GovernanceStore (proposals, votes)
 481  
 482  PERSISTENCE:
 483  ├── Encrypted local storage
 484  ├── IPFS backup sync
 485  └── Chain state derived on restore
 486  ```
 487  
 488  ## Conditional UI Logic
 489  
 490  ```
 491  VALIDATOR TAB:
 492  IF account.addresses.any IN validator_set THEN show
 493  
 494  PROVER TAB:
 495  IF account.addresses.any IN prover_pool THEN show
 496  
 497  GOVERNANCE TAB:
 498  IF account.dx_staked >= GOVERNANCE_THRESHOLD THEN show
 499  
 500  MARKET MAKER MODE:
 501  IF user.persona == TRADER OR user.enabled_mm_mode THEN show
 502  ```
 503  
 504  ---
 505  
 506  # PART VII: GOVERNOR CONSOLE
 507  
 508  ## Purpose
 509  
 510  Minimal administrative interface for Central Bank Governors.
 511  
 512  ## Structure
 513  
 514  ```
 515  acdc-governor/
 516  ├── web/                    # Primary (React)
 517  └── mobile/                 # Voting capability (React Native)
 518  ```
 519  
 520  ## Screen Inventory
 521  
 522  ```
 523  MAIN:
 524  ├── dashboard (status overview)
 525  ├── mint
 526  │   ├── mint-form
 527  │   └── mint-confirm
 528  ├── governance
 529  │   ├── proposals-list (ALPHA + DELTA)
 530  │   ├── proposal-detail
 531  │   ├── vote
 532  │   └── create-proposal
 533  └── config
 534      ├── multisig
 535      ├── whitelist
 536      └── api-integrations
 537  ```
 538  
 539  ## Design Principles
 540  
 541  ```
 542  AESTHETIC: "Easy Button"
 543  ├── Minimal clutter
 544  ├── Large touch targets
 545  ├── Confirmation for all actions
 546  ├── Clear status indicators
 547  └── No trading features (separate interface)
 548  ```
 549  
 550  ---
 551  
 552  # PART VIII: MESSENGER APP
 553  
 554  ## Purpose
 555  
 556  Security-isolated notification companion for governance alerts, swap codes, payment requests.
 557  
 558  ## Structure
 559  
 560  ```
 561  acdc-messenger/
 562  ├── platforms/
 563  │   ├── ios/
 564  │   ├── android/
 565  │   └── desktop/            # System tray app
 566  └── shared/
 567  ```
 568  
 569  ## Capabilities
 570  
 571  ```
 572  SECURITY MODEL:
 573  ├── Read-only view keys (can decrypt messages)
 574  ├── Cannot sign transactions
 575  ├── Cannot access spending keys
 576  ├── Persistent background process
 577  └── Isolated from wallet process
 578  
 579  NOTIFICATIONS:
 580  ├── Governance alerts
 581  ├── Swap code delivery
 582  ├── Payment requests
 583  ├── System announcements
 584  └── Optional external relay (email, Telegram, webhook)
 585  ```
 586  
 587  ---
 588  
 589  # PART IX: CLI
 590  
 591  ## Purpose
 592  
 593  Command-line interface for validators, provers, and power users.
 594  
 595  ## Structure
 596  
 597  ```
 598  acdc-cli/
 599  ├── src/
 600  │   ├── main.rs
 601  │   ├── commands/
 602  │   │   ├── wallet.rs
 603  │   │   ├── validator.rs
 604  │   │   ├── prover.rs
 605  │   │   ├── governance.rs
 606  │   │   └── name.rs
 607  │   └── config.rs
 608  └── docs/
 609  ```
 610  
 611  ## Command Groups
 612  
 613  ```
 614  WALLET:
 615  ├── acdc wallet create
 616  ├── acdc wallet restore
 617  ├── acdc wallet balance
 618  ├── acdc wallet send
 619  ├── acdc wallet receive
 620  └── acdc wallet export
 621  
 622  VALIDATOR:
 623  ├── acdc validator status
 624  ├── acdc validator rewards
 625  ├── acdc validator register
 626  └── acdc validator withdraw
 627  
 628  PROVER:
 629  ├── acdc prover status
 630  ├── acdc prover rewards
 631  ├── acdc prover register
 632  └── acdc prover stats
 633  
 634  GOVERNANCE:
 635  ├── acdc gov proposals
 636  ├── acdc gov vote
 637  ├── acdc gov propose
 638  └── acdc gov status
 639  
 640  NAME SERVICE:
 641  ├── acdc name register
 642  ├── acdc name resolve
 643  ├── acdc name transfer
 644  └── acdc name update
 645  ```
 646  
 647  ---
 648  
 649  # PART X: ALPHA-SCANNER
 650  
 651  ## Purpose
 652  
 653  Block explorer and transparency dashboard.
 654  
 655  ## Structure
 656  
 657  ```
 658  acdc-scanner/
 659  ├── web/                    # Next.js application
 660  ├── api/                    # Backend API
 661  └── indexer/                # Chain indexer
 662  ```
 663  
 664  ## Modes
 665  
 666  ```
 667  DASHBOARD (Default):
 668  ├── Network status
 669  ├── Governor transparency (balances, mint/burn)
 670  ├── Validator/prover status
 671  ├── Governance activity
 672  ├── Oracle rates
 673  └── Cross-chain health
 674  
 675  EXPLORER (Toggle):
 676  ├── Block list
 677  ├── Transaction search
 678  ├── Address lookup
 679  ├── Governor detail pages
 680  ├── Proposal detail pages
 681  └── Raw data access
 682  ```
 683  
 684  ## Governor Mirror Requirements
 685  
 686  ```
 687  EACH GOVERNOR MUST OPERATE:
 688  ├── Minimum 1 ALPHA-Scanner mirror
 689  ├── Localized language support (national language)
 690  ├── Public API access
 691  ├── Data retention: 52-364 epochs (discretion)
 692  └── Update frequency: Every 5 minutes
 693  ```
 694  
 695  ---
 696  
 697  # PART XI: DEVELOPER PORTAL
 698  
 699  ## Purpose
 700  
 701  Documentation, API reference, SDK guides, testnet faucet.
 702  
 703  ## Structure
 704  
 705  ```
 706  acdc-docs/
 707  ├── api/
 708  │   ├── openapi-alpha.yaml
 709  │   ├── openapi-delta.yaml
 710  │   └── websocket-spec.md
 711  ├── sdk/
 712  │   ├── rust/
 713  │   ├── typescript/
 714  │   └── python/
 715  ├── guides/
 716  ├── tutorials/
 717  ├── reference/
 718  ├── cli/
 719  ├── concepts/
 720  ├── i18n/
 721  └── site/                   # Docusaurus config
 722  ```
 723  
 724  ## Radicle Integration
 725  
 726  ```
 727  GOVERNANCE:
 728  ├── Doc changes via Radicle PRs
 729  ├── Maintainers approved by DELTA governance
 730  └── Community translations via PRs
 731  
 732  HOSTING:
 733  ├── Canonical at docs.ac-dc.network
 734  └── Mirrors encouraged (decentralized)
 735  ```
 736  
 737  ---
 738  
 739  # PART XII: ON-CHAIN CONTRACTS
 740  
 741  ## Name Service Contract
 742  
 743  ```
 744  DEPLOYED ON: DELTA Chain
 745  
 746  FUNCTIONS:
 747  ├── register(name, payment_code, duration)
 748  ├── renew(name, duration)
 749  ├── transfer(name, new_owner)
 750  ├── update_resolution(name, chain, address)
 751  ├── resolve(name) → resolution_map
 752  └── message_drop(name, encrypted_message)
 753  
 754  PRICING:
 755  ├── Premium (3-4 char, dictionary): Vickrey auction
 756  ├── Standard (5+ char): 10 ALPHA/year
 757  └── Revenue → DELTA revenue pool
 758  ```
 759  
 760  ## Backup Pointer Contract
 761  
 762  ```
 763  DEPLOYED ON: DELTA Chain
 764  
 765  FUNCTIONS:
 766  ├── set_backup_cid(address, cid)
 767  ├── get_backup_cid(address) → cid
 768  └── clear_backup(address)
 769  
 770  ACCESS:
 771  └── Only backup_address derived from seed can write
 772  ```
 773  
 774  ## Social Recovery Contract
 775  
 776  ```
 777  DEPLOYED ON: DELTA Chain
 778  
 779  FUNCTIONS:
 780  ├── setup_guardians(guardians[], threshold)
 781  ├── initiate_recovery(new_payment_code)
 782  ├── approve_recovery(guardian_sig)
 783  ├── cancel_recovery()
 784  ├── execute_recovery() [after timelock]
 785  └── update_guardians(new_guardians[], new_threshold)
 786  
 787  TIMELOCK: 7 days
 788  ```
 789  
 790  ## DX Staking Contract
 791  
 792  ```
 793  DEPLOYED ON: DELTA Chain
 794  
 795  FUNCTIONS:
 796  ├── stake(amount)
 797  ├── unstake(amount) [1 epoch cooldown]
 798  ├── restake(amount) [5 epoch warmup]
 799  ├── claim_dividends()
 800  ├── get_stake(address) → staked_amount
 801  └── get_voting_power(address) → power
 802  
 803  DEFAULT: New DX acquired is staked
 804  ```
 805  
 806  ## Governance Contracts
 807  
 808  ```
 809  ALPHA GOVERNANCE:
 810  ├── propose(proposal_data)
 811  ├── vote(proposal_id, vote)
 812  ├── execute(proposal_id)
 813  └── Threshold: 67% of Governors
 814  
 815  DELTA GOVERNANCE:
 816  ├── propose(proposal_data)
 817  ├── vote(proposal_id, vote)
 818  ├── execute(proposal_id)
 819  └── Threshold: 67% of qualified holders (≥10k DX staked)
 820  
 821  SLASHING:
 822  ├── Standard non-vote: 1% DX
 823  ├── Emergency non-vote: 10% DX
 824  └── Slashed → Reward Pool
 825  ```
 826  
 827  ---
 828  
 829  # PART XIII: INFRASTRUCTURE
 830  
 831  ## IPFS Integration
 832  
 833  ```
 834  PURPOSE: Encrypted backup storage
 835  
 836  IMPLEMENTATION:
 837  ├── Use public IPFS gateway for MVP
 838  ├── Consider dedicated nodes for production
 839  └── Pinning service for persistence
 840  
 841  FLOW:
 842  1. Encrypt backup data with seed-derived key
 843  2. Upload to IPFS → receive CID
 844  3. Store CID on-chain
 845  4. Recovery: fetch CID → decrypt with seed
 846  ```
 847  
 848  ## Oracle Integration
 849  
 850  ```
 851  PRIMARY: Chainlink
 852  
 853  FEEDS:
 854  ├── USD/rates for all basket currencies
 855  ├── BTC/USD, ETH/USD for crypto pairs
 856  └── ALPHA/USD derived from DEX activity
 857  
 858  FAILOVER:
 859  ├── <10 min delay: Last known price
 860  ├── >10 min delay: Backup oracle
 861  ├── >60 min delay: Trading halt
 862  ```
 863  
 864  ## Release Infrastructure
 865  
 866  ```
 867  PREVIEW CHANNEL:
 868  ├── Auto-push beta builds
 869  ├── Mandatory analytics
 870  ├── Minimum 7-day testing
 871  
 872  PRODUCTION RELEASE:
 873  ├── Readiness metrics (crash <0.1%, critical bugs: 0)
 874  ├── DELTA governance vote (67%+)
 875  ├── Auto-push to all users on approval
 876  └── No user opt-out
 877  ```
 878  
 879  ---
 880  
 881  # PART XIV: TESTING REQUIREMENTS
 882  
 883  ## Unit Tests
 884  
 885  ```
 886  COVERAGE TARGET: 80%+
 887  
 888  CRITICAL PATHS (100% coverage):
 889  ├── Key derivation
 890  ├── Payment code generation/parsing
 891  ├── Transaction signing
 892  ├── Adaptor signatures
 893  ├── Backup encryption/decryption
 894  └── Recovery flows
 895  ```
 896  
 897  ## Integration Tests
 898  
 899  ```
 900  SCENARIOS:
 901  ├── Full onboarding flow
 902  ├── Send/receive ALPHA
 903  ├── Mint/redeem sAX
 904  ├── P2P swap completion
 905  ├── Governance vote
 906  ├── Backup and restore
 907  ├── Device mesh pairing
 908  └── Social recovery
 909  ```
 910  
 911  ## E2E Tests
 912  
 913  ```
 914  PLATFORMS:
 915  ├── iOS (XCUITest)
 916  ├── Android (Espresso)
 917  ├── Desktop (Playwright)
 918  └── Web (Playwright)
 919  
 920  CRITICAL FLOWS:
 921  ├── New user onboarding
 922  ├── Returning user restore
 923  ├── Cross-platform sync
 924  └── Testnet/mainnet switching
 925  ```
 926  
 927  ## Security Audits
 928  
 929  ```
 930  REQUIRED:
 931  ├── wallet-core cryptographic review
 932  ├── Smart contract audits (all contracts)
 933  ├── Platform-specific security review
 934  └── Penetration testing
 935  ```
 936  
 937  ---
 938  
 939  # PART XV: IMPLEMENTATION PHASES
 940  
 941  ## Phase 1: Foundation (Weeks 1-4)
 942  
 943  ```
 944  DELIVERABLES:
 945  ├── wallet-core library (all cryptographic functions)
 946  ├── Design system tokens
 947  ├── i18n framework + English strings
 948  ├── Repository structure
 949  └── CI/CD pipelines
 950  ```
 951  
 952  ## Phase 2: Core Wallet (Weeks 5-10)
 953  
 954  ```
 955  DELIVERABLES:
 956  ├── Wallet app (all platforms)
 957  │   ├── Onboarding
 958  │   ├── Three-pocket wallet
 959  │   ├── Send/receive
 960  │   ├── Settings
 961  │   └── Basic trading (simple mode)
 962  ├── CLI (wallet commands)
 963  └── Testnet deployment
 964  ```
 965  
 966  ## Phase 3: Trading & Swaps (Weeks 11-14)
 967  
 968  ```
 969  DELIVERABLES:
 970  ├── Pro trading mode
 971  ├── Market maker mode
 972  ├── P2P swap system
 973  ├── Private swap codes
 974  └── External chain integration (BTC, ETH, SOL)
 975  ```
 976  
 977  ## Phase 4: Governance & Operators (Weeks 15-18)
 978  
 979  ```
 980  DELIVERABLES:
 981  ├── Governance UI (wallet embedded)
 982  ├── Governor console
 983  ├── Validator/prover dashboards
 984  ├── CLI (governance, validator, prover commands)
 985  └── DX staking
 986  ```
 987  
 988  ## Phase 5: Public Utilities (Weeks 19-22)
 989  
 990  ```
 991  DELIVERABLES:
 992  ├── ALPHA-Scanner (dashboard + explorer)
 993  ├── Developer portal
 994  ├── Testnet faucet
 995  ├── Messenger app
 996  └── Documentation
 997  ```
 998  
 999  ## Phase 6: Polish & Launch (Weeks 23-26)
1000  
1001  ```
1002  DELIVERABLES:
1003  ├── AI translations (20 languages)
1004  ├── Accessibility audit + fixes
1005  ├── Security audits
1006  ├── Performance optimization
1007  ├── App store submissions
1008  └── Production deployment
1009  ```
1010  
1011  ---
1012  
1013  # PART XVI: SUCCESS CRITERIA
1014  
1015  ## Functional Requirements
1016  
1017  ```
1018  WALLET:
1019  ├── Create wallet from seed
1020  ├── Restore wallet from seed (+ IPFS backup)
1021  ├── Send/receive ALPHA (private)
1022  ├── Mint/redeem sAX
1023  ├── Trade perpetuals
1024  ├── P2P swaps (public + private codes)
1025  ├── Off-ramp via Governors
1026  ├── Multi-account support
1027  ├── Device mesh 2FA
1028  └── Social/Shamir recovery
1029  
1030  GOVERNANCE:
1031  ├── View proposals
1032  ├── Cast votes
1033  ├── Create proposals (if eligible)
1034  └── Track voting history
1035  
1036  OPERATORS:
1037  ├── Validator status/rewards
1038  ├── Prover status/rewards
1039  └── CLI management
1040  ```
1041  
1042  ## Non-Functional Requirements
1043  
1044  ```
1045  PERFORMANCE:
1046  ├── App launch: <2 seconds
1047  ├── Transaction submission: <1 second
1048  ├── Balance refresh: <3 seconds
1049  └── Swap execution: <30 seconds
1050  
1051  ACCESSIBILITY:
1052  ├── WCAG 2.1 AA compliance
1053  ├── Screen reader compatible
1054  ├── Keyboard navigable
1055  └── High contrast mode
1056  
1057  SECURITY:
1058  ├── No key exposure
1059  ├── Encrypted local storage
1060  ├── Secure enclave usage (where available)
1061  └── Audit passed
1062  ```
1063  
1064  ---
1065  
1066  # APPENDIX A: DEPENDENCY GRAPH
1067  
1068  ```
1069  wallet-core
1070  ├── acdc-wallet (all platforms)
1071  ├── acdc-governor
1072  ├── acdc-messenger
1073  ├── acdc-cli
1074  └── acdc-scanner (for address derivation)
1075  
1076  acdc-design
1077  ├── acdc-wallet
1078  ├── acdc-governor
1079  ├── acdc-messenger
1080  └── acdc-scanner
1081  
1082  acdc-i18n
1083  ├── acdc-wallet
1084  ├── acdc-governor
1085  ├── acdc-messenger
1086  ├── acdc-scanner
1087  └── acdc-docs
1088  
1089  acdc-contracts
1090  ├── Name service (used by wallet, scanner)
1091  ├── Backup pointer (used by wallet)
1092  ├── Social recovery (used by wallet)
1093  ├── DX staking (used by wallet, governance)
1094  └── Governance (used by wallet, governor, scanner)
1095  ```
1096  
1097  ---
1098  
1099  # APPENDIX B: EXTERNAL DEPENDENCIES
1100  
1101  ```
1102  CRYPTOGRAPHY:
1103  ├── snarkVM (ZK proofs)
1104  ├── bls12_381 (BLS signatures)
1105  ├── secp256k1 (Bitcoin/Ethereum)
1106  ├── ed25519-dalek (Solana)
1107  └── aes-gcm (backup encryption)
1108  
1109  UI:
1110  ├── Tailwind CSS
1111  ├── Radix UI
1112  ├── Lucide Icons
1113  ├── Recharts
1114  ├── TradingView (charting)
1115  └── Inter font
1116  
1117  INFRASTRUCTURE:
1118  ├── IPFS (backup storage)
1119  ├── Chainlink (oracles)
1120  └── Radicle (documentation)
1121  
1122  BUILD:
1123  ├── Rust toolchain
1124  ├── wasm-pack (WASM builds)
1125  ├── Tauri (desktop)
1126  ├── React Native (mobile alternative)
1127  └── Next.js (web apps)
1128  ```
1129  
1130  ---
1131  
1132  **END OF IMPLEMENTATION PLAN**
1133  
1134  **Document Version:** 1.0
1135  **Date:** January 14, 2027
1136  **Status:** Ready for Implementation
1137  
1138  **Next Step:** Pass to claude-code for detailed implementation