mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-25 16:26:48 +00:00

* Implement bip32 * Unite private and public extended keys * Change variable names * Change test name and add comment * Rename var name * Rename ckd.go to child_key_derivation.go * Rename ser32 -> serializeUint32 * Add PrivateKey method * Rename Path -> DeriveFromPath * Add comment to validateChecksum * Remove redundant condition from parsePath * Rename Fingerprint->ParentFingerprint * Merge hardened and non-hardened paths in calcI * Change fingerPrintFromPoint to method * Move hash160 to hash.go * Fix a bug in calcI * Simplify doubleSha256 * Remove slice end bound * Split long line * Change KaspaMainnetPrivate/public to represent kprv/kpub * Add comments * Fix comment * Copy base58 library to kaspad * Add versions for all networks * Change versions to hex * Add comments Co-authored-by: Svarog <feanorr@gmail.com> Co-authored-by: Elichai Turkel <elichai.turkel@gmail.com>
30 lines
1.2 KiB
Go
30 lines
1.2 KiB
Go
// Copyright (c) 2014 The btcsuite developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
/*
|
|
Package base58 provides an API for working with modified base58 and Base58Check
|
|
encodings.
|
|
|
|
Modified Base58 Encoding
|
|
|
|
Standard base58 encoding is similar to standard base64 encoding except, as the
|
|
name implies, it uses a 58 character alphabet which results in an alphanumeric
|
|
string and allows some characters which are problematic for humans to be
|
|
excluded. Due to this, there can be various base58 alphabets.
|
|
|
|
The modified base58 alphabet used by Bitcoin, and hence this package, omits the
|
|
0, O, I, and l characters that look the same in many fonts and are therefore
|
|
hard to humans to distinguish.
|
|
|
|
Base58Check Encoding Scheme
|
|
|
|
The Base58Check encoding scheme is primarily used for Bitcoin addresses at the
|
|
time of this writing, however it can be used to generically encode arbitrary
|
|
byte arrays into human-readable strings along with a version byte that can be
|
|
used to differentiate the same payload. For Bitcoin addresses, the extra
|
|
version is used to differentiate the network of otherwise identical public keys
|
|
which helps prevent using an address intended for one network on another.
|
|
*/
|
|
package base58
|