@@ -75,7 +75,7 @@ export const FaucetRoutes: FastifyPluginAsync<
75
75
schema : {
76
76
operationId : 'run_faucet_btc' ,
77
77
summary : 'Add testnet BTC tokens to address' ,
78
- description : `Add 1 BTC token to the specified testnet BTC address.
78
+ description : `Add 0.01 BTC token to the specified testnet BTC address.
79
79
80
80
The endpoint returns the transaction ID, which you can use to view the transaction in a testnet Bitcoin block
81
81
explorer. The tokens are delivered once the transaction has been included in a block.
@@ -89,6 +89,13 @@ export const FaucetRoutes: FastifyPluginAsync<
89
89
examples : [ '2N4M94S1ZPt8HfxydXzL2P7qyzgVq7MHWts' ] ,
90
90
} )
91
91
) ,
92
+ large : Type . Optional (
93
+ Type . Boolean ( {
94
+ description :
95
+ 'Request a larger amount of testnet BTC than the default' ,
96
+ default : false ,
97
+ } )
98
+ ) ,
92
99
} ) ,
93
100
body : OptionalNullable (
94
101
Type . Object ( {
@@ -125,6 +132,7 @@ export const FaucetRoutes: FastifyPluginAsync<
125
132
async ( req , reply ) => {
126
133
await btcFaucetRequestQueue . add ( async ( ) => {
127
134
const address = req . query . address || req . body ?. address ;
135
+ const tbtcAmount = req . query . large ? 0.5 : 0.01 ;
128
136
if ( ! address ) {
129
137
return await reply . status ( 400 ) . send ( {
130
138
error : 'address required' ,
@@ -156,7 +164,7 @@ export const FaucetRoutes: FastifyPluginAsync<
156
164
} ) ;
157
165
}
158
166
159
- const tx = await makeBtcFaucetPayment ( btc . networks . regtest , address , 0.5 ) ;
167
+ const tx = await makeBtcFaucetPayment ( btc . networks . regtest , address , tbtcAmount ) ;
160
168
await fastify . writeDb ?. insertFaucetRequest ( {
161
169
ip : `${ ip } ` ,
162
170
address : address ,
0 commit comments