Reputation: 19
I am new to bitcoin, I have PHP function to generate new Bitcoin address. How can I add this generated Bitcoin address's to Bitcoin-Qt(bitcoind) via JSON-RPC. Is there any function to do that?
I know there is a function to generate Bitcoin address (getnewaddress()) but I want to add this newly generated Bitcoin address directly to Bitcoin-Qt.
I want to know the best way (in terms of security) for transferring Bitcoins is JSON-RPC or blockchain API or may be something else.
I will use it in web payment, What is your advice to me ?
Thank You
Upvotes: 1
Views: 1224
Reputation: 6401
When you generate a new Bitcoin address it is automatically added to Bitcoin-Qt. To send money from one address to another via RPC(PHP function) use this
sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]
If you talk about security of PHP API I would say API is secured until you do not leave a loop hole. So the security of any programming language depends upon the person coding it.
Upvotes: 1