Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. sendrawtransaction <transaction_hex>
  2.  
  3. npm install bitcoin-core --save
  4.  
  5. const Client = require('bitcoin-core');
  6. const client = new Client({ username: 'adminuser', password : 'adminpassword'});
  7.  
  8. client.getInfo((error, help) => console.log(help));
  9.  
  10. tx_hex = "0200000001949e0e3ac02fef76dffa8e2191ee0041f71a90c5ec9bbcba77db5f57e49fe6dd010000006b483045022100d6ac8520a1cfe80f6f3c2fbe6c3f903894203715928382e77c3c7ad0de74112502203c14601e5195dde88c9cc16c45dc273af168bd4fd03b6c045f832b7ba0134f8c012102183e719a510ff322fcb0dbfa279ef2500dd87c0b8c6184480846262e1949fbebfeffffff028bec0900000000001976a9141b0c5cb82d59cb2e07e8d5e343167fda48a9d60e88ace2920f00000000001976a9148108670170211830be2c3c557afe6bc2205d27de88ac864a0700"
  11.  
  12. client.sendRawTransaction((tx_hex,response) => console.log(response));
  13.  
  14. client.sendRawTransaction((tx_hex) => console.log());
  15.  
  16. client.sendRawTransaction((tx_hex), function(){console.log()});
  17.  
  18. [root@localhost deploy]# bitcoin-cli sendrawtransaction 0200000001949e0e3ac02fef76dffa8e2191ee0041f71a90c5ec9bbcba77db5f57e49fe6dd010000006b483045022100d6ac8520a1cfe80f6f3c2fbe6c3f903894203715928382e77c3c7ad0de74112502203c14601e5195dde88c9cc16c45dc273af168bd4fd03b6c045f832b7ba0134f8c012102183e719a510ff322fcb0dbfa279ef2500dd87c0b8c6184480846262e1949fbebfeffffff028bec0900000000001976a9141b0c5cb82d59cb2e07e8d5e343167fda48a9d60e88ace2920f00000000001976a9148108670170211830be2c3c557afe6bc2205d27de88ac864a0700
  19. b9ceb300bc4a94dad591d8ecca7e840e7cfafa47c029488424e07666c1e1778b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement