---
sidebar_position: 99
---

# Verified Features

Every feature listed here has been tested against the live Lethean testnet with real output captured. This page serves as proof-of-work for other agents and developers.

**Testnet height at time of testing:** 10,600–10,824

---

## Chain (Layer 0)

### Daemon RPC — getinfo
```json
// curl -X POST http://127.0.0.1:46941/json_rpc -d '{"jsonrpc":"2.0","method":"getinfo"}'
{
  "height": 10824,
  "pow_difficulty": 312639,
  "pos_difficulty": "1",
  "pos_allowed": true,
  "alias_count": 0,
  "tx_count": 0,
  "is_hardfok_active": [true, true, true, true, false, false, false]
}
```
**Status:** HF0-HF3 active. HF4 pending at height 11,000.

### Block Production — getblocktemplate
```json
// curl -X POST http://127.0.0.1:46941/json_rpc -d '{"jsonrpc":"2.0","method":"getblocktemplate","params":{"wallet_address":"iTHNUNiuu3..."}}'
{
  "height": 10670,
  "difficulty": 312639,
  "status": "OK"
}
```
**Status:** Templates generated, mining via `/start_mining` HTTP endpoint confirmed working.

### Mining
```bash
# Start mining:
curl -X POST http://127.0.0.1:46941/start_mining \
  -H 'Content-Type: application/json' \
  -d '{"miner_address":"iTHNUNiuu3...","threads_count":4}'
# Response: {"status":"OK"}
# Blocks confirmed at height 10,641+ with 1 LTHN reward each.
```

### Supply Verification
```
Height 10,673: total supply = 10,010,673 LTHN
  = 10,000,000 premine + 10,673 blocks × 1 LTHN
  Verified: actual matches expected exactly.
```

---

## Wallet (Layer 1)

### Address Generation
```
Address: iTHNUNiuu3VP1yy8xH2y5iQaABKXurdjqZmzFiBiyR4dKG3j6534e9jMriY6SM7PH8NibVwVWW1DWJfQEWnSjS8n3Wgx86pQpY
Prefix: iTHN (standard address)
```

### Balance
```json
// getbalance response at height 10,824:
{ "balance": 172000000000000, "unlocked_balance": 163000000000000 }
// 172 LTHN total, 163 unlocked
```

### Integrated Addresses (Exchange Payment Tracking)
```json
// make_integrated_address with payment_id "cafebabe12345678"
{
  "integrated_address": "iTHnNj4dWPHP1yy8xH2y5iQa...",
  "payment_id": "cafebabe12345678"
}
// Prefix: iTHn (lowercase n = integrated)
```
**Status:** Working. BTCPay plugin uses this for per-invoice tracking.

### Bare Outputs
```json
// get_bare_outs_stats
{
  "total_bare_outs": 172,
  "total_amount": 172000000000000,
  "txs_count": 9,
  "expected_total_fee": 90000000000
}
```
**Status:** 172 bare outputs (pre-Zarcanum). Sweep requires HF4 to convert to ZC format.

---

## Alias System (Layer 1 Identity)

### Registration Cost
```json
// get_alias_reward for "charon" (6 chars)
{ "reward": 100, "status": "OK" }
// Near-zero on current chain. Source code changed to 1 LTHN (pending rebuild).
```

### Alias Lookup
```json
// get_alias_details for "lthn"
{ "alias_details": { "address": "", "comment": "", "tracking_key": "" }, "status": "NOT_FOUND" }
```
**Status:** RPC works. Registration requires HF4 (Zarcanum transaction format).

### Comment Format (v=lthn1)
```
v=lthn1;hns=charon.lthn;type=gateway;cap=vpn,dns,proxy
```
Parsed by: `alias-dns-bridge/index.js`, `lthn-app-vpn/lib/sdp_chain.py`, `lvpn/lib/chain_discovery.py`

---

## Native Asset
```json
// get_asset_info for native LTHN
{
  "asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
  "ticker": "LTHN",
  "full_name": "Lethean",
  "decimal_point": 12,
  "hidden_supply": false
}
```

---

## Libraries

### lethean_web3 (TypeScript) — 10/10 tests
```
validateTokensInput: 3/3 pass
fetchDaemon("getinfo"): height 10347 ✓
getAssetsList: 0 assets (empty chain) ✓
getAliasDetails("lthn"): NOT_FOUND ✓
fetchWallet("getaddress"): iTHN prefix ✓
getBalances: LTHN=0 ✓
getTxs: 0 transfers ✓
validateWallet: bad sig rejected ✓
```
**Bugs fixed:** ESM module resolution, `getAssetsList` crash on empty chain.

