From 038801ecbf9e56c1c1af679e657b47619fde3df8 Mon Sep 17 00:00:00 2001 From: "Ola [AHLNET]" Date: Thu, 23 May 2024 10:42:14 +0200 Subject: [PATCH] Add documentation for new modes and fix in-script help text (#1772) --- docs/Scripts/cntools.md | 10 +++++++--- scripts/cnode-helper-scripts/cntools.sh | 13 ++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/Scripts/cntools.md b/docs/Scripts/cntools.md index 2c7ef29cf..5aa953f3b 100644 --- a/docs/Scripts/cntools.md +++ b/docs/Scripts/cntools.md @@ -26,10 +26,14 @@ See [CNCLI](../Scripts/cncli.md) and [Log Monitor](../Scripts/logmonitor.md) sec Koios CNTools can operate in following modes: -- Advanced - When CNTools is launched with `-a` runtime argument, this launches CNTools exposing a new `Advanced` menu, which allows users to manage (create/mint/burn) new assets. -- Online - When all wallet and pool keys are available on the hot node, use this option. This is the default mode when you start CNTools without parameters. +- Online - The default mode using either a local node or Koios API to query the blockchain. + - Local `-n` - The local node is used to query the blockchain for needed data. This is the default mode when you start CNTools without parameters. + - Light `-l` - Koios query layer is used and removes the need for a local node deployment. This mode is both quicker and lighter on resources but comes with a third party dependency. - Hybrid - When running in online mode, this option can be used in menus to create offline transaction files that can be passed to Offline CNTools to sign. -- Offline - When CNTools is launched with `-o` runtime argument, this launches CNTools with limited set of features. This mode **does not require access to cardano-node**. It is mainly used to create Wallet/Pool and access `Transaction >> Sign` to sign an offline transaction file created in Hybrid mode. +- Offline `-o` - Launches CNTools with a limited set of features. This mode **does not require access to cardano-node or access to an internet connection**. It is mainly used to create Wallet/Pool and access `Transaction >> Sign` to sign an offline transaction file created in Hybrid mode. +- Advanced `-a` - Exposes a new `Advanced` menu, which allows users to manage (create/mint/burn) new assets. + +In addition to above mentioned runtime arguments to launch CNTools in different modes, it can also be persisted by editing User Variables section within `cntools.sh` script. #### Download and Update The update functionality is provided from within CNTools. In case of breaking changes, please follow the prompts post-upgrade. If stuck, it's always best to re-run the latest `guild-deploy.sh` before proceeding. diff --git a/scripts/cnode-helper-scripts/cntools.sh b/scripts/cnode-helper-scripts/cntools.sh index 77b121aaa..4fc80119f 100755 --- a/scripts/cnode-helper-scripts/cntools.sh +++ b/scripts/cnode-helper-scripts/cntools.sh @@ -333,7 +333,7 @@ function main { println " >> WALLET" println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" println OFF " Wallet Management\n\n ) New - create a new wallet"\ - " ) Import - import a Daedalus/Yoroi 24/25 mnemonic or Ledger/Trezor HW wallet"\ + " ) Import - import a 24/15 mnemonic or Ledger/Trezor HW wallet"\ " ) Register - register a wallet on chain"\ " ) De-Register - De-Register (retire) a registered wallet"\ " ) List - list all available wallets in a compact view"\ @@ -413,7 +413,7 @@ function main { println " >> WALLET >> IMPORT" println DEBUG "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" println OFF " Wallet Import\n"\ - " ) Mnemonic - Daedalus/Yoroi 24 or 25 word mnemonic"\ + " ) Mnemonic - 24 or 15 word mnemonic"\ " ) HW Wallet - Ledger/Trezor hardware wallet"\ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" println DEBUG " Select Wallet Import Operation\n" @@ -542,14 +542,13 @@ function main { println DEBUG "${FG_YELLOW}Using a mnemonic imported wallet in CNTools comes with a few limitations${NC}" echo println DEBUG "Only the first address in the HD wallet is extracted and because of this the following apply:" - println DEBUG " ${FG_LGRAY}>${NC} Address above should match the first address seen in Daedalus/Yoroi, please verify!!!" - println DEBUG " ${FG_LGRAY}>${NC} If restored wallet contain funds since before, send all ADA through Daedalus/Yoroi to address shown in CNTools" - println DEBUG " ${FG_LGRAY}>${NC} Only use receive address shown in CNTools" - println DEBUG " ${FG_LGRAY}>${NC} Only spend ADA from CNTools, if spent through Daedalus/Yoroi balance seen in CNTools wont match" + println DEBUG " ${FG_LGRAY}>${NC} Address above should match the first address seen in the wallet where mnemonic was generated, please verify!!!" + println DEBUG " ${FG_LGRAY}>${NC} If restored wallet contain funds since before, and balance doesn't match, send all ADA to address shown in CNTools" + println DEBUG " ${FG_LGRAY}>${NC} Only use receive address shown in CNTools (enable 'Single Address Mode' in wallet if available)" echo println DEBUG "Some of the advantages of using a mnemonic imported wallet instead of CLI are:" println DEBUG " ${FG_LGRAY}>${NC} Wallet can be restored from saved 24 or 15 word mnemonic if keys are lost/deleted" - println DEBUG " ${FG_LGRAY}>${NC} Track rewards in Daedalus/Yoroi" + println DEBUG " ${FG_LGRAY}>${NC} Wallet can be shared and used in multiple wallets, including CNTools" echo println DEBUG "Please read more about HD wallets at:" println DEBUG "https://cardano-community.github.io/support-faq/wallets?id=heirarchical-deterministic-hd-wallets"