Programmatic Faucet
We have deployed some updates to the Teztnets platform that include a long-requested feature: the programmatic faucet.
With the npm package @oxheadalpha/get-tez
, you can now programatically fund an address using Javascript/Typescript or using the CLI. See the package details for more for info on installing and using.
Proof of Work
To prevent spam, we’ve also introduced the need to solve PoW challenges before receiving your Tez. The number of challenges given depends on the network and the amount of Tez requested. Less challenges are required when requesting Tez via a faucet’s web interface compared to when doing so programmatically.
It is relatively easy to get large amount of Tez on an ephemeral network such as mondaynet and dailynet. Meanwhile, ghostnet is getting large (600Gi for an archive node) and we want to keep this network useful for some time. Therefore we made getting tokens for this network just a little bit harder - you have to crunch numbers for approximately one hour to get enough Tez to become a ghostnet baker.
Usage
Using the package is as simple as the following:
JS/TS:
import getTez from "@oxheadalpha/get-tez"
(async () => {
const txHash = await getTez({
address: "tz1...",
amount: 10,
network: "ghostnet",
})
// txHash: ooaEskbj...
})()
CLI:
npx @oxheadalpha/get-tez tz1... --amount 10 --network ghostnet
Special thanks to Nicolas Ochem