Skip to main content
For the complete documentation index, see llms.txt

Fund your wallet

With your development environment set up, the next thing you need is tokens. In the production Midnight network, to run a DApp you need to hold some DUST in a persistent wallet and spend some of it on each transaction. However, a supply of free tDUST is available for developers who want to experiment with Midnight DApps.

tip

If you are using the local undeployed network, then use the local network faucet to fund your wallet and generate tDUST.

Get tNIGHT

tNIGHT is the test token for the Midnight network. It is used to generate tDUST for testing purposes. Here are the steps to get tNIGHT:

  1. Log in to your Lace Midnight wallet and copy your Unshielded wallet address.
Bech32m address format

All wallet addresses are shown in Bech32m format by default. The faucet also accepts the legacy (HEX) format, but prefer Bech32m.

  1. Visit Midnight Preprod faucet and enter your Unshielded wallet address.

Midnight preprod faucet

  1. Select Request tokens. This might take a few seconds to process and returns a transaction hash in the following format:
Transaction submitted. You will receive 1000 tNight, this should take about 2 mins. Its id is 00ec3ff48b7...

You should have received 1000.0 tNIGHT from the faucet. You can verify the balance in your wallet.

Delegate tDUST

After you have received tNIGHT, you need to delegate it to generate tDUST. Here's how to do it if you are using the Lace wallet:

  1. Log in to your Lace wallet, and then click Generate tDUST. You'll see your tDUST address populated in the input field.

Generate tDUST

  1. Click Review transaction to proceed, then select Confirm to submit the transaction.

Review transaction

You should see your tDUST tank generating test tokens for your wallet.

Confirm transaction

tip

If your application creates wallets from code, you can also generate DUST programmatically with the Wallet SDK instead of using the Lace UI.

Troubleshooting

Below are some common issues you might encounter when using the faucet and how to resolve them.

Provided address is invalid

  • Error: Provided address is invalid

  • Solution: Ensure that you're using the correct address. The address should be the Unshielded wallet address on the Lace Midnight wallet.

Rate limit exceeded

  • Error: {"status":"rate_limit_error","message":"Reached maximum number of requests for this address"}

  • Solution: Wait a few hours and try again. If the issue persists, then open a ticket at the Midnight Service Desk or ask for help in the Midnight Discord server.

Next steps

With tNIGHT in your wallet and tDUST generating, you are ready to build and deploy: continue with from local network to testnet.