faucet

This guide treats with creating an account in the Aptos Move VM and obtaining initial funds using the faucet interface.

  • Ensure you have curl installed on your system.

  • Ensure you have access to the Aptos Move VM.

Table of Contents

  1. Creating an Account

  2. Getting Funds with Faucet

Creating an Account

To create an account in the Aptos Move VM, use the following curl command:

curl -X POST --data '{
  "jsonrpc": "2.0",
  "id"     : 1,
  "method" : "createAccount",
  "params" : [{"data":"0xcf05f38500bbf69e880c802808d7ccb490f050d1c04fd537d5b92d839f40ebe8"}]
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/2gLyawqthdiyrJktJmdnDAb1XVc6xwJXU6iJKu3Uwj21F2mXAK/rpc

Replace the "data" value with your desired public key.

Upon successful execution of the command, you will receive a JSON response containing an account address. Take note of this address as it will be used in the next step to obtain funds.

Getting Funds with Faucet

To receive initial funds in your newly created account, use the following curl command:

curl -X POST --data '{
  "jsonrpc": "2.0",
  "id"     : 1,
  "method" : "faucet",
  "params" : [{"data":"f1f94010368167dd64ad8bc264a165978f82c304e7a0d889665342d9010a2089"}]
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/2gLyawqthdiyrJktJmdnDAb1XVc6xwJXU6iJKu3Uwj21F2mXAK/rpc

Replace the "data" value with the account address you received in the previous step.

Upon successful execution of the command, you will receive a JSON response confirming the transaction. Your account will now have initial funds to use on the Aptos Move VM.

Congratulations! You have successfully created an account and obtained initial funds using the Faucet interface.

Last updated