Wallet Service
Headless, governance-focused wallet service with 2-of-3 MPC threshold signing. Integrates with the Custody Service for key management and supports multi-chain operations across Ethereum, Solana, and Bitcoin.
Service Architecture
| Protocol | Port | Description |
|---|
| REST | 8080 | External API (Axum) |
| gRPC | 50051 | Internal governance APIs |
| Metrics | 9090 | Prometheus metrics |
Authentication
All protected endpoints require:
x-tenant-id: Tenant UUID (required)x-user-id: SHA256 hash of user email (for Platform Auth)x-device-id: Device identifier (optional)x-auth-provider: passkey or custom
REST Endpoints
Health
| Method | Path | Description |
|---|
GET | /health | Basic health check |
GET | /health/detailed | Detailed health with circuit breaker states |
MPC Wallet Operations
| Method | Path | Description |
|---|
GET | /api/wallet/me | Get or create wallet for authenticated user |
GET | /api/wallet/public-key | Get wallet's public key for address derivation |
POST | /api/wallet/sign | Sign transaction using 2-of-3 MPC threshold |
Governance Settings
| Method | Path | Description |
|---|
GET | /api/wallet/settings | Get wallet governance settings |
PUT | /api/wallet/settings | Update wallet governance settings |
Spending Policies
| Method | Path | Description |
|---|
GET | /api/wallet/policies | List all spending policies |
POST | /api/wallet/policies | Create new spending policy |
GET | /api/wallet/policies/:policy_id | Get specific policy |
DELETE | /api/wallet/policies/:policy_id | Delete policy |
Approval Requests
| Method | Path | Description |
|---|
GET | /api/wallet/approvals | List approval requests (with status filter) |
POST | /api/wallet/approvals | Create new approval request |
GET | /api/wallet/approvals/:request_id | Get approval request details |
POST | /api/wallet/approvals/:request_id/approve | Approve pending request |
POST | /api/wallet/approvals/:request_id/reject | Reject pending request |
Address Whitelist
| Method | Path | Description |
|---|
GET | /api/wallet/whitelist | List whitelisted addresses |
POST | /api/wallet/whitelist | Add address to whitelist |
DELETE | /api/wallet/whitelist/:entry_id | Remove address from whitelist |
Key Holders & Signers
| Method | Path | Description |
|---|
GET | /api/wallet/key-holders | List organization's key holders |
GET | /api/wallet/signers | List active signers (2-of-3 MPC info) |
GET | /api/wallet/signers/:signer_id | Get specific signer details |
Biometric Authentication
| Method | Path | Description |
|---|
GET | /api/wallet/biometric/challenge | Get challenge for biometric verification |
POST | /api/wallet/biometric/verify | Verify biometric signature |
WebAuthn Credentials
| Method | Path | Description |
|---|
GET | /api/wallet/webauthn/credentials | List user's WebAuthn credentials |
POST | /api/wallet/webauthn/credentials | Store new WebAuthn credential |
GET | /api/wallet/webauthn/credentials/:id | Get credential details |
DELETE | /api/wallet/webauthn/credentials/:id | Delete WebAuthn credential |
Multi-Chain Support
| Network | Address Format | SDK |
|---|
| Ethereum/EVM | 0x-prefixed (42 chars) | Alloy v1.0 |
| Solana | Base58 encoded | Solana SDK 3.x |
| Bitcoin | Legacy, SegWit, Bech32 | bitcoin v0.32 |
MPC Key Architecture
Wallets use a 2-of-3 threshold MPC scheme with shares distributed across:
| Share | Location | Purpose |
|---|
| TEE Share | Custody Service | Hardware-isolated server share |
| Client Share | Passkey/Device PRF | User-controlled biometric share |
| HSM Share | Cloud HSM | Recovery backup share |
Key Holder Roles
| Role | Permissions |
|---|
owner | Full control, all permissions |
admin | Manage settings, policies, whitelist, key holders |
approver | Approve/reject requests |
signer | Sign transactions |
member | View access only |
Approval Request Status
| Status | Description |
|---|
pending | Awaiting approvals |
approved | Threshold met |
rejected | Request denied |
executed | Transaction complete |
expired | 7-day expiry reached |
Transaction Types
| Type | Description |
|---|
transfer | Standard asset transfer |
bridge | Cross-chain transfer |
contract_call | Smart contract interaction |
Security Features
- Biometric challenge expiry: 5 minutes
- WebAuthn counter verification for replay protection
- ES256 (P-256 ECDSA) signature verification
- Privacy-preserving: email hash only, no PII stored
- Circuit breakers for custody service calls
- Adaptive rate limiting (GCRA algorithm)