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 requestSuiFromFaucetV2
function from the
@mysten/sui/faucet
package to your project.
Use requestSuiFromFaucetV2
in your TypeScript code to request SUI from the network's faucet.
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. For testnet,the best way to get SUI is via
the Web UI: faucet.sui.io
.