Versions in this module Expand all Collapse all v1 v1.0.0 Mar 3, 2023 Changes in this version + type ConfigOption = func(*Gateway) error + func WithConfig(config core.ConfigProvider) ConfigOption + func WithSDK(sdk *fabsdk.FabricSDK) ConfigOption + type Contract struct + func (c *Contract) CreateTransaction(name string, opts ...TransactionOption) (*Transaction, error) + func (c *Contract) EvaluateTransaction(name string, args ...string) ([]byte, error) + func (c *Contract) Name() string + func (c *Contract) RegisterEvent(eventFilter string) (fab.Registration, <-chan *fab.CCEvent, error) + func (c *Contract) SubmitTransaction(name string, args ...string) ([]byte, error) + func (c *Contract) Unregister(registration fab.Registration) + type Gateway struct + func Connect(config ConfigOption, identity IdentityOption, options ...Option) (*Gateway, error) + func (gw *Gateway) Close() + func (gw *Gateway) GetNetwork(name string) (*Network, error) + type Identity interface + type IdentityOption = func(*Gateway) error + func WithIdentity(wallet wallet, label string) IdentityOption + func WithUser(user string) IdentityOption + type Network struct + func (n *Network) GetContract(chaincodeID string) *Contract + func (n *Network) GetContractWithName(chaincodeID string, name string) *Contract + func (n *Network) Name() string + func (n *Network) RegisterBlockEvent() (fab.Registration, <-chan *fab.BlockEvent, error) + func (n *Network) RegisterFilteredBlockEvent() (fab.Registration, <-chan *fab.FilteredBlockEvent, error) + func (n *Network) Unregister(registration fab.Registration) + type Option = func(*Gateway) error + func WithTimeout(timeout time.Duration) Option + type Transaction struct + func (txn *Transaction) Evaluate(args ...string) ([]byte, error) + func (txn *Transaction) RegisterCommitEvent() <-chan *fab.TxStatusEvent + func (txn *Transaction) Submit(args ...string) ([]byte, error) + type TransactionOption = func(*Transaction) error + func WithEndorsingPeers(peers ...string) TransactionOption + func WithTransient(data map[string][]byte) TransactionOption + type Wallet struct + func NewFileSystemWallet(path string) (*Wallet, error) + func NewInMemoryWallet() *Wallet + func (w *Wallet) Exists(label string) bool + func (w *Wallet) Get(label string) (Identity, error) + func (w *Wallet) List() ([]string, error) + func (w *Wallet) Put(label string, id Identity) error + func (w *Wallet) Remove(label string) error + type WalletStore interface + Exists func(label string) bool + Get func(label string) ([]byte, error) + List func() ([]string, error) + Put func(label string, stream []byte) error + Remove func(label string) error + type X509Identity struct + Credentials credentials + IDType string + MspID string + Version int + func NewX509Identity(mspid string, cert string, key string) *X509Identity + func (x *X509Identity) Certificate() string + func (x *X509Identity) Key() string