Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChaincodeSpec ¶
type IdentityClient ¶
type IdentityClient interface { GetSigningIdentity(name string) (msp.SigningIdentity, error) GetClientOrg() string AddSignerUpdateListener(SignerUpdateListener) }
type RPCClient ¶
type RPCClient interface { Invoke(channelID, signer, chaincodeName, method string, args []string, transientMap map[string]string, isInit bool) (*TxReceipt, error) Query(channelID, signer, chaincodeName, method string, args []string, strongread bool) ([]byte, error) QueryChainInfo(channelID, signer string) (*fab.BlockchainInfoResponse, error) QueryBlock(channelID string, signer string, blocknumber uint64, blockhash []byte) (*utils.RawBlock, *utils.Block, error) QueryBlockByTxID(channelID string, signer string, txID string) (*utils.RawBlock, *utils.Block, error) QueryTransaction(channelID, signer, txID string) (map[string]interface{}, error) SubscribeEvent(subInfo *eventsapi.SubscriptionInfo, since uint64) (*RegistrationWrapper, <-chan *fab.BlockEvent, <-chan *fab.CCEvent, error) Unregister(*RegistrationWrapper) Close() error }
func RPCConnect ¶
Instantiate an RPC client to interact with a Fabric network. based on the client configuration on gateway usage, it creates different types of client under the cover: - "useGatewayClient: true": returned RPCClient uses the client-side Gateway - "useGatewayClient: false": returned RPCClient uses a static network map described by the Connection Profile - "useGatewayServer: true": for Fabric 2.4 node only, the returned RPCClient utilizes the server-side gateway service
type RegistrationWrapper ¶
type RegistrationWrapper struct {
// contains filtered or unexported fields
}
type SignerUpdateListener ¶ added in v0.9.15
type SignerUpdateListener interface {
SignerUpdated(signer string)
}
type TxReceipt ¶
type TxReceipt struct { BlockNumber uint64 `json:"blockNumber"` SignerMSP string `json:"signerMSP"` Signer string `json:"signer"` ChaincodeSpec ChaincodeSpec `json:"chaincode"` TransactionID string `json:"transactionID"` Status pb.TxValidationCode `json:"status"` SourcePeer string `json:"peer"` ResponsePayload []byte `json:"responsePayload"` }
type TxSubmitAndListenHandler ¶ added in v0.9.18
type TxSubmitAndListenHandler struct {
// contains filtered or unexported fields
}
adapted from the CommitHandler in https://github.com/hyperledger/fabric-sdk-go in order to custom process the transaction status event
func NewTxSubmitAndListenHandler ¶
func NewTxSubmitAndListenHandler(txStatus *fab.TxStatusEvent) *TxSubmitAndListenHandler
func (*TxSubmitAndListenHandler) Handle ¶ added in v0.9.18
func (h *TxSubmitAndListenHandler) Handle(requestContext *invoke.RequestContext, clientContext *invoke.ClientContext)
Click to show internal directories.
Click to hide internal directories.