Documentation ¶
Index ¶
- Constants
- type ExtendedKey
- func DeriveChildKey(index uint32, pk *ExtendedKey, curve elliptic.Curve) (*big.Int, *ExtendedKey, error)
- func DeriveChildKeyFromHierarchy(indicesHierarchy []uint32, pk *ExtendedKey, mod *big.Int, curve elliptic.Curve) (*big.Int, *ExtendedKey, error)
- func NewExtendedKeyFromString(key string, curve elliptic.Curve) (*ExtendedKey, error)
Constants ¶
View Source
const ( // HardenedKeyStart hardened key starts. HardenedKeyStart = 0x80000000 // 2^31 PubKeyBytesLenCompressed = 33 // MinSeedBytes is the minimum number of bytes allowed for a seed to // a master node. MinSeedBytes = 16 // 128 bits // MaxSeedBytes is the maximum number of bytes allowed for a seed to // a master node. MaxSeedBytes = 64 // 512 bits )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtendedKey ¶
type ExtendedKey struct { ecdsa.PublicKey Depth uint8 ChildIndex uint32 ChainCode []byte // 32 bytes ParentFP []byte // parent fingerprint Version []byte }
func DeriveChildKey ¶
func DeriveChildKey(index uint32, pk *ExtendedKey, curve elliptic.Curve) (*big.Int, *ExtendedKey, error)
DeriveChildKey Derive a child key from the given parent key. The function returns "IL" ("I left"), per BIP-32 spec. It also returns the derived child key.
func DeriveChildKeyFromHierarchy ¶
func DeriveChildKeyFromHierarchy(indicesHierarchy []uint32, pk *ExtendedKey, mod *big.Int, curve elliptic.Curve) (*big.Int, *ExtendedKey, error)
func NewExtendedKeyFromString ¶
func NewExtendedKeyFromString(key string, curve elliptic.Curve) (*ExtendedKey, error)
NewExtendedKeyFromString returns a new extended key from a base58-encoded extended key
func (*ExtendedKey) String ¶
func (k *ExtendedKey) String() string
Extended public key serialization, defined in BIP32
Click to show internal directories.
Click to hide internal directories.