Documentation ¶
Overview ¶
Package bip32 A fully compliant implementation of the BIP0032 spec for Hierarchical Deterministic Bitcoin addresses
Index ¶
Constants ¶
View Source
const ( // FirstHardenedChild FirstHardenedChild FirstHardenedChild = uint32(0x80000000) // PublicKeyCompressedLength 公钥压缩长度 PublicKeyCompressedLength = 33 )
Variables ¶
View Source
var (
// PrivateWalletVersion 私钥钱包版本
PrivateWalletVersion, _ = hex.DecodeString("0488ADE4")
// PublicWalletVersion 公钥钱包版本
PublicWalletVersion, _ = hex.DecodeString("0488B21E")
)
Functions ¶
Types ¶
type Key ¶
type Key struct { Version []byte // 4 bytes Depth byte // 1 bytes ChildNumber []byte // 4 bytes FingerPrint []byte // 4 bytes ChainCode []byte // 32 bytes Key []byte // 33 bytes IsPrivate bool // unserialized }
Key Represents a bip32 extended key containing key data, chain code, parent information, and other meta data
func NewMasterKey ¶
NewMasterKey Creates a new master extended key from a seed
func (*Key) NewChildKey ¶
NewChildKey Derives a child key from a given parent as outlined by bip32
func (*Key) PublicKey ¶
PublicKey Create public version of key or return a copy; 'Neuter' function from the bip32 spec
Click to show internal directories.
Click to hide internal directories.