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 { Signature string `json:"signature" bson:"signature"` // 3044022100ac4003d62ddadbf0bff9cbe63d0f6ad740494ee7fcf5f296cfc056f52f087c7c021f2f9e2db03b141ce88edc1c10850a0831dea63edd6c6a8040d80e24737e6d4a41 PubKey string `json:"pubkey" bson:"pubkey"` // pubkey: 03097e9768554d40c0b5b18e44db2a15bbd137a373c39af46033049477bcbb79a4 Nonce uint32 `json:"nonce" bson:"nonce"` // nonce : 31497 Timestamp uint32 `json:"timestamp" bson:"timestamp"` // timestamp : 1677268580 ExtraNonce2 string `json:"extra_nonce_2" bson:"extra_nonce_2"` // extra_nonce_2 : "0f0445b186e64adc" ExtraNonce1 uint32 `json:"extra_nonce_1" bson:"extra_nonce_1"` // extra_nonce_1 : 909479219 MinerPubKeyHash string `json:"miner_pubkey_hash" bson:"miner_pubkey_hash"` // miner_pubkey_hash: 0xa3c10ac097a7da0009a786cc17edc1391a3bddf6 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.