Skip to main content

List Modules

Retrieves a list of HDP modules. Can be filtered to show only marketplace-published modules or modules by a specific creator. This endpoint does not require authentication.

Endpoint

GET /modules

Query Parameters

ParameterTypeRequiredDescription
marketplacebooleanNoIf true, returns only modules published on the marketplace
creator_userstringNoFilter modules by creator user identifier

Example Requests

List all modules

curl -X GET https://staging.hdp.api.herodotus.cloud/modules \
  -H "Content-Type: application/json"

List only marketplace modules

curl -X GET "https://staging.hdp.api.herodotus.cloud/modules?marketplace=true" \
  -H "Content-Type: application/json"

List modules by creator

curl -X GET "https://staging.hdp.api.herodotus.cloud/modules?creator_user=user@example.com" \
  -H "Content-Type: application/json"

Response

Success Response (200 OK)

{
  "modules": [
    {
      "id": "01JPJ03YJT1A93D6NF56G4GVEQ",
      "latestModuleVersionProgramHash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
      "compilerVersion": "2.7.0",
      "name": "my_module",
      "description": "My awesome HDP module",
      "usageCount": 42,
      "tags": ["example", "tutorial"],
      "downloadsCount": 100,
      "usersCount": 25,
      "isVerified": false,
      "publishedOnMarketplace": true,
      "creatorUser": "user@example.com",
      "license": "MIT",
      "abi": {
        "type": "interface",
        "items": []
      },
      "sourceCode": {
        "src/lib.cairo": "fn main() {}"
      },
      "scarbToml": "[package]\nname = \"my_module\"\n...",
      "createdAt": "2024-03-17T10:24:00Z",
      "updatedAt": "2024-03-17T10:25:00Z"
    }
  ]
}

Response Fields

FieldTypeDescription
modulesarrayArray of module objects
Each module object has the same structure as described in the Get Module endpoint.

Notes

  • No authentication is required for this endpoint
  • If marketplace=true is specified, only published modules are returned
  • If creator_user is specified, only modules created by that user are returned
  • If neither parameter is specified, all modules are returned
  • The response includes full module details including source code and ABI