I am working with the blockchain wallet API and my workflow is something like this: whenever the user wants to buy BTC from me, at that time, whatever the amount is added by the buyer, at that time that particular amount will be locked from his account, and after a while that amount will be released and transferred to another user.

Is there any way to implement this?

  • Hi and welcome to Bitcoin.SE :) I've voted to close this question as too broad, because you seem to be asking about how to implement an entire payment system of some sort rather than a specific question. – MeshCollider Oct 17 '17 at 8:52
  • No, @MeshCollider i already implemented the transactions systems but i want to add some security concerns so to do that i am bit stucked – Chirag Daxini Oct 17 '17 at 8:55
  • In that case you'll have to clarify your question to make it more specific, because as it stands I don't understand what exactly you are asking. Sounds more like a programming question than a bitcoin question. – MeshCollider Oct 17 '17 at 9:05
  • @MeshCollider... i asked specifically like there will be buyer and seller are there in my site so when seller user go for sell BTC that time from that BTC amount will be locked for a while then his BTC will released and credited to buyer's account. – Chirag Daxini Oct 17 '17 at 9:15
  • 1
    It sounds like this is a programming issue dealing with credit in accounts in your software's database. It wouldn't need to touch the blockchain until you want to make a transaction on that. Perhaps stackoverflow is a better site to ask about the programming side of things? Or are you trying to put the time lock into the Bitcoin transaction? – Highly Irregular Oct 17 '17 at 10:39

You're users are not in control of the private keys, so you do not need to lock them via the Bitcoin protocol. This is just a simple permission feature you should build into your system using a database. If a user "buys from you" then update a field in your database for that user, for example the database field could be called locked and then you would have it changed to true. Then make sure that you build your system to check this field is false every time prior to withdrawal.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.