-
Notifications
You must be signed in to change notification settings - Fork 10
/
client.go
35 lines (30 loc) · 873 Bytes
/
client.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
package relay
import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/datachainlab/lcp/go/relay/elc"
"github.com/datachainlab/lcp/go/relay/enclave"
"github.com/datachainlab/lcp/go/relay/ibc"
"google.golang.org/grpc"
)
type (
ELCMsgClient = elc.MsgClient
ELCQueryClient = elc.QueryClient
EnclaveQueryClient = enclave.QueryClient
IBCMsgClient = ibc.MsgClient
)
type LCPServiceClient struct {
codec codec.ProtoCodecMarshaler
ELCMsgClient
ELCQueryClient
EnclaveQueryClient
IBCMsgClient
}
func NewLCPServiceClient(conn *grpc.ClientConn, codec codec.ProtoCodecMarshaler) LCPServiceClient {
return LCPServiceClient{
codec: codec,
ELCMsgClient: elc.NewMsgClient(conn),
ELCQueryClient: elc.NewQueryClient(conn),
EnclaveQueryClient: enclave.NewQueryClient(conn),
IBCMsgClient: ibc.NewMsgClient(conn),
}
}