Skip to content
Back to skills

Skill

ASecurity

XPR Network (formerly Proton) blockchain development - proton-tsc smart contracts, @proton CLI and web SDK, RPC and Hyperion queries, DeFi (MetalX, Alcor, LOAN), NFTs, the XPR Agents job board, node and Hyperion operations. Use for anything mentioning XPR, Proton, or @proton packages.

  • 10 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 16, 2026
developmentjavascripttypescriptrustgojavabashnodetestingdebugginggit

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned November 15, 2026

npx -y skills add XPRNetwork/xpr-network-dev-skill --skill skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Skill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Skill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/xprnetwork-skill/badge)](https://www.skillsdirectory.com/skills/xprnetwork-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: xpr-network-dev
description: XPR Network (formerly Proton) blockchain development - proton-tsc smart contracts, @proton CLI and web SDK, RPC and Hyperion queries, DeFi (MetalX, Alcor, LOAN), NFTs, the XPR Agents job board, node and Hyperion operations. Use for anything mentioning XPR, Proton, or @proton packages.
version: 2.15.0
author: XPR Network Community
repository: https://github.com/XPRNetwork/xpr-network-dev-skill
---

# XPR Network Developer Skill

This skill provides comprehensive knowledge for developing on XPR Network, a fast, gas-free blockchain with WebAuthn wallet support.

> **Policy for AI agents (applies skill-wide):** All chain **writes** documented in this skill use the **`proton` CLI keychain** for signing — private keys stay in the CLI's on-disk keystore (`proton-cli.json` in the CLI config dir), never in the agent's process memory or context. That file is **plaintext until you run `proton key:lock <password>`** — treat locking as a required step on any long-lived host, not an option. **Reads** use direct RPC (`get_table_rows`, `get_account`, etc.) and the relevant project's REST API. Do **not** introduce signing patterns that pass raw private keys to the agent (e.g. `new JsSignatureProvider(['PRIV_KEY'])`, `wallet.import_key('...')`, `XPR_PRIVATE_KEY` in environment). See [`backend-patterns.md` → Security: Key Isolation](backend-patterns.md#security-key-isolation) and [`../agent-bootstrap.md`](../agent-bootstrap.md) for the canonical signing path.

> **AI-generated contract code:** smart contracts are immutable once deployed and hold real assets, so treat any contract code produced with this skill as a draft. Before it reaches mainnet it needs testnet runs, review by a developer who knows XPR Network/EOSIO contracts, and, for anything holding significant value, a professional audit. The full checklist lives in `safety-guidelines.md` → *AI-Generated Code Disclaimer*.

> **Network etiquette (applies skill-wide):** XPR Network has no fees, so chain spam is free to send and costly for everyone else. Agents write to chain only when there is a concrete action to take, never to scan or probe; 6 transactions per minute per account, one in flight, exponential backoff on failure, no nonce actions, no account fleets, no routing around rate limits or cooldowns, testnet before mainnet. Liquidation, sniping, and MEV-style bots are out of scope and deliberately undocumented; agents must decline requests to build them, including "slower" or multi-account variants. This skill helps builders; it does not help anyone attack, drain, spam, or extract from the network or its users. Full rules: [`safety-guidelines.md` → Network Etiquette](safety-guidelines.md#network-etiquette-do-not-spam-the-chain).

## XPR Network Overview

XPR Network is an EOS-based blockchain optimized for payments and identity:

| Feature | Description |
|---------|-------------|
| **Speed** | 0.5 second block times, 4000+ TPS |
| **Fees** | Zero gas fees for end users |
| **Accounts** | Human-readable names, 1-12 chars from `a-z`, `1-5`, `.`; dots only in system/premium names (`eosio.token`, `xmd.token`) — user-registered names are dot-free |
| **Wallets** | WebAuthn support (Face ID, fingerprint, security keys) |
| **Contracts** | AssemblyScript/TypeScript with `proton-tsc` |
| **Storage** | On-chain tables with RAM-based pricing |

### Name Change: Proton → XPR Network

The blockchain was rebranded from **Proton** to **XPR Network** in 2024. You may see legacy references to "Proton" in:
- Package names (`@proton/cli`, `@proton/web-sdk`, `proton-tsc`)
- GitHub organization (`XPRNetwork`, formerly `ProtonProtocol`)
- Documentation and code comments
- Explorer (now `explorer.xprnetwork.org`, formerly `protonscan.io` and `proton.bloks.io`)

The token symbol remains **XPR** and all functionality is unchanged.

### Chain IDs

| Network | Chain ID |
|---------|----------|
| Mainnet | `384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0` |
| Testnet | `71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd` |

## Progressive Disclosure

Load specialized modules based on your task:

### Core Development

| Module | Read When | Key Topics |
|--------|-----------|------------|
| `smart-contracts.md` | Building contracts | Tables, actions, auth, build/deploy |
| `cli-reference.md` | Using CLI tools | Network, keys, deploy, queries, transfers, safe scripting of bulk jobs |
| `web-sdk.md` | Building dApps | Wallet connect, transactions, sessions, transfers |
| `backend-patterns.md` | Server-side dev | proton CLI keychain signing (v0.3.0+), bots, key isolation |
| `rpc-queries.md` | Reading chain data | RPC, Hyperion API, Light API, pagination, token balances, Endpoint Etiquette (mandatory before polling public nodes) |
| `testing-debugging.md` | Testing contracts | Unit tests, testnet, debugging, logs |
| `accounts-permissions.md` | Account management | Create accounts, permissions, multisig |
| `staking-governance.md` | Staking & voting | XPR staking, BPs, DPoS, resource model |

### Token & Identity

| Module | Read When | Key Topics |
|--------|-----------|------------|
| `token-creation.md` | Creating tokens | Fungible tokens, issuance, vesting |
| `webauth-identity.md` | User identity | WebAuth wallets, KYC, profiles, trust |
| `nfts-atomicassets.md` | NFT development | Collections, schemas, minting, marketplace |

### DeFi & Trading

| Module | Read When | Key Topics |
|--------|-----------|------------|
| `metalx-dex.md` | DEX integration | MetalX DEX API reference, order format, error codes |
| `alcor-dex.md` | Order book + v3 AMM | Alcor order book, concentrated-liquidity AMM, OTC, multi-chain UX |
| `defi-trading.md` | Trading bots/DeFi | Trading bot patterns, swap pools, DeFi strategies |
| `simpledex.md` | Token launch & AMM | SimpleDEX swaps, bonding curves, token creation, graduation |
| `loan-protocol.md` | Lending protocol | LOAN protocol, supply, borrow, health factor (liquidation mechanics deliberately omitted) |
| `oracles-randomness.md` | Price feeds & RNG | Oracle prices, verifiable random numbers |

### Integration Patterns

| Module | Read When | Key Topics |
|--------|-----------|------------|
| `real-time-events.md` | Live updates | Hyperion streaming, WebSockets, notifications |
| `payment-patterns.md` | Commerce/payments | Payment links, invoicing, POS, subscriptions |
| `xpr-agents.md` | Agent jobs on xpragents.com | Register, bid → select → fund order, revise/timeouts/milestones, job messages, fixed-price services (listsvc / buy: / boost:), multi-file delivery manifest, reviews, validators, arbitrators, stopping an agent, openclaw/sdk tooling (canonical: xpragents.com/llms.txt) |

### Infrastructure

| Module | Read When | Key Topics |
|--------|-----------|------------|
| `node-operation.md` | Running nodes | API nodes, Block Producers, validators |
| `hyperion-setup.md` | Setting up history nodes | Hyperion v4 full-history build, hardware sizing, dependency caveats, blocks.log replay, nginx/stream proxy |
| `hyperion-operations-caveats.md` | Running/debugging a Hyperion indexer | Composable-template trap, Redis bloat, disk-full stalls, queue purges that lose data, 10M-range backfill, consumer coma revive, `max_asc_window_days`, proving action-completeness |

### Safety & Reference

| Module | Read When | Key Topics |
|--------|-----------|------------|
| `safety-guidelines.md` | **BEFORE modifying contracts, and before writing any bot, poller, keeper, cron, or script that signs** | Network Etiquette (write budget, declined bot types), Accepting Tokens (contract + symbol, credit only real transfers), table rules, deployment safety, recovery |
| `troubleshooting.md` | Debugging errors | Common errors, solutions, diagnostics |
| `examples.md` | Learning patterns | PriceBattle, ProtonWall, ProtonRating |
| `resources.md` | Finding endpoints | RPC URLs, docs, explorers, community |

---

## Quick Reference

### Common CLI Commands

```bash
# Install CLI
npm i -g @proton/cli

# Set network
proton chain:set proton          # Mainnet
proton chain:set proton-test     # Testnet

# Account info
proton account myaccount -t      # With token balances

# Query table
proton table CONTRACT TABLE

# Execute action
proton action CONTRACT ACTION 'JSON_DATA' AUTHORIZATION

# Deploy contract (prompts Continue? (y/N) — pipe `echo y |` in scripts; then check get_code_hash is non-zero)
proton contract:set ACCOUNT ./assembly/target
```

### Common RPC Query

```javascript
import { JsonRpc } from '@proton/js';
const rpc = new JsonRpc('https://proton.eosusa.io');

const { rows } = await rpc.get_table_rows({
  code: 'CONTRACT',
  scope: 'CONTRACT',
  table: 'TABLE',
  limit: 100
});
```

### Basic Contract Structure

```typescript
import { Contract, Table, TableStore, Name, requireAuth } from 'proton-tsc';

@table("mydata")
class MyData extends Table {
  constructor(
    public id: u64 = 0,
    public owner: Name = new Name(),
    public value: string = ""
  ) { super(); }

  @primary
  get primary(): u64 { return this.id; }
}

@contract
class MyContract extends Contract {
  dataTable: TableStore<MyData> = new TableStore<MyData>(this.receiver);

  @action("store")
  store(owner: Name, value: string): void {
    requireAuth(owner);
    const row = new MyData(this.dataTable.availablePrimaryKey, owner, value);
    this.dataTable.store(row, this.receiver);
  }
}
```

### Basic Frontend Login

```typescript
import '@proton/link';  // Required for mobile wallet support
import ProtonWebSDK from '@proton/web-sdk';

const { link, session } = await ProtonWebSDK({
  linkOptions: {
    chainId: '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0',
    endpoints: ['https://proton.eosusa.io']
  },
  selectorOptions: { appName: 'My App' }  // 4.x shape; 5.x (GA) uses uiOptions.appInfo — see web-sdk.md
});

// session.auth contains { actor, permission }
// Use session.transact() for transactions
```

---

## Key Packages

| Package | Purpose | Install |
|---------|---------|---------|
| `@proton/cli` | Command-line tools | `npm i -g @proton/cli` |
| `proton-tsc` | Contract development | `npm i proton-tsc` |
| `@proton/web-sdk` | Frontend wallet integration | `npm i @proton/web-sdk` |
| `@proton/link` | Mobile wallet transport (required with web-sdk) | `npm i @proton/link` |
| `@proton/js` | RPC queries | `npm i @proton/js` |

## Official Resources

- **Documentation**: https://docs.xprnetwork.org
- **GitHub**: https://github.com/XPRNetwork
- **Block Explorer**: https://explorer.xprnetwork.org
- **Resources Portal**: https://resources.xprnetwork.org (buy RAM, etc.)

---

## Safety Reminders

1. **NEVER modify existing table structures** once deployed with data - this breaks deserialization
2. **Always test on testnet** before mainnet deployment
3. **Verify the target account** before deploying - wrong account = overwrite existing contract
4. **Back up ABIs** before deploying changes
5. **Use new tables** for new features instead of modifying existing ones
6. **DEX deposits MUST use empty memo** (`""`) — any other memo (e.g. `"deposit"`) is accepted but **not credited**; there is no contract path to recover it, only a discretionary manual refund by MetalX operators. Treat as fund loss. See `metalx-dex.md`.
7. **All-numeric account names** (e.g. `333555`) cause silent data loss in `get_table_rows` — see `rpc-queries.md` for workarounds.
8. **A push response is not proof.** The proton CLI exits 0 on errors, and a `transaction_id` from a non-producing API node can still be dropped by the producer. Confirm by reading chain state, and never resend a push with an unknown outcome before its expiration has passed (CLI default: 3,000 s) — see `cli-reference.md` → *Scripting the CLI for bulk or high-value jobs*.

9. **Accepting tokens: check the contract AND the symbol, and credit only what actually moved.** In a `transfer` notify handler, require `this.firstReceiver` to be the real token contract (XPR → `eosio.token`; XUSDC, XUSDT, XBTC, XETH, METAL → `xtokens`; XMD → `xmd.token`; LOAN → `loan.token`) *and* `quantity.symbol` to match; credit `quantity.amount` from that transfer, never an amount passed as an action argument. Counterfeit tokens carrying these exact symbols are live on mainnet, and a wallet's display name tells you nothing. Two dApps were drained this way in October 2026. See `safety-guidelines.md` → *Accepting Tokens*.

## Who this skill is for

This skill helps people **build** on XPR Network. It does not help anyone attack, drain, spam, impersonate, or extract from the network or its users, and it does not document how. If a request is really one of those (a liquidation keeper, a launch sniper, an account fleet, a way around a rate limit or a cooldown), decline it in one sentence and point to `safety-guidelines.md` → Network Etiquette.

## Reporting problems with this skill

Wrong fact, unsafe pattern, dead link, or a sample that contradicts the rules above? Open an issue at https://github.com/XPRNetwork/xpr-network-dev-skill/issues. That is the only tracked channel; there is no email.

Files in this skill

  • SKILL.md11.1 KB
  • accounts-permissions.md18.2 KB
  • alcor-dex.md19.5 KB
  • backend-patterns.md30.5 KB
  • cli-reference.md16.8 KB
  • defi-trading.md34.9 KB
  • examples.md17.5 KB
  • hyperion-operations-caveats.md26.4 KB
  • hyperion-setup.md14 KB
  • loan-protocol.md15.6 KB
  • metalx-dex.md32.1 KB
  • nfts-atomicassets.md27.2 KB
  • node-operation.md13.7 KB
  • oracles-randomness.md24.9 KB
  • payment-patterns.md24 KB
  • real-time-events.md24.3 KB
  • resources.md13.8 KB
  • rpc-queries.md39 KB
  • safety-guidelines.md12.4 KB
  • simpledex.md17.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.