### wallet-address-validator — 73/73 tests
```
All 4 prefix variants validated:
  iTHN (f7d507) — standard ✓
  iTHn (f7d537) — integrated ✓
  iThn (f7e022) — auditable integrated ✓
  iThN (f7dff301) — auditable ✓
```

### zano-utils-js — 34/34 tests
```
Ed25519 key derivation, stealth addresses, tx decoding,
Base58, payment ID encryption — all passing.
ZANO_HDS_* protocol constants preserved (daemon compatibility).
```

### lethean-util (C++ native addon) — built and tested
```javascript
// Address validation against live chain:
cn.is_address_valid(Buffer.from("iTHNUNiuu3...")) // true
// Block template conversion:
cn.convert_blob(templateBuffer) // 81 bytes
// Available: convert_blob, address_decode, get_pow_hash,
//   get_blob_from_block_template, is_address_valid,
//   get_merged_mining_nonce_size, get_id_hash,
//   get_hash_from_block_template_with_extra
```

### BTCPay Plugin — 23/23 unit tests
```
LetheanMoney, LetheanConfiguration, LetheanPaymentData,
LetheanPaymentViewModel, ParseStringConverter, LetheanPollEvent
— all passing. CryptoCode="LTHN", Divisibility=12.
Port-agnostic (reads env vars BTCPAY_LTHN_DAEMON_URI).
```

---

## VPN Gateway (Layer 4)

### WireGuard Tunnel
```
Interface: wg-testpeer1
  public key: V7msQJ/AuFXXwrf/H5DNtkLnAKy/UTk4im3gKbDsDUs=
  endpoint: 10.69.69.165:51820
  latest handshake: 8 seconds ago
  transfer: 92 B received, 180 B sent

Ping to gateway (10.13.13.1): 0.179ms, 0% packet loss
```
**Status:** WireGuard tunnel established, packets flowing, handshake verified.

### Gateway Bridge — Bandwidth Metering
```json
// gateway_bridge.py output (reads WireGuard + chain simultaneously):
{
  "chain_height": 10818,
  "total_peers": 2,
  "active_peers": 1,
  "total_bandwidth": 1984,
  "peers": [
    { "pubkey": "V7msQJ/...", "rx_bytes": 1192, "tx_bytes": 792, "active": true },
    { "pubkey": "Twm90A/...", "rx_bytes": 0, "tx_bytes": 0, "active": false }
  ]
}
```
**Status:** Bridge reads both chain state and VPN peer stats. This data feeds the revenue split.

---

## UEPS Consent Tokens (Layer 2)

### JavaScript (Ed25519)
```
Created: ConsentToken{iTHNUNiuu3→iTHNQGNCbu L2(Standard) caps=[vpn,dns] scope=charon.lthn valid=true}
Signature valid: true
Wire size: 644 bytes
Roundtrip verify: true
```

### Python (HMAC-SHA256)
```
Created: Consent(iTHNUNiuu3→iTHNQGNCbu L2/Standard caps=[vpn,dns] scope=charon.lthn valid)
Wire size: 556 bytes
HMAC verify: True
```

---

## Services Running

| Service | Port | Status | URL |
|---------|------|--------|-----|
| Daemon RPC | 46941 | Active | — |
| Wallet RPC | 46944 | Active | — |
| Full Explorer | 3335 | Active | explorer.lthn.io |
| Simple Explorer | 8099 | Active | — |
| Documentation | 8098 | Active | testnet-docs.lthn.io |
| Trade API | 3336 | Active | trade.lthn.io/api |
| Trade Frontend | 3337 | Active | trade.lthn.io |
| Downloads | 8097 | Active | downloads.lthn.io |
| WireGuard VPN | 51820/udp | Active | — |

## Explorer DB Sync
```
Daemon height: 10,811 | DB blocks: 10,811 | Gap: 0
```

---

## HNS Sidechain (ITNS)

### HSD Running (regtest)
```
Version: 8.99.0
Network: regtest
Port: 14037 (node), 14039 (wallet)
Genesis written, chain synced.
```

### Name Registration — Full Auction Cycle
```
Name: "lethean"
  1. OPEN:   tx=46cd4d0e4519913b7498...  (state → OPENING)
  2. BID:    tx=e050121bc06571493c7e...  (0.1 HNS bid, 0.2 HNS blind)
  3. REVEAL: tx=2804266e10e27d901b3b...
  4. UPDATE: tx=9fbe9c27751d7f3e9ebf...  (DNS records set)
  5. State:  CLOSED (= owned)
```

