Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
402 commits
Select commit Hold shift + click to select a range
2b54203
fix: add dev mode bypass for token split operations
vrogojin Jan 11, 2026
b8ba0dc
fix: prevent SPLIT_BURN entries from being sent via Nostr
vrogojin Jan 11, 2026
bede4dc
Merge pull request #137 from unicitynetwork/main
igmahl Jan 12, 2026
c226a1b
fix: add IPNS post-publish verification and retry loop
vrogojin Jan 12, 2026
d0f1048
fix: persist computed stateHash for genesis-only tokens
vrogojin Jan 12, 2026
477ee06
fix(chat): wrap quick action buttons on mobile for narrow screens
KruGoL Jan 12, 2026
1cfad34
fix: sync local-only tokens to IPNS after importing from newer remote
vrogojin Jan 12, 2026
c515e12
Merge pull request #138 from unicitynetwork/dev
igmahl Jan 13, 2026
97a90ba
fix(wallet): auto-open payment request modal and truncate long nametags
igmahl Jan 13, 2026
325f535
Merge pull request #139 from unicitynetwork/issue#119
igmahl Jan 13, 2026
42be7bb
feat: verify tombstoned tokens against Unicity and persist SPENT cache
vrogojin Jan 13, 2026
ed4cc1a
fix: TXF backwards compatibility and reduce logging noise
vrogojin Jan 14, 2026
06b5608
add adittional currencies to swap section
igmahl Jan 15, 2026
735d0c6
groupchat poc (nostr/zooid)
MastaP Jan 15, 2026
47572a4
join private groups with invites
MastaP Jan 15, 2026
ce469b5
Merge pull request #142 from unicitynetwork/issue#119
igmahl Jan 15, 2026
d3cb7f0
nostr sdk 0.3.1
MastaP Jan 15, 2026
0ac8f4e
handle invites to private groups
MastaP Jan 15, 2026
a2e551e
Merge pull request #144 from unicitynetwork/main
igmahl Jan 16, 2026
b8e1da6
docs: add comprehensive Token Inventory Management Specification
vrogojin Jan 17, 2026
38c26e8
feat: implement InventorySyncService with multi-version token archite…
vrogojin Jan 17, 2026
6c3a8c2
feat: implement background loops and UI components for inventory sync
vrogojin Jan 17, 2026
a165bea
feat: wire up runtime integration for background loops
vrogojin Jan 17, 2026
45d35c8
feat: add Step 8.5 nametag-Nostr consistency check
vrogojin Jan 17, 2026
aea927f
fix: Step 8.4 ownership filtering and Step 8.5 proxy address publishing
vrogojin Jan 17, 2026
4fd4a1d
refactor: unify ProxyAddress derivation pattern in useWallet.ts
vrogojin Jan 18, 2026
334b83e
test: add unit and integration tests for InventorySyncService
vrogojin Jan 18, 2026
9f9c028
fix: eliminate test false positives and fix production bugs
vrogojin Jan 18, 2026
1369b33
test: strengthen test coverage and fix mock data structures
vrogojin Jan 18, 2026
fec6933
test: add critical missing tests for spec compliance
vrogojin Jan 18, 2026
226a5b0
test: add critical missing tests for spec compliance (phase 2)
vrogojin Jan 18, 2026
57e55ac
chore: add Claude Code analysis artifacts to .gitignore
vrogojin Jan 18, 2026
313805a
fix: resolve TypeScript build errors and lint warnings
vrogojin Jan 18, 2026
6663181
refactor: centralize OutboxRecoveryService lifecycle in ServicesProvider
vrogojin Jan 18, 2026
1acfb19
fix: genesis token validation, IPNS empty name handling, and query de…
vrogojin Jan 18, 2026
dc696e9
feat: add Step 7.5 tombstone verification and IpfsTransport interface
vrogojin Jan 18, 2026
4be98c3
refactor: Phase 2 IPFS transport layer separation
vrogojin Jan 18, 2026
7bf48f9
fix: prevent infinite loop when wallet data cleared but credentials r…
vrogojin Jan 18, 2026
a2e157f
fix: disable dual-sync auto-triggers in IpfsStorageService
vrogojin Jan 18, 2026
7fe6b10
fix: recover tokens from IPFS when localStorage corrupted but version…
vrogojin Jan 18, 2026
09a71e6
fix: resolve IPFS sync issues and infinite IPNS loop
vrogojin Jan 18, 2026
019b502
perf: add query debouncing to prevent excessive spent checks
vrogojin Jan 18, 2026
04ce802
refactor: InventorySyncService owns localStorage per spec Section 6.1
vrogojin Jan 18, 2026
e7e6dcf
refactor: migrate all consumers from WalletRepository to InventorySyn…
vrogojin Jan 18, 2026
722ee07
fix: add backwards compatibility for legacy StoredWallet format
vrogojin Jan 18, 2026
0c5b91a
fix: replace deprecated startAutoSync() with inventorySync()
vrogojin Jan 18, 2026
5a9f17c
fix: add async mutex to inventorySync to prevent race conditions
vrogojin Jan 18, 2026
8a8e762
fix: include ipnsName in identity for IPFS startup sync
vrogojin Jan 18, 2026
ede06a1
fix: implement coalescing mutex to prevent infinite sync loop
vrogojin Jan 18, 2026
badae5a
fix: prevent unnecessary IPFS uploads on reload
vrogojin Jan 18, 2026
6229e34
fix: sync local version with remote when content unchanged
vrogojin Jan 18, 2026
44b34a4
fix: trigger UI refetch after inventory sync completes
vrogojin Jan 18, 2026
3f0ea01
fix: resolve IPFS sync issues for new wallets
vrogojin Jan 18, 2026
2c8375f
fix: resolve CID mismatch on first load after identity creation
vrogojin Jan 18, 2026
505a5bd
fix: preserve _sent and _invalid tokens during IPFS recovery
vrogojin Jan 18, 2026
68e62dd
fix: prevent version double-increment causing IPFS content mismatch
vrogojin Jan 18, 2026
16e51a6
fix: deduplicate tombstones, sent, and invalid tokens to prevent data…
vrogojin Jan 18, 2026
77f8429
fix: prevent token loss from format validation and stale IPFS cache
vrogojin Jan 18, 2026
b46c499
fix: use max(local, remote) version for proper IPFS recovery
vrogojin Jan 18, 2026
88f5819
nametags in chats
MastaP Jan 19, 2026
75dc741
focus on joined group
MastaP Jan 19, 2026
5038a83
fetch messages
MastaP Jan 19, 2026
61f0ac4
Merge branch 'dev' into groupchat
MastaP Jan 19, 2026
4ecf6bb
nostr-js-sdk 0.3.2
MastaP Jan 19, 2026
588f712
group history fix
MastaP Jan 19, 2026
a49ad8c
readme
MastaP Jan 19, 2026
1ba3f88
switch to deployed relay
MastaP Jan 19, 2026
07a9e75
auto-delete stale groups
MastaP Jan 19, 2026
19cbf41
Merge origin/dev into @cryptohog/ipfs
vrogojin Jan 19, 2026
638fcaf
group chat: fixed "already a member" issue
MastaP Jan 20, 2026
231754e
Update list of supported assets. Extend supported stablecoins list
igmahl Jan 20, 2026
b5fdfaa
Merge pull request #164 from unicitynetwork/demo/update_supported_cur…
igmahl Jan 20, 2026
7eb94a1
Merge origin/dev: integrate group chat with IPFS sync architecture
vrogojin Jan 20, 2026
f8bfae6
fix: make transactionHash optional in genesis validation to prevent t…
vrogojin Jan 20, 2026
c3eb0ab
Merge branch 'main' into dev
MastaP Jan 20, 2026
06c921a
recent activity tab
MastaP Jan 20, 2026
621e369
more mcp activities
MastaP Jan 20, 2026
41d29e1
Merge origin/dev: deployment workflow updates
vrogojin Jan 20, 2026
f303390
Start updating list of available agents
igmahl Jan 20, 2026
fbe3984
feat: add developers page and header navigation
KruGoL Jan 20, 2026
7b89c78
feat(header): add mobile navigation menu
KruGoL Jan 20, 2026
351e2a6
Merge pull request #162 from unicitynetwork/@cryptohog/ipfs
igmahl Jan 20, 2026
f5d70f5
Updated agent list by removing mock agent
igmahl Jan 20, 2026
4605c7b
feat: add animated nav indicator
KruGoL Jan 20, 2026
1f6e2d7
Merge pull request #166 from unicitynetwork/demo/update_agents
igmahl Jan 20, 2026
d802337
ui: header nav indicators & mobile menu animation
KruGoL Jan 20, 2026
9547cd4
replaced api key with cors
MastaP Jan 20, 2026
dfde88e
merge: resolve conflicts from feat/developers-page
KruGoL Jan 20, 2026
b6b226e
use deployed ACTIVITY_API_URL in GH
MastaP Jan 20, 2026
99bac40
Merge branch 'dev' into recent_activity
MastaP Jan 20, 2026
a961e64
Merge pull request #165 from unicitynetwork/recent_activity
MastaP Jan 20, 2026
313f135
feat(nav): add Mine Alpha external link
KruGoL Jan 20, 2026
ed451a3
feat(agents): add sell-anything marketplace with mock data
KruGoL Jan 21, 2026
43324e0
feat(chat): add fullscreen mode to all chat components
KruGoL Jan 21, 2026
c133521
feat(chat): add agent description to header and auto-close fullscreen…
KruGoL Jan 21, 2026
066714a
feat(chat): add smooth zoom animation for fullscreen mode
KruGoL Jan 21, 2026
75848a6
feat(chat): add clickable @mentions and DM navigation from agents
KruGoL Jan 21, 2026
b027cef
Merge pull request #168 from unicitynetwork/feat/agent-chat-ui
KruGoL Jan 21, 2026
cba9d0c
fix lint
KruGoL Jan 21, 2026
6a15633
Merge pull request #169 from unicitynetwork/feat/agent-chat-ui-2
KruGoL Jan 21, 2026
7982aa7
fix build
KruGoL Jan 21, 2026
1cd2a9d
Merge pull request #170 from unicitynetwork/feature/agent-chat-3
KruGoL Jan 21, 2026
453731f
do not trim the keys
MastaP Jan 21, 2026
46755e3
feat(chat): add clickable @mentions
KruGoL Jan 21, 2026
848f3d0
Merge pull request #171 from unicitynetwork/feature/agent-chat-4
KruGoL Jan 21, 2026
ca8b18a
feat(mine): add Mine Alpha page with mining options
KruGoL Jan 21, 2026
875528f
Merge pull request #172 from unicitynetwork/feature/mine-alpha-page
KruGoL Jan 21, 2026
6774ea8
feat(agents): add reorder animation for agent cards
KruGoL Jan 21, 2026
2966d03
Merge pull request #174 from unicitynetwork/feature/agent-card-reorde…
KruGoL Jan 21, 2026
2ca0c66
refactor(developers): update SDK docs to cryptographic identity model
vrogojin Jan 21, 2026
158f052
feat(docs): add SDK documentation page and update developers page
vrogojin Jan 21, 2026
97bc388
Redesign activity bar
igmahl Jan 21, 2026
e02f09b
Merge branch 'dev' into demo/activity_bar
igmahl Jan 21, 2026
8bac64d
fix
igmahl Jan 21, 2026
cbe548b
Merge pull request #176 from unicitynetwork/demo/activity_bar
igmahl Jan 21, 2026
009f332
Fix categories
igmahl Jan 22, 2026
50e18ed
Merge pull request #177 from unicitynetwork/activity_bar01
igmahl Jan 22, 2026
3ae798f
feat(chat): add mini chat system
KruGoL Jan 22, 2026
9f76c2f
Merge branch 'dev' into feature/mini-chat
KruGoL Jan 22, 2026
5acc79f
Merge pull request #178 from unicitynetwork/feature/mini-chat
KruGoL Jan 22, 2026
497bbe4
fix(validation): move spent cache key to centralized storage config
KruGoL Jan 22, 2026
0b73194
Merge pull request #179 from unicitynetwork/fix/spent-cache-storage-key
KruGoL Jan 22, 2026
c6f2946
fix(l3): add received tokens to transaction history
KruGoL Jan 22, 2026
b035a3e
fix(nametag): copy without @ and accept @ in recipient input
KruGoL Jan 22, 2026
4aacca8
Merge pull request #180 from unicitynetwork/fix/l3-tx-history
KruGoL Jan 22, 2026
8f9bf2a
Remove transfer from activity feed
igmahl Jan 22, 2026
35dab76
Merge pull request #181 from unicitynetwork/demo/preparation_fixes
igmahl Jan 22, 2026
610a8d0
complete pokemon config
ristik Jan 22, 2026
d27c9b9
Added pokemon_purchase
MastaP Jan 22, 2026
b23e857
feat(agents): add Pokemon Cards agent with chat component
KruGoL Jan 22, 2026
33eb188
Merge pull request #182 from unicitynetwork/feat/pokemon-agent
KruGoL Jan 22, 2026
dc8afba
Change routing for docs page
igmahl Jan 22, 2026
c1f689b
Merge pull request #183 from unicitynetwork/demo/docs_page_fix
igmahl Jan 22, 2026
856ba2c
feat: add clickable @mentions with context-aware colors
KruGoL Jan 22, 2026
99f3738
Merge pull request #184 from unicitynetwork/feature/clickable-mentions
KruGoL Jan 22, 2026
27f5893
fix: parse @mentions inside bold/italic text recursively
KruGoL Jan 22, 2026
438d2c6
Merge pull request #185 from unicitynetwork/feature/clickable-mentions-1
KruGoL Jan 22, 2026
528dcb0
Reduce amount of nametags to be able to operate them
igmahl Jan 22, 2026
b355c1e
Merge pull request #186 from unicitynetwork/demo/nametag_preparation
igmahl Jan 22, 2026
7a06d16
rename chat
igmahl Jan 22, 2026
941a5a8
Remove unused md files
igmahl Jan 23, 2026
c4dfed6
Improve wallet modals UI and mobile responsiveness
igmahl Jan 23, 2026
f8209ee
Merge pull request #187 from unicitynetwork/feature/issue_119
igmahl Jan 23, 2026
164133b
restore groups
MastaP Jan 23, 2026
4ea8d87
init
KruGoL Jan 23, 2026
948fb77
feat(onboarding): add "Let's Go" confirmation and page unload protection
KruGoL Jan 23, 2026
731d4d8
admin UI
MastaP Jan 23, 2026
fed8488
fixed nametag resolution
MastaP Jan 23, 2026
739932d
deletion
MastaP Jan 23, 2026
41ef86c
removed import
MastaP Jan 23, 2026
9d592bf
handle kick event
MastaP Jan 23, 2026
5484de7
fixed admin UI
MastaP Jan 23, 2026
84182e5
lint fixes
MastaP Jan 23, 2026
2bdc68c
handle rejoin after kick
MastaP Jan 23, 2026
2babcea
fixed rejoin
MastaP Jan 23, 2026
918ea9a
fixed deleted message history
MastaP Jan 23, 2026
2b9e094
feat(wallet): add CreateAddressModal for seamless address creation
KruGoL Jan 23, 2026
804fc13
Create reusable modal component
igmahl Jan 23, 2026
0c520b6
notify user being kicked
MastaP Jan 23, 2026
6de990b
change chat view once kicked
MastaP Jan 23, 2026
b24e4d3
feat(wallet): add nametag creation new addresses and fix sync interru…
KruGoL Jan 23, 2026
0c64dd0
fix(onboarding): pre-populate query cache for instant wallet display …
KruGoL Jan 23, 2026
c1065ee
fix(logout): track inventory sync and improve sync complete UX
KruGoL Jan 23, 2026
48c7c4a
make chat vidget visible while using full screen mode
igmahl Jan 23, 2026
b4a5afb
Add group chat admin features and message replies
MastaP Jan 23, 2026
ce22c56
feat(wallet): background token validation and animation improvements
KruGoL Jan 24, 2026
7f37c27
fix(wallet): remove pointer cursor from non-clickable assets
KruGoL Jan 24, 2026
fed3557
fix(wallet): prevent infinite refetch loops and improve query stability
KruGoL Jan 24, 2026
eaee4c8
Fix groups and dms
igmahl Jan 24, 2026
ba5be98
fix(activity): prevent SSE connection error spam when service unavail…
KruGoL Jan 24, 2026
6599594
Merge pull request #189 from unicitynetwork/feature/sphere-sdk
KruGoL Jan 24, 2026
6e50adb
Merge branch 'feature/wallet_refactor' into dev
igmahl Jan 24, 2026
5f935c0
group creation fixes
MastaP Jan 24, 2026
40f44c5
Fix build issues
igmahl Jan 24, 2026
2c33b7d
Merge branch 'groupchat-admin' into dev
MastaP Jan 24, 2026
bbb1a8e
hide admin UI from regular users
MastaP Jan 24, 2026
e5ef952
improved deletion
MastaP Jan 24, 2026
77fa6e0
fix(wallet): record direct transfers in transaction history
KruGoL Jan 26, 2026
45566a5
Merge pull request #193 from unicitynetwork/fix/direct-transfer-history
KruGoL Jan 26, 2026
a2b43b4
Fix tokes tab in the wallet to make it properly display token's logos…
igmahl Jan 26, 2026
d6c69dc
Merge pull request #195 from unicitynetwork/feature/wallet_fixes
igmahl Jan 26, 2026
48fb7be
Merge branch 'dev' into more-admin-fixes
MastaP Jan 26, 2026
6fc521e
fixed member count upon creation
MastaP Jan 27, 2026
7fcad5e
autofocus on group name in modals
MastaP Jan 27, 2026
a8db8a4
fixed popup z-order
MastaP Jan 27, 2026
333e485
fixed private group visibitily attributes
MastaP Jan 27, 2026
8207ab7
clear cached relay admin status
MastaP Jan 27, 2026
1080d8e
cleaned up excessive logs
MastaP Jan 27, 2026
81781af
ignore outdated group delete event
MastaP Jan 27, 2026
303d166
remember chat position (global vs dm)
MastaP Jan 27, 2026
40a123a
autofocus private group upon joining
MastaP Jan 27, 2026
bc6ca3f
chore: remove old sdk version
KruGoL Feb 2, 2026
43f49a3
docs: add sphere-sdk integration plan
KruGoL Feb 8, 2026
d3f774e
feat: add sphere-sdk dependency and create adapter layer
KruGoL Feb 8, 2026
21e708e
chore: add sphere-sdk dependency and tsconfig paths
KruGoL Feb 8, 2026
0434bb8
feat: integrate sphere-sdk with React adapter layer
KruGoL Feb 8, 2026
a9a5e3f
refactor: migrate L1 wallet and address selector to sphere-sdk
KruGoL Feb 8, 2026
1b8dc15
refactor: improve address selector and L1 modal display layout
KruGoL Feb 8, 2026
76aade6
feat: make nametag optional with post-onboarding registration
KruGoL Feb 9, 2026
324faf0
fix: show nametag step before wallet creation in onboarding flow
KruGoL Feb 9, 2026
4c4f8cd
feat: add live nametag availability checking and resolve transport ra…
KruGoL Feb 9, 2026
dfcfe83
feat: add live nametag availability checking and resolve transport ra…
KruGoL Feb 9, 2026
f37867e
feat: use atomic switchToAddress API and add copy direct address button
KruGoL Feb 9, 2026
0c3dae1
feat: integrate CoinGecko price feed and refactor balance/asset hooks…
igmahl Feb 9, 2026
58ace98
Merge branch 'feat/sdk-integration' of https://github.com/unicitynetw…
igmahl Feb 9, 2026
4b8bc0f
feat: complete logout cleanup (localStorage, IndexedDB, query cache)
KruGoL Feb 9, 2026
67b59d5
Merge branch 'feat/sdk-integration' of https://github.com/unicitynetw…
KruGoL Feb 9, 2026
22c40d4
feat: add wallet file import flow with scanning, password prompt, and…
KruGoL Feb 10, 2026
fecb4a8
feat: enhanced wallet import scan with nametag resolution and multi-s…
KruGoL Feb 10, 2026
13e3e24
fix: use SDK tracked addresses in L1 wallet modal, add L1 config and …
KruGoL Feb 10, 2026
ba1f45b
fix: navigate to splash screen before wallet deletion on logout
KruGoL Feb 10, 2026
f34f9c4
fix: avoid transport connection race in deleteWallet to prevent impor…
KruGoL Feb 10, 2026
5e916fa
feat: add wallet status line to L3 wallet view
KruGoL Feb 10, 2026
431ac9b
fix: pass vesting balances to SendModal and add explorer links to L1 …
KruGoL Feb 11, 2026
03be01f
feat: add confirmation step to L1 send modal with fee and recipient p…
KruGoL Feb 11, 2026
9f5891b
fix: asset list reactivity, CoinGecko rate limits, token ID display, …
igmahl Feb 11, 2026
f8c5c0a
Merge pull request #200 from unicitynetwork/fix/l3_wallet_integration
igmahl Feb 11, 2026
dfd8d8f
refactor: remove redundant storage connection check from importFromFile
KruGoL Feb 11, 2026
40412cb
refactor: replace WalletGate with per-agent wallet requirement and in…
KruGoL Feb 11, 2026
57e3c1e
refactor: migrate from local sphere-sdk to npm package, remove legacy…
igmahl Feb 11, 2026
d36cd95
refactor: delete legacy wallet infrastructure, migrate fully to spher…
KruGoL Feb 11, 2026
6140cee
fix: show L1 loading status and clear stale data on address switch
KruGoL Feb 12, 2026
3009f44
feat: add My Public Keys modal and use sphere.resolve() for DM conver…
KruGoL Feb 12, 2026
494051a
chore: fix CI by excluding helia optional deps and regenerating lock …
KruGoL Feb 12, 2026
ff8f81a
Merge pull request #201 from unicitynetwork/feat/sdk-integration-remo…
KruGoL Feb 12, 2026
dbe65ae
Merge pull request #202 from unicitynetwork/feat/sdk-integration
KruGoL Feb 12, 2026
357689d
fix: enable scrolling for WelcomeModal on mobile devices
igmahl Feb 12, 2026
fec9f5d
migrating groupchats to sdk
MastaP Feb 12, 2026
baa988b
changing moderation rules
MastaP Feb 12, 2026
0e8ab2a
fix: resolve logout→import hang and nametag recovery after import
KruGoL Feb 12, 2026
26652f7
updated to latest sdk.
MastaP Feb 12, 2026
c2b9bb8
Merge pull request #203 from unicitynetwork/groupchats-migration
MastaP Feb 12, 2026
af87dd5
Merge pull request #205 from unicitynetwork/fix/logout-import-flow
KruGoL Feb 12, 2026
3629b74
chore: remove unused dependencies and update sphere-sdk to 0.3.2
KruGoL Feb 12, 2026
bc7d0f2
Merge pull request #206 from unicitynetwork/chore/cleanup-unused-deps
KruGoL Feb 12, 2026
f22354b
feat: adapt wallet onboarding screens for panel context and improve L…
igmahl Feb 13, 2026
f1779f3
feat: enable IPFS token sync with toggle and status indicator
KruGoL Feb 13, 2026
1760b97
feat: enable IPFS token sync with toggle and fix token icons on reload
KruGoL Feb 13, 2026
8ff1836
Merge pull request #207 from unicitynetwork/feat/ipfs-sync
KruGoL Feb 13, 2026
108ef47
style: replace arbitrary Tailwind values with canonical classes
igmahl Feb 13, 2026
51e9b84
Merge pull request #208 from unicitynetwork/fix/sphere_layout
igmahl Feb 13, 2026
5942f0a
fix: use direct CoinGecko API URL in production and add cursor-pointe…
igmahl Feb 13, 2026
88b390d
Merge branch 'dev' into fix/sphere_layout
igmahl Feb 13, 2026
e84c730
Merge pull request #209 from unicitynetwork/fix/sphere_layout
igmahl Feb 13, 2026
39b2b7e
fix/ipfs_indicator
igmahl Feb 13, 2026
87f9a28
fix: resolve existing nametag before prompting on new address creation
KruGoL Feb 13, 2026
f7b891c
Merge pull request #210 from unicitynetwork/fix/nametag-resolve-on-ne…
KruGoL Feb 13, 2026
9d06b6c
chore: bump sphere-sdk to 0.3.5 (nametag recovery on address switch)
KruGoL Feb 13, 2026
aa4589d
fix: stale nametag on address switch + SDK switchToAddress timeout
KruGoL Feb 13, 2026
897f00c
Merge pull request #211 from unicitynetwork/fix/address-selector-name…
KruGoL Feb 13, 2026
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
24 changes: 20 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Agent Server API URL (agentic-chatbot backend)
VITE_AGENT_API_URL=http://localhost:3000

