Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Nowak-Liebiediew committed Jan 18, 2024
1 parent 0369c9d commit 8dedfda
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 54 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# UNRELEASED

### refactor!: move command `dfx wallet redeem-faucet-coupon` to `dfx cycles redeem-faucet-coupon`

### feat: dfx deps: wasm_hash_url and loose the hash check

Providers can provide the hash through `wasm_hash_url` instead of hard coding the hash directly.
Expand Down
54 changes: 54 additions & 0 deletions docs/cli-reference/dfx-cycles.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The following subcommands are available:
|---------------------------------------|--------------------------------------------------------------------------------------|
| [`balance`](#dfx-cycles-balance) | Prints the account balance of the user. |
| [`transfer`](#dfx-cycles-transfer) | Send cycles to another account. |
|[`redeem-faucet-coupon`](#redeem-faucet-coupon) | Redeem a code at the cycles faucet. |
| `help` | Displays usage information message for a specified subcommand. |

To view usage information for a specific subcommand, specify the subcommand and the `--help` flag. For example, to see usage information for `dfx cycles balance`, you can run the following command:
Expand Down Expand Up @@ -148,3 +149,56 @@ Send cycles to a canister by principal:
``` bash
dfx cycles top-up bkyz2-fmaaa-aaaaa-qaaaq-cai 1000000000 --network ic
```

## dfx wallet redeem-faucet-coupon

Use the `dfx wallet redeem-faucet-coupon` command to redeem a cycles faucet coupon.
If you have no wallet set, this will create a wallet for you.
If you have a wallet set already, this will add the coupon's cycles to your existing wallet.

### Basic usage
```
dfx wallet redeem-faucet-coupon <your faucet coupon>
```

### Arguments

Use the following necessary argument with the `dfx wallet redeem-faucet-coupon` command.


|Argument |Description
----------|--------------
|`<your faucet coupon>` | The coupon code to redeem at the faucet.|


### Flags

You can use the following optional flags with the `dfx wallet redeem-faucet-coupon` command.


|Flag |Description|
|-----|-----------|
|`--faucet`|Alternative faucet address. If not set, this uses the DFINITY faucet.|

### Example

If you have no wallet yet and a coupon code `ABCDE-ABCDE-ABCDE`, you can redeem it like this:
``` bash
dfx wallet redeem-faucet-coupon 'ABCDE-ABCDE-ABCDE'
```

This will print something similar to this:
```
Redeemed coupon ABCDE-ABCDE-ABCDE for a new wallet: rdmx6-jaaaa-aaaaa-aaadq-cai
New wallet set.
```

If you have a wallet already and a coupon code `ABCDE-ABCDE-ABCDE`, you can redeem it like this:
``` bash
dfx wallet redeem-faucet-coupon 'ABCDE-ABCDE-ABCDE'
```

This will print something similar to this:
```
Redeemed coupon code ABCDE-ABCDE-ABCDE for 20.000 TC (trillion cycles).
```
54 changes: 0 additions & 54 deletions docs/cli-reference/dfx-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ For reference information and examples that illustrate using `dfx wallet` comman
|[`deauthorize`](#dfx-wallet-deauthorize) | Deauthorize a cycles wallet custodian using the custodian's principal.
|`help`|Displays a usage message and the help of the given subcommand(s).
|[`name`](#dfx-wallet-name) |Returns the name of the cycles wallet if you've used the `dfx wallet set-name` command.
|[`redeem-faucet-coupon`](#redeem-faucet-coupon) | Redeem a code at the cycles faucet. |
|[`remove-controller`](#dfx-wallet-remove-controller) |Removes a specified controller from the selected identity's cycles wallet.
|[`send`](#dfx-wallet-send) |Sends a specified amount of cycles from the selected identity's cycles wallet to another cycles wallet using the destination wallet canister ID.
|[`set-name`](#dfx-wallet-set-name) |Specify a name for your cycles wallet.
Expand Down Expand Up @@ -316,59 +315,6 @@ If you have named your cycles wallet "Terrances_wallet", then the command would
Terrances_wallet
```

## dfx wallet redeem-faucet-coupon

Use the `dfx wallet redeem-faucet-coupon` command to redeem a cycles faucet coupon.
If you have no wallet set, this will create a wallet for you.
If you have a wallet set already, this will add the coupon's cycles to your existing wallet.

### Basic usage
```
dfx wallet redeem-faucet-coupon <your faucet coupon>
```

### Arguments

Use the following necessary argument with the `dfx wallet redeem-faucet-coupon` command.


|Argument |Description
----------|--------------
|`<your faucet coupon>` | The coupon code to redeem at the faucet.|


### Flags

You can use the following optional flags with the `dfx wallet redeem-faucet-coupon` command.


|Flag |Description|
|-----|-----------|
|`--faucet`|Alternative faucet address. If not set, this uses the DFINITY faucet.|

### Example

If you have no wallet yet and a coupon code `ABCDE-ABCDE-ABCDE`, you can redeem it like this:
``` bash
dfx wallet redeem-faucet-coupon 'ABCDE-ABCDE-ABCDE'
```

This will print something similar to this:
```
Redeemed coupon ABCDE-ABCDE-ABCDE for a new wallet: rdmx6-jaaaa-aaaaa-aaadq-cai
New wallet set.
```

If you have a wallet already and a coupon code `ABCDE-ABCDE-ABCDE`, you can redeem it like this:
``` bash
dfx wallet redeem-faucet-coupon 'ABCDE-ABCDE-ABCDE'
```

This will print something similar to this:
```
Redeemed coupon code ABCDE-ABCDE-ABCDE for 20.000 TC (trillion cycles).
```

## dfx wallet remove-controller

Use the `dfx wallet remove-controller` command to remove a controller of your selected identity's cycles wallet.
Expand Down

0 comments on commit 8dedfda

Please sign in to comment.