FaucetResource
Access via urblock.faucet.
Request testnet tokens for development and testing. The faucet provides native gas tokens (e.g., MATIC on Polygon Amoy) with a cooldown period between requests.
Methods
getStatus()
Get faucet status including available networks and cooldown period.
const status = await urblock.faucet.getStatus();
console.log(status.networks); // available testnet networks
console.log(status.cooldown_hours); // hours between drip requests
Returns: FaucetStatusResponse
getBalances()
Get the faucet's current token balances per network.
const balances = await urblock.faucet.getBalances();
for (const b of balances.data) {
console.log(`${b.network}: ${b.balance} wei`);
}
Returns: FaucetBalanceResponse
drip(params)
Request testnet tokens to a wallet address.
| Parameter | Type | Required | Description |
|---|---|---|---|
network | string | Yes | Network ID (e.g., net_polygon_amoy) |
wallet_address | string | Yes | Recipient wallet address |
const result = await urblock.faucet.drip({
network: "net_polygon_amoy",
wallet_address: "0x...",
});
console.log(result.tx_hash); // transaction hash
console.log(result.amount); // amount sent in wei
Returns: FaucetDripResponse
note
The faucet requires JWT authentication (not API key). Create the SDK client with your dashboard access token when calling faucet methods.
See Also
- Faucet API — full endpoint reference
- Testnet Onboarding Guide — get started on testnet