{"action":"created","issue":{"url":"https://api.github.com/repos/BTCGPU/bitcoinjs-lib/issues/11","repository_url":"https://api.github.com/repos/BTCGPU/bitcoinjs-lib","labels_url":"https://api.github.com/repos/BTCGPU/bitcoinjs-lib/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/BTCGPU/bitcoinjs-lib/issues/11/comments","events_url":"https://api.github.com/repos/BTCGPU/bitcoinjs-lib/issues/11/events","html_url":"https://github.com/BTCGPU/bitcoinjs-lib/issues/11","id":350433901,"node_id":"MDU6SXNzdWUzNTA0MzM5MDE=","number":11,"title":"How to sign transaction","user":{"login":"cenyG","id":14320237,"node_id":"MDQ6VXNlcjE0MzIwMjM3","avatar_url":"https://avatars3.githubusercontent.com/u/14320237?v=4","gravatar_id":"","url":"https://api.github.com/users/cenyG","html_url":"https://github.com/cenyG","followers_url":"https://api.github.com/users/cenyG/followers","following_url":"https://api.github.com/users/cenyG/following{/other_user}","gists_url":"https://api.github.com/users/cenyG/gists{/gist_id}","starred_url":"https://api.github.com/users/cenyG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cenyG/subscriptions","organizations_url":"https://api.github.com/users/cenyG/orgs","repos_url":"https://api.github.com/users/cenyG/repos","events_url":"https://api.github.com/users/cenyG/events{/privacy}","received_events_url":"https://api.github.com/users/cenyG/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-08-14T13:42:13Z","updated_at":"2018-08-16T17:09:54Z","closed_at":null,"author_association":"NONE","body":"Hi, i'm trying to build tx for BTG using TransactionBuilder but have \"16: mandatory-script-verify-flag-failed (Signature hash type missing or not understood)\" , can help me ? Do I need a special way to sign tx? I do:\r\n\r\n```\r\nlet txb = new bgold.TransactionBuilder(network)\r\nlet counter = 0\r\ninputs.forEach((input) => {\r\n    if (!!input.txid) {\r\n        txb.addInput(input.txid, input.vout)\r\n        counter++\r\n    }\r\n})\r\noutputs.forEach((output) => {\r\n    if (!!output.address) txb.addOutput(output.address,  bitcore.Unit.fromBTC(output.amount).toSatoshis())\r\n})\r\nconst privatekey = bgold.ECPair.fromWIF(privkeys[0], network)\r\nfor (let i = 0; i < counter; i++) {\r\n    txb.sign(i, privatekey)\r\n}\r\nreturn txb.build().toHex()\r\n```"},"comment":{"url":"https://api.github.com/repos/BTCGPU/bitcoinjs-lib/issues/comments/413617699","html_url":"https://github.com/BTCGPU/bitcoinjs-lib/issues/11#issuecomment-413617699","issue_url":"https://api.github.com/repos/BTCGPU/bitcoinjs-lib/issues/11","id":413617699,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzYxNzY5OQ==","user":{"login":"h4x3rotab","id":1343470,"node_id":"MDQ6VXNlcjEzNDM0NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1343470?v=4","gravatar_id":"","url":"https://api.github.com/users/h4x3rotab","html_url":"https://github.com/h4x3rotab","followers_url":"https://api.github.com/users/h4x3rotab/followers","following_url":"https://api.github.com/users/h4x3rotab/following{/other_user}","gists_url":"https://api.github.com/users/h4x3rotab/gists{/gist_id}","starred_url":"https://api.github.com/users/h4x3rotab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h4x3rotab/subscriptions","organizations_url":"https://api.github.com/users/h4x3rotab/orgs","repos_url":"https://api.github.com/users/h4x3rotab/repos","events_url":"https://api.github.com/users/h4x3rotab/events{/privacy}","received_events_url":"https://api.github.com/users/h4x3rotab/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T17:09:54Z","updated_at":"2018-08-16T17:09:54Z","author_association":"NONE","body":"BTW, sometimes Coinbin for BTG may be helpful for development:\r\nhttps://h4x3rotab.github.io/coinbin/#settings"}}
{"actor":{"display_login":"h4x3rotab"}}