Versions in this module Expand all Collapse all v1 v1.4.9 Jul 22, 2021 Changes in this version + func BroadcastReceive(broadcast Broadcast, addr string, responses chan common.Status, ...) + func BroadcastSend(broadcast Broadcast, addr string, envelope *common.Envelope) error + func BroadcastWaitForResponse(responses chan common.Status, errs chan error) (common.Status, error) + func CreateDeliverEnvelope(channelId string, creator []byte, signer SignerIdentity, cert *tls.Certificate) (*common.Envelope, error) + func CreateEnvelope(data []byte, header *common.Header, signer SignerIdentity) (*common.Envelope, error) + func CreateHeader(txType common.HeaderType, channelId string, creator []byte, tlsCertHash []byte) (string, *common.Header, error) + func DeliverReceive(df DeliverFiltered, address string, txid string, eventCh chan TxEvent) error + func DeliverSend(df DeliverFiltered, address string, envelope *common.Envelope) error + func DeliverWaitForResponse(ctx context.Context, eventCh chan TxEvent, txid string) (bool, error) + func ValidateClientConfig(config *ClientConfig) error + type Broadcast interface + CloseSend func() error + Recv func() (*ab.BroadcastResponse, error) + Send func(m *common.Envelope) error + type Client struct + Prover Prover + SigningIdentity tk.SigningIdentity + TxSubmitter FabricTxSubmitter + func (c *Client) Issue(tokensToIssue []*token.TokenToIssue) ([]byte, error) + func (c *Client) Transfer(tokenIDs [][]byte, shares []*token.RecipientTransferShare) ([]byte, error) + type ClientConfig struct + ChannelId string + CommitPeerCfg ConnectionConfig + MspDir string + MspId string + OrdererCfg ConnectionConfig + ProverPeerCfg ConnectionConfig + TlsEnabled bool + type ConnectionConfig struct + Address string + ServerNameOverride string + TlsRootCertFile string + type DeliverClient interface + Certificate func() *tls.Certificate + NewDeliverFiltered func(ctx context.Context, opts ...grpc.CallOption) (DeliverFiltered, error) + func NewDeliverClient(config *ClientConfig) (DeliverClient, error) + type DeliverFiltered interface + CloseSend func() error + Recv func() (*pb.DeliverResponse, error) + Send func(*common.Envelope) error + type FabricTxSubmitter interface + Submit func(tx []byte) error + type OrdererClient interface + Certificate func() *tls.Certificate + NewBroadcast func(ctx context.Context, opts ...grpc.CallOption) (Broadcast, error) + func NewOrdererClient(config *ClientConfig) (OrdererClient, error) + type Prover interface + RequestImport func(tokensToIssue []*token.TokenToIssue, signingIdentity tk.SigningIdentity) ([]byte, error) + RequestTransfer func(tokenIDs [][]byte, shares []*token.RecipientTransferShare, ...) ([]byte, error) + type ProverPeer struct + ChannelID string + ProverClient token.ProverClient + RandomnessReader io.Reader + Time TimeFunc + func (prover *ProverPeer) CreateSignedCommand(payload interface{}, signingIdentity tk.SigningIdentity) (*token.SignedCommand, error) + func (prover *ProverPeer) RequestImport(tokensToIssue []*token.TokenToIssue, signingIdentity tk.SigningIdentity) ([]byte, error) + func (prover *ProverPeer) RequestTransfer(tokenIDs [][]byte, shares []*token.RecipientTransferShare, ...) ([]byte, error) + type Signer interface + Sign func([]byte) ([]byte, error) + type SignerIdentity interface + Serialize func() ([]byte, error) + type TimeFunc func() time.Time + type TxEvent struct + CommitPeer string + Committed bool + Err error + Txid string + type TxSubmitter struct + Config *ClientConfig + Creator []byte + DeliverClient DeliverClient + OrdererClient OrdererClient + Signer SignerIdentity + func NewTxSubmitter(config *ClientConfig) (*TxSubmitter, error) + func (s *TxSubmitter) CreateTxEnvelope(txBytes []byte) (string, *common.Envelope, error) + func (s *TxSubmitter) SubmitTransaction(txEnvelope *common.Envelope, waitTimeInSeconds int) (committed bool, txId string, err error) + func (s *TxSubmitter) SubmitTransactionWithChan(txEnvelope *common.Envelope, eventCh chan TxEvent) (committed bool, txId string, err error)