Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base58Decode ¶
func Base58Encode ¶
Base58 was invented with Bitcoin. It's a derivative of the base 64 algorithm except the main difference is that it uses 6 less characters inside its alphabet: O 0 1 I + /
func NewKeyPair ¶
func NewKeyPair() (ecdsa.PrivateKey, []byte)
Generates a new private / public key pair. In theory we can create up to 10^77 different keys.
func PublicKeyHash ¶
Types ¶
type Wallet ¶
type Wallet struct { PrivateKey ecdsa.PrivateKey PublicKey []byte }
We use the Elliptic Curve Digital Signature Algorithm to create a private key. It chooses randomly a number D between 0 and 2^256. Then with the private key, we pick on spot on the elliptical curve and use D value to move around the curve that many times until we reach another spot that will become the public key. The X and Y fields (of the public key) are the final coordinate that we landed on based on the D value.
type Wallets ¶
Stores the wallets inside a map of type: address -> Wallet.
func (*Wallets) GetAllAddresses ¶
Gets all the wallet adresses inside the Wallets struct.