package
1.2.0-rc1
Repository: https://github.com/sinochem-tech/fabric.git
Documentation: pkg.go.dev

# Functions

ChannelHeader returns the *cb.ChannelHeader for a given *cb.Envelope.
ChannelID returns the Channel ID for a given *cb.Envelope.
CheckProposalTxID checks that txid is equal to the Hash computed over the concatenation of nonce and creator.
ComputeProposalBinding computes the binding of a proposal.
ComputeProposalTxID computes TxID as the Hash computed over the concatenation of nonce and creator.
CopyBlockMetadata copies metadata from one block into another.
CreateChaincodeProposal creates a proposal from given input.
CreateChaincodeProposalWithTransient creates a proposal from given input It returns the proposal and the transaction id associated to the proposal.
CreateChaincodeProposalWithTxIDAndTransient creates a proposal from given input It returns the proposal and the transaction id associated to the proposal.
CreateChaincodeProposalWithTxIDNonceAndTransient creates a proposal from given input.
CreateDeployProposalFromCDS returns a deploy proposal given a serialized identity and a ChaincodeDeploymentSpec.
CreateGetChaincodesProposal returns a GETCHAINCODES proposal given a serialized identity.
CreateGetChaincodesProposal returns a GETINSTALLEDCHAINCODES proposal given a serialized identity.
CreateInstallProposalFromCDS returns a install proposal given a serialized identity and a ChaincodeDeploymentSpec.
CreateNonce generates a nonce using the common/crypto package.
CreateNonceOrPanic generates a nonce using the common/crypto package and panics if this operation fails.
CreateProposalFromCIS returns a proposal given a serialized identity and a ChaincodeInvocationSpec.
CreateProposalFromCIS returns a proposal given a serialized identity and a ChaincodeInvocationSpec.
CreateProposalResponse creates a proposal response.
CreateProposalResponseFailure creates a proposal response for cases where endorsement proposal fails either due to a endorsement failure or a chaincode failure (chaincode response status >= shim.ERRORTHRESHOLD).
CreateSignedEnvelope creates a signed envelope of the desired type, with marshaled dataMsg and signs it.
CreateSignedEnvelopeWithTLSBinding creates a signed envelope of the desired type, with marshaled dataMsg and signs it.
CreateSignedTx assembles an Envelope message from proposal, endorsements, and a signer.
CreateUpgradeProposalFromCDS returns a upgrade proposal given a serialized identity and a ChaincodeDeploymentSpec.
ExtractEnvelope retrieves the requested envelope from a given block and unmarshals it.
ExtractEnvelopeOrPanic retrieves the requested envelope from a given block and unmarshals it -- it panics if either of these operation fail.
ExtractPayload retrieves the payload of a given envelope and unmarshals it.
ExtractPayloadOrPanic retrieves the payload of a given envelope and unmarshals it -- it panics if either of these operations fail.
GetActionFromEnvelope extracts a ChaincodeAction message from a serialized Envelope.
GetBlockFromBlockBytes marshals the bytes into Block.
GetBytesChaincodeActionPayload get the bytes of ChaincodeActionPayload from the message.
GetBytesChaincodeEvent gets the bytes of ChaincodeEvent.
GetBytesChaincodeProposalPayload gets the chaincode proposal payload.
GetBytesEnvelope get the bytes of Envelope from the message.
GetBytesHeader get the bytes of Header from the message.
GetBytesPayload get the bytes of Payload from the message.
GetBytesProposal returns the bytes of a proposal message.
GetBytesProposalPayloadForTx takes a ChaincodeProposalPayload and returns its serialized version according to the visibility field.
GetBytesProposalResponse gets proposal bytes response.
GetBytesProposalResponsePayload gets proposal response payload.
GetBytesResponse gets the bytes of Response.
GetBytesSignatureHeader get the bytes of SignatureHeader from the message.
GetBytesTransaction get the bytes of Transaction from the message.
GetChaincodeAction gets the ChaincodeAction given chaicnode action bytes.
GetChaincodeActionPayload Get ChaincodeActionPayload from bytes.
GetChaincodeDeploymentSpec returns a ChaincodeDeploymentSpec given args.
GetChaincodeEvents gets the ChaincodeEvents given chaincode event bytes.
GetChaincodeHeaderExtension get chaincode header extension given header.
GetChaincodeInvocationSpec get the ChaincodeInvocationSpec from the proposal.
GetChaincodeProposalContext returns creator and transient.
GetChaincodeProposalPayload Get ChaincodeProposalPayload from bytes.
GetChainIDFromBlock returns chain ID in the block.
GetChainIDFromBlockBytes returns chain ID given byte array which represents the block.
GetEnvelopeFromBlock gets an envelope from a block's Data field.
GetHeader Get Header from bytes.
GetLastConfigIndexFromBlock retrieves the index of the last config block as encoded in the block metadata.
GetLastConfigIndexFromBlockOrPanic retrieves the index of the last config block as encoded in the block metadata, or panics on error.
GetMetadataFromBlock retrieves metadata at the specified index.
GetMetadataFromBlockOrPanic retrieves metadata at the specified index, or panics on error.
GetNonce returns the nonce used in Proposal.
GetPayload Get Payload from Envelope message.
GetPayloads get's the underlying payload objects in a TransactionAction.
GetProposal returns a Proposal message from its bytes.
GetProposalHash1 gets the proposal hash bytes after sanitizing the chaincode proposal payload according to the rules of visibility.
GetProposalHash2 gets the proposal hash - this version is called by the committer where the visibility policy has already been enforced and so we already get what we have to get in ccPropPayl.
GetProposalResponse given proposal in bytes.
GetProposalResponsePayload gets the proposal response payload.
GetResponse gets the Response given response bytes.
GetSignatureHeader Get SignatureHeader from bytes.
GetSignedEvent returns a signed event given an Event message and a signing identity.
GetSignedProposal returns a signed proposal given a Proposal message and a signing identity.
GetTransaction Get Transaction from bytes.
InitBlockMetadata copies metadata from one block into another.
IsConfigBlock validates whenever given block contains configuration update transaction.
MakeChannelHeader creates a ChannelHeader.
MakePayloadHeader creates a Payload Header.
MakeSignatureHeader creates a SignatureHeader.
Marshal serializes a protobuf message.
MarshalOrPanic serializes a protobuf message and panics if this operation fails.
No description provided by the author
MockSignedEndorserProposalOrPanic creates a SignedProposal with the passed arguments.
NewSignatureHeaderOrPanic returns a signature header and panics on error.
No description provided by the author
SignOrPanic signs a message and panics on error.
UnmarshalBlock unmarshals bytes to an Block structure.
UnmarshalBlockOrPanic unmarshals bytes to an Block structure or panics on error.
UnmarshalChaincodeID returns a ChaincodeID from bytes.
UnmarshalChannelHeader returns a ChannelHeader from bytes.
UnmarshalChannelHeaderOrPanic unmarshals bytes to a ChannelHeader or panics on error.
UnmarshalEnvelope unmarshals bytes to an Envelope structure.
UnmarshalEnvelopeOfType unmarshals an envelope of the specified type, including the unmarshaling the payload data.
UnmarshalEnvelopeOfTypes unmarshals an envelope of the one of the specified types, including the unmarshaling the payload data.
UnmarshalEnvelopeOrPanic unmarshals bytes to an Envelope structure or panics on error.
UnmarshalPayload unmarshals bytes to a Payload structure.
UnmarshalPayloadOrPanic unmarshals bytes to a Payload structure or panics on error.