digest

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NODE_ADDRESS_SIZE_BYTES = 20
)
View Source
const (
	TX_ID_SIZE_BYTES = 8 + 32
)

Variables

This section is empty.

Functions

func CalcBlockHash added in v0.7.1

func CalcBlockHash(transactionsBlock *protocol.TransactionsBlockContainer, resultsBlock *protocol.ResultsBlockContainer) primitives.Sha256

func CalcNodeAddressFromPublicKey added in v0.7.1

func CalcNodeAddressFromPublicKey(publicKey primitives.EcdsaSecp256K1PublicKey) primitives.NodeAddress

func CalcReceiptHash

func CalcReceiptHash(receipt *protocol.TransactionReceipt) primitives.Sha256

func CalcReceiptHashes added in v0.7.1

func CalcReceiptHashes(receipts []*protocol.TransactionReceipt) []primitives.Sha256

func CalcResultsBlockHash

func CalcResultsBlockHash(resultsBlock *protocol.ResultsBlockContainer) primitives.Sha256

func CalcSignedTxHashes added in v0.7.1

func CalcSignedTxHashes(signedTransactions []*protocol.SignedTransaction) []primitives.Sha256

func CalcTransactionsBlockHash

func CalcTransactionsBlockHash(transactionsBlock *protocol.TransactionsBlockContainer) primitives.Sha256

func CalcTxHash

func CalcTxHash(transaction *protocol.Transaction) primitives.Sha256

func CalcTxId

func CalcTxId(transaction *protocol.Transaction) []byte

func ExtractTxId

func ExtractTxId(txId []byte) (txHash primitives.Sha256, txTimestamp primitives.TimestampNano, err error)

func GenerateTxId

func GenerateTxId(txHash primitives.Sha256, txTimestamp primitives.TimestampNano) []byte

func SignAsNode added in v0.7.1

don't need to provide hashed data as this function will SHA256

func VerifyNodeSignature added in v0.7.1

func VerifyNodeSignature(nodeAddress primitives.NodeAddress, data []byte, sig primitives.EcdsaSecp256K1Sig) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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