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 is an EOS-based blockchain optimized for payments and identity:
FeatureDescriptionSpeed0.5 second block times, 4000+ TPSFeesZero gas fees for end usersAccountsHuman-readable names (1-12 chars, a-z, 1-5)WalletsWebAuthn support (Face ID, fingerprint, security keys)ContractsAssemblyScript/TypeScript with @proton/ts-contractsStorageOn-chain tables with RAM-based pricing
The blockchain was rebranded from Proton to XPR Network in 2024. You may see legacy references to "Proton" in:
@proton/cli, @proton/web-sdk, proton-tsc)XPRNetwork, formerly ProtonProtocol)explorer.xprnetwork.org, formerly protonscan.io and proton.bloks.io)The token symbol remains XPR and all functionality is unchanged.
NetworkChain IDMainnet384da888112027f0321850a169f737c33e53b388aad48b5adace4bab97f437e0Testnet71ee83bcf52142d61019d95f9cc5427ba6a0d7ff8accd9e2088ae2abeaf3d3dd
Load specialized modules based on your task:
ModuleRead WhenKey Topicssmart-contracts.mdBuilding contractsTables, actions, auth, build/deploycli-reference.mdUsing CLI toolsNetwork, keys, deploy, queries, transfersweb-sdk.mdBuilding dAppsWallet connect, transactions, sessions, transfersbackend-patterns.mdServer-side devproton CLI keychain signing (v0.3.0+), bots, key isolationrpc-queries.mdReading chain dataRPC, Hyperion API, Light API, pagination, token balancestesting-debugging.mdTesting contractsUnit tests, testnet, debugging, logsaccounts-permissions.mdAccount managementCreate accounts, permissions, multisigstaking-governance.mdStaking & votingXPR staking, BPs, DPoS, resource model
ModuleRead WhenKey Topicstoken-creation.mdCreating tokensFungible tokens, issuance, vestingwebauth-identity.mdUser identityWebAuth wallets, KYC, profiles, trustnfts-atomicassets.mdNFT developmentCollections, schemas, minting, marketplace
ModuleRead WhenKey Topicsmetalx-dex.mdDEX integrationMetalX DEX API reference, order format, error codesdefi-trading.mdTrading bots/DeFiTrading bot patterns, swap pools, DeFi strategiessimpledex.mdToken launch & AMMSimpleDEX swaps, bonding curves, token creation, graduationloan-protocol.mdLending protocolLOAN protocol, supply, borrow, liquidationsoracles-randomness.mdPrice feeds & RNGOracle prices, verifiable random numbers
ModuleRead WhenKey Topicsreal-time-events.mdLive updatesHyperion streaming, WebSockets, notificationspayment-patterns.mdCommerce/paymentsPayment links, invoicing, POS, subscriptions
ModuleRead WhenKey Topicsnode-operation.mdRunning nodesAPI nodes, Block Producers, validators
ModuleRead WhenKey Topicssafety-guidelines.mdBEFORE modifying contractsTable rules, deployment safety, recoverytroubleshooting.mdDebugging errorsCommon errors, solutions, diagnosticsexamples.mdLearning patternsPriceBattle, ProtonWall, ProtonRatingresources.mdFinding endpointsRPC URLs, docs, explorers, community
Read: safety-guidelines.md
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
proton contract:set ACCOUNT ./assembly/target
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
});
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);
}
}
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' }
});
// session.auth contains { actor, permission }
// Use session.transact() for transactions
PackagePurposeInstall@proton/cliCommand-line toolsnpm i -g @proton/cli``proton-tscContract developmentnpm i proton-tsc``@proton/web-sdkFrontend wallet integrationnpm i @proton/web-sdk``@proton/linkMobile wallet transport (required with web-sdk)npm i @proton/link``@proton/jsRPC queriesnpm i @proton/js
"") — any other memo (e.g. "deposit") causes permanent, irrecoverable fund loss. See metalx-dex.md.333555) cause silent data loss in get_table_rows — see rpc-queries.md for workarounds.