# Mainnet Address Generation

This document contains the information of account address for Cronos POS Chain mainnet.

## Address prefix

Account address for mainnet starts with prefix `cro`. For example: `cro1y8ua5laceufhqtwzyhahq0qk7rm87hhugtsfey`.

## Hierarchical Deterministic Wallet (HD Wallet) Derivation Path

Cronos POS Chain has [registered](https://github.com/satoshilabs/slips/blob/master/slip-0044.md) coin type `394` as defined in [BIP44 standard](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki).

Coin Type: 394\
Derivation Path: `44'/394'/0'/0/{index}` where index starts from 0.

i.e. the first address is derived at path `44'/394'/0'/0/0` and the second one at path `44'/394'/0'/0/1`.

## How to generate an address

{% hint style="warning" %}
**MAKE SURE YOU BACKUP YOUR MNEMONIC WORDS**\
Before using your generated mainnet addresses to receive funds, ensure that you have securely backed up your address's mnemonic words. It’s crucial to verify that these words are correct and can restore your wallet address in the future.

Please note that you are the sole owner of your wallet's mnemonic words. The Cronos POS Chain team cannot restore your wallet or recover your funds if the mnemonic words are lost.
{% endhint %}

{% hint style="warning" %}
**GENERATE ADDRESS ONLY IN A SECURE ENVIRONMENT**\
We recommend generating an address only on a trusted and secure computer. For enhanced security, consider running on an air-gapped (offline) machine.
{% endhint %}

{% hint style="warning" %}
**ALWAYS VERIFY YOUR MNEMONIC WORDS AND ADDRESS**\
Ensure you have backed up your mnemonic words correctly by restoring your wallet with them and verifying that the derived address is the same.

For more details on verifying your mnemonic words and addresses, please check [Mainnet Address Verification](https://docs.cronos-pos.org/for-users/wallets/mainnet-address-verification)&#x20;
{% endhint %}

There are four ways to generate the mainnet address by using:

* [Release Binary (CLI)](#a-release-binary-cli);
* [Ledger Wallet](#b-ledger-wallet);
* [Programmatically via Cronos POS Chain JavaScript Library](#c-programmatically); and
* [Crypto.com Defi Desktop Wallet](#d-crypto-org-chain-desktop-wallet-beta).

## A. Release Binary (CLI)

Supported OS: Linux, Mac OS, and Windows

#### Step 1. Get the Cronos POS Chain binary

Download the Cronos POS Chain Binary for Mainnet from the [release page](https://github.com/crypto-org-chain/chain-main/releases) and extract the binary. Here we used Linux as an example:

```bash
 $ curl -LOJ https://github.com/crypto-org-chain/chain-main/releases/download/v3.3.9/chain-main_3.3.9_Linux_x86_64.tar.gz
 $ tar -zxvf chain-main_3.3.9_Linux_x86_64.tar.gz
```

If you are downloading the binary for other operating systems, make sure you are downloading `v3.3.9` or newer versions that are targeting for mainnet.

Before moving to the next step, kindly check your `chain-maind` version by

```bash
$ ./chain-maind version
3.3.9
```

#### Step 2. Create a new key and address

Run the following command to create a new address. For example, you can create a key with the name "Default" by:

```bash
$ ./chain-maind keys add Default
```

You can find the generated address after running the command. **Please make sure that you have safely backed up the mnemonic words that appear on the last line.**

```bash
- name: Default
  type: local
  address: cro1qxm5lwml3v36h4pygwnn5nfzesupg7cx8nyfkt
  pubkey: cropub1addwnpepqg95fk5grlyucrnvdu8v3h4qnhgcm03ust4yysgtvdjqnh2ytmg6syjkav6
  mnemonic: ""
  threshold: 0
  pubkeys: []


**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.

scare blur bless unfair chat gadget leaf reveal job depend daughter unveil fatal cliff bus beach betray over later rent planet alert remove cactus
```

## B. Ledger Wallet

* Supported OS: Linux, Mac OS and Windows
* Pre-requisite: Ledger Hardware Wallet

### Step 1. Install Ledger Application

#### Step 1-1. Plug in your Ledger device to your computer. If you are using Ledger Nano X, please connect to your computer using the USB-C cable.

#### Step 1-2. Click "Ledger Icon" on the left navigation menu. Confirm to "Allow Ledger Manager" on your Ledger device.

<div align="center"><figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2FW734dilsr2fHkJUudoCJ%2FScreenshot%202024-12-04%20151307.png?alt=media&#x26;token=034ac8aa-ebbe-47e7-a002-ee8b877cc3d2" alt="" width="563"><figcaption></figcaption></figure></div>

#### Step 1-3. Search for "Cronos POS Chain" and install the application to your Ledger.

<div align="center"><figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Feov38VInRzww3jjotBRA%2FScreenshot%202024-12-04%20at%2015.33.28.png?alt=media&#x26;token=d98c1ea6-89b2-4bc8-b9c5-1dced1155371" alt="" width="563"><figcaption></figcaption></figure></div>

#### Step 1-4. Confirm the installation

You can confirm the installation by checking if the Cronos POS Chain App shows up in the main menu of your Ledger device:

<div align="center"><figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2FgIiDjFLC9ZNktAeX2ZUu%2FWhatsApp%20Image%202024-12-03%20at%2017.36.22.jpeg?alt=media&#x26;token=55d63a37-bf2c-4029-a2f5-c5333819334c" alt="" width="375"><figcaption></figcaption></figure></div>

***

## B-i. Ledger Wallet via Release Binary (CLI)

#### Step 1. Get the Cronos POS Chain binary

Download the Cronos POS Chain Binary for Mainnet from [release page](https://github.com/crypto-org-chain/chain-main/releases) and extract the binary. Here we used Linux as an example:

```bash
$ curl -LOJ https://github.com/crypto-org-chain/chain-main/releases/download/v3.3.9/chain-main_3.3.9_Linux_x86_64.tar.gz
$ tar -zxvf chain-main_3.3.9_Linux_x86_64.tar.gz
```

If you are downloading the binary for other operating systems, make sure you are downloading `v3.3.9`, which is the version targeting for mainnet.

#### Step 2. Open the Cronos POS Chain application on your Ledger device

#### Step 3. Create a new key and address

Run the following command to create a new address. For example, you can create a key with the name "Default" by:

```bash
$ ./chain-maind keys add Ledger --ledger
```

You will be prompted with the address on your Ledger device screen. Read it carefully and write it down. Afterward, confirm the address on your Ledger device.

{% hint style="info" %}
Cannot Connect To Your Ledger Device?&#x20;

If you encounter a connection error when creating a wallet, you can try to unplug and plug your Ledger device into your computer again. Please make sure your Ledger device is unlocked and you have opened the "Cronos POS Chain" application on your Ledger.
{% endhint %}

#### Step 4. Verify the address displayed on the terminal, and make sure it matches the address you saw on Ledger device

```bash
- name: Ledger
  type: ledger
  address: cro1tzhdkuc328cgh2hycyfddtdpqfwwu42yq3qgkr
  pubkey: cropub1addwnpepqw802qz5mvdcchlekqnypgj5vw3hef75yjw6gw6wda823aa0wrdwc7pl4n9
  mnemonic: ""
  threshold: 0
  pubkeys: []
```

***

## B-ii. Ledger Wallet via Crypto.com Defi Desktop Wallet

Please be aware of the [potential risks](https://github.com/crypto-com/chain-desktop-wallet#warning) of using it in mainnet. You should run it only on a trusted, safe and offline computer and always verify the mnemonic words before using the address. \
\
Download the latest version of the Crypto.com Defi Desktop Wallet [here](https://github.com/crypto-com/chain-desktop-wallet/releases) and follow the steps below to create an address.

#### Step 1. Open the application and click "Get Started" to set up an application password.

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-1e4d9f4890c262377f33f104d442f8e5b18a0b40%2Fdesktop-get-started.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 2. After setting up the password, click "Create Wallet".

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-5c4481373bbeccb757af3701b9dccea306eb4596%2Fdesktop-create-wallet.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 3. Fill in any wallet name of your choice and choose "MAINNET" as the network. Then check "Want to create with hardware wallet?" and choose "Ledger" as "Wallet Type"&#x20;

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-4a989d790a443f8aeede91fdc080c351058740a1%2Fledger-desktop-create-wallet.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-1b98c7e4a73fc48f677eccbba4f627c6f87e319c%2Fdesktop-create-success.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 4. Upon successful wallet creation, a warning message will be shown on the top right hand corner to remind you that the wallet is for address generation only and may not work when mainnet launches.

{% hint style="info" %}
**Cannot Connect To Your Ledger Device?** \
If you encounter a connection error when creating a wallet, you can try to unplug and plug your Ledger device into your computer again. Please make sure your Ledger device is unlocked and you have opened the "Cronos POS Chain" application on your Ledger.
{% endhint %}

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-218f74b26de87196a72d6b4979372a513292efc9%2Fdesktop-main-page.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 5. You can check the wallet address by clicking the "Receive" tab inside any token assets. Click "Verify address on Ledger" and the generated address will appear on your Ledger device screen for verification.

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-ff4f3d16eeb1da73377a3cd8715dd1a9cfd38a34%2Fledger-desktop-address.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

## C. Programmatically

You can generate the Mnemonic and address programmatically. Here is an example code snippet written in JavaScript using the [Cronos POS Chain JavaScript Library](https://github.com/crypto-com/chain-jslib) to generate the mnemonic and the mainnet address:

```javascript
// Import the library
const sdk = require("@crypto-com/chain-jslib");
const HDKey = sdk.HDKey;
const Secp256k1KeyPair = sdk.Secp256k1KeyPair;

// Initializing the library configurations with TestNet config
const cro = sdk.CroSDK({ network: sdk.CroNetwork.Testnet });

// Generating a random mnemonic words
const randomHDKey = HDKey.generateMnemonic(24); // This returns a 24 words mnemonic phrase

// Display the mnemonics words to the terminal. Only do this in a trusted, safe and offline computer.
// You may consider to store it securely instead of logging it.
console.log(randomHDKey);

// Derive a private key from an HDKey at the specified path
const privateKey = randomHDKey.derivePrivKey("m/44'/1'/0'/0/0");

// Getting a keyPair from a private key
const keyPair = Secp256k1KeyPair.fromPrivKey(privateKey);

// Generate address from the key pair
const address = new cro.Address(keyPair).account();
console.log(address);
```

## D. Crypto.com Defi Desktop Wallet

Supported OS: Ubuntu, Mac OS, and Windows

{% hint style="warning" %}
**DESKTOP WALLET**&#x20;

Please be aware of the [potential risks](https://github.com/crypto-com/chain-desktop-wallet#warning) of using wallet on the mainnet. Run it only on a trusted, secure, and offline computer. Always verify the mnemonic words before using the address.
{% endhint %}

Download the latest version of the Crypto.com Defi Desktop Wallet [here](https://github.com/crypto-com/chain-desktop-wallet/releases) and follow the steps below to create an address:

#### Step 1. Open the Cronos POS Chain application on your Ledger device

#### Step 2. Open the application and click "Get Started" to set up an application password.

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-1e4d9f4890c262377f33f104d442f8e5b18a0b40%2Fdesktop-get-started.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 3. After setting up the password, click "Create Wallet".

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-5c4481373bbeccb757af3701b9dccea306eb4596%2Fdesktop-create-wallet.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 4. Fill in any wallet name of your choice and choose "MAINNET" as the network. Then create the wallet by clicking "Create Wallet"

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-2468366e1b3ecade9ca2356130a56f2ab6340bc9%2Fdesktop-create-mainnet-wallet.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-1b98c7e4a73fc48f677eccbba4f627c6f87e319c%2Fdesktop-create-success.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 5. Upon successful wallet creation, a list of 24 mnemonic words will be displayed. Make sure you have copied and stored your mnemonic words in a safe place.

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-48cb387af95f3fe0416ee061f4fee9249444a0d7%2Fdesktop-backup-mnemonic.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 6. A warning message will be shown on the top right hand corner to remind you that the wallet is for address generation only and may not work when mainnet launches.

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-218f74b26de87196a72d6b4979372a513292efc9%2Fdesktop-main-page.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

#### Step 7. You can check the wallet address by clicking the "Receive" tab on the left navigation menu.

<figure><img src="https://2752961220-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xcZ8Rr2cOSGVblWtVsF%2Fuploads%2Fgit-blob-5f22f9c4bf7d71003982c1c86ed5431db4d6ad0c%2Fdesktop-address.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
