@@ -44,29 +44,35 @@ start Starts the faucet
44
44
45
45
Environment variables
46
46
47
- FAUCET_CONCURRENCY Number of distributor accounts. Defaults to 5.
48
- FAUCET_PORT Port of the webserver. Defaults to 8000.
49
- FAUCET_MEMO Memo for send transactions. Defaults to unset.
50
- FAUCET_GAS_PRICE Gas price for transactions as a comma separated list.
51
- Defaults to "0.025ucosm".
52
- FAUCET_GAS_LIMIT Gas limit for send transactions. Defaults to 100000.
53
- FAUCET_MNEMONIC Secret mnemonic that serves as the base secret for the
54
- faucet HD accounts
55
- FAUCET_PATH_PATTERN The pattern of BIP32 paths for the faucet accounts.
56
- Must contain one "a" placeholder that is replaced with
57
- the account index.
58
- Defaults to the Cosmos Hub path "m/44'/118'/0'/0/a".
59
- FAUCET_ADDRESS_PREFIX The bech32 address prefix. Defaults to "cosmos".
60
- FAUCET_TOKENS A comma separated list of token denoms, e.g.
61
- "uatom" or "ucosm, mstake".
62
- FAUCET_CREDIT_AMOUNT_TKN Send this amount of TKN to a user requesting TKN. TKN is
63
- a placeholder for the token's denom. Defaults to 10000000.
64
- FAUCET_REFILL_FACTOR Send factor times credit amount on refilling. Defauls to 8.
65
- FAUCET_REFILL_THRESHOLD Refill when balance gets below factor times credit amount.
66
- Defaults to 20.
67
- FAUCET_COOLDOWN_TIME Time (in seconds) after which an address can request
68
- more tokens. Can be set to "0". Defaults to 24 hours
69
- if unset or an empty string.
47
+ FAUCET_CONCURRENCY Number of distributor accounts. Defaults to 5.
48
+ FAUCET_PORT Port of the webserver. Defaults to 8000.
49
+ FAUCET_MEMO Memo for send transactions. Defaults to unset.
50
+ FAUCET_GAS_PRICE Gas price for transactions as a comma separated list.
51
+ Defaults to "0.025ucosm".
52
+ FAUCET_GAS_LIMIT Gas limit for send transactions. Defaults to 100000.
53
+ FAUCET_MNEMONIC Secret mnemonic that serves as the base secret for the
54
+ faucet HD accounts
55
+ FAUCET_PATH_PATTERN The pattern of BIP32 paths for the faucet accounts.
56
+ Must contain one "a" placeholder that is replaced with
57
+ the account index.
58
+ Defaults to the Cosmos Hub path "m/44'/118'/0'/0/a".
59
+ FAUCET_ADDRESS_PREFIX The bech32 address prefix. Defaults to "cosmos".
60
+ FAUCET_TOKENS A comma separated list of token denoms, e.g.
61
+ "uatom" or "ucosm, mstake".
62
+ FAUCET_CREDIT_AMOUNT_TKN Send this amount of TKN to a user requesting TKN. TKN is
63
+ a placeholder for the token's denom. Defaults to 10000000.
64
+ FAUCET_REFILL_FACTOR Send factor times credit amount on refilling. Defauls to 8.
65
+ FAUCET_REFILL_THRESHOLD Refill when balance gets below factor times credit amount.
66
+ Defaults to 20.
67
+ FAUCET_COOLDOWN_TIME Time (in seconds) after which an address can request
68
+ more tokens. Can be set to "0". Defaults to 24 hours
69
+ if unset or an empty string.
70
+ GOOGLE_RECAPTCHA_SECRET_KEY The secret key for validating input with the recaptcha v2
71
+ service. If this value is set, then each call to the `/credit`
72
+ endpoint will require a valid recaptcha response string in
73
+ the JSON POST data named `recaptcha` in addition to the `denom`
74
+ and `address`.
75
+ Defaults to unset (disabled)
70
76
```
71
77
72
78
### Faucet HD wallet
@@ -134,6 +140,14 @@ curl --header "Content-Type: application/json" \
134
140
http://localhost:8000/credit
135
141
```
136
142
143
+ ### Using the faucet with Recaptcha validation enabled
144
+ ```
145
+ curl --header "Content-Type: application/json" \
146
+ --request POST \
147
+ --data '{"denom":"ucosm","address":"cosmos1yre6ac7qfgyfgvh58ph0rgw627rhw766y430qq", "recaptcha": "03AFcWeA6KFdGLxDQIx_UZ9Y9IMlAJyen-DkT3k..."}' \
148
+ http://localhost:8000/credit
149
+ ```
150
+
137
151
### Checking the faucets status
138
152
139
153
The faucet provides a simple status check in the form of an http GET request. As
0 commit comments