Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzushioh committed Feb 23, 2018
1 parent fa24df6 commit 573a832
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ EthereumKit is a Swift framework that enables you to create Ethereum wallet and
- [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)/[BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) HD wallet
- [EIP55](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md) format address encoding
- See currency balance of an address.
- Get transactions of an address.

## How to Use

Expand Down Expand Up @@ -119,6 +120,58 @@ geth.getAccount(address: "0x91c79f31De5208fadCbF83f0a7B0A9b6d8aBA90F") { result
}
```

***

#### `GetTransactionCount`

Returns a number of transactions that a specified address has.

##### Parameters

1. `address` - the Address you want to get a balance of.
2. `blockParameter`: based on what block parameter you want to see a balance. default is `latest`. see the [default block parameter](#the-default-block-parameter).

##### Returns

A number of transactions the specified address has.

##### Example
```swift
let geth = Geth(network: .test)
geth.getTransactionCount(address: "0x91c79f31De5208fadCbF83f0a7B0A9b6d8aBA90F") { result in
// do something...
}
```

## Etherscan API

***

#### `GetTransactions`

Return a list of transactions of specified address

##### Parameters

1. `address` - the Address you want to get a balance of.
2. `sort` - asc or des
3. `startblock` - from which block you want to search
4. `endblock` - to which block you want to search

##### Returns

List of `Transaction` of specified address.

##### Example
```swift
let geth = Geth(network: .test)
geth.getTransactions(address: "0x91c79f31De5208fadCbF83f0a7B0A9b6d8aBA90F", sort: .asc, startBlock: 0, endBlock: 9999999) { result in
// do something...
}
```

## Installation
#### [Carthage](https://github.com/Carthage/Carthage)

Expand Down

0 comments on commit 573a832

Please sign in to comment.