package
1.2.0
Repository: https://github.com/qitmeer/qng.git
Documentation: pkg.go.dev

# Packages

Copyright (c) 2017-2020 The qitmeer developers license that can be found in the LICENSE file.

# Functions

Check if a valid coinId, current only check if the coinId is known.
CheckGenesisLock returns an error if a transaction is not a genesis_lock transaction.
DetermineTxType determines the type of transaction.
GetBlockWeight computes the value of the weight metric for a given block.
This function get the simple hash use each parents string, so it can't use to check for block body .At present we use the merkles tree.
cross chain.
No description provided by the author
No description provided by the author
IsCoinBaseTx determines whether or not a transaction is a coinbase.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IsGenesisLockTx returns whether or not a transaction is a genesis_lock transaction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxNetAddressPayload returns the max payload size for the NetAddress based on the protocol version.
MaxTxPerTxTree returns the maximum number of transactions that could possibly fit into a block per ekach merkle root for the given protocol version.
NewAmount creates an Amount from a floating point value representing some value in the currency.
NewBlock returns a new instance of the serialized block given an underlying Block.
NewBlockDeepCopyCoinbase returns a new instance of a block given an underlying wire.MsgBlock, but makes a deep copy of the coinbase transaction since it's sometimes mutable.
NewBlockFromBlockAndBytes returns a new instance of a block given an underlying Block and the serialized bytes for it.
NewBlockFromBytes returns a new instance of a block given the serialized bytes.
NewBlockFromReader returns a new instance of a block given a Reader to deserialize the block.
No description provided by the author
No description provided by the author
NewMsgFilterLoad returns a new bitcoin filterload message that conforms to the Message interface.
NewNetAddress returns a new NetAddress using the provided TCP address and supported services with defaults for the remaining fields.
NewNetAddressFailBack add more attempts to extract the IP address and port from the passed net.Addr interface and create a NetAddress structure using that information.
NewNetAddressIPPort returns a new NetAddress using the provided IP, port, and supported services with defaults for the remaining fields.
NewNetAddressTimestamp returns a new NetAddress using the provided timestamp, IP, port, and supported services.
NewOutPoint returns a new transaction outpoint point with the provided hash and index.
NewMsgTx returns a new tx message that conforms to the Message interface.
NewTx returns a new instance of a transaction given an underlying wire.MsgTx.
NewTxDeep returns a new instance of a transaction given an underlying wire.MsgTx.
NewTxDeepTxIns is used to deep copy a transaction, maintaining the old pointers to the TxOuts while replacing the old pointers to the TxIns with deep copies.
NewTxFromBytes returns a new instance of a transaction given the serialized bytes.
NewTxFromReader returns a new instance of a transaction given a Reader to deserialize the transaction.
NewTxIn returns a new transaction input with the provided previous outpoint point and signature script with a default sequence of MaxTxInSequenceNum.
NewTxOutput returns a new transaction output with the provided transaction value and public key script.
No description provided by the author
No description provided by the author
readNetAddress reads an encoded NetAddress from r depending on the protocol version and whether or not the timestamp is included per ts.
ReadOutPoint reads the next sequence of bytes from r as an OutPoint.
writeNetAddress serializes a NetAddress to w depending on the protocol version and whether or not the timestamp is included per ts.
WriteOutPoint encodes for an OutPoint to w.

# Constants

