Before a change:
- function returns only one result "true", it does not matter to pass one or four key;
- need pass object in which array in array (double array).
Example:
var username = 'epexa';
var password = 'P5...'; // master password
// object in which the key type public key (active, memo, owner, posting), and the value of the array in the array itself is the public key
var auths = {
posting: [['STM6...']],
};
steem.auth.verify(username, password, auths);
retrun:
true
After the changes:
- if pass more than one key, function will return an object;
- in object no need pass array in array, can just string.
Example:
var username = 'epexa';
var password = 'P5...'; // master password
var auths = {
posting: 'STM6...',
memo: ['STM6...]',
active: [['STM6...']],
};
steem.auth.verify(username, password, auths);
return:
{ posting: true, memo: true, active: true }
But the edits are compatible, can still pass in object array in array!
Posted on Utopian.io - Rewarding Open Source Contributors