EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 463 forks source link

unsatisfied_authorization #322

Closed Simbafa closed 6 years ago

Simbafa commented 6 years ago

NODEOS:1.2.2 EOSJS:16.06

When I call newaccount, authorization failed.

Exception Details: 3090003 unsatisfied_authorization: ............ and provided keys ["EOS5dzn27ZfLi1Mg8usiFFfQ3V2UBHnaQRae73ANL3grUZCiv17WF"]

Is the provided keys "EOS5dzn27ZfLi1Mg8usiFFfQ3V2UBHnaQRae73ANL3grUZCiv17WF" the public key of the private key? Is the provided key calculated from private key?

The correct public key is EOS8Hnp14CPMfxyfSoGF9oN5PN5F9bmq2SDXgGNCQvxFHixYignqp.

Simbafa commented 6 years ago

let eosNode = Eos({ keyProvider: activePrivateKey, httpEndpoint: eosduri, broadcast: true, expireInSeconds: 60, debug: false, sign: true }); let ret = await eosNode.transaction(tr => { tr.newaccount({ creator: creator, name: name, owner: ownerKey, active: activeKey }); });

Simbafa commented 6 years ago

The provided key by each call is different

Simbafa commented 6 years ago

It is caused by wrong chainId. My block chain id is different with the default chainId in eosjs. After setting the chainId, the error disappeared.