Documentation ¶
Index ¶
- func ValidateAddress(address string) bool
- type Block
- type Node
- func (node Node) Address() string
- func (node Node) BroadcastTx(txHex 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 Transaction
- type TransactionInput
- type TransactionOutpoint
- type TransactionOutput
- type TransactionScriptPubKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAddress ¶
Types ¶
type Block ¶
type Block struct { // Header Version uint32 `json:"Version"` Parents [][]string `json:"Parents"` HashMerkleRoot string `json:"HashMerkleRoot"` AcceptedIdMerkleRoot string `json:"AcceptedIdMerkleRoot"` UtxoCommitment string `json:"UtxoCommitment"` Timestamp int64 `json:"Timestamp"` Bits uint32 `json:"Bits"` Nonce uint64 `json:"Nonce"` DaaScore uint64 `json:"DaaScore"` BlueWork string `json:"BlueWork"` PruningPoint string `json:"PruningPoint"` BlueScore uint64 `json:"BlueScore"` // Transactions Transactions []*Transaction `json:"Transactions"` // VerboseData Hash string `json:"Hash"` Difficulty float64 `json:"Difficulty"` MergeSetBluesHashes []string `json:"MergeSetBluesHashes"` MergeSetRedsHashes []string `json:"MergeSetRedsHashes"` ChildrenHashes []string `json:"ChildrenHashes"` IsChainBlock bool `json:"IsChainBlock"` }
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 Transaction ¶
type Transaction struct { Version uint32 `json:"Version"` Inputs []*TransactionInput `json:"Inputs"` Outputs []*TransactionOutput `json:"Outputs"` LockTime uint64 `json:"LockTime"` SubnetworkId string `json:"SubnetworkId"` Gas uint64 `json:"Gas"` Payload string `json:"Payload"` }
type TransactionInput ¶
type TransactionInput struct { PreviousOutpoint *TransactionOutpoint `json:"PreviousOutpoint"` SignatureScript string `json:"SignatureScript"` Sequence uint64 `json:"Sequence"` SigOpCount uint32 `json:"SigOpCount"` }
type TransactionOutpoint ¶
type TransactionOutput ¶
type TransactionOutput struct { Amount uint64 `json:"Amount"` ScriptPublicKey *TransactionScriptPubKey `json:"ScriptPublicKey"` }
type TransactionScriptPubKey ¶
Click to show internal directories.
Click to hide internal directories.