Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sendrawtransaction <transaction_hex>
- npm install bitcoin-core --save
- const Client = require('bitcoin-core');
- const client = new Client({ username: 'adminuser', password : 'adminpassword'});
- client.getInfo((error, help) => console.log(help));
- tx_hex = "0200000001949e0e3ac02fef76dffa8e2191ee0041f71a90c5ec9bbcba77db5f57e49fe6dd010000006b483045022100d6ac8520a1cfe80f6f3c2fbe6c3f903894203715928382e77c3c7ad0de74112502203c14601e5195dde88c9cc16c45dc273af168bd4fd03b6c045f832b7ba0134f8c012102183e719a510ff322fcb0dbfa279ef2500dd87c0b8c6184480846262e1949fbebfeffffff028bec0900000000001976a9141b0c5cb82d59cb2e07e8d5e343167fda48a9d60e88ace2920f00000000001976a9148108670170211830be2c3c557afe6bc2205d27de88ac864a0700"
- client.sendRawTransaction((tx_hex,response) => console.log(response));
- client.sendRawTransaction((tx_hex) => console.log());
- client.sendRawTransaction((tx_hex), function(){console.log()});
- [root@localhost deploy]# bitcoin-cli sendrawtransaction 0200000001949e0e3ac02fef76dffa8e2191ee0041f71a90c5ec9bbcba77db5f57e49fe6dd010000006b483045022100d6ac8520a1cfe80f6f3c2fbe6c3f903894203715928382e77c3c7ad0de74112502203c14601e5195dde88c9cc16c45dc273af168bd4fd03b6c045f832b7ba0134f8c012102183e719a510ff322fcb0dbfa279ef2500dd87c0b8c6184480846262e1949fbebfeffffff028bec0900000000001976a9141b0c5cb82d59cb2e07e8d5e343167fda48a9d60e88ace2920f00000000001976a9148108670170211830be2c3c557afe6bc2205d27de88ac864a0700
- b9ceb300bc4a94dad591d8ecca7e840e7cfafa47c029488424e07666c1e1778b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement