Documentation ¶
Index ¶
- func DecodeBlock(block *common.Block) (*RawBlock, *Block, error)
- func GetEvents(block *common.Block) []*api.EventEntry
- func UnmarshalChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
- func UnmarshalChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error)
- func UnmarshalChaincodeEvents(eBytes []byte) (*peer.ChaincodeEvent, error)
- func UnmarshalPayload(encoded []byte) (*common.Payload, error)
- func UnmarshalProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error)
- func UnmarshalTransaction(txBytes []byte) (*peer.Transaction, error)
- type Action
- type ActionPayload
- type ActionPayloadAction
- type Block
- type BlockData
- type BlockDataEnvelope
- type ChaincodeEvent
- type ChaincodeProposalPayload
- type ChaincodeSpec
- type ChaincodeSpecInput
- type ChannelHeader
- type ConfigRecord
- type Creator
- type Extension
- type Payload
- type PayloadData
- type PayloadHeader
- type ProposalPayloadInput
- type ProposalResponsePayload
- type RawBlock
- type SignatureHeader
- type Transaction
- type TransactionAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmarshalChaincodeAction ¶
func UnmarshalChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
UnmarshalChaincodeAction unmarshals bytes to a ChaincodeAction
func UnmarshalChaincodeActionPayload ¶
func UnmarshalChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error)
UnmarshalChaincodeActionPayload unmarshals bytes to a ChaincodeActionPayload
func UnmarshalChaincodeEvents ¶
func UnmarshalChaincodeEvents(eBytes []byte) (*peer.ChaincodeEvent, error)
UnmarshalChaincodeEvents unmarshals bytes to a ChaincodeEvent
func UnmarshalPayload ¶
UnmarshalPayload unmarshals bytes to a Payload
func UnmarshalProposalResponsePayload ¶
func UnmarshalProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error)
UnmarshalProposalResponsePayload unmarshals bytes to a ProposalResponsePayload
func UnmarshalTransaction ¶
func UnmarshalTransaction(txBytes []byte) (*peer.Transaction, error)
UnmarshalTransaction unmarshals bytes to a Transaction
Types ¶
type Action ¶ added in v0.9.6
type Action struct { Header *SignatureHeader `json:"header"` Payload *ActionPayload `json:"payload"` }
type ActionPayload ¶ added in v0.9.6
type ActionPayload struct { Action *ActionPayloadAction `json:"action"` ChaincodeProposalPayload *ChaincodeProposalPayload `json:"chaincode_proposal_payload"` }
type ActionPayloadAction ¶ added in v0.9.6
type ActionPayloadAction struct { // Endorsements are not parsed for now ProposalResponsePayload *ProposalResponsePayload `json:"proposal_response_payload"` }
type Block ¶ added in v0.9.6
type Block struct { Number uint64 `json:"block_number"` DataHash string `json:"data_hash"` PreviousHash string `json:"previous_hash"` // only for endorser transaction blocks Transactions []*Transaction `json:"transactions,omitempty"` // only for Config blocks Config *ConfigRecord `json:"config,omitempty"` }
type BlockData ¶ added in v0.9.6
type BlockData struct {
Data []*BlockDataEnvelope `json:"data"`
}
type BlockDataEnvelope ¶ added in v0.9.6
type ChaincodeEvent ¶ added in v0.9.6
type ChaincodeProposalPayload ¶ added in v0.9.6
type ChaincodeProposalPayload struct { TransientMap *map[string][]byte `json:"TransientMap"` Input *ProposalPayloadInput `json:"input"` }
type ChaincodeSpec ¶ added in v0.9.6
type ChaincodeSpec struct { ChaincodeID *peer.ChaincodeID `json:"chaincode_id"` Input *ChaincodeSpecInput `json:"input"` Type string `json:"type"` }
type ChaincodeSpecInput ¶ added in v0.9.6
type ChaincodeSpecInput struct { Args []interface{} `json:"args"` IsInit bool `json:"is_init"` }
type ChannelHeader ¶ added in v0.9.6
type ConfigRecord ¶ added in v0.9.7
type Extension ¶ added in v0.9.6
type Extension struct { ChaincodeID *peer.ChaincodeID `json:"chaincode_id"` Events *ChaincodeEvent `json:"events"` }
type Payload ¶ added in v0.9.6
type Payload struct { Data *PayloadData `json:"data"` Header *PayloadHeader `json:"header"` }
type PayloadData ¶ added in v0.9.6
type PayloadHeader ¶ added in v0.9.6
type PayloadHeader struct { ChannelHeader *ChannelHeader `json:"channel_header"` SignatureHeader *SignatureHeader `json:"signature_header"` }
type ProposalPayloadInput ¶ added in v0.9.6
type ProposalPayloadInput struct {
ChaincodeSpec *ChaincodeSpec `json:"chaincode_spec"`
}
type ProposalResponsePayload ¶ added in v0.9.6
type RawBlock ¶ added in v0.9.6
type RawBlock struct { Data *BlockData `json:"data"` Header *common.BlockHeader `json:"header"` Metadata *common.BlockMetadata `json:"metadata"` }
func (*RawBlock) DecodeBlockDataEnvelope ¶ added in v0.9.6
func (block *RawBlock) DecodeBlockDataEnvelope(env *common.Envelope) (*BlockDataEnvelope, interface{}, error)
type SignatureHeader ¶ added in v0.9.6
type SignatureHeader struct { Creator *msp.SerializedIdentity `json:"creator"` Nonce string `json:"nonce"` }
type Transaction ¶ added in v0.9.6
type Transaction struct { Type string `json:"type"` TxID string `json:"tx_id"` Nonce string `json:"nonce"` // hex string Creator *Creator `json:"creator"` Status string `json:"status"` Signature string `json:"signature"` Timestamp int64 `json:"timestamp"` // unix nano Actions []*TransactionAction `json:"actions"` }
type TransactionAction ¶ added in v0.9.7
type TransactionAction struct { Nonce string `json:"nonce"` // hex string Creator *Creator `json:"creator"` TransientMap *map[string][]byte `json:"transient_map"` ChaincodeID *peer.ChaincodeID `json:"chaincode_id"` Input *ChaincodeSpecInput `json:"input"` ProposalHash string `json:"proposal_hash"` // hex string Event *ChaincodeEvent `json:"event"` }
Click to show internal directories.
Click to hide internal directories.