Node NS api

1. alias.register

  • Endpoint: POST /alias/register
  • Inputs:
    • alias: string (max 32 chars, alphanumeric + -_)
    • wallet: OTA or WOTA address
    • mac: MAC fingerprint
    • signature: wallet-signed payload (for anti-spoofing)
  • Action:
    • Binds alias to both wallet + MAC
    • Stores to local registry + optional IPFS
    • Starts expiration timer

2. alias.refresh

  • Endpoint: POST /alias/refresh
  • Input: same as register
  • Action: Extends expiration by 1 year
  • Optional: Add small token cost via Edge SDK

3. alias.lock

  • Endpoint: POST /alias/lock
  • Locks alias mapping; only wallet + MAC combo can edit
  • Immutable until unlocked

4. alias.resolve

  • Endpoint: GET /alias/resolve/:alias
  • Returns: wallet address + MAC + metadata (reputation, TTL)

5. alias.reverse

  • Endpoint: GET /alias/reverse/:wallet_or_mac
  • Returns: bound alias(es)

6. alias.reputation

  • Endpoint: GET /alias/reputation/:alias
  • Scoring based on:
    • Successful relays
    • TTL freshness
    • Node behavior (e.g. uptime, response rate)

7. alias.pricing

  • Endpoint: GET /alias/pricing
  • Returns:
    • Registration fee (optional)
    • Refresh fee
    • Lock fee

8. alias.publish

  • Endpoint: POST /alias/publish
  • Action:
    • Push full alias registry (or delta) to IPFS
    • Optionally trigger SafeSignal broadcast

📁Directory Structure:

pgsqlalias_module/
├── alias_api_server.py
├── alias_registry.json ← Local alias mapping
├── alias_config.json ← TTL, IPFS toggle, fees
├── alias_reputation.json
└── alias_pushlog.txt

Default Safeguards:

  • Localhost-only by default
  • MAC+wallet required for all actions
  • Offline-safe with IPFS optional
  • Alias length: 4–32 characters
  • Blocked list: admin, support, root, etc.