This repository was archived by the owner on Aug 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
This repository was archived by the owner on Aug 1, 2023. It is now read-only.
Invalid command arguments: Schema #45
Copy link
Copy link
Open
Description
Schema validations messages are leaked to cli output. For some commands it outputs pretty long and unnecessary output.
Step to reproduce
- Run npm install -g https://github.com/blockstack/cli-blockstack#feature/stacks-2.0-tx
- blockstack-cli make_keychain -t
- 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.
Metadata
Metadata
Assignees
Labels
No labels