Skip to content

Commit 6365b7c

Browse files
committed
doc: update README.md
1 parent 8dd7500 commit 6365b7c

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PHP client for [Etherscan API](https://docs.etherscan.io) (and its families like
1111
## Installation
1212

1313
```bash
14-
composer req seregazhuk/etherscan-api
14+
composer req seregazhuk/etherscan-api:dev-main
1515
```
1616

1717
## Quick Start
@@ -33,22 +33,25 @@ echo $isConfirmed ? 'Confirmed' : 'Not confirmed';
3333

3434
### Accounts
3535

36-
https://docs.etherscan.io/api-endpoints/accounts#get-ether-balance-for-a-single-address
37-
Get Ether balance for a single address:
36+
[Get Ether balance for a single address](https://docs.etherscan.io/api-endpoints/accounts#get-ether-balance-for-a-single-address):
3837

3938
```php
40-
$balance = $this->accounts->getBalance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');
39+
$balance = $etherscan->accounts->getBalance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');
4140
```
4241

43-
https://docs.etherscan.io/api-endpoints/accounts#get-ether-balance-for-multiple-addresses-in-a-single-call
4442
Get Ether balance for multiple addresses in a single call:
4543

4644
```php
47-
$balances = $this->accounts->getBalances(['0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a', '0x63a9975ba31b0b9626b34300f7f627147df1f526']);
45+
$balances = $etherscan->accounts->getBalances(['0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a', '0x63a9975ba31b0b9626b34300f7f627147df1f526']);
4846
```
4947

50-
https://docs.etherscan.io/api-endpoints/accounts#get-a-list-of-normal-transactions-by-address
51-
Get a list of 'Normal' transactions by address:
48+
[Get a list of 'Normal' transactions by address](https://docs.etherscan.io/api-reference/endpoint/txlist):
5249
```php
53-
$transactions = $this->accounts->getTransactions('0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC');
50+
$transactions = $etherscan->accounts->getTransactions('0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC');
5451
```
52+
53+
[Get a list of internal transactions by hash](https://docs.etherscan.io/api-reference/endpoint/txlistinternal-txhash):
54+
```php
55+
$transactions = $etherscan->accounts->getInternalTransactionsByHash('0x40eb908387324f2b575b4879cd9d7188f69c8fc9d87c901b9e2daaea4b442170');
56+
```
57+

src/Module/Accounts/Accounts.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ final class Accounts
2323
public function __construct(private readonly EtherscanClient $client) {}
2424

2525
/**
26-
* @see https://docs.etherscan.io/api-endpoints/accounts#get-ether-balance-for-a-single-address
26+
* Get Native Balance for an Address
27+
* @see https://docs.etherscan.io/api-reference/endpoint/balance
2728
*/
2829
public function getBalance(string $address, AccountBalanceTag $tag = AccountBalanceTag::LATEST): BigInteger
2930
{
@@ -40,8 +41,6 @@ public function getBalance(string $address, AccountBalanceTag $tag = AccountBala
4041
}
4142

4243
/**
43-
* @see https://docs.etherscan.io/api-endpoints/accounts#get-ether-balance-for-multiple-addresses-in-a-single-call
44-
*
4544
* @param string[] $addresses
4645
* @return Balance[]
4746
*/
@@ -62,7 +61,7 @@ public function getBalances(array $addresses, AccountBalanceTag $tag = AccountBa
6261
}
6362

6463
/**
65-
* @see https://docs.etherscan.io/api-endpoints/accounts#get-a-list-of-normal-transactions-by-address
64+
* @see https://docs.etherscan.io/api-reference/endpoint/txlist
6665
* @return NormalTransaction[]
6766
*/
6867
public function getTransactions(string $address, int $page = 1, int $offset = 10): array
@@ -124,7 +123,7 @@ public function getTransactions(string $address, int $page = 1, int $offset = 10
124123
}
125124

126125
/**
127-
* @see https://docs.etherscan.io/api-endpoints/accounts#get-a-list-of-internal-transactions-by-address
126+
* @see https://docs.etherscan.io/api-reference/endpoint/txlistinternal-txhash
128127
* @return InternalTransaction[]
129128
*/
130129
public function getInternalTransactionsByHash(string $hash, int $page = 1, int $offset = 10): array

0 commit comments

Comments
 (0)