---
title: "Get account module"
method: GET
path: "/accounts/{address}/module/{module_name}"
tags: ["Accounts"]
---

# Get account module

`GET /accounts/{address}/module/{module_name}`

Retrieves an individual module from a given account and at a specific ledger version. If the
ledger version is not specified in the request, the latest ledger version is used.

The Lumio nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.

## Path parameters

- `address` string, hex, required — A hex encoded 32 byte Lumio account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
- `module_name` string, required

## Query parameters

- `ledger_version` string, uint64 — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.

## Response `200`

- MoveModuleBytecode — Move module bytecode along with it's ABI
  - `bytecode` string, hex, required — All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte. Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
  - `abi` MoveModule — A Move module
    - `address` string, hex, required — A hex encoded 32 byte Lumio account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
    - `name` string, required
    - `friends` MoveModuleId[], required — Friends of the module
    - `exposed_functions` MoveFunction[], required — Public functions of the module
      - `name` string, required
      - `visibility` 'private' | 'public' | 'friend', required — Move function visibility
      - `is_entry` boolean, required — Whether the function can be called as an entry function directly in a transaction
      - `is_view` boolean, required — Whether the function is a view function or not
      - `generic_type_params` MoveFunctionGenericTypeParam[], required — Generic type params associated with the Move function
        - `constraints` MoveAbility[], required — Move abilities tied to the generic type param and associated with the function that uses it
      - `params` MoveType[], required — Parameters associated with the move function
      - `return` MoveType[], required — Return type of the function
    - `structs` MoveStruct[], required — Structs of the module
      - `name` string, required
      - `is_native` boolean, required — Whether the struct is a native struct of Move
      - `is_event` boolean, required — Whether the struct is marked with the #[event] annotation
      - `abilities` MoveAbility[], required — Abilities associated with the struct
      - `generic_type_params` MoveStructGenericTypeParam[], required — Generic types associated with the struct
        - `constraints` MoveAbility[], required — Move abilities tied to the generic type param and associated with the type that uses it
      - `fields` MoveStructField[], required — Fields associated with the struct
        - `name` string, required
        - `type` string, required — String representation of an on-chain Move type tag that is exposed in transaction payload. Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>` Vector type value examples: - `vector<u8>` - `vector<vector<u64>>` - `vector<0x1::coin::CoinStore<0x1::lumio_coin::LumioCoin>>` Struct type value examples: - `0x1::coin::CoinStore<0x1::lumio_coin::LumioCoin> - `0x1::account::Account` Note: 1. Empty chars should be ignored when comparing 2 struct tag ids. 2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).

## Other responses

- `400`
- `403`
- `404`
- `410`
- `500`
- `503`

---

[API](https://skmtc.net/pontem-network/apis/lumio-node-api.md) · [All operations](https://skmtc.net/pontem-network/apis/lumio-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pontem-network/lumio-node-api/revisions/385d1aaf056f/schema)
