# New unc CLI interface unc CLI is built for: - **unc dApp developers**, who build smart-contracts, UIs, and tooling on unc. - **Tech-savvy people** automating their routines. - **Validators** unc CLI is using extensions to satisfy all groups of users. - **Core unc CLI** commands should be usefull for all groups of users. - **Extensions** are used by a particular group or several groups of users. - **Core unc CLI** is a single binary, there is no extensions that are installed *by default*. - Each extension is a separate binary that can be installed and executed from **unc CLI**. - **Core unc CLI** extensions system only allows to introduce top-level commands through its design. unc CLI UX principles: - All altering actions should have a confirmation step with an option to skip confirmation with an explicit command line parameter (e.g. `send` at the end of the command) - All direct children commands of a single parent command should be aligned (either represent an action or a resource, but never a mix of those on the same hierarchy level): `contract` -> `state` (resource) and `contract` -> `deploy` (action) are not aligned, so it should be either `contract` -> `get-state` + `contract` -> `deploy` or `contract` -> `state` -> `view` + `contract` -> `code` -> `deploy` - Interactive mode should look like: `command - description`. It will help people to learn the commands. ## Core unc CLI commands ``` account - view-account-summary network <"mainnet"|"testnet"|...> - create-account How do you cover the costs of account creation? - sponsor-by-linkdrop (mainnet) - sponsor-by-... (mainnet) - sponsor-by-wallet (testnet only) - fund-myself - autogenerate-new-keypair - save-to-keychain network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - print-to-terminal network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - use-manually-provided-seed-prase "twelve words goes here" network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - use-manually-provided-public-key "ed25519:..." network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - fund-later (implicit account creation) - import-account (a.k.a "log in" / "sign in") - using-web-wallet network-config <"mainnet"|"testnet"> - using-seed-phrase --hd-path "m/44'/397'/0'" network-config <"mainnet"|"testnet"> - using-private-key network-config <"mainnet"|"testnet"> - delete-account beneficiary network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - list-keys network <"mainnet"|"testnet"|...> - add-key - grant-full-access - autogenerate-new-keypair - save-to-keychain network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - print-to-terminal network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - use-manually-provided-seed-phrase "twelve words goes here" network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - use-manually-provided-public-key "ed25519:..." network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - grant-function-call-access --receiver-account-id --method-names 'comma,separated,list' --allowance '0.25unc' - (use the same follow-up parameters as for `grant-full-access`) - delete-key network <"mainnet"|"testnet"|...> - transaction signature options here (see below) ``` ``` contract - call-function - as-read-only network <"mainnet"|"testnet"|...> - as-transaction --prepaid-gas --attached-deposit network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - deploy use-file - with-init-call --prepaid-gas --attached-deposit - transaction signature options here (see below) - without-init-call - transaction signature options here (see below) - download-wasm to-folder network <"mainnet"|"testnet"|...> ``` ``` tokens - send-unc network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - send-ft network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - send-nft network <"mainnet"|"testnet"|...> - transaction signature options here (see below) - view-unc-balance network <"mainnet"|"testnet"|...> - view-ft-balance network <"mainnet"|"testnet"|...> - view-nft-assets network <"mainnet"|"testnet"|...> ``` ``` transaction - view-status network <"mainnet"|"testnet"|...> - construct-transaction (TODO: keep the current command structure for now) ``` ``` extensions (WIP) - explore - install - list-installed - uninstall ``` ``` config (WIP) - connections - show-selected - select - list - add <> <...> - delete - cli - set - get ``` ``` local-keys (WIP: maybe merge into the `account` command) - add-using - unc-wallet - seed-phrase - ledger - private-key - generate ``` Transaction signature options: * `sign-with-macos-keychain` * `sign-with-keychain` * `sign-with-ledger` * `sign-with-access-key-file ` * `sign-with-seed-phrase --hd-path "m/44'/397'/0'"` * `sign-with-plaintext-private-key "ed25519:..."` ### Top-level `Core unc CLI` flags ```txt --verbose (print all available error info) --json (show answer in json format) --scripting (turn off interactive mode) ``` ## Extensions Extensions design is a work in progress. They are here mostly to show that we haven't forgotten about particular functionality and that this functionality will not be a part of `Core unc CLI`. ### `developer` extension ```txt - dev-deploy-code - inspect-storage key-prefix network <"mainnet"|"testnet"|...> - ... ``` ### `explorer` extension ```txt - get-recent-block-hash - get-transaction-status - get-epoch-status - ... ``` ### `transaction-constructor` extension ```txt - constract-transaction - sign-transaction-with-private-key - combine-unsigned-transaction-with-signature - sign-transaction-with-ledger - send-signed-transaction - deserialize-bytes-from-base64 - ... ``` ### `pledging-for-delegators` extension ```txt - make-new-pledge-proposal - pledge - unpledge - ... ``` ### `validators` extension ```txt - pledge - validators - proposals - ... ``` ### Other extensions - `NFT` - `FT` - `lockup` - `multisig`