These constants define various units used when describing a coin monetary amount.
These constants define various units used when describing a coin monetary amount.
These constants define various units used when describing a coin monetary amount.
These constants define various units used when describing a coin monetary amount.
These constants define various units used when describing a coin monetary amount.
These constants define various units used when describing a coin monetary amount.
AtomsPerCent is the number of atomic units in one coin cent.
AtomsPerCoin is the number of atomic units in one coin.
BaseEncoding encodes all messages in the default format specified for the Bitcoin wire protocol.
BloomUpdateAll indicates if the filter matches any data element in a public key script, the outpoint is serialized and inserted into the filter.
BloomUpdateNone indicates the filter is not adjusted when a match is found.
BloomUpdateP2PubkeyOnly indicates if the filter matches a data element in a public key script and the script is of the standard pay-to-pubkey or multisig, the outpoint is serialized and inserted into the filter.
No description provided by the author
No description provided by the author
Strict equality.
Greater than or equal to.
No description provided by the author
MaxAmount is the maximum transaction amount allowed in atoms.
MaxBlockHeaderPayload is the maximum number of bytes a block header can be.
1024*1024 (1MB).
MaxBlockSigOpsCost is the maximum number of signature operations allowed for a block.
MaxBlocksPerMsg is the maximum number of blocks allowed per message.
MaxBlockWeight defines the maximum block weight.
MaxFilterLoadFilterSize is the maximum size in bytes a filter may be.
MaxFilterLoadHashFuncs is the maximum number of hash functions to load into the Bloom filter.
32MB.
Limited parents quantity.
MaxPrevOutIndex is the maximum index the index field of a previous outpoint can be.
MaxTxInSequenceNum is the maximum sequence number the sequence field of a transaction input can be.
MaxTxPerBlock is the maximum number of transactions that could possibly fit into a block.
No description provided by the author
No description provided by the author
crosschain export tx fork for genesis locked utxo.
NoExpiryValue is the value of expiry that indicates the transaction has no expiry.
NullBlockHeight is the null value for an input witness.
NullTxIndex is the null transaction index in a block for an input witness.
NullValueIn is a null value for an input witness.
No description provided by the author
No description provided by the author
SequenceLockTimeDisabled is a flag that if set on a transaction input's sequence number, the sequence number will not be interpreted as a relative locktime.
TODO, revisit lock time define SequenceLockTimeGranularity is the defined time based granularity for seconds-based relative time locks.
SequenceLockTimeIsSeconds is a flag that if set on a transaction input's sequence number, the relative locktime has units of 512 seconds.
SequenceLockTimeMask is a mask that extracts the relative locktime when masked against the transaction input sequence number.
SupperPrevOutIndex is the supper index field of a previous outpoint can be.
TxIndexUnknown is the value returned for a transaction index that is unknown.
TxSerializeFull indicates a transaction be serialized with the prefix and all witness data.
TxSerializeNoWitness indicates a transaction be serialized with only the prefix.
No description provided by the author
Cross chain by export tx.
Cross chain by import tx.
Cross chain by vm tx.
the tx try to lock the genesis output to the stake pool.
TokenInSequence is the maximum tx type the sequence field of a transaction input can be.
No description provided by the author
the special tx which vote for stake_purchase and reward stake holder from the stake_reserve.
the opposite tx of stake_purchase.
the tx of stake holder who lock value into stake pool.
token-base is reserved, not used at current stage.
disable the token.
token owner mint token amount by locking MEER.
new coin-id, owners, up-limit etc.
token-regulation is reserved, not for using.
update owners, up-limits etc.
revoke the coin-id.
token owner unmint token amount by releasing MEER.
enable the token.
TxVersion is the current latest supported transaction version.
the tx reserve consensus-based value to a special stake_reserve address.

# Variables

No description provided by the author
No description provided by the author
ErrInvalidNetAddr describes an error that indicates the caller didn't specify a TCP address as required.
No description provided by the author
Standard transaction type.
No description provided by the author

# Structs

Amount represents the base coin monetary unit (colloquially referred to as an `Atom').
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlockTemplate houses a block that has yet to be solved along with additional details about the fees and the number of signature operations for each transaction in the block.
No description provided by the author
Contract block header.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MessageError describes an issue with a message.
MsgFilterAdd implements the Message interface and represents a qitmeer filteradd message.
MsgFilterClear implements the Message interface and represents a qitmeer filterclear message which is used to reset a Bloom filter.
MsgFilterLoad implements the Message interface and represents a bitcoin filterload message which is used to reset a Bloom filter.
MsgMerkleBlock implements the Message interface and represents a bitcoin merkleblock message which is used to reset a Bloom filter.
NetAddress defines information about a peer on the network including the time it was last seen, the services it supports, its IP address, and port.
SerializedBlock provides easier and more efficient manipulation of raw blocks.
No description provided by the author
Tx defines a transaction that provides easier and more efficient manipulation of raw transactions.
TxDesc is a descriptor about a transaction in a transaction source along with additional metadata.
No description provided by the author
TxLoc holds locator data for the offset and length of where a transaction is located within a MsgBlock data buffer.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

An identifier for an account of the system, which stand for a address.
No description provided by the author
AmountGroup represents a group of multiple Amount,.
AmountMap represents a map of multiple Amount,.
AmountSorter implements sort.Interface to allow a slice of Amounts to be sorted.
AmountUnit describes a method of converting an Amount to something other than the base unit of a coin.
An identifier for an authority in the consensus algorithm.
BloomUpdateType specifies how the filter is updated when a match is found.
No description provided by the author
from 0 ~ 65535 0 ~ 255 : Qitmeer reserved.
block execution event, ex.
No description provided by the author
MessageEncoding represents the wire message encoding format to be used.
No description provided by the author
TxSerializeType represents the serialized type of a transaction.
TxType indicates the type of transactions such as regular or other tx type (coinbase, stake or token).
TxWitness defines the witness for a TxIn.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author