Documentation
¶
Index ¶
- func ComputeProposalTxID(nonce, creator []byte) (string, error)
- func CreateChaincodeProposal(typ common.HeaderType, chainID string, cis *peer.ChaincodeInvocationSpec, ...) (*peer.Proposal, string, error)
- func CreateChaincodeProposalWithTransient(typ common.HeaderType, chainID string, cis *peer.ChaincodeInvocationSpec, ...) (*peer.Proposal, string, error)
- func CreateChaincodeProposalWithTxIDNonceAndTransient(txid string, typ common.HeaderType, chainID string, ...) (*peer.Proposal, string, error)
- func CreateProposalFromCISAndTxid(txid string, typ common.HeaderType, chainID string, ...) (*peer.Proposal, string, error)
- func GetBytesChaincodeEvent(event *peer.ChaincodeEvent) ([]byte, error)
- func GetBytesChaincodeProposalPayload(cpp *peer.ChaincodeProposalPayload) ([]byte, error)
- func GetBytesHeader(hdr *common.Header) ([]byte, error)
- func GetBytesProposal(prop *peer.Proposal) ([]byte, error)
- func GetBytesProposalResponse(pr *peer.ProposalResponse) ([]byte, error)
- func GetBytesProposalResponsePayload(hash []byte, response *peer.Response, result []byte, event []byte, ...) ([]byte, error)
- func GetBytesResponse(res *peer.Response) ([]byte, error)
- func GetBytesSignatureHeader(hdr *common.SignatureHeader) ([]byte, error)
- func GetChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
- func GetChaincodeDeploymentSpec(code []byte) (*peer.ChaincodeDeploymentSpec, error)
- func GetChaincodeEvents(eBytes []byte) (*peer.ChaincodeEvent, error)
- func GetChaincodeHeaderExtension(hdr *common.Header) (*peer.ChaincodeHeaderExtension, error)
- func GetChaincodeInvocationSpec(prop *peer.Proposal) (*peer.ChaincodeInvocationSpec, error)
- func GetChaincodeProposalContext(prop *peer.Proposal) ([]byte, map[string][]byte, error)
- func GetChaincodeProposalPayload(bytes []byte) (*peer.ChaincodeProposalPayload, error)
- func GetHeader(bytes []byte) (*common.Header, error)
- func GetNonce(prop *peer.Proposal) ([]byte, error)
- func GetPayload(e *common.Envelope) (*common.Payload, error)
- func GetProposal(propBytes []byte) (*peer.Proposal, error)
- func GetProposalResponse(prBytes []byte) (*peer.ProposalResponse, error)
- func GetProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error)
- func GetResponse(resBytes []byte) (*peer.Response, error)
- func GetSignatureHeader(bytes []byte) (*common.SignatureHeader, error)
- 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 ComputeProposalTxID ¶
ComputeProposalTxID computes TxID as the Hash computed over the concatenation of nonce and creator.
func CreateChaincodeProposal ¶
func CreateChaincodeProposal(typ common.HeaderType, chainID string, cis *peer.ChaincodeInvocationSpec, creator []byte) (*peer.Proposal, string, error)
CreateChaincodeProposal creates a proposal from given input. It returns the proposal and the transaction id associated to the proposal
func CreateChaincodeProposalWithTransient ¶
func CreateChaincodeProposalWithTransient(typ common.HeaderType, chainID string, cis *peer.ChaincodeInvocationSpec, creator []byte, transientMap map[string][]byte) (*peer.Proposal, string, error)
CreateChaincodeProposalWithTransient creates a proposal from given input It returns the proposal and the transaction id associated to the proposal
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 CreateProposalFromCISAndTxid ¶
func CreateProposalFromCISAndTxid(txid string, typ common.HeaderType, chainID string, cis *peer.ChaincodeInvocationSpec, creator []byte) (*peer.Proposal, string, error)
CreateProposalFromCIS returns a proposal given a serialized identity and a ChaincodeInvocationSpec
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 GetBytesHeader ¶
GetBytesHeader get the bytes of Header from the message
func GetBytesProposal ¶
GetBytesProposal returns the bytes of a proposal message
func GetBytesProposalResponse ¶
func GetBytesProposalResponse(pr *peer.ProposalResponse) ([]byte, error)
GetBytesProposalResponse gets proposal bytes response
func GetBytesProposalResponsePayload ¶
func GetBytesProposalResponsePayload(hash []byte, response *peer.Response, result []byte, event []byte, ccid *peer.ChaincodeID) ([]byte, error)
GetBytesProposalResponsePayload gets proposal response payload
func GetBytesResponse ¶
GetBytesResponse gets the bytes of Response
func GetBytesSignatureHeader ¶
func GetBytesSignatureHeader(hdr *common.SignatureHeader) ([]byte, error)
GetBytesSignatureHeader get the bytes of SignatureHeader from the message
func GetChaincodeAction ¶
func GetChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
GetChaincodeAction gets the ChaincodeAction given chaicnode action bytes
func GetChaincodeDeploymentSpec ¶
func GetChaincodeDeploymentSpec(code []byte) (*peer.ChaincodeDeploymentSpec, error)
GetChaincodeDeploymentSpec returns a ChaincodeDeploymentSpec given args
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 GetChaincodeInvocationSpec ¶
func GetChaincodeInvocationSpec(prop *peer.Proposal) (*peer.ChaincodeInvocationSpec, error)
GetChaincodeInvocationSpec get the ChaincodeInvocationSpec from the proposal
func GetChaincodeProposalContext ¶
GetChaincodeProposalContext returns creator and transient
func GetChaincodeProposalPayload ¶
func GetChaincodeProposalPayload(bytes []byte) (*peer.ChaincodeProposalPayload, error)
GetChaincodeProposalPayload Get ChaincodeProposalPayload from bytes
func GetPayload ¶
GetPayload Get Payload from Envelope message
func GetProposal ¶
GetProposal returns a Proposal message from its bytes
func GetProposalResponse ¶
func GetProposalResponse(prBytes []byte) (*peer.ProposalResponse, error)
GetProposalResponse given proposal in bytes
func GetProposalResponsePayload ¶
func GetProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error)
GetProposalResponsePayload gets the proposal response payload
func GetResponse ¶
GetResponse gets the Response given response bytes
func GetSignatureHeader ¶
func GetSignatureHeader(bytes []byte) (*common.SignatureHeader, error)
GetSignatureHeader Get SignatureHeader from bytes
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.