github.com/turingchain2020/turingchain@v1.1.21/types/rpc.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: rpc.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 math "math" 10 11 proto "github.com/golang/protobuf/proto" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 27 28 type ServerTime struct { 29 CurrentTimestamp int64 `protobuf:"varint,1,opt,name=currentTimestamp,proto3" json:"currentTimestamp,omitempty"` 30 XXX_NoUnkeyedLiteral struct{} `json:"-"` 31 XXX_unrecognized []byte `json:"-"` 32 XXX_sizecache int32 `json:"-"` 33 } 34 35 func (m *ServerTime) Reset() { *m = ServerTime{} } 36 func (m *ServerTime) String() string { return proto.CompactTextString(m) } 37 func (*ServerTime) ProtoMessage() {} 38 func (*ServerTime) Descriptor() ([]byte, []int) { 39 return fileDescriptor_77a6da22d6a3feb1, []int{0} 40 } 41 42 func (m *ServerTime) XXX_Unmarshal(b []byte) error { 43 return xxx_messageInfo_ServerTime.Unmarshal(m, b) 44 } 45 func (m *ServerTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 46 return xxx_messageInfo_ServerTime.Marshal(b, m, deterministic) 47 } 48 func (m *ServerTime) XXX_Merge(src proto.Message) { 49 xxx_messageInfo_ServerTime.Merge(m, src) 50 } 51 func (m *ServerTime) XXX_Size() int { 52 return xxx_messageInfo_ServerTime.Size(m) 53 } 54 func (m *ServerTime) XXX_DiscardUnknown() { 55 xxx_messageInfo_ServerTime.DiscardUnknown(m) 56 } 57 58 var xxx_messageInfo_ServerTime proto.InternalMessageInfo 59 60 func (m *ServerTime) GetCurrentTimestamp() int64 { 61 if m != nil { 62 return m.CurrentTimestamp 63 } 64 return 0 65 } 66 67 func init() { 68 proto.RegisterType((*ServerTime)(nil), "types.serverTime") 69 } 70 71 func init() { 72 proto.RegisterFile("rpc.proto", fileDescriptor_77a6da22d6a3feb1) 73 } 74 75 var fileDescriptor_77a6da22d6a3feb1 = []byte{ 76 // 1256 bytes of a gzipped FileDescriptorProto 77 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x57, 0xef, 0x6f, 0xdb, 0x36, 78 0x13, 0x56, 0xf1, 0xbe, 0x6b, 0x1a, 0xd6, 0x76, 0x1d, 0x26, 0xed, 0x5a, 0x6d, 0x45, 0x07, 0x01, 79 0xc3, 0x8a, 0x0d, 0x4d, 0x52, 0x7b, 0xcd, 0xda, 0xb5, 0x1b, 0x50, 0xa7, 0xb5, 0x63, 0xcc, 0xf5, 80 0x5c, 0xdb, 0xdd, 0x80, 0x7d, 0x63, 0xe4, 0x9b, 0x23, 0x54, 0x16, 0x65, 0x92, 0x8a, 0xed, 0x3f, 81 0x7d, 0xdf, 0x06, 0x92, 0xfa, 0x45, 0x49, 0x4e, 0xb2, 0x6f, 0xe6, 0x73, 0x7c, 0x4e, 0x77, 0xe4, 82 0x3d, 0x77, 0x26, 0xda, 0x65, 0xa1, 0x7b, 0x18, 0x32, 0x2a, 0x28, 0xfe, 0x42, 0x6c, 0x42, 0xe0, 83 0x76, 0xcd, 0xa5, 0x8b, 0x05, 0x0d, 0x34, 0x68, 0xef, 0x09, 0x46, 0x02, 0x4e, 0x5c, 0xe1, 0xa5, 84 0x50, 0xf3, 0xdc, 0xa7, 0xee, 0x67, 0xf7, 0x82, 0x78, 0x09, 0x52, 0x5b, 0x11, 0xdf, 0x07, 0x11, 85 0xaf, 0x76, 0xc3, 0x56, 0x18, 0xff, 0xac, 0x13, 0xd7, 0xa5, 0x51, 0x90, 0x58, 0x1a, 0xb0, 0x06, 86 0x37, 0x12, 0x94, 0xe9, 0xb5, 0xf3, 0x12, 0x21, 0x0e, 0xec, 0x12, 0xd8, 0xd4, 0x5b, 0x00, 0xfe, 87 0x1e, 0x35, 0xdd, 0x88, 0x31, 0x08, 0x84, 0x5c, 0x72, 0x41, 0x16, 0xe1, 0xc3, 0x5b, 0xdf, 0xdc, 88 0x7a, 0xfa, 0xbf, 0x71, 0x09, 0x6f, 0xfd, 0xf3, 0x15, 0xda, 0x51, 0x11, 0xb4, 0xdb, 0xf8, 0x19, 89 0xda, 0xed, 0x81, 0xe8, 0xc8, 0xa0, 0x38, 0x6e, 0x1e, 0xaa, 0x2c, 0x0e, 0xc7, 0xb0, 0xd4, 0x88, 90 0x5d, 0x4b, 0x91, 0xd0, 0xdf, 0x38, 0x16, 0x3e, 0x42, 0xf5, 0x1e, 0x88, 0x01, 0xe1, 0xe2, 0x0c, 91 0xc8, 0x0c, 0x18, 0xae, 0x67, 0x94, 0xa1, 0xe7, 0xdb, 0xc9, 0x52, 0x5b, 0x1d, 0x0b, 0xff, 0x8c, 92 0x0e, 0x4e, 0x19, 0x10, 0x01, 0x63, 0xb2, 0x9a, 0x66, 0xa7, 0x81, 0xef, 0xc5, 0x1b, 0xb5, 0x71, 93 0xba, 0xb6, 0x13, 0xe0, 0x53, 0xc0, 0xbd, 0x79, 0x30, 0x5d, 0x3b, 0x16, 0x7e, 0x87, 0x9a, 0x19, 94 0x77, 0xdd, 0x63, 0x34, 0x0a, 0xf1, 0x63, 0x93, 0x97, 0x79, 0x54, 0xe6, 0x2a, 0x2f, 0xbf, 0xa2, 95 0xe6, 0xc7, 0x08, 0xd8, 0x26, 0xff, 0xf5, 0x46, 0x16, 0xf5, 0x19, 0xe1, 0x17, 0xf6, 0xc3, 0x78, 96 0x9d, 0xdb, 0xf3, 0x0e, 0x04, 0xf1, 0x7c, 0xc7, 0xc2, 0xaf, 0xd0, 0xfe, 0x04, 0x82, 0x59, 0xce, 97 0x34, 0xd9, 0x04, 0x2e, 0xc6, 0x65, 0x4a, 0xe9, 0xb4, 0x5e, 0xa0, 0x7b, 0x05, 0xea, 0x8d, 0x68, 98 0xbf, 0xa0, 0x83, 0x1e, 0x88, 0xdc, 0x8e, 0xce, 0xe6, 0xed, 0x6c, 0xc6, 0xf2, 0x51, 0xcb, 0xb5, 99 0xbd, 0x9f, 0xe7, 0x4d, 0xd7, 0xfd, 0xe0, 0x6f, 0xca, 0x1d, 0x0b, 0xf7, 0xd0, 0x83, 0x22, 0x5d, 100 0x26, 0x09, 0xc6, 0xfd, 0x6a, 0xc4, 0x7e, 0xb4, 0x2d, 0x71, 0xe9, 0xe8, 0x25, 0x42, 0x3d, 0x10, 101 0x1f, 0x60, 0x31, 0xa2, 0xd4, 0xc7, 0x07, 0x19, 0x59, 0xa3, 0x21, 0xa5, 0xbe, 0x8d, 0xcd, 0x18, 102 0x06, 0x1e, 0x17, 0x2a, 0xf1, 0xbb, 0x3d, 0x10, 0x6f, 0x75, 0xfd, 0xf2, 0x62, 0x91, 0xdc, 0x8f, 103 0x97, 0x7f, 0xaa, 0xc2, 0x4f, 0x76, 0xa9, 0x62, 0x41, 0x19, 0xad, 0xf0, 0xc1, 0x18, 0xb5, 0x0f, 104 0xaa, 0xc8, 0x9a, 0x3b, 0x84, 0x55, 0x05, 0x37, 0x43, 0xb7, 0x72, 0xc7, 0xe8, 0xbe, 0x86, 0x72, 105 0xc7, 0x20, 0x33, 0xc1, 0x4f, 0x32, 0x37, 0x95, 0x1b, 0xec, 0x07, 0x86, 0xc7, 0xe9, 0x3a, 0x3b, 106 0xbc, 0x2e, 0xaa, 0xf7, 0x17, 0x21, 0x65, 0x62, 0xc4, 0xbc, 0xcb, 0xcf, 0xb0, 0x49, 0x2b, 0x37, 107 0xf5, 0x65, 0x98, 0xb7, 0xc6, 0xd6, 0x41, 0x75, 0x55, 0x43, 0x54, 0x5e, 0x39, 0x70, 0x5e, 0xf6, 108 0x63, 0x98, 0xed, 0x66, 0xfe, 0x42, 0xe4, 0x2d, 0x3b, 0x16, 0x6e, 0xa1, 0x3b, 0x13, 0x19, 0x5d, 109 0x17, 0x00, 0x3f, 0x28, 0xd3, 0x45, 0x17, 0xa0, 0x54, 0x84, 0xaf, 0xd1, 0xce, 0x44, 0x2a, 0xfd, 110 0xdc, 0xc7, 0x0f, 0x2b, 0x28, 0x03, 0x72, 0x0e, 0xfe, 0x15, 0x41, 0xd7, 0x3e, 0x00, 0x9b, 0x43, 111 0x87, 0xf8, 0x24, 0x70, 0x01, 0x7f, 0x5d, 0xf4, 0x90, 0xb7, 0x9a, 0x35, 0xa4, 0x0b, 0xd3, 0xb1, 112 0xf0, 0x09, 0xda, 0x9d, 0x80, 0x18, 0x11, 0xce, 0x57, 0x33, 0xfc, 0xa8, 0x22, 0x04, 0x6d, 0x2a, 113 0x05, 0xfe, 0x2d, 0xfa, 0xff, 0x80, 0xba, 0x9f, 0x8b, 0x45, 0x57, 0xdc, 0xf6, 0x0c, 0xdd, 0xfe, 114 0x14, 0xa8, 0x8d, 0xfb, 0x46, 0x12, 0x1a, 0xac, 0x90, 0x72, 0x23, 0x6e, 0x7c, 0x89, 0x1e, 0x0a, 115 0xfe, 0xab, 0x85, 0xf0, 0x06, 0xd5, 0x7a, 0x20, 0x46, 0x8c, 0x86, 0xc0, 0xe4, 0xe9, 0x67, 0x92, 116 0x5d, 0xa6, 0x60, 0xaa, 0x07, 0x45, 0x4d, 0x61, 0xc7, 0xc2, 0x3f, 0xa1, 0x7b, 0x3d, 0x10, 0x71, 117 0xc2, 0x82, 0x88, 0xa8, 0x24, 0x25, 0x33, 0x76, 0xbd, 0x47, 0x89, 0xa1, 0x99, 0x74, 0xf5, 0xdf, 118 0x2f, 0x81, 0x5d, 0x7a, 0xb0, 0x2a, 0xf5, 0xbc, 0xe4, 0xee, 0x8c, 0x5d, 0x4a, 0xf5, 0xf2, 0xa3, 119 0xb2, 0x9c, 0xaa, 0xa8, 0x46, 0xe3, 0xc9, 0x6f, 0x72, 0x2c, 0xfc, 0x5c, 0x25, 0xab, 0xfc, 0xc9, 120 0x2f, 0xe4, 0x63, 0xed, 0x07, 0xa2, 0xb2, 0x32, 0x9f, 0xa3, 0x9d, 0x1e, 0x04, 0x13, 0x80, 0x59, 121 0xda, 0x19, 0xe3, 0xf5, 0x80, 0x04, 0x73, 0x93, 0x22, 0xd1, 0x84, 0x22, 0x0a, 0x14, 0xb5, 0xee, 122 0x6c, 0x46, 0xab, 0x4a, 0xca, 0x11, 0xba, 0x33, 0x21, 0x97, 0xa0, 0x38, 0x49, 0xec, 0x09, 0xa0, 123 0x48, 0xc5, 0xdb, 0x6e, 0xa9, 0x46, 0x94, 0x54, 0xef, 0x5e, 0x6e, 0x2c, 0xc6, 0x25, 0x9b, 0xcc, 124 0x99, 0x5c, 0xf3, 0x6a, 0x21, 0xa4, 0xe6, 0xcc, 0xa9, 0x9c, 0xac, 0x69, 0x03, 0x52, 0xab, 0xf7, 125 0xf1, 0xe4, 0xae, 0xfa, 0x8e, 0xb4, 0xe9, 0xdb, 0xbb, 0x21, 0xe7, 0x04, 0x35, 0xf4, 0x77, 0x68, 126 0xc0, 0x21, 0xe0, 0x11, 0xbf, 0x21, 0xef, 0x15, 0xda, 0x2b, 0x0d, 0xcd, 0x34, 0xb5, 0x64, 0x0c, 127 0xf7, 0x83, 0xaa, 0x11, 0x7a, 0xac, 0x8a, 0xff, 0x0c, 0xd6, 0xd3, 0xb5, 0x9e, 0x25, 0xa5, 0x62, 128 0xaa, 0xa5, 0x73, 0x7f, 0xad, 0x18, 0x2f, 0xd0, 0xdd, 0x77, 0xd1, 0x22, 0x4c, 0x7a, 0x5f, 0x6e, 129 0xf0, 0x4c, 0x04, 0xf3, 0x82, 0xb9, 0x29, 0x17, 0x8d, 0xe9, 0xba, 0xcd, 0xd1, 0x78, 0xd7, 0xf3, 130 0x8d, 0x86, 0x95, 0xc7, 0x4b, 0xf9, 0xbd, 0x41, 0xd8, 0xe8, 0xa8, 0xff, 0x8d, 0x7d, 0x88, 0x76, 131 0xfe, 0x00, 0xc6, 0xe5, 0x99, 0x6c, 0x11, 0x76, 0x6c, 0x96, 0x53, 0xd6, 0xb1, 0xf0, 0x77, 0xe8, 132 0x76, 0x9f, 0xab, 0x3f, 0x02, 0xd7, 0xf4, 0x99, 0x13, 0x35, 0x0a, 0x47, 0x00, 0x4c, 0x32, 0xd3, 133 0xbb, 0x1a, 0xb5, 0x46, 0x31, 0x3c, 0x86, 0x65, 0x7a, 0xe6, 0x72, 0x1d, 0x77, 0x8e, 0x97, 0x68, 134 0x67, 0x08, 0x42, 0x71, 0xbe, 0x34, 0x38, 0x31, 0x2a, 0x69, 0x49, 0x68, 0x43, 0x3a, 0x83, 0x18, 135 0x56, 0xd5, 0xde, 0xe8, 0xf3, 0xa1, 0x08, 0x4f, 0xa5, 0x10, 0x6f, 0x12, 0xe2, 0xb1, 0x52, 0x7c, 136 0x97, 0x08, 0xe2, 0x77, 0x89, 0xe7, 0x47, 0x0c, 0xb6, 0x31, 0xfa, 0x81, 0x68, 0xb7, 0xd4, 0xf5, 137 0x1e, 0xc4, 0xdd, 0x50, 0xa9, 0x7d, 0x02, 0xcb, 0x08, 0xa4, 0x52, 0xb6, 0xd3, 0x4e, 0x7e, 0x74, 138 0x2c, 0xdc, 0x46, 0x7b, 0x4a, 0xaa, 0x7a, 0xf7, 0x35, 0xa5, 0x94, 0x90, 0x5e, 0x67, 0xbd, 0xec, 139 0x8a, 0x3f, 0x32, 0xfb, 0xf9, 0x6e, 0x96, 0x4d, 0xe1, 0x63, 0xf5, 0x7f, 0x35, 0x26, 0x4f, 0x60, 140 0x89, 0x0d, 0xef, 0xe9, 0xb9, 0x27, 0x59, 0x38, 0x16, 0xfe, 0x01, 0xa1, 0x53, 0x9f, 0x72, 0xf8, 141 0x18, 0x41, 0x04, 0xd7, 0x9d, 0x5c, 0x57, 0x25, 0xf4, 0xd6, 0xf7, 0xa5, 0xea, 0x92, 0x76, 0x91, 142 0x1b, 0x97, 0xa6, 0x25, 0x6d, 0xf4, 0x26, 0xac, 0xb4, 0xb9, 0x3b, 0xf1, 0xe6, 0x81, 0xfa, 0x9f, 143 0x9b, 0x9f, 0x11, 0x29, 0x68, 0xce, 0x88, 0x14, 0x76, 0x2c, 0xdc, 0x47, 0xb6, 0x16, 0xef, 0x90, 144 0xc6, 0xfe, 0xaa, 0xfe, 0x6e, 0x66, 0xc6, 0x2b, 0x5c, 0x9d, 0xa0, 0x9a, 0xea, 0x2c, 0x63, 0x12, 145 0xcc, 0x86, 0xd1, 0x02, 0x67, 0x1a, 0x5d, 0x4a, 0x48, 0xdd, 0x4e, 0x55, 0x13, 0x7f, 0xaa, 0x3a, 146 0x72, 0x97, 0x32, 0x63, 0xe8, 0xfe, 0x06, 0x9b, 0xd2, 0x5d, 0x76, 0x10, 0x2e, 0x06, 0xbb, 0xe6, 147 0x69, 0xc2, 0x79, 0x70, 0x7b, 0x94, 0xa7, 0xaa, 0x1e, 0x46, 0x84, 0x11, 0xd9, 0x8d, 0xa6, 0x9e, 148 0xf0, 0x21, 0x55, 0x88, 0x54, 0x79, 0xde, 0x90, 0x0e, 0x39, 0x8d, 0x66, 0x75, 0xd1, 0x47, 0x7b, 149 0x03, 0x4a, 0x66, 0x5b, 0xbd, 0x9c, 0x81, 0x37, 0xbf, 0x10, 0x89, 0x97, 0x47, 0x46, 0xd2, 0x79, 150 0x93, 0x63, 0xe1, 0xf7, 0xaa, 0x06, 0x12, 0x4f, 0xda, 0x9a, 0xaf, 0x01, 0xd3, 0xb2, 0x35, 0xa2, 151 0x63, 0x35, 0x72, 0xf4, 0xbb, 0xa9, 0xea, 0x25, 0xd6, 0x30, 0x5e, 0x56, 0x5c, 0xa9, 0xa9, 0xae, 152 0xd4, 0x94, 0xbe, 0x01, 0x0b, 0xc5, 0x9a, 0xf4, 0xf6, 0xec, 0x95, 0xe8, 0x58, 0x9d, 0x27, 0x7f, 153 0x3d, 0x9e, 0x7b, 0xe2, 0x22, 0x3a, 0x3f, 0x74, 0xe9, 0xe2, 0xa8, 0xdd, 0x76, 0x83, 0xa3, 0xf8, 154 0x29, 0x78, 0xa4, 0x76, 0x9f, 0xdf, 0x56, 0xaf, 0xcb, 0xf6, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 155 0xc7, 0xa5, 0x21, 0xc4, 0xdc, 0x0e, 0x00, 0x00, 156 } 157 158 // Reference imports to suppress errors if they are not otherwise used. 159 var _ context.Context 160 var _ grpc.ClientConnInterface 161 162 // This is a compile-time assertion to ensure that this generated file 163 // is compatible with the grpc package it is being compiled against. 164 const _ = grpc.SupportPackageIsVersion6 165 166 // TuringchainClient is the client API for Turingchain service. 167 // 168 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 169 type TuringchainClient interface { 170 // turingchain 对外提供服务的接口 171 //区块链接口 172 GetBlocks(ctx context.Context, in *ReqBlocks, opts ...grpc.CallOption) (*Reply, error) 173 //获取最新的区块头 174 GetLastHeader(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Header, error) 175 //交易接口 176 CreateRawTransaction(ctx context.Context, in *CreateTx, opts ...grpc.CallOption) (*UnsignTx, error) 177 CreateRawTxGroup(ctx context.Context, in *CreateTransactionGroup, opts ...grpc.CallOption) (*UnsignTx, error) 178 // 根据哈希查询交易 179 QueryTransaction(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*TransactionDetail, error) 180 // 发送交易&&根据哈希查询交易 181 SendTransactionSync(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Reply, error) 182 // 发送交易 183 SendTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Reply, error) 184 //通过地址获取交易信息 185 GetTransactionByAddr(ctx context.Context, in *ReqAddr, opts ...grpc.CallOption) (*ReplyTxInfos, error) 186 //通过哈希数组获取对应的交易 187 GetTransactionByHashes(ctx context.Context, in *ReqHashes, opts ...grpc.CallOption) (*TransactionDetails, error) 188 //缓存接口 189 GetMemPool(ctx context.Context, in *ReqGetMempool, opts ...grpc.CallOption) (*ReplyTxList, error) 190 //钱包接口 191 //获取钱包账户信息 192 GetAccounts(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*WalletAccounts, error) 193 //根据账户lable信息获取账户地址 194 GetAccount(ctx context.Context, in *ReqGetAccount, opts ...grpc.CallOption) (*WalletAccount, error) 195 //创建钱包账户 196 NewAccount(ctx context.Context, in *ReqNewAccount, opts ...grpc.CallOption) (*WalletAccount, error) 197 //获取钱包的交易列表 198 WalletTransactionList(ctx context.Context, in *ReqWalletTransactionList, opts ...grpc.CallOption) (*WalletTxDetails, error) 199 //导入钱包私钥 200 ImportPrivkey(ctx context.Context, in *ReqWalletImportPrivkey, opts ...grpc.CallOption) (*WalletAccount, error) 201 // 发送交易 202 SendToAddress(ctx context.Context, in *ReqWalletSendToAddress, opts ...grpc.CallOption) (*ReplyHash, error) 203 //设置交易手续费 204 SetTxFee(ctx context.Context, in *ReqWalletSetFee, opts ...grpc.CallOption) (*Reply, error) 205 //设置标签 206 SetLabl(ctx context.Context, in *ReqWalletSetLabel, opts ...grpc.CallOption) (*WalletAccount, error) 207 //合并钱包余额 208 MergeBalance(ctx context.Context, in *ReqWalletMergeBalance, opts ...grpc.CallOption) (*ReplyHashes, error) 209 //设置钱包密码 210 SetPasswd(ctx context.Context, in *ReqWalletSetPasswd, opts ...grpc.CallOption) (*Reply, error) 211 //给钱包上锁 212 Lock(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) 213 //给钱包解锁 214 UnLock(ctx context.Context, in *WalletUnLock, opts ...grpc.CallOption) (*Reply, error) 215 //获取最新的Mempool 216 GetLastMemPool(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*ReplyTxList, error) 217 //获取最新的ProperFee 218 GetProperFee(ctx context.Context, in *ReqProperFee, opts ...grpc.CallOption) (*ReplyProperFee, error) 219 // 获取钱包状态 220 GetWalletStatus(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*WalletStatus, error) 221 //区块浏览器接口 222 /// 223 GetBlockOverview(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*BlockOverview, error) 224 GetAddrOverview(ctx context.Context, in *ReqAddr, opts ...grpc.CallOption) (*AddrOverview, error) 225 GetBlockHash(ctx context.Context, in *ReqInt, opts ...grpc.CallOption) (*ReplyHash, error) 226 // seed 227 // 创建seed 228 GenSeed(ctx context.Context, in *GenSeedLang, opts ...grpc.CallOption) (*ReplySeed, error) 229 //获取seed 230 GetSeed(ctx context.Context, in *GetSeedByPw, opts ...grpc.CallOption) (*ReplySeed, error) 231 //保存seed 232 SaveSeed(ctx context.Context, in *SaveSeedByPw, opts ...grpc.CallOption) (*Reply, error) 233 // Balance Query 234 //获取余额 235 GetBalance(ctx context.Context, in *ReqBalance, opts ...grpc.CallOption) (*Accounts, error) 236 QueryChain(ctx context.Context, in *ChainExecutor, opts ...grpc.CallOption) (*Reply, error) 237 ExecWallet(ctx context.Context, in *ChainExecutor, opts ...grpc.CallOption) (*Reply, error) 238 QueryConsensus(ctx context.Context, in *ChainExecutor, opts ...grpc.CallOption) (*Reply, error) 239 CreateTransaction(ctx context.Context, in *CreateTxIn, opts ...grpc.CallOption) (*UnsignTx, error) 240 //获取交易的十六进制编码 241 GetHexTxByHash(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*HexTx, error) 242 // 导出私钥 243 DumpPrivkey(ctx context.Context, in *ReqString, opts ...grpc.CallOption) (*ReplyString, error) 244 // 导出全部私钥到文件 245 DumpPrivkeysFile(ctx context.Context, in *ReqPrivkeysFile, opts ...grpc.CallOption) (*Reply, error) 246 // 从文件中批量导入私钥 247 ImportPrivkeysFile(ctx context.Context, in *ReqPrivkeysFile, opts ...grpc.CallOption) (*Reply, error) 248 //获取程序版本 249 Version(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*VersionInfo, error) 250 //是否同步 251 IsSync(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) 252 //获取当前节点连接的其他节点信息 253 GetPeerInfo(ctx context.Context, in *P2PGetPeerReq, opts ...grpc.CallOption) (*PeerList, error) 254 //获取当前节点的网络信息 255 NetInfo(ctx context.Context, in *P2PGetNetInfoReq, opts ...grpc.CallOption) (*NodeNetInfo, error) 256 // ntpclock是否同步 257 IsNtpClockSync(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) 258 //获取系统致命故障信息 259 GetFatalFailure(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Int32, error) 260 GetLastBlockSequence(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Int64, error) 261 // get add block's sequence by hash 262 GetSequenceByHash(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*Int64, error) 263 //通过block hash 获取对应的blocks信息 264 GetBlockByHashes(ctx context.Context, in *ReqHashes, opts ...grpc.CallOption) (*BlockDetails, error) 265 //通过block seq 获取对应的blocks hash 信息 266 GetBlockBySeq(ctx context.Context, in *Int64, opts ...grpc.CallOption) (*BlockSeq, error) 267 //关闭turingchain 268 CloseQueue(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) 269 //获取地址所以合约下的余额 270 GetAllExecBalance(ctx context.Context, in *ReqAllExecBalance, opts ...grpc.CallOption) (*AllExecBalance, error) 271 //签名交易 272 SignRawTx(ctx context.Context, in *ReqSignRawTx, opts ...grpc.CallOption) (*ReplySignRawTx, error) 273 CreateNoBalanceTransaction(ctx context.Context, in *NoBalanceTx, opts ...grpc.CallOption) (*ReplySignRawTx, error) 274 // 获取随机HASH 275 QueryRandNum(ctx context.Context, in *ReqRandHash, opts ...grpc.CallOption) (*ReplyHash, error) 276 // 获取是否达到fork高度 277 GetFork(ctx context.Context, in *ReqKey, opts ...grpc.CallOption) (*Int64, error) 278 CreateNoBalanceTxs(ctx context.Context, in *NoBalanceTxs, opts ...grpc.CallOption) (*ReplySignRawTx, error) 279 //通过seq以及title获取对应平行连的交易 280 GetParaTxByTitle(ctx context.Context, in *ReqParaTxByTitle, opts ...grpc.CallOption) (*ParaTxDetails, error) 281 //获取拥有此title交易的区块高度 282 LoadParaTxByTitle(ctx context.Context, in *ReqHeightByTitle, opts ...grpc.CallOption) (*ReplyHeightByTitle, error) 283 //通过区块高度列表+title获取平行链交易 284 GetParaTxByHeight(ctx context.Context, in *ReqParaTxByHeight, opts ...grpc.CallOption) (*ParaTxDetails, error) 285 //获取区块头信息 286 GetHeaders(ctx context.Context, in *ReqBlocks, opts ...grpc.CallOption) (*Headers, error) 287 // get server time 288 GetServerTime(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*ServerTime, error) 289 } 290 291 type turingchainClient struct { 292 cc grpc.ClientConnInterface 293 } 294 295 func NewTuringchainClient(cc grpc.ClientConnInterface) TuringchainClient { 296 return &turingchainClient{cc} 297 } 298 299 func (c *turingchainClient) GetBlocks(ctx context.Context, in *ReqBlocks, opts ...grpc.CallOption) (*Reply, error) { 300 out := new(Reply) 301 err := c.cc.Invoke(ctx, "/types.turingchain/GetBlocks", in, out, opts...) 302 if err != nil { 303 return nil, err 304 } 305 return out, nil 306 } 307 308 func (c *turingchainClient) GetLastHeader(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Header, error) { 309 out := new(Header) 310 err := c.cc.Invoke(ctx, "/types.turingchain/GetLastHeader", in, out, opts...) 311 if err != nil { 312 return nil, err 313 } 314 return out, nil 315 } 316 317 func (c *turingchainClient) CreateRawTransaction(ctx context.Context, in *CreateTx, opts ...grpc.CallOption) (*UnsignTx, error) { 318 out := new(UnsignTx) 319 err := c.cc.Invoke(ctx, "/types.turingchain/CreateRawTransaction", in, out, opts...) 320 if err != nil { 321 return nil, err 322 } 323 return out, nil 324 } 325 326 func (c *turingchainClient) CreateRawTxGroup(ctx context.Context, in *CreateTransactionGroup, opts ...grpc.CallOption) (*UnsignTx, error) { 327 out := new(UnsignTx) 328 err := c.cc.Invoke(ctx, "/types.turingchain/CreateRawTxGroup", in, out, opts...) 329 if err != nil { 330 return nil, err 331 } 332 return out, nil 333 } 334 335 func (c *turingchainClient) QueryTransaction(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*TransactionDetail, error) { 336 out := new(TransactionDetail) 337 err := c.cc.Invoke(ctx, "/types.turingchain/QueryTransaction", in, out, opts...) 338 if err != nil { 339 return nil, err 340 } 341 return out, nil 342 } 343 344 func (c *turingchainClient) SendTransactionSync(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Reply, error) { 345 out := new(Reply) 346 err := c.cc.Invoke(ctx, "/types.turingchain/SendTransactionSync", in, out, opts...) 347 if err != nil { 348 return nil, err 349 } 350 return out, nil 351 } 352 353 func (c *turingchainClient) SendTransaction(ctx context.Context, in *Transaction, opts ...grpc.CallOption) (*Reply, error) { 354 out := new(Reply) 355 err := c.cc.Invoke(ctx, "/types.turingchain/SendTransaction", in, out, opts...) 356 if err != nil { 357 return nil, err 358 } 359 return out, nil 360 } 361 362 func (c *turingchainClient) GetTransactionByAddr(ctx context.Context, in *ReqAddr, opts ...grpc.CallOption) (*ReplyTxInfos, error) { 363 out := new(ReplyTxInfos) 364 err := c.cc.Invoke(ctx, "/types.turingchain/GetTransactionByAddr", in, out, opts...) 365 if err != nil { 366 return nil, err 367 } 368 return out, nil 369 } 370 371 func (c *turingchainClient) GetTransactionByHashes(ctx context.Context, in *ReqHashes, opts ...grpc.CallOption) (*TransactionDetails, error) { 372 out := new(TransactionDetails) 373 err := c.cc.Invoke(ctx, "/types.turingchain/GetTransactionByHashes", in, out, opts...) 374 if err != nil { 375 return nil, err 376 } 377 return out, nil 378 } 379 380 func (c *turingchainClient) GetMemPool(ctx context.Context, in *ReqGetMempool, opts ...grpc.CallOption) (*ReplyTxList, error) { 381 out := new(ReplyTxList) 382 err := c.cc.Invoke(ctx, "/types.turingchain/GetMemPool", in, out, opts...) 383 if err != nil { 384 return nil, err 385 } 386 return out, nil 387 } 388 389 func (c *turingchainClient) GetAccounts(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*WalletAccounts, error) { 390 out := new(WalletAccounts) 391 err := c.cc.Invoke(ctx, "/types.turingchain/GetAccounts", in, out, opts...) 392 if err != nil { 393 return nil, err 394 } 395 return out, nil 396 } 397 398 func (c *turingchainClient) GetAccount(ctx context.Context, in *ReqGetAccount, opts ...grpc.CallOption) (*WalletAccount, error) { 399 out := new(WalletAccount) 400 err := c.cc.Invoke(ctx, "/types.turingchain/GetAccount", in, out, opts...) 401 if err != nil { 402 return nil, err 403 } 404 return out, nil 405 } 406 407 func (c *turingchainClient) NewAccount(ctx context.Context, in *ReqNewAccount, opts ...grpc.CallOption) (*WalletAccount, error) { 408 out := new(WalletAccount) 409 err := c.cc.Invoke(ctx, "/types.turingchain/NewAccount", in, out, opts...) 410 if err != nil { 411 return nil, err 412 } 413 return out, nil 414 } 415 416 func (c *turingchainClient) WalletTransactionList(ctx context.Context, in *ReqWalletTransactionList, opts ...grpc.CallOption) (*WalletTxDetails, error) { 417 out := new(WalletTxDetails) 418 err := c.cc.Invoke(ctx, "/types.turingchain/WalletTransactionList", in, out, opts...) 419 if err != nil { 420 return nil, err 421 } 422 return out, nil 423 } 424 425 func (c *turingchainClient) ImportPrivkey(ctx context.Context, in *ReqWalletImportPrivkey, opts ...grpc.CallOption) (*WalletAccount, error) { 426 out := new(WalletAccount) 427 err := c.cc.Invoke(ctx, "/types.turingchain/ImportPrivkey", in, out, opts...) 428 if err != nil { 429 return nil, err 430 } 431 return out, nil 432 } 433 434 func (c *turingchainClient) SendToAddress(ctx context.Context, in *ReqWalletSendToAddress, opts ...grpc.CallOption) (*ReplyHash, error) { 435 out := new(ReplyHash) 436 err := c.cc.Invoke(ctx, "/types.turingchain/SendToAddress", in, out, opts...) 437 if err != nil { 438 return nil, err 439 } 440 return out, nil 441 } 442 443 func (c *turingchainClient) SetTxFee(ctx context.Context, in *ReqWalletSetFee, opts ...grpc.CallOption) (*Reply, error) { 444 out := new(Reply) 445 err := c.cc.Invoke(ctx, "/types.turingchain/SetTxFee", in, out, opts...) 446 if err != nil { 447 return nil, err 448 } 449 return out, nil 450 } 451 452 func (c *turingchainClient) SetLabl(ctx context.Context, in *ReqWalletSetLabel, opts ...grpc.CallOption) (*WalletAccount, error) { 453 out := new(WalletAccount) 454 err := c.cc.Invoke(ctx, "/types.turingchain/SetLabl", in, out, opts...) 455 if err != nil { 456 return nil, err 457 } 458 return out, nil 459 } 460 461 func (c *turingchainClient) MergeBalance(ctx context.Context, in *ReqWalletMergeBalance, opts ...grpc.CallOption) (*ReplyHashes, error) { 462 out := new(ReplyHashes) 463 err := c.cc.Invoke(ctx, "/types.turingchain/MergeBalance", in, out, opts...) 464 if err != nil { 465 return nil, err 466 } 467 return out, nil 468 } 469 470 func (c *turingchainClient) SetPasswd(ctx context.Context, in *ReqWalletSetPasswd, opts ...grpc.CallOption) (*Reply, error) { 471 out := new(Reply) 472 err := c.cc.Invoke(ctx, "/types.turingchain/SetPasswd", in, out, opts...) 473 if err != nil { 474 return nil, err 475 } 476 return out, nil 477 } 478 479 func (c *turingchainClient) Lock(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) { 480 out := new(Reply) 481 err := c.cc.Invoke(ctx, "/types.turingchain/Lock", in, out, opts...) 482 if err != nil { 483 return nil, err 484 } 485 return out, nil 486 } 487 488 func (c *turingchainClient) UnLock(ctx context.Context, in *WalletUnLock, opts ...grpc.CallOption) (*Reply, error) { 489 out := new(Reply) 490 err := c.cc.Invoke(ctx, "/types.turingchain/UnLock", in, out, opts...) 491 if err != nil { 492 return nil, err 493 } 494 return out, nil 495 } 496 497 func (c *turingchainClient) GetLastMemPool(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*ReplyTxList, error) { 498 out := new(ReplyTxList) 499 err := c.cc.Invoke(ctx, "/types.turingchain/GetLastMemPool", in, out, opts...) 500 if err != nil { 501 return nil, err 502 } 503 return out, nil 504 } 505 506 func (c *turingchainClient) GetProperFee(ctx context.Context, in *ReqProperFee, opts ...grpc.CallOption) (*ReplyProperFee, error) { 507 out := new(ReplyProperFee) 508 err := c.cc.Invoke(ctx, "/types.turingchain/GetProperFee", in, out, opts...) 509 if err != nil { 510 return nil, err 511 } 512 return out, nil 513 } 514 515 func (c *turingchainClient) GetWalletStatus(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*WalletStatus, error) { 516 out := new(WalletStatus) 517 err := c.cc.Invoke(ctx, "/types.turingchain/GetWalletStatus", in, out, opts...) 518 if err != nil { 519 return nil, err 520 } 521 return out, nil 522 } 523 524 func (c *turingchainClient) GetBlockOverview(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*BlockOverview, error) { 525 out := new(BlockOverview) 526 err := c.cc.Invoke(ctx, "/types.turingchain/GetBlockOverview", in, out, opts...) 527 if err != nil { 528 return nil, err 529 } 530 return out, nil 531 } 532 533 func (c *turingchainClient) GetAddrOverview(ctx context.Context, in *ReqAddr, opts ...grpc.CallOption) (*AddrOverview, error) { 534 out := new(AddrOverview) 535 err := c.cc.Invoke(ctx, "/types.turingchain/GetAddrOverview", in, out, opts...) 536 if err != nil { 537 return nil, err 538 } 539 return out, nil 540 } 541 542 func (c *turingchainClient) GetBlockHash(ctx context.Context, in *ReqInt, opts ...grpc.CallOption) (*ReplyHash, error) { 543 out := new(ReplyHash) 544 err := c.cc.Invoke(ctx, "/types.turingchain/GetBlockHash", in, out, opts...) 545 if err != nil { 546 return nil, err 547 } 548 return out, nil 549 } 550 551 func (c *turingchainClient) GenSeed(ctx context.Context, in *GenSeedLang, opts ...grpc.CallOption) (*ReplySeed, error) { 552 out := new(ReplySeed) 553 err := c.cc.Invoke(ctx, "/types.turingchain/GenSeed", in, out, opts...) 554 if err != nil { 555 return nil, err 556 } 557 return out, nil 558 } 559 560 func (c *turingchainClient) GetSeed(ctx context.Context, in *GetSeedByPw, opts ...grpc.CallOption) (*ReplySeed, error) { 561 out := new(ReplySeed) 562 err := c.cc.Invoke(ctx, "/types.turingchain/GetSeed", in, out, opts...) 563 if err != nil { 564 return nil, err 565 } 566 return out, nil 567 } 568 569 func (c *turingchainClient) SaveSeed(ctx context.Context, in *SaveSeedByPw, opts ...grpc.CallOption) (*Reply, error) { 570 out := new(Reply) 571 err := c.cc.Invoke(ctx, "/types.turingchain/SaveSeed", in, out, opts...) 572 if err != nil { 573 return nil, err 574 } 575 return out, nil 576 } 577 578 func (c *turingchainClient) GetBalance(ctx context.Context, in *ReqBalance, opts ...grpc.CallOption) (*Accounts, error) { 579 out := new(Accounts) 580 err := c.cc.Invoke(ctx, "/types.turingchain/GetBalance", in, out, opts...) 581 if err != nil { 582 return nil, err 583 } 584 return out, nil 585 } 586 587 func (c *turingchainClient) QueryChain(ctx context.Context, in *ChainExecutor, opts ...grpc.CallOption) (*Reply, error) { 588 out := new(Reply) 589 err := c.cc.Invoke(ctx, "/types.turingchain/QueryChain", in, out, opts...) 590 if err != nil { 591 return nil, err 592 } 593 return out, nil 594 } 595 596 func (c *turingchainClient) ExecWallet(ctx context.Context, in *ChainExecutor, opts ...grpc.CallOption) (*Reply, error) { 597 out := new(Reply) 598 err := c.cc.Invoke(ctx, "/types.turingchain/ExecWallet", in, out, opts...) 599 if err != nil { 600 return nil, err 601 } 602 return out, nil 603 } 604 605 func (c *turingchainClient) QueryConsensus(ctx context.Context, in *ChainExecutor, opts ...grpc.CallOption) (*Reply, error) { 606 out := new(Reply) 607 err := c.cc.Invoke(ctx, "/types.turingchain/QueryConsensus", in, out, opts...) 608 if err != nil { 609 return nil, err 610 } 611 return out, nil 612 } 613 614 func (c *turingchainClient) CreateTransaction(ctx context.Context, in *CreateTxIn, opts ...grpc.CallOption) (*UnsignTx, error) { 615 out := new(UnsignTx) 616 err := c.cc.Invoke(ctx, "/types.turingchain/CreateTransaction", in, out, opts...) 617 if err != nil { 618 return nil, err 619 } 620 return out, nil 621 } 622 623 func (c *turingchainClient) GetHexTxByHash(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*HexTx, error) { 624 out := new(HexTx) 625 err := c.cc.Invoke(ctx, "/types.turingchain/GetHexTxByHash", in, out, opts...) 626 if err != nil { 627 return nil, err 628 } 629 return out, nil 630 } 631 632 func (c *turingchainClient) DumpPrivkey(ctx context.Context, in *ReqString, opts ...grpc.CallOption) (*ReplyString, error) { 633 out := new(ReplyString) 634 err := c.cc.Invoke(ctx, "/types.turingchain/DumpPrivkey", in, out, opts...) 635 if err != nil { 636 return nil, err 637 } 638 return out, nil 639 } 640 641 func (c *turingchainClient) DumpPrivkeysFile(ctx context.Context, in *ReqPrivkeysFile, opts ...grpc.CallOption) (*Reply, error) { 642 out := new(Reply) 643 err := c.cc.Invoke(ctx, "/types.turingchain/DumpPrivkeysFile", in, out, opts...) 644 if err != nil { 645 return nil, err 646 } 647 return out, nil 648 } 649 650 func (c *turingchainClient) ImportPrivkeysFile(ctx context.Context, in *ReqPrivkeysFile, opts ...grpc.CallOption) (*Reply, error) { 651 out := new(Reply) 652 err := c.cc.Invoke(ctx, "/types.turingchain/ImportPrivkeysFile", in, out, opts...) 653 if err != nil { 654 return nil, err 655 } 656 return out, nil 657 } 658 659 func (c *turingchainClient) Version(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*VersionInfo, error) { 660 out := new(VersionInfo) 661 err := c.cc.Invoke(ctx, "/types.turingchain/Version", in, out, opts...) 662 if err != nil { 663 return nil, err 664 } 665 return out, nil 666 } 667 668 func (c *turingchainClient) IsSync(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) { 669 out := new(Reply) 670 err := c.cc.Invoke(ctx, "/types.turingchain/IsSync", in, out, opts...) 671 if err != nil { 672 return nil, err 673 } 674 return out, nil 675 } 676 677 func (c *turingchainClient) GetPeerInfo(ctx context.Context, in *P2PGetPeerReq, opts ...grpc.CallOption) (*PeerList, error) { 678 out := new(PeerList) 679 err := c.cc.Invoke(ctx, "/types.turingchain/GetPeerInfo", in, out, opts...) 680 if err != nil { 681 return nil, err 682 } 683 return out, nil 684 } 685 686 func (c *turingchainClient) NetInfo(ctx context.Context, in *P2PGetNetInfoReq, opts ...grpc.CallOption) (*NodeNetInfo, error) { 687 out := new(NodeNetInfo) 688 err := c.cc.Invoke(ctx, "/types.turingchain/NetInfo", in, out, opts...) 689 if err != nil { 690 return nil, err 691 } 692 return out, nil 693 } 694 695 func (c *turingchainClient) IsNtpClockSync(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) { 696 out := new(Reply) 697 err := c.cc.Invoke(ctx, "/types.turingchain/IsNtpClockSync", in, out, opts...) 698 if err != nil { 699 return nil, err 700 } 701 return out, nil 702 } 703 704 func (c *turingchainClient) GetFatalFailure(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Int32, error) { 705 out := new(Int32) 706 err := c.cc.Invoke(ctx, "/types.turingchain/GetFatalFailure", in, out, opts...) 707 if err != nil { 708 return nil, err 709 } 710 return out, nil 711 } 712 713 func (c *turingchainClient) GetLastBlockSequence(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Int64, error) { 714 out := new(Int64) 715 err := c.cc.Invoke(ctx, "/types.turingchain/GetLastBlockSequence", in, out, opts...) 716 if err != nil { 717 return nil, err 718 } 719 return out, nil 720 } 721 722 func (c *turingchainClient) GetSequenceByHash(ctx context.Context, in *ReqHash, opts ...grpc.CallOption) (*Int64, error) { 723 out := new(Int64) 724 err := c.cc.Invoke(ctx, "/types.turingchain/GetSequenceByHash", in, out, opts...) 725 if err != nil { 726 return nil, err 727 } 728 return out, nil 729 } 730 731 func (c *turingchainClient) GetBlockByHashes(ctx context.Context, in *ReqHashes, opts ...grpc.CallOption) (*BlockDetails, error) { 732 out := new(BlockDetails) 733 err := c.cc.Invoke(ctx, "/types.turingchain/GetBlockByHashes", in, out, opts...) 734 if err != nil { 735 return nil, err 736 } 737 return out, nil 738 } 739 740 func (c *turingchainClient) GetBlockBySeq(ctx context.Context, in *Int64, opts ...grpc.CallOption) (*BlockSeq, error) { 741 out := new(BlockSeq) 742 err := c.cc.Invoke(ctx, "/types.turingchain/GetBlockBySeq", in, out, opts...) 743 if err != nil { 744 return nil, err 745 } 746 return out, nil 747 } 748 749 func (c *turingchainClient) CloseQueue(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*Reply, error) { 750 out := new(Reply) 751 err := c.cc.Invoke(ctx, "/types.turingchain/CloseQueue", in, out, opts...) 752 if err != nil { 753 return nil, err 754 } 755 return out, nil 756 } 757 758 func (c *turingchainClient) GetAllExecBalance(ctx context.Context, in *ReqAllExecBalance, opts ...grpc.CallOption) (*AllExecBalance, error) { 759 out := new(AllExecBalance) 760 err := c.cc.Invoke(ctx, "/types.turingchain/GetAllExecBalance", in, out, opts...) 761 if err != nil { 762 return nil, err 763 } 764 return out, nil 765 } 766 767 func (c *turingchainClient) SignRawTx(ctx context.Context, in *ReqSignRawTx, opts ...grpc.CallOption) (*ReplySignRawTx, error) { 768 out := new(ReplySignRawTx) 769 err := c.cc.Invoke(ctx, "/types.turingchain/SignRawTx", in, out, opts...) 770 if err != nil { 771 return nil, err 772 } 773 return out, nil 774 } 775 776 func (c *turingchainClient) CreateNoBalanceTransaction(ctx context.Context, in *NoBalanceTx, opts ...grpc.CallOption) (*ReplySignRawTx, error) { 777 out := new(ReplySignRawTx) 778 err := c.cc.Invoke(ctx, "/types.turingchain/CreateNoBalanceTransaction", in, out, opts...) 779 if err != nil { 780 return nil, err 781 } 782 return out, nil 783 } 784 785 func (c *turingchainClient) QueryRandNum(ctx context.Context, in *ReqRandHash, opts ...grpc.CallOption) (*ReplyHash, error) { 786 out := new(ReplyHash) 787 err := c.cc.Invoke(ctx, "/types.turingchain/QueryRandNum", in, out, opts...) 788 if err != nil { 789 return nil, err 790 } 791 return out, nil 792 } 793 794 func (c *turingchainClient) GetFork(ctx context.Context, in *ReqKey, opts ...grpc.CallOption) (*Int64, error) { 795 out := new(Int64) 796 err := c.cc.Invoke(ctx, "/types.turingchain/GetFork", in, out, opts...) 797 if err != nil { 798 return nil, err 799 } 800 return out, nil 801 } 802 803 func (c *turingchainClient) CreateNoBalanceTxs(ctx context.Context, in *NoBalanceTxs, opts ...grpc.CallOption) (*ReplySignRawTx, error) { 804 out := new(ReplySignRawTx) 805 err := c.cc.Invoke(ctx, "/types.turingchain/CreateNoBalanceTxs", in, out, opts...) 806 if err != nil { 807 return nil, err 808 } 809 return out, nil 810 } 811 812 func (c *turingchainClient) GetParaTxByTitle(ctx context.Context, in *ReqParaTxByTitle, opts ...grpc.CallOption) (*ParaTxDetails, error) { 813 out := new(ParaTxDetails) 814 err := c.cc.Invoke(ctx, "/types.turingchain/GetParaTxByTitle", in, out, opts...) 815 if err != nil { 816 return nil, err 817 } 818 return out, nil 819 } 820 821 func (c *turingchainClient) LoadParaTxByTitle(ctx context.Context, in *ReqHeightByTitle, opts ...grpc.CallOption) (*ReplyHeightByTitle, error) { 822 out := new(ReplyHeightByTitle) 823 err := c.cc.Invoke(ctx, "/types.turingchain/LoadParaTxByTitle", in, out, opts...) 824 if err != nil { 825 return nil, err 826 } 827 return out, nil 828 } 829 830 func (c *turingchainClient) GetParaTxByHeight(ctx context.Context, in *ReqParaTxByHeight, opts ...grpc.CallOption) (*ParaTxDetails, error) { 831 out := new(ParaTxDetails) 832 err := c.cc.Invoke(ctx, "/types.turingchain/GetParaTxByHeight", in, out, opts...) 833 if err != nil { 834 return nil, err 835 } 836 return out, nil 837 } 838 839 func (c *turingchainClient) GetHeaders(ctx context.Context, in *ReqBlocks, opts ...grpc.CallOption) (*Headers, error) { 840 out := new(Headers) 841 err := c.cc.Invoke(ctx, "/types.turingchain/GetHeaders", in, out, opts...) 842 if err != nil { 843 return nil, err 844 } 845 return out, nil 846 } 847 848 func (c *turingchainClient) GetServerTime(ctx context.Context, in *ReqNil, opts ...grpc.CallOption) (*ServerTime, error) { 849 out := new(ServerTime) 850 err := c.cc.Invoke(ctx, "/types.turingchain/GetServerTime", in, out, opts...) 851 if err != nil { 852 return nil, err 853 } 854 return out, nil 855 } 856 857 // TuringchainServer is the server API for Turingchain service. 858 type TuringchainServer interface { 859 // turingchain 对外提供服务的接口 860 //区块链接口 861 GetBlocks(context.Context, *ReqBlocks) (*Reply, error) 862 //获取最新的区块头 863 GetLastHeader(context.Context, *ReqNil) (*Header, error) 864 //交易接口 865 CreateRawTransaction(context.Context, *CreateTx) (*UnsignTx, error) 866 CreateRawTxGroup(context.Context, *CreateTransactionGroup) (*UnsignTx, error) 867 // 根据哈希查询交易 868 QueryTransaction(context.Context, *ReqHash) (*TransactionDetail, error) 869 // 发送交易&&根据哈希查询交易 870 SendTransactionSync(context.Context, *Transaction) (*Reply, error) 871 // 发送交易 872 SendTransaction(context.Context, *Transaction) (*Reply, error) 873 //通过地址获取交易信息 874 GetTransactionByAddr(context.Context, *ReqAddr) (*ReplyTxInfos, error) 875 //通过哈希数组获取对应的交易 876 GetTransactionByHashes(context.Context, *ReqHashes) (*TransactionDetails, error) 877 //缓存接口 878 GetMemPool(context.Context, *ReqGetMempool) (*ReplyTxList, error) 879 //钱包接口 880 //获取钱包账户信息 881 GetAccounts(context.Context, *ReqNil) (*WalletAccounts, error) 882 //根据账户lable信息获取账户地址 883 GetAccount(context.Context, *ReqGetAccount) (*WalletAccount, error) 884 //创建钱包账户 885 NewAccount(context.Context, *ReqNewAccount) (*WalletAccount, error) 886 //获取钱包的交易列表 887 WalletTransactionList(context.Context, *ReqWalletTransactionList) (*WalletTxDetails, error) 888 //导入钱包私钥 889 ImportPrivkey(context.Context, *ReqWalletImportPrivkey) (*WalletAccount, error) 890 // 发送交易 891 SendToAddress(context.Context, *ReqWalletSendToAddress) (*ReplyHash, error) 892 //设置交易手续费 893 SetTxFee(context.Context, *ReqWalletSetFee) (*Reply, error) 894 //设置标签 895 SetLabl(context.Context, *ReqWalletSetLabel) (*WalletAccount, error) 896 //合并钱包余额 897 MergeBalance(context.Context, *ReqWalletMergeBalance) (*ReplyHashes, error) 898 //设置钱包密码 899 SetPasswd(context.Context, *ReqWalletSetPasswd) (*Reply, error) 900 //给钱包上锁 901 Lock(context.Context, *ReqNil) (*Reply, error) 902 //给钱包解锁 903 UnLock(context.Context, *WalletUnLock) (*Reply, error) 904 //获取最新的Mempool 905 GetLastMemPool(context.Context, *ReqNil) (*ReplyTxList, error) 906 //获取最新的ProperFee 907 GetProperFee(context.Context, *ReqProperFee) (*ReplyProperFee, error) 908 // 获取钱包状态 909 GetWalletStatus(context.Context, *ReqNil) (*WalletStatus, error) 910 //区块浏览器接口 911 /// 912 GetBlockOverview(context.Context, *ReqHash) (*BlockOverview, error) 913 GetAddrOverview(context.Context, *ReqAddr) (*AddrOverview, error) 914 GetBlockHash(context.Context, *ReqInt) (*ReplyHash, error) 915 // seed 916 // 创建seed 917 GenSeed(context.Context, *GenSeedLang) (*ReplySeed, error) 918 //获取seed 919 GetSeed(context.Context, *GetSeedByPw) (*ReplySeed, error) 920 //保存seed 921 SaveSeed(context.Context, *SaveSeedByPw) (*Reply, error) 922 // Balance Query 923 //获取余额 924 GetBalance(context.Context, *ReqBalance) (*Accounts, error) 925 QueryChain(context.Context, *ChainExecutor) (*Reply, error) 926 ExecWallet(context.Context, *ChainExecutor) (*Reply, error) 927 QueryConsensus(context.Context, *ChainExecutor) (*Reply, error) 928 CreateTransaction(context.Context, *CreateTxIn) (*UnsignTx, error) 929 //获取交易的十六进制编码 930 GetHexTxByHash(context.Context, *ReqHash) (*HexTx, error) 931 // 导出私钥 932 DumpPrivkey(context.Context, *ReqString) (*ReplyString, error) 933 // 导出全部私钥到文件 934 DumpPrivkeysFile(context.Context, *ReqPrivkeysFile) (*Reply, error) 935 // 从文件中批量导入私钥 936 ImportPrivkeysFile(context.Context, *ReqPrivkeysFile) (*Reply, error) 937 //获取程序版本 938 Version(context.Context, *ReqNil) (*VersionInfo, error) 939 //是否同步 940 IsSync(context.Context, *ReqNil) (*Reply, error) 941 //获取当前节点连接的其他节点信息 942 GetPeerInfo(context.Context, *P2PGetPeerReq) (*PeerList, error) 943 //获取当前节点的网络信息 944 NetInfo(context.Context, *P2PGetNetInfoReq) (*NodeNetInfo, error) 945 // ntpclock是否同步 946 IsNtpClockSync(context.Context, *ReqNil) (*Reply, error) 947 //获取系统致命故障信息 948 GetFatalFailure(context.Context, *ReqNil) (*Int32, error) 949 GetLastBlockSequence(context.Context, *ReqNil) (*Int64, error) 950 // get add block's sequence by hash 951 GetSequenceByHash(context.Context, *ReqHash) (*Int64, error) 952 //通过block hash 获取对应的blocks信息 953 GetBlockByHashes(context.Context, *ReqHashes) (*BlockDetails, error) 954 //通过block seq 获取对应的blocks hash 信息 955 GetBlockBySeq(context.Context, *Int64) (*BlockSeq, error) 956 //关闭turingchain 957 CloseQueue(context.Context, *ReqNil) (*Reply, error) 958 //获取地址所以合约下的余额 959 GetAllExecBalance(context.Context, *ReqAllExecBalance) (*AllExecBalance, error) 960 //签名交易 961 SignRawTx(context.Context, *ReqSignRawTx) (*ReplySignRawTx, error) 962 CreateNoBalanceTransaction(context.Context, *NoBalanceTx) (*ReplySignRawTx, error) 963 // 获取随机HASH 964 QueryRandNum(context.Context, *ReqRandHash) (*ReplyHash, error) 965 // 获取是否达到fork高度 966 GetFork(context.Context, *ReqKey) (*Int64, error) 967 CreateNoBalanceTxs(context.Context, *NoBalanceTxs) (*ReplySignRawTx, error) 968 //通过seq以及title获取对应平行连的交易 969 GetParaTxByTitle(context.Context, *ReqParaTxByTitle) (*ParaTxDetails, error) 970 //获取拥有此title交易的区块高度 971 LoadParaTxByTitle(context.Context, *ReqHeightByTitle) (*ReplyHeightByTitle, error) 972 //通过区块高度列表+title获取平行链交易 973 GetParaTxByHeight(context.Context, *ReqParaTxByHeight) (*ParaTxDetails, error) 974 //获取区块头信息 975 GetHeaders(context.Context, *ReqBlocks) (*Headers, error) 976 // get server time 977 GetServerTime(context.Context, *ReqNil) (*ServerTime, error) 978 } 979 980 // UnimplementedTuringchainServer can be embedded to have forward compatible implementations. 981 type UnimplementedTuringchainServer struct { 982 } 983 984 func (*UnimplementedTuringchainServer) GetBlocks(ctx context.Context, req *ReqBlocks) (*Reply, error) { 985 return nil, status.Errorf(codes.Unimplemented, "method GetBlocks not implemented") 986 } 987 func (*UnimplementedTuringchainServer) GetLastHeader(ctx context.Context, req *ReqNil) (*Header, error) { 988 return nil, status.Errorf(codes.Unimplemented, "method GetLastHeader not implemented") 989 } 990 func (*UnimplementedTuringchainServer) CreateRawTransaction(ctx context.Context, req *CreateTx) (*UnsignTx, error) { 991 return nil, status.Errorf(codes.Unimplemented, "method CreateRawTransaction not implemented") 992 } 993 func (*UnimplementedTuringchainServer) CreateRawTxGroup(ctx context.Context, req *CreateTransactionGroup) (*UnsignTx, error) { 994 return nil, status.Errorf(codes.Unimplemented, "method CreateRawTxGroup not implemented") 995 } 996 func (*UnimplementedTuringchainServer) QueryTransaction(ctx context.Context, req *ReqHash) (*TransactionDetail, error) { 997 return nil, status.Errorf(codes.Unimplemented, "method QueryTransaction not implemented") 998 } 999 func (*UnimplementedTuringchainServer) SendTransactionSync(ctx context.Context, req *Transaction) (*Reply, error) { 1000 return nil, status.Errorf(codes.Unimplemented, "method SendTransactionSync not implemented") 1001 } 1002 func (*UnimplementedTuringchainServer) SendTransaction(ctx context.Context, req *Transaction) (*Reply, error) { 1003 return nil, status.Errorf(codes.Unimplemented, "method SendTransaction not implemented") 1004 } 1005 func (*UnimplementedTuringchainServer) GetTransactionByAddr(ctx context.Context, req *ReqAddr) (*ReplyTxInfos, error) { 1006 return nil, status.Errorf(codes.Unimplemented, "method GetTransactionByAddr not implemented") 1007 } 1008 func (*UnimplementedTuringchainServer) GetTransactionByHashes(ctx context.Context, req *ReqHashes) (*TransactionDetails, error) { 1009 return nil, status.Errorf(codes.Unimplemented, "method GetTransactionByHashes not implemented") 1010 } 1011 func (*UnimplementedTuringchainServer) GetMemPool(ctx context.Context, req *ReqGetMempool) (*ReplyTxList, error) { 1012 return nil, status.Errorf(codes.Unimplemented, "method GetMemPool not implemented") 1013 } 1014 func (*UnimplementedTuringchainServer) GetAccounts(ctx context.Context, req *ReqNil) (*WalletAccounts, error) { 1015 return nil, status.Errorf(codes.Unimplemented, "method GetAccounts not implemented") 1016 } 1017 func (*UnimplementedTuringchainServer) GetAccount(ctx context.Context, req *ReqGetAccount) (*WalletAccount, error) { 1018 return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") 1019 } 1020 func (*UnimplementedTuringchainServer) NewAccount(ctx context.Context, req *ReqNewAccount) (*WalletAccount, error) { 1021 return nil, status.Errorf(codes.Unimplemented, "method NewAccount not implemented") 1022 } 1023 func (*UnimplementedTuringchainServer) WalletTransactionList(ctx context.Context, req *ReqWalletTransactionList) (*WalletTxDetails, error) { 1024 return nil, status.Errorf(codes.Unimplemented, "method WalletTransactionList not implemented") 1025 } 1026 func (*UnimplementedTuringchainServer) ImportPrivkey(ctx context.Context, req *ReqWalletImportPrivkey) (*WalletAccount, error) { 1027 return nil, status.Errorf(codes.Unimplemented, "method ImportPrivkey not implemented") 1028 } 1029 func (*UnimplementedTuringchainServer) SendToAddress(ctx context.Context, req *ReqWalletSendToAddress) (*ReplyHash, error) { 1030 return nil, status.Errorf(codes.Unimplemented, "method SendToAddress not implemented") 1031 } 1032 func (*UnimplementedTuringchainServer) SetTxFee(ctx context.Context, req *ReqWalletSetFee) (*Reply, error) { 1033 return nil, status.Errorf(codes.Unimplemented, "method SetTxFee not implemented") 1034 } 1035 func (*UnimplementedTuringchainServer) SetLabl(ctx context.Context, req *ReqWalletSetLabel) (*WalletAccount, error) { 1036 return nil, status.Errorf(codes.Unimplemented, "method SetLabl not implemented") 1037 } 1038 func (*UnimplementedTuringchainServer) MergeBalance(ctx context.Context, req *ReqWalletMergeBalance) (*ReplyHashes, error) { 1039 return nil, status.Errorf(codes.Unimplemented, "method MergeBalance not implemented") 1040 } 1041 func (*UnimplementedTuringchainServer) SetPasswd(ctx context.Context, req *ReqWalletSetPasswd) (*Reply, error) { 1042 return nil, status.Errorf(codes.Unimplemented, "method SetPasswd not implemented") 1043 } 1044 func (*UnimplementedTuringchainServer) Lock(ctx context.Context, req *ReqNil) (*Reply, error) { 1045 return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented") 1046 } 1047 func (*UnimplementedTuringchainServer) UnLock(ctx context.Context, req *WalletUnLock) (*Reply, error) { 1048 return nil, status.Errorf(codes.Unimplemented, "method UnLock not implemented") 1049 } 1050 func (*UnimplementedTuringchainServer) GetLastMemPool(ctx context.Context, req *ReqNil) (*ReplyTxList, error) { 1051 return nil, status.Errorf(codes.Unimplemented, "method GetLastMemPool not implemented") 1052 } 1053 func (*UnimplementedTuringchainServer) GetProperFee(ctx context.Context, req *ReqProperFee) (*ReplyProperFee, error) { 1054 return nil, status.Errorf(codes.Unimplemented, "method GetProperFee not implemented") 1055 } 1056 func (*UnimplementedTuringchainServer) GetWalletStatus(ctx context.Context, req *ReqNil) (*WalletStatus, error) { 1057 return nil, status.Errorf(codes.Unimplemented, "method GetWalletStatus not implemented") 1058 } 1059 func (*UnimplementedTuringchainServer) GetBlockOverview(ctx context.Context, req *ReqHash) (*BlockOverview, error) { 1060 return nil, status.Errorf(codes.Unimplemented, "method GetBlockOverview not implemented") 1061 } 1062 func (*UnimplementedTuringchainServer) GetAddrOverview(ctx context.Context, req *ReqAddr) (*AddrOverview, error) { 1063 return nil, status.Errorf(codes.Unimplemented, "method GetAddrOverview not implemented") 1064 } 1065 func (*UnimplementedTuringchainServer) GetBlockHash(ctx context.Context, req *ReqInt) (*ReplyHash, error) { 1066 return nil, status.Errorf(codes.Unimplemented, "method GetBlockHash not implemented") 1067 } 1068 func (*UnimplementedTuringchainServer) GenSeed(ctx context.Context, req *GenSeedLang) (*ReplySeed, error) { 1069 return nil, status.Errorf(codes.Unimplemented, "method GenSeed not implemented") 1070 } 1071 func (*UnimplementedTuringchainServer) GetSeed(ctx context.Context, req *GetSeedByPw) (*ReplySeed, error) { 1072 return nil, status.Errorf(codes.Unimplemented, "method GetSeed not implemented") 1073 } 1074 func (*UnimplementedTuringchainServer) SaveSeed(ctx context.Context, req *SaveSeedByPw) (*Reply, error) { 1075 return nil, status.Errorf(codes.Unimplemented, "method SaveSeed not implemented") 1076 } 1077 func (*UnimplementedTuringchainServer) GetBalance(ctx context.Context, req *ReqBalance) (*Accounts, error) { 1078 return nil, status.Errorf(codes.Unimplemented, "method GetBalance not implemented") 1079 } 1080 func (*UnimplementedTuringchainServer) QueryChain(ctx context.Context, req *ChainExecutor) (*Reply, error) { 1081 return nil, status.Errorf(codes.Unimplemented, "method QueryChain not implemented") 1082 } 1083 func (*UnimplementedTuringchainServer) ExecWallet(ctx context.Context, req *ChainExecutor) (*Reply, error) { 1084 return nil, status.Errorf(codes.Unimplemented, "method ExecWallet not implemented") 1085 } 1086 func (*UnimplementedTuringchainServer) QueryConsensus(ctx context.Context, req *ChainExecutor) (*Reply, error) { 1087 return nil, status.Errorf(codes.Unimplemented, "method QueryConsensus not implemented") 1088 } 1089 func (*UnimplementedTuringchainServer) CreateTransaction(ctx context.Context, req *CreateTxIn) (*UnsignTx, error) { 1090 return nil, status.Errorf(codes.Unimplemented, "method CreateTransaction not implemented") 1091 } 1092 func (*UnimplementedTuringchainServer) GetHexTxByHash(ctx context.Context, req *ReqHash) (*HexTx, error) { 1093 return nil, status.Errorf(codes.Unimplemented, "method GetHexTxByHash not implemented") 1094 } 1095 func (*UnimplementedTuringchainServer) DumpPrivkey(ctx context.Context, req *ReqString) (*ReplyString, error) { 1096 return nil, status.Errorf(codes.Unimplemented, "method DumpPrivkey not implemented") 1097 } 1098 func (*UnimplementedTuringchainServer) DumpPrivkeysFile(ctx context.Context, req *ReqPrivkeysFile) (*Reply, error) { 1099 return nil, status.Errorf(codes.Unimplemented, "method DumpPrivkeysFile not implemented") 1100 } 1101 func (*UnimplementedTuringchainServer) ImportPrivkeysFile(ctx context.Context, req *ReqPrivkeysFile) (*Reply, error) { 1102 return nil, status.Errorf(codes.Unimplemented, "method ImportPrivkeysFile not implemented") 1103 } 1104 func (*UnimplementedTuringchainServer) Version(ctx context.Context, req *ReqNil) (*VersionInfo, error) { 1105 return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") 1106 } 1107 func (*UnimplementedTuringchainServer) IsSync(ctx context.Context, req *ReqNil) (*Reply, error) { 1108 return nil, status.Errorf(codes.Unimplemented, "method IsSync not implemented") 1109 } 1110 func (*UnimplementedTuringchainServer) GetPeerInfo(ctx context.Context, req *P2PGetPeerReq) (*PeerList, error) { 1111 return nil, status.Errorf(codes.Unimplemented, "method GetPeerInfo not implemented") 1112 } 1113 func (*UnimplementedTuringchainServer) NetInfo(ctx context.Context, req *P2PGetNetInfoReq) (*NodeNetInfo, error) { 1114 return nil, status.Errorf(codes.Unimplemented, "method NetInfo not implemented") 1115 } 1116 func (*UnimplementedTuringchainServer) IsNtpClockSync(ctx context.Context, req *ReqNil) (*Reply, error) { 1117 return nil, status.Errorf(codes.Unimplemented, "method IsNtpClockSync not implemented") 1118 } 1119 func (*UnimplementedTuringchainServer) GetFatalFailure(ctx context.Context, req *ReqNil) (*Int32, error) { 1120 return nil, status.Errorf(codes.Unimplemented, "method GetFatalFailure not implemented") 1121 } 1122 func (*UnimplementedTuringchainServer) GetLastBlockSequence(ctx context.Context, req *ReqNil) (*Int64, error) { 1123 return nil, status.Errorf(codes.Unimplemented, "method GetLastBlockSequence not implemented") 1124 } 1125 func (*UnimplementedTuringchainServer) GetSequenceByHash(ctx context.Context, req *ReqHash) (*Int64, error) { 1126 return nil, status.Errorf(codes.Unimplemented, "method GetSequenceByHash not implemented") 1127 } 1128 func (*UnimplementedTuringchainServer) GetBlockByHashes(ctx context.Context, req *ReqHashes) (*BlockDetails, error) { 1129 return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHashes not implemented") 1130 } 1131 func (*UnimplementedTuringchainServer) GetBlockBySeq(ctx context.Context, req *Int64) (*BlockSeq, error) { 1132 return nil, status.Errorf(codes.Unimplemented, "method GetBlockBySeq not implemented") 1133 } 1134 func (*UnimplementedTuringchainServer) CloseQueue(ctx context.Context, req *ReqNil) (*Reply, error) { 1135 return nil, status.Errorf(codes.Unimplemented, "method CloseQueue not implemented") 1136 } 1137 func (*UnimplementedTuringchainServer) GetAllExecBalance(ctx context.Context, req *ReqAllExecBalance) (*AllExecBalance, error) { 1138 return nil, status.Errorf(codes.Unimplemented, "method GetAllExecBalance not implemented") 1139 } 1140 func (*UnimplementedTuringchainServer) SignRawTx(ctx context.Context, req *ReqSignRawTx) (*ReplySignRawTx, error) { 1141 return nil, status.Errorf(codes.Unimplemented, "method SignRawTx not implemented") 1142 } 1143 func (*UnimplementedTuringchainServer) CreateNoBalanceTransaction(ctx context.Context, req *NoBalanceTx) (*ReplySignRawTx, error) { 1144 return nil, status.Errorf(codes.Unimplemented, "method CreateNoBalanceTransaction not implemented") 1145 } 1146 func (*UnimplementedTuringchainServer) QueryRandNum(ctx context.Context, req *ReqRandHash) (*ReplyHash, error) { 1147 return nil, status.Errorf(codes.Unimplemented, "method QueryRandNum not implemented") 1148 } 1149 func (*UnimplementedTuringchainServer) GetFork(ctx context.Context, req *ReqKey) (*Int64, error) { 1150 return nil, status.Errorf(codes.Unimplemented, "method GetFork not implemented") 1151 } 1152 func (*UnimplementedTuringchainServer) CreateNoBalanceTxs(ctx context.Context, req *NoBalanceTxs) (*ReplySignRawTx, error) { 1153 return nil, status.Errorf(codes.Unimplemented, "method CreateNoBalanceTxs not implemented") 1154 } 1155 func (*UnimplementedTuringchainServer) GetParaTxByTitle(ctx context.Context, req *ReqParaTxByTitle) (*ParaTxDetails, error) { 1156 return nil, status.Errorf(codes.Unimplemented, "method GetParaTxByTitle not implemented") 1157 } 1158 func (*UnimplementedTuringchainServer) LoadParaTxByTitle(ctx context.Context, req *ReqHeightByTitle) (*ReplyHeightByTitle, error) { 1159 return nil, status.Errorf(codes.Unimplemented, "method LoadParaTxByTitle not implemented") 1160 } 1161 func (*UnimplementedTuringchainServer) GetParaTxByHeight(ctx context.Context, req *ReqParaTxByHeight) (*ParaTxDetails, error) { 1162 return nil, status.Errorf(codes.Unimplemented, "method GetParaTxByHeight not implemented") 1163 } 1164 func (*UnimplementedTuringchainServer) GetHeaders(ctx context.Context, req *ReqBlocks) (*Headers, error) { 1165 return nil, status.Errorf(codes.Unimplemented, "method GetHeaders not implemented") 1166 } 1167 func (*UnimplementedTuringchainServer) GetServerTime(ctx context.Context, req *ReqNil) (*ServerTime, error) { 1168 return nil, status.Errorf(codes.Unimplemented, "method GetServerTime not implemented") 1169 } 1170 1171 func RegisterTuringchainServer(s *grpc.Server, srv TuringchainServer) { 1172 s.RegisterService(&_Turingchain_serviceDesc, srv) 1173 } 1174 1175 func _Turingchain_GetBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1176 in := new(ReqBlocks) 1177 if err := dec(in); err != nil { 1178 return nil, err 1179 } 1180 if interceptor == nil { 1181 return srv.(TuringchainServer).GetBlocks(ctx, in) 1182 } 1183 info := &grpc.UnaryServerInfo{ 1184 Server: srv, 1185 FullMethod: "/types.turingchain/GetBlocks", 1186 } 1187 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1188 return srv.(TuringchainServer).GetBlocks(ctx, req.(*ReqBlocks)) 1189 } 1190 return interceptor(ctx, in, info, handler) 1191 } 1192 1193 func _Turingchain_GetLastHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1194 in := new(ReqNil) 1195 if err := dec(in); err != nil { 1196 return nil, err 1197 } 1198 if interceptor == nil { 1199 return srv.(TuringchainServer).GetLastHeader(ctx, in) 1200 } 1201 info := &grpc.UnaryServerInfo{ 1202 Server: srv, 1203 FullMethod: "/types.turingchain/GetLastHeader", 1204 } 1205 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1206 return srv.(TuringchainServer).GetLastHeader(ctx, req.(*ReqNil)) 1207 } 1208 return interceptor(ctx, in, info, handler) 1209 } 1210 1211 func _Turingchain_CreateRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1212 in := new(CreateTx) 1213 if err := dec(in); err != nil { 1214 return nil, err 1215 } 1216 if interceptor == nil { 1217 return srv.(TuringchainServer).CreateRawTransaction(ctx, in) 1218 } 1219 info := &grpc.UnaryServerInfo{ 1220 Server: srv, 1221 FullMethod: "/types.turingchain/CreateRawTransaction", 1222 } 1223 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1224 return srv.(TuringchainServer).CreateRawTransaction(ctx, req.(*CreateTx)) 1225 } 1226 return interceptor(ctx, in, info, handler) 1227 } 1228 1229 func _Turingchain_CreateRawTxGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1230 in := new(CreateTransactionGroup) 1231 if err := dec(in); err != nil { 1232 return nil, err 1233 } 1234 if interceptor == nil { 1235 return srv.(TuringchainServer).CreateRawTxGroup(ctx, in) 1236 } 1237 info := &grpc.UnaryServerInfo{ 1238 Server: srv, 1239 FullMethod: "/types.turingchain/CreateRawTxGroup", 1240 } 1241 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1242 return srv.(TuringchainServer).CreateRawTxGroup(ctx, req.(*CreateTransactionGroup)) 1243 } 1244 return interceptor(ctx, in, info, handler) 1245 } 1246 1247 func _Turingchain_QueryTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1248 in := new(ReqHash) 1249 if err := dec(in); err != nil { 1250 return nil, err 1251 } 1252 if interceptor == nil { 1253 return srv.(TuringchainServer).QueryTransaction(ctx, in) 1254 } 1255 info := &grpc.UnaryServerInfo{ 1256 Server: srv, 1257 FullMethod: "/types.turingchain/QueryTransaction", 1258 } 1259 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1260 return srv.(TuringchainServer).QueryTransaction(ctx, req.(*ReqHash)) 1261 } 1262 return interceptor(ctx, in, info, handler) 1263 } 1264 1265 func _Turingchain_SendTransactionSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1266 in := new(Transaction) 1267 if err := dec(in); err != nil { 1268 return nil, err 1269 } 1270 if interceptor == nil { 1271 return srv.(TuringchainServer).SendTransactionSync(ctx, in) 1272 } 1273 info := &grpc.UnaryServerInfo{ 1274 Server: srv, 1275 FullMethod: "/types.turingchain/SendTransactionSync", 1276 } 1277 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1278 return srv.(TuringchainServer).SendTransactionSync(ctx, req.(*Transaction)) 1279 } 1280 return interceptor(ctx, in, info, handler) 1281 } 1282 1283 func _Turingchain_SendTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1284 in := new(Transaction) 1285 if err := dec(in); err != nil { 1286 return nil, err 1287 } 1288 if interceptor == nil { 1289 return srv.(TuringchainServer).SendTransaction(ctx, in) 1290 } 1291 info := &grpc.UnaryServerInfo{ 1292 Server: srv, 1293 FullMethod: "/types.turingchain/SendTransaction", 1294 } 1295 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1296 return srv.(TuringchainServer).SendTransaction(ctx, req.(*Transaction)) 1297 } 1298 return interceptor(ctx, in, info, handler) 1299 } 1300 1301 func _Turingchain_GetTransactionByAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1302 in := new(ReqAddr) 1303 if err := dec(in); err != nil { 1304 return nil, err 1305 } 1306 if interceptor == nil { 1307 return srv.(TuringchainServer).GetTransactionByAddr(ctx, in) 1308 } 1309 info := &grpc.UnaryServerInfo{ 1310 Server: srv, 1311 FullMethod: "/types.turingchain/GetTransactionByAddr", 1312 } 1313 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1314 return srv.(TuringchainServer).GetTransactionByAddr(ctx, req.(*ReqAddr)) 1315 } 1316 return interceptor(ctx, in, info, handler) 1317 } 1318 1319 func _Turingchain_GetTransactionByHashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1320 in := new(ReqHashes) 1321 if err := dec(in); err != nil { 1322 return nil, err 1323 } 1324 if interceptor == nil { 1325 return srv.(TuringchainServer).GetTransactionByHashes(ctx, in) 1326 } 1327 info := &grpc.UnaryServerInfo{ 1328 Server: srv, 1329 FullMethod: "/types.turingchain/GetTransactionByHashes", 1330 } 1331 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1332 return srv.(TuringchainServer).GetTransactionByHashes(ctx, req.(*ReqHashes)) 1333 } 1334 return interceptor(ctx, in, info, handler) 1335 } 1336 1337 func _Turingchain_GetMemPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1338 in := new(ReqGetMempool) 1339 if err := dec(in); err != nil { 1340 return nil, err 1341 } 1342 if interceptor == nil { 1343 return srv.(TuringchainServer).GetMemPool(ctx, in) 1344 } 1345 info := &grpc.UnaryServerInfo{ 1346 Server: srv, 1347 FullMethod: "/types.turingchain/GetMemPool", 1348 } 1349 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1350 return srv.(TuringchainServer).GetMemPool(ctx, req.(*ReqGetMempool)) 1351 } 1352 return interceptor(ctx, in, info, handler) 1353 } 1354 1355 func _Turingchain_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1356 in := new(ReqNil) 1357 if err := dec(in); err != nil { 1358 return nil, err 1359 } 1360 if interceptor == nil { 1361 return srv.(TuringchainServer).GetAccounts(ctx, in) 1362 } 1363 info := &grpc.UnaryServerInfo{ 1364 Server: srv, 1365 FullMethod: "/types.turingchain/GetAccounts", 1366 } 1367 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1368 return srv.(TuringchainServer).GetAccounts(ctx, req.(*ReqNil)) 1369 } 1370 return interceptor(ctx, in, info, handler) 1371 } 1372 1373 func _Turingchain_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1374 in := new(ReqGetAccount) 1375 if err := dec(in); err != nil { 1376 return nil, err 1377 } 1378 if interceptor == nil { 1379 return srv.(TuringchainServer).GetAccount(ctx, in) 1380 } 1381 info := &grpc.UnaryServerInfo{ 1382 Server: srv, 1383 FullMethod: "/types.turingchain/GetAccount", 1384 } 1385 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1386 return srv.(TuringchainServer).GetAccount(ctx, req.(*ReqGetAccount)) 1387 } 1388 return interceptor(ctx, in, info, handler) 1389 } 1390 1391 func _Turingchain_NewAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1392 in := new(ReqNewAccount) 1393 if err := dec(in); err != nil { 1394 return nil, err 1395 } 1396 if interceptor == nil { 1397 return srv.(TuringchainServer).NewAccount(ctx, in) 1398 } 1399 info := &grpc.UnaryServerInfo{ 1400 Server: srv, 1401 FullMethod: "/types.turingchain/NewAccount", 1402 } 1403 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1404 return srv.(TuringchainServer).NewAccount(ctx, req.(*ReqNewAccount)) 1405 } 1406 return interceptor(ctx, in, info, handler) 1407 } 1408 1409 func _Turingchain_WalletTransactionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1410 in := new(ReqWalletTransactionList) 1411 if err := dec(in); err != nil { 1412 return nil, err 1413 } 1414 if interceptor == nil { 1415 return srv.(TuringchainServer).WalletTransactionList(ctx, in) 1416 } 1417 info := &grpc.UnaryServerInfo{ 1418 Server: srv, 1419 FullMethod: "/types.turingchain/WalletTransactionList", 1420 } 1421 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1422 return srv.(TuringchainServer).WalletTransactionList(ctx, req.(*ReqWalletTransactionList)) 1423 } 1424 return interceptor(ctx, in, info, handler) 1425 } 1426 1427 func _Turingchain_ImportPrivkey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1428 in := new(ReqWalletImportPrivkey) 1429 if err := dec(in); err != nil { 1430 return nil, err 1431 } 1432 if interceptor == nil { 1433 return srv.(TuringchainServer).ImportPrivkey(ctx, in) 1434 } 1435 info := &grpc.UnaryServerInfo{ 1436 Server: srv, 1437 FullMethod: "/types.turingchain/ImportPrivkey", 1438 } 1439 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1440 return srv.(TuringchainServer).ImportPrivkey(ctx, req.(*ReqWalletImportPrivkey)) 1441 } 1442 return interceptor(ctx, in, info, handler) 1443 } 1444 1445 func _Turingchain_SendToAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1446 in := new(ReqWalletSendToAddress) 1447 if err := dec(in); err != nil { 1448 return nil, err 1449 } 1450 if interceptor == nil { 1451 return srv.(TuringchainServer).SendToAddress(ctx, in) 1452 } 1453 info := &grpc.UnaryServerInfo{ 1454 Server: srv, 1455 FullMethod: "/types.turingchain/SendToAddress", 1456 } 1457 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1458 return srv.(TuringchainServer).SendToAddress(ctx, req.(*ReqWalletSendToAddress)) 1459 } 1460 return interceptor(ctx, in, info, handler) 1461 } 1462 1463 func _Turingchain_SetTxFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1464 in := new(ReqWalletSetFee) 1465 if err := dec(in); err != nil { 1466 return nil, err 1467 } 1468 if interceptor == nil { 1469 return srv.(TuringchainServer).SetTxFee(ctx, in) 1470 } 1471 info := &grpc.UnaryServerInfo{ 1472 Server: srv, 1473 FullMethod: "/types.turingchain/SetTxFee", 1474 } 1475 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1476 return srv.(TuringchainServer).SetTxFee(ctx, req.(*ReqWalletSetFee)) 1477 } 1478 return interceptor(ctx, in, info, handler) 1479 } 1480 1481 func _Turingchain_SetLabl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1482 in := new(ReqWalletSetLabel) 1483 if err := dec(in); err != nil { 1484 return nil, err 1485 } 1486 if interceptor == nil { 1487 return srv.(TuringchainServer).SetLabl(ctx, in) 1488 } 1489 info := &grpc.UnaryServerInfo{ 1490 Server: srv, 1491 FullMethod: "/types.turingchain/SetLabl", 1492 } 1493 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1494 return srv.(TuringchainServer).SetLabl(ctx, req.(*ReqWalletSetLabel)) 1495 } 1496 return interceptor(ctx, in, info, handler) 1497 } 1498 1499 func _Turingchain_MergeBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1500 in := new(ReqWalletMergeBalance) 1501 if err := dec(in); err != nil { 1502 return nil, err 1503 } 1504 if interceptor == nil { 1505 return srv.(TuringchainServer).MergeBalance(ctx, in) 1506 } 1507 info := &grpc.UnaryServerInfo{ 1508 Server: srv, 1509 FullMethod: "/types.turingchain/MergeBalance", 1510 } 1511 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1512 return srv.(TuringchainServer).MergeBalance(ctx, req.(*ReqWalletMergeBalance)) 1513 } 1514 return interceptor(ctx, in, info, handler) 1515 } 1516 1517 func _Turingchain_SetPasswd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1518 in := new(ReqWalletSetPasswd) 1519 if err := dec(in); err != nil { 1520 return nil, err 1521 } 1522 if interceptor == nil { 1523 return srv.(TuringchainServer).SetPasswd(ctx, in) 1524 } 1525 info := &grpc.UnaryServerInfo{ 1526 Server: srv, 1527 FullMethod: "/types.turingchain/SetPasswd", 1528 } 1529 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1530 return srv.(TuringchainServer).SetPasswd(ctx, req.(*ReqWalletSetPasswd)) 1531 } 1532 return interceptor(ctx, in, info, handler) 1533 } 1534 1535 func _Turingchain_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1536 in := new(ReqNil) 1537 if err := dec(in); err != nil { 1538 return nil, err 1539 } 1540 if interceptor == nil { 1541 return srv.(TuringchainServer).Lock(ctx, in) 1542 } 1543 info := &grpc.UnaryServerInfo{ 1544 Server: srv, 1545 FullMethod: "/types.turingchain/Lock", 1546 } 1547 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1548 return srv.(TuringchainServer).Lock(ctx, req.(*ReqNil)) 1549 } 1550 return interceptor(ctx, in, info, handler) 1551 } 1552 1553 func _Turingchain_UnLock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1554 in := new(WalletUnLock) 1555 if err := dec(in); err != nil { 1556 return nil, err 1557 } 1558 if interceptor == nil { 1559 return srv.(TuringchainServer).UnLock(ctx, in) 1560 } 1561 info := &grpc.UnaryServerInfo{ 1562 Server: srv, 1563 FullMethod: "/types.turingchain/UnLock", 1564 } 1565 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1566 return srv.(TuringchainServer).UnLock(ctx, req.(*WalletUnLock)) 1567 } 1568 return interceptor(ctx, in, info, handler) 1569 } 1570 1571 func _Turingchain_GetLastMemPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1572 in := new(ReqNil) 1573 if err := dec(in); err != nil { 1574 return nil, err 1575 } 1576 if interceptor == nil { 1577 return srv.(TuringchainServer).GetLastMemPool(ctx, in) 1578 } 1579 info := &grpc.UnaryServerInfo{ 1580 Server: srv, 1581 FullMethod: "/types.turingchain/GetLastMemPool", 1582 } 1583 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1584 return srv.(TuringchainServer).GetLastMemPool(ctx, req.(*ReqNil)) 1585 } 1586 return interceptor(ctx, in, info, handler) 1587 } 1588 1589 func _Turingchain_GetProperFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1590 in := new(ReqProperFee) 1591 if err := dec(in); err != nil { 1592 return nil, err 1593 } 1594 if interceptor == nil { 1595 return srv.(TuringchainServer).GetProperFee(ctx, in) 1596 } 1597 info := &grpc.UnaryServerInfo{ 1598 Server: srv, 1599 FullMethod: "/types.turingchain/GetProperFee", 1600 } 1601 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1602 return srv.(TuringchainServer).GetProperFee(ctx, req.(*ReqProperFee)) 1603 } 1604 return interceptor(ctx, in, info, handler) 1605 } 1606 1607 func _Turingchain_GetWalletStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1608 in := new(ReqNil) 1609 if err := dec(in); err != nil { 1610 return nil, err 1611 } 1612 if interceptor == nil { 1613 return srv.(TuringchainServer).GetWalletStatus(ctx, in) 1614 } 1615 info := &grpc.UnaryServerInfo{ 1616 Server: srv, 1617 FullMethod: "/types.turingchain/GetWalletStatus", 1618 } 1619 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1620 return srv.(TuringchainServer).GetWalletStatus(ctx, req.(*ReqNil)) 1621 } 1622 return interceptor(ctx, in, info, handler) 1623 } 1624 1625 func _Turingchain_GetBlockOverview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1626 in := new(ReqHash) 1627 if err := dec(in); err != nil { 1628 return nil, err 1629 } 1630 if interceptor == nil { 1631 return srv.(TuringchainServer).GetBlockOverview(ctx, in) 1632 } 1633 info := &grpc.UnaryServerInfo{ 1634 Server: srv, 1635 FullMethod: "/types.turingchain/GetBlockOverview", 1636 } 1637 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1638 return srv.(TuringchainServer).GetBlockOverview(ctx, req.(*ReqHash)) 1639 } 1640 return interceptor(ctx, in, info, handler) 1641 } 1642 1643 func _Turingchain_GetAddrOverview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1644 in := new(ReqAddr) 1645 if err := dec(in); err != nil { 1646 return nil, err 1647 } 1648 if interceptor == nil { 1649 return srv.(TuringchainServer).GetAddrOverview(ctx, in) 1650 } 1651 info := &grpc.UnaryServerInfo{ 1652 Server: srv, 1653 FullMethod: "/types.turingchain/GetAddrOverview", 1654 } 1655 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1656 return srv.(TuringchainServer).GetAddrOverview(ctx, req.(*ReqAddr)) 1657 } 1658 return interceptor(ctx, in, info, handler) 1659 } 1660 1661 func _Turingchain_GetBlockHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1662 in := new(ReqInt) 1663 if err := dec(in); err != nil { 1664 return nil, err 1665 } 1666 if interceptor == nil { 1667 return srv.(TuringchainServer).GetBlockHash(ctx, in) 1668 } 1669 info := &grpc.UnaryServerInfo{ 1670 Server: srv, 1671 FullMethod: "/types.turingchain/GetBlockHash", 1672 } 1673 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1674 return srv.(TuringchainServer).GetBlockHash(ctx, req.(*ReqInt)) 1675 } 1676 return interceptor(ctx, in, info, handler) 1677 } 1678 1679 func _Turingchain_GenSeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1680 in := new(GenSeedLang) 1681 if err := dec(in); err != nil { 1682 return nil, err 1683 } 1684 if interceptor == nil { 1685 return srv.(TuringchainServer).GenSeed(ctx, in) 1686 } 1687 info := &grpc.UnaryServerInfo{ 1688 Server: srv, 1689 FullMethod: "/types.turingchain/GenSeed", 1690 } 1691 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1692 return srv.(TuringchainServer).GenSeed(ctx, req.(*GenSeedLang)) 1693 } 1694 return interceptor(ctx, in, info, handler) 1695 } 1696 1697 func _Turingchain_GetSeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1698 in := new(GetSeedByPw) 1699 if err := dec(in); err != nil { 1700 return nil, err 1701 } 1702 if interceptor == nil { 1703 return srv.(TuringchainServer).GetSeed(ctx, in) 1704 } 1705 info := &grpc.UnaryServerInfo{ 1706 Server: srv, 1707 FullMethod: "/types.turingchain/GetSeed", 1708 } 1709 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1710 return srv.(TuringchainServer).GetSeed(ctx, req.(*GetSeedByPw)) 1711 } 1712 return interceptor(ctx, in, info, handler) 1713 } 1714 1715 func _Turingchain_SaveSeed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1716 in := new(SaveSeedByPw) 1717 if err := dec(in); err != nil { 1718 return nil, err 1719 } 1720 if interceptor == nil { 1721 return srv.(TuringchainServer).SaveSeed(ctx, in) 1722 } 1723 info := &grpc.UnaryServerInfo{ 1724 Server: srv, 1725 FullMethod: "/types.turingchain/SaveSeed", 1726 } 1727 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1728 return srv.(TuringchainServer).SaveSeed(ctx, req.(*SaveSeedByPw)) 1729 } 1730 return interceptor(ctx, in, info, handler) 1731 } 1732 1733 func _Turingchain_GetBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1734 in := new(ReqBalance) 1735 if err := dec(in); err != nil { 1736 return nil, err 1737 } 1738 if interceptor == nil { 1739 return srv.(TuringchainServer).GetBalance(ctx, in) 1740 } 1741 info := &grpc.UnaryServerInfo{ 1742 Server: srv, 1743 FullMethod: "/types.turingchain/GetBalance", 1744 } 1745 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1746 return srv.(TuringchainServer).GetBalance(ctx, req.(*ReqBalance)) 1747 } 1748 return interceptor(ctx, in, info, handler) 1749 } 1750 1751 func _Turingchain_QueryChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1752 in := new(ChainExecutor) 1753 if err := dec(in); err != nil { 1754 return nil, err 1755 } 1756 if interceptor == nil { 1757 return srv.(TuringchainServer).QueryChain(ctx, in) 1758 } 1759 info := &grpc.UnaryServerInfo{ 1760 Server: srv, 1761 FullMethod: "/types.turingchain/QueryChain", 1762 } 1763 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1764 return srv.(TuringchainServer).QueryChain(ctx, req.(*ChainExecutor)) 1765 } 1766 return interceptor(ctx, in, info, handler) 1767 } 1768 1769 func _Turingchain_ExecWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1770 in := new(ChainExecutor) 1771 if err := dec(in); err != nil { 1772 return nil, err 1773 } 1774 if interceptor == nil { 1775 return srv.(TuringchainServer).ExecWallet(ctx, in) 1776 } 1777 info := &grpc.UnaryServerInfo{ 1778 Server: srv, 1779 FullMethod: "/types.turingchain/ExecWallet", 1780 } 1781 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1782 return srv.(TuringchainServer).ExecWallet(ctx, req.(*ChainExecutor)) 1783 } 1784 return interceptor(ctx, in, info, handler) 1785 } 1786 1787 func _Turingchain_QueryConsensus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1788 in := new(ChainExecutor) 1789 if err := dec(in); err != nil { 1790 return nil, err 1791 } 1792 if interceptor == nil { 1793 return srv.(TuringchainServer).QueryConsensus(ctx, in) 1794 } 1795 info := &grpc.UnaryServerInfo{ 1796 Server: srv, 1797 FullMethod: "/types.turingchain/QueryConsensus", 1798 } 1799 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1800 return srv.(TuringchainServer).QueryConsensus(ctx, req.(*ChainExecutor)) 1801 } 1802 return interceptor(ctx, in, info, handler) 1803 } 1804 1805 func _Turingchain_CreateTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1806 in := new(CreateTxIn) 1807 if err := dec(in); err != nil { 1808 return nil, err 1809 } 1810 if interceptor == nil { 1811 return srv.(TuringchainServer).CreateTransaction(ctx, in) 1812 } 1813 info := &grpc.UnaryServerInfo{ 1814 Server: srv, 1815 FullMethod: "/types.turingchain/CreateTransaction", 1816 } 1817 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1818 return srv.(TuringchainServer).CreateTransaction(ctx, req.(*CreateTxIn)) 1819 } 1820 return interceptor(ctx, in, info, handler) 1821 } 1822 1823 func _Turingchain_GetHexTxByHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1824 in := new(ReqHash) 1825 if err := dec(in); err != nil { 1826 return nil, err 1827 } 1828 if interceptor == nil { 1829 return srv.(TuringchainServer).GetHexTxByHash(ctx, in) 1830 } 1831 info := &grpc.UnaryServerInfo{ 1832 Server: srv, 1833 FullMethod: "/types.turingchain/GetHexTxByHash", 1834 } 1835 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1836 return srv.(TuringchainServer).GetHexTxByHash(ctx, req.(*ReqHash)) 1837 } 1838 return interceptor(ctx, in, info, handler) 1839 } 1840 1841 func _Turingchain_DumpPrivkey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1842 in := new(ReqString) 1843 if err := dec(in); err != nil { 1844 return nil, err 1845 } 1846 if interceptor == nil { 1847 return srv.(TuringchainServer).DumpPrivkey(ctx, in) 1848 } 1849 info := &grpc.UnaryServerInfo{ 1850 Server: srv, 1851 FullMethod: "/types.turingchain/DumpPrivkey", 1852 } 1853 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1854 return srv.(TuringchainServer).DumpPrivkey(ctx, req.(*ReqString)) 1855 } 1856 return interceptor(ctx, in, info, handler) 1857 } 1858 1859 func _Turingchain_DumpPrivkeysFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1860 in := new(ReqPrivkeysFile) 1861 if err := dec(in); err != nil { 1862 return nil, err 1863 } 1864 if interceptor == nil { 1865 return srv.(TuringchainServer).DumpPrivkeysFile(ctx, in) 1866 } 1867 info := &grpc.UnaryServerInfo{ 1868 Server: srv, 1869 FullMethod: "/types.turingchain/DumpPrivkeysFile", 1870 } 1871 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1872 return srv.(TuringchainServer).DumpPrivkeysFile(ctx, req.(*ReqPrivkeysFile)) 1873 } 1874 return interceptor(ctx, in, info, handler) 1875 } 1876 1877 func _Turingchain_ImportPrivkeysFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1878 in := new(ReqPrivkeysFile) 1879 if err := dec(in); err != nil { 1880 return nil, err 1881 } 1882 if interceptor == nil { 1883 return srv.(TuringchainServer).ImportPrivkeysFile(ctx, in) 1884 } 1885 info := &grpc.UnaryServerInfo{ 1886 Server: srv, 1887 FullMethod: "/types.turingchain/ImportPrivkeysFile", 1888 } 1889 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1890 return srv.(TuringchainServer).ImportPrivkeysFile(ctx, req.(*ReqPrivkeysFile)) 1891 } 1892 return interceptor(ctx, in, info, handler) 1893 } 1894 1895 func _Turingchain_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1896 in := new(ReqNil) 1897 if err := dec(in); err != nil { 1898 return nil, err 1899 } 1900 if interceptor == nil { 1901 return srv.(TuringchainServer).Version(ctx, in) 1902 } 1903 info := &grpc.UnaryServerInfo{ 1904 Server: srv, 1905 FullMethod: "/types.turingchain/Version", 1906 } 1907 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1908 return srv.(TuringchainServer).Version(ctx, req.(*ReqNil)) 1909 } 1910 return interceptor(ctx, in, info, handler) 1911 } 1912 1913 func _Turingchain_IsSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1914 in := new(ReqNil) 1915 if err := dec(in); err != nil { 1916 return nil, err 1917 } 1918 if interceptor == nil { 1919 return srv.(TuringchainServer).IsSync(ctx, in) 1920 } 1921 info := &grpc.UnaryServerInfo{ 1922 Server: srv, 1923 FullMethod: "/types.turingchain/IsSync", 1924 } 1925 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1926 return srv.(TuringchainServer).IsSync(ctx, req.(*ReqNil)) 1927 } 1928 return interceptor(ctx, in, info, handler) 1929 } 1930 1931 func _Turingchain_GetPeerInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1932 in := new(P2PGetPeerReq) 1933 if err := dec(in); err != nil { 1934 return nil, err 1935 } 1936 if interceptor == nil { 1937 return srv.(TuringchainServer).GetPeerInfo(ctx, in) 1938 } 1939 info := &grpc.UnaryServerInfo{ 1940 Server: srv, 1941 FullMethod: "/types.turingchain/GetPeerInfo", 1942 } 1943 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1944 return srv.(TuringchainServer).GetPeerInfo(ctx, req.(*P2PGetPeerReq)) 1945 } 1946 return interceptor(ctx, in, info, handler) 1947 } 1948 1949 func _Turingchain_NetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1950 in := new(P2PGetNetInfoReq) 1951 if err := dec(in); err != nil { 1952 return nil, err 1953 } 1954 if interceptor == nil { 1955 return srv.(TuringchainServer).NetInfo(ctx, in) 1956 } 1957 info := &grpc.UnaryServerInfo{ 1958 Server: srv, 1959 FullMethod: "/types.turingchain/NetInfo", 1960 } 1961 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1962 return srv.(TuringchainServer).NetInfo(ctx, req.(*P2PGetNetInfoReq)) 1963 } 1964 return interceptor(ctx, in, info, handler) 1965 } 1966 1967 func _Turingchain_IsNtpClockSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1968 in := new(ReqNil) 1969 if err := dec(in); err != nil { 1970 return nil, err 1971 } 1972 if interceptor == nil { 1973 return srv.(TuringchainServer).IsNtpClockSync(ctx, in) 1974 } 1975 info := &grpc.UnaryServerInfo{ 1976 Server: srv, 1977 FullMethod: "/types.turingchain/IsNtpClockSync", 1978 } 1979 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1980 return srv.(TuringchainServer).IsNtpClockSync(ctx, req.(*ReqNil)) 1981 } 1982 return interceptor(ctx, in, info, handler) 1983 } 1984 1985 func _Turingchain_GetFatalFailure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1986 in := new(ReqNil) 1987 if err := dec(in); err != nil { 1988 return nil, err 1989 } 1990 if interceptor == nil { 1991 return srv.(TuringchainServer).GetFatalFailure(ctx, in) 1992 } 1993 info := &grpc.UnaryServerInfo{ 1994 Server: srv, 1995 FullMethod: "/types.turingchain/GetFatalFailure", 1996 } 1997 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1998 return srv.(TuringchainServer).GetFatalFailure(ctx, req.(*ReqNil)) 1999 } 2000 return interceptor(ctx, in, info, handler) 2001 } 2002 2003 func _Turingchain_GetLastBlockSequence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2004 in := new(ReqNil) 2005 if err := dec(in); err != nil { 2006 return nil, err 2007 } 2008 if interceptor == nil { 2009 return srv.(TuringchainServer).GetLastBlockSequence(ctx, in) 2010 } 2011 info := &grpc.UnaryServerInfo{ 2012 Server: srv, 2013 FullMethod: "/types.turingchain/GetLastBlockSequence", 2014 } 2015 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2016 return srv.(TuringchainServer).GetLastBlockSequence(ctx, req.(*ReqNil)) 2017 } 2018 return interceptor(ctx, in, info, handler) 2019 } 2020 2021 func _Turingchain_GetSequenceByHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2022 in := new(ReqHash) 2023 if err := dec(in); err != nil { 2024 return nil, err 2025 } 2026 if interceptor == nil { 2027 return srv.(TuringchainServer).GetSequenceByHash(ctx, in) 2028 } 2029 info := &grpc.UnaryServerInfo{ 2030 Server: srv, 2031 FullMethod: "/types.turingchain/GetSequenceByHash", 2032 } 2033 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2034 return srv.(TuringchainServer).GetSequenceByHash(ctx, req.(*ReqHash)) 2035 } 2036 return interceptor(ctx, in, info, handler) 2037 } 2038 2039 func _Turingchain_GetBlockByHashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2040 in := new(ReqHashes) 2041 if err := dec(in); err != nil { 2042 return nil, err 2043 } 2044 if interceptor == nil { 2045 return srv.(TuringchainServer).GetBlockByHashes(ctx, in) 2046 } 2047 info := &grpc.UnaryServerInfo{ 2048 Server: srv, 2049 FullMethod: "/types.turingchain/GetBlockByHashes", 2050 } 2051 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2052 return srv.(TuringchainServer).GetBlockByHashes(ctx, req.(*ReqHashes)) 2053 } 2054 return interceptor(ctx, in, info, handler) 2055 } 2056 2057 func _Turingchain_GetBlockBySeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2058 in := new(Int64) 2059 if err := dec(in); err != nil { 2060 return nil, err 2061 } 2062 if interceptor == nil { 2063 return srv.(TuringchainServer).GetBlockBySeq(ctx, in) 2064 } 2065 info := &grpc.UnaryServerInfo{ 2066 Server: srv, 2067 FullMethod: "/types.turingchain/GetBlockBySeq", 2068 } 2069 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2070 return srv.(TuringchainServer).GetBlockBySeq(ctx, req.(*Int64)) 2071 } 2072 return interceptor(ctx, in, info, handler) 2073 } 2074 2075 func _Turingchain_CloseQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2076 in := new(ReqNil) 2077 if err := dec(in); err != nil { 2078 return nil, err 2079 } 2080 if interceptor == nil { 2081 return srv.(TuringchainServer).CloseQueue(ctx, in) 2082 } 2083 info := &grpc.UnaryServerInfo{ 2084 Server: srv, 2085 FullMethod: "/types.turingchain/CloseQueue", 2086 } 2087 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2088 return srv.(TuringchainServer).CloseQueue(ctx, req.(*ReqNil)) 2089 } 2090 return interceptor(ctx, in, info, handler) 2091 } 2092 2093 func _Turingchain_GetAllExecBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2094 in := new(ReqAllExecBalance) 2095 if err := dec(in); err != nil { 2096 return nil, err 2097 } 2098 if interceptor == nil { 2099 return srv.(TuringchainServer).GetAllExecBalance(ctx, in) 2100 } 2101 info := &grpc.UnaryServerInfo{ 2102 Server: srv, 2103 FullMethod: "/types.turingchain/GetAllExecBalance", 2104 } 2105 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2106 return srv.(TuringchainServer).GetAllExecBalance(ctx, req.(*ReqAllExecBalance)) 2107 } 2108 return interceptor(ctx, in, info, handler) 2109 } 2110 2111 func _Turingchain_SignRawTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2112 in := new(ReqSignRawTx) 2113 if err := dec(in); err != nil { 2114 return nil, err 2115 } 2116 if interceptor == nil { 2117 return srv.(TuringchainServer).SignRawTx(ctx, in) 2118 } 2119 info := &grpc.UnaryServerInfo{ 2120 Server: srv, 2121 FullMethod: "/types.turingchain/SignRawTx", 2122 } 2123 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2124 return srv.(TuringchainServer).SignRawTx(ctx, req.(*ReqSignRawTx)) 2125 } 2126 return interceptor(ctx, in, info, handler) 2127 } 2128 2129 func _Turingchain_CreateNoBalanceTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2130 in := new(NoBalanceTx) 2131 if err := dec(in); err != nil { 2132 return nil, err 2133 } 2134 if interceptor == nil { 2135 return srv.(TuringchainServer).CreateNoBalanceTransaction(ctx, in) 2136 } 2137 info := &grpc.UnaryServerInfo{ 2138 Server: srv, 2139 FullMethod: "/types.turingchain/CreateNoBalanceTransaction", 2140 } 2141 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2142 return srv.(TuringchainServer).CreateNoBalanceTransaction(ctx, req.(*NoBalanceTx)) 2143 } 2144 return interceptor(ctx, in, info, handler) 2145 } 2146 2147 func _Turingchain_QueryRandNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2148 in := new(ReqRandHash) 2149 if err := dec(in); err != nil { 2150 return nil, err 2151 } 2152 if interceptor == nil { 2153 return srv.(TuringchainServer).QueryRandNum(ctx, in) 2154 } 2155 info := &grpc.UnaryServerInfo{ 2156 Server: srv, 2157 FullMethod: "/types.turingchain/QueryRandNum", 2158 } 2159 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2160 return srv.(TuringchainServer).QueryRandNum(ctx, req.(*ReqRandHash)) 2161 } 2162 return interceptor(ctx, in, info, handler) 2163 } 2164 2165 func _Turingchain_GetFork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2166 in := new(ReqKey) 2167 if err := dec(in); err != nil { 2168 return nil, err 2169 } 2170 if interceptor == nil { 2171 return srv.(TuringchainServer).GetFork(ctx, in) 2172 } 2173 info := &grpc.UnaryServerInfo{ 2174 Server: srv, 2175 FullMethod: "/types.turingchain/GetFork", 2176 } 2177 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2178 return srv.(TuringchainServer).GetFork(ctx, req.(*ReqKey)) 2179 } 2180 return interceptor(ctx, in, info, handler) 2181 } 2182 2183 func _Turingchain_CreateNoBalanceTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2184 in := new(NoBalanceTxs) 2185 if err := dec(in); err != nil { 2186 return nil, err 2187 } 2188 if interceptor == nil { 2189 return srv.(TuringchainServer).CreateNoBalanceTxs(ctx, in) 2190 } 2191 info := &grpc.UnaryServerInfo{ 2192 Server: srv, 2193 FullMethod: "/types.turingchain/CreateNoBalanceTxs", 2194 } 2195 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2196 return srv.(TuringchainServer).CreateNoBalanceTxs(ctx, req.(*NoBalanceTxs)) 2197 } 2198 return interceptor(ctx, in, info, handler) 2199 } 2200 2201 func _Turingchain_GetParaTxByTitle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2202 in := new(ReqParaTxByTitle) 2203 if err := dec(in); err != nil { 2204 return nil, err 2205 } 2206 if interceptor == nil { 2207 return srv.(TuringchainServer).GetParaTxByTitle(ctx, in) 2208 } 2209 info := &grpc.UnaryServerInfo{ 2210 Server: srv, 2211 FullMethod: "/types.turingchain/GetParaTxByTitle", 2212 } 2213 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2214 return srv.(TuringchainServer).GetParaTxByTitle(ctx, req.(*ReqParaTxByTitle)) 2215 } 2216 return interceptor(ctx, in, info, handler) 2217 } 2218 2219 func _Turingchain_LoadParaTxByTitle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2220 in := new(ReqHeightByTitle) 2221 if err := dec(in); err != nil { 2222 return nil, err 2223 } 2224 if interceptor == nil { 2225 return srv.(TuringchainServer).LoadParaTxByTitle(ctx, in) 2226 } 2227 info := &grpc.UnaryServerInfo{ 2228 Server: srv, 2229 FullMethod: "/types.turingchain/LoadParaTxByTitle", 2230 } 2231 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2232 return srv.(TuringchainServer).LoadParaTxByTitle(ctx, req.(*ReqHeightByTitle)) 2233 } 2234 return interceptor(ctx, in, info, handler) 2235 } 2236 2237 func _Turingchain_GetParaTxByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2238 in := new(ReqParaTxByHeight) 2239 if err := dec(in); err != nil { 2240 return nil, err 2241 } 2242 if interceptor == nil { 2243 return srv.(TuringchainServer).GetParaTxByHeight(ctx, in) 2244 } 2245 info := &grpc.UnaryServerInfo{ 2246 Server: srv, 2247 FullMethod: "/types.turingchain/GetParaTxByHeight", 2248 } 2249 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2250 return srv.(TuringchainServer).GetParaTxByHeight(ctx, req.(*ReqParaTxByHeight)) 2251 } 2252 return interceptor(ctx, in, info, handler) 2253 } 2254 2255 func _Turingchain_GetHeaders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2256 in := new(ReqBlocks) 2257 if err := dec(in); err != nil { 2258 return nil, err 2259 } 2260 if interceptor == nil { 2261 return srv.(TuringchainServer).GetHeaders(ctx, in) 2262 } 2263 info := &grpc.UnaryServerInfo{ 2264 Server: srv, 2265 FullMethod: "/types.turingchain/GetHeaders", 2266 } 2267 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2268 return srv.(TuringchainServer).GetHeaders(ctx, req.(*ReqBlocks)) 2269 } 2270 return interceptor(ctx, in, info, handler) 2271 } 2272 2273 func _Turingchain_GetServerTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 2274 in := new(ReqNil) 2275 if err := dec(in); err != nil { 2276 return nil, err 2277 } 2278 if interceptor == nil { 2279 return srv.(TuringchainServer).GetServerTime(ctx, in) 2280 } 2281 info := &grpc.UnaryServerInfo{ 2282 Server: srv, 2283 FullMethod: "/types.turingchain/GetServerTime", 2284 } 2285 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 2286 return srv.(TuringchainServer).GetServerTime(ctx, req.(*ReqNil)) 2287 } 2288 return interceptor(ctx, in, info, handler) 2289 } 2290 2291 var _Turingchain_serviceDesc = grpc.ServiceDesc{ 2292 ServiceName: "types.turingchain", 2293 HandlerType: (*TuringchainServer)(nil), 2294 Methods: []grpc.MethodDesc{ 2295 { 2296 MethodName: "GetBlocks", 2297 Handler: _Turingchain_GetBlocks_Handler, 2298 }, 2299 { 2300 MethodName: "GetLastHeader", 2301 Handler: _Turingchain_GetLastHeader_Handler, 2302 }, 2303 { 2304 MethodName: "CreateRawTransaction", 2305 Handler: _Turingchain_CreateRawTransaction_Handler, 2306 }, 2307 { 2308 MethodName: "CreateRawTxGroup", 2309 Handler: _Turingchain_CreateRawTxGroup_Handler, 2310 }, 2311 { 2312 MethodName: "QueryTransaction", 2313 Handler: _Turingchain_QueryTransaction_Handler, 2314 }, 2315 { 2316 MethodName: "SendTransactionSync", 2317 Handler: _Turingchain_SendTransactionSync_Handler, 2318 }, 2319 { 2320 MethodName: "SendTransaction", 2321 Handler: _Turingchain_SendTransaction_Handler, 2322 }, 2323 { 2324 MethodName: "GetTransactionByAddr", 2325 Handler: _Turingchain_GetTransactionByAddr_Handler, 2326 }, 2327 { 2328 MethodName: "GetTransactionByHashes", 2329 Handler: _Turingchain_GetTransactionByHashes_Handler, 2330 }, 2331 { 2332 MethodName: "GetMemPool", 2333 Handler: _Turingchain_GetMemPool_Handler, 2334 }, 2335 { 2336 MethodName: "GetAccounts", 2337 Handler: _Turingchain_GetAccounts_Handler, 2338 }, 2339 { 2340 MethodName: "GetAccount", 2341 Handler: _Turingchain_GetAccount_Handler, 2342 }, 2343 { 2344 MethodName: "NewAccount", 2345 Handler: _Turingchain_NewAccount_Handler, 2346 }, 2347 { 2348 MethodName: "WalletTransactionList", 2349 Handler: _Turingchain_WalletTransactionList_Handler, 2350 }, 2351 { 2352 MethodName: "ImportPrivkey", 2353 Handler: _Turingchain_ImportPrivkey_Handler, 2354 }, 2355 { 2356 MethodName: "SendToAddress", 2357 Handler: _Turingchain_SendToAddress_Handler, 2358 }, 2359 { 2360 MethodName: "SetTxFee", 2361 Handler: _Turingchain_SetTxFee_Handler, 2362 }, 2363 { 2364 MethodName: "SetLabl", 2365 Handler: _Turingchain_SetLabl_Handler, 2366 }, 2367 { 2368 MethodName: "MergeBalance", 2369 Handler: _Turingchain_MergeBalance_Handler, 2370 }, 2371 { 2372 MethodName: "SetPasswd", 2373 Handler: _Turingchain_SetPasswd_Handler, 2374 }, 2375 { 2376 MethodName: "Lock", 2377 Handler: _Turingchain_Lock_Handler, 2378 }, 2379 { 2380 MethodName: "UnLock", 2381 Handler: _Turingchain_UnLock_Handler, 2382 }, 2383 { 2384 MethodName: "GetLastMemPool", 2385 Handler: _Turingchain_GetLastMemPool_Handler, 2386 }, 2387 { 2388 MethodName: "GetProperFee", 2389 Handler: _Turingchain_GetProperFee_Handler, 2390 }, 2391 { 2392 MethodName: "GetWalletStatus", 2393 Handler: _Turingchain_GetWalletStatus_Handler, 2394 }, 2395 { 2396 MethodName: "GetBlockOverview", 2397 Handler: _Turingchain_GetBlockOverview_Handler, 2398 }, 2399 { 2400 MethodName: "GetAddrOverview", 2401 Handler: _Turingchain_GetAddrOverview_Handler, 2402 }, 2403 { 2404 MethodName: "GetBlockHash", 2405 Handler: _Turingchain_GetBlockHash_Handler, 2406 }, 2407 { 2408 MethodName: "GenSeed", 2409 Handler: _Turingchain_GenSeed_Handler, 2410 }, 2411 { 2412 MethodName: "GetSeed", 2413 Handler: _Turingchain_GetSeed_Handler, 2414 }, 2415 { 2416 MethodName: "SaveSeed", 2417 Handler: _Turingchain_SaveSeed_Handler, 2418 }, 2419 { 2420 MethodName: "GetBalance", 2421 Handler: _Turingchain_GetBalance_Handler, 2422 }, 2423 { 2424 MethodName: "QueryChain", 2425 Handler: _Turingchain_QueryChain_Handler, 2426 }, 2427 { 2428 MethodName: "ExecWallet", 2429 Handler: _Turingchain_ExecWallet_Handler, 2430 }, 2431 { 2432 MethodName: "QueryConsensus", 2433 Handler: _Turingchain_QueryConsensus_Handler, 2434 }, 2435 { 2436 MethodName: "CreateTransaction", 2437 Handler: _Turingchain_CreateTransaction_Handler, 2438 }, 2439 { 2440 MethodName: "GetHexTxByHash", 2441 Handler: _Turingchain_GetHexTxByHash_Handler, 2442 }, 2443 { 2444 MethodName: "DumpPrivkey", 2445 Handler: _Turingchain_DumpPrivkey_Handler, 2446 }, 2447 { 2448 MethodName: "DumpPrivkeysFile", 2449 Handler: _Turingchain_DumpPrivkeysFile_Handler, 2450 }, 2451 { 2452 MethodName: "ImportPrivkeysFile", 2453 Handler: _Turingchain_ImportPrivkeysFile_Handler, 2454 }, 2455 { 2456 MethodName: "Version", 2457 Handler: _Turingchain_Version_Handler, 2458 }, 2459 { 2460 MethodName: "IsSync", 2461 Handler: _Turingchain_IsSync_Handler, 2462 }, 2463 { 2464 MethodName: "GetPeerInfo", 2465 Handler: _Turingchain_GetPeerInfo_Handler, 2466 }, 2467 { 2468 MethodName: "NetInfo", 2469 Handler: _Turingchain_NetInfo_Handler, 2470 }, 2471 { 2472 MethodName: "IsNtpClockSync", 2473 Handler: _Turingchain_IsNtpClockSync_Handler, 2474 }, 2475 { 2476 MethodName: "GetFatalFailure", 2477 Handler: _Turingchain_GetFatalFailure_Handler, 2478 }, 2479 { 2480 MethodName: "GetLastBlockSequence", 2481 Handler: _Turingchain_GetLastBlockSequence_Handler, 2482 }, 2483 { 2484 MethodName: "GetSequenceByHash", 2485 Handler: _Turingchain_GetSequenceByHash_Handler, 2486 }, 2487 { 2488 MethodName: "GetBlockByHashes", 2489 Handler: _Turingchain_GetBlockByHashes_Handler, 2490 }, 2491 { 2492 MethodName: "GetBlockBySeq", 2493 Handler: _Turingchain_GetBlockBySeq_Handler, 2494 }, 2495 { 2496 MethodName: "CloseQueue", 2497 Handler: _Turingchain_CloseQueue_Handler, 2498 }, 2499 { 2500 MethodName: "GetAllExecBalance", 2501 Handler: _Turingchain_GetAllExecBalance_Handler, 2502 }, 2503 { 2504 MethodName: "SignRawTx", 2505 Handler: _Turingchain_SignRawTx_Handler, 2506 }, 2507 { 2508 MethodName: "CreateNoBalanceTransaction", 2509 Handler: _Turingchain_CreateNoBalanceTransaction_Handler, 2510 }, 2511 { 2512 MethodName: "QueryRandNum", 2513 Handler: _Turingchain_QueryRandNum_Handler, 2514 }, 2515 { 2516 MethodName: "GetFork", 2517 Handler: _Turingchain_GetFork_Handler, 2518 }, 2519 { 2520 MethodName: "CreateNoBalanceTxs", 2521 Handler: _Turingchain_CreateNoBalanceTxs_Handler, 2522 }, 2523 { 2524 MethodName: "GetParaTxByTitle", 2525 Handler: _Turingchain_GetParaTxByTitle_Handler, 2526 }, 2527 { 2528 MethodName: "LoadParaTxByTitle", 2529 Handler: _Turingchain_LoadParaTxByTitle_Handler, 2530 }, 2531 { 2532 MethodName: "GetParaTxByHeight", 2533 Handler: _Turingchain_GetParaTxByHeight_Handler, 2534 }, 2535 { 2536 MethodName: "GetHeaders", 2537 Handler: _Turingchain_GetHeaders_Handler, 2538 }, 2539 { 2540 MethodName: "GetServerTime", 2541 Handler: _Turingchain_GetServerTime_Handler, 2542 }, 2543 }, 2544 Streams: []grpc.StreamDesc{}, 2545 Metadata: "rpc.proto", 2546 }