Documentation ¶
Index ¶
- func ComputeProposalTxID(nonce, creator []byte) (string, error)
- func CreateChaincodeProposal(typ common.PtnHeaderType, chainID string, cis *peer.PtnChaincodeInvocationSpec, ...) (*peer.PtnProposal, string, error)
- func CreateChaincodeProposalWithTransient(typ common.PtnHeaderType, chainID string, cis *peer.PtnChaincodeInvocationSpec, ...) (*peer.PtnProposal, string, error)
- func CreateChaincodeProposalWithTxIDNonceAndTransient(txid string, typ common.PtnHeaderType, chainID string, ...) (*peer.PtnProposal, string, error)
- func CreateProposalFromCISAndTxid(txid string, typ common.PtnHeaderType, chainID string, ...) (*peer.PtnProposal, string, error)
- func GetBytesChaincodeEvent(event *peer.PtnChaincodeEvent) ([]byte, error)
- func GetBytesChaincodeProposalPayload(cpp *peer.PtnChaincodeProposalPayload) ([]byte, error)
- func GetBytesHeader(hdr *common.PtnHeader) ([]byte, error)
- func GetBytesProposal(prop *peer.PtnProposal) ([]byte, error)
- func GetBytesProposalResponse(pr *peer.PtnProposalResponse) ([]byte, error)
- func GetBytesProposalResponsePayload(hash []byte, response *peer.PtnResponse, result []byte, event []byte, ...) ([]byte, error)
- func GetBytesResponse(res *peer.PtnResponse) ([]byte, error)
- func GetBytesSignatureHeader(hdr *common.PtnSignatureHeader) ([]byte, error)
- func GetChaincodeAction(caBytes []byte) (*peer.PtnChaincodeAction, error)
- func GetChaincodeDeploymentSpec(code []byte) (*peer.PtnChaincodeDeploymentSpec, error)
- func GetChaincodeEvents(eBytes []byte) (*peer.PtnChaincodeEvent, error)
- func GetChaincodeHeaderExtension(hdr *common.PtnHeader) (*peer.PtnChaincodeHeaderExtension, error)
- func GetChaincodeInvocationSpec(prop *peer.PtnProposal) (*peer.PtnChaincodeInvocationSpec, error)
- func GetChaincodeProposalContext(prop *peer.PtnProposal) ([]byte, map[string][]byte, error)
- func GetChaincodeProposalPayload(bytes []byte) (*peer.PtnChaincodeProposalPayload, error)
- func GetHeader(bytes []byte) (*common.PtnHeader, error)
- func GetNonce(prop *peer.PtnProposal) ([]byte, error)
- func GetPayload(e *common.PtnEnvelope) (*common.PtnPayload, error)
- func GetProposal(propBytes []byte) (*peer.PtnProposal, error)
- func GetProposalResponse(prBytes []byte) (*peer.PtnProposalResponse, error)
- func GetProposalResponsePayload(prpBytes []byte) (*peer.PtnProposalResponsePayload, error)
- func GetResponse(resBytes []byte) (*peer.PtnResponse, error)
- func GetSignatureHeader(bytes []byte) (*common.PtnSignatureHeader, error)
- func Marshal(pb proto.Message) ([]byte, error)
- func MarshalOrPanic(pb proto.Message) []byte
- func UnmarshalChannelHeader(bytes []byte) (*cb.PtnChannelHeader, 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.PtnHeaderType, chainID string, cis *peer.PtnChaincodeInvocationSpec, creator []byte) (*peer.PtnProposal, 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.PtnHeaderType, chainID string, cis *peer.PtnChaincodeInvocationSpec, creator []byte, transientMap map[string][]byte) (*peer.PtnProposal, 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.PtnHeaderType, chainID string, cis *peer.PtnChaincodeInvocationSpec, nonce, creator []byte, transientMap map[string][]byte) (*peer.PtnProposal, string, error)
CreateChaincodeProposalWithTxIDNonceAndTransient creates a proposal from given input
func CreateProposalFromCISAndTxid ¶
func CreateProposalFromCISAndTxid(txid string, typ common.PtnHeaderType, chainID string, cis *peer.PtnChaincodeInvocationSpec, creator []byte) (*peer.PtnProposal, string, error)
CreateProposalFromCIS returns a proposal given a serialized identity and a ChaincodeInvocationSpec
func GetBytesChaincodeEvent ¶
func GetBytesChaincodeEvent(event *peer.PtnChaincodeEvent) ([]byte, error)
GetBytesChaincodeEvent gets the bytes of ChaincodeEvent
func GetBytesChaincodeProposalPayload ¶
func GetBytesChaincodeProposalPayload(cpp *peer.PtnChaincodeProposalPayload) ([]byte, error)
GetBytesChaincodeProposalPayload gets the chaincode proposal payload
func GetBytesHeader ¶
GetBytesHeader get the bytes of Header from the message
func GetBytesProposal ¶
func GetBytesProposal(prop *peer.PtnProposal) ([]byte, error)
GetBytesProposal returns the bytes of a proposal message
func GetBytesProposalResponse ¶
func GetBytesProposalResponse(pr *peer.PtnProposalResponse) ([]byte, error)
GetBytesProposalResponse gets proposal bytes response
func GetBytesProposalResponsePayload ¶
func GetBytesProposalResponsePayload(hash []byte, response *peer.PtnResponse, result []byte, event []byte, ccid *peer.PtnChaincodeID) ([]byte, error)
GetBytesProposalResponsePayload gets proposal response payload
func GetBytesResponse ¶
func GetBytesResponse(res *peer.PtnResponse) ([]byte, error)
GetBytesResponse gets the bytes of Response
func GetBytesSignatureHeader ¶
func GetBytesSignatureHeader(hdr *common.PtnSignatureHeader) ([]byte, error)
GetBytesSignatureHeader get the bytes of SignatureHeader from the message
func GetChaincodeAction ¶
func GetChaincodeAction(caBytes []byte) (*peer.PtnChaincodeAction, error)
GetChaincodeAction gets the ChaincodeAction given chaicnode action bytes
func GetChaincodeDeploymentSpec ¶
func GetChaincodeDeploymentSpec(code []byte) (*peer.PtnChaincodeDeploymentSpec, error)
GetChaincodeDeploymentSpec returns a ChaincodeDeploymentSpec given args
func GetChaincodeEvents ¶
func GetChaincodeEvents(eBytes []byte) (*peer.PtnChaincodeEvent, error)
GetChaincodeEvents gets the ChaincodeEvents given chaincode event bytes
func GetChaincodeHeaderExtension ¶
func GetChaincodeHeaderExtension(hdr *common.PtnHeader) (*peer.PtnChaincodeHeaderExtension, error)
GetChaincodeHeaderExtension get chaincode header extension given header
func GetChaincodeInvocationSpec ¶
func GetChaincodeInvocationSpec(prop *peer.PtnProposal) (*peer.PtnChaincodeInvocationSpec, error)
GetChaincodeInvocationSpec get the ChaincodeInvocationSpec from the proposal
func GetChaincodeProposalContext ¶
GetChaincodeProposalContext returns creator and transient
func GetChaincodeProposalPayload ¶
func GetChaincodeProposalPayload(bytes []byte) (*peer.PtnChaincodeProposalPayload, error)
GetChaincodeProposalPayload Get ChaincodeProposalPayload from bytes
func GetNonce ¶
func GetNonce(prop *peer.PtnProposal) ([]byte, error)
GetNonce returns the nonce used in Proposal
func GetPayload ¶
func GetPayload(e *common.PtnEnvelope) (*common.PtnPayload, error)
GetPayload Get Payload from Envelope message
func GetProposal ¶
func GetProposal(propBytes []byte) (*peer.PtnProposal, error)
GetProposal returns a Proposal message from its bytes
func GetProposalResponse ¶
func GetProposalResponse(prBytes []byte) (*peer.PtnProposalResponse, error)
GetProposalResponse given proposal in bytes
func GetProposalResponsePayload ¶
func GetProposalResponsePayload(prpBytes []byte) (*peer.PtnProposalResponsePayload, error)
GetProposalResponsePayload gets the proposal response payload
func GetResponse ¶
func GetResponse(resBytes []byte) (*peer.PtnResponse, error)
GetResponse gets the Response given response bytes
func GetSignatureHeader ¶
func GetSignatureHeader(bytes []byte) (*common.PtnSignatureHeader, 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.PtnChannelHeader, error)
UnmarshalChannelHeader returns a ChannelHeader from bytes
Types ¶
This section is empty.