Versions in this module Expand all Collapse all v0 v0.0.1 Jul 2, 2020 Changes in this version + const HardenedKeyStart + const MAxRecommendedSeedLen + const MinRecommendedSeedLen + var Bitcoin = CoinType + var BitcoinAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") + var BitcoinPubkeyPrefix = []byte + var BitcoinScriptPrefix = []byte + var ChainPrefix = []byte + var ErrBadChecksum = errors.New("bad extended key checksum") + var ErrDeriveBeyondMaxDepth = errors.New("cannot derive a key with more than 255 indices in its path") + var ErrDeriveHardFromPublic = errors.New("cannot derive a hardened key from a public key") + var ErrInvalidAddress = errors.New("address is invalid") + var ErrInvalidChild = errors.New("the extended key at this index is invalid") + var ErrInvalidDerivedPath = errors.New("Invalid DerivedPath") + var ErrInvalidKeyLen = errors.New("the provided serialized extended key length is invalid") + var ErrInvalidSeedLen = fmt.Errorf("seed length should be between 16 bytes and 64 bytes!") + var ErrKeyIsNotPrivate = errors.New("The key is not private") + var ErrNotPrivExtKey = errors.New("unable to create private keys from a public extended key") + var ErrorInvalidBase58String = errors.New("invalid base58 string") + var Ethereum = CoinType + var FlickrAlphabet = NewAlphabet("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ") + var IPFSAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") + var RippleAlphabet = NewAlphabet("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz") + func Base58checkDecode(address string, fix []byte) ([]byte, error) + func Base58checkEncode(data []byte, fix []byte) string + func Decode(input string, alphabet *Alphabet) ([]byte, error) + func DerivedPrivateKeyBytes(seed []byte, coinType CoinType, serializes uint32) ([]byte, error) + func Encode(input []byte, alphabet *Alphabet) string + func GetMultiSigShareData(owpub string) (string, error) + type Alphabet struct + func NewAlphabet(alphabet string) *Alphabet + func (alphabet Alphabet) String() string + type CoinType struct + type ExtendedKey struct + func DerivedPrivateKeyWithPath(seed []byte, derivedPath string, curveType uint32) (*ExtendedKey, error) + func GetCoinRootPublicKey(seed []byte, coinType CoinType) (*ExtendedKey, error) + func InitRootKeyFromSeed(seed []byte, curveType uint32) (*ExtendedKey, error) + func NewExtendedKey(key, chainCode, parentFP []byte, depth uint8, serializes uint32, ...) *ExtendedKey + func OWDecode(data string) (*ExtendedKey, error) + func (k *ExtendedKey) DerivedPublicKeyFromPath(derivedPath string) (*ExtendedKey, error) + func (k *ExtendedKey) DerivedPublicKeyFromSerializes(serializes uint32) (*ExtendedKey, error) + func (k *ExtendedKey) GenPrivateChild(serializes uint32) (*ExtendedKey, error) + func (k *ExtendedKey) GenPublicChild(serializes uint32) (*ExtendedKey, error) + func (k *ExtendedKey) GetPrivateKeyBytes() ([]byte, error) + func (k *ExtendedKey) GetPublicKey() *ExtendedKey + func (k *ExtendedKey) GetPublicKeyBytes() []byte + func (k *ExtendedKey) GetUncompressedPublicKeyBytes() []byte + func (k *ExtendedKey) OWEncode() string + type MultiSigShare struct + ChainCode []byte + CurveType uint32 + Pubkey []byte + func ChainDecode(owchain string) (*MultiSigShare, error) + func (ms MultiSigShare) ChianEncode() string