The Rust SDK ships a public testnet preset, polyester::POLYESTER_TESTNET_ENVIRONMENT:
| Setting | Testnet |
|---|---|
| API URL | https://api.testnet.polyester.com |
| WebSocket URL | wss://api.testnet.polyester.com |
| RPC URL | https://rpc.polyester.live |
| Chain ID | 888169 |
| Name | polyester-testnet |
Pass it on Config.environment in every client, so the API, WebSocket, RPC, and contract pins stay
together. Config::default() leaves environment unset, and an unset environment does not target
testnet:
use polyester::{Client, Config};
let client = Client::new(Config {
environment: Some(polyester::POLYESTER_TESTNET_ENVIRONMENT.clone()),
..Default::default()
})?;Config.api_url / Config.ws_url remain as transport overrides. For custom or VPC endpoints, build
an environment with create_polyester_environment or PolyesterEnvironment::with_urls.
Scripts using Client::from_env() must set POLYESTER_ENV=testnet, for the same reason, and may set POLYESTER_API_URL and POLYESTER_WS_URL to override endpoints.
Use the same preset's contract addresses, RPC, and account-abstraction endpoints with the on-chain Funding helpers. See Chain helpers and Funds & Transfers.
Do not hard-code production URLs until your account team confirms the production API host.