Connect to Testnet
The public Amadeus testnet endpoints, and how to switch the wallets, the TypeScript SDK, curl and the node CLI to testnet.
The public test network is called Testnet. Testnet AMA has no value, so you can try transfers, contracts and integrations without risk. Smart contracts (RISC-V) run only on testnet for now.
Endpoints
| Resource | Endpoint |
|---|---|
| RPC (HTTP API base) | https://testnet-rpc.ama.one/api |
| Explorer | https://testnet.explorer.ama.one |
| Community explorer | https://testnet-ama.ddns.net |
| Faucet | https://mcp.ama.one/testnet-faucet (see Testnet faucet) |
| Direct nodes (advanced, not for dApps) | http://testnet.ama.one (HTTP only) |
The full mainnet and testnet reference is on Networks.
Testnet transactions are signed differently
Testnet signs transactions under its own BLS signing domain (AMADEUS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_TX_TESTNET_). A transaction signed for mainnet is rejected on testnet, and a testnet transaction can't be replayed on mainnet. Pointing a tool at the testnet RPC is not enough: the tool must also sign for testnet. The wallets do this when you select Testnet, the SDK when you pass NetworkType.TESTNET, and the node when you set TESTNET.
Your keys work on both networks. Use separate keys for testing anyway.
Wallets
Each Amadeus wallet has a built-in network switch with Mainnet, Testnet and Custom RPC:
- Web wallet (wallet.ama.one): open Settings, then under Network & RPC Configuration set Network to Testnet. The page then shows "Using testnet-rpc.ama.one" and an Open Faucet button.
- Chrome extension: open Settings, then Active Networks, and pick Testnet under Network Selection. See Network settings.
- Mobile wallet: open the Settings tab, then Network, and pick Testnet.
Transactions you send with Custom RPC are signed for mainnet. Use Testnet, not a custom URL, to transact on the public testnet.
TypeScript SDK
@amadeus-protocol/sdk exports the testnet endpoints. NETWORK_URLS holds the RPC host without /api, so append it for the SDK baseUrl. Pass NetworkType.TESTNET when you sign:
import {
AmadeusSDK,
NETWORK_EXPLORER_URLS,
NETWORK_URLS,
NetworkType,
buildCoinTransfer,
makeTransactionUrl,
signContractCall
} from '@amadeus-protocol/sdk'
// NETWORK_URLS holds the host only; the HTTP API lives under /api
const sdk = new AmadeusSDK({ baseUrl: `${NETWORK_URLS[NetworkType.TESTNET]}/api` })
const { stats } = await sdk.chain.getStats()
console.log('testnet height', stats.height)
const call = buildCoinTransfer({ recipient: 'RECIPIENT_PUBLIC_KEY', amount: 1, symbol: 'AMA' })
// Testnet transactions must be signed under the testnet domain
const { txHash, txPacked } = signContractCall('YOUR_BASE58_SEED', call, NetworkType.TESTNET)
const result = await sdk.transaction.submitAndWait(txPacked)
console.log(result.receipt.success, makeTransactionUrl(txHash, NETWORK_EXPLORER_URLS[NetworkType.TESTNET]))
More on network-aware signing in Networks and testnet.
curl
Every HTTP API endpoint works on testnet under the testnet base URL:
curl -s https://testnet-rpc.ama.one/api/chain/stats | jq '.stats | {height, rooted_height}'
{
"height": 7600930,
"rooted_height": 7600929
}
Node CLI
Start the node offline with TESTNET set and RPC_URL pointing at the testnet RPC (without /api):
OFFLINE=true TESTNET=true RPC_URL=https://testnet-rpc.ama.one ./amadeusd
The RPC.API.* commands in Using the REPL and Broadcast Transaction then use testnet.
Next steps
- Testnet faucet: claim free testnet AMA.
- Local Testnet: run a private testnet on your own machine.