Concepts
Test and live keys
Portuna runs two separate environments, each with its own API address, data and gas wallet. An API key belongs to one of them, and its prefix tells which.
| Testnet | Mainnet | |
|---|---|---|
| API keys | ptn_test_… | ptn_live_… |
| API base URL | https://api-testnet.portuna.io | https://api.portuna.io |
| Chains | Sepolia, BSC testnet | Ethereum, BSC |
| Access | on request to [email protected] | on request, by your organization’s owner |
A test key works only on the testnet API and a live key only on the mainnet API. The SDKs and your own code can tell them apart by the prefix, for example to refuse a test key in production.
- Create and revoke keys in the console, under API keys. An organization can have several, for example one per backend service.
- The secret is shown once, when you create the key. Portuna stores only its hash, so a lost key cannot be shown again: create a new one.
- A revoked key gets
401 unauthorizedat once. - Send the key in every request as
Authorization: Bearer <key>. Keep it on your backend: never in a browser, an app or a repository.
Testnet chains
Section titled “Testnet chains”| Chain | Chain ID | Native coin | Test USDT | Explorer |
|---|---|---|---|---|
| Sepolia | 11155111 | ETH | 0x3809a97a7a25C8bA577027c0AE2D81a09cdA1a2f | sepolia.etherscan.io |
| BSC testnet | 97 | BNB | 0x3809a97a7a25C8bA577027c0AE2D81a09cdA1a2f | testnet.bscscan.com |
- Gas comes from faucets: see the Quickstart.
- The test USDT is a plain ERC-20 like USDT: 6 decimals and
Transferevents. Anyone may mint it, up to 10,000 USDT per address an hour:mint(address,uint256);mintable(address)shows what is left. Or get it in the console, Tokens → Test USDT: Portuna mints it to the address and pays the gas, up to 50,000 USDT in 5 requests a day per organization. Mainnet has no such thing. - Fees are charged at your testnet rates, in test coins, so that you can check the numbers before going live.
- Sepolia already runs the Glamsterdam gas rules (EIP-8037), which make first sweeps more expensive than on Ethereum mainnet today: see First and repeat sweeps.
Mainnet chains
Section titled “Mainnet chains”| Chain | Chain ID | Native coin | Listed tokens | Explorer |
|---|---|---|---|---|
| Ethereum | 1 | ETH | USDT 0xdAC17F958D2ee523a2206206994597C13D831ec7, USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | etherscan.io |
| BSC | 56 | BNB | USDT 0x55d398326f99059fF775485246999027B3197955, USDC 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d | bscscan.com |
Any other ERC-20 can be added by its contract address: see Tokens. Moving an integration from the testnet: Going live.