@elytro/cli 0.2.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +89 -0
  2. package/dist/index.js +730 -576
  3. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # Elytro CLI
2
+
3
+ A command-line interface for ERC-4337 smart account wallets. Built for power users and AI Agents managing smart accounts across multiple chains.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Initialize wallet (creates vault + EOA)
9
+ bun dev init
10
+
11
+ # Create a smart account on Sepolia
12
+ bun dev account create --chain 11155420 --email user@example.com --daily-limit 100
13
+
14
+ # Send a transaction
15
+ bun dev tx send --tx "to:0xRecipient,value:0.1"
16
+
17
+ # Check balance
18
+ bun dev query balance
19
+ ```
20
+
21
+ ## Key Features
22
+
23
+ - **Multi-account management** — Create multiple smart accounts per chain with user-friendly aliases
24
+ - **Zero-interaction security** — macOS: vault key stored in Keychain; non-macOS: injected via `ELYTRO_VAULT_SECRET`
25
+ - **Flexible transaction building** — Single transfers, batch operations, contract calls via unified `--tx` syntax
26
+ - **Transaction simulation** — Preview gas, paymaster sponsorship, and balance impact before sending
27
+ - **Cross-chain support** — Manage accounts across Sepolia, OP Sepolia, Arbitrum, and custom networks
28
+ - **Security intents** — Declare email/spending limits at account creation; deployed atomically on activation
29
+
30
+ ## Architecture
31
+
32
+ | Component | Purpose |
33
+ | ------------------ | ------------------------------------------------ |
34
+ | **SecretProvider** | Vault key management (Keychain/env var) |
35
+ | **KeyringService** | EOA encryption + decryption (AES-GCM) |
36
+ | **AccountService** | Smart account lifecycle (CREATE2, multi-account) |
37
+ | **SdkService** | @elytro/sdk wrapper (UserOp building) |
38
+ | **FileStore** | Persistent state (`~/.elytro/`) |
39
+
40
+ See [docs/architecture.md](docs/architecture.md) for detailed data flow.
41
+
42
+ ## Security Model
43
+
44
+ - **No plaintext keys on disk** — vault key stored in macOS Keychain or injected at runtime
45
+ - **AES-GCM encryption** — all private keys encrypted with vault key before storage
46
+ - **Consume-once env var** — `ELYTRO_VAULT_SECRET` deleted from process after load
47
+ - **Memory cleanup** — all key buffers zeroed after use
48
+
49
+ See [docs/security.md](docs/security.md) for threat model.
50
+
51
+ ## Configuration
52
+
53
+ | Variable | Purpose | Required |
54
+ | --------------------- | ----------------------------- | -------------- |
55
+ | `ELYTRO_VAULT_SECRET` | Base64 vault key (non-macOS) | Yes, non-macOS |
56
+ | `ELYTRO_ALCHEMY_KEY` | Alchemy RPC endpoint | For queries |
57
+ | `ELYTRO_PIMLICO_KEY` | Bundler + paymaster | For tx send |
58
+ | `ELYTRO_ENV` | `development` or `production` | Optional |
59
+
60
+ Persist API keys: `bun dev config set alchemy-key <key>`
61
+
62
+ ## Commands
63
+
64
+ ```bash
65
+ # Account Management
66
+ bun dev account create --chain 11155420 [--alias name] [--email addr] [--daily-limit amount]
67
+ bun dev account list [alias|address]
68
+ bun dev account info [alias|address]
69
+ bun dev account switch [alias|address]
70
+ bun dev account activate [alias|address] # Deploy to chain
71
+
72
+ # Transactions
73
+ bun dev tx send --tx "to:0xAddr,value:0.1" [--tx ...]
74
+ bun dev tx build --tx "to:0xAddr,data:0xab..."
75
+ bun dev tx simulate --tx "to:0xAddr,value:0.1"
76
+
77
+ # Queries
78
+ bun dev query balance [account] [--token erc20Addr]
79
+ bun dev query tokens [account]
80
+ bun dev query tx <hash>
81
+ bun dev query chain
82
+ bun dev query address <address>
83
+ ```
84
+
85
+ ## Development
86
+
87
+ ```bash
88
+
89
+ ```