<p><strong>Learn bitcore-lib npm package:</strong><br></p>

<p>Bitcore library provides a very simple API for creating transactions. 
Let's take a very simple transactions:</p>

<pre><code>var transaction = new Transaction()
    .from(utxos)          // Feed information about what unspent outputs one can use
    .to(address, amount)  // Add an output with the given amount of satoshis
    .change(address)      // Sets up a change address where the rest of the funds will go
    .sign(privkeySet)     // Signs all the inputs it can
</code></pre>

CC BY-SA 4.0
2018-06-30T14:12:33.780Z
Can you please share the URL for the same
Rushabh Madhu
CC BY-SA 4.0
2018-06-30T16:19:51.967Z
https://github.com/ishwarchandratiwari/bitcore-lib
Ishwar Chandra Tiwari
CC BY-SA 4.0
2018-06-30T16:21:44.150Z
this is official link from where you can get more information http://bitcore.io/guide/
Ishwar Chandra Tiwari
CC BY-SA 4.0
2018-06-29T19:27:10.203Z
2018-06-29T19:27:10.203Z
Ishwar Chandra Tiwari
<p>You can use the send-crypto to transfer bitcoin</p>
<p>npm install --save send-crypto</p>
<h1>or</h1>
<p>yarn add send-crypto</p>
<p>const CryptoAccount = require(&quot;send-crypto&quot;);</p>
<p>/* Load account from private key */
const privateKey = process.env.PRIVATE_KEY || CryptoAccount.newPrivateKey();
const account = new CryptoAccount(privateKey);</p>
<p>/* Print address */
console.log(await account.address(&quot;BTC&quot;));
// &gt; &quot;1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa&quot;</p>
<p>/* Print balance */
console.log(await account.getBalance(&quot;BTC&quot;));
// &gt; 0.01</p>
<p>/* Send 0.01 BTC */
const txHash = await account
.send(&quot;1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa&quot;, 0.01, &quot;BTC&quot;)
.on(&quot;transactionHash&quot;, console.log)
// &gt; &quot;3387418aaddb4927209c5032f515aa442a6587d6e54677f08a03b8fa7789e688&quot;
.on(&quot;confirmation&quot;, console.log);
// &gt; 1
// &gt; 2 ...</p>
<p>And also you can check the reference link <a href="https://www.npmjs.com/package/send-crypto" rel="nofollow noreferrer">https://www.npmjs.com/package/send-crypto</a></p>

CC BY-SA 4.0
2022-08-18T08:28:58.257Z
2022-08-18T08:28:58.257Z
Jake Hiram
<p>which api i can use to tranfer BTC from one address to another. I have knowledge about bitcoin-transaction api but it does not allow to setup fees. We have try this api but it cost too much high for micro transactions.</p>

<p>If there is any option to setup fees i would prefer it because it not complex compared to others.</p>

CC BY-SA 4.0
2018-06-29T16:32:55.123Z
Bitcoinjs-lib allows fairly granular control over fees and transaction parts in general.
Raghav Sood
<transactions><transaction-fees><node.js>
How to send Bitcoin from one addresss to another using nodejs
Rushabh Madhu
# How to send Bitcoin from one addresss to another using nodejs

(Asked by: username_0 on 2018-06-29)

which api i can use to tranfer BTC from one address to another. I have knowledge about bitcoin-transaction api but it does not allow to setup fees. We have try this api but it cost too much high for micro transactions.

If there is any option to setup fees i would prefer it because it not complex compared to others.

**Tags:** transactions, transaction-fees, node.js

> **Comments:**
> **username_1**: Bitcoinjs-lib allows fairly granular control over fees and transaction parts in general.  

---

## 2 answers

### Answer by username_2 on 2018-06-29. Score: 2 | Accepted answer

Learn bitcore-lib npm package:
Bitcore library provides a very simple API for creating transactions. 
Let's take a very simple transactions:
var transaction = new Transaction()
    .from(utxos)          // Feed information about what unspent outputs one can use
    .to(address, amount)  // Add an output with the given amount of satoshis
    .change(address)      // Sets up a change address where the rest of the funds will go
    .sign(privkeySet)     // Signs all the inputs it can

> **Comments:**
> **username_0**: Can you please share the URL for the same  
> **username_2**: https://github.com/ishwarchandratiwari/bitcore-lib  
> **username_2**: this is official link from where you can get more information http://bitcore.io/guide/  

---

### Answer by username_3 on 2022-08-18. Score: 0

You can use the send-crypto to transfer bitcoin

npm install --save send-crypto

# or

yarn add send-crypto

const CryptoAccount = require("send-crypto");

/\* Load account from private key \*/
const privateKey = process.env.PRIVATE\_KEY || CryptoAccount.newPrivateKey();
const account = new CryptoAccount(privateKey);

/\* Print address \*/
console.log(await account.address("BTC"));
// > "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"

/\* Print balance \*/
console.log(await account.getBalance("BTC"));
// > 0.01

/\* Send 0.01 BTC \*/
const txHash = await account
.send("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", 0.01, "BTC")
.on("transactionHash", console.log)
// > "3387418aaddb4927209c5032f515aa442a6587d6e54677f08a03b8fa7789e688"
.on("confirmation", console.log);
// > 1
// > 2 ...

And also you can check the reference link <https://www.npmjs.com/package/send-crypto>


---

