module
Get a single indexed module by specifier, including its source.
Endpoint
/v1/CHAIN/NETWORK/module/:mod
Description
Returns one row from the node’s Module table for the given module specifier.
The path parameter mod is a revision-style string of the form <transaction-id>:<output-number> (typically <txId>:0 as returned by computer.deploy).
This endpoint returns the stored source string. It does not evaluate the module. On the client, use computer.getModule for the same row, or computer.load to import exports in a SES compartment.
Path Parameters
Example
Request
curl -X GET "http://localhost:1031/v1/LTC/regtest/module/a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458:0"
Response
Success (200)
{
"mod": "a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458:0",
"ept": "export class Counter extends Contract {\n constructor() { super({ n: 0 }) }\n inc() { this.n += 1 }\n}\n",
"storageType": "taproot",
"blockHash": "00000000000000000000000000000000000000000000000000000000000000ff",
"blockHeight": 104,
"timestamp": "2026-07-22T12:00:00.000Z"
}
Validation error (400)
{ "error": "Invalid module specifier" }
Not found (404)
{ "error": "Module not found" }
Server error (500)
{ "error": "Internal server error message" }
See also
- modules — list indexed modules
- Client: getModule, deploy / load
- Operate & Troubleshoot — 404 / not indexed / schema missing
- deploy / load — client-side deploy and load