Skip to Content
MCN Blockchain

Accounts and addresses

Create an account, validate its address and back up access to native MCN.

An externally owned account is controlled by a secp256k1 private key. A contract account is controlled by deployed code. Both use 20-byte addresses.

Address format

An address has 42 characters: 0x followed by 40 hexadecimal characters. Accept lowercase addresses; for mixed-case input, validate the EIP-55 checksum. Address validation checks syntax, not ownership or the ability to recover funds.

There is no required memo, account-registration fee, account rent or reserved minimum balance. A newly generated address can receive MCN immediately. Sending requires MCN for the amount and gas.

Create an encrypted account with Geth

If you installed Geth through the node guide, run this on the secure computer where you want to create the key:

cd "$HOME/start-mcn"
umask 077
./bin/geth --datadir="$HOME/mcn-wallet" account new

Enter and repeat a strong password when prompted. Geth prints the public address and saves an encrypted JSON keystore in $HOME/mcn-wallet/keystore/. This command does not start a node or send a transaction. Keystores created this way do not include a recovery phrase.

Keep the keystore and password backed up separately. The node's Engine API JWT and validator BLS keys are different credentials; neither replaces this account's private key.

Validate with ethers

import { getAddress, isAddress } from "ethers";

const input = "0x00000000219ab540356cbb839cbe05303d7705fa";
if (!isAddress(input)) throw new Error("Invalid address");
console.log(getAddress(input)); // checksummed representation

The input above demonstrates formatting only. Choose your own recipient for transfers. See SDK setup.

Recover an account

Restore the encrypted keystore and password into compatible wallet software. For an HD wallet, restore its recovery phrase and the original derivation path. Confirm the recovered public address before funding it.

An address or transaction history cannot recover a lost private key. A node database is not a wallet backup. See offline signing.

Geth account management · EIP-55

On this page