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 Block
- type BlockHeader
- type DashCoinBaseTransaction
- type DashTransaction
- func (t DashTransaction) CalcTrxId() (bigint.Uint256, error)
- func (t *DashTransaction) GetTrxPrintAble() TrxPrintAble
- func (t DashTransaction) Pack(writer io.Writer) error
- func (t DashTransaction) PackToHex() (string, error)
- func (t *DashTransaction) UnPack(reader io.Reader) error
- func (t *DashTransaction) UnPackFromHex(hexStr string) error
- type MasterNodeVout
- type OutPoint
- type OutPointPrintAble
- type TrxPrintAble
- type TxIn
- type TxInPrintAble
- type TxOut
- type TxOutPrintAble
Constants ¶
View Source
const ( EXTRANONCE1_SIZE = 4 EXTRANONCE2_SIZE = 4 COINBASE_TX_VERSION = 3 COINBASE_TX_TYPE = 5 )
View Source
const ( TRANSACTION_NORMAL = 0 TRANSACTION_PROVIDER_REGISTER = 1 TRANSACTION_PROVIDER_UPDATE_SERVICE = 2 TRANSACTION_PROVIDER_UPDATE_REGISTRAR = 3 TRANSACTION_PROVIDER_UPDATE_REVOKE = 4 TRANSACTION_COINBASE = 5 TRANSACTION_QUORUM_COMMITMENT = 6 )
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 Block ¶
type Block struct { Header BlockHeader Vtx []DashTransaction }
func (*Block) UnPackFromHex ¶
type BlockHeader ¶
type DashCoinBaseTransaction ¶
type DashCoinBaseTransaction struct { BlockTime uint32 BlockHeight uint32 RewardValue int64 MasterNodeVouts []MasterNodeVout CBExtras string CBAuxFlag []byte ExtraPayload []byte VinScript1 []byte VinScript2 []byte VoutScript []byte CoinBaseTx1 []byte CoinBaseTx2 []byte }
func (*DashCoinBaseTransaction) Initialize ¶
func (*DashCoinBaseTransaction) RecoverToDashTransaction ¶
func (t *DashCoinBaseTransaction) RecoverToDashTransaction(extraNonce1Hex string, extraNonce2Hex string) (DashTransaction, error)
type DashTransaction ¶
type DashTransaction struct { Vin []TxIn Vout []TxOut Version int32 LockTime uint32 ExtraPayload script.Script Version16 int16 Type16 int16 }
func (*DashTransaction) GetTrxPrintAble ¶
func (t *DashTransaction) GetTrxPrintAble() TrxPrintAble
func (DashTransaction) PackToHex ¶
func (t DashTransaction) PackToHex() (string, error)
func (*DashTransaction) UnPackFromHex ¶
func (t *DashTransaction) UnPackFromHex(hexStr string) error
type MasterNodeVout ¶
type OutPointPrintAble ¶
type TrxPrintAble ¶
type TrxPrintAble struct { Vin []TxInPrintAble Vout []TxOutPrintAble Version int32 LockTime uint32 ExtraPayload string Version16 int16 Type16 int16 }
type TxInPrintAble ¶
type TxInPrintAble struct { PrevOut OutPointPrintAble ScriptSig string Sequence uint32 }
Click to show internal directories.
Click to hide internal directories.