Skip to content

Commit 64b298b

Browse files
committed
github markup update
1 parent f143b8f commit 64b298b

File tree

6 files changed

+49
-40
lines changed

6 files changed

+49
-40
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ An official PHP library for interacting with the blockchain.info API.
77
Getting Started
88
---------------
99

10-
Download the source or clone the repository. This php library works with the [Composer](https://getcomposer.org/) package manager. Navigate to the root of the repository and run
10+
Download the source or clone the repository. This php library works with the [Composer](https://getcomposer.org/) package manager. Navigate to the root of the repository and run
1111

1212
```
1313
$ composer install
1414
```
1515

16-
This will create the `/vendor` folder in the repository root.
16+
This will create the `/vendor` folder in the repository root.
1717

1818
In order to use Wallet and CreateWallet functionality, you must provide an URL to an instance of [service-my-wallet-v3](https://github.com/blockchain/service-my-wallet-v3).
1919
Before using these functionalities, call \Blockchain\Blockchain::setServiceUrl to set the URL to the instance of of [service-my-wallet-v3](https://github.com/blockchain/service-my-wallet-v3).
@@ -30,9 +30,9 @@ $Blockchain = new \Blockchain\Blockchain();
3030
$Blockchain->setServiceUrl('http://localhost:3000');
3131
```
3232

33-
All functionality is provided through the `Blockchain` object.
33+
All functionality is provided through the `Blockchain` object.
3434

35-
###Call Limits
35+
### Call Limits
3636

3737
The [official documentation](https://blockchain.info/api) lists API call limits, which may be bypassed with an API code. If you use a code, enter it when you create the `Blockchain` object:
3838

@@ -42,7 +42,7 @@ $Blockchain = new \Blockchain\Blockchain('http://localhost:3000', $my_api_code);
4242

4343
If you need an API code, you may request one [here](https://blockchain.info/api/api_create_code).
4444

45-
###Network Timeouts
45+
### Network Timeouts
4646

4747
Set the `cURL` timeout, in seconds, with the `setTimeout` member function:
4848

@@ -58,25 +58,25 @@ A Note about Bitcoin Values
5858

5959
All Bitcoin values returned by the API are in string float format, in order to preserve full value precision. It is recommended that all arithmetic operations performed on Bitcoin values within PHP utilize the `bcmath` functions as follows:
6060

61-
#####`bcadd` Add Two Numbers
61+
##### `bcadd` Add Two Numbers
6262

6363
```php
6464
$result = bcadd("101.234115", "34.92834753", 8); // "136.16246253"
6565
```
6666

67-
#####`bcsub` Subtract Two Numbers
67+
##### `bcsub` Subtract Two Numbers
6868

6969
```php
7070
$result = bcsub("101.234115", "34.92834753", 8); // "66.30576747"
7171
```
7272

73-
#####`bcmul` Multiply Two Numbers
73+
##### `bcmul` Multiply Two Numbers
7474

7575
```php
7676
$result = bcmul("101.234115", "34.92834753", 8); // "3535.940350613"
7777
```
7878

79-
#####`bcdiv` Divide Two Numbers
79+
##### `bcdiv` Divide Two Numbers
8080

8181
```php
8282
$result = bcdiv("101.234115", "34.92834753", 8); // "2.89833679"

docs/blockexplorer.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $val = $Blockchain->Explorer->someFunc($param);
99
```
1010

1111

12-
###Blocks
12+
### Blocks
1313

1414
Blocks may be queried in multiple ways: by the block hash, by the height in the blockchain, or by the block's index. Calls return `Block` objects. `getBlocksAtHeight` returns an array of `Block` objects.
1515

@@ -20,7 +20,7 @@ $block = $Blockchain->Explorer->getBlockByIndex($index_int);
2020
```
2121

2222

23-
###Transactions
23+
### Transactions
2424
Get a single transaction based on hash or index. Returns a `Transaction` object.
2525

2626
```php
@@ -29,7 +29,7 @@ $tx = $Blockchain->Explorer->getTransactionByIndex($index);
2929
```
3030

3131

32-
###Addresses
32+
### Addresses
3333
Get the details of an address, including a paged list of transactions. Returns an `Address` object.
3434

3535
```php
@@ -39,31 +39,31 @@ $address = $Blockchain->Explorer->getAddress($address, $limit, $offset);
3939
```
4040

4141

42-
###Unspent Outputs
42+
### Unspent Outputs
4343
Get an array of `UnspentOutput` objects for a given address.
4444

4545
```php
4646
$unspent = $Blockchain->Explorer->getUnspentOutputs($address);
4747
```
4848

4949

50-
###Latest Block
50+
### Latest Block
5151
Get the latest block on the main chain. Returns a simpler `LatestBlock` object;
5252

5353
```php
5454
$latest = $Blockchain->Explorer->getLatestBlock();
5555
```
5656

5757

58-
###Unconfirmed Transactions
58+
### Unconfirmed Transactions
5959
Get a list of unconfirmed transactions. Returns an array of `Transaction` objects.
6060

6161
```php
6262
$unconfirmed = $Blockchain->Explorer->getUnconfirmedTransactions();
6363
```
6464

6565

66-
###Simple Blocks
66+
### Simple Blocks
6767
Get blocks from a particular day or from a given mining pool. Return arrays of `SimpleBlock` objects.
6868

6969
```php
@@ -73,20 +73,20 @@ $simple_blocks = $Blockchain->Explorer->getBlocksByPool($pool_name);
7373
For a list of mining pool names, visit [this page](https://blockchain.info/pools).
7474

7575

76-
###Inventory Data
76+
### Inventory Data
7777
Gets data for recent blockchain entities, up to one hour old. Returns an `InventoryData` object.
7878

7979
```php
8080
$data = $Blockchain->Explorer->getInventoryData($hash);
8181
```
8282

8383

84-
Return Objects
85-
--------------
84+
Response Object Properties
85+
--------------------------
8686

8787
Calls to the API return first-class objects.
8888

89-
###Block
89+
### Block
9090

9191
```php
9292
class Block {
@@ -109,7 +109,7 @@ class Block {
109109
}
110110
```
111111

112-
###Transaction
112+
### Transaction
113113
```php
114114
class Transaction {
115115
public $double_spend = false; // bool
@@ -132,7 +132,7 @@ class Input {
132132
public $sequence; // int
133133
public $script_sig; // string
134134
public $coinbase = true; // bool
135-
135+
136136
// If coinbase is false, then the following fields are created
137137
public $n; // int
138138
public $value; // string, e.g. "12.64952835"

docs/create.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,24 @@ There are two ways to create wallets: provide an existing private key or let Blo
1919

2020
Please read the [offical documentation](https://blockchain.info/api/create_wallet) for important details.
2121

22-
###Create with Key
22+
### Create with Key
2323
Create a new wallet with a known private key. Returns a `WalletResponse` object.
2424

2525
```php
2626
$wallet = $Blockchain->Create->createWithKey($password, $privKey, $email=null, $label=null);
2727
```
2828

29-
###Create without Key
29+
### Create without Key
3030
Create a new wallet, letting Blockchain generate a new private key. Returns a `WalletResponse` object.
3131

3232
```php
3333
$wallet = $Blockchain->Create->create($password, $email=null, $label=null);
3434
```
3535

36-
###WalletResponse
36+
Response Object Properties
37+
--------------------------
38+
39+
### WalletResponse
3740
The `WalletResponse` object contains fields for the wallet identifier (`guid`), the `address` for receiving Bitcoin, and a `label` for the first account of the wallet.
3841

3942
```php

docs/rates.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ $rates = $Blockchain->Rates->get();
2929
foreach($rates as $cur=>$ticker) { ... }
3030
```
3131

32-
###Ticker
32+
Response Object Properties
33+
--------------------------
34+
35+
### Ticker
3336

3437
```php
3538
class Ticker {

docs/stats.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ $Blockchain = new \Blockchain\Blockchain($api_code);
1313
$stats = $Blockchain->Stats->get();
1414
```
1515

16-
###StatsReponse
16+
Response Object Properties
17+
--------------------------
18+
19+
### StatsReponse
1720

1821
```php
1922
class StatsResponse {

docs/wallet.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $Blockchain->Wallet->credentials('wallet-id-2', 'password-2', 'optional 2nd pass
2323
// ...
2424
```
2525

26-
###A Note About Bitcoin Values
26+
### A Note About Bitcoin Values
2727

2828
Values returned by this API are `string` representations of the floating point Bitcoin value, with 8 decimal places of precision, like this: `"105.62774000"`.
2929

@@ -32,7 +32,7 @@ Functions that send Bitcoin accept `float` and `string` Bitcoin amounts, NOT Sat
3232
Read more about string values on the [main documentation](../README.md).
3333

3434

35-
###Get Current Identifier
35+
### Get Current Identifier
3636
Use the `getIdentifier` function to check which wallet is active, without having to enter additional credentials. Returns a string.
3737

3838
```php
@@ -45,15 +45,15 @@ Balances
4545
Functions for fetching the balance of a whole wallet or of a particular address.
4646

4747

48-
###Wallet Balance
48+
### Wallet Balance
4949
Get the balance of the whole wallet. Returns a `string` representing the floating point balance, e.g. `"12.64952835"`.
5050

5151
```php
5252
$balance = $Blockchain->Wallet->getBalance();
5353
```
5454

5555

56-
###Address Balance
56+
### Address Balance
5757
Get the balance of a single wallet address. Returns a `WalletAddress` object.
5858

5959
```php
@@ -65,7 +65,7 @@ Transactions
6565
------------
6666
Functions for making outgoing Bitcoin transactions from the wallet.
6767

68-
###Send
68+
### Send
6969
Send Bitcoin to a single recipient address. The `$amount` field is either a `float` or `string` representation of the floating point value. See above note on Bitcoin values.
7070

7171
The optional `$from_address` field specifies which wallet address from which to send the funds. An optional `$fee` amount (`float`) may be specified but must be more than the default fee listed on the [official documentation](https://blockchain.info/api/blockchain_wallet_api).
@@ -81,7 +81,7 @@ $response = $Blockchain->Wallet->send($to_address, $amount, $from_address=null,
8181
$response = $Blockchain->Wallet->send("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "0.005", null, "0.0001", "Here you go, Satoshi!");
8282
```
8383

84-
###SendMany
84+
### SendMany
8585
Send a multi-recipient transaction to many addresses at once. The `$recipients` parameter is an associative array with `address` keys and `amount` values (see example). Optional parameters are the same as with the `send` call. Returns `PaymentResponse` object and throws a `Blockchain_ApiError` exception for insufficient funds, etc.
8686
```php
8787
$response = $Blockchain->Wallet->sendMany($recipients, $from_address=null, $fee=null, $public_note=null);
@@ -99,44 +99,44 @@ Address Management
9999
A wallet may contain many addresses, not all of which must be active at all times. Active addresses are monitored for activity, while archived addresses are not. It is recommended that addresses be archived when it is reasonable to assume that there will not be further activity to that address. For instance, after an invoice is filled, the payment address may be archived once the received coins are moved.
100100

101101

102-
###List Active Addresses
102+
### List Active Addresses
103103
Call `getAddresses` to return a list of the active addresses within the wallet. Returns an array of `WalletAddress` objects.
104104

105105
```php
106106
$addresses = $Blockchain->Wallet->getAddresses();
107107
```
108108

109109

110-
###Get New Address
110+
### Get New Address
111111
Generate a new Bitcoin address, with an optional label, less than 255 characters in length. Returns a `WalletAddress` object.
112112

113113
```php
114114
$address = $Blockchain->Wallet->getNewAddress($label=null);
115115
```
116116

117117

118-
###Archive Address
118+
### Archive Address
119119
Move an address to the archive. Returns `true` on success and `false` on failure.
120120

121121
```php
122122
$result = $Blockchain->Wallet->archiveAddress($address);
123123
```
124124

125125

126-
###Unrchive Address
126+
### Unrchive Address
127127
Move an address from the archive to the active address list. Returns `true` on success and `false` on failure.
128128

129129
```php
130130
$result = $Blockchain->Wallet->unarchiveAddress($address);
131131
```
132132

133133

134-
Return Objects
135-
--------------
134+
Response Object Properties
135+
--------------------------
136136

137137
Calls to the API usually return first-class objects.
138138

139-
###PaymentResponse
139+
### PaymentResponse
140140

141141
```php
142142
class PaymentResponse {

0 commit comments

Comments
 (0)