Skip to main content

Creating a developer account

Beginner
Getting started
Tutorial

Overview

On BigFile developers accounts, or identities, use a private/public key pair for authentication. Accounts are identified by a principal which is a generic identifier value that is used for users, cubes, and potentially other future concepts. Each developer account's principal value is derived from the account's public key from the private/public key pair.

BigFile developer accounts can be compared to a Bitcoin or Ethereum wallet address. One primary difference, however, is that BigFile accounts do not have an initial balance.

BIG identity terms

Other BigFile identity-related terms you may come across include:

  • Ledger account identifier: The identifier associated with your BigFile ledger account.

  • Wallets: Used to store forms of currency. Developers can use a cycles wallet to send cycles to and from cubes, however the cycles ledger is the most optimal way for using and managing cycles.

  • Internet Identity: BigFile native authentication service. Internet Identity doesn't use usernames and passwords; instead it uses a passkey that is stored in your local device's hardware.

Difference between a ledger and a wallet

On BigFile, a ledger is a system cube used to store accounts and their transactions. Users have a ledger account identifier. Ledger accounts are used to hold BIG tokens. To get information on your ledger account, you need to query the ledger system cube.

A wallet on BIG is used to store cycles that can be sent to cubes to pay for their consumed resources.

In a typical developer workflow, a developer will receive BIG tokens to their ledger account, then convert those tokens into cycles.

Creating your account

To create a new developer account, use the BIG SDK tool dfx:

dfx identity new <identity_name>

Identities created with dfx are global; they are not confined to a specific project's context. Identity names must use the characters ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_@0123456789.

Getting your account principal

To obtain the principal identifier for your account, use the commands:

dfx identity use <identity_name>
dfx identity get-principal

The principal will look something like this:

itk7v-ihlxk-ktdrh-fcnst-vkoou-orj77-52ogl-jqwj5-zpfdv-az3lr-xqe

You can also inspect the corresponding private key by running:

dfx identity export default

The result may look something like this:

-----BEGIN EC PRIVATE KEY-----
MHQCAQEEIIGTvo7+8q+dRVoDWPVp1hBziKUEOffo1PDkY2Vn8sKMoAcGBSuBBAAK
oUQDQgAEXFFBa0oxGdamv537nusjtgVuzElEMtEbbj4dQ1xyu2WMa+PU9q9LIK26
Ar821EwGwp1Qc9Vv93FGPTvRb4HVXQ==
-----END EC PRIVATE KEY-----

Storing the account's keys

When a new identity is created with dfx, the private key is stored in the ~/.config/dfx/identity/<identity_name>/identity.pem file. This file should be backed up to a secure location.

The --storage-mode flag is available, which can be used to create a password-protected or plaintext PEM file instead. These flags can be used such as:

dfx identity new <identity_name> --storage-mode password-protected

or:

dfx identity new <identity_name> --storage-mode plaintext

Import an existing account

To import an existing PEM file to be used for your identity, use the command:

dfx identity import <identity_name> pem_file-name

This command supports the --storage-mode flag as well, allowing for importing password-protected or plaintext PEM files.

How to top up the BIG balance of your account

Once you have a developer account, you will need to top up the account with BIG. First, get your account's ledger account id:

dfx identity use <identity_name>
dfx ledger account-id

This will return your account number on the BIG ledger:

e213184a548871a47fb526f3cba24e2ee2fbbc8129c4ab497ef2ce535130a0a4

This account id is where you will need to send BIG tokens. To obtain BIG tokens, you can use several methods:

  • Purchase BIG tokens directly through an exchange.

  • Receive tokens as rewards for participating in the governance of the BigFile.

  • Receive a grant of tokens through the BigFile Association (ICA) or the BigFile Foundation.

  • Receive tokens as remuneration for providing computing capacity as a node provider.

Once you have received BIG tokens into your account, you can see the balance using this command:

dfx ledger --network ic balance

This will output something like this:

19.420000 BIG

Next steps

Next, learn about cycles and how to acquire them.