Bitcoin Forum
November 21, 2017, 08:18:21 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: Bitcoin API with callback function?  (Read 8703 times)
johba
Member
**
Offline Offline

Activity: 68



View Profile WWW
October 09, 2013, 02:40:53 PM
 #21

One of the problems is the generation of new addresses that can lead to very large wallet files over time. With blockchain.info you offload this stuff to them, if you do it yourself, you might want to look into rate limiting or something like that to avoid someone spamming your server with 1 million requests that would fill your wallet files and also maybe even DoS you with key generation.

I think that's easy to avoid using the getaccountaddress call with the bitcoind json rpc. It will only give you a new address once the previous one has been used in a transaction.
1511295501
Hero Member
*
Offline Offline

Posts: 1511295501

View Profile Personal Message (Offline)

Ignore
1511295501
Reply with quote  #2

1511295501
Report to moderator
1511295501
Hero Member
*
Offline Offline

Posts: 1511295501

View Profile Personal Message (Offline)

Ignore
1511295501
Reply with quote  #2

1511295501
Report to moderator
1511295501
Hero Member
*
Offline Offline

Posts: 1511295501

View Profile Personal Message (Offline)

Ignore
1511295501
Reply with quote  #2

1511295501
Report to moderator
Join ICO Now Coinlancer is Disrupting the Freelance marketplace!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Sukrim
Legendary
*
Offline Offline

Activity: 2184


View Profile
October 09, 2013, 07:46:21 PM
 #22

Then you'd end up with potentially presenting the same address to several users, as there will always be some lag time between presenting the user an address and the user sending something there.

The only thing to prevent this is to create some accounts on your service (which is something I want to avoid) or doing ugly things such as using IP addresses to distinguish between current users...

It might be possible to re-use addresses (if you re-implement the blockchain API, one could save all addresses that were not used for 1 week and then use these again) to migitate this somehow, still wallet bloat is an issue, as long as keys are 100% independent of each other and not BIP31. Even if Bitcoind (finally!) implements BIP31 deterministic keys, there is still the issue with Altcoins that are poorly maintained and that would take even longer to pull the necessary code.

Maybe creating a relatively large pool of addresses (e.g. 100k or so) that are rotated would work too, but that's actually backend stuff. Still, the "generating new address" part is what worries me most, the rest could be also simply polled with getreceivedbyaddress as already said.

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
danystatic
Full Member
***
Offline Offline

Activity: 234


View Profile
October 10, 2013, 12:19:58 AM
 #23

a REAL callback function, it could be possible with a cron job / script + walletnotify or other way I wish someone says the proper way :s

----------------------------
I did modifiy blockchain's php payment demo  and also  :   payment_button_v2.js
also
used bitcoin rpc  
----
why are you so opposed to learning the rpc, is easy, i could be a guide
It is 1 day thing.
Benson Samuel
Staff
Legendary
*
Offline Offline

Activity: 1792


Landscaping Bitcoin for India!


View Profile WWW
October 10, 2013, 03:31:42 AM
 #24

Check my github in my signature. It has fully working code for Blockchain and Coinbase.

Both have been successfully implemented with callbacks, etc for 2 games as well.

https://github.com/bensonsamuel

johba
Member
**
Offline Offline

Activity: 68



View Profile WWW
October 10, 2013, 03:45:36 AM
 #25

Then you'd end up with potentially presenting the same address to several users, as there will always be some lag time between presenting the user an address and the user sending something there.

The only thing to prevent this is to create some accounts on your service (which is something I want to avoid) or doing ugly things such as using IP addresses to distinguish between current users...

I'd say you have sessions for your users at least, to do basic things like shopping carts or even sticky load balancing. so map those to accounts and you will only ever need as much accounts/unused addresses as concurrent sessions. IMHO, bitcoind gives you some great tools at hand if you want to get things up and and running quickly.

If you want to build things neatly, build on bitcoinj/BOP with deterministic wallets, optimise wallet performance once needed, and then contribute your changes back instead of sitting on them.

blockchain.info is also not perfect, as you will have archive addresses to keep wallet performance up: http://blockchain.info/api/blockchain_wallet_api
danystatic
Full Member
***
Offline Offline

Activity: 234


View Profile
October 10, 2013, 03:52:53 AM
 #26

yes, sessions work for this, just hope the 'user' does not pays and close the web-explorer(chrome,firefox,etc..) before the session expires =)
I know it's a small time-frame, but possible
also
what about two clients asking for   getnewaddress(),  (php)

is it possible two clients get same address because they clicked almost at the same time?
I think is not possible but someone said it was, but I test it and still it is not working like that, but I don't know on a heavier load...
ron_
Sr. Member
****
Offline Offline

Activity: 392


SPECTRE.ai


View Profile
July 11, 2014, 02:57:49 PM
 #27

btcipn.com does the job pretty much well and it is easy to integrate if you are familiar with paypal ipn

- no 3rd party wallet (use your own wallet)
- no registration required
- your website will be listed on their home page

i have tested it and it works just great

SPECTRE                ▄▄███▄▄
            ▄▄███▀▀▀▀▀███▄▄
