https://github.com/marselester/blockchain-info
Go client for the Blockchain.info API
https://github.com/marselester/blockchain-info
Last synced: about 1 month ago
JSON representation
Go client for the Blockchain.info API
- Host: GitHub
- URL: https://github.com/marselester/blockchain-info
- Owner: marselester
- Created: 2016-02-24T03:15:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-28T11:44:07.000Z (about 9 years ago)
- Last Synced: 2024-05-02T00:41:48.397Z (about 1 year ago)
- Language: Go
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go client for [the Blockchain.info API](https://blockchain.info/api/blockchain_wallet_api)
The API client design is inspired by [go-github](https://github.com/google/go-github/)
and [stripe-go](https://github.com/stripe/stripe-go/).## Wallet API
### List Addresses
```go
walletID := "w1731"
walletPass := "R@GK"
apiCode := "123" // Set apiCode to bypass the request limiter.
c := blockchain.NewClient(nil, walletID, walletPass, apiCode)
fmt.Println(c.Wallet.Addresses())
// [{13R9dBgKwBP29JKo11zhfi74YuBsMxJ4qY 20090584076}]
```## Block Explorer API
### Get Address
Address represents https://blockchain.info/address/13R9dBgKwBP29JKo11zhfi74YuBsMxJ4qY?format=json
resource.```go
// Set apiCode to bypass the request limiter.
apiCode := "123"
c := blockchain.NewClient(nil, "", "", apiCode)
fmt.Println(c.Blockchain.Address("13R9dBgKwBP29JKo11zhfi74YuBsMxJ4qY"))
```## Testing
```shell
$ make test
$ make lint
```