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

# Api documentation

ANIMINE operates as a Web3 dApp, interacting directly with smart contracts deployed on the blockchain. Below is a list of the key contract methods used within the frontend application

#### 🧠 Smart Contract: ANIMINE Mining

**`getUserReward()`**

* **Type:** `view`
* **Description:** Returns the current ANIMINE token reward accumulated by the connected user.
* **Returns:** `uint256` (token amount in wei)

**`claimRewards()`**

* **Type:** `transaction`
* **Description:** Allows the user to claim their mined ANIMINE tokens.
* **Returns:** `transaction receipt`

**`buyMiner(uint8 tier)`**

* **Type:** `payable transaction`
* **Description:** Allows the user to purchase a Miner NFT of a specific tier.
* **Parameters:**
  * `tier` — The tier level of the Miner to buy (1, 2, or 3)
* **Returns:** `transaction receipt`

**`buyFacility(uint8 tier)`**

* **Type:** `payable transaction`
* **Description:** Purchases a Facility NFT of the specified tier.
* **Parameters:**
  * `tier` — Tier of the Facility (1, 2, or 3)
* **Returns:** `transaction receipt`

**`upgradeMiner(uint256 tokenId)`**

* **Type:** `transaction`
* **Description:** Upgrades the specified Miner to the next tier.
* **Parameters:**
  * `tokenId` — NFT token ID of the Miner to upgrade

**`upgradeFacility(uint256 tokenId)`**

* **Type:** `transaction`
* **Description:** Upgrades the specified Facility to the next tier.
* **Parameters:**
  * `tokenId` — NFT token ID of the Facility to upgrade

***

#### 🔐 Authentication

All API interactions are handled client-side through MetaMask or Web3 wallet connection. There is no centralized authentication system.

***

#### 📦 Network Information

* **Network:** Abstract Testnet (during testing) / Mainnet (production)
* **Chain ID (Testnet):** `11124`
* **Token Standard:** ERC-721 (for NFTs), ERC-20 (for ANIMINE token)

***

>