# Agent API Key (required for SSE streaming)
# VITE_AGENT_API_KEY=your-api-key-here

# For production with the example server:
# VITE_AGENT_API_URL=http://194.163.184.11:3000

Expand All @@ -14,10 +17,23 @@ VITE_AGENT_API_URL=http://localhost:3000
# - For production: https://goggregator-test.unicity.network
VITE_AGGREGATOR_URL=/rpc

# Enable IPFS storage for wallet backup (default: false)
# - true: Enables automatic wallet sync to IPFS
# - false/unset: IPFS storage disabled
# VITE_ENABLE_IPFS=true
# Nostr Relays for DMs and token transfers (comma-separated)
# Default: wss://nostr-relay.testnet.unicity.network
# VITE_NOSTR_RELAYS=wss://relay1.example.com,wss://relay2.example.com

# Group Chat Relays (Zooid with NIP-29 support, comma-separated)
# Default: wss://sphere-relay.unicity.network
# VITE_GROUP_CHAT_RELAYS=wss://sphere-relay.unicity.network

# Activity Service (for recent activity panel)
# VITE_ACTIVITY_API_URL=http://localhost:3001/activities
# VITE_ACTIVITY_API_KEY=your-activity-api-key

# IPFS Token Sync
# IPFS is enabled by default. Users can toggle it on/off via the cloud icon in the header.
# Custom IPFS gateway URLs (comma-separated, overrides SDK defaults)
# Default: https://unicity-ipfs1.dyndns.org
# VITE_IPFS_GATEWAYS=https://unicity-ipfs1.dyndns.org

