koinos / koinos/koinos-cli

Validation of addresses

Open
#183 2 comments 0 reactions 0 assignees View on GitHub
story
Dominant language
Go
Stars
7
Forks
6
PR merge metrics
No merged PRs in 30d

Description

CLI currently allows non-address values to be passed in as address arguments.

Better validation in the parser should be added, by improving the regex. Additionally, the `IsValidAddress` function from util should be invoked by the parser.

Checksum should be ensured:
https://medium.com/coinmonks/how-to-generate-a-bitcoin-address-step-by-step-9d7fcbf1ad0b

The self keyword should also be allowed. The regex should ensure self is recognized as an address, and validation should not be done on it. Addresses that are "self" should resolve to the currently opened wallet address, if any.

PR #151 adds better validation via regex

Contributor guide

Open the contributing guide

Research direction

Start at the CLI parser and the util IsValidAddress function, then review PR #151 for the existing regex validation. Done means invalid and checksum-failing addresses are rejected, while self is accepted without direct validation and resolves to the currently opened wallet address when available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.