Documentation ¶
Index ¶
- func CreateChaincodeProposalWithTxIDNonceAndTransient(txid string, typ common.HeaderType, chainID string, ...) (*peer.Proposal, string, error)
- func ExtractEnvelope(block *cb.Block, index int) (*cb.Envelope, error)
- func ExtractEnvelopeOrPanic(block *cb.Block, index int) *cb.Envelope
- func ExtractPayload(envelope *cb.Envelope) (*cb.Payload, error)
- func ExtractPayloadOrPanic(envelope *cb.Envelope) *cb.Payload
- func GetBytesChaincodeActionPayload(cap *peer.ChaincodeActionPayload) ([]byte, error)
- func GetBytesChaincodeEvent(event *peer.ChaincodeEvent) ([]byte, error)
- func GetBytesChaincodeProposalPayload(cpp *peer.ChaincodeProposalPayload) ([]byte, error)
- func GetBytesEnvelope(env *common.Envelope) ([]byte, error)
- func GetBytesPayload(payl *common.Payload) ([]byte, error)
- func GetBytesProposal(prop *peer.Proposal) ([]byte, error)
- func GetBytesProposalPayloadForTx(payload *peer.ChaincodeProposalPayload, visibility []byte) ([]byte, error)
- func GetBytesProposalResponsePayload(hash []byte, response *peer.Response, result []byte, event []byte, ...) ([]byte, error)
- func GetBytesTransaction(tx *peer.Transaction) ([]byte, error)
- func GetChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
- func GetChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error)
- func GetChaincodeEvents(eBytes []byte) (*peer.ChaincodeEvent, error)
- func GetChaincodeHeaderExtension(hdr *common.Header) (*peer.ChaincodeHeaderExtension, error)
- func GetChaincodeProposalPayload(bytes []byte) (*peer.ChaincodeProposalPayload, error)
- func GetEnvelopeFromBlock(data []byte) (*common.Envelope, error)
- func GetHeader(bytes []byte) (*common.Header, error)
- func GetPayload(e *common.Envelope) (*common.Payload, error)
- func GetPayloads(txActions *peer.TransactionAction) (*peer.ChaincodeActionPayload, *peer.ChaincodeAction, error)
- func GetProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error)
- func GetSignatureHeader(bytes []byte) (*common.SignatureHeader, error)
- func GetTransaction(txBytes []byte) (*peer.Transaction, error)
- func MakeChannelHeader(headerType cb.HeaderType, version int32, chainID string, epoch uint64) *cb.ChannelHeader
- func MakePayloadHeader(ch *cb.ChannelHeader, sh *cb.SignatureHeader) *cb.Header
- func Marshal(pb proto.Message) ([]byte, error)
- func MarshalOrPanic(pb proto.Message) []byte
- func UnmarshalChannelHeader(bytes []byte) (*cb.ChannelHeader, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChaincodeProposalWithTxIDNonceAndTransient ¶
func CreateChaincodeProposalWithTxIDNonceAndTransient(txid string, typ common.HeaderType, chainID string, cis *peer.ChaincodeInvocationSpec, nonce, creator []byte, transientMap map[string][]byte) (*peer.Proposal, string, error)
CreateChaincodeProposalWithTxIDNonceAndTransient creates a proposal from given input
func ExtractEnvelope ¶
ExtractEnvelope retrieves the requested envelope from a given block and unmarshals it
func ExtractEnvelopeOrPanic ¶
ExtractEnvelopeOrPanic retrieves the requested envelope from a given block and unmarshals it -- it panics if either of these operations fail
func ExtractPayload ¶
ExtractPayload retrieves the payload of a given envelope and unmarshals it.
func ExtractPayloadOrPanic ¶
ExtractPayloadOrPanic retrieves the payload of a given envelope and unmarshals it -- it panics if either of these operations fail
func GetBytesChaincodeActionPayload ¶
func GetBytesChaincodeActionPayload(cap *peer.ChaincodeActionPayload) ([]byte, error)
GetBytesChaincodeActionPayload get the bytes of ChaincodeActionPayload from the message
func GetBytesChaincodeEvent ¶
func GetBytesChaincodeEvent(event *peer.ChaincodeEvent) ([]byte, error)
GetBytesChaincodeEvent gets the bytes of ChaincodeEvent
func GetBytesChaincodeProposalPayload ¶
func GetBytesChaincodeProposalPayload(cpp *peer.ChaincodeProposalPayload) ([]byte, error)
GetBytesChaincodeProposalPayload gets the chaincode proposal payload
func GetBytesEnvelope ¶
GetBytesEnvelope get the bytes of Envelope from the message
func GetBytesPayload ¶
GetBytesPayload get the bytes of Payload from the message
func GetBytesProposal ¶
GetBytesProposal returns the bytes of a proposal message
func GetBytesProposalPayloadForTx ¶
func GetBytesProposalPayloadForTx(payload *peer.ChaincodeProposalPayload, visibility []byte) ([]byte, error)
GetBytesProposalPayloadForTx takes a ChaincodeProposalPayload and returns its serialized version according to the visibility field
func GetBytesProposalResponsePayload ¶
func GetBytesProposalResponsePayload(hash []byte, response *peer.Response, result []byte, event []byte, ccid *peer.ChaincodeID) ([]byte, error)
GetBytesProposalResponsePayload gets proposal response payload
func GetBytesTransaction ¶
func GetBytesTransaction(tx *peer.Transaction) ([]byte, error)
GetBytesTransaction get the bytes of Transaction from the message
func GetChaincodeAction ¶
func GetChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
GetChaincodeAction gets the ChaincodeAction given chaicnode action bytes
func GetChaincodeActionPayload ¶
func GetChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error)
GetChaincodeActionPayload Get ChaincodeActionPayload from bytes
func GetChaincodeEvents ¶
func GetChaincodeEvents(eBytes []byte) (*peer.ChaincodeEvent, error)
GetChaincodeEvents gets the ChaincodeEvents given chaincode event bytes
func GetChaincodeHeaderExtension ¶
func GetChaincodeHeaderExtension(hdr *common.Header) (*peer.ChaincodeHeaderExtension, error)
GetChaincodeHeaderExtension get chaincode header extension given header
func GetChaincodeProposalPayload ¶
func GetChaincodeProposalPayload(bytes []byte) (*peer.ChaincodeProposalPayload, error)
GetChaincodeProposalPayload Get ChaincodeProposalPayload from bytes
func GetEnvelopeFromBlock ¶
GetEnvelopeFromBlock gets an envelope from a block's Data field.
func GetPayload ¶
GetPayload Get Payload from Envelope message
func GetPayloads ¶
func GetPayloads(txActions *peer.TransactionAction) (*peer.ChaincodeActionPayload, *peer.ChaincodeAction, error)
GetPayloads gets the underlying payload objects in a TransactionAction
func GetProposalResponsePayload ¶
func GetProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error)
GetProposalResponsePayload gets the proposal response payload
func GetSignatureHeader ¶
func GetSignatureHeader(bytes []byte) (*common.SignatureHeader, error)
GetSignatureHeader Get SignatureHeader from bytes
func GetTransaction ¶
func GetTransaction(txBytes []byte) (*peer.Transaction, error)
GetTransaction Get Transaction from bytes
func MakeChannelHeader ¶
func MakeChannelHeader(headerType cb.HeaderType, version int32, chainID string, epoch uint64) *cb.ChannelHeader
MakeChannelHeader creates a ChannelHeader.
func MakePayloadHeader ¶
func MakePayloadHeader(ch *cb.ChannelHeader, sh *cb.SignatureHeader) *cb.Header
MakePayloadHeader creates a Payload Header.
func MarshalOrPanic ¶
MarshalOrPanic serializes a protobuf message and panics if this operation fails
func UnmarshalChannelHeader ¶
func UnmarshalChannelHeader(bytes []byte) (*cb.ChannelHeader, error)
UnmarshalChannelHeader returns a ChannelHeader from bytes
Types ¶
This section is empty.