qqonline / iotex-address

The address library extracted from iotex-core.

Home Page:https://iotex.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iotex-address

This is the golang library of the address used in IoTeX blockchain and relatant products and services.

Address Generation Algorithm

A human readable address looks like io1nyjs526mnqcsx4twa7nptkg08eclsw5c2dywp4. It takes the following steps to be constructed:

  1. Generating a random private key and the corresponding public key using secp256k1's elliptic curve;
  2. Apply keccak256 hash function to the public key, exluding the first byte (hash := keccak256(pk[1:]);
  3. Take the late 20 bytes as the payload (payload := hash[12:]), which is the byte representation of the address;
  4. Apply bech32 encoding on the payload and adding io prefix.

About

The address library extracted from iotex-core.

https://iotex.io

License:Apache License 2.0


Languages

Language:Go 90.0%Language:Makefile 10.0%