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

Add instructions on how to use the Ledger Nano with DCL #569

Merged
merged 5 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ lldbout
localnet
MainNet
multiclient
Nano
NotFound
ol
openapi
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ the following instructions from [how-to.md](docs/how-to.md) can be used for ever
- [Pool Upgrade How To Guide](docs/pool-upgrade-how-to.md)
- [CometBFT](https://cometbft.com/)
- [Cosmos SDK](https://cosmos.network/sdk)
- [Ledger Nano Support](docs/ledger-nano.md)
2 changes: 1 addition & 1 deletion docs/design/noc-root-cert-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A Vendor with DCL write privilege can submit a transaction to remove a NOC root

## Certificate Schema

To distinguesh NOC root certificates from others, an `isNOC` boolean field will be added to the [certificates](https://github.com/zigbee-alliance/distributed-compliance-ledger/blob/master/proto/zigbeealliance/distributedcomplianceledger/pki/certificate.proto) schema
To distinguesh NOC root certificates from others, an `isNOC` boolean field will be added to the [certificates](https://github.com/zigbee-alliance/distributed-compliance-ledger/blob/master/proto/zigbeealliance/distributedcomplianceledger/pki/certificate.proto) schema.

## Transactions

Expand Down
62 changes: 62 additions & 0 deletions docs/ledger-nano.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Ledger Nano Support

## Prepare Ledger Nano Device to Use with DCL

### Step 1: Install Ledger Live

Download and install Ledger Live: Go to the [Ledger Live download page](https://www.ledger.com/ledger-live) and select the version suitable for your operating system. Follow the on-screen instructions to install it.

<!-- markdown-link-check-disable -->
### Step 2: Set Up Your Ledger Device

Initialize Your Ledger Device: If this is your first time using your Ledger, you will need to configure it. Follow the instructions to choose a PIN and securely write down the mnemonic seed phrase that appears. This seed is crucial for recovery and is compatible with DCL. Detailed instructions are available [here](https://support.ledger.com/hc/en-us/articles/4416927988625-Set-up-your-Ledger-Nano-S-Plus?docs=true).

### Step 3: Install the Cosmos (ATOM) app on your Ledger device

To use the Ledger Nano with DCL, you first need to install the Cosmos (ATOM) application. Connect your Ledger device to your computer, open Ledger Live, and navigate to the 'Manager' tab. Allow the manager on your Ledger device, find the Cosmos (ATOM) app in the catalog, and click 'Install'. For detailed instructions, visit the [Cosmos (ATOM) documentation page](https://support.ledger.com/hc/en-us/articles/360013713840-Cosmos-ATOM?docs=true).
<!-- markdown-link-check-enable -->

## Using Ledger Device with DCL CLI

To use the DCL (dcld) command line interface, it must first be installed on your computer. You can find the installation instructions in the [Quick start guide](https://github.com/zigbee-alliance/distributed-compliance-ledger/blob/50ef77243b49764f474e545cc4be2beee4793ed0/docs/quickStartGuide.adoc#L3).
Copy link
Contributor

Choose a reason for hiding this comment

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

The quick start guide mentions DCL v1.2. I think we need to update the quick start. Probably we should say install the latest version of DCL from https://github.com/zigbee-alliance/distributed-compliance-ledger/releases instead of mentioning the exact version.


### Add your Ledger Key

1. Connect and unlock your Ledger device.
2. Open the Cosmos app on your Ledger.
3. Add a new account in dcld using your Ledger key. Enter the following command:

```bash
dcld keys add <keyName> --ledger
```

4. Approve the addition of the account on your Ledger device within the Cosmos app.
5. Verify the account has been added by using the following command:

```bash
dcld keys show <keyName>
```

### Signing and Sending Transactions

To sign and send transactions using your Ledger Nano device, follow these steps:

1. Ensure your Ledger device is unlocked and that the Cosmos app is open.
2. Initiate the transaction using the DCL CLI. Replace <transaction_command> with the specific command for your transaction:

```bash
dcld <transaction_command> --from <keyName> --ledger
```

3. Review and confirm the transaction details on your Ledger device. Carefully inspect each aspect of the transaction JSON displayed on the screen.

## Using DCL with a Web Browser

This section explains how to use a Ledger device to sign DCL transactions via the web UI using the Keplr wallet.

- Install the Keplr Wallet as a browser extension from the official Keplr website, available for Chrome or other supported browsers.
- Connect your Ledger device to your computer and ensure the Cosmos app is open on the device.
- Click on the Keplr extension icon and select "Connect Hardware Wallet." If you have previously created a wallet in Keplr, you will need to add a new wallet before selecting "Connect Hardware Wallet" again.
- Confirm that your Ledger device is unlocked with the Cosmos app active. Then, follow the on-screen instructions provided by the Keplr pop-up.

Now, you are ready to sign transactions using your Ledger Nano and the Keplr wallet. Each time you initiate a transaction, you will need to confirm it on your Ledger device following prompts from the Keplr interface.
6 changes: 3 additions & 3 deletions docs/quickStartGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Please refer to https://github.com/zigbee-alliance/distributed-compliance-ledger
=== DCL CLI setup
These steps will configure `dcld` on Ubuntu platform.

==== GOLANG 1.3+
Make sure you have goLang 1.3+ installed.
==== GOLANG 1.20+
Make sure you have goLang 1.20+ installed.
Ubuntu
https://khongwooilee.medium.com/how-to-update-the-go-version-6065f5c8c3ec
MacOS
https://www.jajaldoang.com/post/how-to-update-golang

==== Download Pre Compiled `dcld`
A pre-built version of DCL for Ubuntu: https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/download/v0.12.0/dcld, so no need to clone the repo and run make at all.
A pre-built version of DCL for Ubuntu can be found at: https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/download/{latest}/dcld, so no need to clone the repository and run 'make' command at all. Ensure to replace {latest} with the latest version of dcld.

==== Download DCL Source Code from repo
.DCL CLI Build
Expand Down
Loading