Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Invalid command arguments: Schema #45

Open
Trudko opened this issue Apr 24, 2020 · 0 comments
Open

Invalid command arguments: Schema #45

Trudko opened this issue Apr 24, 2020 · 0 comments

Comments

@Trudko
Copy link

Trudko commented Apr 24, 2020

Schema validations messages are leaked to cli output. For some commands it outputs pretty long and unnecessary output.

Step to reproduce

  1. Run npm install -g https://github.com/blockstack/cli-blockstack#feature/stacks-2.0-tx
  2. blockstack-cli make_keychain -t
  3. Run command blockstack-cli get_address using wrong private key

Expected behavior
IMHO either show only default documentation with proper format description or show user friendly output - XYZ Argument Not Valid instead.

Additional info
Example of the output

blockstack-cli get_address SPECVZZAGZ4Q5TE34EMPWTV4A83A1N8MP26QBMBT
**Invalid command arguments: Schema "#/items/0/pattern" failed validation (problem: "should match pattern "^([0-9a-f]{64,66})$|^([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$|^segwit:p2sh:([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$|^nosign:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{1,35}$"", cause: "{"pattern":"^([0-9a-f]{64,66})$|^([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$|^segwit:p2sh:([0-9]+),([0-9a-f]{64,66},)*([0-9a-f]{64,66})$|^nosign:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{1,35}$"}")**

Command: get_address
Usage:
  get_address PRIVATE_KEY 
  get_address --private_key PRIVATE_KEY
              
  Get the address of a private key or multisig private key bundle. Gives the 
  BTC and STACKS addresses 

  Example: 

    $ blockstack-cli get_address f5185b9ca93bdcb5753fded3b097dab8547a8b47d2be578412d0687a9a0184cb01
    {
      "BTC": "1JFhWyVPpZQjbPcXFtpGtTmU22u4fhBVmq",
      "STACKS": "SP2YM3J4KQK09V670TD6ZZ1XYNYCNGCWCVVKSDFWQ"
    }
    $ blockstack-cli get_address 1,f5185b9ca93bdcb5753fded3b097dab8547a8b47d2be578412d0687a9a0184cb01,ff2ff4f4e7f8a1979ffad4fc869def1657fd5d48fc9cf40c1924725ead60942c01
    {
      "BTC": "363pKBhc5ipDws1k5181KFf6RSxhBZ7e3p",
      "STACKS": "SMQWZ30EXVG6XEC1K4QTDP16C1CAWSK1JSWMS0QN"
    }

Use "help" to list all commands.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant