Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UG and DG issues #279

Merged
merged 13 commits into from
Nov 10, 2024
11 changes: 8 additions & 3 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,14 @@ testers are expected to do more _exploratory_ testing.

2. The app should start and display the main window with a list of sample contacts.

3. Try adding a public address to a user by entering `add 1 c/BTC l/default pa/123456789012345678901234567890`.
3. Try adding a public address to a user by entering
`add 1 c/BTC l/default pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9`.

4. Try retrieving the public address by entering `retrievepa l/default` or `retrievepa l/default c/BTC`.

5. Try editing the public address by entering `editpa 1 c/BTC l/default pa/098765432109876543210987654321`.
5. Try editing the public address by entering `editpa 1 c/BTC l/default pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9`.

6. Try searching for the public address by entering `searchpa pa/098765432109876543210987654321`.
6. Try searching for the public address by entering `searchpa pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9`.

7. Try deleting the public address by entering `deletepa 1 c/BTC` or `deletepa 1 c/BTC l/default`.

Expand Down Expand Up @@ -437,6 +438,10 @@ otherwise)
4. AddressBook deletes the person

~~~~
add to future enhancements
The command 'forgiving' these extraneous inputs (i.e., giving an output same as or similar to if those inputs are not
present) is not incorrect. You can mention in the UG that such inputs will be ignored. AB3 already does a similar thing
for some commands. Any special handling of such inputs can be left as a future enhancement.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to be here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no its supposed to be in UG

Use case ends.

**Extensions**
Expand Down
149 changes: 104 additions & 45 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,23 @@ pageNav: 3

<box type="info" seamless>
DLTbook is a desktop application that helps you manage your contacts and their Distributed Ledger Technology (DLT) public addresses. It combines an easy-to-use interface with powerful command-line features, making it perfect for both beginners and advanced users.



</box>

### Discaimer

<box type="info" seamless>
The names of contacts in DLTbook do not support special symbols and only accepts characters from the English alphabet.
The phone numbers of contacts in DLTbook are only suited for Singapore phone numbers with no support for country code for international numbers. Duplicates allowed
The email field of contacts in DLTbook have no restrictions and can be duplicated across contacts.
This app was created as part of a Minimum Viable Product (MVP) to build excitement among students and users
This assumes that you have throughly read through our userguide and aware of the financial risks involved when using our
app
</box>



<panel header="💡 **New Users Start Here**" type="primary" expanded>

Expand Down Expand Up @@ -71,9 +86,12 @@ If you're not familiar with these terms, don't worry—this section breaks down

**What is Distributed Ledger Technology (DLT)?**

