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: |
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: |
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): |
seed -> HD wallet
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: |
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: |
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: |
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 |