From 3d8afea69c345a688cd3ce6394f67352de2debfa Mon Sep 17 00:00:00 2001 From: 1yam Date: Fri, 31 Oct 2025 11:43:42 +0100 Subject: [PATCH 1/2] Feature: docs about ledger integrations --- .../aleph-cli/commands/account.md | 60 +++++++++++++++---- docs/devhub/sdks-and-tools/aleph-cli/index.md | 13 +++- 2 files changed, 60 insertions(+), 13 deletions(-) diff --git a/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md b/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md index ba1efec..786f17c 100644 --- a/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md +++ b/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md @@ -16,18 +16,29 @@ aleph account [OPTIONS] KEY_COMMAND [ARGS]... ### Key Commands -| Command | Description | -|---------|-------------| -| `create` | Create or import a private key | -| `address` | Display your public address(es) | -| `balance` | Check your ALEPH token balance | -| `chain` | Display the currently active chain | -| `path` | Display the directory path where your private keys, config file, and other settings are stored | -| `show` | Display your current configuration | -| `config` | Configure your private key file and active chain | -| `export-private-key` | Display your private key (use with caution) | -| `sign-bytes` | Sign a message using your private key | -| `list` | Display available private keys, along with currenlty active chain and account (from config file) | +| Command | Description | +|----------------------|--------------------------------------------------------------------------------------------------| +| `init` | Create base configuration file | +| `create` | Create or import a private key | +| `address` | Display your public address(es) | +| `balance` | Check your ALEPH token balance | +| `chain` | Display the currently active chain | +| `path` | Display the directory path where your private keys, config file, and other settings are stored | +| `show` | Display your current configuration | +| `config` | Configure your private key file and active chain | +| `export-private-key` | Display your private key (use with caution) | +| `sign-bytes` | Sign a message using your private key | +| `list` | Display available private keys, along with currently active chain and account (from config file) | + + + +## Init Configuration Files + +### Usage + +```bash +aleph account init +``` ## Creating or Importing a Key @@ -62,6 +73,31 @@ aleph account create --private-key YOUR_PRIVATE_KEY # Import from a file aleph account create --private-key-file /path/to/key.txt ``` +## Accounts Config + +### Usage + +```bash +aleph account config [OPTIONS] +``` + +#### Options + +| Options | Argument | Description | +|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------| +| `--private_key_file` | FILE | The private key you want to use (optional for ledger) | +| `--chain` | [ARB, AVAX, BASE, BLAST, BOB, BSC, CSDK, CYBER, DOT, ETH, FRAX, INK, LINEA, LISK, METIS, MODE, NEO, NULS, NULS2, OP, POL, SOL, TEZOS, WLD, ZORA] | Chain of origin of your private key (ensuring correct parsing) | +| `--address` | TEXT | +| `--account-type` | TEXT (external for ledger / internal for private key) | Show this message and exit | + +````shell +# Make cli use Ledger Accounts +aleph account config --account-type external --address ledger_address[0] --chain ETH + +# Make CLI use private key +aleph account config --private-key-file path --chain ETH + +```` ## Checking Your Address and Balance diff --git a/docs/devhub/sdks-and-tools/aleph-cli/index.md b/docs/devhub/sdks-and-tools/aleph-cli/index.md index 7753c2d..ec9440c 100644 --- a/docs/devhub/sdks-and-tools/aleph-cli/index.md +++ b/docs/devhub/sdks-and-tools/aleph-cli/index.md @@ -82,8 +82,9 @@ The Aleph CLI is organized into logical command groups that correspond to differ ### First-time Setup -When using the CLI for the first time, you'll need to create or import a private key: +When using the CLI for the first time: +Using private key : ```bash # Create a new Ethereum private key aleph account create @@ -91,6 +92,15 @@ aleph account create # Import an existing private key aleph account create --private-key YOUR_PRIVATE_KEY ``` +Using Ledger: +```bash +# Init config +aleph account init + +# Configure ledger +aleph account config --account-type external +``` + ### Checking Your Configuration @@ -135,6 +145,7 @@ Explore the detailed documentation for each command group: ## Structure ``` Accounts: +├─ aleph account init ├─ aleph account create ├─ aleph account import ├─ aleph account list From 4704be3d7d251461235bc6bc6dcdcff557d8b32b Mon Sep 17 00:00:00 2001 From: 1yam Date: Tue, 4 Nov 2025 13:36:21 +0100 Subject: [PATCH 2/2] feature: link to udev rules for Ledger devices --- docs/devhub/sdks-and-tools/aleph-cli/index.md | 2 ++ docs/devhub/sdks-and-tools/python-sdk/index.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/devhub/sdks-and-tools/aleph-cli/index.md b/docs/devhub/sdks-and-tools/aleph-cli/index.md index ec9440c..f4f7cd3 100644 --- a/docs/devhub/sdks-and-tools/aleph-cli/index.md +++ b/docs/devhub/sdks-and-tools/aleph-cli/index.md @@ -93,6 +93,8 @@ aleph account create aleph account create --private-key YOUR_PRIVATE_KEY ``` Using Ledger: +Please ensure that udev rules for the devices are set : +https://github.com/LedgerHQ/udev-rules/ ```bash # Init config aleph account init diff --git a/docs/devhub/sdks-and-tools/python-sdk/index.md b/docs/devhub/sdks-and-tools/python-sdk/index.md index 6e7078a..f6929de 100644 --- a/docs/devhub/sdks-and-tools/python-sdk/index.md +++ b/docs/devhub/sdks-and-tools/python-sdk/index.md @@ -90,6 +90,8 @@ avax_account = EVMAccount(private_key=private_key, chain=Chain.AVAX) # With this ``` ### Using Ledger +For ledger use please ensure that udev rules for the devices are set: +https://github.com/LedgerHQ/udev-rules/ ````python from aleph.sdk.wallet.ledger import LedgerAccount from aleph.sdk.wallet.ledger.ethereum import get_fallback_account