TypeScript SDK
Faucet

Faucet

Devnet, Testnet, and local networks include faucets that mint SUI. You can use the Sui TypeScript SDK to call a network's faucet and provide SUI to the address you provide.

To request SUI from a faucet, import the requestSuiFromFaucetV0 function from the @mysten/sui/faucet package to your project.

import { getFaucetHost, requestSuiFromFaucetV0 } from '@mysten/sui/faucet';

Use requestSuiFromFaucetV0 in your TypeScript code to request SUI from the network's faucet.

await requestSuiFromFaucetV0({
	host: getFaucetHost('testnet'),
	recipient: <RECIPIENT_ADDRESS>,
});

Faucets on Devnet and Testnet are rate limited. If you run the script too many times, you surpass the limit and must wait to successfully run it again.