# Development Server HTTPS (optional)
# Path to SSL certificates (e.g., Let's Encrypt certs)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-pages-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
BASE_PATH: /sphere/${{ steps.branch.outputs.name }}/
VITE_AGENT_API_URL: https://sphere.unicity.network/api
VITE_AGGREGATOR_URL: https://goggregator-test.unicity.network
VITE_ACTIVITY_API_URL: https://sphere.unicity.network/activities

- name: Deploy branch to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
Expand Down
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,18 @@ agentic-chatbot-main
*.sw?
.env
.env.production
*.pdf

# Claude Code analysis artifacts
ANALYSIS_INDEX.md
COVERAGE_MATRIX_SUMMARY.md
TEST_ANALYSIS_*.txt
TEST_ANALYSIS_*.md
TEST_COVERAGE_ANALYSIS.md
TEST_FINDINGS_SUMMARY.md
TEST_GAPS_RECOMMENDATIONS.md
TEST_IMPROVEMENTS.md
TEST_QUICK_REFERENCE.txt
docs/RECOMMENDED_TEST_CASES.md
docs/TESTING_ROADMAP.md
docs/TEST_*.md
118 changes: 118 additions & 0 deletions CID_MISMATCH_DIAGRAM.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
┌─────────────────────────────────────────────────────────────────────────────────┐
│ CID MISMATCH FLOW DIAGRAM │
└─────────────────────────────────────────────────────────────────────────────────┘

