> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/developers-guides/scripting/modules.md).

# Modules

Index of the platform modules a script can import - twc/secrets, twc/secutix and twc/apple-music - and how modules differ from globals.

Globals such as `fetch` are always there. Modules are different: they cover capabilities that not every script needs, such as reading a secret or calling Secutix, and they are brought in with an `import` line at the top of the file. A script file can import only these platform modules: files cannot import each other, so shared helpers are written in the file that uses them.

## Available modules

| Module                                                                                                | Exports                                                                               | Purpose                                     |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------- |
| [`twc/secrets`](https://docs.thewalletcrew.io/developers-guides/scripting/modules/secrets.md)         | `getSecret`                                                                           | Reads a secret of the tenant.               |
| [`twc/secutix`](https://docs.thewalletcrew.io/developers-guides/scripting/modules/secutix.md)         | `fetch`                                                                               | Calls the Secutix connection of the tenant. |
| [`twc/apple-music`](https://docs.thewalletcrew.io/developers-guides/scripting/modules/apple-music.md) | `semantics`, `getArtistId`, `getAlbumId`, `getPlaylistId`, `find`, `search`, `lookup` | Resolves names to Apple Music catalog IDs.  |

The obsolete names `neo/secrets` and `neo/secutix` still work; see [Obsolete neostore names](https://docs.thewalletcrew.io/developers-guides/scripting/modules/obsolete-neo-names.md), the catalog of every legacy name. Documentation and new scripts use `twc/` everywhere. The prefix `neostore` is the platform's former name and is kept in technical identifiers.

## Importing

An import is a standard ES module import, written before the default export of the file.

```js
import { getSecret } from "twc/secrets";
import { semantics } from "twc/apple-music";

export default function (context) {
  // register handlers
}
```

The module name is matched exactly, with its prefix, and is case-sensitive. A name that matches no module makes the file fail to load, and a file that fails to load makes all script endpoints of the tenant fail, as described in [How scripts run](https://docs.thewalletcrew.io/developers-guides/scripting/how-scripts-run.md). Imported functions are asynchronous: they are awaited, inside an `async` function. The editor of the advanced configuration offers completion for the exports of each module.

## Modules and globals

Globals, documented on [Globals](https://docs.thewalletcrew.io/developers-guides/scripting/globals.md), need no import and are the same everywhere. A module can export a name that is also a global, as `twc/secutix` does with `fetch`; the import then replaces the global inside that file, and an alias (`import { fetch as secutixFetch } ...`) keeps both available.

## FAQ

<details>

<summary><strong>Can a script import a package from npm?</strong></summary>

No. Scripts run on the platform's own JavaScript engine, and the available libraries are the globals and modules listed on these pages.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/developers-guides/scripting/modules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
