Verify Ethereum Asset
Ethereum Asset Verification API
The Ethereum Asset Verification API allows developers to verify whether a user holds specific assets on the Ethereum mainnet, including ERC20 tokens and NFTs (ERC721). This API is crucial for integrating asset verification into decentralized applications (dApps) and services built on Ethereum, enabling secure and reliable checks for asset ownership directly on the Ethereum blockchain.
Asset Verification API
This API allows you to verify if a user holds a specific asset on the Ethereum mainnet, including ERC20 and ERC721 tokens.
Endpoint:
Headers:
Content-Type: application/json
Request Body:
user_address: The Ethereum address of the user whose asset holdings are being verified.
contract_address: The address of the ERC20 or ERC721 contract.
Sample Response:
status: HTTP status code (200 indicates success).
message: A message indicating the result of the query.
Error Handling
In the event of an error, the API will return a response with the appropriate HTTP status code and an error message. Common error codes include:
400: Bad Request - The request parameters are invalid.
401: Unauthorized - The GR1D_API_KEY is missing or invalid.
404: Not Found - The specified contract_address or user_address
Security Considerations
API Key Management: Ensure that the GR1D_API_KEY is kept secure and never exposed in client-side code or public repositories.
Data Integrity: The query results are signed by Wormhole guardians, ensuring data integrity across chains.
Rate Limiting: Be aware of any rate limits imposed on the API to prevent abuse and ensure fair usage.
Examples and Edge Cases
ERC20 Token Verification:
Expected response: The balance field will indicate the number of ERC20 tokens held by the user.
ERC721 Token Verification:
Expected response: The balance field will indicate the number of ERC721 tokens (or assets) held by the user.