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

feat: algokit task - vanity address #314

Merged
merged 22 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
64 changes: 64 additions & 0 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
- [start](#start)
- [status](#status)
- [stop](#stop)
- [task](#task)
- [vanity-address](#vanity-address)
- [Options](#options-13)
- [-m, --match ](#-m---match-)
- [-o, --output ](#-o---output--1)
- [-a, --alias ](#-a---alias-)
- [-f, --output-file ](#-f---output-file-)
- [Arguments](#arguments-5)
- [KEYWORD](#keyword)

# algokit

Expand Down Expand Up @@ -517,3 +526,58 @@ Stop the AlgoKit LocalNet.
```shell
algokit localnet stop [OPTIONS]
```

## task

Utils for an Algorand project.

```shell
algokit task [OPTIONS] COMMAND [ARGS]...
```

### vanity-address

Generate a vanity Algorand address. Your KEYWORD can only include letters A - Z and numbers 2 - 7.
Keeping your KEYWORD under 5 characters will usually result in faster generation.
Note: The longer the KEYWORD, the longer it may take to generate a matching address.
Please be patient if you choose a long keyword.

```shell
algokit task vanity-address [OPTIONS] KEYWORD
```

### Options


### -m, --match <match>
Location where the keyword will be included. Default is start.


* **Options**

start | anywhere | end



### -o, --output <output>
How the output will be presented.


* **Options**

stdout | alias | file



### -a, --alias <alias>
Alias for the address. Required if output is “alias”.


### -f, --output-file <output_file>
File to dump the output. Required if output is “file”.

### Arguments


### KEYWORD
Required argument
43 changes: 43 additions & 0 deletions docs/features/tasks/vanity_address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# AlgoKit Task Vanity Address

The AlgoKit Vanity Address feature allows you to generate a vanity Algorand address. A vanity address is an address that contains a specific keyword in it. The keyword can only include uppercase letters A-Z and numbers 2-7. The longer the keyword, the longer it may take to generate a matching address.

## Usage

Available commands and possible usage as follows:

```bash
$ ~ algokit task wallet
Usage: algokit task vanity-address [OPTIONS] KEYWORD

Generate a vanity Algorand address. Your KEYWORD can only include letters A - Z and numbers 2 - 7. Keeping your
KEYWORD under 5 characters will usually result in faster generation. Note: The longer the KEYWORD, the longer it may
take to generate a matching address. Please be patient if you choose a long keyword.

Options:
-m, --match [start|anywhere|end] Location where the keyword will be included. Default is start.
-o, --output [stdout|alias|file] How the output will be presented.
-a, --alias TEXT Alias for the address. Required if output is "alias".
-f, --output-file PATH File to dump the output. Required if output is "file".
-h, --help Show this message and exit.
```

## Examples

Generate a vanity address with the keyword "ALGO" at the start of the address with default output to `stdout`:

```bash
$ ~ algokit task vanity-address ALGO
```

Generate a vanity address with the keyword "ALGO" at the start of the address with output to a file:

```bash
$ ~ algokit task vanity-address ALGO -o file -f vanity-address.txt
```

Generate a vanity address with the keyword "ALGO" anywhere in the address with output to a file:

```bash
$ ~ algokit task vanity-address ALGO -m anywhere -o file -f vanity-address.txt
```
Loading