diff --git a/docs/ecosystem/faucet-account-created.png b/docs/ecosystem/faucet-account-created.png new file mode 100644 index 0000000000..ee1115f76b Binary files /dev/null and b/docs/ecosystem/faucet-account-created.png differ diff --git a/docs/ecosystem/faucet-create-account.png b/docs/ecosystem/faucet-create-account.png new file mode 100644 index 0000000000..6008896021 Binary files /dev/null and b/docs/ecosystem/faucet-create-account.png differ diff --git a/docs/ecosystem/faucet-fund-account.png b/docs/ecosystem/faucet-fund-account.png new file mode 100644 index 0000000000..ff7bf2b2bc Binary files /dev/null and b/docs/ecosystem/faucet-fund-account.png differ diff --git a/docs/ecosystem/faucet-input-public-key.png b/docs/ecosystem/faucet-input-public-key.png new file mode 100644 index 0000000000..e275256749 Binary files /dev/null and b/docs/ecosystem/faucet-input-public-key.png differ diff --git a/docs/ecosystem/faucets.md b/docs/ecosystem/faucets.md index 342f82c0a0..143313c04f 100644 --- a/docs/ecosystem/faucets.md +++ b/docs/ecosystem/faucets.md @@ -28,3 +28,83 @@ Network Faucets provide free Flow tokens for testing purposes, functioning like - [Testnet](https://learnweb3.io/faucets/flow) + +## Using Flow Faucet + +### Funding Your Account + +If you already have a Flow account, you can fund it directly from the Faucet's landing page. Simply paste the address of the account you want to fund, complete the CAPTCHA, and click "Fund Your Account." + +![fund-your-account](./faucet-fund-account.png) + +After a few seconds, you'll see your account's FLOW balance as a confirmation. Note, the Faucet will automatically determine if the address you paste is a Flow or EVM address and will fund the account accordingly. + +### Creating a Flow Account + +#### Generate a Key Pair + +To create a Flow-native account, you'll need to generate a key pair. You can do this most easily [Flow CLI](../build/getting-started/flow-cli.md) with the [`keys generate` command](../tools/flow-cli/keys/generate-keys.md) + +```sh +flow keys generate +``` + +You'll receive a private key and a public key pair with default `ECDSA_P256` signature and `SHA3_256` hash algorithms. + +```sh +❯ flow keys generate + +🔴️ Store private key safely and don't share with anyone! +Private Key +Public Key +Mnemonic +Derivation Path m/44'/539'/0'/0/0 +Signature Algorithm ECDSA_P256 +``` + +You can then use the public key to create a new Flow account on the Faucet. Copy the resulting public key for the next step. + +#### Create a Flow-Native Account + +From the Faucet's landing page, click on the "Create Account" button. You'll be prompted to enter your public key. Paste the public key you generated using the Flow CLI and click "Create Account." + +:::tip + +Know that there is a distinction between Flow native accounts and EVM accounts. Native accounts allow you to interact with the Cadence runtime, while EVM accounts are used for interacting with Flow's EVM. To create an EVM account, you can use EVM tooling to generate an Ethereum Owned Account (EOA) and simply fund the associated address. Alternatively, you can create an EVM account controlled by your Flow native account - known as a Cadence Owned Account (COA) - in which case you'll need a Flow native account and should continue with the steps below. + +For more information interacting with EVM via COAs, see the [Interacting With COAs documentation](../evm/cadence/interacting-with-coa.md). + +::: + +![create-flow-account](./faucet-create-account.png) + +You can then paste your public key into the input field, complete the CAPTCHA, and click "Create Account." + +![input-public-key](./faucet-input-public-key.png) + +You'll be met with a confirmation screen, showing your Flow account address and the funded balance. + +![account-created](./faucet-account-created.png) + +#### Using your Flow Account + +Once your account has been created, you can add the account to your `flow.json` configuration file under the `accounts` attribute, like so: + +```json +{ + "accounts": { + "testnet-dev-account": { + "address": "", + "key": "" + } + } +} +``` + +:::warning + +If you plan on using your flow.json in a production environment, you'll want to look at alternative methods to manage your keys more securely, at minimum using environment variables instead of storing your account private keys in plain text. See [How to Securely Use CLI](../tools/flow-cli/flow.json/security.md) for more information on alternate key management strategies and how to configure them in your `flow.json` file. + +::: + +After adding your account to your `flow.json` file, you're ready to use your account in your project. You can now deploy contracts, run transactions, and interact with the Flow blockchain using your new account. \ No newline at end of file