### DNS Records On-Chain
```json
// getnameresource("lethean")
{
  "records": [
    { "type": "GLUE4", "ns": "ns1.lethean.", "address": "10.69.69.165" },
    { "type": "TXT", "txt": [
      "v=lthn1 gateway=true cap=vpn,dns,proxy lthn-address=iTHNUNiuu3VP1yy8xH2y5iQaABKXurdjqZmzFiBiyR4dKG3j6534e9jMriY6SM7PH8NibVwVWW1DWJfQEWnSjS8n3Wgx86pQpY"
    ]}
  ]
}
```
**Status:** Name registered with GLUE4 + TXT record containing main chain address. This is the two-way binding between HNS naming and Lethean chain identity.

### Services on HSD
| Service | Port | Status |
|---------|------|--------|
| HSD Node | 14037 | Active (regtest) |
| HSD Wallet | 14039 | Active |

---

## Pending (HF4 at height 11,000)

These features are implemented in code but require HF4 (Zarcanum) to activate on the chain:

- [ ] `sweep_bare_outs` — convert 172 bare outputs to ZC format
- [ ] `register_alias` — register "charon" with v=lthn1 comment
- [ ] `transfer` — send LTHN between wallets
- [ ] `deploy_new_asset` — create confidential token
- [ ] `escrow` — trustless service payment contract
- [ ] `ionic_swap` — peer-to-peer atomic asset exchange
- [ ] Alias-DNS bridge end-to-end (chain alias → HNS zone)
- [ ] VPN payment flow (integrated address → session activation)

## BTCPay Server Integration

All 5 RPC calls used by the BTCPay Lethean plugin verified against testnet:

```
1. getinfo          → daemon_network_state=2 (synced) ✓
2. make_integrated  → iTHn... address with unique payment_id ✓
3. get_bulk_payments → payment detection (0 payments, correct) ✓
4. getbalance       → 288 LTHN (279 unlocked) ✓
5. get_wallet_info  → non-watch-only, height 10928 ✓
```

Configuration:
```
BTCPAY_LTHN_DAEMON_URI=http://127.0.0.1:46941
BTCPAY_LTHN_WALLET_DAEMON_URI=http://127.0.0.1:46944
```

Plugin: 23/23 unit tests pass. CryptoCode="LTHN", Divisibility=12.

## Post-HF4 Features (verified at height 11,025)

### Alias Registration
```
6 aliases registered: @charon, @explorer, @gateway, @lethean, @testnet, @trading
Cost: ~0.0000001 LTHN per alias (source changed to 1 LTHN, pending rebuild)
Comment format: v=lthn1;type=gateway;cap=vpn,dns,proxy (HNS name derived from alias)
```

### Transfer to Alias
```bash
# Send LTHN to @aliasname — wallet resolves automatically
transfer(destinations: [{address: "@charon", amount: 100000000000}])
# Result: TX 938665701d84c854... CONFIRMED
```
Works for self-transfers too — useful for wallet unstick.

### Reverse Alias Lookup
```bash
get_alias_by_address("iTHNUNiuu3...") → 6 aliases returned
```
Enables: "who owns this address?" queries for gateway verification.

### SWAP Pipeline
```
request-swap.sh --tx deadbeef --amount 5000 --address iTHNxxx
  → Claim submitted (ID: 6d95365d)
  → Auto-approved
  → 50 LTHN dispatched (TX: 41fefff9...)
```

### Wallet Unstick
```
request-swap.sh --unstick --count 10
  → 10/10 self-transfers succeeded
  → Creates fresh inputs for batch operations
```

### Edge Cases Tested
| Test | Result |
|------|--------|
| Send to @alias | Works — wallet resolves |
| Send to @nonexistent | Clean error: WRONG_ADDRESS |
| Zero amount | Clean error: fee too low |
| Self-transfer via @alias | Works — creates fresh input |
| Reverse lookup by address | Returns all aliases for address |
| Batch registration | 1 per maturity cycle (30 blocks) |
| Cross-chain verify | 4/6 chain↔HNS bindings VERIFIED |

## CryptoNote Input Maturity (Known Behaviour)

Ring signatures lock ALL wallet inputs for 10 blocks after each transaction. This means:
- **1 operation per ~20 minutes** from a single wallet
- Batch operations (registering many aliases, processing many SWAP claims) need either:
  1. Wait 10 blocks between each operation
  2. Use multiple wallet files (one per purpose)
  3. Pre-fragment with self-transfers (creates more independent outputs, but still locks per-tx)

This is CryptoNote architecture, not a bug. Normal users doing 1-2 transactions per session are unaffected. High-throughput services (BTCPay, SWAP processor) should use dedicated wallets.

**Tested:** Attempted 5 rapid alias registrations — 1 succeeded, 4 failed on locked inputs. Confirmed 10-block maturity cycle.
