<!-- Source: https://docs.paxeer.app/installation/ -->

# Installation & Build

How to build and install the paxd node binary.

**Source:** `paxeer-network/Makefile` and `paxeer-network/README.md`

## Prerequisites

- **Go:** 1.25.6 or the toolchain required by the selected revision

- **Make:** Standard build tool

- **Git:** For cloning the repository

- **Native toolchain:** GCC and the native libraries required by the selected build. Use `LEDGER_ENABLED=false` to disable the optional Ledger build tag.

## Repository Location

Paxeer Network lives in the [Sidiora-Labs/LayerX-Network](https://github.com/Sidiora-Labs/LayerX-Network) monorepo under `paxeer-network/`.

```
git clone https://github.com/Sidiora-Labs/LayerX-Network.git
cd LayerX-Network/paxeer-network
```

## Build from Monorepo Root

From the **monorepo root**, use these namespaced targets:

```
make paxeer-build    # Build paxd binary to paxeer-network/build/paxd
make paxeer-lint     # Run linters
make paxeer-test     # Run tests
make paxeer-ci       # Lint + test (CI gate)
```

`make monorepo-ci` at the repository root composes the LayerX Network gate with `make paxeer-ci`.

## Build from paxeer-network/ Directory

From **within `paxeer-network/`**:

```
make build    # Build to ./build/paxd
make install  # Install with go install ./daemon/paxd
make lint     # Run linters
make test     # Run tests
make ci       # Lint + test
```

### Build Output

The `paxd` binary is written to:

- `./build/paxd` when using `make build`

- `$GOBIN/paxd` when GOBIN is set, otherwise `$(go env GOPATH)/bin/paxd`, when using `make install`

## Build Tags and Flags

### Ledger Support

Ledger hardware wallet support is enabled by default. To build without ledger:

```
make build LEDGER_ENABLED=false
```

### Mock Balances (Testing)

For testing with mock balances:

```
make install-mock-balances
```

### Benchmark Build

For benchmark runs:

```
make install-bench
```

## Version Information

The Makefile resolves version from Git tags or branch names. Paxeer releases use namespaced tags:

```
paxeer-network/vX.Y.Z
```

Version information is embedded in the binary at build time via linker flags:

- `Name`: paxeer

- `AppName`: paxd

- `Version`: Resolved from tag/branch

- `Commit`: Git commit SHA

Check version:

```
paxd version
```

## Static Linking

To build a statically-linked binary:

```
make build LINK_STATICALLY=true
```

## Go Module

Paxeer is a separate Go module:

```
module github.com/sidiora-labs/paxeer-network

go 1.25.6
```

**Note:** Paxeer maintains its own `go.mod`, `go.sum`, and dependency tree separate from the LayerX monorepo root.

## Foundry (Contracts)

Paxeer-native contracts use Foundry:

```
# From the monorepo root
cd paxeer-network
forge install
forge build
```

See `paxeer-network/contracts/README.md` for contract-specific instructions.

**Important:** `paxeer-network/contracts/` contains Paxeer-native contracts (WPAX, pointers, precompile interfaces). LayerX settlement contracts are at `contracts/` in the repository root.

## Docker

Local Docker cluster targets are available. See [Docker documentation](https://docs.paxeer.app/docker) for:

- `make docker-cluster-start`

- `make run-local-node`

- Compose configurations in `docker/`

## Choose a Node Configuration

Use the local Docker configuration to try the built binary, or initialize a node with the genesis, peers, and mode for your chosen network. For an existing network, select the binary revision specified by its upgrade plan.

## Next Steps

- [Run a node](https://docs.paxeer.app/run-node)

- [Configure paxd](https://docs.paxeer.app/configuration)

- [Use Docker for local testing](https://docs.paxeer.app/docker)
