https://github.com/kunal768/trustwallet
This Go program provides a simple API server for interacting with transactions on Ethereum
https://github.com/kunal768/trustwallet
blockchain ethereum
Last synced: 2 months ago
JSON representation
This Go program provides a simple API server for interacting with transactions on Ethereum
- Host: GitHub
- URL: https://github.com/kunal768/trustwallet
- Owner: kunal768
- Created: 2024-03-14T18:37:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-14T19:01:59.000Z (about 1 year ago)
- Last Synced: 2025-01-11T04:50:02.897Z (4 months ago)
- Topics: blockchain, ethereum
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TrustWallet Block Txn Parser Assignment
## How To Use
This Go program provides a simple API server for interacting with transactions on Ethereum
### API Endpoints & Example Responses
**1. Get Latest Block**
```bash
curl http://localhost:8080/currentBlock
```##### Response
```bash
Current block: 19434993%
```**2. Get Transactions for Address**
```bash
curl http://localhost:8080/transactions\?address\=0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5
```##### Response
```bash
{"address":"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5","inbound":null,"outbound":[{"hash":"0x0bfb1e7deddc65ad079cd49c88e3502325c44d0ee87ccf0217b09a3ed2b226d4","from":"0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5","to":"0x876528533158c07c1b87291c35f84104cd64ec01","value":"0x1b28bb3568448d2"}]}
```**3. Subscribe an Address**
```bash
curl -X POST http://localhost:8080/subscribe\?address\=0xf0588C1d1BCa1caDC91dFf8788a1BA123Afe5Cb2
```##### Response
```bash
Subscribed to address: 0xf0588C1d1BCa1caDC91dFf8788a1BA123Afe5Cb2%
```