diff --git a/CHANGELOG.md b/CHANGELOG.md index e822d103d7..98de267414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/docs/cli-reference/dfx-cycles.md b/docs/cli-reference/dfx-cycles.md index 718d388d9c..105240d5eb 100644 --- a/docs/cli-reference/dfx-cycles.md +++ b/docs/cli-reference/dfx-cycles.md @@ -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: @@ -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 +``` + +### Arguments + +Use the following necessary argument with the `dfx wallet redeem-faucet-coupon` command. + + +|Argument |Description +----------|-------------- +|`` | 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). +``` diff --git a/docs/cli-reference/dfx-wallet.md b/docs/cli-reference/dfx-wallet.md index 413e9d6133..3321368191 100644 --- a/docs/cli-reference/dfx-wallet.md +++ b/docs/cli-reference/dfx-wallet.md @@ -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. @@ -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 -``` - -### Arguments - -Use the following necessary argument with the `dfx wallet redeem-faucet-coupon` command. - - -|Argument |Description -----------|-------------- -|`` | 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.