Get DWLT Tokens
The dWallet faucet is a useful tool for developers to get free test DWLT
tokens,
allowing them to deploy and interact with their programs on dWallet's Testnet.
Prerequisites
To request tokens from the faucet, you need a DWLT
address that can receive the tokens.
Find your DWLT Address
To find your DWLT address, run the following command:
dwallet client active-address
If you need to create a new DWLT address, follow the steps to create a new DWLT Address.
Request Test Tokens via cURL
Use the following cURL command to request tokens from the faucet server:
curl -X POST --location "https://faucet.alpha.testnet.dwallet.cloud/gas" \
-H "Content-Type: application/json" \
-d '{
"FixedAmountRequest": {
"recipient": "<YOUR-ACTIVE-ADDRESS>"
}
}'
If you are working with a local network,
replace https://faucet.alpha.testnet.dwallet.cloud/gas
with http://127.0.0.1:9123/gas
.
Request Test Tokens via TypeScript SDK
You can also request tokens using the dWallet TypeScript SDK.
import {requestSuiFromFaucetV0 as requestDwltFromFaucetV0} from '@dwallet-network/dwallet.js/faucet';
// Get tokens from the Testnet faucet server.
const response = await requestDwltFromFaucetV0({
// Connect to Testnet
host: 'https://faucet.alpha.testnet.dwallet.cloud/gas',
recipient: keypair.toSuiAddress(),
});
console.log(response);
If you are working with a local network,
replace 'https://faucet.alpha.testnet.dwallet.cloud/gas'
with 'http://127.0.0.1:9123/gas'
.
Test tokens on a local network
If you are running a local dWallet network, you can request tokens from your local faucet. For more details, refer to the Connect to a Local Network guide.