┌───────────────────────────────┐
│ Token Data (JS Object) │
│ { tokens: [], │
│ meta: { version: 1 }, │
│ tombstones: [] } │
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ UPLOAD TO IPFS │
│ (IpfsPublisher.ts:97-102) │
│ │
│ JSON.stringify(content) │
│ => SERIALIZED BYTES │
│ '{"tokens":[],"meta":...}' │
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ POST /api/v0/add │
│ FormData with JSON blob │
│ │
│ IPFS stores as-is with │
│ json codec (0x0200) │
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ IPFS Returns CID │
│ bagaaiera5tb3ebbkj... │ ◄─── Expected CID
│ (SHA-256 of JSON bytes) │
└───────────────┬───────────────┘
│ Time passes...
┌───────────────▼───────────────┐
│ FETCH FROM IPFS │
│ (IpfsHttpResolver.ts:172) │
│ │
│ GET /ipfs/{cid} │
│ Accept: application/json │
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ Gateway returns bytes │
│ '{"tokens":[],"meta":...}' │
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ JSON.parse(response) │
│ => JS Object │
│ │
│ ⚠️ KEY ORDER MAY CHANGE! │
│ { meta: { version: 1 }, │
│ tombstones: [], │
│ tokens: [] } │ ◄─── Different key order!
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ CID VERIFICATION │
│ (IpfsHttpResolver.ts:417) │
│ │
│ computeCidFromContent() │
│ => JSON.stringify() │
│ => '{"meta":{"version":...}' │ ◄─── Different bytes!
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ SHA-256 hash of new bytes │
│ │
│ CID: bagaaiera6s5yxka... │ ◄─── Computed CID
└───────────────┬───────────────┘
┌───────────────▼───────────────┐
│ ❌ CID MISMATCH! │
│ │
│ Expected: bagaaiera5tb3... │
│ Got: bagaaiera6s5y... │
│ │
│ ⚠️ Line 419 error logged │
└───────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────┐
│ THE PROBLEM │
├─────────────────────────────────────────────────────────────────────────────────┤
│ │
│ JSON.stringify() does NOT guarantee consistent key ordering! │
│ │
│ Upload: {"tokens":[],"meta":{"version":1},"tombstones":[]} │
│ ↓ │
│ Parse: Object { tokens: [], meta: {...}, tombstones: [] } │
│ ↓ │
│ Stringify: {"meta":{"version":1},"tombstones":[],"tokens":[]} ← DIFFERENT! │
│ │
│ Different bytes → Different SHA-256 → Different CID │
│ │
└─────────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────┐
│ THE SOLUTION │
├─────────────────────────────────────────────────────────────────────────────────┤
│ │
│ Use DAG-JSON codec for DETERMINISTIC encoding: │
│ │
│ Upload: @ipld/dag-json.encode() → Sorted keys alphabetically │
│ {"meta":{"version":1},"tokens":[],"tombstones":[]} │
│ │
│ Compute: @ipld/dag-json.encode() → SAME sorted output │
│ {"meta":{"version":1},"tokens":[],"tombstones":[]} │
│ │
│ ✅ Same bytes → Same SHA-256 → Same CID │
│ │
│ Changes needed: │
│ 1. IpfsPublisher: Use /api/v0/dag/put with dag-json codec │
│ 2. IpfsHttpResolver: Use dagJson.encode() for CID computation │
│ │
└─────────────────────────────────────────────────────────────────────────────────┘
183 changes: 183 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

