Skip to content

Commit babcbf9

Browse files
authored
Merge pull request #11 from holaplex/abdul/airdrop-readme
readme for airdrop subcommand
2 parents e9c51aa + 74b32fb commit babcbf9

File tree

1 file changed

+43
-7
lines changed

1 file changed

+43
-7
lines changed

README.md

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# `hub-cli`
2+
23
A command-line tool for interfacing with Holaplex Hub
34

45
---
@@ -11,8 +12,9 @@ shell scripts or directly from a terminal.
1112
<!-- TODO: add better install instructions here -->
1213

1314
### Prerequisites
15+
1416
To install `hub`, you'll need a Rust toolchain with Cargo, `clang`, and a copy
15-
of the `protoc` Protobuf compiler. Additionally on POSIX systems you'll need
17+
of the `protoc` Protobuf compiler. Additionally on POSIX systems you'll need
1618
`pkg-config`, include files for OpenSSL, and on Linux the include files for
1719
`liburing`.
1820

@@ -43,10 +45,10 @@ $ cargo install --path hub-cli
4345
### <a name="config-file"></a> Config locations
4446

4547
By default, `hub` creates a configuration file named `config.toml` in
46-
a dedicated subdirectory of the current user's configuration directory. All
47-
commands will read or write to this file. However, if the current directory in
48+
a dedicated subdirectory of the current user's configuration directory. All
49+
commands will read or write to this file. However, if the current directory in
4850
which `hub` is run contains a file named `.hub-config.toml`, it will read and
49-
write to that file instead. Additionally, the user can override the current
51+
write to that file instead. Additionally, the user can override the current
5052
config location by passing `-C path/to/my-config.toml` to any `hub` command.
5153

5254
## Usage
@@ -57,7 +59,7 @@ For additional help with the command-line interface, you can always run:
5759
$ hub help
5860
```
5961

60-
This will print info about available commands and global options. For help with
62+
This will print info about available commands and global options. For help with
6163
a specific command, run:
6264

6365
```sh
@@ -87,10 +89,10 @@ $ hub upload drop --drop <DROP_ID> <INPUT_DIR...>
8789
```
8890

8991
The `DROP_ID` parameter accepts the UUID of an open drop created with Hub, and
90-
`INPUT_DIR` takes one or more directories containing JSON metadata files. All
92+
`INPUT_DIR` takes one or more directories containing JSON metadata files. All
9193
assets specified using local paths in metadata files will be first uploaded to
9294
the web using Hub's permaweb upload endpoint, and their permanent URL will be
93-
used in place of a filesystem path. `hub` searches for asset paths relative to
95+
used in place of a filesystem path. `hub` searches for asset paths relative to
9496
the folder containing the JSON file referencing them; if any assets are in
9597
separate folders, each folder can be specified with the `-I` flag:
9698

@@ -104,3 +106,37 @@ $ hub upload drop --drop 00000000-0000-0000-0000-000000000000 \
104106
When include paths are specified, `hub` first searches the current JSON
105107
directory, then searches each include directory in the order they were
106108
specified, stopping as soon as it finds a match.
109+
110+
### `airdrop`
111+
112+
This command airdrops NFTs by minting them from an open drop to specified wallet addresses.
113+
This should be run after the mints are queued for the specified open drop.
114+
115+
```sh
116+
$ hub airdrop --drop <DROP_ID> <WALLETS>
117+
```
118+
119+
The `DROP_ID` parameter accepts the UUID of an open drop created with Hub. The --wallets parameter accepts file containing newline-separated wallet addresses for the airdrop. If a single hyphen - is passed, the utility will read from STDIN.
120+
121+
### Optional Parameters:
122+
123+
- `--concurrency <OPTIONS>`:
124+
125+
- Is used to control the level of concurrency. Default value is **4**
126+
127+
- `--no-compressed`:
128+
129+
- An optional flag to mint uncompressed NFTs only. Default value is **false**
130+
131+
- `--mints-per-wallet <NUMBER>`:
132+
- Defines the number of NFTs to mint to each wallet with a default value of **1** if not specified.
133+
134+
```sh
135+
$ hub upload drop --drop 00000000-0000-0000-0000-000000000000 \
136+
--wallets /path/to/wallets.txt
137+
--concurrency 4 \
138+
--no-compressed \
139+
--mints-per-wallet 2
140+
```
141+
142+
In this example, the airdrop command is invoked with a concurrency level of 4, specifying the open drop UUID 00000000-0000-0000-0000-000000000000, opting not to mint them as compressed NFTs, defining 2 mints per wallet, and providing the path to the file wallets.txt containing the target wallet addresses.

0 commit comments

Comments
 (0)