Awesome-omni-skill xpr-network-dev
Comprehensive knowledge for XPR Network blockchain development - smart contracts, CLI, web SDK, DeFi, NFTs, and infrastructure
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/xpr-network-dev" ~/.claude/skills/diegosouzapw-awesome-omni-skill-xpr-network-dev && rm -rf "$T"
skills/development/xpr-network-dev/SKILL.mdXPR Network Developer Skill
This skill provides comprehensive knowledge for developing on XPR Network, a fast, gas-free blockchain with WebAuthn wallet support.
IMPORTANT DISCLAIMER: AI-Generated Smart Contract Code
Smart contracts handle real assets and are immutable once deployed. AI-generated code, including code produced with this skill, should always be reviewed by an experienced developer before deployment to mainnet.
- Test thoroughly on testnet before any mainnet deployment
- Have code reviewed by someone familiar with XPR Network/EOSIO smart contracts
- Audit critical contracts - consider professional security audits for contracts handling significant value
- Understand the code - don't deploy code you don't fully understand
Claude can accelerate development and help with patterns, but it does not replace proper code review, testing, and auditing practices.
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, a-z, 1-5) |
| Wallets | WebAuthn support (Face ID, fingerprint, security keys) |
| Contracts | AssemblyScript/TypeScript with @proton/ts-contracts |
| 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 (
, formerlyXPRNetwork
)ProtonProtocol - Documentation and code comments
- Explorer (now
, formerlyexplorer.xprnetwork.org
andprotonscan.io
)proton.bloks.io
The token symbol remains XPR and all functionality is unchanged.
Chain IDs
| Network | Chain ID |
|---|---|
| Mainnet | |
| Testnet | |
Progressive Disclosure
Load specialized modules based on your task:
Core Development
| Module | Read When | Key Topics |
|---|---|---|
| Building contracts | Tables, actions, auth, build/deploy |
| Using CLI tools | Network, keys, deploy, queries |
| Building dApps | Wallet connect, transactions, sessions |
| Server-side dev | Programmatic signing, bots, security |
| Reading chain data | RPC, Hyperion API, Light API, pagination |
| Testing contracts | Unit tests, testnet, debugging, logs |
| Account management | Create accounts, permissions, multisig |
| Staking & voting | XPR staking, BPs, DPoS, resource model |
Token & Identity
| Module | Read When | Key Topics |
|---|---|---|
| Creating tokens | Fungible tokens, issuance, vesting |
| User identity | WebAuth wallets, KYC, profiles, trust |
| NFT development | Collections, schemas, minting, marketplace |
DeFi & Trading
| Module | Read When | Key Topics |
|---|---|---|
| DEX integration | Complete MetalX API, orders, swaps |
| Trading bots/DeFi | Grid bots, market makers, perps architecture |
| Lending protocol | LOAN protocol, supply, borrow, liquidations |
| Price feeds & RNG | Oracle prices, verifiable random numbers |
Integration Patterns
| Module | Read When | Key Topics |
|---|---|---|
| Live updates | Hyperion streaming, WebSockets, notifications |
| Commerce/payments | Payment links, invoicing, POS, subscriptions |
Infrastructure
| Module | Read When | Key Topics |
|---|---|---|
| Running nodes | API nodes, Block Producers, validators |
Safety & Reference
| Module | Read When | Key Topics |
|---|---|---|
| BEFORE modifying contracts | Table rules, deployment safety, recovery |
| Debugging errors | Common errors, solutions, diagnostics |
| Learning patterns | PriceBattle, ProtonWall, ProtonRating |
| Finding endpoints | RPC URLs, docs, explorers, community |
CRITICAL: Before Modifying Contracts
Read: safety-guidelines.md
- NEVER modify existing table structures with data
- Pre-deployment checklist
- Recovery procedures
Quick Reference
Common CLI Commands
# 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 proton contract:set ACCOUNT ./assembly/target
Common RPC Query
const { JsonRpc } = require('@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
import { Contract, Table, TableStore, Name } 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
import ProtonWebSDK from '@proton/web-sdk'; const { link, session } = await ProtonWebSDK({ linkOptions: { chainId: '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0', endpoints: ['https://proton.eosusa.io'] }, selectorOptions: { appName: 'My App' } }); // session.auth contains { actor, permission } // Use session.transact() for transactions
Key Packages
| Package | Purpose | Install |
|---|---|---|
| Command-line tools | |
| Contract development | |
| Frontend wallet integration | |
| Mobile wallet transport (required with web-sdk) | |
| RPC queries | |
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
- NEVER modify existing table structures once deployed with data - this breaks deserialization
- Always test on testnet before mainnet deployment
- Verify the target account before deploying - wrong account = overwrite existing contract
- Back up ABIs before deploying changes
- Use new tables for new features instead of modifying existing ones