Esempio n. 1
0
 /**
  * Gets Json String of Object Address
  * @return string
  */
 public static function getJson()
 {
     /*
     {
         "wallet": {
             "token": "c0afcccdde5081d6429de37d16166ead",
             "name": "alice",
             "addresses": [
                 "18VAyux27CiWQnmYumZeTKNcaw6opvKRLq",
                 "1JDHBHESobzLpRP9QhNqDDY5kkBFGcRq2M",
                 "1JWARATTPYKLUgZj3c1U1EsrGPq6FUQPF3",
                 "1JcX75oraJEmzXXHpDjRctw3BX6qDmFM8e",
                 "1jr1rHMthQVMNSYswB9ExSvYn339fWMzn"
             ]
         },
         "total_received": 231765,
         "total_sent": 182465,
         "balance": 49300,
         "unconfirmed_balance": 0,
         "final_balance": 49300,
         "n_tx": 3,
         "unconfirmed_n_tx": 0,
         "final_n_tx": 3,
         "txrefs": [
             {
                 "address": "18VAyux27CiWQnmYumZeTKNcaw6opvKRLq",
                 "tx_hash": "dbc870fd7786656d41f1b55f920fc6dd5619534764e99bf14ebb2278e71a9d8a",
                 "block_height": 359108,
                 "tx_input_n": -1,
                 "tx_output_n": 0,
                 "value": 49300,
                 "spent": false,
                 "confirmations": 289,
                 "confirmed": "2015-06-02T15:38:43Z",
                 "double_spend": false
             },
             {
                 "address": "1JcX75oraJEmzXXHpDjRctw3BX6qDmFM8e",
                 "tx_hash": "a36293bdc89877bc7b0474bfe7fe1778b7276bef356311b57d2270e53f937f7b",
                 "block_height": 318279,
                 "tx_input_n": 0,
                 "tx_output_n": -1,
                 "value": 182465,
                 "spent": false,
                 "confirmations": 41118,
                 "confirmed": "2014-08-30T16:42:15Z",
                 "double_spend": false
             },
             {
                 "address": "1JcX75oraJEmzXXHpDjRctw3BX6qDmFM8e",
                 "tx_hash": "745f870ae1bc05d6d503b63a25e8681d986c19997997143992f718a7497f392f",
                 "block_height": 318060,
                 "tx_input_n": -1,
                 "tx_output_n": 0,
                 "value": 182465,
                 "spent": true,
                 "spent_by": "a36293bdc89877bc7b0474bfe7fe1778b7276bef356311b57d2270e53f937f7b",
                 "confirmations": 41337,
                 "confirmed": "2014-08-29T10:29:31Z",
                 "double_spend": false
             }
         ],
         "tx_url": "https://api.blockcypher.com/v1/btc/main/txs/",
         "error": "",
         "errors": []
     }
     */
     $wallet = WalletTest::getJson();
     $txref = TXRefTest::getJson();
     return '{"wallet":' . $wallet . ',"total_received":4433416,"total_sent":0,"balance":4433416,"unconfirmed_balance":0,"final_balance":4433416,"n_tx":7,"unconfirmed_n_tx":0,"final_n_tx":7,"txrefs":[' . $txref . '],"unconfirmed_txrefs":[' . $txref . '],"tx_url":"https://api.blockcypher.com/v1/btc/main/txs/","error":"","errors":[]}';
 }
Esempio n. 2
0
 /**
  * Gets Json String of Object Address
  * @return string
  */
 public static function getJson()
 {
     /*
     {
         "address": "1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD",
         "total_received": 4433416,
         "total_sent": 0,
         "balance": 4433416,
         "unconfirmed_balance": 0,
         "final_balance": 4433416,
         "n_tx": 7,
         "unconfirmed_n_tx": 0,
         "final_n_tx": 7,
         "txrefs": [
         {
           "tx_hash": "14b1052855bbf6561bc4db8aa501762e7cc1e86994dda9e782a6b73b1ce0dc1e",
           "block_height": 302013,
           "tx_input_n": -1,
           "tx_output_n": 0,
           "value": 20213,
           "spent": false,
           "confirmations": 50118,
           "confirmed": "2014-05-22T03:46:25Z",
           "double_spend": false
         },
         {
           "tx_hash": "4cff011ec53022f2ae47197d1a2fd4a6ac2a80139f4d0131c1fed625ed5dc869",
           "block_height": 302002,
           "tx_input_n": -1,
           "tx_output_n": 0,
           "value": 40596,
           "spent": false,
           "confirmations": 50129,
           "confirmed": "2014-05-22T02:56:08Z",
           "double_spend": false
         },
         {
           "tx_hash": "ea1cbb874ed4e40add51b4d65b877dc4e8d69bb63f5b2220a79d673c413b778a",
           "block_height": 302002,
           "tx_input_n": -1,
           "tx_output_n": 0,
           "value": 101491,
           "spent": false,
           "confirmations": 50129,
           "confirmed": "2014-05-22T02:56:08Z",
           "double_spend": false
         },
         {
           "tx_hash": "b4735a0690dab16b8789fceaf81c511f3be484e319f684cc214380eaa2851030",
           "block_height": 292601,
           "tx_input_n": -1,
           "tx_output_n": 0,
           "value": 3500000,
           "spent": false,
           "confirmations": 59530,
           "confirmed": "2014-03-26T17:08:04Z",
           "double_spend": false
         },
         {
           "tx_hash": "0416b8db5db4fa088437008aea7889e966e326f11c52c1da95161cd2ded95185",
           "block_height": 292519,
           "tx_input_n": -1,
           "tx_output_n": 0,
           "value": 100000,
           "spent": false,
           "confirmations": 59612,
           "confirmed": "2014-03-26T04:18:38Z",
           "double_spend": false
         },
         {
           "tx_hash": "995a50e05d197be88d4da74160b4bcd2c363ebb1a49f95e572667d580bc70aba",
           "block_height": 292469,
           "tx_input_n": -1,
           "tx_output_n": 0,
           "value": 500000,
           "spent": false,
           "confirmations": 59662,
           "confirmed": "2014-03-25T21:32:08Z",
           "double_spend": false
         },
         {
           "tx_hash": "0c83c8321537a7c79dc6214788944ba6cd5ea76f0594453b6251fcf1856f2e4b",
           "block_height": 292336,
           "tx_input_n": -1,
           "tx_output_n": 0,
           "value": 171116,
           "spent": false,
           "confirmations": 59795,
           "confirmed": "2014-03-25T00:07:31Z",
           "double_spend": false
         }
         ],
         "tx_url": "https://api.blockcypher.com/v1/btc/main/txs/",
         "error": "",
         "errors": []
     }
     */
     $txref = TXRefTest::getJson();
     return '{"address":"1DEP8i3QJCsomS4BSMY2RpU1upv62aGvhD","total_received":4433416,"total_sent":0,"balance":4433416,"unconfirmed_balance":0,"final_balance":4433416,"n_tx":7,"unconfirmed_n_tx":0,"final_n_tx":7,"txrefs":[' . $txref . '],"unconfirmed_txrefs":[' . $txref . '],"tx_url":"https://api.blockcypher.com/v1/btc/main/txs/","error":"","errors":[]}';
 }