Setting up an Account

Prerequisites

Ensure Olatte is installed correctly:

olatte --version

If this command fails, see Setting up your environment.

Create a Signer

A Signer is capable of signing transactions, serving as a foundational element for accounts within OlaVM. The creation of a Signer necessitates the private key of your smart wallet, from which the public key can be inferred.

Olatte is designed with the capability to generate a keystore file. This file securely stores wallet's private key, protected by an individual password. Accounts maintained within this keystore file can utilize Olatte to authenticate transactions. The primary benefit of this methodology lies in its ability to avert the storage of private keys in unencrypted text format on your local machine. Instead, it employs a password to generate an encrypted file, which can be placed in a directory of your choosing.

The keystore file is stored in the default location of the Olatte CLI.

Create a keystore file

You can create the directory ~/.ola-wallets/deployer and generate a keystore within this folder.

Create a directory:

mkdir -p ~/.ola-wallets/deployer

Create a new keystore file within the directory:

olatte signer keystore new ~/.ola-wallets/deployer/keystore.json

Enter password:
Created new encrypted keystore file: /home/ola/.ola-wallets/deployer/keystore.json
Public key: 0xfb6a1799...
Address: 0x3a6ec257...

Note:

  • In the password prompt, enter a password.

  • You will need this password to sign transactions using Olatte.

Create a keystore using your private key:

olatte signer keystore from-key ~/.ola-wallets/deployer/keystore.json

Enter private key:
Enter password:
Created new encrypted keystore file: /home/ola/.ola-wallets/deployer/keystore.json
Public key: 0xfb6a1799...
Address: 0x3a6ec257...

Note:

  • In the private key prompt, paste the private key of your ola wallet.

  • In the password prompt, enter a password.

  • You will need this password to sign transactions using Olatte.

Inspect your keystore:

olatte signer keystore inspect ~/.ola-wallets/deployer/keystore.json

Enter password:
Public key: 0xfb6a1799...

Or view your private key:

olatte signer keystore inspect-private ~/.ola-wallets/deployer/keystore.json

Enter password:
Private key: 0x8f0814...

Register Public Key

You now have a default wallet. Before sending transactions, you need to register your publicKey with the system contract:

olatte set-pub-key --network pre-alpha --keystore path/to/keystore.json
  • If you have already set the OLA_KEYSTORE environment variable, you can omit the keystore parameter here.

  • --network pre-alpha is for Ola pre-alpha test net, can be omitted.

Registering the Public Key in the system contract is for signature verification. Ola natively supports AA (Account Abstraction); you can also define your own Account logic by deploying AA. We will collaborate with wallet developers to build the AA ecosystem, and the documentation for this section will be updated subsequently.

Last updated