Documentation
¶
Index ¶
- func CreateEnvelope(channelID string, signer protoutil.Signer, protoMsg proto.Message) (*common.Envelope, string, error)
- func ParseEnvelope(envelope *common.Envelope) (*common.Payload, *common.ChannelHeader, error)
- func UnmarshalTx(data []byte) (*protoblocktx.Tx, error)
- func UnwrapEnvelope(message []byte) ([]byte, *common.ChannelHeader, error)
- func WrapEnvelope(data []byte, header *common.Header) []byte
- type NoOpSigner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEnvelope ¶
func CreateEnvelope( channelID string, signer protoutil.Signer, protoMsg proto.Message, ) (*common.Envelope, string, error)
CreateEnvelope create an envelope with or without a signature and the corresponding header. An unsigned envelope can only be used with a patched fabric orderer. It's output envelope is different from protoutil.CreateSignedEnvelope:
- This method adds TxId to the channel's header
- This method's payload is the given message and not common.Payload
func ParseEnvelope ¶
ParseEnvelope parse the envelope content.
func UnmarshalTx ¶
func UnmarshalTx(data []byte) (*protoblocktx.Tx, error)
UnmarshalTx unmarshals data bytes to protoblocktx.Tx.
func UnwrapEnvelope ¶
func UnwrapEnvelope(message []byte) ([]byte, *common.ChannelHeader, error)
UnwrapEnvelope deserialize an envelope.
Types ¶
type NoOpSigner ¶
type NoOpSigner struct{}
NoOpSigner supports unsigned envelopes.
func (*NoOpSigner) Serialize ¶
func (*NoOpSigner) Serialize() ([]byte, error)
Serialize is an empty implementations of the singer API.
Click to show internal directories.
Click to hide internal directories.