Versions in this module Expand all Collapse all v1 v1.0.0 Feb 25, 2021 Changes in this version + const CFilterV2Version + const CmdAddr + const CmdBlock + const CmdCFHeaders + const CmdCFTypes + const CmdCFilter + const CmdCFilterV2 + const CmdFeeFilter + const CmdGetAddr + const CmdGetBlocks + const CmdGetCFHeaders + const CmdGetCFTypes + const CmdGetCFilter + const CmdGetCFilterV2 + const CmdGetData + const CmdGetHeaders + const CmdGetInitState + const CmdGetMiningState + const CmdHeaders + const CmdInitState + const CmdInv + const CmdMemPool + const CmdMiningState + const CmdNotFound + const CmdPing + const CmdPong + const CmdReject + const CmdSendHeaders + const CmdTx + const CmdVerAck + const CmdVersion + const CommandSize + const DefaultPkScriptVersion + const DefaultUserAgent + const FeeFilterVersion + const InitStateHeadBlockVotes + const InitStateHeadBlocks + const InitStateTSpends + const InitStateVersion + const InitialProcotolVersion + const MaxAddrPerMsg + const MaxBlockHeaderPayload + const MaxBlockHeadersPerMsg + const MaxBlockLocatorsPerMsg + const MaxBlockPayload + const MaxBlockPayloadV3 + const MaxBlockSizeVersion + const MaxBlocksPerMsg + const MaxCFHeaderPayload + const MaxCFHeadersPerMsg + const MaxCFilterDataSize + const MaxFilterTypesPerMsg + const MaxHeaderProofHashes + const MaxISBlocksAtHeadPerMsg + const MaxISTSpendsAtHeadPerMsg + const MaxISVotesAtHeadPerMsg + const MaxInitStateTypeLen + const MaxInitStateTypes + const MaxInvPerMsg + const MaxMSBlocksAtHeadPerMsg + const MaxMSVotesAtHeadPerMsg + const MaxMessagePayload + const MaxPrevOutIndex + const MaxTxInSequenceNum + const MaxUserAgentLen + const MaxVarIntPayload + const MessageHeaderSize + const NoExpiryValue + const NodeBloomVersion + const NodeCFVersion + const NullBlockHeight + const NullBlockIndex + const NullValueIn + const ProtocolVersion + const RemoveRejectVersion + const SendHeadersVersion + const SequenceLockTimeDisabled + const SequenceLockTimeGranularity + const SequenceLockTimeIsSeconds + const SequenceLockTimeMask + const TxTreeRegular + const TxTreeStake + const TxTreeUnknown + const TxVersion + const TxVersionSeqLock + const TxVersionTreasury + var ErrInvalidNetAddr = errors.New("provided net.Addr is not a net.TCPAddr") + func MaxTxPerTxTree(pver uint32) uint64 + func RandomUint64() (uint64, error) + func ReadAsciiVarString(r io.Reader, pver uint32, maxAllowed uint64) (string, error) + func ReadOutPoint(r io.Reader, pver uint32, version uint16, op *OutPoint) error + func ReadVarBytes(r io.Reader, pver uint32, maxAllowed uint32, fieldName string) ([]byte, error) + func ReadVarInt(r io.Reader, pver uint32) (uint64, error) + func ReadVarString(r io.Reader, pver uint32) (string, error) + func VarIntSerializeSize(val uint64) int + func WriteMessage(w io.Writer, msg Message, pver uint32, mcxnet CurrencyNet) error + func WriteMessageN(w io.Writer, msg Message, pver uint32, mcxnet CurrencyNet) (int, error) + func WriteOutPoint(w io.Writer, pver uint32, version uint16, op *OutPoint) error + func WriteVarBytes(w io.Writer, pver uint32, bytes []byte) error + func WriteVarInt(w io.Writer, pver uint32, val uint64) error + func WriteVarString(w io.Writer, pver uint32, str string) error + type BlockHeader struct + Bits uint32 + ExtraData [32]byte + FinalState [6]byte + FreshStake uint8 + Height uint32 + MerkleRoot chainhash.Hash + Nonce uint32 + PoolSize uint32 + PrevBlock chainhash.Hash + Revocations uint8 + SBits int64 + Size uint32 + StakeRoot chainhash.Hash + StakeVersion uint32 + Timestamp time.Time + Version int32 + VoteBits uint16 + Voters uint16 + func NewBlockHeader(version int32, prevHash *chainhash.Hash, merkleRootHash *chainhash.Hash, ...) *BlockHeader + func (h *BlockHeader) BlockHash() chainhash.Hash + func (h *BlockHeader) BtcDecode(r io.Reader, pver uint32) error + func (h *BlockHeader) BtcEncode(w io.Writer, pver uint32) error + func (h *BlockHeader) Bytes() ([]byte, error) + func (h *BlockHeader) Deserialize(r io.Reader) error + func (h *BlockHeader) FromBytes(b []byte) error + func (h *BlockHeader) Serialize(w io.Writer) error + type CurrencyNet uint32 + const MainNet + const RegNet + const RegTest + const SimNet + const TestNet3 + func (n CurrencyNet) String() string + type ErrorCode int + const ErrCmdTooLong + const ErrFilterTooLarge + const ErrHeaderContainsTxs + const ErrInitStateTypeTooLong + const ErrInvalidMsg + const ErrMalformedCmd + const ErrMalformedStrictString + const ErrMismatchedWitnessCount + const ErrMsgInvalidForPVer + const ErrNonCanonicalVarInt + const ErrPayloadChecksum + const ErrPayloadTooLarge + const ErrReadInPrefixFromWitnessOnlyTx + const ErrTooManyAddrs + const ErrTooManyBlocks + const ErrTooManyFilterHeaders + const ErrTooManyFilterTypes + const ErrTooManyHeaders + const ErrTooManyInitStateTypes + const ErrTooManyLocators + const ErrTooManyProofs + const ErrTooManyTSpends + const ErrTooManyTxs + const ErrTooManyVectors + const ErrTooManyVotes + const ErrUnknownCmd + const ErrUnknownTxType + const ErrUserAgentTooLong + const ErrVarBytesTooLong + const ErrVarStringTooLong + const ErrWrongNetwork + func (e ErrorCode) Error() string + func (e ErrorCode) Is(target error) bool + func (e ErrorCode) String() string + type FilterType uint8 + const GCSFilterExtended + const GCSFilterRegular + type InvType uint32 + const InvTypeBlock + const InvTypeError + const InvTypeFilteredBlock + const InvTypeTx + func (invtype InvType) String() string + type InvVect struct + Hash chainhash.Hash + Type InvType + func NewInvVect(typ InvType, hash *chainhash.Hash) *InvVect + type Message interface + BtcDecode func(io.Reader, uint32) error + BtcEncode func(io.Writer, uint32) error + Command func() string + MaxPayloadLength func(uint32) uint32 + func ReadMessage(r io.Reader, pver uint32, mcxnet CurrencyNet) (Message, []byte, error) + func ReadMessageN(r io.Reader, pver uint32, mcxnet CurrencyNet) (int, Message, []byte, error) + type MessageError struct + Description string + ErrorCode ErrorCode + Func string + func (m *MessageError) Is(target error) bool + func (m *MessageError) Unwrap() error + func (m MessageError) Error() string + type MsgAddr struct + AddrList []*NetAddress + func NewMsgAddr() *MsgAddr + func (msg *MsgAddr) AddAddress(na *NetAddress) error + func (msg *MsgAddr) AddAddresses(netAddrs ...*NetAddress) error + func (msg *MsgAddr) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgAddr) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgAddr) ClearAddresses() + func (msg *MsgAddr) Command() string + func (msg *MsgAddr) MaxPayloadLength(pver uint32) uint32 + type MsgBlock struct + Header BlockHeader + STransactions []*MsgTx + Transactions []*MsgTx + func NewMsgBlock(blockHeader *BlockHeader) *MsgBlock + func (msg *MsgBlock) AddSTransaction(tx *MsgTx) error + func (msg *MsgBlock) AddTransaction(tx *MsgTx) error + func (msg *MsgBlock) BlockHash() chainhash.Hash + func (msg *MsgBlock) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgBlock) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgBlock) Bytes() ([]byte, error) + func (msg *MsgBlock) ClearSTransactions() + func (msg *MsgBlock) ClearTransactions() + func (msg *MsgBlock) Command() string + func (msg *MsgBlock) Deserialize(r io.Reader) error + func (msg *MsgBlock) DeserializeTxLoc(r *bytes.Buffer) ([]TxLoc, []TxLoc, error) + func (msg *MsgBlock) FromBytes(b []byte) error + func (msg *MsgBlock) MaxPayloadLength(pver uint32) uint32 + func (msg *MsgBlock) STxHashes() []chainhash.Hash + func (msg *MsgBlock) Serialize(w io.Writer) error + func (msg *MsgBlock) SerializeSize() int + func (msg *MsgBlock) TxHashes() []chainhash.Hash + type MsgCFHeaders struct + FilterType FilterType + HeaderHashes []*chainhash.Hash + StopHash chainhash.Hash + func NewMsgCFHeaders() *MsgCFHeaders + func (msg *MsgCFHeaders) AddCFHeader(headerHash *chainhash.Hash) error + func (msg *MsgCFHeaders) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgCFHeaders) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgCFHeaders) Command() string + func (msg *MsgCFHeaders) Deserialize(r io.Reader) error + func (msg *MsgCFHeaders) MaxPayloadLength(pver uint32) uint32 + type MsgCFTypes struct + SupportedFilters []FilterType + func NewMsgCFTypes(filterTypes []FilterType) *MsgCFTypes + func (msg *MsgCFTypes) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgCFTypes) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgCFTypes) Command() string + func (msg *MsgCFTypes) Deserialize(r io.Reader) error + func (msg *MsgCFTypes) MaxPayloadLength(pver uint32) uint32 + type MsgCFilter struct + BlockHash chainhash.Hash + Data []byte + FilterType FilterType + func NewMsgCFilter(blockHash *chainhash.Hash, filterType FilterType, data []byte) *MsgCFilter + func (msg *MsgCFilter) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgCFilter) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgCFilter) Command() string + func (msg *MsgCFilter) Deserialize(r io.Reader) error + func (msg *MsgCFilter) MaxPayloadLength(pver uint32) uint32 + type MsgCFilterV2 struct + BlockHash chainhash.Hash + Data []byte + ProofHashes []chainhash.Hash + ProofIndex uint32 + func NewMsgCFilterV2(blockHash *chainhash.Hash, filterData []byte, proofIndex uint32, ...) *MsgCFilterV2 + func (msg *MsgCFilterV2) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgCFilterV2) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgCFilterV2) Command() string + func (msg *MsgCFilterV2) MaxPayloadLength(pver uint32) uint32 + type MsgFeeFilter struct + MinFee int64 + func NewMsgFeeFilter(minfee int64) *MsgFeeFilter + func (msg *MsgFeeFilter) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgFeeFilter) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgFeeFilter) Command() string + func (msg *MsgFeeFilter) MaxPayloadLength(pver uint32) uint32 + type MsgGetAddr struct + func NewMsgGetAddr() *MsgGetAddr + func (msg *MsgGetAddr) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetAddr) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetAddr) Command() string + func (msg *MsgGetAddr) MaxPayloadLength(pver uint32) uint32 + type MsgGetBlocks struct + BlockLocatorHashes []*chainhash.Hash + HashStop chainhash.Hash + ProtocolVersion uint32 + func NewMsgGetBlocks(hashStop *chainhash.Hash) *MsgGetBlocks + func (msg *MsgGetBlocks) AddBlockLocatorHash(hash *chainhash.Hash) error + func (msg *MsgGetBlocks) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetBlocks) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetBlocks) Command() string + func (msg *MsgGetBlocks) MaxPayloadLength(pver uint32) uint32 + type MsgGetCFHeaders struct + BlockLocatorHashes []*chainhash.Hash + FilterType FilterType + HashStop chainhash.Hash + func NewMsgGetCFHeaders() *MsgGetCFHeaders + func (msg *MsgGetCFHeaders) AddBlockLocatorHash(hash *chainhash.Hash) error + func (msg *MsgGetCFHeaders) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetCFHeaders) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetCFHeaders) Command() string + func (msg *MsgGetCFHeaders) MaxPayloadLength(pver uint32) uint32 + type MsgGetCFTypes struct + func NewMsgGetCFTypes() *MsgGetCFTypes + func (msg *MsgGetCFTypes) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetCFTypes) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetCFTypes) Command() string + func (msg *MsgGetCFTypes) MaxPayloadLength(pver uint32) uint32 + type MsgGetCFilter struct + BlockHash chainhash.Hash + FilterType FilterType + func NewMsgGetCFilter(blockHash *chainhash.Hash, filterType FilterType) *MsgGetCFilter + func (msg *MsgGetCFilter) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetCFilter) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetCFilter) Command() string + func (msg *MsgGetCFilter) MaxPayloadLength(pver uint32) uint32 + type MsgGetCFilterV2 struct + BlockHash chainhash.Hash + func NewMsgGetCFilterV2(blockHash *chainhash.Hash) *MsgGetCFilterV2 + func (msg *MsgGetCFilterV2) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetCFilterV2) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetCFilterV2) Command() string + func (msg *MsgGetCFilterV2) MaxPayloadLength(pver uint32) uint32 + type MsgGetData struct + InvList []*InvVect + func NewMsgGetData() *MsgGetData + func NewMsgGetDataSizeHint(sizeHint uint) *MsgGetData + func (msg *MsgGetData) AddInvVect(iv *InvVect) error + func (msg *MsgGetData) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetData) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetData) Command() string + func (msg *MsgGetData) MaxPayloadLength(pver uint32) uint32 + type MsgGetHeaders struct + BlockLocatorHashes []*chainhash.Hash + HashStop chainhash.Hash + ProtocolVersion uint32 + func NewMsgGetHeaders() *MsgGetHeaders + func (msg *MsgGetHeaders) AddBlockLocatorHash(hash *chainhash.Hash) error + func (msg *MsgGetHeaders) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetHeaders) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetHeaders) Command() string + func (msg *MsgGetHeaders) MaxPayloadLength(pver uint32) uint32 + type MsgGetInitState struct + Types []string + func NewMsgGetInitState() *MsgGetInitState + func (msg *MsgGetInitState) AddType(typ string) error + func (msg *MsgGetInitState) AddTypes(types ...string) error + func (msg *MsgGetInitState) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetInitState) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetInitState) Command() string + func (msg *MsgGetInitState) MaxPayloadLength(pver uint32) uint32 + type MsgGetMiningState struct + func NewMsgGetMiningState() *MsgGetMiningState + func (msg *MsgGetMiningState) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgGetMiningState) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgGetMiningState) Command() string + func (msg *MsgGetMiningState) MaxPayloadLength(pver uint32) uint32 + type MsgHeaders struct + Headers []*BlockHeader + func NewMsgHeaders() *MsgHeaders + func (msg *MsgHeaders) AddBlockHeader(bh *BlockHeader) error + func (msg *MsgHeaders) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgHeaders) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgHeaders) Command() string + func (msg *MsgHeaders) MaxPayloadLength(pver uint32) uint32 + type MsgInitState struct + BlockHashes []chainhash.Hash + TSpendHashes []chainhash.Hash + VoteHashes []chainhash.Hash + func NewMsgInitState() *MsgInitState + func NewMsgInitStateFilled(blockHashes []chainhash.Hash, voteHashes []chainhash.Hash, ...) (*MsgInitState, error) + func (msg *MsgInitState) AddBlockHash(hash *chainhash.Hash) error + func (msg *MsgInitState) AddTSpendHash(hash *chainhash.Hash) error + func (msg *MsgInitState) AddVoteHash(hash *chainhash.Hash) error + func (msg *MsgInitState) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgInitState) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgInitState) Command() string + func (msg *MsgInitState) MaxPayloadLength(pver uint32) uint32 + type MsgInv struct + InvList []*InvVect + func NewMsgInv() *MsgInv + func NewMsgInvSizeHint(sizeHint uint) *MsgInv + func (msg *MsgInv) AddInvVect(iv *InvVect) error + func (msg *MsgInv) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgInv) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgInv) Command() string + func (msg *MsgInv) MaxPayloadLength(pver uint32) uint32 + type MsgMemPool struct + func NewMsgMemPool() *MsgMemPool + func (msg *MsgMemPool) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgMemPool) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgMemPool) Command() string + func (msg *MsgMemPool) MaxPayloadLength(pver uint32) uint32 + type MsgMiningState struct + BlockHashes []*chainhash.Hash + Height uint32 + Version uint32 + VoteHashes []*chainhash.Hash + func NewMsgMiningState() *MsgMiningState + func (msg *MsgMiningState) AddBlockHash(hash *chainhash.Hash) error + func (msg *MsgMiningState) AddVoteHash(hash *chainhash.Hash) error + func (msg *MsgMiningState) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgMiningState) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgMiningState) Command() string + func (msg *MsgMiningState) MaxPayloadLength(pver uint32) uint32 + type MsgNotFound struct + InvList []*InvVect + func NewMsgNotFound() *MsgNotFound + func (msg *MsgNotFound) AddInvVect(iv *InvVect) error + func (msg *MsgNotFound) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgNotFound) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgNotFound) Command() string + func (msg *MsgNotFound) MaxPayloadLength(pver uint32) uint32 + type MsgPing struct + Nonce uint64 + func NewMsgPing(nonce uint64) *MsgPing + func (msg *MsgPing) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgPing) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgPing) Command() string + func (msg *MsgPing) MaxPayloadLength(pver uint32) uint32 + type MsgPong struct + Nonce uint64 + func NewMsgPong(nonce uint64) *MsgPong + func (msg *MsgPong) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgPong) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgPong) Command() string + func (msg *MsgPong) MaxPayloadLength(pver uint32) uint32 + type MsgReject struct + Cmd string + Code RejectCode + Hash chainhash.Hash + Reason string + func NewMsgReject(command string, code RejectCode, reason string) *MsgReject + func (msg *MsgReject) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgReject) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgReject) Command() string + func (msg *MsgReject) MaxPayloadLength(pver uint32) uint32 + type MsgSendHeaders struct + func NewMsgSendHeaders() *MsgSendHeaders + func (msg *MsgSendHeaders) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgSendHeaders) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgSendHeaders) Command() string + func (msg *MsgSendHeaders) MaxPayloadLength(pver uint32) uint32 + type MsgTx struct + CachedHash *chainhash.Hash + Expiry uint32 + LockTime uint32 + SerType TxSerializeType + TxIn []*TxIn + TxOut []*TxOut + Version uint16 + func NewMsgTx() *MsgTx + func (msg *MsgTx) AddTxIn(ti *TxIn) + func (msg *MsgTx) AddTxOut(to *TxOut) + func (msg *MsgTx) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgTx) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgTx) Bytes() ([]byte, error) + func (msg *MsgTx) BytesPrefix() ([]byte, error) + func (msg *MsgTx) BytesWitness() ([]byte, error) + func (msg *MsgTx) CachedTxHash() *chainhash.Hash + func (msg *MsgTx) Command() string + func (msg *MsgTx) Copy() *MsgTx + func (msg *MsgTx) Deserialize(r io.Reader) error + func (msg *MsgTx) FromBytes(b []byte) error + func (msg *MsgTx) MaxPayloadLength(pver uint32) uint32 + func (msg *MsgTx) PkScriptLocs() []int + func (msg *MsgTx) RecacheTxHash() *chainhash.Hash + func (msg *MsgTx) Serialize(w io.Writer) error + func (msg *MsgTx) SerializeSize() int + func (msg *MsgTx) TxHash() chainhash.Hash + func (msg *MsgTx) TxHashFull() chainhash.Hash + func (msg *MsgTx) TxHashWitness() chainhash.Hash + type MsgVerAck struct + func NewMsgVerAck() *MsgVerAck + func (msg *MsgVerAck) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgVerAck) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgVerAck) Command() string + func (msg *MsgVerAck) MaxPayloadLength(pver uint32) uint32 + type MsgVersion struct + AddrMe NetAddress + AddrYou NetAddress + DisableRelayTx bool + LastBlock int32 + Nonce uint64 + ProtocolVersion int32 + Services ServiceFlag + Timestamp time.Time + UserAgent string + func NewMsgVersion(me *NetAddress, you *NetAddress, nonce uint64, lastBlock int32) *MsgVersion + func NewMsgVersionFromConn(conn net.Conn, nonce uint64, lastBlock int32) (*MsgVersion, error) + func (msg *MsgVersion) AddService(service ServiceFlag) + func (msg *MsgVersion) AddUserAgent(name string, version string, comments ...string) error + func (msg *MsgVersion) BtcDecode(r io.Reader, pver uint32) error + func (msg *MsgVersion) BtcEncode(w io.Writer, pver uint32) error + func (msg *MsgVersion) Command() string + func (msg *MsgVersion) HasService(service ServiceFlag) bool + func (msg *MsgVersion) MaxPayloadLength(pver uint32) uint32 + type NetAddress struct + IP net.IP + Port uint16 + Services ServiceFlag + Timestamp time.Time + func NewNetAddress(addr net.Addr, services ServiceFlag) (*NetAddress, error) + func NewNetAddressIPPort(ip net.IP, port uint16, services ServiceFlag) *NetAddress + func NewNetAddressTimestamp(timestamp time.Time, services ServiceFlag, ip net.IP, port uint16) *NetAddress + func (na *NetAddress) AddService(service ServiceFlag) + func (na *NetAddress) HasService(service ServiceFlag) bool + type OutPoint struct + Hash chainhash.Hash + Index uint32 + Tree int8 + func NewOutPoint(hash *chainhash.Hash, index uint32, tree int8) *OutPoint + func (o OutPoint) String() string + type RejectCode uint8 + const RejectCheckpoint + const RejectDuplicate + const RejectDust + const RejectInsufficientFee + const RejectInvalid + const RejectMalformed + const RejectNonstandard + const RejectObsolete + func (code RejectCode) String() string + type ServiceFlag uint64 + const SFNodeBloom + const SFNodeCF + const SFNodeNetwork + func (f ServiceFlag) String() string + type TxIn struct + BlockHeight uint32 + BlockIndex uint32 + PreviousOutPoint OutPoint + Sequence uint32 + SignatureScript []byte + ValueIn int64 + func NewTxIn(prevOut *OutPoint, valueIn int64, signatureScript []byte) *TxIn + func (t *TxIn) SerializeSizePrefix() int + func (t *TxIn) SerializeSizeWitness() int + type TxLoc struct + TxLen int + TxStart int + type TxOut struct + PkScript []byte + Value int64 + Version uint16 + func NewTxOut(value int64, pkScript []byte) *TxOut + func (t *TxOut) SerializeSize() int + type TxSerializeType uint16 + const TxSerializeFull + const TxSerializeNoWitness + const TxSerializeOnlyWitness