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

Multisig example #207

Merged
merged 3 commits into from
Jul 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions examples/multisig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const steem = require('../lib');

const privWif1 = '5K2LA2ucS8b1GuFvVgZK6itKNE6fFMbDMX4GDtNHiczJESLGRd8';
const privWif2 = '5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these real posting WIFs? Maybe you don't want to put them hardcoded here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes they are, it doesn't matter as it's just posting private WIF of disposable accounts, having them hardcoded make easier for dev to test multi-sig.


steem.broadcast.send({
extensions: [],
operations: [
['vote', {
voter: 'sisilafamille',
author: 'siol',
permlink: 'test',
weight: 1000
}]
]}, [privWif1, privWif2], (err, result) => {
console.log(err, result);
});