Diem Developers

Create accounts and mint

Depending on the type of network you are using, you can use transactions to:

Create accounts, mint in testnet

If you are using testnettestnet - A publicly deployed instance of the Diem network that runs using a set of validator test nodes. The testnet is a demonstration of the Diem network that is built for experimenting with new ideas. It simulates a digital payment system; the coins on the testnet have no real world value., you can use the FaucetFaucet - The way to create Diem currency on our testnet with no real-world value. The Faucet is a service running along with the testnet. This service exists only to facilitate minting coins for the testnet. You can use the Faucet by sending a request to create coins and transfer them into a given account on your behalf. service to perform certain actions that only by performed by the Diem Association on mainnetmainnet - The production network for the Diem Payment Network.. You can do the following by sending requests to the faucet service endpoint:

  • Create a ParentVASP accountParentVASP account - The ParentVASP account is your unique root account. You can have only one parent account per Regulated VASP. Diem Networks will create a ParentVASP account on your behalf with your authentication key..
  • Mint and add fake Diem Coins to accounts for testing.

To create a ParentVASP account in testnet, send a request like the code example below to the faucet server:

http://<faucet server address>/?amount=<amount>&auth_key=<auth_key>&currency_code=<currency_code>

In this example request,

  • auth_key is the authorization key for an account.
  • amount is the amount of money available as the account balance.
  • currency_code is the specified currency for the amount.

This request first checks if there is an account available for the authorization key specified. If the account given by auth_key doesn’t exist, a ParentVASP account will be created with the balance of the amount in the currency_code specified. If the account already exists, this will simply give the account the specified amount of currency_code Diem Coins.

Create ChildVASP accounts in mainnet, pre-mainnet

If you are a Regulated VASP, and have been approved by Diem Networks as a participant on the Diem Payment Network (DPN), you first need to complete an application with Diem Networks to have a ParentVASP account created on your behalf.

Once Diem Networks creates your ParentVASP account (let’s call it Account A), you can create a ChildVASP accountChildVASP account - The ChildVASP account is the child of your ParentVASP account. A ChildVASP account stores the address of its ParentVASP. You can have any number of ChildVASP accounts if you wish.

To create a ChildVASP account, send the create_child_vasp_account transaction script from your Account A (your ParentVASP account).

With a single ParentVASP account, you can create up to 256 ChildVASP accounts. This transaction script allows you to specify:

  • Which currency the new account should hold, or if it should hold all known currencies.
  • If you want to initialize the ChildVASP account with a specified amount of coins in a given currency.

A Regulated VASP can purchase Diem Coins from a Designated Dealer.

Updated 4 months ago

Create accounts and mint

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.