Skip to content

Commit 8d99d18

Browse files
Vault file structure (#278)
* chore(packages): create the file structure for the vault app
1 parent 92836bf commit 8d99d18

File tree

17 files changed

+58
-5
lines changed

17 files changed

+58
-5
lines changed

routes/vault/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Vault Application
2+
3+
Vault application for managing BTC staking and ETH interactions under the `/vault` URL path.
4+
5+
## File Structure
6+
7+
```
8+
routes/vault/src/
9+
├── VaultLayout.tsx
10+
├── index.ts
11+
├── clients/ # External API and service clients
12+
│ ├── eth-contract/ # ETH smart contract client for querying data and constructing transactions
13+
│ │ └── index.ts
14+
│ ├── morpho-graphql/ # GraphQL client for fetching market, position, and LLTV information from Morpho
15+
│ │ └── index.ts
16+
│ ├── vault-api/ # API client for fetching vault list by ETH address from vault-api service
17+
│ │ └── index.ts
18+
│ └── vault-provider/ # RPC-based client for vault provider - querying and posting data
19+
│ └── index.ts
20+
├── components/ # React components
21+
│ └── ui/ # UI components for vault application
22+
│ └── index.ts
23+
├── hooks/ # Custom React hooks for vault operations
24+
│ └── index.ts
25+
├── services/ # Business logic layer orchestrating clients and transactions
26+
│ └── index.ts
27+
├── state/ # State management for vault application data
28+
│ └── index.ts
29+
├── storage/ # Local storage utilities for persisting intermediate state (e.g., pending transactions, user preferences)
30+
│ └── index.ts
31+
├── transactions/ # Transaction construction logic for BTC and ETH
32+
│ ├── index.ts
33+
│ ├── btc/ # BTC transaction construction for pegIn, claim, and payout operations
34+
│ │ └── index.ts
35+
│ └── eth/ # ETH transaction construction for smart contract interactions
36+
│ └── index.ts
37+
├── types/ # TypeScript type definitions for vault, morpho, and transaction data
38+
│ └── index.ts
39+
└── utils/ # Utility functions for formatting, validation, and helpers
40+
└── index.ts
41+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// ETH smart contract client for querying data and constructing transactions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// GraphQL client for fetching market, position, and LLTV information from Morpho
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// API client for fetching vault list by ETH address from vault-api service
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// RPC-based client for vault provider - querying and posting data
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// UI components for vault application

routes/vault/src/hooks/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Custom React hooks for vault operations

routes/vault/src/services/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Business logic layer orchestrating clients and transactions

routes/vault/src/state/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// State management for vault application data

routes/vault/src/storage/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Local storage utilities for persisting intermediate state (e.g., pending transactions, user preferences)

0 commit comments

Comments
 (0)