Skip to content

Commit

Permalink
feat: full CLI and API for dash message signing and verification
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Mar 12, 2022
1 parent e70747f commit 9ab0889
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 174 deletions.
64 changes: 56 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,70 @@
Sign and Verify messages with Dash Private Keys

```bash
git clone https://github.com/dashhive/dashmsg
pushd ./dashmsg/
dashmsg sign \
'XK5DHnAiSj6HQNsNcDkawd9qdp8UFMdYftdVZFuRreTMJtbJhk8i' \
'dte2022-akerdemelidis|estoever|mmason'
```

```bash
go build -mod=vendor -o dashmsg ./cmd/dashmsg/
dashmsg verify \
'Xn4A2vv5fb7LvmiiXPPMexYbSbiQ29rzDu' \
'dte2022-akerdemelidis|estoever|mmason' \
'H2Opy9NX72iPZRcDVEHrFn2qmVwWMgc+DKILdVxl1yfmcL2qcpu9esw9wcD7RH0/dJHnIISe5j39EYahorWQM7I='
```

```bash
my_privkey='XK5DHnAiSj6HQNsNcDkawd9qdp8UFMdYftdVZFuRreTMJtbJhk8i'
Also useful for and inspecting debugging:

my_msg='dte2022-afrancis|ctafti'
- coin type (network) byte
- payment address of private key
- i (quadrant), r, and s of signature

./dashmsg sign "${my_privkey}" "${my_msg}"
## Usage

```bash
dashmsg help
```

```txt
IIm+2++GxT4OtTTY4aZK0iKIWh21yxiwomfY76l197qtVB42KVpy53QxS65zq1R9eN2XLcGh2YsedsVtsmrw2OE=
dashmsg v0.9.0 (gxxxxxx) 2022-03-12T01:33:52-0700
Usage
dashmsg <command> [flags] args...
See usage: dashmsg help <command>
Commands:
version
gen [name.wif]
sign <key> <msg>
inspect <key | address | signature>
decode (alias of inspect)
verify <payment address> <msg> <signature>
Examples:
dashmsg gen ./dash.wif
dashmsg sign dash.wif ./msg.txt
dashmsg sign dash.wif 'my message'
dashmsg sign 'Xxxx...ccc' 'my message'
dashmsg inspect --verbose 'Xxxxxxxxxxxxxxxxxxxxxxxxxxxxcccccc'
dashmsg verify Xxxx...ccc 'my message' 'II....signature...'
dashmsg verify ./addr.b58c.txt ./msg.txt ./sig.b64.txt
```

## How to Build

```bash
git clone https://github.com/dashhive/dashmsg
pushd ./dashmsg/
```

```bash
go build -mod=vendor -o dashmsg ./cmd/dashmsg/
```

## Go Library

Documentation at <https://pkg.go.dev/github.com/dashhive/dashmsg>.
Loading

0 comments on commit 9ab0889

Please sign in to comment.