Faucet
To get started with the SDK it can be helpful get some Sui tokens to play with. The faucet is a
simple way to get some tokens sent to your address in testnet
, devnet
or localnet
if you are
running your own network locally for development.
You can request sui from the faucet using the @mysten/sui.js/faucet
package.
import { requestSuiFromFaucetV0, getFaucetHost } from '@mysten/sui.js/faucet';
await requestSuiFromFaucetV0({
host: getFaucetHost('testnet'),
recipient: '0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231',
});
The sui faucet is rate limited, so after making this call you may not be able to request more sui for a while. The exact limits depend on which network you are connecting to.