{"action":"opened","issue":{"url":"https://api.github.com/repos/EOSIO/eosjs-ecc/issues/28","repository_url":"https://api.github.com/repos/EOSIO/eosjs-ecc","labels_url":"https://api.github.com/repos/EOSIO/eosjs-ecc/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/EOSIO/eosjs-ecc/issues/28/comments","events_url":"https://api.github.com/repos/EOSIO/eosjs-ecc/issues/28/events","html_url":"https://github.com/EOSIO/eosjs-ecc/issues/28","id":339687304,"node_id":"MDU6SXNzdWUzMzk2ODczMDQ=","number":28,"title":"ecc.recover() does not seem to function as expected","user":{"login":"warrick-eosny","id":40346010,"node_id":"MDQ6VXNlcjQwMzQ2MDEw","avatar_url":"https://avatars2.githubusercontent.com/u/40346010?v=4","gravatar_id":"","url":"https://api.github.com/users/warrick-eosny","html_url":"https://github.com/warrick-eosny","followers_url":"https://api.github.com/users/warrick-eosny/followers","following_url":"https://api.github.com/users/warrick-eosny/following{/other_user}","gists_url":"https://api.github.com/users/warrick-eosny/gists{/gist_id}","starred_url":"https://api.github.com/users/warrick-eosny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warrick-eosny/subscriptions","organizations_url":"https://api.github.com/users/warrick-eosny/orgs","repos_url":"https://api.github.com/users/warrick-eosny/repos","events_url":"https://api.github.com/users/warrick-eosny/events{/privacy}","received_events_url":"https://api.github.com/users/warrick-eosny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-10T04:17:23Z","updated_at":"2018-07-10T04:17:23Z","closed_at":null,"author_association":"NONE","body":"The below code signs a string \"123\" and then called recover .. for some reason the key returned does not match the expected key. Please explain or flag as bug. \r\n\r\nThe output of the below looks as follows:\r\n123\r\nSIG_K1_K1K6bCbJ9AqxYgeYLGxqtG4MhiyBodTqGsjEeeGcguBTWpBEg54rywEGkNUYbn9uPF7QtCUo9sD8XKd7By3FbJDd78cY9m\r\nrecovered key: EOS5Q36JqHkTrsBuEufZTFLgKn7YQ582ew6STCFWmwVTuEFEgERec\r\n\r\n```\r\n\tfunction recoverTest() {\r\n\r\n\t\tvar initaPrivate = '5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3';\r\n\t\tvar initaPublic = 'EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV';\r\n\r\n\t\tvar action = document.getElementById('transaction').value;\r\n\t\tconsole.log(action);\r\n\r\n\t\tvar sign = ecc.sign(action, initaPrivate ,'hex').toString();\r\n\t\tconsole.log(sign);\r\n\r\n\t\tvar recover = ecc.recover(sign, action);\r\n\t\tconsole.log(\"recovered key: \"+recover);\r\n\t}\r\n```\r\n"}}
{"actor":{"display_login":"warrick-eosny"}}