Skip to content

feat: implement Knowledge Graph for Wallet Integration#596

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Imole203:feat/wallet-knowledge-graph
May 29, 2026
Merged

feat: implement Knowledge Graph for Wallet Integration#596
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Imole203:feat/wallet-knowledge-graph

Conversation

@Imole203
Copy link
Copy Markdown
Contributor

feat: Implement Knowledge Graph for Wallet Integration

Summary

Adds a Knowledge Graph layer to the wallet integration, enabling structured
relationship tracking between wallets, users, transactions, tokens, and content
— powering reputation scoring, tip history, and social graph traversal.

Changes

src/lib/wallet/knowledgeGraph.types.ts

Defines all graph primitives:

  • Node types: WalletNode, UserNode, TransactionNode, TokenNode, ContentNode
  • Edge types: OWNS, SENT, RECEIVED, TIPPED, HOLDS, AUTHORED, TIPPED_CONTENT
  • Query result types: WalletProfile, TipRelationship, GraphStats

src/lib/wallet/knowledgeGraph.service.ts

WalletKnowledgeGraphService class with:

  • Node/edge CRUD with Map-based adjacency list
  • upsertWallet, addTransaction, addToken, addContent helpers
  • getWalletProfile — full wallet context (users, txs, tokens, content)
  • getTipRelationships — who a wallet has tipped and how much
  • getReputationScore — score derived from tip activity (0–100)
  • localStorage persistence with graceful fallback
  • Exported singleton walletKnowledgeGraph

src/hooks/useWalletKnowledgeGraph.ts

React hook exposing graph queries and mutations:

  • registerWallet, recordTip, registerToken, registerContent
  • getWalletProfile, getTipRelationships, getReputationScore
  • Reactive stats (node/edge counts)

Testing

Closes

Resolves: Wallet Integration Knowledge Graph implementation
closes #466

- Add WalletKnowledgeGraph type definitions (nodes, edges, query results)
- Implement WalletKnowledgeGraphService with graph operations and localStorage persistence
- Add useWalletKnowledgeGraph hook for React integration

Nodes: WalletNode, UserNode, TransactionNode, TokenNode, ContentNode
Edges: OWNS, SENT, RECEIVED, TIPPED, HOLDS, AUTHORED, TIPPED_CONTENT
Features: reputation scoring, tip history, wallet profiles, graph stats
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Imole203 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit 50cf246 into rinafcode:main May 29, 2026
3 of 6 checks passed
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.

feature Wallet Integration : Knowledge Graph

2 participants