Documentation
¶
Index ¶
Constants ¶
View Source
const (
DYNAFED_HF_MASK = uint32(1 << 31)
)
Variables ¶
This section is empty.
Functions ¶
func DeserializeTransactions ¶
func DeserializeTransactions( buf *bytes.Buffer, ) ([]*transaction.Transaction, error)
Types ¶
type Block ¶
type Block struct {
Header *Header
TransactionsData *Transactions
}
func NewFromHex ¶
func (*Block) SerializeBlock ¶
type CompactParams ¶
type CompactParams struct {
// "scriptPubKey" used for block signing
SignBlockScript []byte
/// Maximum, in bytes, of the size of a blocksigning witness
SignBlockWitnessLimit uint32
/// Merkle root of extra data
ElidedRoot []byte
}
CompactParams params where the fedpeg data and extension space are not included, and are assumed to be equal to the values from the previous block
type DynamicFederation ¶
type DynamicFederation struct {
Current *DynamicFederationParams
Proposed *DynamicFederationParams
SignBlockWitness [][]byte
}
type DynamicFederationParams ¶
type DynamicFederationParams struct {
CompactParams *CompactParams
FullParams *FullParams
}
type ExtData ¶
type ExtData struct {
// Liquid v1-style static `signblockscript` and witness
Proof *Proof
// Dynamic federations
DynamicFederation *DynamicFederation
// is dynamic federation
IsDyna bool
}
ExtData block signature and dynamic federation-related data
type FullParams ¶
type FullParams struct {
// "scriptPubKey" used for block signing
SignBlockScript []byte
// Maximum, in bytes, of the size of a blocksigning witness
SignBlockWitnessLimit uint32
// Untweaked `scriptPubKey` used for pegins
FedpegProgram []byte
// For v0 fedpeg programs, the witness script of the untweaked
// pegin address. For future versions, this data has no defined
// meaning and will be considered "anyone can spend".
FedpegScript []byte
/// "Extension space" used by Liquid for PAK key entries
ExtensionSpace [][]byte
}
FullParams full dynamic federations parameters
type Header ¶
type Header struct {
// Version - should be 0x20000000 except when versionbits signalling
Version uint32
// Previous blockhash
PrevBlockHash []byte
// Transaction Merkle root
MerkleRoot []byte
// Block timestamp
Timestamp uint32
// Block Height
Height uint32
// Block signature and dynamic federation-related data
ExtData *ExtData
}
func (*Header) Hash ¶ added in v0.3.6
Hash gets the bytes with SerializeForHash and DoubleHash the bytes
func (*Header) Serialize ¶ added in v0.3.6
Serialize returns the block bytes includes all the data of the block
func (*Header) SerializeForHash ¶ added in v0.3.6
SerializeForHash returns the block bytes for block hash it does not include some data of the block (like witness or solution in case of signed blocks)
type MerkleBlock ¶
type MerkleBlock struct {
BlockHeader *wire.BlockHeader
PartialMerkleTree *PartialMerkleTree
}
func NewMerkleBlockFromBuffer ¶
func NewMerkleBlockFromBuffer(buf *bytes.Buffer) (*MerkleBlock, error)
func NewMerkleBlockFromHex ¶
func NewMerkleBlockFromHex(h string) (*MerkleBlock, error)
func (*MerkleBlock) ExtractMatches ¶
type PartialMerkleTree ¶
type Proof ¶
type Proof struct {
// Block "public key"
Challenge []byte
// Satisfying witness to the above Challenge, or nothing
Solution []byte
}
Proof Liquid v1-style static `signblockscript` and witness
type Transactions ¶
type Transactions struct {
Transactions []*transaction.Transaction
}
func (*Transactions) Serialize ¶ added in v0.4.0
func (t *Transactions) Serialize(s *bufferutil.Serializer) error
Click to show internal directories.
Click to hide internal directories.