Versions in this module Expand all Collapse all v0 v0.0.1 Mar 8, 2020 Changes in this version + const ChaincodeType_GOLANG + const ChaincodeType_JAVA + const ChaincodeType_NODE + const DiscoverTimeOut + const LSCC + func CalBlockHash(block *common.Block) ([]byte, error) + func CalConnIdentifier(connProfile *ConnectionProfile, participant *Participant, useDiscovery bool) string + func CreateChannel(conn *NetworkConnection, txContent []byte, orderer string) (string, error) + func CreateSigningIdentity(sdk *fabsdk.FabricSDK, participant *Participant) (msp.SigningIdentity, error) + func ExecuteChaincode(conn *NetworkConnection, channelID string, chaincodeID string, ...) (*channel.Response, error) + func GetJoinedChannels(conn *NetworkConnection, endpointURL string, options ...DiscoverOptionFunc) ([]*peer.ChannelInfo, error) + func InstallChaincode(conn *NetworkConnection, cc *Chaincode, targets []string) (map[string]ExecutionResult, error) + func InstantiateChaincode(conn *NetworkConnection, cc *Chaincode, target string, orderer string) (fab.TransactionID, error) + func JoinChannel(conn *NetworkConnection, channelID string, targets []string, orderer string) error + func MonitorBlockEvent(conn *NetworkConnection, channelID string, ...) error + func NewJavaCCPackage(chaincodeRealPath string) (*resource.CCPackage, error) + func NewNodeCCPackage(chaincodeRealPath string) (*resource.CCPackage, error) + func TLSAllCertsByBytes(certBytes [][]byte) ([]*x509.Certificate, error) + func TLSCertByBytes(bytes []byte) (*x509.Certificate, error) + func UpgradeChaincode(conn *NetworkConnection, cc *Chaincode, target string, orderer string) (fab.TransactionID, error) + type Action struct + Arguments []string + ChaincodeName string + ChaincodeVersion string + Endorsers []*Endorser + ProposalResponse *ProposalResponse + type Block struct + BlockHash string + DataHash string + Number uint64 + PreviousHash string + Time int64 + Transactions []*Transaction + func QueryBlock(conn *NetworkConnection, channelID string, targets []string, begin uint64, ...) ([]*Block, error) + func QueryBlockByHash(conn *NetworkConnection, channelID string, targets []string, blockHash string) (*Block, error) + func QueryBlockByTxID(conn *NetworkConnection, channelID string, targets []string, txID string) (*Block, error) + type Chaincode struct + BasePath string + ChannelID string + Constructor []string + Installed bool + Name string + Package []byte + Path string + Policy string + Type string + Version string + func QueryInstalledChaincodes(conn *NetworkConnection, endpointURL string, options ...DiscoverOptionFunc) ([]*Chaincode, error) + func QueryInstantiatedChaincodes(conn *NetworkConnection, channelID string) ([]*Chaincode, error) + func (cc *Chaincode) String() string + type ChaincodeData struct + Name string + Principals []string + Rule string + Version string + type ChaincodeOperType int + const ChaincodeOperTypeExecute + const ChaincodeOperTypeQuery + type Channel struct + AnchorPeers util.Set + ChannelID string + Orderers util.Set + Peers util.Set + Policies *fab.ChannelPolicies + type ChannelConfigCongnRes struct + ChannelConfigs map[string]*fab.ChannelEndpointConfig + func (cccr *ChannelConfigCongnRes) ChannelConfig(channelID string) *fab.ChannelEndpointConfig + type ChannelPeerCongnRes struct + ChannelPeersList map[string][]fab.ChannelPeer + func (cpcr *ChannelPeerCongnRes) ChannelPeers(channelID string) []fab.ChannelPeer + type ConnectionProfile struct + Config []byte + ConfigType string + type Descriptor struct + type DiscoverOption struct + IsDetail bool + Targets []string + type DiscoverOptionFunc func(opt *DiscoverOption) error + func WithIsDetail(isDetail bool) DiscoverOptionFunc + func WithTargets(targets ...string) DiscoverOptionFunc + type Endorser struct + CommonName string + IsCA bool + Issuer string + MSPID string + Sign string + Subject string + type ExecutionResult struct + Code ResultCode + Message string + Result interface{} + type HashReadWriteCol struct + CollectionName string + KVReadSet []*KVRead + KVWriteSet []*KVWrite + type KVRead struct + Key string + VerBlockNum uint64 + VerTxNum uint64 + type KVWrite struct + IsDelete bool + Key string + Value interface{} + type Ledger struct + CurrentBlockHash string + Endorser string + Height uint64 + Status int32 + func QueryLedger(conn *NetworkConnection, channelID string, targets []string) (*Ledger, error) + type NSReadWriteSet struct + HashReadWriteCols []*HashReadWriteCol + KVReadSet []*KVRead + KVWriteSet []*KVWrite + NameSpace string + type NetworkConnection struct + ActiveTime time.Time + ChannelAnchorPeers map[string][]string + ChannelChaincodes map[string][]*Chaincode + ChannelLedgers map[string]*Ledger + ChannelOrderers map[string][]*Orderer + Channels map[string]*Channel + Client context.Client + ClientProvider context.ClientProvider + EndpointStatuses map[string]util.EndPointStatus + Identifier string + Orderers map[string]*Orderer + Organizations map[string]*Organization + Peers map[string]*Peer + SDK *fabsdk.FabricSDK + UpdateTime time.Time + UseDiscovery bool + func NewConnection(connProfile *ConnectionProfile, participant *Participant, useDiscovery bool) (*NetworkConnection, error) + func (conn *NetworkConnection) Close() + func (conn *NetworkConnection) ConfiguredChannels() map[string]fab.ChannelEndpointConfig + func (conn *NetworkConnection) ConfiguredOrderers() map[string]fab.OrdererConfig + func (conn *NetworkConnection) ConfiguredOrganizations() map[string]fab.OrganizationConfig + func (conn *NetworkConnection) ConfiguredPeers() map[string]fab.PeerConfig + func (conn *NetworkConnection) Show() string + type NetworkOverview struct + ChannelAnchorPeers map[string][]string + ChannelChainCodes map[string][]*Chaincode + ChannelLedgers map[string]*Ledger + ChannelOrderers map[string][]*Orderer + Channels []*Channel + EndpointStatuses map[string]util.EndPointStatus + Peers []*Peer + func DiscoverNetworkOverview(conn *NetworkConnection, options ...DiscoverOptionFunc) (*NetworkOverview, error) + type Orderer struct + Channels util.Set + GRPCOptions map[string]interface{} + Name string + TLSCACert *x509.Certificate + URL string + type OrdererConfigCognRes struct + OrdererConfigs map[string]*fab.OrdererConfig + func (occr *OrdererConfigCognRes) OrdererConfig(nameOrURL string) (*fab.OrdererConfig, bool) + type Organization struct + CryptoPath string + MSPID string + Name string + Peers util.Set + type Participant struct + Cert []byte + Label string + MSPID string + OrgName string + PrivateKey []byte + SignID msp.SigningIdentity + type Peer struct + Channels util.Set + GRPCOptions map[string]interface{} + IsConfigured bool + MSPID string + Name string + OrgName string + PeerChannelConfigs map[string]*fab.PeerChannelConfig + TLSCACert *x509.Certificate + URL string + UpdateTime int64 + type PeerStatus struct + GRPC bool + Ping bool + Valid bool + type ProposalResponse struct + Chaincode *Chaincode + Response interface{} + TXReadWriteSet *TXReadWriteSet + type ResultCode uint32 + const ResultFailure + const ResultSuccess + type TXReadWriteSet struct + DataModel string + NSReadWriteSets []*NSReadWriteSet + type Transaction struct + Actions []*Action