Exemplo n.º 1
0
 public function getBalance($username)
 {
     $wallet = array();
     $bitcoin = new Bitcoin('http://' . BITCOIN_WALLET_SERVER . ':' . BITCOIN_WALLET_PORT, BITCOIN_WALLET_USERNAME, BITCOIN_WALLET_PASSWORD);
     $wallet['address'] = $bitcoin->getaddressesbyaccount($username);
     $wallet['balance'] = $bitcoin->getbalance($username);
     $wallet['key'] = $username;
     return compact('wallet');
 }
Exemplo n.º 2
0
 public function Address($address = null)
 {
     $bitcoin = new Bitcoin('http://' . BITCOIN_WALLET_SERVER . ':' . BITCOIN_WALLET_PORT, BITCOIN_WALLET_USERNAME, BITCOIN_WALLET_PASSWORD);
     $verify = $bitcoin->validateaddress($address);
     return $this->render(array('json' => array('verify' => $verify)));
 }