dashmsg
v0.10.2
Published
Sign and Verify messages via Private, Collateral or Voting key
Downloads
1
Readme
dashmsg.js
Sign and Verify messages via Private, Collateral or Voting key
This is the "diet" version for Node.js.
CLI Usage
NOTE: The full version of dashmsg
CLI
(written in Go), is available at https://webinstall.dev/dashmsg.
npm install -g dashmsg
Magic Sign
dashmsg sign <privkey> <msg>
dashmsg sign \
'XDLdq5H32tZ2vRvKuRipg4dZtUtNGuE7Q31d3gDTNpdTDbCLqzXB' \
'dte2022-akerdemelidis|estoever|ctafti'
Signature: IFf+WJzpLv8nPM40tYlWpspCh3NWnyXKmGers3v0PBmdDCylj1KS65Fe4X1AmK0Xx3C1MJ4sKI5rtNuXzsLkJdo=
Magic Verify
dashmsg verify <addr> <msg> <sig>
dashmsg verify \
'XmVctZGpQt68ws9YVD6RAT4yfcZFrLZKDW' \
'dte2022-akerdemelidis|estoever|ctafti' \
'IFf+WJzpLv8nPM40tYlWpspCh3NWnyXKmGers3v0PBmdDCylj1KS65Fe4X1AmK0Xx3C1MJ4sKI5rtNuXzsLkJdo='
Verified: true
API Usage
NOTE: The full version of the
dashmsg
API (written in Go),
is available at https://pkg.go.dev/github.com/dashhive/dashmsg.
let Dashmsg = require("dashmsg");
// addr - base58check payment address
// msg - plain utf-8 text
// sig = base64 signature, beginning with magic "i" byte
let verified = Dashmsg.verify(addr, msg, sig);
// wif - private key encoded as base58check (WIF)
// msg - plain utf-8 text
let signature = Dashmsg.sign(wif, msg);