Documentation ¶
Index ¶
- Constants
- func CalcBlockHash(transactionsBlock *protocol.TransactionsBlockContainer, ...) primitives.Sha256
- func CalcNodeAddressFromPublicKey(publicKey primitives.EcdsaSecp256K1PublicKey) primitives.NodeAddress
- func CalcReceiptHash(receipt *protocol.TransactionReceipt) primitives.Sha256
- func CalcReceiptHashes(receipts []*protocol.TransactionReceipt) []primitives.Sha256
- func CalcResultsBlockHash(resultsBlock *protocol.ResultsBlockContainer) primitives.Sha256
- func CalcSignedTxHashes(signedTransactions []*protocol.SignedTransaction) []primitives.Sha256
- func CalcTransactionsBlockHash(transactionsBlock *protocol.TransactionsBlockContainer) primitives.Sha256
- func CalcTxHash(transaction *protocol.Transaction) primitives.Sha256
- func CalcTxId(transaction *protocol.Transaction) []byte
- func ExtractTxId(txId []byte) (txHash primitives.Sha256, txTimestamp primitives.TimestampNano, err error)
- func GenerateTxId(txHash primitives.Sha256, txTimestamp primitives.TimestampNano) []byte
- func SignAsNode(privateKey primitives.EcdsaSecp256K1PrivateKey, data []byte) (primitives.EcdsaSecp256K1Sig, error)
- func VerifyNodeSignature(nodeAddress primitives.NodeAddress, data []byte, ...) bool
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
func SignAsNode(privateKey primitives.EcdsaSecp256K1PrivateKey, data []byte) (primitives.EcdsaSecp256K1Sig, error)
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.
Click to show internal directories.
Click to hide internal directories.