Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces the initial trezu Rust CLI (nt-cli) for interacting with the Trezu backend and NEAR DAO treasuries, including authentication, treasury introspection, proposal management, and creating/relaying delegate-action based transactions via near-cli-rs.
Changes:
- Add a new
nt-clicrate implementing interactive commands: login/logout/whoami, treasury list/info, assets/activity, members, address book CRUD, proposals list/view/approve/reject, and payment proposal creation (public + confidential intents path). - Add a blocking HTTP API client and JSON types for Trezu backend endpoints.
- Update repo
.gitignoreto ignore Rusttarget/artifacts at the repo root.
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| nt-cli/src/main.rs | CLI entrypoint wiring interactive_clap + tracing verbosity. |
| nt-cli/src/config.rs | Local config persistence + recent-treasury selection helper. |
| nt-cli/src/api.rs | Blocking reqwest API client for Trezu backend endpoints. |
| nt-cli/src/types.rs | Shared request/response and domain types for backend JSON. |
| nt-cli/src/auth/mod.rs | NEP-413 login flow + config token persistence, logout, whoami. |
| nt-cli/src/treasury/mod.rs | Treasury list/info commands and policy display. |
| nt-cli/src/assets/mod.rs | Assets + recent activity commands and formatting helpers. |
| nt-cli/src/requests/mod.rs | Proposal list/view/pending + approve/reject delegate-action flows. |
| nt-cli/src/payments/mod.rs | Payment proposal creation (public transfer + confidential intents path). |
| nt-cli/src/relay.rs | Relay callback that posts signed delegate action to Trezu backend. |
| nt-cli/src/address_book/mod.rs | Address book list/add/remove commands. |
| nt-cli/src/members/mod.rs | Members command (prints roles + members). |
| nt-cli/Cargo.toml | New crate dependencies and features. |
| .gitignore | Ignore target/ at repo root. |
| entry.name, | ||
| entry.address, |
There was a problem hiding this comment.
In this prettytable::row! call, entry.name and entry.address are String fields accessed through &entry. This will attempt to move out of a borrowed value and won’t compile. Pass borrowed values (&entry.name, &entry.address) or clone the strings before building the row.
| entry.name, | |
| entry.address, | |
| &entry.name, | |
| &entry.address, |
| - name: Cache dist | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: cargo-dist-cache | ||
| path: ~/.cargo/bin/dist |
There was a problem hiding this comment.
This file uses actions/upload-artifact@v6 / actions/download-artifact@v7, while other workflows in this repo use @v4. If these major versions aren’t available in your environment, the release pipeline will fail at runtime. Recommend standardizing on the same major versions used elsewhere in the repo unless there’s a specific reason to require newer ones.
There are still a couple of bugs here and there, but it mostly works.
This PR is blocked on near/near-cli-rs#583