Documentation ¶
Overview ¶
Package fabric_tools defines tools for Fabric spv
Index ¶
- func GetBlockDataHash(blockData *fabCommonPb.BlockData) []byte
- func GetBlockHash(header *fabCommonPb.BlockHeader) []byte
- func GetEnvelopeByBytes(data []byte) *fabCommonPb.Envelope
- func GetTransactionChannelId(envelope *fabCommonPb.Envelope) (string, error)
- func GetTransactionContractData(envelope *fabCommonPb.Envelope) (string, [][]byte, error)
- func GetTransactionId(envelope *fabCommonPb.Envelope) (string, error)
- func GetValidationCodeByMetadata(index int, meta *fabCommonPb.BlockMetadata) int32
- func NewBlock() *fabCommonPb.Block
- func NewEnvelope() *fabCommonPb.Envelope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBlockDataHash ¶
func GetBlockDataHash(blockData *fabCommonPb.BlockData) []byte
GetBlockDataHash calc data hash by block data
func GetBlockHash ¶
func GetBlockHash(header *fabCommonPb.BlockHeader) []byte
GetBlockHash calc block hash for fabric
func GetEnvelopeByBytes ¶
func GetEnvelopeByBytes(data []byte) *fabCommonPb.Envelope
GetEnvelopeByBytes gets an envelope from a block's Data field.
func GetTransactionChannelId ¶
func GetTransactionChannelId(envelope *fabCommonPb.Envelope) (string, error)
GetTransactionChannelId parses transaction for fabric to get channelId
func GetTransactionContractData ¶
func GetTransactionContractData(envelope *fabCommonPb.Envelope) (string, [][]byte, error)
GetTransactionContractData parses transaction for fabric to get contract name and args
func GetTransactionId ¶
func GetTransactionId(envelope *fabCommonPb.Envelope) (string, error)
GetTransactionId parses transaction for fabric to get transaction id
func GetValidationCodeByMetadata ¶
func GetValidationCodeByMetadata(index int, meta *fabCommonPb.BlockMetadata) int32
GetValidationCodeByMetadata gets tx validation code in the block metadata
func NewEnvelope ¶
func NewEnvelope() *fabCommonPb.Envelope
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.