types

package
v0.0.0-...-6bb3ed1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMerkleTree

func GetMerkleTree(b *proto.Block) (*merkletree.MerkleTree, error)

func HashBlock

func HashBlock(block *proto.Block) []byte

func HashHeader

func HashHeader(header *proto.Header) []byte

func HashTransaction

func HashTransaction(tx *proto.Transaction) []byte

func SignBlock

func SignBlock(pk *crypto.PrivateKey, b *proto.Block) *crypto.Signature

func SignTransaction

func SignTransaction(pk *crypto.PrivateKey, tx *proto.Transaction) *crypto.Signature

func VerifyBlock

func VerifyBlock(b *proto.Block) bool

func VerifyRootHash

func VerifyRootHash(b *proto.Block) bool

func VerifyTransaction

func VerifyTransaction(tx *proto.Transaction) bool

Types

type TxHash

type TxHash struct {
	// contains filtered or unexported fields
}

func NewTxHash

func NewTxHash(hash []byte) TxHash

func (TxHash) CalculateHash

func (h TxHash) CalculateHash() ([]byte, error)

func (TxHash) Equals

func (h TxHash) Equals(other merkletree.Content) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL