Skip to main content
This page documents the Gasolina REST API endpoints, request/response formats, and integration patterns. The Gasolina API is a lightweight service that verifies LayerZero messages and produces signatures for DVN contracts.

Base URL

After deploying Gasolina, your API will be available at:
  • AWS: https://<api-gateway-id>.execute-api.<region>.amazonaws.com
  • GCP: https://<service-name>-<hash>.a.run.app

Endpoints

Health Check

Verify that the Gasolina service is running.
Response:
Example:

Get Signer Info

Retrieve the signer addresses registered with this Gasolina instance for a specific chain.
Query Parameters: Response:
Example:
Response:
The signer addresses returned here are what LayerZero uses when deploying the DVN contracts. These addresses must match the signers registered in the onchain DVN contract.

Request Signatures

Request signatures for a LayerZero message verification. This is the primary endpoint called by Essence to obtain verification signatures.
Request Body:
Response:
Example Request:
Example Response:

Request Parameters Reference

lzMessageId Object

Top-Level Fields

ULN Version Selection


Error Responses

HTTP Status Codes

Common Error Scenarios

Chain Not Supported

Solution: Ensure the chain is listed in your availableChainNames configuration and has RPC providers configured.

Message Not Found

Solution: Verify the transaction hash is correct and the transaction has been mined. Check that your RPC providers are synced.

Block Confirmations Not Met

Solution: Wait for more blocks to be mined before retrying the request.

RPC Provider Error

Solution: Check RPC provider configuration and ensure endpoints are accessible. Consider adding backup providers.

Testing Your API

Using the Test Script

Both gasolina-aws and gasolina-gcp include a test script:
Options: Successful Response:

Manual Testing

  1. Test health check:
  1. Test signer info:
  1. Test with sample message:

Extra Context Verification API

If you’ve configured extra context verification, Gasolina will call your custom API for additional validation.

Request Format (to your API)

Expected Response

Your API should return a boolean indicating whether the message should be signed:
Or to reject:

Rate Limiting Considerations

While Gasolina doesn’t implement rate limiting by default, consider these factors:
  1. RPC Provider Limits: Your RPC providers may have rate limits that affect signature generation speed.
  2. Cloud Provider Limits:
    • AWS API Gateway has default throttling limits
    • GCP Cloud Run has concurrency limits
  3. Scaling:
    • AWS ECS auto-scales based on CPU/memory
    • GCP Cloud Run auto-scales based on request volume

Security Considerations

  1. No Authentication by Default: The API is publicly accessible. Consider adding:
    • IP allowlisting at the load balancer level
    • API key authentication if needed
    • VPC/private endpoints for internal access
  2. Signer Key Security:
    • Keys are never exposed via the API
    • Only signatures are returned, not private key material
  3. Request Validation:
    • Gasolina independently verifies events via RPC
    • Block confirmation requirements are enforced
    • Invalid requests are rejected before signing