Pi Squared
HomeAbout UsCareersDeveloperResourcesBlog
  • Pi Squared
  • VSL Devnet
  • Overview
  • FAQ
  • Getting Started
    • Run a Local Devnet
    • Core Concepts
      • The Devnet Architecture
      • The Account Model
      • Transactions and Claims
  • Interact with the Devnet
    • Send Raw Curl Requests
    • Run Commands with the CLI
    • Use MetaMask Integration
    • Browse Claims with the Explorer
  • 1+3 Architecture
    • Multichain Interoperability
    • Blockchain Mirroring
      • Block Header Settlement
    • AI + Trusted Execution Environment
  • Metamask Integration
    • Run the MetaMask Snap
    • Sample dApp using MetaMask
  • Tutorials
    • Creating Accounts
Powered by GitBook
On this page
  • Step 1: Enter REPL Mode
  • Step 2: Connect to a Network
  • Step 3: Create Accounts
  • Step 4: Fund Accounts
  • Step 5: Use the Accounts
  • Step 6: Save or Export Accounts (Optional)
  • Cleanup (Optional)
  • Next Steps

Was this helpful?

  1. Tutorials

Creating Accounts

This tutorial walks you through how to create and manage accounts on the VSL network using the vsl-cli tool.

We assume you already have the CLI installed and are familiar with basic terminal usage. If you need to install it, follow the instructions in the Run Commands with the CLI guide.

Step 1: Enter REPL Mode

We recommend using REPL mode for tutorials and experimentation. It gives you a shell-like interface to run multiple commands:

vsl-cli repl --tmp-config

This will start the interactive CLI in temporary configuration mode.

Step 2: Connect to a Network

You can either launch a local development node or connect to a remote one.

Option A: Launch a Local Node

vsl> server:launch --db tmp --master-balance 1000000000

This starts a local VSL node with a temporary database and a master account preloaded with tokens.

Option B: Use Remote Devnet

vsl> network:add remote --url https://rpc.vsl.pi2.network
vsl> network:use remote

You can also check network health:

vsl> health:check

Step 3: Create Accounts

You can create an account using the commands below. In this case, create two accounts named alice and bob:

vsl> account:create alice
vsl> account:create bob

You can list all created accounts with:

vsl> account:list

Step 4: Fund Accounts

Use the master account to transfer native tokens:

vsl> account:use master
vsl> pay --to alice --amount 0x1000
vsl> pay --to bob --amount 0x500

Switch to Alice and check her balance:

vsl> account:use alice
vsl> account:balance

Repeat for Bob:

vsl> account:use bob
vsl> account:balance

Step 5: Use the Accounts

Set a default account for future commands:

vsl> account:use alice

You can check which account is currently active:

vsl> account:current

To get more details:

vsl> account:get alice

Step 6: Save or Export Accounts (Optional)

Export Alice’s private key to a file:

vsl> account:export alice -f alice.key

Later, you can re-import:

vsl> account:load alice -p <private_key>

Cleanup (Optional)

If using a local setup and want to remove everything:

vsl> account:remove alice
vsl> account:remove bob
vsl> network:remove remote
vsl> server:stop

Next Steps

You’ve just created and funded accounts on the VSL network. From here, you can start working with claims, assets, and more.

Need help? Join the community on Discord

PreviousSample dApp using MetaMask

Last updated 16 hours ago

Was this helpful?