| Crates.io | miden-faucet |
| lib.rs | miden-faucet |
| version | 0.11.5 |
| created_at | 2024-04-27 10:09:45.786294+00 |
| updated_at | 2025-09-18 01:13:41.386503+00 |
| description | Token faucet application for Miden testnet |
| homepage | https://miden.xyz |
| repository | https://github.com/0xMiden/miden-faucet |
| max_upload_size | |
| id | 1222474 |
| size | 389,355 |
This crate contains a binary for running a Miden testnet faucet.
For comprehensive guides, API reference, and examples, see the Miden Faucet Documentation.
make install-faucet
output-path:miden-faucet create-faucet-account \
--output-path <path to faucet.mac> \
--token-symbol MIDEN \
--decimals 6 \
--max-supply 100000000000000000
[!TIP] This account will not be created on chain yet, creation on chain will happen on the first minting transaction.
miden-faucet start \
--endpoint http://localhost:8080 \
--node-url https://rpc.testnet.miden.io:443 \
--network testnet \
--account <path to faucet.mac>
After a few seconds you may go to http://localhost:8080 and see the faucet UI.
The faucet implements several security measures to prevent abuse:
Proof of Work requests:
Requests batching:
GET /pow
account_id (string, required): The account ID requesting the challengeapi_key (string, optional): API key for authenticationchallenge (string): The encoded challenge string in hexadecimal formattarget (number): The target value for the proof-of-work challenge. A solution is valid if the hash H(challenge, nonce) is less than this target. As the hashing function we use SHA3-256timestamp (number): The timestamp when the challenge was created (seconds since UNIX epoch)GET /get_tokens
account_id (string, required): The account ID requesting tokensis_private_note (boolean, required): Whether to create a private noteasset_amount (number, required): Requested asset amount (in base units)challenge (string, required): The encoded challenge from the /pow endpointnonce (number, required): The nonce used to solve the challengeapi_key (string, optional): API key for authenticationtx_id (string): ID of the created transaction
note_id (string): ID of the created note
GET /get_note
note_id (string, required): The ID of the note to retrievenote_id (string): The ID of the requested notedata_base64 (string): The note data encoded in base64 format. This data should be decoded and saved as a file with .mno extension and application/octet-stream media typeThe API returns appropriate HTTP status codes:
200: Success400: Bad request429: Rate limited500: Server errorError responses include a message field with details about the error.
This project is MIT licensed.