Unicity AgentSphere is a React-based cryptocurrency wallet application for the Unicity network. It provides a dual-layer wallet interface supporting both Layer 1 (ALPHA blockchain) and Layer 3 (Unicity state transition network) operations. All wallet operations are handled through `@unicitylabs/sphere-sdk`, with a thin React adapter layer in `src/sdk/`.

## Development Commands

```bash
# Start development server
npm run dev

# Build for production (runs TypeScript compiler then Vite build)
npm run build

# Lint the codebase
npm run lint

# Run all tests (watch mode)
npm run test

# Run tests once (no watch mode)
npm run test:run

# Run a single test file
npx vitest run tests/unit/components/wallet/L3/services/TokenValidationService.test.ts

# Preview production build
npm run preview

# Type check only (without building)
npx tsc --noEmit
```

## Architecture

### Tech Stack
- React 19 + TypeScript with Vite 7
- TanStack Query v5 for server state management
- Tailwind CSS 4 for styling
- Framer Motion for animations
- React Router DOM v7 for routing
- Vitest + jsdom for testing
- `@unicitylabs/sphere-sdk` for all wallet operations (L1, L3, Nostr, IPFS)

### Application Structure

The app uses a single-page architecture with dynamic agent routing:
- `/` - Intro/splash screen
- `/agents/:agentId` - Dynamic agent pages (chat, ai, trivia, games, sport, p2p, merch, etc.)
- `/home` - Redirects to `/agents/chat`
- `/ai` - Redirects to `/agents/ai`

