@aura-protocol/cli 0.1.3 → 0.3.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.
- package/README.md +84 -53
- package/bin/aura.js +0 -0
- package/dist/commands/confidential.d.ts +1 -1
- package/dist/commands/confidential.js +280 -325
- package/dist/commands/confidential.js.map +1 -1
- package/dist/commands/config.d.ts +1 -1
- package/dist/commands/config.js +26 -8
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dashboard.d.ts +1 -1
- package/dist/commands/dashboard.js +6 -7
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/dwallet.d.ts +1 -1
- package/dist/commands/dwallet.js +52 -41
- package/dist/commands/dwallet.js.map +1 -1
- package/dist/commands/execution.d.ts +1 -1
- package/dist/commands/execution.js +111 -175
- package/dist/commands/execution.js.map +1 -1
- package/dist/commands/features.d.ts +1 -1
- package/dist/commands/features.js +15 -10
- package/dist/commands/features.js.map +1 -1
- package/dist/commands/generated.d.ts +20 -0
- package/dist/commands/generated.js +61 -0
- package/dist/commands/generated.js.map +1 -0
- package/dist/commands/governance.d.ts +1 -1
- package/dist/commands/governance.js +113 -99
- package/dist/commands/governance.js.map +1 -1
- package/dist/commands/helpers.d.ts +5 -2
- package/dist/commands/helpers.js +79 -16
- package/dist/commands/helpers.js.map +1 -1
- package/dist/commands/instruction-exec.d.ts +27 -0
- package/dist/commands/instruction-exec.js +171 -0
- package/dist/commands/instruction-exec.js.map +1 -0
- package/dist/commands/instruction.d.ts +9 -0
- package/dist/commands/instruction.js +81 -0
- package/dist/commands/instruction.js.map +1 -0
- package/dist/commands/pda.d.ts +1 -1
- package/dist/commands/pda.js +15 -7
- package/dist/commands/pda.js.map +1 -1
- package/dist/commands/treasury.d.ts +1 -1
- package/dist/commands/treasury.js +201 -186
- package/dist/commands/treasury.js.map +1 -1
- package/dist/core/config.d.ts +35 -0
- package/dist/core/config.js +97 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/context.d.ts +51 -0
- package/dist/core/context.js +60 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/errors.d.ts +38 -0
- package/dist/core/errors.js +138 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/network.d.ts +18 -0
- package/dist/core/network.js +38 -0
- package/dist/core/network.js.map +1 -0
- package/dist/core/runner.d.ts +45 -0
- package/dist/core/runner.js +219 -0
- package/dist/core/runner.js.map +1 -0
- package/dist/core/security.d.ts +28 -0
- package/dist/core/security.js +83 -0
- package/dist/core/security.js.map +1 -0
- package/dist/core/wallet.d.ts +2 -0
- package/dist/core/wallet.js +21 -0
- package/dist/core/wallet.js.map +1 -0
- package/dist/index.js +56 -13
- package/dist/index.js.map +1 -1
- package/dist/lib/domain.d.ts +16 -0
- package/dist/lib/domain.js +88 -0
- package/dist/lib/domain.js.map +1 -0
- package/dist/lib/ika.d.ts +81 -0
- package/dist/lib/ika.js +192 -0
- package/dist/lib/ika.js.map +1 -0
- package/dist/lib/instructions.d.ts +79 -0
- package/dist/lib/instructions.js +421 -0
- package/dist/lib/instructions.js.map +1 -0
- package/dist/lib/protocol.d.ts +99 -0
- package/dist/lib/protocol.js +327 -0
- package/dist/lib/protocol.js.map +1 -0
- package/dist/lib/treasury-view.d.ts +11 -0
- package/dist/lib/treasury-view.js +126 -0
- package/dist/lib/treasury-view.js.map +1 -0
- package/dist/program-instructions.d.ts +1 -1
- package/dist/ui/dashboard.d.ts +7 -0
- package/dist/ui/dashboard.js +99 -0
- package/dist/ui/dashboard.js.map +1 -0
- package/dist/ui/format.d.ts +9 -0
- package/dist/ui/format.js +92 -0
- package/dist/ui/format.js.map +1 -0
- package/dist/ui/output.d.ts +58 -0
- package/dist/ui/output.js +208 -0
- package/dist/ui/output.js.map +1 -0
- package/dist/ui/theme.d.ts +52 -0
- package/dist/ui/theme.js +110 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/vendor/encrypt/generated/grpc/encrypt_service.d.ts +1 -1
- package/dist/vendor/encrypt/generated/grpc/encrypt_service.js +36 -13
- package/dist/vendor/encrypt/generated/grpc/encrypt_service.js.map +1 -1
- package/dist/vendor/encrypt/grpc.d.ts +2 -2
- package/dist/vendor/encrypt/grpc.js +1 -3
- package/dist/vendor/encrypt/grpc.js.map +1 -1
- package/dist/vendor/ika/bcs-types.js +107 -50
- package/dist/vendor/ika/bcs-types.js.map +1 -1
- package/dist/vendor/ika/generated/grpc/ika_dwallet.d.ts +1 -1
- package/dist/vendor/ika/generated/grpc/ika_dwallet.js +14 -4
- package/dist/vendor/ika/generated/grpc/ika_dwallet.js.map +1 -1
- package/dist/vendor/ika/grpc.d.ts +1 -1
- package/dist/vendor/ika/grpc.js +49 -24
- package/dist/vendor/ika/grpc.js.map +1 -1
- package/package.json +15 -12
- package/dist/ascii.d.ts +0 -1
- package/dist/ascii.js +0 -2
- package/dist/ascii.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# @aura-protocol/cli
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Docs:** https://docs-auraprotocol.vercel.app/docs/cli
|
|
6
|
+
|
|
7
|
+
> [!WARNING]
|
|
8
|
+
> AURA is under active development. Program instructions, account layouts, policy semantics, SDK APIs, and deployment behavior may still change. Do not use this code to secure production funds until a stable release and audit are published.
|
|
6
9
|
|
|
7
10
|
Terminal interface for the AURA autonomous treasury program on Solana.
|
|
8
11
|
|
|
@@ -15,12 +18,16 @@ including automatic FHE ciphertext creation, policy decryption, and dWallet co-s
|
|
|
15
18
|
## Features
|
|
16
19
|
|
|
17
20
|
- Config-driven wallet and RPC resolution via `~/.aura/config.json`
|
|
18
|
-
-
|
|
21
|
+
- Complete coverage of every `aura-core` instruction through generated, IDL-backed
|
|
22
|
+
per-domain commands (`aura <domain> <instruction>`) — always in sync with the program
|
|
23
|
+
- Ergonomic verb commands for the common treasury, dWallet, confidential, execution,
|
|
24
|
+
and governance flows
|
|
25
|
+
- A secure send pipeline on every write: a transaction preview, preflight simulation,
|
|
26
|
+
a mainnet guard, and confirmations for sensitive (authority/governance/closure) actions
|
|
27
|
+
- Interactive prompts when flags are omitted; fully scriptable with flags and `--yes`
|
|
19
28
|
- Auto-encryption of guardrail and transaction amounts via `@encrypt.xyz/pre-alpha-solana-client`
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- `--json` output for piping and scripting
|
|
23
|
-
- `--dry-run` to preview instructions without sending
|
|
29
|
+
- Readable color-blocked output, spinners, and actionable error messages with tips
|
|
30
|
+
- `--json` output for piping and scripting; `--dry-run` to preview without sending
|
|
24
31
|
- PDA derivation for treasury, CPI, dWallet message approval, and policy-control records
|
|
25
32
|
- Full-screen `ink` dashboard for live treasury monitoring
|
|
26
33
|
|
|
@@ -68,6 +75,7 @@ aura config set --wallet ~/.config/solana/id.json
|
|
|
68
75
|
```
|
|
69
76
|
|
|
70
77
|
Config resolution order (highest wins):
|
|
78
|
+
|
|
71
79
|
1. CLI flags (`--rpc-url`, `--wallet`, `--program-id`)
|
|
72
80
|
2. Environment variables (`AURA_RPC_URL`, `AURA_WALLET_PATH`, `AURA_PROGRAM_ID`)
|
|
73
81
|
3. Config file (`~/.aura/config.json`)
|
|
@@ -77,41 +85,44 @@ Config resolution order (highest wins):
|
|
|
77
85
|
|
|
78
86
|
## Commands
|
|
79
87
|
|
|
80
|
-
###
|
|
88
|
+
### Instruction Surface (full coverage)
|
|
81
89
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
Every program instruction is reachable two ways: a generated per-domain command
|
|
91
|
+
(`aura <domain> <instruction>`) and the raw `aura ix` surface (alias of
|
|
92
|
+
`aura instruction`). Both are driven directly by the program IDL, so coverage
|
|
93
|
+
never drifts from the deployed program.
|
|
85
94
|
|
|
86
95
|
```bash
|
|
87
|
-
#
|
|
88
|
-
aura features
|
|
89
|
-
aura features --domain policy
|
|
90
|
-
aura
|
|
91
|
-
|
|
92
|
-
#
|
|
93
|
-
aura
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
--
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
# Discover the surface
|
|
97
|
+
aura features # domains + maturity summary
|
|
98
|
+
aura features --domain policy # filter to one domain
|
|
99
|
+
aura ix list # every instruction grouped by domain
|
|
100
|
+
|
|
101
|
+
# Inspect an instruction's accounts and arguments
|
|
102
|
+
aura ix schema configure_budget_envelope
|
|
103
|
+
aura budget configure-budget-envelope --schema # same, via the generated command
|
|
104
|
+
|
|
105
|
+
# Build a serialized instruction without sending (offline)
|
|
106
|
+
aura ix build configure_budget_envelope --accounts @accounts.json --args @args.json
|
|
107
|
+
|
|
108
|
+
# Send any instruction — through the secure pipeline (preview + simulate + confirm)
|
|
109
|
+
aura policy create-policy-template \
|
|
110
|
+
--account owner='$wallet' \
|
|
111
|
+
--account policy_template=<pda> \
|
|
112
|
+
--arg name=conservative --arg shared=false
|
|
113
|
+
|
|
114
|
+
# Equivalent via the raw surface
|
|
115
|
+
aura ix send transition_agent_state \
|
|
105
116
|
--account treasury=<treasury-pda> \
|
|
106
|
-
--account authority
|
|
107
|
-
--arg newState=active
|
|
108
|
-
--compute-units 600000
|
|
117
|
+
--account authority='$wallet' \
|
|
118
|
+
--arg newState=active
|
|
109
119
|
```
|
|
110
120
|
|
|
111
|
-
|
|
112
|
-
instruction needs
|
|
113
|
-
paths
|
|
114
|
-
|
|
121
|
+
Signer accounts accept the literal `$wallet` (the configured keypair). When an
|
|
122
|
+
instruction needs additional signers, pass one or more `--extra-signer <keypair>`
|
|
123
|
+
paths; the CLI verifies all required signers are present before broadcasting.
|
|
124
|
+
Use `--account key=value` / `--arg key=value` for individual fields, or
|
|
125
|
+
`--accounts @file.json` / `--args @file.json` for whole objects.
|
|
115
126
|
|
|
116
127
|
### Treasury
|
|
117
128
|
|
|
@@ -214,13 +225,14 @@ aura confidential confirm-decryption --agent-id my-agent
|
|
|
214
225
|
### Execution
|
|
215
226
|
|
|
216
227
|
```bash
|
|
217
|
-
# Execute the pending proposal
|
|
218
|
-
#
|
|
219
|
-
# the
|
|
228
|
+
# Execute the pending proposal.
|
|
229
|
+
# Approved proposals submit execute_pending, which requests dWallet co-signing
|
|
230
|
+
# through the message-approval account; the dWallet signature itself is produced
|
|
231
|
+
# by the backend / Ika dWallet network.
|
|
220
232
|
aura execution execute --agent-id my-agent
|
|
221
233
|
|
|
222
234
|
# --wait: waits for the message approval account to be created
|
|
223
|
-
# --wait-signed: waits
|
|
235
|
+
# --wait-signed: waits until the message approval reaches signed status
|
|
224
236
|
aura execution execute --agent-id my-agent --wait
|
|
225
237
|
aura execution execute --agent-id my-agent --wait-signed
|
|
226
238
|
|
|
@@ -317,18 +329,13 @@ aura confidential propose \
|
|
|
317
329
|
--agent-id my-agent --amount 250 --chain ethereum \
|
|
318
330
|
--recipient 0xdeadbeef... --wait
|
|
319
331
|
|
|
320
|
-
# Vector guardrails use the matching vector proposal flow instead:
|
|
321
|
-
aura confidential propose-vector \
|
|
322
|
-
--agent-id my-agent --amount 250 --chain ethereum \
|
|
323
|
-
--recipient 0xdeadbeef... --wait
|
|
324
|
-
|
|
325
332
|
# 6. Request decryption
|
|
326
333
|
aura confidential request-decryption --agent-id my-agent --wait
|
|
327
334
|
|
|
328
335
|
# 7. Confirm decryption (shows approved/denied)
|
|
329
336
|
aura confidential confirm-decryption --agent-id my-agent
|
|
330
337
|
|
|
331
|
-
# 8. Execute (
|
|
338
|
+
# 8. Execute (requests dWallet co-signing via the message-approval account)
|
|
332
339
|
aura execution execute --agent-id my-agent --wait-signed
|
|
333
340
|
|
|
334
341
|
# 9. Finalize
|
|
@@ -337,16 +344,40 @@ aura execution finalize --agent-id my-agent
|
|
|
337
344
|
|
|
338
345
|
---
|
|
339
346
|
|
|
347
|
+
## Safety and security
|
|
348
|
+
|
|
349
|
+
Every command that sends a transaction runs through one pipeline with guard rails:
|
|
350
|
+
|
|
351
|
+
- **Preview** — before anything is sent, the CLI prints exactly what will be
|
|
352
|
+
signed: network, program, fee payer, and each instruction's account/signer counts.
|
|
353
|
+
- **Preflight simulation** — the transaction is simulated and its compute units
|
|
354
|
+
and any program error/logs are surfaced. Skip with `--no-simulate`.
|
|
355
|
+
- **Mainnet guard** — writes against a mainnet RPC require an explicit confirmation.
|
|
356
|
+
- **Sensitive-action confirmation** — authority changes, governance updates, and
|
|
357
|
+
account closures prompt before sending. Bypass non-interactively with `--yes`.
|
|
358
|
+
- **Keypair hygiene** — warns when a keypair file is readable by group/others (POSIX).
|
|
359
|
+
- **`--dry-run`** — build and preview without sending or simulating.
|
|
360
|
+
|
|
361
|
+
Secrets are never printed: keypairs are referenced by public key only.
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
340
365
|
## Global Flags
|
|
341
366
|
|
|
342
367
|
```
|
|
343
|
-
--rpc-url <url>
|
|
344
|
-
--wallet <path>
|
|
345
|
-
--program-id <id>
|
|
346
|
-
--
|
|
347
|
-
--
|
|
348
|
-
--
|
|
349
|
-
--
|
|
368
|
+
--rpc-url <url> Override the RPC endpoint
|
|
369
|
+
--wallet <path> Override the keypair file path
|
|
370
|
+
--program-id <id> Override the program ID
|
|
371
|
+
--cluster <name> Cluster label for display
|
|
372
|
+
--json Output machine-readable JSON (implies --no-color)
|
|
373
|
+
--quiet Suppress non-error terminal output
|
|
374
|
+
--dry-run Build and preview the transaction without sending
|
|
375
|
+
-y, --yes Skip confirmation prompts (non-interactive / CI)
|
|
376
|
+
--no-simulate Skip the preflight simulation before sending
|
|
377
|
+
--no-color Disable colored output
|
|
378
|
+
--compute-units <n> Override the compute-unit limit
|
|
379
|
+
-v, --version Print the CLI version
|
|
380
|
+
--help Show help
|
|
350
381
|
```
|
|
351
382
|
|
|
352
383
|
---
|
|
@@ -358,7 +389,7 @@ AURA_RPC_URL="https://devnet.helius-rpc.com/?api-key=YOUR_KEY"
|
|
|
358
389
|
AURA_DEVNET_RPC_URL="https://devnet.helius-rpc.com/?api-key=YOUR_KEY"
|
|
359
390
|
AURA_WALLET_PATH="/path/to/keypair.json"
|
|
360
391
|
PAYER_KEYPAIR="/path/to/keypair.json"
|
|
361
|
-
AURA_PROGRAM_ID="
|
|
392
|
+
AURA_PROGRAM_ID="auraEgX8ZUK3Xr8X81aRfgyTmoyNdsdfL6XfDN8W1ce"
|
|
362
393
|
AURA_DEFAULT_AGENT_ID="my-agent"
|
|
363
394
|
```
|
|
364
395
|
|
package/bin/aura.js
CHANGED
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Command } from "commander";
|
|
2
2
|
export declare function registerConfidentialCommands(program: Command): void;
|