![]() "change_private_key": changePrivateKey.toWIF(), "source_private_key": sourcePrivateKey.toWIF(), Var transaction = new DigiByte.Transaction() Var changeAddress = changePrivateKey.toAddress() Var changePrivateKey = new DigiByte.PrivateKey() You’ll use this if you want to do anything beyond hold DGB.ĭon’t try to execute this yet, but eventually we’ll do something along the lines of:ĬreateTransaction(sourcePrivateKey, sourceAddress, destinationAddress, satoshis) ) The final DigiExplorer endpoint that we’ll be working with is responsible for sending transactions across the network. It took me a while to figure this out because if you try to send from one transaction id and you try to send a value less than your total balance, but more than your UXTO, you’ll get an error. You need to work with the UXTO information. When it comes to spending or sending your balance, you can’t just subtract from the total. "address": "D9Ms9hnm32q9nceN2b9jNshuZhWcobrmQm", A sample request to this API can be seen below: When it comes to tracking the market value of a DGB coin, we can make use of the CoinMarketCap API. Using the CoinMarketCap API to Track the DGB Market Value However, the digibyte-lib library doesn’t tell us the market value of DGB, the current balance of our address, or allow us to send DGB to other addresses. This includes generating private keys, addresses, and formatting transactions to be broadcasted across the network. We’re going to be doing as much as we can using the digibyte-lib library for Node.js. Understanding the DigiExplorer and CoinMarketCap RESTful APIsīefore we get invested in code, we need to take a moment to understand the RESTful APIs that are available and what they’re going to do for us in our project. The dgb.js file will have our JavaScript class for working with DigiByte and the app.js file will have all of our driver logic. If you don’t have the touch command, go ahead and create the files manually. Within a new directory on your computer, execute the following commands: That doesn’t mean that we can’t accomplish a lot within a Terminal. The extent of our application will be CLI based, not extravagant like the Ripple XRP wallet tutorial I had written. We’re going to be creating a project with Node.js, but don’t get ahead of yourself. Creating a New Node.js Project with the DigiByte Dependencies DGB is cheap right now, but it could pick up steam like some of the other cryptocurrencies. If at any point in this tutorial you feel like donating DGB, my public address is D9Ms9hnm32q9nceN2b9jNshuZhWcobrmQm. We’re going to see how to build a DigiByte DGB client for storing, sending, and managing coins without having to synchronize with the network, using JavaScript and Node.js. The good news, is this can be avoided by building your own wallet and client. It isn’t really appealing to anyone who just wants to sit on some DGB. If you’re not familiar with DigiByte, the official wallet forces you to download around 12GB of data to synchronize with the network. I’m also following DigiByte, which targets digital payments and has the DGB coin. Ripple isn’t the only cryptocurrency that I’m following. Not too long ago I had written an article titled, Create a Cross-Platform Desktop Ripple XRP Wallet with Vue.js and Electron, which focused on the Ripple, the banking network and cryptocurrency. I’ve been spending a lot of time researching and watching the blockchain market because it is a very interesting subject matter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |