Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mnbudgetvoteraw #621

Merged
merged 1 commit into from
Sep 23, 2015
Merged

add mnbudgetvoteraw #621

merged 1 commit into from
Sep 23, 2015

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Sep 23, 2015

Should allow to sign vote externally and submit it later

External signing part (using js as an example):

// https://github.com/UdjinM6/bitcoinjs-lib-dash
// nodejs example, use "browser" instructions to create client-side lib
// https://github.com/UdjinM6/bitcoinjs-lib-dash#browser
var bitcoin = require('bitcoinjs-lib-dash');

var network = bitcoin.networks.dash_testnet;
var keyPair = bitcoin.ECPair.fromWIF('cQqG1NXoYoS7H5uiSXMiuA8VMeF34a3mNLwF5sCZfWQMmYNLWbc2', network);
var message = 'hello, world'; // should be   "<txid>" + "-" + "<txindex>" + "<proposalHash>" + "<vote=1(yes)/2(no)>" + "<utcTime>"

var signature = bitcoin.message.sign(keyPair, message, network).toString('base64');
// HzwMLg8w91XH89/S3DBLA6Y0RmaMDrRsF5ta3ZRFFZ9GKd4QVthDwmq6g58gqrw3Cno/cKeqfkQg5WHkuwP5xjM=

Submitting part:
mnbudgetvoteraw <masternode-tx-hash> <masternode-tx-index> <proposal-hash> <yes|no> <time> <vote-sig>

@UdjinM6 UdjinM6 added this to the 12.1 milestone Sep 23, 2015
@eduffield222
Copy link

Thanks and great work!

eduffield222 pushed a commit that referenced this pull request Sep 23, 2015
@eduffield222 eduffield222 merged commit a0a2b86 into dashpay:v0.12.1.x Sep 23, 2015
@UdjinM6
Copy link
Author

UdjinM6 commented Sep 24, 2015

@schinzelh can you please merge this to 0.12.0.x too?

UdjinM6 added a commit that referenced this pull request Sep 24, 2015
@schinzelh
Copy link

Merged into 0.12.0.x via 3d91fe3

@UdjinM6
Copy link
Author

UdjinM6 commented Sep 24, 2015

yay, that was fast, thanks! 😃

@UdjinM6 UdjinM6 deleted the mnbudgetvoteraw branch March 7, 2016 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants