XPR 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 (
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 |
web-sdk.md |
Building dApps |
Wallet connect, transactions, sessions, transfers |
backend-patterns.md |
Server-side dev |
Programmatic signing, bots, security |
rpc-queries.md |
Reading chain data |
RPC, Hyperion API, Light API, pagination, token balances |
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 |
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, liquidations |
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 |
Infrastructure
| Module |
Read When |
Key Topics |
node-operation.md |
Running nodes |
API nodes, Block Producers, validators |
Safety & Reference
| Module |
Read When |
Key Topics |
safety-guidelines.md |
BEFORE modifying contracts |
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 |
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
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
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
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' }
});
// 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
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
- DEX deposits MUST use empty memo (
"") — any other memo (e.g. "deposit") causes permanent, irrecoverable fund loss. See metalx-dex.md.
- All-numeric account names (e.g.
333555) cause silent data loss in get_table_rows — see rpc-queries.md for workarounds.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: xpr-network-dev3description: Comprehensive knowledge for XPR Network blockchain development - smart contracts, CLI, web SDK, DeFi, NFTs, and infrastructure Use when this capability is needed.4---56# XPR Network Developer Skill78This skill provides comprehensive knowledge for developing on XPR Network, a fast, gas-free blockchain with WebAuthn wallet support.910> **IMPORTANT DISCLAIMER: AI-Generated Smart Contract Code**11>12> 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.13>14> - **Test thoroughly on testnet** before any mainnet deployment15> - **Have code reviewed** by someone familiar with XPR Network/EOSIO smart contracts16> - **Audit critical contracts** - consider professional security audits for contracts handling significant value17> - **Understand the code** - don't deploy code you don't fully understand18>19> Claude can accelerate development and help with patterns, but it does not replace proper code review, testing, and auditing practices.2021## XPR Network Overview2223XPR Network is an EOS-based blockchain optimized for payments and identity:2425| Feature | Description |26|---------|-------------|27| **Speed** | 0.5 second block times, 4000+ TPS |28| **Fees** | Zero gas fees for end users |29| **Accounts** | Human-readable names (1-12 chars, a-z, 1-5) |30| **Wallets** | WebAuthn support (Face ID, fingerprint, security keys) |31| **Contracts** | AssemblyScript/TypeScript with @proton/ts-contracts |32| **Storage** | On-chain tables with RAM-based pricing |3334### Name Change: Proton → XPR Network3536The blockchain was rebranded from **Proton** to **XPR Network** in 2024. You may see legacy references to "Proton" in:37- Package names (`@proton/cli`, `@proton/web-sdk`, `proton-tsc`)38- GitHub organization (`XPRNetwork`, formerly `ProtonProtocol`)39- Documentation and code comments40- Explorer (now `explorer.xprnetwork.org`, formerly `protonscan.io` and `proton.bloks.io`)4142The token symbol remains **XPR** and all functionality is unchanged.4344### Chain IDs4546| Network | Chain ID |47|---------|----------|48| Mainnet | `384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0` |49| Testnet | `71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd` |5051## Progressive Disclosure5253Load specialized modules based on your task:5455### Core Development5657| Module | Read When | Key Topics |58|--------|-----------|------------|59| `smart-contracts.md` | Building contracts | Tables, actions, auth, build/deploy |60| `cli-reference.md` | Using CLI tools | Network, keys, deploy, queries, transfers |61| `web-sdk.md` | Building dApps | Wallet connect, transactions, sessions, transfers |62| `backend-patterns.md` | Server-side dev | Programmatic signing, bots, security |63| `rpc-queries.md` | Reading chain data | RPC, Hyperion API, Light API, pagination, token balances |64| `testing-debugging.md` | Testing contracts | Unit tests, testnet, debugging, logs |65| `accounts-permissions.md` | Account management | Create accounts, permissions, multisig |66| `staking-governance.md` | Staking & voting | XPR staking, BPs, DPoS, resource model |6768### Token & Identity6970| Module | Read When | Key Topics |71|--------|-----------|------------|72| `token-creation.md` | Creating tokens | Fungible tokens, issuance, vesting |73| `webauth-identity.md` | User identity | WebAuth wallets, KYC, profiles, trust |74| `nfts-atomicassets.md` | NFT development | Collections, schemas, minting, marketplace |7576### DeFi & Trading7778| Module | Read When | Key Topics |79|--------|-----------|------------|80| `metalx-dex.md` | DEX integration | MetalX DEX API reference, order format, error codes |81| `defi-trading.md` | Trading bots/DeFi | Trading bot patterns, swap pools, DeFi strategies |82| `simpledex.md` | Token launch & AMM | SimpleDEX swaps, bonding curves, token creation, graduation |83| `loan-protocol.md` | Lending protocol | LOAN protocol, supply, borrow, liquidations |84| `oracles-randomness.md` | Price feeds & RNG | Oracle prices, verifiable random numbers |8586### Integration Patterns8788| Module | Read When | Key Topics |89|--------|-----------|------------|90| `real-time-events.md` | Live updates | Hyperion streaming, WebSockets, notifications |91| `payment-patterns.md` | Commerce/payments | Payment links, invoicing, POS, subscriptions |9293### Infrastructure9495| Module | Read When | Key Topics |96|--------|-----------|------------|97| `node-operation.md` | Running nodes | API nodes, Block Producers, validators |9899### Safety & Reference100101| Module | Read When | Key Topics |102|--------|-----------|------------|103| `safety-guidelines.md` | **BEFORE modifying contracts** | Table rules, deployment safety, recovery |104| `troubleshooting.md` | Debugging errors | Common errors, solutions, diagnostics |105| `examples.md` | Learning patterns | PriceBattle, ProtonWall, ProtonRating |106| `resources.md` | Finding endpoints | RPC URLs, docs, explorers, community |107108### CRITICAL: Before Modifying Contracts109**Read: `safety-guidelines.md`**110- **NEVER modify existing table structures with data**111- Pre-deployment checklist112- Recovery procedures113114---115116## Quick Reference117118### Common CLI Commands119120```bash121# Install CLI122npm i -g @proton/cli123124# Set network125proton chain:set proton # Mainnet126proton chain:set proton-test # Testnet127128# Account info129proton account myaccount -t # With token balances130131# Query table132proton table CONTRACT TABLE133134# Execute action135proton action CONTRACT ACTION 'JSON_DATA' AUTHORIZATION136137# Deploy contract138proton contract:set ACCOUNT ./assembly/target139```140141### Common RPC Query142143```javascript144import { JsonRpc } from '@proton/js';145const rpc = new JsonRpc('https://proton.eosusa.io');146147const { rows } = await rpc.get_table_rows({148 code: 'CONTRACT',149 scope: 'CONTRACT',150 table: 'TABLE',151 limit: 100152});153```154155### Basic Contract Structure156157```typescript158import { Contract, Table, TableStore, Name, requireAuth } from 'proton-tsc';159160@table("mydata")161class MyData extends Table {162 constructor(163 public id: u64 = 0,164 public owner: Name = new Name(),165 public value: string = ""166 ) { super(); }167168 @primary169 get primary(): u64 { return this.id; }170}171172@contract173class MyContract extends Contract {174 dataTable: TableStore<MyData> = new TableStore<MyData>(this.receiver);175176 @action("store")177 store(owner: Name, value: string): void {178 requireAuth(owner);179 const row = new MyData(this.dataTable.availablePrimaryKey, owner, value);180 this.dataTable.store(row, this.receiver);181 }182}183```184185### Basic Frontend Login186187```typescript188import '@proton/link'; // Required for mobile wallet support189import ProtonWebSDK from '@proton/web-sdk';190191const { link, session } = await ProtonWebSDK({192 linkOptions: {193 chainId: '384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0',194 endpoints: ['https://proton.eosusa.io']195 },196 selectorOptions: { appName: 'My App' }197});198199// session.auth contains { actor, permission }200// Use session.transact() for transactions201```202203---204205## Key Packages206207| Package | Purpose | Install |208|---------|---------|---------|209| `@proton/cli` | Command-line tools | `npm i -g @proton/cli` |210| `proton-tsc` | Contract development | `npm i proton-tsc` |211| `@proton/web-sdk` | Frontend wallet integration | `npm i @proton/web-sdk` |212| `@proton/link` | Mobile wallet transport (required with web-sdk) | `npm i @proton/link` |213| `@proton/js` | RPC queries | `npm i @proton/js` |214215## Official Resources216217- **Documentation**: https://docs.xprnetwork.org218- **GitHub**: https://github.com/XPRNetwork219- **Block Explorer**: https://explorer.xprnetwork.org220- **Resources Portal**: https://resources.xprnetwork.org (buy RAM, etc.)221222---223224## Safety Reminders2252261. **NEVER modify existing table structures** once deployed with data - this breaks deserialization2272. **Always test on testnet** before mainnet deployment2283. **Verify the target account** before deploying - wrong account = overwrite existing contract2294. **Back up ABIs** before deploying changes2305. **Use new tables** for new features instead of modifying existing ones2316. **DEX deposits MUST use empty memo** (`""`) — any other memo (e.g. `"deposit"`) causes permanent, irrecoverable fund loss. See `metalx-dex.md`.2327. **All-numeric account names** (e.g. `333555`) cause silent data loss in `get_table_rows` — see `rpc-queries.md` for workarounds.233234---235> Converted and distributed by [TomeVault](https://tomevault.io/claim/xprnetwork) — claim your Tome and manage your conversions.236<!-- tomevault:4.0:skill_md:2026-04-13 -->