All routes except intro are wrapped in `WalletGate` and use `DashboardLayout` which provides header, navigation, and handles incoming transfers.

### SDK Adapter Layer (`src/sdk/`)

The React adapter layer over `@unicitylabs/sphere-sdk` (21 files):

**Core:**
- `SphereProvider.tsx` — React wrapper, manages Sphere instance lifecycle
- `SphereContext.ts` — Context definition (separate file for react-refresh)
- `types.ts` — Re-exports types from sphere-sdk
- `queryKeys.ts` — TanStack Query key factory (SPHERE_KEYS)

**Hooks by domain:**

| Domain | Hooks | Purpose |
|--------|-------|---------|
| Core | `useSphere`, `useWalletStatus`, `useIdentity`, `useNametag`, `useSphereEvents` | Instance access, wallet state, identity |
| Payments (L3) | `useTokens`, `useBalance`, `useAssets`, `useTransfer`, `useTransactionHistory` | Token operations |
| L1 | `useL1Balance`, `useL1Utxos`, `useL1Send`, `useL1Transactions` | ALPHA blockchain |
| Communications | `useSendDM`, `usePaymentRequests` | Messaging |

**Event bridging** (`useSphereEvents`):
- SDK events → TanStack Query invalidations
- `message:dm` → ChatRepository + `dm-received` custom event
- `payment_request:incoming` → `payment-requests-updated` custom event

