Bitcoin Forum
April 23, 2024, 11:21:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Creation of website using Bitcoins  (Read 850 times)
troiste (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
November 11, 2013, 11: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
1713914509
Hero Member
*
Offline Offline

Posts: 1713914509

View Profile Personal Message (Offline)

Ignore
1713914509
Reply with quote  #2

1713914509
Report to moderator
1713914509
Hero Member
*
Offline Offline

Posts: 1713914509

View Profile Personal Message (Offline)

Ignore
1713914509
Reply with quote  #2

1713914509
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713914509
Hero Member
*
Offline Offline

Posts: 1713914509

View Profile Personal Message (Offline)

Ignore
1713914509
Reply with quote  #2

1713914509
Report to moderator
1713914509
Hero Member
*
Offline Offline

Posts: 1713914509

View Profile Personal Message (Offline)

Ignore
1713914509
Reply with quote  #2

1713914509
Report to moderator
Mitchell
Copper Member
Legendary
*
Offline Offline

Activity: 3906
Merit: 2197


Verified awesomeness ✔


View Profile WWW
November 11, 2013, 11: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

.
Duelbits
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀

Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█

Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █

Blackjack
|█▀▀▀▀▀█▄▄▄
       ▀████▄▄
         ██████▄
▄▄▄▄▄▄▄▄█▀    ▀▀█
████████▄        █
█████████▄        █
██████████▄     ▄██
█████████▀▀▀█▄▄████
▀▀███▀▀       ████
   █          ███
   █          █▀
▄█████▄▄▄ ▄▄▀▀
███████▀▀▀
.
                 NEW!                  
SPORTS BETTING 
|||
[ Đ ][ Ł ]
AVAILABLE NOW

Advertisements are not endorsed by me.
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
November 11, 2013, 11: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
troiste (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
November 11, 2013, 01:29:13 PM
 #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?

Mitchell
Copper Member
Legendary
*
Offline Offline

Activity: 3906
Merit: 2197


Verified awesomeness ✔


View Profile WWW
November 11, 2013, 01:36:05 PM
 #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.

.
Duelbits
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀

Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█

Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █

Blackjack
|█▀▀▀▀▀█▄▄▄
       ▀████▄▄
         ██████▄
▄▄▄▄▄▄▄▄█▀    ▀▀█
████████▄        █
█████████▄        █
██████████▄     ▄██
█████████▀▀▀█▄▄████
▀▀███▀▀       ████
   █          ███
   █          █▀
▄█████▄▄▄ ▄▄▀▀
███████▀▀▀
.
                 NEW!                  
SPORTS BETTING 
|||
[ Đ ][ Ł ]
AVAILABLE NOW

Advertisements are not endorsed by me.
troiste (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
November 11, 2013, 02:02:25 PM
 #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?
Mitchell
Copper Member
Legendary
*
Offline Offline

Activity: 3906
Merit: 2197


Verified awesomeness ✔


View Profile WWW
November 11, 2013, 02:06:05 PM
 #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.

.
Duelbits
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀

Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█

Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █

Blackjack
|█▀▀▀▀▀█▄▄▄
       ▀████▄▄
         ██████▄
▄▄▄▄▄▄▄▄█▀    ▀▀█
████████▄        █
█████████▄        █
██████████▄     ▄██
█████████▀▀▀█▄▄████
▀▀███▀▀       ████
   █          ███
   █          █▀
▄█████▄▄▄ ▄▄▀▀
███████▀▀▀
.
                 NEW!                  
SPORTS BETTING 
|||
[ Đ ][ Ł ]
AVAILABLE NOW

Advertisements are not endorsed by me.
troiste (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
November 11, 2013, 02:50:06 PM
 #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
smeagol
Legendary
*
Offline Offline

Activity: 1008
Merit: 1005



View Profile
November 11, 2013, 03:11:03 PM
 #9

You could probably use any web wallet's API
JonnyBravo
Full Member
***
Offline Offline

Activity: 129
Merit: 100


Owlmeister


View Profile WWW
November 12, 2013, 02:06:55 PM
 #10

A local bitcoind would be a far better idea. Why introduce an external point of failure you have no control over?

Operator of the L8 site family, featuring classic Roulette, Blackjack, Video Poker, Dice and more on your favourite altcoins (CLOAK, DOGE, LTC and more)
inform
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
November 12, 2013, 02:36:48 PM
 #11

this sounds nice  Wink some hostings is make discounts i know in practic
b!z
Legendary
*
Offline Offline

Activity: 1582
Merit: 1010



View Profile
November 12, 2013, 02:37:16 PM
 #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.
dudeami
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
November 12, 2013, 02:47:13 PM
 #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' <min_confirmations>
Returns: 0.00000000

Getting transactions (to display non-confirmed transactions)
Code:
RPC: 'listtransactions' 'user-01234' <limit> <offset>
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 <min_confirmations>
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!

Put your heart on the line, it determines your fate.
BTC: 1DUDEAMiV54PFJFSe5fen3wr1e71unkaGj
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!