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

# Core Modules

### OnChainID Module (`sdk.onchainid`)

The identity module manages ONCHAINID identities and claims-the foundation of all compliance in the framework.

**Purpose:** Create and manage on-chain identities, issue KYC claims, and handle claim lifecycle operations.

**Key capabilities:**

* **Create identities** - Deploy an `Identity` contract linked to a user's wallet address
* **Retrieve identities** - Look up existing identity contracts by wallet address
* **Issue KYC claims** - Generate and sign claims that verify a user's identity
* **Issue Role claims** - Generate and sign claims that verify a particular role
* **Add claims to identities** - Attach signed claims to identity contracts
* **Remove claims** - Revoke claims when they are no longer valid

Every participant in the framework-whether an investor, machine issuer, or regulator-must have a verified identity with appropriate claims before they can interact with the system.

→ See [Identity SDK Reference](/peaqchain/sdk-reference/rwa/identity) for implementation details.

### Machine NFT Module (`sdk.mnft`)

The Machine NFT module handles the registration and management of tokenized physical assets.

<img src="https://mintcdn.com/peaq/C86GhL5V6forGVx7/assets/img/rwa-nfts.png?fit=max&auto=format&n=C86GhL5V6forGVx7&q=85&s=4061f49006bc43e4e55221483b5ea6ce" alt="Machine NFT Flow" width="1027" height="973" data-path="assets/img/rwa-nfts.png" />

**Purpose:** Register real-world machines as NFTs with embedded DID documents, and manage their lifecycle.

**Key capabilities:**

* **Ensure allowances** - Verify and approve ERC-20 allowances for registration fees
* **Register machines** - Mint MachineNFTs with associated DID documents that describe the physical asset
* **Read DID documents** - Retrieve the machine metadata stored on-chain

Each MachineNFT contains a Decentralized Identifier (DID) document that uniquely identifies the physical machine, including details like manufacturer, model, serial number, and other relevant metadata. This creates an immutable link between the on-chain token and the real-world asset.

→ See [Machine NFT SDK Reference](/peaqchain/sdk-reference/rwa/mnft) for implementation details.

### Contract NFT Module (`sdk.cnft`)

The Contract NFT module manages digital agreements between multiple parties.

**Purpose:** Create, sign, and manage multi-party contracts that are represented as NFTs on-chain.

**Key capabilities:**

* **Create contracts** - Initialize a new contract with specified counterparties and document hash
* **Sign contracts** - Allow counterparties to sign and finalize agreements
* **Cancel drafts** - Allow initiators to cancel contracts before all parties have signed
* **Verify contracts** - Validate that document content matches the on-chain hash

ContractNFTs store a hash of the actual document (which may be stored off-chain, e.g., on IPFS) and a URL to retrieve it. This ensures document integrity while keeping large files off the blockchain. Contracts can also be deposited into vaults alongside MachineNFTs.

→ See [Contract NFT SDK Reference](/peaqchain/sdk-reference/rwa/cnft) for implementation details.

### RWA NFT Factory Module (`sdk.rwanft`)

The RWA NFT factory module manages the top-level factory contract that coordinates machine issuers and regulators.

**Purpose:** Administrative operations for the PeaqRwaNft factory contract.

**Key capabilities:**

* **Manage machine regulators** - Add or remove addresses authorized to approve machine issuers
* **Manage machine issuers** - Register new issuers who can mint MachineNFTs
* **Emergency controls** - Block or unblock machine issuers and NFT operations

This module is primarily used by framework administrators rather than end users.

→ See [RWA NFT SDK Reference](/peaqchain/sdk-reference/rwa/rwanft) for implementation details.

### Vault Module (`sdk.vault`)

The Vault module enables the fractionalization of assets into security tokens and manages yield distribution.

<img src="https://mintcdn.com/peaq/C86GhL5V6forGVx7/assets/img/rwa-vault.png?fit=max&auto=format&n=C86GhL5V6forGVx7&q=85&s=f9a177c387dc6fba4d299616da230846" alt="Vault Operations" width="1288" height="776" data-path="assets/img/rwa-vault.png" />

**Purpose:** Create vaults that hold MachineNFTs and ContractNFTs, fractionalize them into security tokens, and distribute yield to token holders.

**Key capabilities:**

* **Create vaults** - Deploy new vault instances with associated security tokens and reward distributors
* **Pause/unpause tokens** - Control token transferability for regulatory or emergency purposes
* **Register identities** - Add verified identities to the vault's identity registry (required for token holders)
* **Deposit and mint** - Lock NFTs in a vault and mint security tokens representing fractional ownership
* **Deposit yield** - Add revenue to the vault for distribution to token holders
* **Claim yield** - Allow token holders to withdraw their share of accumulated yield
* **Transfer tokens** - Move security tokens between verified holders

Security tokens issued by vaults comply with the T-REX (ERC-3643) standard, meaning they have built-in compliance checks that ensure only verified (KYC'd) addresses can hold and transfer them.

→ See [Vault SDK Reference](/peaqchain/sdk-reference/rwa/vault) for implementation details.

## Roles in the Ecosystem

The RWA Framework defines several key roles, each with specific responsibilities and required claims:

| Role                  | Description                                                                         | Required Claim             |
| --------------------- | ----------------------------------------------------------------------------------- | -------------------------- |
| **Framework Owner**   | Administers the entire framework, manages trusted claim issuers, and creates vaults | Admin access               |
| **Claim Issuer**      | Issues KYC and role claims to users after verification                              | Trusted by Framework Owner |
| **Machine Regulator** | Approves machine issuers and oversees their operations                              | `CT_MNFT_REGULATOR`        |
| **Machine Issuer**    | Registers physical machines as MachineNFTs                                          | `CT_MNFT_ISSUER`           |
| **User / Investor**   | Owns MachineNFTs, holds security tokens, and receives yield                         | `CT_KYC_APPROVED`          |
