verifyTron.js 375 B

1234567891011121314151617
  1. 'use strict';
  2. const tronWeb = require('./extensions/tronWeb');
  3. let data = process.argv[2]; // sha3
  4. let sign = process.argv[3];
  5. let account = process.argv[4]; // base58
  6. if (!data || !sign || !account) {
  7. console.error('param is not valid.');
  8. return;
  9. }
  10. let flag = false;
  11. try {
  12. flag = tronWeb.tronVerifyMessage(data, sign, account);
  13. } catch (e) {}
  14. console.log(flag);