Authorize
{
"protocol":"", // protocol name,Use init method, protocol name is 'MYKEY', use initSimple to init, protocol name is 'MYKEYSimple'
"version":"", // Version,1.0
"dapp_key":"", // DAPP_KEY assigned by MYKEY,contact MYKEY team to apply. In simple mode, it is null
"uuID":"", // user id,dapp passed it in init method;In simple mode, it is device id
"sign":"", // eos signature, sign data:timestamp + account + uuID + ref
"ref":"", // ref, mykey
"timestamp":"", // UNIX timestamp, accurate to second
"account":"", // eos account name
"chain": "" // value could be ANY, EOS, ETH,or not pass this param
}// generate unsignedMessage
let unsignedData = timestamp + account + uuID + ref
// publicKey: ReserveKey of MYKEY,can be quired from SmartContract https://github.com/mykeylab/Documentation/blob/master/English/MYKEY%20on%20EOSIO.md#keys-in-table-keydata
ecc.verify(signature, unsignedData, pubkey) === trueLast updated
Was this helpful?