forked from mux-labs/mux-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.md.backup
More file actions
107 lines (69 loc) · 2.57 KB
/
Copy pathREADME.md.backup
File metadata and controls
107 lines (69 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Mux Backend
Backend infrastructure for **Mux Protocol** — powering invisible wallets, payment orchestration, and smart contract interaction on **Stellar (Soroban)**.
Mux Backend abstracts blockchain complexity behind a secure, Web2-friendly API, enabling users to interact with crypto without managing keys, gas, or wallets directly.
---
## Overview
Mux Backend is the trusted coordination layer between:
* Web2 authentication providers (Clerk / Better Auth)
* Stellar accounts and Soroban smart contracts
* Frontend clients and SDKs
It handles wallet creation, transaction orchestration, fee sponsorship, and on-chain/off-chain state reconciliation.
---
## Core Responsibilities
* Invisible wallet creation and management
* Secure custody and encryption of Stellar keypairs
* Transaction relaying and fee sponsorship
* Soroban smart contract invocation
* Spending limit and policy enforcement
* Indexing and caching on-chain data
* Serving APIs to frontend applications
---
## Key Features
### 🔐 Invisible Wallets
* Automatic Stellar account creation on user signup
* No seed phrases or wallet prompts
* Keys encrypted and stored securely server-side
### 🔁 Transaction Orchestration
* Backend-signed and sponsored transactions
* Internal user-to-user transfers
* Support for batching and relaying
### 🧠 Account Abstraction Layer
* User identity mapped to blockchain accounts
* Programmable spending limits
* Recovery and key rotation flows
### 📦 Smart Contract Integration
* Soroban contract interaction
* Wallet registry and policy enforcement contracts
* Future support for smart wallet accounts
### 📊 Indexing & Caching
* Track balances and transactions
* Human-readable transaction history
* Cached reads for fast UX
---
## Security Model (MVP)
* Private keys are never exposed to clients
* Keys are encrypted at rest
* All blockchain transactions are signed server-side
* Fees are sponsored by the platform
* Auth provider is the source of truth for identity
> ⚠️ This MVP uses a custodial model. Progressive decentralization is planned.
---
## Design Principles
* **Crypto is infrastructure, not UX**
* **Auth-first, wallet-second**
* **Correctness > flexibility**
* **Explicit over magical abstractions**
* **Upgrade paths over rewrites**
---
## Roadmap
* Smart contract wallet accounts (Soroban)
* Session keys and spending limits
* Wallet recovery flows
* Fiat on/off-ramps via Stellar anchors
* Optional self-custody export for advanced users
---
## License
MIT
---
## Contributing
Contributions are welcome. Please open an issue before submitting large changes.