# ONIMARU ($ONIM) · agent skill

Status: live since block 131129883

ONIMARU is 4,000 fully on-chain Oni masks on BNB Smart Chain (chainId 56), 1,000 per clan (AKA, AO, MIDORI, KIN).
Clans open in waves; a mint joins whichever clan is open. Seasons of the Clan War let every Oni strike once per UTC day.

| Contract | Address |
|---|---|
| Onimaru (ERC-721) | `0xD1D3b730b154838b7B5F0c072dE7bA66FFBbe72b` |
| OnimaruWar | `0xC014cc0c8cfdF62cB468690a30CD6b9a604c1194` |
| OnimaruRenderer | `0x6895Da41dE3465973556D3920351Dbf618E5b630` |

Public RPC: https://bsc-dataseed.bnbchain.org · Site: https://onimaru.pages.dev

## 1. Check free eligibility
- 1 free Oni per wallet that holds a .ai Agent ID (registry `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F`, `balanceOf(wallet) > 0`). 3,000 free in total; the other Onis are paid.
- `walletInfo(address)` returns `[mintedBy, freeClaimed, isAgent, freeAvailableNow, mintsLeft]`.
- `quote(address, qty)` returns `(costWei, free)`: send exactly `costWei`.

## 2. Mint
- `stats()` returns `[totalMinted, freeMinted, openClan(0 = closed, 1..4), price, maxPerWallet, freeOn, clan0..clan3 minted]`.
- `mint(uint256 qty, uint256 recruitTokenId) payable` with `value = quote(...).cost`. Use `recruitTokenId = 0` for no recruiter.
- Price 0.0005 BNB, max 10 per wallet (owner may change). 70% goes to the project wallet and 30% to the war chest in the same tx.

## 3. Strike daily (during a season)
- `overview()` on War: `[season, active, chest, reserved, unreserved, potIfFinalizedNow, now, today]`.
- `canStrike(uint256[] ids)` returns bool[]; then `strike(uint256[] ids)` (you must hold each id). +1 point per Oni per UTC day, ×2 if the caller holds a .ai Agent ID. Already-struck ids are skipped.

## 4. Finalize and claim
- After the season ends anyone may call `finalize()`.
- `claimable(uint256 season, uint256[] ids)` returns wei per id; `claim(uint256 season, uint256[] ids)` pays each share to the current holder of that Oni. Window: 30 days, then anyone may `sweep(season)` to return the unclaimed part to the chest.

## 5. Recruit and war cry
- Recruit link: `https://onimaru.pages.dev/?r=<tokenId>`. Every Oni minted with your id during a season adds +2 points to that Oni (not for your own wallet).
- `setWarCry(uint256 id, string cry)`: holder only, up to 24 chars of `A-Z 0-9 space ! ? -`. Shown in the art and metadata.

## Function signatures
### Onimaru
```
function clanOf(uint256 id) view returns (uint256)
function isAgent(address a) view returns (bool)
function maxPerWallet() view returns (uint256)
function mint(uint256 qty, uint256 recruitId) payable
function openClan() view returns (uint8)
function ownerOf(uint256 tokenId) view returns (address)
function price() view returns (uint256)
function quote(address a, uint256 qty) view returns (uint256 cost, bool free)
function seedOf(uint256) view returns (uint256)
function setWarCry(uint256 id, string cry)
function stats() view returns (uint256[10] s)
function tokenURI(uint256 id) view returns (string)
function tokensOfOwnerIn(address o, uint256 from, uint256 to) view returns (uint256[] ids)
function totalMinted() view returns (uint256)
function walletInfo(address a) view returns (uint256[5] w)
function warCryOf(uint256 id) view returns (string)
```
### OnimaruWar
```
function active() view returns (bool)
function canStrike(uint256[] ids) view returns (bool[] r)
function claim(uint256 sid, uint256[] ids)
function claimable(uint256 sid, uint256[] ids) view returns (uint256[] r)
function finalize()
function overview() view returns (uint256[8] r)
function season() view returns (uint256)
function seasonInfo(uint256 sid) view returns (uint256[12] r)
function strike(uint256[] ids)
function sweep(uint256 sid)
function tokenPts(uint256, uint256) view returns (uint256)
function totalPoints(uint256) view returns (uint256)
```

Risk: a collectible and a game, not an investment. No returns are promised. Contracts are unaudited.
