Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2022 Changes in this version + const CoinbaseInputType + const FlagAssist + const FlagTxLeaf + const FlagTxParent + const IssuanceInputType + const OriginalOutputType + const SerBlockFull + const SerBlockHeader + const SerBlockTransactions + const SpendInputType + const VetoInputType + const VoteOutputType + func ComputeOutputID(sc *SpendCommitment, inputType uint8, vote []byte) (h bc.Hash, err error) + func GetTxMerkleTreeProof(txs []*Tx, relatedTxs []*Tx) ([]*bc.Hash, []uint8) + func MapBlock(old *Block) *bc.Block + func MapTx(txData *TxData) *bc.Tx + func TxMerkleRoot(transactions []*bc.Tx) (root bc.Hash, err error) + func ValidateTxMerkleTreeProof(hashes []*bc.Hash, flags []uint8, relatedHashes []*bc.Hash, merkleRoot bc.Hash) bool + type Block struct + Transactions []*Tx + func (b *Block) MarshalText() ([]byte, error) + func (b *Block) MarshalTextForBlockHeader() ([]byte, error) + func (b *Block) MarshalTextForTransactions() ([]byte, error) + func (b *Block) UnmarshalText(text []byte) error + func (b *Block) WriteTo(w io.Writer) (int64, error) + type BlockCommitment struct + TransactionsMerkleRoot bc.Hash + type BlockHeader struct + Height uint64 + PreviousBlockHash bc.Hash + Timestamp uint64 + Version uint64 + func (bh *BlockHeader) Hash() bc.Hash + func (bh *BlockHeader) MarshalText() ([]byte, error) + func (bh *BlockHeader) Time() time.Time + func (bh *BlockHeader) UnmarshalText(text []byte) error + func (bh *BlockHeader) WriteTo(w io.Writer) (int64, error) + type BlockWitness []byte + func (bw *BlockWitness) Set(data []byte) + type CoinbaseInput struct + Arbitrary []byte + func (cb *CoinbaseInput) AssetID() bc.AssetID + func (cb *CoinbaseInput) InputType() uint8 + type IssuanceInput struct + Amount uint64 + Arguments [][]byte + AssetDefinition []byte + IssuanceProgram []byte + Nonce []byte + VMVersion uint64 + func (ii *IssuanceInput) AssetDefinitionHash() (defhash bc.Hash) + func (ii *IssuanceInput) AssetID() bc.AssetID + func (ii *IssuanceInput) InputType() uint8 + func (ii *IssuanceInput) NonceHash() (hash bc.Hash) + type OutputCommitment struct + ControlProgram []byte + StateData [][]byte + VMVersion uint64 + type SpendCommitment struct + ControlProgram []byte + SourceID bc.Hash + SourcePosition uint64 + StateData [][]byte + VMVersion uint64 + type SpendInput struct + Arguments [][]byte + SpendCommitmentSuffix []byte + func (si *SpendInput) AssetID() bc.AssetID + func (si *SpendInput) InputType() uint8 + type SupLink struct + Signatures [consensus.MaxNumOfValidators][]byte + SourceHash bc.Hash + SourceHeight uint64 + func (s *SupLink) IsMajority(numOfValidators int) bool + type SupLinks []*SupLink + func (s *SupLinks) AddSupLink(sourceHeight uint64, sourceHash bc.Hash, signature []byte, validatorOrder int) + type Tx struct + func NewTx(data TxData) *Tx + func (tx *Tx) OutputID(outputIndex int) *bc.Hash + func (tx *Tx) SetInputArguments(n uint32, args [][]byte) + func (tx *Tx) UnmarshalText(p []byte) error + type TxData struct + Inputs []*TxInput + Outputs []*TxOutput + SerializedSize uint64 + TimeRange uint64 + Version uint64 + func (tx *TxData) Fee() uint64 + func (tx *TxData) MarshalText() ([]byte, error) + func (tx *TxData) UnmarshalText(p []byte) error + func (tx *TxData) WriteTo(w io.Writer) (int64, error) + type TxInput struct + AssetVersion uint64 + CommitmentSuffix []byte + WitnessSuffix []byte + func NewCoinbaseInput(arbitrary []byte) *TxInput + func NewIssuanceInput(nonce []byte, amount uint64, issuanceProgram []byte, arguments [][]byte, ...) *TxInput + func NewSpendInput(arguments [][]byte, sourceID bc.Hash, assetID bc.AssetID, ...) *TxInput + func NewVetoInput(arguments [][]byte, sourceID bc.Hash, assetID bc.AssetID, ...) *TxInput + func (t *TxInput) Amount() uint64 + func (t *TxInput) Arguments() [][]byte + func (t *TxInput) ControlProgram() []byte + func (t *TxInput) SetArguments(args [][]byte) + func (t *TxInput) SpentOutputID() (o bc.Hash, err error) + type TxOutput struct + AssetVersion uint64 + CommitmentSuffix []byte + func NewOriginalTxOutput(assetID bc.AssetID, amount uint64, controlProgram []byte, stateData [][]byte) *TxOutput + func NewVoteOutput(assetID bc.AssetID, amount uint64, controlProgram []byte, vote []byte, ...) *TxOutput + type TypedInput interface + AssetID func() bc.AssetID + InputType func() uint8 + type TypedOutput interface + OutputType func() uint8 + type VetoInput struct + Arguments [][]byte + VetoCommitmentSuffix []byte + Vote []byte + func (vi *VetoInput) AssetID() bc.AssetID + func (vi *VetoInput) InputType() uint8 + type VoteOutput struct + Vote []byte + func (v *VoteOutput) OutputType() uint8