frankenmint
Legendary
Offline
Activity: 1456
Merit: 1018
HoneybadgerOfMoney.com Weed4bitcoin.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 20, 2015, 05:51:49 PM |
|
Ask why use angular? -> you would probably want to create a new age sort of faucet - one with a game attached that gives away satoshis based on the high score...turn it around and deliver ad content within the frame on the same window. That's a method to use Angular in a different way that acts as a faucet.
Probably use Node.js in conjunction with angular so you can have an end to end js solution. I've not built a faucet myself but I have enough of an idea of how everything together works:
User sets aside a budget that they can earn/give away through ads vs satoshis donated.
Set up a page with the ad content as well as a captcha and an input field -
Using your DB (php would have likely used mysql, you could probably get away with a flat file implementation using redis) you would run a stored procedure to a) check if account exists based on wallet address - then depending on your method - you either run a tallied balance on the users wallet balance - probably through instantiating a session cookie which saves the entered wallet address - so that each time your user clicks - pay, their balance increases incrementally on your end, but you're not actually paying anything, just accumulating a payout balance. When the user clicks withdraw, your implementation has a 2nd stored procedure that checks the balance available on the users account, the available balance via bitcoind rpc call and then fires the payout transaction, 1 time, to the address stored on the account record in the db. If you're using the manual quick and dirty method - you just payout 0 fee transactions, immediately, on pay. I say quick/dirty, because those are dust transactions and if a users accumulates several of these transactions, they may be unable to spend the earned BTC due to trx size (larger than 1.2 KB)
Angular is definitely a Front End Framework and would be great for presenting realtime data or perhaps for working w/ websockets to give realtime info on the network and perhaps integrate that into an entertainment form factor.
|