client

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndpointConfig added in v0.1.2

func GetEndpointConfig(configBytes []byte, format config.Format) (core.ConfigProvider, fabapi.EndpointConfig, error)

GetEndpointConfig unmarshals the given bytes and returns the SDK endpoint config and config provider.

Types

type ChannelClient

type ChannelClient interface {
	InvokeHandler(handler invoke.Handler, request channel.Request, options ...channel.RequestOption) (channel.Response, error)
}

ChannelClient defines functions to collect endorsements and send them to the orderer

type Client

type Client struct {
	api.PeerConfig
	// contains filtered or unexported fields
}

Client holds an SDK client instance

func New

func New(channelID, userName string, peerConfig api.PeerConfig, sdkCfgBytes []byte, format config.Format) (*Client, error)

New returns a new instance of an SDK client for the given channel

func (*Client) Close

func (c *Client) Close()

Close will close the SDK after all references have been released.

func (*Client) ComputeTxnID added in v0.1.4

func (c *Client) ComputeTxnID(nonce []byte) (string, error)

ComputeTxnID returns a transaction ID computed using the given nonce and the identity in the channel context

func (*Client) GetPeer added in v0.1.4

func (c *Client) GetPeer(endpoint string) (fabapi.Peer, error)

GetPeer returns the peer matching the given endpoint

func (*Client) InvokeHandler added in v0.1.4

func (c *Client) InvokeHandler(handler invoke.Handler, request channel.Request, options ...channel.RequestOption) (channel.Response, error)

InvokeHandler invokes the given handler chain.

func (*Client) SigningIdentity added in v0.1.4

func (c *Client) SigningIdentity() ([]byte, error)

SigningIdentity returns the serialized identity of the proposal signer

func (*Client) VerifyProposalSignature added in v0.1.4

func (c *Client) VerifyProposalSignature(signedProposal *pb.SignedProposal) error

VerifyProposalSignature verifies that the signed proposal is valid

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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