util

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2019 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEventFromEnvelope

func GetEventFromEnvelope(envelopeData []byte) (*peer.ChaincodeEvent, error)

func GetMSPFromPolicy

func GetMSPFromPolicy(policy string) ([]string, error)

func LoadKeyPairFromMSP

func LoadKeyPairFromMSP(mspPath string) ([]byte, []byte, error)

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

func NewPayloadFromHeader(channelHeader, signatureHeader, data []byte) ([]byte, error)

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 SeekEnvelope

func SeekEnvelope(channelName string, startPos *orderer.SeekPosition, stopPos *orderer.SeekPosition, identity msp.SigningIdentity) (*common.Envelope, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL