Endpoints
| Method | Endpoint | Description |
|---|
POST | /venue-tx-hashes | Save a venue transaction hash |
GET | /venue-tx-hashes | Query tx hashes by filters |
GET | /venue-tx-hashes/verify/:txHash | Verify a specific tx hash |
POST /venue-tx-hashes
Record a transaction hash with venue and action metadata.
Request Body
{
address: string; // User wallet address
txHash: Hash; // Transaction hash
actionType: string; // Action type (e.g., "swap", "deposit", "withdraw")
venue: string; // Venue identifier (e.g., "uniswap", "aave")
chainId: number; // Chain ID
}
Response
Success (200)
Error (400)
{
"success": false,
"error": {
"message": "Missing txHash, address, actionType, venue, or chainId"
}
}
Example
curl -X POST /venue-tx-hashes \
-H "Content-Type: application/json" \
-d '{
"address": "0x742d35Cc6634C0532925a3b844e4B7db0D6d8E5c",
"txHash": "0x1234567890abcdef...",
"actionType": "swap",
"venue": "uniswap",
"chainId": 84532
}'
GET /venue-tx-hashes
Query transaction hashes by address with optional filters.
Query Parameters
| Parameter | Type | Required | Description |
|---|
address | string | Yes | User wallet address |
actionTypes | string[] | No | Filter by action type(s) |
venue | string | No | Filter by venue |
count | number | No | Max results to return (default: 1) |
Response
Success (200)
{
"success": true,
"data": {
"txHashes": [
{
"address": "0x742d35Cc6634C0532925a3b844e4B7db0D6d8E5c",
"txHash": "0x1234567890abcdef...",
"actionType": "swap",
"venue": "uniswap",
"chainId": 84532
}
]
}
}
success is true only if the number of results matches the requested count.
Example
# Get latest swap tx from uniswap for an address
curl "/venue-tx-hashes?address=0x742d35...&actionTypes=swap&venue=uniswap&count=1"
# Get last 5 transactions for an address
curl "/venue-tx-hashes?address=0x742d35...&count=5"
GET /venue-tx-hashes/verify/:txHash
Verify that a specific transaction hash exists with expected metadata.
Path Parameters
| Parameter | Type | Required | Description |
|---|
txHash | string | Yes | Transaction hash |
Query Parameters
| Parameter | Type | Required | Description |
|---|
actionType | string | No | Expected action type |
venue | string | No | Expected venue |
Response
Found (200)
{
"success": true,
"data": {
"address": "0x742d35Cc6634C0532925a3b844e4B7db0D6d8E5c",
"txHash": "0x1234567890abcdef...",
"actionType": "swap",
"venue": "uniswap",
"chainId": 84532
}
}
Not Found (404)
{
"success": false,
"error": {
"message": "Transaction hash not found"
}
}
Example
# Verify a swap tx exists for uniswap
curl "/venue-tx-hashes/verify/0x1234...?actionType=swap&venue=uniswap"
Use Cases
- Transaction Tracking: Store transaction references for user activity history
- Verification: Confirm a user completed a specific action on a venue
- Rewards/Incentives: Verify user actions for reward eligibility