Documentation ¶
Index ¶
- func GetEventFromEnvelope(envelopeData []byte) (*peer.ChaincodeEvent, error)
- func GetMSPFromPolicy(policy string) ([]string, error)
- func LoadKeyPairFromMSP(mspPath string) ([]byte, []byte, error)
- func NewChannelHeader(headerType common.HeaderType, txId string, channelId string, epoch uint64, ...) ([]byte, error)
- func NewGRPCOptionsFromConfig(c config.ConnectionConfig, log *zap.Logger) ([]grpc.DialOption, error)
- func NewPayloadFromHeader(channelHeader, signatureHeader, data []byte) ([]byte, error)
- func NewSignatureHeader(id msp.SigningIdentity, nonce []byte) ([]byte, error)
- func NewTxWithNonce(id msp.SigningIdentity) (string, []byte, error)
- func RandStringBytesMaskImprSrc(n int) string
- func SeekEnvelope(channelName string, startPos *orderer.SeekPosition, ...) (*common.Envelope, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEventFromEnvelope ¶
func GetEventFromEnvelope(envelopeData []byte) (*peer.ChaincodeEvent, error)
func GetMSPFromPolicy ¶
func NewChannelHeader ¶
func NewChannelHeader(headerType common.HeaderType, txId string, channelId string, epoch uint64, extension *peer.ChaincodeHeaderExtension) ([]byte, error)
NewChannelHeader returns new channel header bytes for presented transaction and channel
func NewGRPCOptionsFromConfig ¶
func NewGRPCOptionsFromConfig(c config.ConnectionConfig, log *zap.Logger) ([]grpc.DialOption, error)
func NewPayloadFromHeader ¶
NewPayloadFromHeader returns marshalled payload from headers and data
func NewSignatureHeader ¶
func NewSignatureHeader(id msp.SigningIdentity, nonce []byte) ([]byte, error)
NewChannelHeader returns marshalled signature header for presented identity
func NewTxWithNonce ¶
func NewTxWithNonce(id msp.SigningIdentity) (string, []byte, error)
NewTxWithNonce generates new transaction id with crypto nonce
func RandStringBytesMaskImprSrc ¶
RandStringBytesMaskImprSrc inspired by https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go
func SeekEnvelope ¶
func SeekEnvelope(channelName string, startPos *orderer.SeekPosition, stopPos *orderer.SeekPosition, identity msp.SigningIdentity) (*common.Envelope, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.