How to generate metaverse wallet address

Generate address

The steps are the same as Bitcion.

Just specify the length of entropy be 256 bits,

and specify address version prefix be 0x32 (for mainnet), 0x7F (for testnet).

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc#bitcoin-addresses

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#wallet-technology-details

generate random entropy

random entropy is 32 bytes (256 bits).

usually it should be generated by cryptographic securely random method.

demo entropy:
"11111111111111111111111111111111"

entropy -> mnemonic

mnemomic has 24 words

mnemonic is very very important!
Through mnemonic any one can control your account completely.
So please keep it safely.

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#generating-mnemonic-words

mnemonic: 
couple maze era give basic obtain shadow change couple maze era give basic obtain shadow change couple maze era give basic obtain shadow course

mnemonic -> seed

seed has 64 bytes (512 bits)

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#from-mnemonic-to-seed

root seed (hex encoded):
dfc04ce99cc105a3437bbf37ec5684aa9c657c041dadb375322b24ba6ff227cdb6ccb3ed87d5d8dcfc7f32a1b59a58fc7bdf83ccc6910d06c3f9867b2f0be211

seed -> HD wallet

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#creating-an-hd-wallet-from-the-seed

HD wallet -> private key

private key has 64 bytes (256 bits)

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#private-child-key-derivation

private key:
83df25fe1d82672767941ae50781682690d45398eb05eedafa3e74cee60c4892

private key -> public key

public key is always compressed.
so it must begin with 02 or 03, and followed by 64 bytes

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc#generating-a-public-key

public key:
030b309ce83d5f53639dc85fb301e3817a1d8845cdb53d74b4051127af2e6890df

public key -> payment address

address version prefix is 0x32 (for mainnet), 0x7F (for testnet).
Address is base58 encoded with this version prefix.

ref. https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc#bitcoin-addresses

Because of the specified payment address version prefix,
the mainnet’s address must start with M,
the testnet’s address must start with t.

For multisig address, the payment version is 0x05, make them must begin with 3.

address:
MPoDhHL8FLnwvyJfiaKHkBR1suUrnM8LXU

Verify address

First install and run a metaverse full node.
ref. https://mvs.org/wallet.html and https://docs.mvs.org/docs/

use validateaddress

mvs-cli validateaddress MPoDhHL8FLnwvyJfiaKHkBR1suUrnM8LXU

use importaccount and listaddresses

mvs-cli importaccount -n test1 -p passwd1 -i 10 couple maze era give basic obtain shadow change couple maze era give basic obtain shadow change couple maze era give basic obtain shadow course

mvs-cli listaddresses test1 passwd1