Skip to content

Commit db55ec5

Browse files
author
Harshdev098
committed
added docs and workflows
1 parent 80013cd commit db55ec5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5644
-3947
lines changed

.github/workflows/lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
eslint:
11+
name: Run ESLint
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Run ESLint
28+
run: npm run lint

.github/workflows/type.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Type Check
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
typecheck:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
cache: npm
18+
- run: npm ci
19+
- run: npm run type-check

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"trailingComma": "es5",
5+
"printWidth": 100,
6+
"tabWidth": 4
7+
}

CONTRIBUTION.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
Welcome to Fediming Web Wallet, a fedimint project which is build to make fedimint accesible via web to the users to custody their bitcoins and transact with them, before contributing to the project
2+
please go through our contribution guidelines and be adhere to the points. If you have any doubts about guidelines or contributing to the project, please open an issue regarding that, we will help for the same.
3+
4+
## Technical Note
5+
6+
This wallet is built using the **[Fedimint Web SDK](https://github.com/fedimint/fedimint-web-sdk)**, which:
7+
8+
- Loads *WebAssembly (WASM)* modules compiled from Fedimint’s Rust code.
9+
- Uses *Web Workers* to execute WASM tasks in the background without blocking the UI.
10+
- Provides RPC calls to interact with the federation, handle e-cash, Lightning payments, and on-chain transactions directly in the browser.
11+
12+
If you want to understand or extend the wallet's core logic, you can explore:
13+
- *Fedimint Web SDK*: Learn how the WASM module is initialized and how the SDK functions are used in the wallet.
14+
- *Fedimint Rust repository*: Understand the backend implementation that powers the federation logic and RPC endpoints.
15+
16+
📚 Helpful links:
17+
- [Fedimint Main Repository](https://github.com/fedimint/fedimint)
18+
- [Fedimint Web SDK Repository](https://github.com/fedimint/fedimint-web-sdk)
19+
20+
Understanding these will help to contribute more effectively, especially when working on features that interact with the federation directly.
21+
22+
## Contributing
23+
24+
- Any low code, UI enhancement, implementing new feature, solving an issue, opening an issue is appreciable
25+
- Before making any changes make sure that your fork is synced and your clone is upto date with the main branch
26+
- You can open issues in issue section regarding a doubt,reporting a bug, setting up the project
27+
- Be polite and interactive with other developers.Don't be offensive.
28+
- Test your code before submitting the PR.
29+
30+
## Opening a Pull Request
31+
32+
- Fork the repository to your account.
33+
- Clone the repository locally
34+
35+
git clone https://github.com/Harshdev098/fedimint-web-wallet.git
36+
37+
- Make sure to work on a different branch if wanted to open multiple PRs.
38+
- Have a run in local and explore the working of wallet
39+
- Make your desired changes for the contribution
40+
- Test the changes and ensure it should not break the functionality
41+
- Check lint and type check before pushing!
42+
43+
```
44+
npm run lint && npm run type-check
45+
```
46+
47+
to fix the linting
48+
49+
```
50+
npm run lint:fix
51+
```
52+
53+
- Commit your changes with an appropriate commit prefix:
54+
- **fix:** A bug fix, workflow change, or similar.
55+
- **feat:** A new feature or enhancement.
56+
- **docs:** Documentation updates, fixes, or typo corrections.
57+
- **chore:** Miscellaneous changes that don’t fit into the above categories.
58+
- Push your changes and open a PR on this repo.
59+
60+
## Creating Issues
61+
62+
When opening an issue, please follow these guidelines to help us understand and resolve it quickly:
63+
64+
- **Use a clear and descriptive title** that accurately summarizes the issue.
65+
- **Provide references** (links, file paths, or relevant code snippets) to help locate the problem.
66+
- **Include screenshots or videos** if the issue is UI-related, so we can visualize it easily.
67+
- When **requesting a new feature**, clearly describe:
68+
- What the feature should do.
69+
- Where and how you expect it to be integrated into the wallet.
70+
- Any related examples or references (if available).

README.md

Lines changed: 107 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,108 @@
1-
# Fedimint Web Wallet
2-
A web wallet using Chaumian Ecash while giving previlige to custody and transact Bitcoin.
1+
# 🌐 Fedimint Web Wallet
32

4-
## Running the application
5-
Within the root folder of the repository run: `npm run dev`
3+
Are you a *privacy-conscious* person who wants to *custody Bitcoin* in a *decentralized* way?
4+
*Fedimint Web Wallet* is a browser-based Bitcoin wallet built on the [Fedimint Web SDK](https://github.com/fedimint/fedimint-web-sdk).
5+
It enables you to *custody* and *transact Bitcoin* using *Chaumian Ecash* in a *federated, **privacy-preserving* way — all *without installing extra software*.
6+
7+
> 🔐 Custody Bitcoin with ease and privacy — you control your funds, your community, your future.
8+
9+
---
10+
11+
## 🏛 About Fedimint
12+
13+
[Fedimint](https://github.com/fedimint/fedimint) is a *modular system* for building federated applications, designed to be:
14+
15+
- *🛡 Trust-minimized* – You control your funds with federation consensus.
16+
- *🚫 Censorship-resistant* – No single point of control.
17+
- *👤 Private* – Transactions can’t be linked back to you.
18+
19+
---
20+
21+
## ✨ Features
22+
23+
- 🔍 *Discover & Join Federations*
24+
Join a federation using an invite code/QR or discover available federations instantly.
25+
26+
- 👁 *Preview Before Joining*
27+
View full federation details, guardian info, and federation health.
28+
29+
- 💸 *Multiple Payment Methods*
30+
- Lightning Network
31+
- On-chain Bitcoin transactions
32+
- Ecash transactions
33+
34+
- 📊 *Comprehensive Federation Insights*
35+
See guardian availability, federation health, and service status.
36+
37+
- 🌐 *Multi-Federation Support*
38+
Join and manage multiple federations at once.
39+
40+
- 📜 *Transaction Management*
41+
View full transaction history, manage invoices (paid & pending), and export transactions.
42+
43+
-*Backup & Recovery*
44+
Securely backup and restore your wallet.
45+
46+
- 🔗 *NIP-47 Integration* (Nostr Wallet Connect)
47+
Connect your client to the wallet via NWC URI to send and receive payments.
48+
49+
- ⚙ Other useful features:
50+
- Auto nostr payments, auto withdrawal to an external address
51+
- Enabling GeoLocation, themes, developer mode according to preferences
52+
- Change the display currency, export transactions, setting a invoice desription
53+
54+
## 🛠 Technical Stack
55+
56+
- ⚡ The project uses Vite + React + Typescript.
57+
- 🏦 [Fedimint-web-sdk](https://github.com/fedimint/fedimint-web-sdk) is used for interacting with the fedimint.
58+
- 🔌 [NDK](https://github.com/nostr-dev-kit/ndk) for NWC integeration
59+
- 📦 Redux is used as the primary state management library and Context API is mainly used for Fedimint sdk and NDK management.
60+
61+
## Structure
62+
63+
```plaintext
64+
fedimint-web-wallet/
65+
├── src
66+
│ ├── assets/
67+
│ ├── Components/
68+
│ ├── context/
69+
│ ├── hooks/
70+
│ ├── pages/
71+
│ ├── redux/
72+
│ ├── services/
73+
│ ├── style/
74+
│ ├── utils/
75+
│ ├── App.tsx
76+
│ ├── Wallet.tsx
77+
```
78+
79+
- **Appp.tsx:** Root application component
80+
- **Wallet.tsx:** Core wallet UI logic
81+
- **Components:** The component folder contains all of the UI components(Activities,AddFederation,Header...)
82+
- **Pages:** The Pages folder contains all the of the pages and tabs of the main wallet(JoinFederation,Ecash,Settings...)
83+
- **Redux:** Redux files manages the fedimint web sdk and NDK initialization and thier working
84+
- WalletManger manages the switching of the federations, loading wallet data, initializing of the wallet and giving wallet instance to their childrens and with some other functionalities
85+
- Nostr context runs in the background without blocking the wallet functionalities or UI renderings like intializing NDK, connecting to relays, setting up subscriptions for the following nostr events(get_info, pay_invoice, make_invoice, get_balance, list_transactions, lookup_invoice, notifications, payment_sent, payment_received)
86+
- **Services:** The services folder contains the helper functions and the main fedimint web sdk rpc methods.
87+
88+
## 🚀 Running the application
89+
90+
- Clone the repository
91+
92+
git clone https://github.com/Harshdev098/fedimint-web-wallet.git
93+
94+
- Install the dependencies
95+
96+
```
97+
npm install
98+
```
99+
100+
- Start the app in development mode
101+
102+
```
103+
npm run dev
104+
```
105+
106+
## 🤝 Contributions
107+
108+
Before contributing to the project please go through our contribution guidelines [Contribution.md](CONTRIBUTION.md)

eslint.config.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import tseslint from 'typescript-eslint';
6+
import prettier from 'eslint-plugin-prettier';
7+
import eslintConfigPrettier from 'eslint-config-prettier';
68

79
export default tseslint.config(
810
{ ignores: ['dist'] },
911
{
10-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
12+
extends: [
13+
js.configs.recommended,
14+
...tseslint.configs.recommended,
15+
eslintConfigPrettier
16+
],
1117
files: ['**/*.{ts,tsx}'],
1218
languageOptions: {
1319
ecmaVersion: 2020,
@@ -16,13 +22,16 @@ export default tseslint.config(
1622
plugins: {
1723
'react-hooks': reactHooks,
1824
'react-refresh': reactRefresh,
25+
prettier
1926
},
2027
rules: {
2128
...reactHooks.configs.recommended.rules,
2229
'react-refresh/only-export-components': [
2330
'warn',
2431
{ allowConstantExport: true },
2532
],
33+
'prettier/prettier': 'error',
34+
'@typescript-eslint/no-explicit-any': 'warn'
2635
},
2736
},
28-
)
37+
);

0 commit comments

Comments
 (0)