Skip to content
Open
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
60 changes: 48 additions & 12 deletions docs/devhub/sdks-and-tools/aleph-cli/commands/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
15 changes: 14 additions & 1 deletion docs/devhub/sdks-and-tools/aleph-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,27 @@ 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

# Import an existing private key
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

# Configure ledger
aleph account config --account-type external
```


### Checking Your Configuration

Expand Down Expand Up @@ -135,6 +147,7 @@ Explore the detailed documentation for each command group:
## Structure
```
Accounts:
├─ aleph account init
├─ aleph account create
├─ aleph account import
├─ aleph account list
Expand Down
2 changes: 2 additions & 0 deletions docs/devhub/sdks-and-tools/python-sdk/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down