Documentation ¶
Index ¶
- Variables
- func NewXKeys(r io.Reader) (xprv XPrv, xpub XPub, err error)
- func XPubKeys(xpubs []XPub) []ed25519.PublicKey
- type XPrv
- func (xprv XPrv) Bytes() []byte
- func (xprv XPrv) Child(sel []byte, hardened bool) (res XPrv)
- func (xprv XPrv) Derive(path [][]byte) XPrv
- func (xprv XPrv) MarshalText() ([]byte, error)
- func (xprv XPrv) Sign(msg []byte) []byte
- func (xprv XPrv) String() string
- func (xprv *XPrv) UnmarshalText(inp []byte) error
- func (xprv XPrv) XPub() XPub
- type XPub
- func (xpub XPub) Bytes() []byte
- func (xpub XPub) Child(sel []byte) (res XPub)
- func (xpub XPub) Derive(path [][]byte) XPub
- func (xpub XPub) MarshalText() ([]byte, error)
- func (xpub XPub) PublicKey() ed25519.PublicKey
- func (xpub XPub) String() string
- func (xpub *XPub) UnmarshalText(inp []byte) error
- func (xpub XPub) Verify(msg []byte, sig []byte) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadKeyLen = errors.New("bad key length") ErrBadKeyStr = errors.New("bad key string") )
Functions ¶
Types ¶
type XPrv ¶
type XPrv [64]byte
TODO(bobg): consider making these types opaque. See https://github.com/chain/chain/pull/1875#discussion_r80577736
func NewXPrv ¶
NewXPrv takes a source of random bytes and produces a new XPrv. If r is nil, crypto/rand.Reader is used.
func (XPrv) MarshalText ¶
func (*XPrv) UnmarshalText ¶
type XPub ¶
type XPub [64]byte
func DeriveXPubs ¶
func (XPub) MarshalText ¶
func (*XPub) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.