{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/828","repository_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib","labels_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/828/labels{/name}","comments_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/828/comments","events_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/828/events","html_url":"https://github.com/bitcoinjs/bitcoinjs-lib/issues/828","id":246146200,"number":828,"title":"Create a Transaction","user":{"login":"Thinkdiff","id":7890134,"avatar_url":"https://avatars1.githubusercontent.com/u/7890134?v=4","gravatar_id":"","url":"https://api.github.com/users/Thinkdiff","html_url":"https://github.com/Thinkdiff","followers_url":"https://api.github.com/users/Thinkdiff/followers","following_url":"https://api.github.com/users/Thinkdiff/following{/other_user}","gists_url":"https://api.github.com/users/Thinkdiff/gists{/gist_id}","starred_url":"https://api.github.com/users/Thinkdiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thinkdiff/subscriptions","organizations_url":"https://api.github.com/users/Thinkdiff/orgs","repos_url":"https://api.github.com/users/Thinkdiff/repos","events_url":"https://api.github.com/users/Thinkdiff/events{/privacy}","received_events_url":"https://api.github.com/users/Thinkdiff/received_events","type":"User","site_admin":false},"labels":[{"id":187759993,"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/labels/how%20to%20/%20question%20/%20docs","name":"how to / question / docs","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-27T19:35:19Z","updated_at":"2017-07-28T06:06:19Z","closed_at":null,"body":"I found this code for creating custom transaction:\r\n`  it('can create a Transaction', function () {\r\n    var keyPair = bitcoin.ECPair.fromWIF('L1uyy5qTuGrVXrmrsvHWHgVzW9kKdrp27wBC7Vs6nZDTF022673Thinkdiff2BRUVwy')\r\n    var tx = new bitcoin.TransactionBuilder()\r\n    tx.addInput('aa94ab02c182214f090e99a0d57021caffd0f195a81c24602b1028b130b63e31', 0)\r\n    tx.addOutput('1Gokm82v6DmtwKEB8AiVhm82hyFSsEvBDK', 15000)\r\n    tx.sign(0, keyPair)\r\n    assert.strictEqual(tx.build().toHex(), '0100000001313eb630b128102b60241ca895f1d0ffca2170d5a0990e094f2182c102ab94aa000000006b483045022100aefbcf847900b01dd3e3debe054d3b6d03d715d50aea8525f5ea3396f168a1fb022013d181d05b15b90111808b22ef4f9ebe701caf2ab48db269691fdf4e9048f4f60121029f50f51d63b345039a290c94bffd3180c99ed659ff6ea6b1242bca47eb93b59fffffffff01983a0000000000001976a914ad618cf4333b3b248f9744e8e81db2964d0ae39788ac00000000')\r\n  })`\r\n\r\nhttps://github.com/bitcoinjs/bitcoinjs-lib/blob/d853806/test/integration/basic.js#L50\r\n\r\nBut I do not know what is \"tx.addInput\" and \"tx.addOutput\" and where you generated these hash addresses:\r\n\r\n- \"L1uyy5qTuGrVXrmrsvHWHgVzW9kKdrp27wBC7Vs6nZDTF022673Thinkdiff2BRUVwy\r\n\r\n- aa94ab02c182214f090e99a0d57021caffd0f195a81c24602b1028b130b63e31\r\n\r\n- 1Gokm82v6DmtwKEB8AiVhm82hyFSsEvBDK\r\n\r\nCould you please express it for me?"},"comment":{"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/comments/318568550","html_url":"https://github.com/bitcoinjs/bitcoinjs-lib/issues/828#issuecomment-318568550","issue_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/828","id":318568550,"user":{"login":"Thinkdiff","id":7890134,"avatar_url":"https://avatars1.githubusercontent.com/u/7890134?v=4","gravatar_id":"","url":"https://api.github.com/users/Thinkdiff","html_url":"https://github.com/Thinkdiff","followers_url":"https://api.github.com/users/Thinkdiff/followers","following_url":"https://api.github.com/users/Thinkdiff/following{/other_user}","gists_url":"https://api.github.com/users/Thinkdiff/gists{/gist_id}","starred_url":"https://api.github.com/users/Thinkdiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thinkdiff/subscriptions","organizations_url":"https://api.github.com/users/Thinkdiff/orgs","repos_url":"https://api.github.com/users/Thinkdiff/repos","events_url":"https://api.github.com/users/Thinkdiff/events{/privacy}","received_events_url":"https://api.github.com/users/Thinkdiff/received_events","type":"User","site_admin":false},"created_at":"2017-07-28T06:06:19Z","updated_at":"2017-07-28T06:06:19Z","body":"Yes, sure I`m using it for many years.\r\nCome on please you did not explain it perfectly!! for this purpose should I use the block: \"can generate an address from a SHA256 hash\"\r\n\r\nif yes, for the random world is there any limitation? like:\"correct horse battery staple\"\r\n\r\nand what do these mean:\r\n- bitcoin.ECPair.fromWIF\r\n- tx.addInput \r\n- tx.addOutput\r\n- and the numbers in tx object after hash string such as \"0\" and \"15000\" \r\n- build().toHex\r\n\r\nDid you describe these definitions yet? Is there any documentation and example?"}}
{"actor":{"display_login":"Thinkdiff"}}