Pre-requisites
- An ERC-20 wallet on BASE with MOR + ETH (use a top-level, not derived, address). Never share your private key.
- Basic Auth credentials for the local API. On first start the proxy-router writes
admin:<password>to.cookienext to the binary — use those credentials in Swagger (Authorize) and in every curl below. See API auth.
TL;DR
1
Install and configure proxy-router
Once.
2
Authorize the contract
Once per wallet (or whenever the allowance is depleted).
3
Query the blockchain for a model
Per session.
4
Open a session
Per session.
5
Send prompts
Per session.
A. Build & run the proxy-router
1
Install OS dependencies
git (https://git-scm.com), go 1.22+ (https://golang.org).2
Clone and enter the repo
3
Configure .env
WALLET_PRIVATE_KEY=— your wallet’s private key.ETH_NODE_ADDRESS=wss://...— recommended: an Alchemy/Infura BASE WSS endpoint. Reference: Env: proxy-router.
4
Build and start
git pull && ./build.sh && ./proxy-router.
Confirm Swagger at http://localhost:8082/swagger/index.html. Click Authorize and enter the admin / password from .cookie before using Try it out — almost every route requires Basic Auth (same as the curl headers below).B. Authorize the contract
Either via Swagger or curl. Once per wallet, or when allowance is depleted. In Swagger: Authorize → runPOST /blockchain/approve. Via curl (replace the Basic value with base64(username:password) from your .cookie, or use -u 'admin:<password>'):
C. Query for a model
Id from the response and use it as <modelId> below. See the API endpoints reference for the full schema.
D. Open a session
https://base.blockscout.com/address/<wallet_id>.