Documentation ¶
Index ¶
- Variables
- func CreateCompositeKey(objectType string, attributes []string) (string, error)
- func GetConfigBlockFromOrderer(ctx context.Context, id msp.SigningIdentity, orderer api.Orderer, ...) (*common.Block, error)
- func GetEventFromEnvelope(envelopeData []byte) (*peer.ChaincodeEvent, error)
- func GetMSPFromPolicy(policy string) ([]string, error)
- func GetOrdererHostFromChannelConfig(conf *common.Config) (string, error)
- func IsErrUnsupportedTxType(err error) bool
- 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 ProceedChannelUpdate(ctx context.Context, channelName string, update *common.ConfigUpdate, ...) error
- func RandStringBytesMaskImprSrc(n int) string
- func SeekEnvelope(channelName string, startPos *orderer.SeekPosition, ...) (*common.Envelope, error)
- func SplitCompositeKey(compositeKey string) (string, []string)
- type ErrUnsupportedTxType
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrOrdererGroupNotFound = errors.New(`orderer addresses not found`)
)
Functions ¶
func CreateCompositeKey ¶ added in v0.1.4
func GetConfigBlockFromOrderer ¶ added in v0.4.0
func GetConfigBlockFromOrderer(ctx context.Context, id msp.SigningIdentity, orderer api.Orderer, channelName string) (*common.Block, error)
GetConfigBlockFromOrderer returns config block from orderer by channel name
func GetEventFromEnvelope ¶
func GetEventFromEnvelope(envelopeData []byte) (*peer.ChaincodeEvent, error)
func GetMSPFromPolicy ¶
func GetOrdererHostFromChannelConfig ¶ added in v0.4.0
func IsErrUnsupportedTxType ¶ added in v0.3.0
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 ProceedChannelUpdate ¶ added in v0.4.0
func ProceedChannelUpdate(ctx context.Context, channelName string, update *common.ConfigUpdate, orderer api.Orderer, id msp.SigningIdentity) error
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)
func SplitCompositeKey ¶ added in v0.1.4
Types ¶
type ErrUnsupportedTxType ¶ added in v0.3.0
type ErrUnsupportedTxType struct {
Type string
}
func (*ErrUnsupportedTxType) Error ¶ added in v0.3.0
func (e *ErrUnsupportedTxType) Error() string
Click to show internal directories.
Click to hide internal directories.