Documentation ¶
Index ¶
- func GenerateCoinbase(addresses []string, amounts []uint64, blockHeight uint64, extraData string, ...) ([]byte, []byte, error)
- func ValidateAddress(address string) bool
- type Block
- type BlockTemplate
- type BlockchainInfo
- type Node
- func (node Node) Address() string
- func (node Node) BroadcastTx(tx string) (string, error)
- func (node Node) CalculateHashrate(blockTime, difficulty float64) float64
- func (node Node) Chain() string
- func (node Node) CreateTx(inputs []*types.TxInput, outputs []*types.TxOutput) (string, string, error)
- func (node Node) GetAccountingType() types.AccountingType
- func (node Node) GetAddressExplorerURL(address string) string
- func (node Node) GetAddressPrefix() string
- func (node Node) GetAdjustedShareDifficulty() float64
- func (node Node) GetAuthorizeResponses(diffFactor int) ([]interface{}, error)
- func (node Node) GetBalance() (*big.Int, error)
- func (node Node) GetBlockExplorerURL(round *pooldb.Round) string
- func (node Node) GetBlocks(start, end uint64) ([]*tsdb.RawBlock, error)
- func (node Node) GetBlocksByHash(startHash string, limit uint64) ([]*tsdb.RawBlock, error)
- func (node Node) GetClientType(minerClient string) int
- func (node Node) GetImmatureDepth() uint64
- func (node Node) GetMatureDepth() uint64
- func (node Node) GetMaxDifficulty() *big.Int
- func (node Node) GetSetDifficultyResponse(diffFactor int) (interface{}, error)
- func (node Node) GetShareDifficulty(diffFactor int) *types.Difficulty
- func (node Node) GetStatus() (uint64, bool, error)
- func (node Node) GetSubscribeResponses(id []byte, clientID, extraNonce string) ([]interface{}, error)
- func (node Node) GetTx(txid string) (*types.TxResponse, error)
- func (node Node) GetTxExplorerURL(txid string) string
- func (node Node) GetUnits() *types.Number
- func (node *Node) HandleHostPoolInfoRequest(w http.ResponseWriter, r *http.Request)
- func (node Node) JobNotify(ctx context.Context, interval time.Duration) chan *types.StratumJob
- func (node Node) MarshalJob(id interface{}, job *types.StratumJob, cleanJobs bool, ...) (interface{}, error)
- func (node Node) MatureRound(round *pooldb.Round) ([]*pooldb.UTXO, error)
- func (node Node) Mocked() bool
- func (node Node) Name() string
- func (node Node) ParseWork(data []json.RawMessage, extraNonce string) (*types.StratumWork, error)
- func (node Node) PingHosts() ([]string, []uint64, []bool, []error)
- func (node Node) ShouldMergeUTXOs() bool
- func (node Node) SubmitWork(job *types.StratumJob, work *types.StratumWork, diffFactor int) (types.ShareStatus, *types.Hash, *pooldb.Round, error)
- func (node Node) UnlockRound(round *pooldb.Round) error
- func (node Node) ValidateAddress(address string) bool
- type SignedTransaction
- type SignedTransactionError
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCoinbase ¶
func ValidateAddress ¶
Types ¶
type Block ¶
type Block struct { Hash string `json:"hash"` Confirmations int64 `json:"confirmations"` StrippedSize uint64 `json:"strippedsize"` Size uint64 `json:"size"` Weight uint64 `json:"weight"` Height uint64 `json:"height"` Version uint64 `json:"version"` MerkleRoot string `json:"merkleroot"` FinalSaplingRoot string `json:"finalsaplingroot"` Transactions []*Transaction `json:"tx"` Time int64 `json:"time"` MedianTime int64 `json:"mediantime"` Bits string `json:"bits"` Difficulty float64 `json:"difficulty"` Chainwork string `json:"chainwork"` Nonce string `json:"nonce"` Solution string `json:"solution"` Anchor string `json:"anchor"` PreviousBlockHash string `json:"previousblockhash"` NextBlockHash string `json:"nextblockhash"` }
type BlockTemplate ¶
type BlockTemplate struct { Capabilities []string `json:"capabilities"` Version uint32 `json:"version"` Rules []string `json:"rules"` // VBAvailable interface{} `json:"vbavailable"` VBRequired int `json:"vbrequired"` PreviousBlockHash string `json:"previousblockhash"` FinalSaplingRootHash string `json:"finalsaplingroothash"` Transactions []*Transaction `json:"transactions"` CoinbaseAux struct { Flags string `json:"flags"` } `json:"coinbaseaux"` CoinbaseValue uint64 `json:"coinbasevalue"` LongPollID string `json:"longpollid"` Target string `json:"target"` MinTime int `json:"mintime"` Mutable []string `json:"mutable"` NonceRange string `json:"noncerange"` SigOpLimit int `json:"sigoplimit"` WeightLimit int `json:"weightlimit"` CurTime uint32 `json:"curtime"` Bits string `json:"bits"` Height uint64 `json:"height"` MinerReward uint64 `json:"miner_reward"` CumulusFluxnodeAddress string `json:"cumulus_fluxnode_address"` CumulusFluxnodePayout uint64 `json:"cumulus_fluxnode_payout"` NimbusFluxnodeAddress string `json:"nimbus_fluxnode_address"` NimbusFluxnodePayout uint64 `json:"nimbus_fluxnode_payout"` StratusFluxnodeAddress string `json:"stratus_fluxnode_address"` StratusFluxnodePayout uint64 `json:"stratus_fluxnode_payout"` }
type BlockchainInfo ¶
type BlockchainInfo struct { Chain string `json:"chain"` Blocks uint64 `json:"blocks"` Headers uint64 `json:"headers"` BestBlockHash string `json:"bestblockhash"` Difficulty float64 `json:"difficulty"` MedianTime int64 `json:"mediantime"` VerificationProgress float64 `json:"verificationprogress"` ChainWork string `json:"chainwork"` Pruned bool `json:"pruned"` }
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (Node) CalculateHashrate ¶
func (Node) GetAccountingType ¶
func (node Node) GetAccountingType() types.AccountingType
func (Node) GetAddressExplorerURL ¶
func (Node) GetAddressPrefix ¶
func (Node) GetAdjustedShareDifficulty ¶
func (Node) GetAuthorizeResponses ¶
func (Node) GetBlocksByHash ¶
func (Node) GetClientType ¶
func (Node) GetImmatureDepth ¶
func (Node) GetMatureDepth ¶
func (Node) GetMaxDifficulty ¶
func (Node) GetSetDifficultyResponse ¶
func (Node) GetShareDifficulty ¶
func (node Node) GetShareDifficulty(diffFactor int) *types.Difficulty
func (Node) GetSubscribeResponses ¶
func (Node) GetTxExplorerURL ¶
func (*Node) HandleHostPoolInfoRequest ¶
func (node *Node) HandleHostPoolInfoRequest(w http.ResponseWriter, r *http.Request)
func (Node) MarshalJob ¶
func (Node) ParseWork ¶
func (node Node) ParseWork(data []json.RawMessage, extraNonce string) (*types.StratumWork, error)
func (Node) ShouldMergeUTXOs ¶
func (Node) SubmitWork ¶
func (node Node) SubmitWork( job *types.StratumJob, work *types.StratumWork, diffFactor int, ) (types.ShareStatus, *types.Hash, *pooldb.Round, error)
func (Node) ValidateAddress ¶
type SignedTransaction ¶
type SignedTransaction struct { Hex string `json:"hex"` Complete bool `json:"complete"` Errors []*SignedTransactionError }
type SignedTransactionError ¶
type SignedTransactionError struct { TxID string `json:"txid"` VOut uint32 `json:"vout"` ScriptSig string `json:"scriptSig"` Sequence uint32 `json:"sequence"` ErrorMsg string `json:"error"` }
func (*SignedTransactionError) Error ¶
func (s *SignedTransactionError) Error() string
type Transaction ¶
type Transaction struct { Data string `json:"data"` TxID string `json:"txid"` Hash string `json:"hash"` Height int64 `json:"height"` Confirmations int64 `json:"confirmations"` Inputs []struct { Coinbase string `json:"coinbase"` } `json:"vin"` Outputs []struct { Value json.Number `json:"value"` ScriptPubKey struct { Addresses []string `json:"addresses"` } `json:"scriptPubKey"` } `json:"vout"` }
Click to show internal directories.
Click to hide internal directories.