From 1a0f872b81399cd98c1a86bed2f67e7cf8a279da Mon Sep 17 00:00:00 2001 From: adcpm Date: Wed, 12 Jul 2017 17:05:31 +0700 Subject: [PATCH 1/2] Add multisig example --- examples/multisig.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 examples/multisig.js diff --git a/examples/multisig.js b/examples/multisig.js new file mode 100644 index 00000000..a5dfbdb3 --- /dev/null +++ b/examples/multisig.js @@ -0,0 +1,17 @@ +const steem = require('../lib'); + +const privWif1 = '5K2LA2ucS8b1GuFvVgZK6itKNE6fFMbDMX4GDtNHiczJESLGRd8'; +const privWif2 = '5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg'; + +steem.broadcast.send({ + extensions: [], + operations: [ + ['vote', { + voter: 'sisilafamille', + author: 'siol', + permlink: 'test', + weight: 1000 + }] + ]}, [privWif1, privWif2], (err, result) => { + console.log(err, result); +}); From ed1fdfd2e182ab43914628730b7da0e9dd92c023 Mon Sep 17 00:00:00 2001 From: adcpm Date: Wed, 12 Jul 2017 17:11:25 +0700 Subject: [PATCH 2/2] Update doc --- doc/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/README.md b/doc/README.md index 2cdbfdf3..7409d56b 100644 --- a/doc/README.md +++ b/doc/README.md @@ -844,6 +844,23 @@ steem.broadcast.cancelTransferFromSavings(wif, from, requestId, function(err, re }); ``` +### Multisig +You can use multisignature to broadcast an operation. +``` +steem.broadcast.send({ + extensions: [], + operations: [ + ['vote', { + voter: 'guest123', + author: 'fabien', + permlink: 'test', + weight: 1000 + }] + ]}, [privPostingWif1, privPostingWif2], (err, result) => { + console.log(err, result); +}); +``` + # Auth ### Verify