Versions in this module Expand all Collapse all v0 v0.0.1 Dec 11, 2016 Changes in this version + const HardenedKeyStart + const MaxSeedBytes + const MinSeedBytes + const RecommendedSeedLen + var BitcoinMain = &Params + var BitcoinTest = &Params + var ErrBadChecksum = errors.New("bad extended key checksum") + var ErrDeriveHardFromPublic = errors.New(...) + var ErrInvalidChild = errors.New("the extended key at this index is invalid") + var ErrInvalidKeyLen = errors.New(...) + var ErrInvalidSeedLen = fmt.Errorf(..., MinSeedBytes * 8, MaxSeedBytes * 8) + var ErrNotPrivExtKey = errors.New(...) + var ErrUnusableSeed = errors.New("unusable seed") + var MonacoinMain = &Params + func Address(redeem []byte, header byte) string + func AddressBytes(redeem []byte) []byte + func DecodeAddress(addr string) ([]byte, error) + func GenerateSeed(length uint8) ([]byte, error) + func IsMnemonicValid(mnemonic string) bool + func MnemonicToByteArray(mnemonic string) ([]byte, error) + func NewEntropy(bitSize int) ([]byte, error) + func NewMnemonic(entropy []byte) (string, error) + func NewSeed(mnemonic string, password string) []byte + func NewSeedWithErrorChecking(mnemonic string, password string) ([]byte, error) + type ExtendedKey struct + func NewKeyFromString(key string, param *Params) (*ExtendedKey, error) + func NewMaster(seed []byte, param *Params) (*ExtendedKey, error) + func (k *ExtendedKey) Child(i uint32) (*ExtendedKey, error) + func (k *ExtendedKey) IsPrivate() bool + func (k *ExtendedKey) Neuter() (*ExtendedKey, error) + func (k *ExtendedKey) ParentFingerprint() uint32 + func (k *ExtendedKey) PrivKey() (*PrivateKey, error) + func (k *ExtendedKey) PubKey() (*PublicKey, error) + func (k *ExtendedKey) String() string + func (k *ExtendedKey) Zero() + type Params struct + AddressHeader byte + DumpedPrivateKeyHeader []byte + HDPrivateKeyID []byte + HDPublicKeyID []byte + P2SHHeader byte + type PrivateKey struct + PublicKey *PublicKey + func FromWIF(wif string, param *Params) (*PrivateKey, error) + func Generate(param *Params) (*PrivateKey, error) + func NewPrivateKey(pb []byte, param *Params) *PrivateKey + func (priv *PrivateKey) Sign(hash []byte) ([]byte, error) + func (priv *PrivateKey) WIFAddress() string + type PublicKey struct + func NewPublicKey(pubKeyByte []byte, param *Params) (*PublicKey, error) + func (pub *PublicKey) Address() string + func (pub *PublicKey) AddressBytes() []byte + func (pub *PublicKey) Serialize() []byte + func (pub *PublicKey) Verify(signature []byte, data []byte) error