DLT refers to a digital system for recording transactions of assets in multiple places at once.
Unlike traditional databases, DLTs do not have a central administrator, which means blockchain records are
decentralized.
According to [Investopedia](https://www.investopedia.com/terms/d/decentralized-technology-dlt.asp), Distributed Ledger
Technology (DLT) is the technological infrastructure and protocols that allow simultaneous access,
validation, and record updating across a networked database. DLT is the technology blockchains are created from, and the
infrastructure allows users to view any changes and who made them, reduces the need to audit data, ensures data is
reliable, and only provides access to those that need
it.
</box>

<box type="tip" seamless>
Expand All @@ -82,6 +100,7 @@ decentralized.

DLTbook simplifies the task of managing contacts linked with DLT public addresses,
ensuring secure and efficient interaction with distributed networks.

</box>

2. **Key Terms You Should Know**
Expand All @@ -90,21 +109,25 @@ Before diving in, let's clarify some essential terms:

<box type="info" seamless>

- **Blockchain**: A decentralized digital ledger that records transactions across multiple computers.
Acts like a currency, but it's digital and secure.
- **Blockchain/Network**: A decentralized digital ledger that records transactions across multiple computers.
Acts like a currency, but it's digital and secure. (e.g., Bitcoin, Ethereum, Solana).

- **Network**: A network on the blockchain (e.g., Bitcoin, Ethereum, Solana).
- **Software Wallet/Wallet**: A software wallet, also known simply as a wallet, is an application that exists on a
connected device such as a phone or computer. It is always connected to the internet. (
Source: [Ledger](https://www.ledger.com/academy/topics/security/what-is-a-software-wallet))

- **Wallet**: A digital tool used to store, send, and receive cryptocurrencies.
- **Wallet Name**: A label that you use tag to the wallet to identify the wallets purpose
- (for daily transactions, for decentralised fiannce transactions, for long term storage).

- **Wallet Name**: A label that you tag to the wallet.

- **Public Address**: A unique identifier tagged to the wallet to interact with the blockchain (similar to an account
number).
- **Public Address**: A public address is a unique series of cryptographic codes that can be shared with others to
receive messages, coins, or tokens. (similar to an
account
number). (Source: [Ledger](https://www.ledger.com/academy/topics/security/what-is-a-software-wallet))

- **Command Line**: A text-based interface used to run commands on your computer.

- **Java**: The programming language required to run DLTbook.

</box>

3. **Getting Started: Your First Steps**
Expand Down Expand Up @@ -138,6 +161,7 @@ Here’s how you can start using DLTbook:

- **Note**: If you're using a Mac, you may need to install the Java Development Kit (JDK) instead of the Java Runtime
Environment (JRE)

</box>

2. **Download DLTbook**
Expand Down Expand Up @@ -192,7 +216,7 @@ DLTbook comes with sample data to help you get started. Here are some basic comm
3. **Add a DLT public address**

```
addpa 1 c/BTC l/wallet1 pa/0x28f91d6e72eaf4372892e6c6e45dc41b574163e9fcdf94f4997958b46d772fa2
addpa c/ETH n/Travis w/wallet1 pa/0x0b1c9e1fb5e13c797c7f0134641810e9a7ca14d2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this the wrong format?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apologies again

```


Expand Down Expand Up @@ -239,22 +263,24 @@ capabilities.

DLTbook supports the following commands:

Command | Description
-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------
[**Help**](#viewing-help-help) | Shows a message explaining how to access the help page
[**Add**](#adding-a-person-add) | Adds a person to the address book
[**List**](#listing-all-persons-list) | Shows a list of all persons in the address book
[**Edit**](#editing-a-person-edit) | Edits an existing person in the address book
[**Find**](#locating-persons-by-name-find) | Finds persons whose names contain any of the given keywords
[**Delete**](#deleting-a-person-delete) | Deletes the specified person from the address book
[**Clear**](#clearing-all-entries-clear) | Clears all entries from the address book
[**Exit**](#exiting-the-program-exit) | Exits the program
[**Add Public Address**](#adding-a-public-address-to-a-contact-addpa) | Adds a public address to a person
[**Edit Public Address**](#editing-a-public-address-of-a-contact-editpa) | Edits an existing public address of a person
[**Retrieve Public Address**](#retrieving-public-addresses-of-a-contact-retrievepa) | Retrieves the public addresses of a person
[**Delete Public Address**](#deleting-a-public-address-of-a-contact-deletepa) | Deletes the public address of a person
[**Search Public Address**](#searching-for-a-public-address-publicaddresssearch) | Searches for a public address
[**Filter**](#filtering-persons-by-public-addresses-network-filter) | Filters out a list of persons with the public addresses of the specified network

Command | Description
------------------------------------------------------------------------|---------------------------------------------------------------------------------
[**help**](#viewing-help-help) | Shows a message explaining how to access the help page
[**add**](#adding-a-person-add) | Adds a person to the address book
[**list**](#listing-all-persons-list) | Shows a list of all persons in the address book
[**edit**](#editing-a-person-edit) | Edits an existing person in the address book
[**find**](#locating-persons-by-name-find) | Finds persons whose names contain any of the given keywords
[**delete**](#deleting-a-person-delete) | Deletes the specified person from the address book
[**clear**](#clearing-all-entries-clear) | Clears all entries from the address book
[**exit**](#exiting-the-program-exit) | Exits the program
[**addpa**](#adding-a-public-address-to-a-contact-addpa) | Adds a public address to a contact
[**editpa**](#editing-a-public-address-of-a-contact-editpa) | Edits an existing public address of a contact
[**retrievepa**](#retrieving-public-addresses-of-a-contact-retrievepa) | Retrieves the public addresses of a contact
[**deletepa**](#deleting-a-public-address-of-a-contact-deletepa) | Deletes the public address of a contact
[**searchpa**](#searching-for-a-public-address-publicaddresssearch) | Searches for a public address
[**filter**](#filtering-persons-by-public-addresses-network-filter) | Filters out a list of people with the public addresses of the specified network


<box type="info" seamless>

Expand Down Expand Up @@ -297,10 +323,12 @@ Format: `help`

### Adding a person: `add`

Adds a person to the address book.
Adds a contact to the address book.

Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`

* if the another contact within DLTbook already has the same details as contact of the incoming contact to be added,
the incoming contact will not be added.

<box type="tip" seamless>

Expand Down Expand Up @@ -436,13 +464,16 @@ Format: `addpa INDEX c/NETWORK l/WALLET_NAME pa/PUBLIC_ADDRESS`

Examples:

* `addpa 1 c/ETH l/wallet1 pa/0x28f91d6e72eaf4372892e6c6e45dc41b574163e9fcdf94f4997958b46d772fa2` adds a public address
to the first person on the list `Alex Yeoh` under the ETH network with the wallet name `wallet1` and the public
address `0x28f91d6e72eaf4372892e6c6e45dc41b574163e9fcdf94f4997958b46d772fa2`.

* `addpa 4 c/BTC l/savings_wallet pa/0x71C7656EC7ab88b098defB751B7401B5f6d8976F` adds a public address to the fourth
person on the list `David Li` under the BTC network with the wallet name `savings_wallet` and the public address
`0x71C7656EC7ab88b098defB751B7401B5f6d8976F`.
* `addpa 1 c/ETH l/wallet1 pa/0x0b1c9e1fb5e13c797c7f0134641810e9a7ca14d2
* ` adds a public address

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe adds a public address should be connected with the command, instead of being a new point?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

to the first contact on the list `Alex Yeoh` under the ETH network with the wallet name `wallet1` and the public
address `0x0b1c9e1fb5e13c797c7f0134641810e9a7ca14d2`.

* `addpa 4 c/BTC l/savings_wallet pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9` adds a public address to the fourth
contact on the list `David Li` under the BTC network with the wallet name `savings_wallet` and the public address
`bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9`.


![img.png](img.png)

Expand All @@ -460,6 +491,7 @@ Format: `editpa INDEX c/NETWORK l/WALLET_NAME pa/PUBLIC_ADDRESS`
displayed person list.
The index **must be a positive integer** 1, 2, 3, …​


* The `NETWORK` parameter specifies the ticker name for each network (e.g., `BTC`, `ETH`,
`SOL`, etc.). This field is **case-insensitive** and will be converted to UPPERCASE. <br />
Allowed values: `BTC|ETH|SOL`.
Expand All @@ -474,11 +506,14 @@ Format: `editpa INDEX c/NETWORK l/WALLET_NAME pa/PUBLIC_ADDRESS`

#### Examples

* `editpa 3 c/BTC l/Daily wallet pa/14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gd`<br />
Changes the third person's BTC public address labelled `Daily wallet` to `14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gd`.<br />
* `editpa 3 c/BTC l/Daily wallet pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9`<br />
if the contact at index 3 exists and has a BTC public address labelled as 'Daily wallet'.
Changes the third person's BTC public address labelled `Daily wallet` to `bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9`.<br />

* `editpa 3 c/BTC l/daily wallet pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9`<br />
if the contact at index 3 exists and has a BTC public address 'bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9'.
Changes the third person's BTC public address labelled "Daily wallet" to "daily wallet" as `WALLET_NAME` is **case-insensitive**.

* `editpa 3 c/BTC l/daily wallet pa/14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gd`<br />
Changes the third person's BTC public address labelled "Daily wallet" as `WALLET_NAME` is **case-insensitive**.

<br>

Expand Down Expand Up @@ -560,6 +595,17 @@ Searches for a public address.

Format: `searchpa pa/PUBLIC_ADDRESS`


<box type="tip" seamless>

The field PUBLIC_ADDRESS is not cap sensitive.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Standardise to case sensitive? Or doesn't matter

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apologies, I shall use case-insensitive

This command only searches the current list of public addresses displayed (eg if all contacts are displayed
search pa will perform a global search. if a filtered list of contacts are
displayed, search pa will perform a local
search on list of contacts displayed).
</box>


* Searches for a public address based on the `PUBLIC_ADDRESS` provided.

* The `PUBLIC_ADDRESS` parameter specifies the public address to be added.
Expand All @@ -569,8 +615,8 @@ Format: `searchpa pa/PUBLIC_ADDRESS`

Examples:

* `searchpa pa/0x28f91d6e72eaf4372892e6c6e45dc41b574163e9fcdf94f4997958b46d772fa2` searches for a public
address `0x28f91d6e72eaf4372892e6c6e45dc41b574163e9fcdf94f4997958b46d772fa2` and displays the person and wallet to
* `searchpa pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9` searches for a public
address `bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9` and displays the contact and wallet to
which it belongs.

<br>
Expand All @@ -583,6 +629,7 @@ Filters out a list of persons with the public addresses of the specified network

Format: `filter c/NETWORK`


* The `NETWORK` parameter specifies the ticker name for each network (e.g., `BTC`, `ETH`,
`SOL` etc.). This field is **case-insensitive** and will be converted to UPPERCASE. <br />
Allowed values: `BTC|ETH|SOL`.
Expand Down Expand Up @@ -623,6 +670,8 @@ manually.

<br>

--------------------------------------------------------------------------------------------------------------------

### Editing the data file

DLTbook data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are
Expand Down Expand Up @@ -650,6 +699,8 @@ the data of your previous AddressBook home folder.

## Common Errors

--------------------------------------------------------------------------------------------------------------------

## Known issues

1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only
Expand All @@ -662,6 +713,14 @@ the data of your previous AddressBook home folder.

--------------------------------------------------------------------------------------------------------------------

## Future Enhancements

Most commands currently do not forgive extraneous inputs for commands that do not require them.
Such inputs will be ignored. But the error message displayed for this error for commands are different and may not
exactly describe this error. This shall be fixed in the future.

--------------------------------------------------------------------------------------------------------------------

## Command summary

| Action | Format, Examples |
Expand All @@ -674,9 +733,9 @@ the data of your previous AddressBook home folder.
| **List** | `list` |
| **Help** | `help` |
| **Exit** | `exit` |
| **Add Public Address** | `addpa INDEX c/NETWORK l/WALLET_NAME pa/PUBLIC_ADDRESS`<br> e.g., `addpa 1 c/ETH l/wallet1 pa/0x28f91d6e72eaf4372892e6c6e45dc41b574163e9fcdf94f4997958b46d772fa2` |
| **Edit Public Address** | `editpa INDEX c/NETWORK l/WALLET_NAME pa/NEW_ADDRESS`<br> e.g., `editpa 3 c/BTC l/Daily wallet pa/14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gd` |
| **Add Public Address** | `addpa c/NETWORK n/NAME w/WALLET_NAME pa/PUBLIC_ADDRESS`<br> e.g., `addpa c/ETH n/Travis w/wallet1 pa/0x0b1c9e1fb5e13c797c7f0134641810e9a7ca14d2` |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong format again?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, fixed

| **Edit Public Address** | `editpa INDEX c/NETWORK l/WALLET_NAME pa/NEW_ADDRESS`<br> e.g., `editpa 3 c/BTC l/Daily wallet pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9` |
| **Retrieve Public Address** | `retrievepa l/WALLET_NAME [c/NETWORK] [n/PERSON_NAME]`<br> e.g., `retrievepa l/wallet1 c/BTC n/John` |
| **Delete Public Address** | `deletepa c/NETWORK [l/WALLET_NAME]`<br> e.g., `deletepa 1 c/BTC l/wallet1` |
| **Public Address Search** | `searchpa pa/PUBLIC_ADDRESS`<br> e.g., `searchpa pa/0x28f91d6e72eaf4372892e6c6e45dc41b574163e9fcdf94f4997958b46d772fa2` |
| **Delete Public Address** | `deletepa c/NETWORK [w/WALLET_NAME]`<br> e.g., `deletepa 1 c/BTC w/wallet1` |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong field

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed this

| **Search Public Address** | `searchpa pa/PUBLIC_ADDRESS`<br> e.g., `searchpa pa/bc1q5y5960gr9vnjlmwfst232z07surun7rey5svu9` |
| **Filter** | `filter c/NETWORK`<br> e.g., `filter c/BTC` |