### Key Patterns

**State Management:**
- TanStack Query manages all async state (wallet, balance, transactions)
- Custom events trigger cross-component refreshes
- SDK handles wallet storage internally

**Query Key Structure (SPHERE_KEYS):**
- `wallet: { exists, status }`
- `identity: { current, nametag, addresses }`
- `payments: { tokens, balance, assets, transactions }`
- `l1: { balance, utxos, transactions, vesting, blockHeight }`
- `communications: { conversations }`
- `market: { prices, registry }`

### Component Hierarchy

```
App
└── WalletGate
└── DashboardLayout
├── Header
└── AgentPage (route: /agents/:agentId)
├── AgentCard[] (agent picker)
├── ChatSection / AIChat / TriviaChat / etc. (based on agentId)
└── WalletPanel
├── L1WalletModal (when Layer 1 selected)
└── L3WalletView (when Layer 3 selected)
```

**Provider tree** (main.tsx):
```
QueryClientProvider → SphereProvider → ServicesProvider → ThemeInitializer → HashRouter → App
```

### Vite Configuration

- Base path: configurable via `BASE_PATH` env var (default `/`)
- Node polyfills enabled for crypto libraries (`elliptic`, `crypto-js`)
- Proxy `/rpc` to `https://goggregator-test.unicity.network` for L3 aggregator
- Proxy `/dev-rpc` to `https://dev-aggregator.dyndns.org` for dev aggregator
- Proxy `/coingecko` to `https://api.coingecko.com/api/v3` for price data
- Optional HTTPS support via `SSL_CERT_PATH` env var
- Remote HMR support via `HMR_HOST` env var

