Documentation
¶
Index ¶
- Constants
- func GetCoinBaseScript(wallet string) ([]byte, error)
- func GetCoinBaseScriptByAddress(address string) ([]byte, error)
- func GetCoinBaseScriptByPubKey(pubKeyHex string) ([]byte, error)
- func GetCoinBaseScriptHex(wallet string) (string, error)
- func GetDiffWork(diff float64) (float64, error)
- func GetGenesisTargetWork() (float64, error)
- func GetHashRateByDiff(diff float64, secs int64, unit string) (float64, error)
- func GetHashRateByNBits(nBits uint32, secs int64, unit string) (float64, error)
- func GetHashRateByWork(work float64, secs int64, unit string) float64
- func GetNBitsDiff(nBits uint32) float64
- func GetTargetDiff(target *big.Int) (float64, error)
- func GetTargetWork(target *big.Int) (float64, error)
- func NBits2Target(nBits uint32) *big.Int
- func PackNumber(num int64) []byte
- func PackString(str string) ([]byte, error)
- type CoinBaseTransaction
- type MasterNodeVout
Constants ¶
View Source
const ( EXTRANONCE1_SIZE = 4 EXTRANONCE2_SIZE = 4 COINBASE_TX_VERSION = 2 )
View Source
const (
GENESISNBITS = uint32(0x1d00ffff)
)
Variables ¶
This section is empty.
Functions ¶
func GetCoinBaseScript ¶
func GetCoinBaseScriptHex ¶
func GetDiffWork ¶
func GetGenesisTargetWork ¶
func GetHashRateByDiff ¶
func GetHashRateByNBits ¶
func GetNBitsDiff ¶
func NBits2Target ¶
func PackNumber ¶
func PackString ¶
Types ¶
type CoinBaseTransaction ¶
type CoinBaseTransaction struct {
BlockTime uint32
BlockHeight uint32
RewardValue int64
CBExtras string
CBAuxFlag []byte
VinScript1 []byte
VinScript2 []byte
VoutScript []byte
CoinBaseTx1 []byte
CoinBaseTx2 []byte
DefaultWitnessCommitment []byte
}
func (*CoinBaseTransaction) Initialize ¶
func (*CoinBaseTransaction) RecoverToRawTransaction ¶
func (t *CoinBaseTransaction) RecoverToRawTransaction(extraNonce1Hex string, extraNonce2Hex string) (transaction.Transaction, error)
type MasterNodeVout ¶
Click to show internal directories.
Click to hide internal directories.