-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
117 lines (94 loc) · 3.01 KB
/
justfile
File metadata and controls
117 lines (94 loc) · 3.01 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
108
109
110
111
112
113
114
115
116
117
# Sigil - Secure Key Management
# Install `just`: cargo install just
# Usage: just <command>
# Show all available commands
default:
@just --list
# Build release binary
build:
@echo "🔨 Building release binary..."
cargo build --release
@echo "✅ Binary available at: ./target/release/sigil"
# Install to system
install: build
@echo "📦 Installing sigil..."
cargo install --path .
@echo "✅ Installed! Run: sigil --help"
# Run all tests
test:
@echo "🧪 Running all tests..."
cargo test
# Run integration tests
quick-test:
@echo "🧪 Running integration tests..."
./quick_test.sh
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
cargo clean
# Launch TUI
tui: build
@echo "🖥️ Launching Sigil TUI..."
./target/release/sigil tui
# Generate 12-word wallet
generate: build
@echo "🔑 Generating new wallet (12 words)..."
./target/release/sigil generate --words 12
# Generate 24-word wallet
generate-24: build
@echo "🔑 Generating new wallet (24 words)..."
./target/release/sigil generate --words 24
# 🚀 Generate and immediately split into shares (RECOMMENDED)
share THRESHOLD="2" SHARES="3" WORDS="24": build
@echo "🚀 Generating wallet and splitting into shares..."
./generate-and-share.sh {{THRESHOLD}} {{SHARES}} {{WORDS}}
# Generate wallet with encrypted keystore output
generate-keystore FILENAME: build
@echo "🔑 Generating wallet and saving to encrypted keystore..."
./target/release/sigil generate --words 24 --output {{FILENAME}}
# Verify mnemonic phrase
verify MNEMONIC: build
@echo "🔍 Verifying mnemonic..."
./target/release/sigil verify --mnemonic "{{MNEMONIC}}"
# Derive address from mnemonic
derive MNEMONIC PATH="m/44'/60'/0'/0/0": build
@echo "🔍 Deriving address..."
./target/release/sigil derive --mnemonic "{{MNEMONIC}}" --path "{{PATH}}"
# Split key into shares
split KEY THRESHOLD SHARES: build
@echo "🔀 Splitting key..."
./target/release/sigil split --key {{KEY}} --threshold {{THRESHOLD}} --shares {{SHARES}}
# Combine shares to recover key
combine SHARE1 SHARE2 *SHARES: build
@echo "🔗 Combining shares..."
./target/release/sigil combine --shares {{SHARE1}} {{SHARE2}} {{SHARES}}
# Check code formatting
fmt-check:
@echo "🎨 Checking code formatting..."
cargo fmt -- --check
# Format code
fmt:
@echo "🎨 Formatting code..."
cargo fmt
# Run clippy lints
lint:
@echo "📎 Running clippy..."
cargo clippy -- -D warnings
# Run all checks (format, lint, test)
check: fmt-check lint test
@echo "✅ All checks passed!"
# Development workflow - format, lint, test
dev: fmt lint test
@echo "✅ Development checks complete!"
# Watch for changes and re-run tests
watch:
@echo "👀 Watching for changes..."
cargo watch -x test
# Show dependency tree
deps:
@echo "📦 Dependency tree:"
cargo tree
# Audit dependencies for security vulnerabilities
audit:
@echo "🔒 Auditing dependencies..."
cargo audit