Documentation ¶
Index ¶
- func BlockDataHash(b *cb.BlockData) []byte
- func BlockHeaderBytes(b *cb.BlockHeader) []byte
- func BlockHeaderHash(b *cb.BlockHeader) []byte
- func ChannelHeader(env *cb.Envelope) (*cb.ChannelHeader, error)
- func ChannelID(env *cb.Envelope) (string, error)
- func CheckTxID(txid string, nonce, creator []byte) error
- func ComputeTxID(nonce, creator []byte) string
- func CopyBlockMetadata(src *cb.Block, dst *cb.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 identity.SignerSerializer, ...) (*common.Envelope, error)
- func CreateSignedEnvelopeWithTLSBinding(txType common.HeaderType, channelID string, signer identity.SignerSerializer, ...) (*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 *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 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 GetChainIDFromBlock(block *cb.Block) (string, error)
- func GetChainIDFromBlockBytes(bytes []byte) (string, error)
- func GetConsenterMetadataFromBlock(block *cb.Block) (*cb.Metadata, error)
- func GetEnvelopeFromBlock(data []byte) (*common.Envelope, 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 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 identity.SignerSerializer) (*peer.SignedProposal, 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(channelID string, cs *peer.ChaincodeSpec, signer identity.SignerSerializer) (*peer.SignedProposal, *peer.Proposal)
- func MockSignedEndorserProposalOrPanic(channelID string, cs *peer.ChaincodeSpec, creator, signature []byte) (*peer.SignedProposal, *peer.Proposal)
- func NewBlock(seqNum uint64, previousHash []byte) *cb.Block
- func NewConfigGroup() *common.ConfigGroup
- func NewSignatureHeader(id identity.Serializer) (*cb.SignatureHeader, error)
- func NewSignatureHeaderOrPanic(id identity.Serializer) *cb.SignatureHeader
- func SetTxID(channelHeader *cb.ChannelHeader, signatureHeader *cb.SignatureHeader)
- func SignOrPanic(signer identity.Signer, msg []byte) []byte
- func UnmarshalBlock(encoded []byte) (*cb.Block, error)
- func UnmarshalBlockOrPanic(encoded []byte) *cb.Block
- func UnmarshalChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
- func UnmarshalChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error)
- func UnmarshalChaincodeDeploymentSpec(cdsBytes []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) (*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 UnmarshalHeader(bytes []byte) (*common.Header, error)
- func UnmarshalPayload(encoded []byte) (*cb.Payload, error)
- func UnmarshalPayloadOrPanic(encoded []byte) *cb.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) (*cb.SignatureHeader, error)
- func UnmarshalSignatureHeaderOrPanic(bytes []byte) *cb.SignatureHeader
- func UnmarshalTransaction(txBytes []byte) (*peer.Transaction, error)
- type SignedData
- type Signer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockDataHash ¶
func BlockHeaderBytes ¶
func BlockHeaderBytes(b *cb.BlockHeader) []byte
func BlockHeaderHash ¶
func BlockHeaderHash(b *cb.BlockHeader) []byte
func ChannelHeader ¶
func ChannelHeader(env *cb.Envelope) (*cb.ChannelHeader, error)
func ComputeTxID ¶
func CreateChaincodeProposal ¶
func CreateChaincodeProposal(typ common.HeaderType, channelID string, cis *peer.ChaincodeInvocationSpec, creator []byte) (*peer.Proposal, string, error)
func CreateNonce ¶
func CreateNonceOrPanic ¶
func CreateNonceOrPanic() []byte
func CreateProposalFromCIS ¶
func CreateProposalFromCIS(typ common.HeaderType, channelID string, cis *peer.ChaincodeInvocationSpec, creator []byte) (*peer.Proposal, string, error)
func CreateProposalResponse ¶
func CreateProposalResponse( hdrbytes []byte, payl []byte, response *peer.Response, results []byte, events []byte, ccid *peer.ChaincodeID, signingEndorser identity.SignerSerializer, ) (*peer.ProposalResponse, error)
func CreateSignedEnvelope ¶
func CreateSignedTx ¶
func EnvelopeToConfigUpdate ¶
func EnvelopeToConfigUpdate(configtx *cb.Envelope) (*cb.ConfigUpdateEnvelope, error)
func GetActionFromEnvelope ¶
func GetActionFromEnvelope(envBytes []byte) (*peer.ChaincodeAction, error)
func GetActionFromEnvelopeMsg ¶
func GetActionFromEnvelopeMsg(env *common.Envelope) (*peer.ChaincodeAction, error)
func GetBytesChaincodeActionPayload ¶
func GetBytesChaincodeActionPayload(cap *peer.ChaincodeActionPayload) ([]byte, error)
func GetBytesChaincodeEvent ¶
func GetBytesChaincodeEvent(event *peer.ChaincodeEvent) ([]byte, error)
func GetBytesChaincodeProposalPayload ¶
func GetBytesChaincodeProposalPayload(cpp *peer.ChaincodeProposalPayload) ([]byte, error)
func GetBytesProposalPayloadForTx ¶
func GetBytesProposalPayloadForTx( payload *peer.ChaincodeProposalPayload, ) ([]byte, error)
func GetBytesProposalResponse ¶
func GetBytesProposalResponse(pr *peer.ProposalResponse) ([]byte, error)
func GetBytesSignatureHeader ¶
func GetBytesSignatureHeader(hdr *common.SignatureHeader) ([]byte, error)
func GetBytesTransaction ¶
func GetBytesTransaction(tx *peer.Transaction) ([]byte, error)
func GetMetadataFromBlock ¶
func GetPayloads ¶
func GetPayloads(txActions *peer.TransactionAction) (*peer.ChaincodeActionPayload, *peer.ChaincodeAction, error)
func GetProposalHash1 ¶
func GetProposalHash2 ¶
func GetSignedProposal ¶
func GetSignedProposal(prop *peer.Proposal, signer identity.SignerSerializer) (*peer.SignedProposal, error)
func InitBlockMetadata ¶
func IsConfigBlock ¶
func MakeChannelHeader ¶
func MakeChannelHeader(headerType cb.HeaderType, version int32, chainID string, epoch uint64) *cb.ChannelHeader
func MakePayloadHeader ¶
func MakePayloadHeader(ch *cb.ChannelHeader, sh *cb.SignatureHeader) *cb.Header
func MakeSignatureHeader ¶
func MakeSignatureHeader(serializedCreatorCertChain []byte, nonce []byte) *cb.SignatureHeader
func MarshalOrPanic ¶
func MockSignedEndorserProposal2OrPanic ¶
func MockSignedEndorserProposal2OrPanic( channelID string, cs *peer.ChaincodeSpec, signer identity.SignerSerializer, ) (*peer.SignedProposal, *peer.Proposal)
func MockSignedEndorserProposalOrPanic ¶
func MockSignedEndorserProposalOrPanic( channelID string, cs *peer.ChaincodeSpec, creator, signature []byte, ) (*peer.SignedProposal, *peer.Proposal)
func NewConfigGroup ¶
func NewConfigGroup() *common.ConfigGroup
func NewSignatureHeader ¶
func NewSignatureHeader(id identity.Serializer) (*cb.SignatureHeader, error)
func NewSignatureHeaderOrPanic ¶
func NewSignatureHeaderOrPanic(id identity.Serializer) *cb.SignatureHeader
func SetTxID ¶
func SetTxID(channelHeader *cb.ChannelHeader, signatureHeader *cb.SignatureHeader)
func UnmarshalBlockOrPanic ¶
func UnmarshalChaincodeAction ¶
func UnmarshalChaincodeAction(caBytes []byte) (*peer.ChaincodeAction, error)
func UnmarshalChaincodeActionPayload ¶
func UnmarshalChaincodeActionPayload(capBytes []byte) (*peer.ChaincodeActionPayload, error)
func UnmarshalChaincodeDeploymentSpec ¶
func UnmarshalChaincodeDeploymentSpec(cdsBytes []byte) (*peer.ChaincodeDeploymentSpec, error)
func UnmarshalChaincodeEvents ¶
func UnmarshalChaincodeEvents(eBytes []byte) (*peer.ChaincodeEvent, error)
func UnmarshalChaincodeHeaderExtension ¶
func UnmarshalChaincodeHeaderExtension(hdrExtension []byte) (*peer.ChaincodeHeaderExtension, error)
func UnmarshalChaincodeID ¶
func UnmarshalChaincodeID(bytes []byte) (*peer.ChaincodeID, error)
func UnmarshalChaincodeInvocationSpec ¶
func UnmarshalChaincodeInvocationSpec(encoded []byte) (*peer.ChaincodeInvocationSpec, error)
func UnmarshalChaincodeProposalPayload ¶
func UnmarshalChaincodeProposalPayload(bytes []byte) (*peer.ChaincodeProposalPayload, error)
func UnmarshalChannelHeader ¶
func UnmarshalChannelHeader(bytes []byte) (*cb.ChannelHeader, error)
func UnmarshalChannelHeaderOrPanic ¶
func UnmarshalChannelHeaderOrPanic(bytes []byte) *cb.ChannelHeader
func UnmarshalEnvelopeOfType ¶
func UnmarshalEnvelopeOfType(envelope *cb.Envelope, headerType cb.HeaderType, message proto.Message) (*cb.ChannelHeader, error)
func UnmarshalPayloadOrPanic ¶
func UnmarshalProposalResponse ¶
func UnmarshalProposalResponse(prBytes []byte) (*peer.ProposalResponse, error)
func UnmarshalProposalResponsePayload ¶
func UnmarshalProposalResponsePayload(prpBytes []byte) (*peer.ProposalResponsePayload, error)
func UnmarshalSerializedIdentity ¶
func UnmarshalSerializedIdentity(bytes []byte) (*msp.SerializedIdentity, error)
func UnmarshalSignatureHeader ¶
func UnmarshalSignatureHeader(bytes []byte) (*cb.SignatureHeader, error)
func UnmarshalSignatureHeaderOrPanic ¶
func UnmarshalSignatureHeaderOrPanic(bytes []byte) *cb.SignatureHeader
func UnmarshalTransaction ¶
func UnmarshalTransaction(txBytes []byte) (*peer.Transaction, error)
Types ¶
type SignedData ¶
func ConfigUpdateEnvelopeAsSignedData ¶
func ConfigUpdateEnvelopeAsSignedData(ce *common.ConfigUpdateEnvelope) ([]*SignedData, error)
func EnvelopeAsSignedData ¶
func EnvelopeAsSignedData(env *common.Envelope) ([]*SignedData, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.