forked from s7techlab/hlf-sdk-go
/
core.go
37 lines (32 loc) · 923 Bytes
/
core.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package api
import (
"context"
"github.com/hyperledger/fabric/msp"
)
type Channel interface {
// Chaincode returns chaincode instance by chaincode name
Chaincode(name string) Chaincode
// Joins channel
Join(ctx context.Context) error
// CSCC implements Configuration System Chaincode (CSCC)
}
type Core interface {
// Channel returns channel instance by channel name
Channel(name string) Channel
// CurrentIdentity identity returns current signing identity used by core
CurrentIdentity() msp.SigningIdentity
// CryptoSuite returns current crypto suite implementation
CryptoSuite() CryptoSuite
// System allows access to system chaincodes
System() SystemCC
// Current peer pool
PeerPool() PeerPool
// Chaincode installation
Chaincode(name string) ChaincodePackage
}
// SystemCC describes interface to access Fabric System Chaincodes
type SystemCC interface {
CSCC() CSCC
QSCC() QSCC
LSCC() LSCC
}