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

Add switch CLI command to change accounts #1043

Merged
merged 4 commits into from
Aug 18, 2023
Merged

Conversation

DaughterOfMars
Copy link

Description of change

This PR adds the Account::switch command to allow changing accounts.

Links to any relevant issues

Closes #487

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

Account "polpot": help
Command line interface wallet application based on the IOTA SDK

Usage: Account: <COMMAND>

Commands:
  addresses               List the account addresses
  balance                 Print the account balance
  burn-native-token       Burn an amount of native token
  burn-nft                Burn an NFT
  claim                   Claim outputs with storage deposit return, expiration or timelock unlock conditions
  claimable-outputs       Print details about claimable outputs - if there are any
  consolidate             Consolidate all basic outputs into one address
  create-alias-output     Create a new alias output
  create-native-token     Create a native token
  destroy-alias           Destroy an alias
  destroy-foundry         Destroy a foundry
  exit                    Exit the CLI wallet
  faucet                  Request funds from the faucet
  mint-native-token       Mint additional native tokens
  mint-nft                Mint an NFT. IOTA NFT Standard - TIP27: <https://github.com/iotaledger/tips/blob/main/tips/TIP-0027/tip-0027.md>
  melt-native-token       Melt an amount of native token
  new-address             Generate a new address
  node-info               Get information about currently set node
  output                  Display an output
  outputs                 List all outputs
  send                    Send an amount
  send-native-token       Send native tokens. This will create an output with an expiration and storage deposit return unlock condition
  send-nft                Send an NFT
  switch                  Switch to a different account
  sync                    Synchronize the account
  transaction             Show the details of a transaction [aliases: tx]
  transactions            List the account transactions [aliases: txs]
  unspent-outputs         List the account unspent outputs
  vote                    Cast votes for an event
  stop-participating      Stop participating to an event
  participation-overview  Get the participation overview of the account
  voting-power            Get the voting power of the account
  increase-voting-power   Increase the voting power of the account
  decrease-voting-power   Decrease the voting power of the account
  voting-output           Get the voting output of the account
  help                    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Account "polpot": switch
error: the following required arguments were not provided:
  <OTHER_ACCOUNT>

Usage: Account: switch <OTHER_ACCOUNT>

For more information, try '--help'.

Account "polpot": switch --help
Switch to a different account

Usage: Account: switch <OTHER_ACCOUNT>

Arguments:
  <OTHER_ACCOUNT>  

Options:
  -h, --help     Print help
  -V, --version  Print version

Account "polpot": switch polpot
Account "polpot": switch hello
wallet error: account "hello" not found

cli/src/command/account.rs Outdated Show resolved Hide resolved
cli/src/command/account.rs Outdated Show resolved Hide resolved
@thibault-martinez thibault-martinez merged commit 60aed54 into 1.1 Aug 18, 2023
23 checks passed
@thibault-martinez thibault-martinez deleted the feat/switch-account branch August 18, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants