# SimpleDEX — Setup & prerequisites (v1.11 · 2026-05-12) > Part of the SimpleDEX agent guide. Index: https://simpledex.fun/llms.txt > Full single file: https://simpledex.fun/llms-full.txt ## 0 — Prerequisites & getting started Read-only analytics (§1) work over plain HTTPS with no setup. Everything else — swaps, liquidity, buying on a curve, launching a token — requires an XPR Network account, a private key, and either the **proton CLI** or the **`@proton/js` SDK** to sign transactions. ### 0.1 Acquire XPR XPR is the gas-free native token used to pay treasury fees, seed bonding curves, and act as the base asset of every DEX pool. There is no gas — but you still need XPR balance to fund buys, swaps, and the ~20,000-XPR token creation fee (live value in `simplelaunch::fees.creationFee`). - **MetalX (recommended, on-ramp):** `https://app.metalx.com/dex/XPR_XMD?referrer=protonnz` - **Bitfinex (centralized exchange):** XPR pair on Bitfinex spot - **OTC:** request from any existing XPR holder via direct transfer Once acquired on a CEX, withdraw to your XPR Network account name (e.g. `youraccount`). Account names are 1–12 lowercase letters, digits 1–5, and periods. ### 0.2 Install the proton CLI ```bash npm install -g @proton/cli proton chain:set proton # mainnet proton config:set rpcEndpoint https://api.protonnz.com ``` Verify connection: ```bash proton info # should print head_block_num ``` ### 0.3 Create an account + key ```bash # Create a new private key locally proton key:create # Register the account on-chain (requires existing account to pay RAM) proton account:create youraccount EOS # Authorize the key for the account's @active permission proton key:add EOS ``` If you already have a WebAuth wallet, you can export the private key from the WebAuth app and import via `proton key:add`. Same account, same permissions. ### 0.4 Sign transactions — three options | Option | When to use | |---|---| | `proton action '' @active` | Shell scripts, ad-hoc, one-off agents | | `@proton/js` SDK (`Api.transact`) | Node/TypeScript agents, programmatic loops | | `@proton/web-sdk` (`ConnectWallet` + `link.transact`) | Browser dApps with WebAuth UX | A minimal Node example using `@proton/js`: ```js import { Api, JsonRpc, JsSignatureProvider } from '@proton/js'; const rpc = new JsonRpc(['https://api.protonnz.com']); const api = new Api({ rpc, signatureProvider: new JsSignatureProvider([process.env.PRIVATE_KEY]), }); await api.transact({ actions: [{ account: 'eosio.token', name: 'transfer', authorization: [{ actor: 'youraccount', permission: 'active' }], data: { from: 'youraccount', to: 'simpledex', quantity: '100.0000 XPR', memo: 'swap:1:950000:true', }, }], }, { blocksBehind: 3, expireSeconds: 30 }); ``` ### 0.5 Permissions Every code example below uses `@active` because that's the default permission used for sending transfers and signing contract actions. If you set up custom permissions (e.g. `@trading`), use that authority name instead. The `@owner` permission is only needed to change keys. ### 0.6 Account safety - **Never paste a private key into an LLM chat, log file, or external service.** Read from `$PRIVATE_KEY` env or a local keystore. - All SimpleDEX actions are non-reversible. Test with small amounts on the testnet (`testnet.dex.protonnz.com`) before running scripts against mainnet. - The protocol is non-custodial. Bugs in your script can only lose **your** funds, never another user's. ---