## Environment Variables

Copy `.env.example` to `.env` and configure:

```env
VITE_AGENT_API_URL=http://localhost:3000 # Agentic chatbot backend
VITE_USE_MOCK_AGENTS=true # Use mock agents (for local dev without backend)
VITE_AGGREGATOR_URL=/rpc # Unicity aggregator (proxied in dev)

# Optional: HTTPS for dev server (e.g., for WebCrypto APIs)
SSL_CERT_PATH=/path/to/certs # Path to SSL certificate directory
HMR_HOST=your-dev-server.example.com # Custom HMR host for remote dev
BASE_PATH=/ # Base path for deployment (default: /)
```

## Testing

Tests are located in `tests/` directory and run with Vitest:
- Test files: `tests/**/*.test.ts`, `tests/**/*.test.tsx`
- Environment: jsdom
- Path alias: `@` maps to `/src` (only available in tests via vitest.config.ts)
- Globals enabled: `describe`, `it`, `expect`, `vi` are available without imports

## TypeScript Configuration

- Strict mode enabled with `noUnusedLocals` and `noUnusedParameters`
- Target: ES2022, Module: ESNext with bundler resolution
- Type checking: `npx tsc --noEmit` (build runs tsc before vite build)

## Developer Notes

### Crypto Libraries
The project uses node polyfills (`vite-plugin-node-polyfills`) for browser compatibility with `elliptic` and `crypto-js` (used only in `BridgeModal.tsx` for L1 bridge signing).

### localStorage Keys
All keys use `sphere_` prefix (centralized in `src/config/storageKeys.ts`):
- `sphere_theme` - UI theme preference
- `sphere_welcome_accepted` - Welcome screen flag
- `sphere_transaction_history` - Transaction history
- `sphere_chat_*` - Chat conversations, messages, UI state
- `sphere_agent_chat_*` - Agent chat sessions and messages
- `sphere_dev_*` - Dev settings (aggregator URL, skip trust base)

Wallet encryption/storage is handled internally by the SDK.

### Custom Events
- `dm-received` - Bridged from SDK `message:dm` event
- `payment-requests-updated` - Bridged from SDK `payment_request:incoming` event
- Query invalidations handled automatically by `useSphereEvents()` hook

### Legacy Code
- `BridgeModal.tsx` — uses `elliptic` and `crypto-js` for L1→L3 bridge signing
- `walletFileParser.ts` — inlined `isJSONWalletFormat()` for wallet import format detection

### Key External Dependencies
- `@unicitylabs/sphere-sdk` - Core SDK wrapping L1/L3 operations, Nostr, IPFS, and state transitions
- `elliptic` - secp256k1 cryptography for L1 bridge signing (BridgeModal)
Loading