> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started with LegalLab

> Connect to a Neuron, apply for a Legal Identity, and design your first smart contract template using LegalLab

[LegalLab](https://github.com/Trust-Anchor-Group/LegalLab) is a desktop tool for designing and managing smart contract templates on the Neuron platform. It connects directly to a Neuron via XMPP and provides a GUI for applying for Legal Identities, managing wallets, and proposing contract templates for approval.

<Note>
  LegalLab is a developer and operator tool. You will need either an existing Neuron account or an API key and secret to create one.
</Note>

## Installation

Download and install LegalLab using the Click-Once installer:

```text theme={null}
https://lab.tagroot.io/Downloads/LegalLab/setup.exe
```

Once installed, launch LegalLab from the Start menu. Always run it in **debug mode** in Visual Studio if you are building from source.

## Step 1: Connect to a Neuron

Navigate to the **Network ID** tab. Fill in the connection fields:

**If you already have an account:**

1. Enter the **XMPP server** (your Neuron domain).
2. Enter your **Account** name and **Password**.
3. Click **Connect**.

**If you need to create a new account:**

1. Enter the **XMPP server** and desired **Account** name.
2. Create a password — use the **Randomize Password** button for sufficient entropy.
3. Check **Create Account, if none exists**.
4. Repeat the password.
5. Enter your **API Key** and **API Secret** — find these under API Keys in the Neuron admin dashboard, or request them via the Neuron's Feedback page.
6. Leave remaining checkboxes unticked.
7. Click **Connect**.

<Tip>
  Save your credentials by clicking **Save Credentials** so you do not need to re-enter them on the next launch. The XMPP sniffer on the right side of the window logs all communication — useful for debugging and learning the underlying protocol.
</Tip>

## Step 2: Apply for a legal identity

To sign and manage smart contracts, you need a Digital Identity on the Neuron.

1. Navigate to the **Legal ID** tab.
2. Fill in the required personal and/or organization information.
3. Click **Apply**.

The application status will appear in the console on the right. Possible values are:

| Status        | Meaning                                                   |
| ------------- | --------------------------------------------------------- |
| `Created`     | Application submitted, awaiting review                    |
| `Approved`    | Identity approved — you can now sign contracts            |
| `Rejected`    | Application was rejected — review the reason and re-apply |
| `Obsolete`    | Identity has been superseded by a newer one               |
| `Compromised` | Identity has been flagged as compromised                  |

If you have access to the Neuron admin dashboard, you can manually approve an identity application under **Notarius Electronicus → Pending Identity Applications**. Otherwise, contact a Neuron operator.

## Step 3: Explore your wallet

Navigate to the **Wallet** tab to see your eDaler balance and transaction history. From here you can also process eDaler URIs and initiate buy, sell, or transfer flows — depending on which service providers are configured on the Neuron.

<Note>
  eDaler is the electronic token used for cross-domain value transfer on the Neuron platform. What it represents is defined by the Neuron operator.
</Note>

## Step 4: View your tokens

The **Tokens** tab lists all Neuro-Feature tokens associated with your account. Clicking a token shows its additional details and available note commands.

## Step 5: Design a contract template

Navigate to the **Design** tab to create or load smart contract templates.

* Use the **Load** button to open an existing template from the [LegalLab example contracts](https://github.com/Trust-Anchor-Group/LegalLab/tree/main/ExampleContracts) to explore the format.
* Edit the template XML directly in the editor, or use the parameter and role controls in the UI.
* When ready, click **Propose** to submit the template to the Neuron for operator approval.

<Warning>
  Always verify that the human-readable and machine-readable sections of a contract are consistent before proposing. The Trust Provider approving the template is responsible for this integrity check — if they are inconsistent the template will be rejected.
</Warning>

## Step 6: Approve a contract template

Once proposed, an operator must review and approve the template before it can be used.

1. Go to the Neuron admin dashboard.
2. Navigate to **Notarius Electronicus → Pending Smart Contract Proposals**.
3. Select the proposal and review both its human-readable and machine-readable content.
4. Click **Approve**, **Reject**, or send a message back to the creator.

## Step 7: Create a contract from a template

Once a template is approved, navigate to the **Create Contract** tab to instantiate contracts from it. Set the required parameter values and role assignments, then sign the contract.

## Next steps

* Browse the [LegalLab example contracts](https://github.com/Trust-Anchor-Group/LegalLab/tree/main/ExampleContracts) for templates covering tokens, state machines, voting, and transfers.
* Read [Smart contracts](/overview/smart-contracts) for a conceptual overview of how contracts work on the platform.
* Explore [Tokens](/overview/tokens) to understand Neuro-Feature tokens and how state machines drive their lifecycle.
