Skip to content

Commit 9ab0889

Browse files
author
AJ ONeal
committed
feat: full CLI and API for dash message signing and verification
1 parent e70747f commit 9ab0889

File tree

3 files changed

+437
-174
lines changed

3 files changed

+437
-174
lines changed

README.md

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,70 @@
33
Sign and Verify messages with Dash Private Keys
44

55
```bash
6-
git clone https://github.com/dashhive/dashmsg
7-
pushd ./dashmsg/
6+
dashmsg sign \
7+
'XK5DHnAiSj6HQNsNcDkawd9qdp8UFMdYftdVZFuRreTMJtbJhk8i' \
8+
'dte2022-akerdemelidis|estoever|mmason'
89
```
910

1011
```bash
11-
go build -mod=vendor -o dashmsg ./cmd/dashmsg/
12+
dashmsg verify \
13+
'Xn4A2vv5fb7LvmiiXPPMexYbSbiQ29rzDu' \
14+
'dte2022-akerdemelidis|estoever|mmason' \
15+
'H2Opy9NX72iPZRcDVEHrFn2qmVwWMgc+DKILdVxl1yfmcL2qcpu9esw9wcD7RH0/dJHnIISe5j39EYahorWQM7I='
1216
```
1317

14-
```bash
15-
my_privkey='XK5DHnAiSj6HQNsNcDkawd9qdp8UFMdYftdVZFuRreTMJtbJhk8i'
18+
Also useful for and inspecting debugging:
1619

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

19-
./dashmsg sign "${my_privkey}" "${my_msg}"
24+
## Usage
25+
26+
```bash
27+
dashmsg help
2028
```
2129

2230
```txt
23-
IIm+2++GxT4OtTTY4aZK0iKIWh21yxiwomfY76l197qtVB42KVpy53QxS65zq1R9eN2XLcGh2YsedsVtsmrw2OE=
31+
dashmsg v0.9.0 (gxxxxxx) 2022-03-12T01:33:52-0700
32+
33+
Usage
34+
dashmsg <command> [flags] args...
35+
36+
See usage: dashmsg help <command>
37+
38+
Commands:
39+
version
40+
gen [name.wif]
41+
sign <key> <msg>
42+
inspect <key | address | signature>
43+
decode (alias of inspect)
44+
verify <payment address> <msg> <signature>
45+
46+
Examples:
47+
dashmsg gen ./dash.wif
48+
49+
dashmsg sign dash.wif ./msg.txt
50+
dashmsg sign dash.wif 'my message'
51+
dashmsg sign 'Xxxx...ccc' 'my message'
52+
53+
dashmsg inspect --verbose 'Xxxxxxxxxxxxxxxxxxxxxxxxxxxxcccccc'
54+
55+
dashmsg verify Xxxx...ccc 'my message' 'II....signature...'
56+
dashmsg verify ./addr.b58c.txt ./msg.txt ./sig.b64.txt
2457
```
58+
59+
## How to Build
60+
61+
```bash
62+
git clone https://github.com/dashhive/dashmsg
63+
pushd ./dashmsg/
64+
```
65+
66+
```bash
67+
go build -mod=vendor -o dashmsg ./cmd/dashmsg/
68+
```
69+
70+
## Go Library
71+
72+
Documentation at <https://pkg.go.dev/github.com/dashhive/dashmsg>.

0 commit comments

Comments
 (0)