▄▄      ▄▄███▀▀ ▄▄███▄▄ ▀▀███▄▄      ▄▄
████▄▄  ▀▀▀ ▄▄███████████▄▄ ▀▀▀  ▄▄████
  ▀▀████▄    ▀▀█████████▀▀    ▄████▀▀
 ██▄▄ ▀██ █▄▄    ▀▀▀▀▀    ▄▄█ ██▀ ▄▄██
 ▀▀███ ██ █████▄       ▄█████ ██ ███▀▀
      ██ ███████▄   ▄███████ ██
       ██ ████████   ████████ ██
       ██▄▄ ▀▀████   ████▀▀ ▄▄██
        ▀▀███▄▄ ▀▀   ▀▀ ▄▄███▀▀
            ▀▀███▄▄▄▄▄███▀▀
                ▀▀███▀▀
             │
     │      ███
     │      ███
    │     ███
███  │     ███
███ ███ ███ ███
███ ███ ███ ███
███ ███ ███ ███
███ ███ ███ ███
███ ███     │
███ ███     │
    │
 
▬▬     WHITEPAPER    ▬▬
FACEBOOK     TELEGRAM
TWITTER     SLACK     MEDIUM
.
PRE-SALE.
PUBLIC SALE.
crypto777
Full Member
***
Offline Offline

Activity: 223


View Profile WWW
November 11, 2014, 01:39:28 PM
 #28


You can use GoUrl PHP Payment Bitcoin API -

https://gourl.io/


It is support callbacks.

Bitcoin, Litecoin, Dogecoin, Quarkcoin... 200+ cryptocurrencies LIVE Analytics @ http://altcoins.wiki

Cryptocurrency Payment API - https://gourl.io

.
HackerBOSS
Full Member
***
Offline Offline

Activity: 140


View Profile
April 13, 2016, 03:25:42 PM
 #29

Why callback blockchain.info don't work now?
HackerBOSS
Full Member
***
Offline Offline

Activity: 140


View Profile
April 15, 2016, 06:23:59 AM
 #30


You can use GoUrl PHP Payment Bitcoin API -

https://gourl.io/


It is support callbacks.

nice service..
but how use it?
need vps and node?
please tell me details
HackerBOSS
Full Member
***
Offline Offline

Activity: 140


View Profile
April 15, 2016, 06:26:17 AM
 #31

blockchain-info callback works now,
they have problem this it and fix now
a7594li
Hero Member
*****
Offline Offline

Activity: 714



View Profile
April 16, 2016, 12:57:18 AM
 #32

I think blockchain-info callback works well.
there have no other problem.


▄▄▄████████▄▄▄
▄▄███▀▀████████▀▀███▄▄
▄██▀▀   ██████████   ▀▀██▄
▄██▀     ████████████     ▀██▄
██▀      ██████████████      ▀██
██▀      ████████████████      ▀██
██▀      ██████████████████      ▀██
▄██      █████████  █████████      ██▄
██      █████████    █████████      ██
██     █████████      █████████     ██
██    █████████        █████████    ██
██   █████████          █████████   ██
▀██ ██████████████████████████████ ██▀
████████████████████████ ███████████
██████████████████████   █████████
████████████████████     ███████
▀██▄                      ▄██▀
▀██▄▄                ▄▄██▀
▀▀███▄▄▄      ▄▄▄███▀▀
▀▀▀████████▀▀▀
  .A.P.H.E.L.I.O.N.  [    ] 
▄████████████████████████▄
████████████▀     ████████
███████████       ████████
███████████    ███████████
███████████    ███████████
████████          ████████
████████          ████████
███████████    ███████████
███████████    ███████████
███████████    ███████████
███████████    ███████████
███████████    ███████████
▀████████████████████████▀
 
▄████████████████████████▄
██████████████████████████
████▀  ▀██████████████████
████▄  ▄██████████████████
██████████████████████████
████    ██    █▀    ▀█████
████    ██     ▄▄     ████
████    ██    ████    ████
████    ██    ████    ████
████    ██    ████    ████
████    ██    ████    ████
██████████████████████████
▀████████████████████████▀
 
▄████████████████████████▄
██████████████████████████
███████████████▀▀▀▀███████
████ ▀███████▀      ▀▀▀███
████    ▀▀██▀        ▄████
████▄               ██████
█████▄             ███████
██████▄           ████████
███▀██▀▀        ▄█████████
████▄▄       ▄▄███████████
██████████████████████████
██████████████████████████
▀████████████████████████▀
 
▄████████████████████████▄
██████████████████████████
██████████████████▀▀   ███
██████████████▀▀  ▄█▀ ▄███
██████████▀▀    ▄█▀   ████
██████▀▀      ▄█▀    ▄████
██▀▀        ▄█▀      █████
████▄▄    ▄█▀       ▄█████
████████▄█▀         ██████
██████████   ▄     ▄██████
██████████ ▄████▄▄ ███████
██████████████████████████
▀████████████████████████▀
  ▶  Whitepaper
▶  Website
▶  Register
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!