Advertisement
Guest User

Untitled

a guest
Jan 8th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. var steem = require('steem');
  2.  
  3. var username = 'jpederson96';
  4. var password = 'master password';
  5.  
  6. var ownerKey = steem.auth.getPrivateKeys(username, password, ['owner']).owner;
  7.  
  8. steem.api.getAccounts([username], function(err, response){
  9.  
  10. if (response) {
  11. var account = response[0];
  12. var activeAuth = account.active;
  13. var postingAuth = account.posting;
  14. var ownerAuth = account.owner;
  15. var memoKey = account.memo_key;
  16.  
  17. postingAuth.account_auths = [];
  18.  
  19. steem.broadcast.accountUpdate(ownerKey, username, ownerAuth, activeAuth,
  20. postingAuth, memoKey, account.json_metadata, function(err, result) {
  21. console.log(err,result);
  22. });
  23. } else {
  24. console.log(err)
  25. }
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement