Versions in this module Expand all Collapse all v1 v1.4.9 Jul 22, 2021 Changes in this version + func ChannelHeader(env *cb.Envelope) (*cb.ChannelHeader, error) + func ChannelID(env *cb.Envelope) (string, error) + func CheckTxID(txid string, nonce, creator []byte) error + func ComputeProposalBinding(proposal *peer.Proposal) ([]byte, error) + func ComputeTxID(nonce, creator []byte) (string, error) + func CopyBlockMetadata(src *cb.Block, dst *cb.Block) + 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 CreateChaincodeProposalWithTxIDAndTransient(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 CreateDeployProposalFromCDS(chainID string, cds *peer.ChaincodeDeploymentSpec, creator []byte, ...) (*peer.Proposal, string, error) + func CreateGetChaincodesProposal(chainID string, creator []byte) (*peer.Proposal, string, error) + func CreateGetInstalledChaincodesProposal(creator []byte) (*peer.Proposal, string, error) + func CreateInstallProposalFromCDS(ccpack proto.Message, creator []byte) (*peer.Proposal, string, error) + func CreateNonce() ([]byte, error) + func CreateNonceOrPanic() []byte + func CreateProposalFromCIS(typ common.HeaderType, chainID string, cis *peer.ChaincodeInvocationSpec, ...) (*peer.Proposal, string, error) + func CreateProposalFromCISAndTxid(txid string, typ common.HeaderType, chainID string, ...) (*peer.Proposal, string, error) + func CreateProposalResponse(hdrbytes []byte, payl []byte, response *peer.Response, results []byte, ...) (*peer.ProposalResponse, error) + func CreateProposalResponseFailure(hdrbytes []byte, payl []byte, response *peer.Response, results []byte, ...) (*peer.ProposalResponse, error) + func CreateSignedEnvelope(txType common.HeaderType, channelID string, signer crypto.LocalSigner, ...) (*common.Envelope, error) + func CreateSignedEnvelopeWithTLSBinding(txType common.HeaderType, channelID string, signer crypto.LocalSigner, ...) (*common.Envelope, error) + func CreateSignedTx(proposal *peer.Proposal, signer msp.SigningIdentity, ...) (*common.Envelope, error) + func CreateUpgradeProposalFromCDS(chainID string, cds *peer.ChaincodeDeploymentSpec, creator []byte, ...) (*peer.Proposal, string, error) + func EnvelopeToConfigUpdate(configtx *cb.Envelope) (*cb.ConfigUpdateEnvelope, 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 GetActionFromEnvelope(envBytes []byte) (*peer.ChaincodeAction, error) + func GetActionFromEnvelopeMsg(env *common.Envelope) (*peer.ChaincodeAction, error) + func GetBlockFromBlockBytes(blockBytes []byte) (*cb.Block, error) + 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 GetBytesHeader(hdr *common.Header) ([]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 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 GetBytesTransaction(tx *peer.Transaction) ([]byte, error) + func GetChainIDFromBlock(block *cb.Block) (string, error) + func GetChainIDFromBlockBytes(bytes []byte) (string, error) + func GetChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error) + func GetChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error) + func GetChaincodeDeploymentSpec(code []byte, pr *platforms.Registry) (*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 GetEnvelopeFromBlock(data []byte) (*common.Envelope, error) + func GetHeader(bytes []byte) (*common.Header, error) + func GetLastConfigIndexFromBlock(block *cb.Block) (uint64, error) + func GetLastConfigIndexFromBlockOrPanic(block *cb.Block) uint64 + func GetMetadataFromBlock(block *cb.Block, index cb.BlockMetadataIndex) (*cb.Metadata, error) + func GetMetadataFromBlockOrPanic(block *cb.Block, index cb.BlockMetadataIndex) *cb.Metadata + func GetNonce(prop *peer.Proposal) ([]byte, error) + func GetOrComputeTxIDFromEnvelope(txEnvelopBytes []byte) (string, error) + func GetPayload(e *common.Envelope) (*common.Payload, error) + func GetPayloads(txActions *peer.TransactionAction) (*peer.ChaincodeActionPayload, *peer.ChaincodeAction, error) + func GetProposal(propBytes []byte) (*peer.Proposal, error) + func GetProposalHash1(header *common.Header, ccPropPayl []byte, visibility []byte) ([]byte, error) + func GetProposalHash2(header *common.Header, ccPropPayl []byte) ([]byte, 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 GetSignedProposal(prop *peer.Proposal, signer msp.SigningIdentity) (*peer.SignedProposal, error) + func GetTransaction(txBytes []byte) (*peer.Transaction, error) + func InitBlockMetadata(block *cb.Block) + func IsConfigBlock(block *cb.Block) bool + func MakeChannelHeader(headerType cb.HeaderType, version int32, chainID string, epoch uint64) *cb.ChannelHeader + func MakePayloadHeader(ch *cb.ChannelHeader, sh *cb.SignatureHeader) *cb.Header + func MakeSignatureHeader(serializedCreatorCertChain []byte, nonce []byte) *cb.SignatureHeader + func Marshal(pb proto.Message) ([]byte, error) + func MarshalOrPanic(pb proto.Message) []byte + func MockSignedEndorserProposal2OrPanic(chainID string, cs *peer.ChaincodeSpec, signer msp.SigningIdentity) (*peer.SignedProposal, *peer.Proposal) + func MockSignedEndorserProposalOrPanic(chainID string, cs *peer.ChaincodeSpec, creator, signature []byte) (*peer.SignedProposal, *peer.Proposal) + func NewSignatureHeaderOrPanic(signer crypto.LocalSigner) *cb.SignatureHeader + func SetTxID(channelHeader *cb.ChannelHeader, signatureHeader *cb.SignatureHeader) error + func SignOrPanic(signer crypto.LocalSigner, msg []byte) []byte + func UnmarshalBlock(encoded []byte) (*cb.Block, error) + func UnmarshalBlockOrPanic(encoded []byte) *cb.Block + func UnmarshalChaincodeDeploymentSpec(cdsBytes []byte) (*peer.ChaincodeDeploymentSpec, error) + func UnmarshalChaincodeID(bytes []byte) (*pb.ChaincodeID, error) + func UnmarshalChannelHeader(bytes []byte) (*cb.ChannelHeader, error) + func UnmarshalChannelHeaderOrPanic(bytes []byte) *cb.ChannelHeader + func UnmarshalEnvelope(encoded []byte) (*cb.Envelope, error) + func UnmarshalEnvelopeOfType(envelope *cb.Envelope, headerType cb.HeaderType, message proto.Message) (*cb.ChannelHeader, error) + func UnmarshalEnvelopeOrPanic(encoded []byte) *cb.Envelope + func UnmarshalPayload(encoded []byte) (*cb.Payload, error) + func UnmarshalPayloadOrPanic(encoded []byte) *cb.Payload + func UnmarshalSignatureHeader(bytes []byte) (*cb.SignatureHeader, error) + func UnmarshalSignatureHeaderOrPanic(bytes []byte) *cb.SignatureHeader