Just run it on the same machine as your node. It will automatically update every time your router changes it's IP. Other peers will still just connect to the same static IP provided by noip.
|
|
|
Hello coinables, i would like to ask you if you are working on new tutorials, maybe new projects, bcoin is awesome by the way.
New tutorials, not right now I've been too busy. It takes a lot of time, I usually write out the lesson and then record it. I've been focusing on the nodejs series, not sure what I'll cover next maybe something like blockcypher API or maybe building raw transactions in nodejs. New projects, yes one in particular that is consuming a lot of time. bcoin is awesome! I have installed it, but haven't got to play with it as much as I want to yet. Thanks for checking in!
|
|
|
Nice work, i am also working on some libraries but only to querry prices and other informations from public API exchanges. Coinables is awesome, i learned a lot from his videos. I am also happy that for the first time some one used this $uri = file_get_contents('https://poloniex.com/public?command='.$command); Usually people calls Curl but it is like 4 or 5 lines of code, while file_get_contents is just one line, which is less time consuming especially if you have several calls to do, plus, a short code is a quick code. Thanks nemgun. Yea file_get_contents() is the quick and dirty way. cURL should be used for most production applications as it is more secure and is able to verify SSL certs.
|
|
|
I don't seem to find a simple example about how to use all these classes you guys are publishing. A lot of code, and private and public, secret key ? wtf ? ... a lot of mambo jambo for someone that don't know oop and just want to use a simple function, to retrieve some info like
include(poloniexApi.php) $ethSellPrice = get_eth_sell_price() -> should return best sell price at the moment the function is called $ethBuyPrice = get_eth_buy_price() -> should return best buy price at the moment the function is called
Can anyone point me in the right direction, without having to learn all the OOP concept? I really needed for my simple page to track the profit of my small portfolio ... no bot trading, or anything fancy .. just refresh a page, these simple functions get the values, and are entered into calculation.
OP is creating a library to be used with Polo. Libraries are always created with classes and functions. To use his library you would first save the Poloniex.php file to your server and then require it. Then instantiate the class with your Poloniex API key and API secret. You can have your API key and secret stored in a variable or just insert it in. $polo = new Poloniex($key, $secret); or $polo = new Poloniex("L5knblahblah", "5Xnrblahblah"); Then you can start using the different functions. One is returnTicker()You would use it by hitting the class ($polo) then the function $polo = new Poloniex($key, $secret); $ticker = $polo->returnTicker();
The in-code notation tells us this will come back as an array. So we can output it with var_dump or print_r $polo = new Poloniex($key, $secret); $ticker = $polo->returnTicker(); print_r($ticker);
Let's look at another one that includes a parameter, returnOrderBook()We can either enter in a currency pair or leave it blank to retrieve all. $polo = new Poloniex($key, $secret); $orderbook = $polo->returnOrderBook("ETHBTC"); print_r($orderbook);
or blank for all orderbooks $polo = new Poloniex($key, $secret); $orderbook = $polo->returnOrderBook(); print_r($orderbook);
Hope that helps. Keep going through the different public functions to see what's available.
|
|
|
Coinb.in Features Include .001 BTC being taken when ever the algorithm or software writer feels like grabbing some coin. AND Expensive transfer fees .0011 minimum. Which gets U a minimum 72 hours of waiting time after u have broadcast your coin. Paying a higher transfer fee does NOT move the coin any faster. I WILL NOT BE USING THIS JUNK WALLET ANY LONGER. I THOUGHT OTHERS SHOULD BE WARNED TO AVOID IT AS WELL
It may have started as a good idea, but it no longer is a good idea. It is a good way to lose your investment to poor timing and mismanaged coin disbursements
You're saying Coinb.in calculated a fee for you? AFAIK, it just leaves whatever you don't send on as a fee. Yea every time I've used it it's all manual, no auto fee calc. I think he must have used another service that could possibly pretending to be coinbin that's scraping fees off the top of transactions?
|
|
|
No source and coming from a newbie account isn't very reassuring. Kinda reminds me of https://github.com/coinables/sweepkey/blob/master/app.js The sweepkey nodejs service above runs off public API endpoints (no api key) so users can just copy the repo and run it locally on their own machine. No trust required.
|
|
|
Are you talking about pooled or solo mining? If you solo mine at least you'll add a node to the network
|
|
|
Wallet APIs are not installed, they are developed with. You need to build your solution. If you're looking for a turn-key solution like installing a BB forum you're going to get robbed. I'm going to self promote here: I wrote a book about getting started with bitcoin development, the final project is a simple game using bitcoind. If you're looking to learn this stuff, you should check it out.
|
|
|
So btc.com only acquired the consumer wallet portion of blocktrail? Is the developer blocktrail wallet API going to stay blocktrail, or is that going to get picked up by btc.com as well? Personally I think the developer wallet API is the better service. There aren't that many options for wallet APIs out there, blockchain, blockcypher and blocktrail. I don't include coinbase or bitpay in the mix since they require intense screening to use their wallet API.
|
|
|
Yes, you could change it to check for inputs instead of outputs.
|
|
|
Yes. Create a nodejs file that subscribes to the websocket feed. Then check each new entry to see if it matches what you're looking for. If it does then initiate the request module to hit your PHP page. npm install both the websocket and request modules. npm install ws --save npm install request --save var WebSocket = require("ws"); var request = require("request"); var btcs = new WebSocket('wss://ws.blockchain.info/inv');
btcs.onopen = function() { btcs.send( JSON.stringify( {"op":"unconfirmed_sub"} ) ); };
btcs.onmessage = function(onmsg) { var response = JSON.parse(onmsg.data); var outAddr = response.x.out[0].addr; if(outAddr == "1BitcoinEaterAddressDontSendf59kuE") { request({ url: "https://somesite.com/page.php", json: true }, function(err, res, body){ if(err){ console.log(err); } console.log(res); console.log("PHP page ran"); }); } }
The above way is checks ALL transactions, so it's kinda wasteful. It would be better to subscribe to an address instead of all transactions. var WebSocket = require("ws"); var request = require("request"); var btcs = new WebSocket('wss://ws.blockchain.info/inv');
var address = "1BitcoinEaterAddressDontSendf59kuE"; var btcs = new WebSocket("wss://ws.blockchain.info/inv"); btcs.onopen = function(){ btcs.send(JSON.stringify({“op”:”addr_sub”, “addr”:address})); }; btcs.onmessage = function(onmsg) { var response = JSON.parse(onmsg.data); var getOuts = response.x.out; var countOuts = getOuts.length; for(i = 0; i < countOuts; i++) { //check every output to see if it matches specified address var outAdd = response.x.out[i].addr; var specAdd = address; if (outAdd == specAdd) { var amount = response.x.out[i].value; //transaction received //include a parameter with the amount in satoshis if you want request({ url: "https://somesite.com/page.php?value="+amount, json: true }, function(err, res, body){ if(err){ console.log(err); } console.log(res); console.log("PHP page ran"); }); }; }; }
|
|
|
Thanks for taking the time Andrew!
|
|
|
I posted this on bitcoin stackexchange with no answer, so I'll try here. How does one derive the Redeem Script for the new P2WPKH addresses? With existing P2SH it's revealed after providing N number of public keys through a `createmultisig` function in the bitcoin client. Is it the same, just provide a single public key through a `createwitness` or similar function? Is it currently available for fiddling with on testnet? I'm currently looking at the dev guide ( https://bitcoincore.org/en/segwit_wallet_dev/) but still can't figure it out. To create a P2SH-P2WPKH address:
- Calculate the RIPEMD160 of the SHA256 of a public key (keyhash). Despite the keyhash formula is same as P2PKH, reuse of keyhash should be avoided for better privacy and prevention of accidental use of uncompressed key
- The P2SH redeemScript is always 22 bytes. It starts with a OP_0, followed by a canonical push of the keyhash (i.e. 0x0014{20-byte keyhash})
- Same as any other P2SH, the scriptPubKey is OP_HASH160 hash160(redeemScript) OP_EQUAL, and the address is the corresponding P2SH address with prefix 3. Can someone dumb down step 2 for me? Is it possible to do currently with a library in python?
|
|
|
PHP is probably the fastest and easiest. I've made several custom faucet games. If you already know what you're doing and it's not your first go around you can knock one out in a single weekend.
Side note, faucets were barely profitable when coins were $200-300. I can't imagine how people are making money with faucets anymore. I ran a few of them, but then adsense starting cracking down on them and it just wasn't worth getting banned by adsense. Either way, good luck!
|
|
|
|