Author

Topic: Creation of website using Bitcoins (Read 869 times)

full member
Activity: 126
Merit: 100
November 12, 2013, 09:47:13 AM
#13
A local bitcoind would be a far better idea. Why introduce an external point of failure you have no control over?

If you can give more details on the site (language?), that would help.

From what I see, your looking for the JSON-RPC API provided with bitcoind (the daemon version of the satoshi client).

Note this will require being able to execute a program in your production environment (aka, not a shared hosting plan) and have enough storage to hold the entire blockchain, as well as a CPU powerful enough to verify the blockchain in a timely manner (this isn't as important). Also note, any bitcoins stored on the site are vulnerable to hacks! Best to send them off to cold storage if they aren't required to be on the site (even then, delayed withdrawl is much better than no withdrawl). Please don't store large amounts of users coins in a hot wallet, I cannot stress this enough! This is the same for a blockchain.info API method where the password/private key is stored on the online machine.

Anyways, the RPC API calls your looking for:

Creating a new wallet
Code:
RPC: 'getnewaddress' 'user-01234'
Returns: '1YourUsersDepositAddress'

Getting the addresses of an account:
Code:
RPC: 'getaddressesbyaccount' 'user-01234'
Returns: [
    '1YourUsersDepositAddress11111',
    '1YourUsersDepositAddress22222'
]

Checking the balance of a wallet
Code:
RPC: 'getbalance' 'user-01234'
Returns: 0.00000000

Getting transactions (to display non-confirmed transactions)
Code:
RPC: 'listtransactions' 'user-01234'
Returns: {
    "account" : "user-01234",
    "address" : "1YourUsersDepositAddress",
    "category" : "receive",
    "amount" : 0.01234567,
    "confirmations" : 13172,
    "blockhash" : "000000000000002217950f22b11d8c3f6c957b29a764173c7a7562036f2aa17b",
    "blockindex" : 93,
    "blocktime" : 1378290684,
    "txid" : "87fd5e9e...",
    "time" : 1378289833,
    "timereceived" : 1378289833
}

Send BTC from account/wallet (note this will not go over the users balance)
Code:
RPC: 'sendfrom' 'user-01234' 1WithdrawlAddress 0.01234567
Returns: '87fd5e9e...txid_goes_here'

Send BTC from server wallet (will take from any account, though account balances will not change):
Code:
RPC: 'sendtoaddress' 1WithdrawlAddress 0.01234567
Returns: '87fd5e9e...txid_goes_here'

Edit: To clarify, I am piggy backing off of bitcoind's internal account system. This allows multiple addresses to be tied to an account. If you ever want to give your users a new address (or they request it), running the getnewaddress call will give you another address, and both can be used. Note that an accounts balance does not always represent the actual amount of bitcoins in the address tied to the account (due to the ability to move coins off-chain to another account).

If you need more help, feel free to ask!
b!z
legendary
Activity: 1582
Merit: 1010
November 12, 2013, 09:37:16 AM
#12
A local bitcoind would be a far better idea. Why introduce an external point of failure you have no control over?

If you don't know how to setup bitcoind safely, then you will have an internal point of failure.
newbie
Activity: 42
Merit: 0
November 12, 2013, 09:36:48 AM
#11
this sounds nice  Wink some hostings is make discounts i know in practic
full member
Activity: 129
Merit: 100
Owlmeister
November 12, 2013, 09:06:55 AM
#10
A local bitcoind would be a far better idea. Why introduce an external point of failure you have no control over?
legendary
Activity: 1008
Merit: 1005
November 11, 2013, 10:11:03 AM
#9
You could probably use any web wallet's API
full member
Activity: 140
Merit: 100
November 11, 2013, 09:50:06 AM
#8
Seems is more or less clear with the Blockchain API, but what is the best and secure way to send Bitcoins automatically from the created wallets?

For what I see we need to send password in URL of the blockchain API to make payment, but isnt this unsecure?

Even they say in the page https://blockchain.info/api/create_wallet

"It is possible to send payments from the wallet by providing the guid and password to the blockchain wallet api. However this is not recommended as if the wallet password is changed or two factor authentication is enabled you will no longer be to access the wallet."

What should I do about this?
It just states that if the password changes you aren't able to use the script anymore (until you update it). Also 2FA is not possible. It is possible to use a second password. I have been using the BlockChain API to make my faucet payments and it works just fine for me.

But isn't it unsecure to send the password via URL? In case someone sniffs the networks the wallets can be compromised, or no?
Well, they would have to be on the network of your host to sniff it out. So the possibility of that happening is quite low.

hm... in my opinion this is not secure, but ok... if it is the only possible way... because you know, hosting companies are run by people that we don't know at all Smiley

Thanks for useful info
copper member
Activity: 3948
Merit: 2201
Verified awesomeness ✔
November 11, 2013, 09:06:05 AM
#7
Seems is more or less clear with the Blockchain API, but what is the best and secure way to send Bitcoins automatically from the created wallets?

For what I see we need to send password in URL of the blockchain API to make payment, but isnt this unsecure?

Even they say in the page https://blockchain.info/api/create_wallet

"It is possible to send payments from the wallet by providing the guid and password to the blockchain wallet api. However this is not recommended as if the wallet password is changed or two factor authentication is enabled you will no longer be to access the wallet."

What should I do about this?
It just states that if the password changes you aren't able to use the script anymore (until you update it). Also 2FA is not possible. It is possible to use a second password. I have been using the BlockChain API to make my faucet payments and it works just fine for me.

But isn't it unsecure to send the password via URL? In case someone sniffs the networks the wallets can be compromised, or no?
Well, they would have to be on the network of your host to sniff it out. So the possibility of that happening is quite low.
full member
Activity: 140
Merit: 100
November 11, 2013, 09:02:25 AM
#6
Seems is more or less clear with the Blockchain API, but what is the best and secure way to send Bitcoins automatically from the created wallets?

For what I see we need to send password in URL of the blockchain API to make payment, but isnt this unsecure?

Even they say in the page https://blockchain.info/api/create_wallet

"It is possible to send payments from the wallet by providing the guid and password to the blockchain wallet api. However this is not recommended as if the wallet password is changed or two factor authentication is enabled you will no longer be to access the wallet."

What should I do about this?
It just states that if the password changes you aren't able to use the script anymore (until you update it). Also 2FA is not possible. It is possible to use a second password. I have been using the BlockChain API to make my faucet payments and it works just fine for me.

But isn't it unsecure to send the password via URL? In case someone sniffs the networks the wallets can be compromised, or no?
copper member
Activity: 3948
Merit: 2201
Verified awesomeness ✔
November 11, 2013, 08:36:05 AM
#5
Seems is more or less clear with the Blockchain API, but what is the best and secure way to send Bitcoins automatically from the created wallets?

For what I see we need to send password in URL of the blockchain API to make payment, but isnt this unsecure?

Even they say in the page https://blockchain.info/api/create_wallet

"It is possible to send payments from the wallet by providing the guid and password to the blockchain wallet api. However this is not recommended as if the wallet password is changed or two factor authentication is enabled you will no longer be to access the wallet."

What should I do about this?
It just states that if the password changes you aren't able to use the script anymore (until you update it). Also 2FA is not possible. It is possible to use a second password. I have been using the BlockChain API to make my faucet payments and it works just fine for me.
full member
Activity: 140
Merit: 100
November 11, 2013, 08:29:13 AM
#4
Seems is more or less clear with the Blockchain API, but what is the best and secure way to send Bitcoins automatically from the created wallets?

For what I see we need to send password in URL of the blockchain API to make payment, but isnt this unsecure?

Even they say in the page https://blockchain.info/api/create_wallet

"It is possible to send payments from the wallet by providing the guid and password to the blockchain wallet api. However this is not recommended as if the wallet password is changed or two factor authentication is enabled you will no longer be to access the wallet."

What should I do about this?

legendary
Activity: 2142
Merit: 1010
Newbie
November 11, 2013, 06:59:48 AM
#3
Hello everyone,

I need to integrate Bitcoins in one future website but I have no idea how to do, can someone give me some insights?

The website will have personal user accounts and each account will have a BTC wallet associated with it, so that the user can transfer BTC to his wallet and see his balance on the website.

I need some API to do the following:

- Be able to create BTC wallets automatically (for each User account)
- Receive BTC on the created wallets
- Check the balance and confirmations on the created wallet
- Send BTC from the created wallets (In case user wants to withdraw)

How to do this?

Thanks

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
copper member
Activity: 3948
Merit: 2201
Verified awesomeness ✔
November 11, 2013, 06:34:11 AM
#2
BlockChain API provides everything you need. If you need help and are willing to pay for it, hit me up Wink
full member
Activity: 140
Merit: 100
November 11, 2013, 06:31:45 AM
#1
Hello everyone,

I need to integrate Bitcoins in one future website but I have no idea how to do, can someone give me some insights?

The website will have personal user accounts and each account will have a BTC wallet associated with it, so that the user can transfer BTC to his wallet and see his balance on the website.

I need some API to do the following:

- Be able to create BTC wallets automatically (for each User account)
- Receive BTC on the created wallets
- Check the balance and confirmations on the created wallet
- Send BTC from the created wallets (In case user wants to withdraw)

How to do this?

Thanks
Jump to: