Documentation
¶
Overview ¶
Package boost provides a way to parse boostpow data from a bpu.Tape
Index ¶
Constants ¶
View Source
const Prefix = "boostpow"
Prefix is the protocol prefix for Boost Pow
Variables ¶
This section is empty.
Functions ¶
func PubkeyHashToAddress ¶
PubkeyHashToAddress converts a pubkey hash to a base58check encoded address
Types ¶
type Boost ¶
type Boost struct {
Redeem Redeem `json:"redeem" bson:"redeem"`
Spend Spend `json:"spend" bson:"spend"`
}
Boost is Boost Pow data object
func NewFromTape ¶
NewFromTape takes a bob.Tape and returns a BAP data structure
type Redeem ¶
type Redeem struct {
// 3044022100ac4003d62ddadbf0bff9cbe63d0f6ad740494ee7fcf5f296cfc056f52f087c7c\
// 021f2f9e2db03b141ce88edc1c10850a0831dea63edd6c6a8040d80e24737e6d4a41
Signature string `json:"signature" bson:"signature"`
// pubkey: 03097e9768554d40c0b5b18e44db2a15bbd137a373c39af46033049477bcbb79a4
PubKey string `json:"pubkey" bson:"pubkey"`
// nonce : 31497
Nonce uint32 `json:"nonce" bson:"nonce"`
// timestamp : 1677268580
Timestamp uint32 `json:"timestamp" bson:"timestamp"`
// extra_nonce_2 : "0f0445b186e64adc"
ExtraNonce2 string `json:"extra_nonce_2" bson:"extra_nonce_2"`
// extra_nonce_1 : 909479219
ExtraNonce1 uint32 `json:"extra_nonce_1" bson:"extra_nonce_1"`
// miner_pubkey_hash: 0xa3c10ac097a7da0009a786cc17edc1391a3bddf6
MinerPubKeyHash string `json:"miner_pubkey_hash" bson:"miner_pubkey_hash"`
Version int32 `json:"version" bson:"version"`
}
Redeem is the parsed redeem data
type Spend ¶
type Spend struct {
Hash string `json:"hash,omitempty" bson:"hash,omitempty"`
Content string `json:"content,omitempty" bson:"content,omitempty"`
Difficulty float64 `json:"difficulty,omitempty" bson:"difficulty,omitempty"`
Topic *string `json:"topic,omitempty" bson:"topic,omitempty"`
AdditionalData *string `json:"additional_data,omitempty" bson:"additional_data,omitempty"`
Bits uint64 `json:"bits" bson:"bits"`
MetadataHash string `json:"metadata_hash,omitempty" bson:"metadata_hash,omitempty"`
Time uint64 `json:"time,omitempty" bson:"time,omitempty"`
Nonce uint32 `json:"nonce,omitempty" bson:"nonce,omitempty"`
Category uint32 `json:"category" bson:"category,omitempty"`
MinerAddress *string `json:"miner_address,omitempty" bson:"miner_address,omitempty"`
Version int32 `json:"version" bson:"version"`
}
Spend is the parsed spend data. Version unknown when 0.
Click to show internal directories.
Click to hide internal directories.