Versions in this module Expand all Collapse all v0 v0.0.2 Jan 12, 2024 Changes in this version + func UnmarshalTransactionActionOrPanic(bytes []byte) *peer.TransactionAction v0.0.1 Dec 21, 2023 Changes in this version + func BlockDataHash(b *common.BlockData) ([]byte, error) + func BlockHeaderBytes(b *common.BlockHeader) []byte + func BlockHeaderHash(b *common.BlockHeader) []byte + func ChannelHeader(env *common.Envelope) (*common.ChannelHeader, error) + func ChannelID(env *common.Envelope) (string, error) + func CheckTxID(txid string, nonce, creator []byte) error + func ComputeBlockDataHash(b *common.BlockData) []byte + func ComputeTxID(nonce, creator []byte) string + func CopyBlockMetadata(src *common.Block, dst *common.Block) + func CreateChaincodeProposal(typ common.HeaderType, channelID string, cis *peer.ChaincodeInvocationSpec, ...) (*peer.Proposal, string, error) + func CreateChaincodeProposalWithTransient(typ common.HeaderType, channelID string, cis *peer.ChaincodeInvocationSpec, ...) (*peer.Proposal, string, error) + func CreateChaincodeProposalWithTxIDAndTransient(typ common.HeaderType, channelID string, cis *peer.ChaincodeInvocationSpec, ...) (*peer.Proposal, string, error) + func CreateChaincodeProposalWithTxIDNonceAndTransient(txid string, typ common.HeaderType, channelID string, ...) (*peer.Proposal, string, error) + func CreateDeployProposalFromCDS(channelID string, cds *peer.ChaincodeDeploymentSpec, creator []byte, ...) (*peer.Proposal, string, error) + func CreateGetChaincodesProposal(channelID 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, channelID string, cis *peer.ChaincodeInvocationSpec, ...) (*peer.Proposal, string, error) + func CreateProposalFromCISAndTxid(txid string, typ common.HeaderType, channelID 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 Signer, ...) (*common.Envelope, error) + func CreateSignedEnvelopeWithTLSBinding(txType common.HeaderType, channelID string, signer Signer, ...) (*common.Envelope, error) + func CreateSignedTx(proposal *peer.Proposal, signer Signer, resps ...*peer.ProposalResponse) (*common.Envelope, error) + func CreateUpgradeProposalFromCDS(channelID string, cds *peer.ChaincodeDeploymentSpec, creator []byte, ...) (*peer.Proposal, string, error) + func EnvelopeToConfigUpdate(configtx *common.Envelope) (*common.ConfigUpdateEnvelope, error) + func ExtractEnvelope(block *common.Block, index int) (*common.Envelope, error) + func ExtractEnvelopeOrPanic(block *common.Block, index int) *common.Envelope + func GetActionFromEnvelope(envBytes []byte) (*peer.ChaincodeAction, error) + func GetActionFromEnvelopeMsg(env *common.Envelope) (*peer.ChaincodeAction, 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 GetBytesProposalPayloadForTx(payload *peer.ChaincodeProposalPayload) ([]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 GetChannelIDFromBlock(block *common.Block) (string, error) + func GetChannelIDFromBlockBytes(bytes []byte) (string, error) + func GetConsenterMetadataFromBlock(block *common.Block) (*common.Metadata, error) + func GetEnvelopeFromBlock(data []byte) (*common.Envelope, error) + func GetLastConfigIndexFromBlock(block *common.Block) (uint64, error) + func GetLastConfigIndexFromBlockOrPanic(block *common.Block) uint64 + func GetMetadataFromBlock(block *common.Block, index common.BlockMetadataIndex) (*common.Metadata, error) + func GetMetadataFromBlockOrPanic(block *common.Block, index common.BlockMetadataIndex) *common.Metadata + func GetOrComputeTxIDFromEnvelope(txEnvelopBytes []byte) (string, error) + func GetPayloads(txActions *peer.TransactionAction) (*peer.ChaincodeActionPayload, *peer.ChaincodeAction, error) + func GetProposalHash1(header *common.Header, ccPropPayl []byte) ([]byte, error) + func GetProposalHash2(header *common.Header, ccPropPayl []byte) ([]byte, error) + func GetSignedProposal(prop *peer.Proposal, signer Signer) (*peer.SignedProposal, error) + func HasConfigTx(blockdata *common.BlockData) bool + func InitBlockMetadata(block *common.Block) + func InvokedChaincodeName(proposalBytes []byte) (string, error) + func IsConfigBlock(block *common.Block) bool + func IsConfigTransaction(envelope *common.Envelope) bool + func LogMessageForSerializedIdentities(signedData []*SignedData) (logMsg string) + func LogMessageForSerializedIdentity(serializedIdentity []byte) string + func MakeChannelHeader(headerType common.HeaderType, version int32, chainID string, epoch uint64) *common.ChannelHeader + func MakePayloadHeader(ch *common.ChannelHeader, sh *common.SignatureHeader) *common.Header + func MakeSignatureHeader(serializedCreatorCertChain []byte, nonce []byte) *common.SignatureHeader + func Marshal(pb proto.Message) ([]byte, error) + func MarshalOrPanic(pb proto.Message) []byte + func MockSignedEndorserProposal2OrPanic(channelID string, cs *peer.ChaincodeSpec, signer Signer) (*peer.SignedProposal, *peer.Proposal) + func MockSignedEndorserProposalOrPanic(channelID string, cs *peer.ChaincodeSpec, creator, signature []byte) (*peer.SignedProposal, *peer.Proposal) + func NewBlock(seqNum uint64, previousHash []byte) *common.Block + func NewConfigGroup() *common.ConfigGroup + func NewSignatureHeader(id Signer) (*common.SignatureHeader, error) + func NewSignatureHeaderOrPanic(id Signer) *common.SignatureHeader + func SetTxID(channelHeader *common.ChannelHeader, signatureHeader *common.SignatureHeader) + func SignOrPanic(signer Signer, msg []byte) []byte + func UnmarshalBlock(encoded []byte) (*common.Block, error) + func UnmarshalBlockOrPanic(encoded []byte) *common.Block + func UnmarshalChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error) + func UnmarshalChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error) + func UnmarshalChaincodeDeploymentSpec(code []byte) (*peer.ChaincodeDeploymentSpec, error) + func UnmarshalChaincodeEvents(eBytes []byte) (*peer.ChaincodeEvent, error) + func UnmarshalChaincodeHeaderExtension(hdrExtension []byte) (*peer.ChaincodeHeaderExtension, error) + func UnmarshalChaincodeID(bytes []byte) (*peer.ChaincodeID, error) + func UnmarshalChaincodeInvocationSpec(encoded []byte) (*peer.ChaincodeInvocationSpec, error) + func UnmarshalChaincodeProposalPayload(bytes []byte) (*peer.ChaincodeProposalPayload, error) + func UnmarshalChannelHeader(bytes []byte) (*common.ChannelHeader, error) + func UnmarshalChannelHeaderOrPanic(bytes []byte) *common.ChannelHeader + func UnmarshalConfigEnvelope(bytes []byte) (*common.ConfigEnvelope, error) + func UnmarshalEnvelope(encoded []byte) (*common.Envelope, error) + func UnmarshalEnvelopeOfType(envelope *common.Envelope, headerType common.HeaderType, message proto.Message) (*common.ChannelHeader, error) + func UnmarshalEnvelopeOrPanic(encoded []byte) *common.Envelope + func UnmarshalHashedRWSet(bytes []byte) (*kvrwset.HashedRWSet, error) + func UnmarshalHeader(bytes []byte) (*common.Header, error) + func UnmarshalIdentifierHeader(bytes []byte) (*common.IdentifierHeader, error) + func UnmarshalKVRWSet(bytes []byte) (*kvrwset.KVRWSet, error) + func UnmarshalPayload(encoded []byte) (*common.Payload, error) + func UnmarshalPayloadOrPanic(encoded []byte) *common.Payload + func UnmarshalProposal(propBytes []byte) (*peer.Proposal, error) + func UnmarshalProposalResponse(prBytes []byte) (*peer.ProposalResponse, error) + func UnmarshalProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error) + func UnmarshalResponse(resBytes []byte) (*peer.Response, error) + func UnmarshalSerializedIdentity(bytes []byte) (*msp.SerializedIdentity, error) + func UnmarshalSignatureHeader(bytes []byte) (*common.SignatureHeader, error) + func UnmarshalSignatureHeaderOrPanic(bytes []byte) *common.SignatureHeader + func UnmarshalSignaturePolicy(bytes []byte) (*common.SignaturePolicyEnvelope, error) + func UnmarshalTransaction(txBytes []byte) (*peer.Transaction, error) + func UnmarshalTxReadWriteSet(bytes []byte) (*rwset.TxReadWriteSet, error) + func VerifyTransactionsAreWellFormed(bd *common.BlockData) error + type BlockVerifierFunc func(header *common.BlockHeader, metadata *common.BlockMetadata) error + func BlockSignatureVerifier(bftEnabled bool, consenters []*common.Consenter, policy policy) BlockVerifierFunc + type SignedData struct + Data []byte + Identity []byte + Signature []byte + func ConfigUpdateEnvelopeAsSignedData(ce *common.ConfigUpdateEnvelope) ([]*SignedData, error) + func EnvelopeAsSignedData(env *common.Envelope) ([]*SignedData, error) + type Signer interface + Serialize func() ([]byte, error) + Sign func(msg []byte) ([]byte, error) + type VerifierBuilder func(block *common.Block) BlockVerifierFunc