Versions in this module Expand all Collapse all v0 v0.8.0 Jan 4, 2017 Changes in this version + const AtomsPerCent + const AtomsPerCoin + const BlockHeightUnknown + const BlockValid + const Flag01 + const Flag02 + const Flag03 + const Flag04 + const Flag05 + const Flag06 + const Flag07 + const Flag08 + const Flag09 + const Flag10 + const Flag11 + const Flag12 + const Flag13 + const Flag14 + const Flag15 + const FlagNone + const MaxAmount + const TxIndexUnknown + var ErrAddressCollision = errors.New("address collision") + var ErrChecksumMismatch = errors.New("checksum mismatch") + var ErrMalformedPrivateKey = errors.New("malformed private key") + var ErrMissingDefaultNet = errors.New("default net not defined") + var ErrUnknownAddressType = errors.New("unknown address type") + func AppDataDir(appName string, roaming bool) string + func Hash160(buf []byte) []byte + func IsFlagSet16(flags uint16, flag uint16) bool + func NewTLSCertPair(curve elliptic.Curve, organization string, validUntil time.Time, ...) (cert, key []byte, err error) + func SetFlag16(flags *uint16, flag uint16, b bool) + type Address interface + DSA func(*chaincfg.Params) int + EncodeAddress func() string + Hash160 func() *[ripemd160.Size]byte + IsForNet func(*chaincfg.Params) bool + Net func() *chaincfg.Params + ScriptAddress func() []byte + String func() string + func DecodeAddress(addr string, defaultNet *chaincfg.Params) (Address, error) + func DecodeNetworkAddress(addr string) (Address, error) + type AddressEdwardsPubKey struct + func NewAddressEdwardsPubKey(serializedPubKey []byte, net *chaincfg.Params) (*AddressEdwardsPubKey, error) + func (a *AddressEdwardsPubKey) AddressPubKeyHash() *AddressPubKeyHash + func (a *AddressEdwardsPubKey) DSA(net *chaincfg.Params) int + func (a *AddressEdwardsPubKey) EncodeAddress() string + func (a *AddressEdwardsPubKey) Hash160() *[ripemd160.Size]byte + func (a *AddressEdwardsPubKey) IsForNet(net *chaincfg.Params) bool + func (a *AddressEdwardsPubKey) Net() *chaincfg.Params + func (a *AddressEdwardsPubKey) PubKey() chainec.PublicKey + func (a *AddressEdwardsPubKey) ScriptAddress() []byte + func (a *AddressEdwardsPubKey) String() string + type AddressPubKeyHash struct + func NewAddressPubKeyHash(pkHash []byte, net *chaincfg.Params, algo int) (*AddressPubKeyHash, error) + func (a *AddressPubKeyHash) DSA(net *chaincfg.Params) int + func (a *AddressPubKeyHash) EncodeAddress() string + func (a *AddressPubKeyHash) Hash160() *[ripemd160.Size]byte + func (a *AddressPubKeyHash) IsForNet(net *chaincfg.Params) bool + func (a *AddressPubKeyHash) Net() *chaincfg.Params + func (a *AddressPubKeyHash) ScriptAddress() []byte + func (a *AddressPubKeyHash) String() string + type AddressScriptHash struct + func NewAddressScriptHash(serializedScript []byte, net *chaincfg.Params) (*AddressScriptHash, error) + func NewAddressScriptHashFromHash(scriptHash []byte, net *chaincfg.Params) (*AddressScriptHash, error) + func (a *AddressScriptHash) DSA(net *chaincfg.Params) int + func (a *AddressScriptHash) EncodeAddress() string + func (a *AddressScriptHash) Hash160() *[ripemd160.Size]byte + func (a *AddressScriptHash) IsForNet(net *chaincfg.Params) bool + func (a *AddressScriptHash) Net() *chaincfg.Params + func (a *AddressScriptHash) ScriptAddress() []byte + func (a *AddressScriptHash) String() string + type AddressSecSchnorrPubKey struct + func NewAddressSecSchnorrPubKey(serializedPubKey []byte, net *chaincfg.Params) (*AddressSecSchnorrPubKey, error) + func (a *AddressSecSchnorrPubKey) AddressPubKeyHash() *AddressPubKeyHash + func (a *AddressSecSchnorrPubKey) DSA(net *chaincfg.Params) int + func (a *AddressSecSchnorrPubKey) EncodeAddress() string + func (a *AddressSecSchnorrPubKey) Hash160() *[ripemd160.Size]byte + func (a *AddressSecSchnorrPubKey) IsForNet(net *chaincfg.Params) bool + func (a *AddressSecSchnorrPubKey) Net() *chaincfg.Params + func (a *AddressSecSchnorrPubKey) ScriptAddress() []byte + func (a *AddressSecSchnorrPubKey) String() string + type AddressSecpPubKey struct + func NewAddressSecpPubKey(serializedPubKey []byte, net *chaincfg.Params) (*AddressSecpPubKey, error) + func (a *AddressSecpPubKey) AddressPubKeyHash() *AddressPubKeyHash + func (a *AddressSecpPubKey) DSA(net *chaincfg.Params) int + func (a *AddressSecpPubKey) EncodeAddress() string + func (a *AddressSecpPubKey) Format() PubKeyFormat + func (a *AddressSecpPubKey) Hash160() *[ripemd160.Size]byte + func (a *AddressSecpPubKey) IsForNet(net *chaincfg.Params) bool + func (a *AddressSecpPubKey) Net() *chaincfg.Params + func (a *AddressSecpPubKey) PubKey() chainec.PublicKey + func (a *AddressSecpPubKey) ScriptAddress() []byte + func (a *AddressSecpPubKey) SetFormat(pkFormat PubKeyFormat) + func (a *AddressSecpPubKey) String() string + type Amount int64 + func NewAmount(f float64) (Amount, error) + func (a Amount) Format(u AmountUnit) string + func (a Amount) MulF64(f float64) Amount + func (a Amount) String() string + func (a Amount) ToCoin() float64 + func (a Amount) ToUnit(u AmountUnit) float64 + type AmountSorter []Amount + func (s AmountSorter) Len() int + func (s AmountSorter) Less(i, j int) bool + func (s AmountSorter) Swap(i, j int) + type AmountUnit int + const AmountAtom + const AmountCoin + const AmountKiloCoin + const AmountMegaCoin + const AmountMicroCoin + const AmountMilliCoin + func (u AmountUnit) String() string + type Block struct + func NewBlock(msgBlock *wire.MsgBlock) *Block + func NewBlockDeepCopy(msgBlock *wire.MsgBlock) *Block + func NewBlockDeepCopyCoinbase(msgBlock *wire.MsgBlock) *Block + func NewBlockFromBlockAndBytes(msgBlock *wire.MsgBlock, serializedBlock []byte) *Block + func NewBlockFromBytes(serializedBlock []byte) (*Block, error) + func NewBlockFromReader(r io.Reader) (*Block, error) + func (b *Block) BlockHeaderBytes() ([]byte, error) + func (b *Block) Bytes() ([]byte, error) + func (b *Block) Hash() *chainhash.Hash + func (b *Block) Height() int64 + func (b *Block) MsgBlock() *wire.MsgBlock + func (b *Block) STransactions() []*Tx + func (b *Block) STx(txNum int) (*Tx, error) + func (b *Block) STxHash(txNum int) (*chainhash.Hash, error) + func (b *Block) SetHeight(height int64) + func (b *Block) Transactions() []*Tx + func (b *Block) Tx(txNum int) (*Tx, error) + func (b *Block) TxHash(txNum int) (*chainhash.Hash, error) + func (b *Block) TxLoc() ([]wire.TxLoc, []wire.TxLoc, error) + type BoolArray16 [16]bool + func GenerateBoolArray16(flags uint16) BoolArray16 + type Flags16 uint16 + type OutOfRangeError string + func (e OutOfRangeError) Error() string + type PubKeyFormat int + const PKFCompressed + const PKFHybrid + const PKFUncompressed + type Tx struct + func NewTx(msgTx *wire.MsgTx) *Tx + func NewTxDeep(msgTx *wire.MsgTx) *Tx + func NewTxDeepTxIns(msgTx *wire.MsgTx) *Tx + func NewTxFromBytes(serializedTx []byte) (*Tx, error) + func NewTxFromBytesLegacy(serializedTx []byte) (*Tx, error) + func NewTxFromReader(r io.Reader) (*Tx, error) + func NewTxFromReaderLegacy(r io.Reader) (*Tx, error) + func (t *Tx) Hash() *chainhash.Hash + func (t *Tx) Index() int + func (t *Tx) MsgTx() *wire.MsgTx + func (t *Tx) SetIndex(index int) + func (t *Tx) SetTree(tree int8) + func (t *Tx) Tree() int8 + type WIF struct + PrivKey chainec.PrivateKey + func DecodeWIF(wif string) (*WIF, error) + func NewWIF(privKey chainec.PrivateKey, net *chaincfg.Params, ecType int) (*WIF, error) + func (w *WIF) DSA() int + func (w *WIF) IsForNet(net *chaincfg.Params) bool + func (w *WIF) SerializePubKey() []byte + func (w *WIF) String() string