Documentation ¶
Index ¶
- type FabBlock
- func (fb *FabBlock) GetBlockHash() []byte
- func (fb *FabBlock) GetBlockHeader() common.Header
- func (fb *FabBlock) GetChainId() string
- func (fb *FabBlock) GetExtraData() interface{}
- func (fb *FabBlock) GetHeight() uint64
- func (fb *FabBlock) GetPreHash() []byte
- func (fb *FabBlock) GetTransaction() []common.Transactioner
- func (fb *FabBlock) GetTxRoot() []byte
- type FabBlockHeader
- type FabTransaction
- func (ft *FabTransaction) GetContractName() (string, error)
- func (ft *FabTransaction) GetExtraData() (interface{}, error)
- func (ft *FabTransaction) GetMethod() (string, error)
- func (ft *FabTransaction) GetParams() ([]interface{}, error)
- func (ft *FabTransaction) GetStatusCode() int32
- func (ft *FabTransaction) GetTransactionHash() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FabBlock ¶
type FabBlock struct { ChainId string Block *fabCommonPb.Block }
FabBlock packages Fabric's block
func NewFabBlock ¶
func NewFabBlock(chainId string, block *fabCommonPb.Block) *FabBlock
NewFabBlock creates FabBlock
func (*FabBlock) GetBlockHash ¶
GetBlockHash returns block hash
func (*FabBlock) GetBlockHeader ¶
GetBlockHeader returns block header
func (*FabBlock) GetExtraData ¶
func (fb *FabBlock) GetExtraData() interface{}
GetExtraData returns extra data in the block
func (*FabBlock) GetPreHash ¶
GetPreHash returns the hash value of previous block
func (*FabBlock) GetTransaction ¶
func (fb *FabBlock) GetTransaction() []common.Transactioner
GetTransaction returns transactions in the block
type FabBlockHeader ¶
type FabBlockHeader struct { ChainId string BlockHeader *fabCommonPb.BlockHeader }
FabBlockHeader packages Fabric's block header
func (*FabBlockHeader) GetBlockHash ¶
func (fbh *FabBlockHeader) GetBlockHash() []byte
GetBlockHash returns block hash
func (*FabBlockHeader) GetChainId ¶
func (fbh *FabBlockHeader) GetChainId() string
GetChainId returns chainId
func (*FabBlockHeader) GetHeight ¶
func (fbh *FabBlockHeader) GetHeight() uint64
GetHeight returns block height
func (*FabBlockHeader) GetPreHash ¶
func (fbh *FabBlockHeader) GetPreHash() []byte
GetPreHash returns the hash value of previous block
func (*FabBlockHeader) GetTxRoot ¶
func (fbh *FabBlockHeader) GetTxRoot() []byte
GetTxRoot returns the root hash of transactions
type FabTransaction ¶
type FabTransaction struct { Transaction *fabCommonPb.Envelope ValidationCode int32 // An indication of whether the transaction was validated or invalidated by committing peer }
FabTransaction packages Fabric's Transaction
func NewFabTransaction ¶
func NewFabTransaction(tx *fabCommonPb.Envelope, code int32) *FabTransaction
NewFabTransaction creates FabTransaction
func (*FabTransaction) GetContractName ¶
func (ft *FabTransaction) GetContractName() (string, error)
GetContractName returns the contract name of transaction
func (*FabTransaction) GetExtraData ¶
func (ft *FabTransaction) GetExtraData() (interface{}, error)
GetExtraData returns extra data of transaction.
func (*FabTransaction) GetMethod ¶
func (ft *FabTransaction) GetMethod() (string, error)
GetMethod returns the method in contract method of transaction
func (*FabTransaction) GetParams ¶
func (ft *FabTransaction) GetParams() ([]interface{}, error)
GetParams returns parameters of transaction
func (*FabTransaction) GetStatusCode ¶
func (ft *FabTransaction) GetStatusCode() int32
GetStatusCode returns the transaction status code
func (*FabTransaction) GetTransactionHash ¶
func (ft *FabTransaction) GetTransactionHash() ([]byte, error)
GetTransactionHash returns transaction hash