|
|
|
@ -113,15 +113,99 @@ func (m *FetchAccountStateResponse) GetNonce() uint64 { |
|
|
|
|
return 0 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// GetFreeTokenRequest is the request to get free token from the faucet smart contract.
|
|
|
|
|
type GetFreeTokenRequest struct { |
|
|
|
|
// The account address to receive the free token
|
|
|
|
|
Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` |
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
XXX_sizecache int32 `json:"-"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (m *GetFreeTokenRequest) Reset() { *m = GetFreeTokenRequest{} } |
|
|
|
|
func (m *GetFreeTokenRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
func (*GetFreeTokenRequest) ProtoMessage() {} |
|
|
|
|
func (*GetFreeTokenRequest) Descriptor() ([]byte, []int) { |
|
|
|
|
return fileDescriptor_014de31d7ac8c57c, []int{2} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (m *GetFreeTokenRequest) XXX_Unmarshal(b []byte) error { |
|
|
|
|
return xxx_messageInfo_GetFreeTokenRequest.Unmarshal(m, b) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
|
|
|
|
return xxx_messageInfo_GetFreeTokenRequest.Marshal(b, m, deterministic) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenRequest) XXX_Merge(src proto.Message) { |
|
|
|
|
xxx_messageInfo_GetFreeTokenRequest.Merge(m, src) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenRequest) XXX_Size() int { |
|
|
|
|
return xxx_messageInfo_GetFreeTokenRequest.Size(m) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenRequest) XXX_DiscardUnknown() { |
|
|
|
|
xxx_messageInfo_GetFreeTokenRequest.DiscardUnknown(m) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetFreeTokenRequest proto.InternalMessageInfo |
|
|
|
|
|
|
|
|
|
func (m *GetFreeTokenRequest) GetAddress() []byte { |
|
|
|
|
if m != nil { |
|
|
|
|
return m.Address |
|
|
|
|
} |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// GetFreeTokenResponse is the response of GetFreeTokenRequest.
|
|
|
|
|
type GetFreeTokenResponse struct { |
|
|
|
|
// The transaction Id that requests free token from the faucet.
|
|
|
|
|
TxId []byte `protobuf:"bytes,1,opt,name=txId,proto3" json:"txId,omitempty"` |
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"` |
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
XXX_sizecache int32 `json:"-"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (m *GetFreeTokenResponse) Reset() { *m = GetFreeTokenResponse{} } |
|
|
|
|
func (m *GetFreeTokenResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
func (*GetFreeTokenResponse) ProtoMessage() {} |
|
|
|
|
func (*GetFreeTokenResponse) Descriptor() ([]byte, []int) { |
|
|
|
|
return fileDescriptor_014de31d7ac8c57c, []int{3} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (m *GetFreeTokenResponse) XXX_Unmarshal(b []byte) error { |
|
|
|
|
return xxx_messageInfo_GetFreeTokenResponse.Unmarshal(m, b) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
|
|
|
|
return xxx_messageInfo_GetFreeTokenResponse.Marshal(b, m, deterministic) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenResponse) XXX_Merge(src proto.Message) { |
|
|
|
|
xxx_messageInfo_GetFreeTokenResponse.Merge(m, src) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenResponse) XXX_Size() int { |
|
|
|
|
return xxx_messageInfo_GetFreeTokenResponse.Size(m) |
|
|
|
|
} |
|
|
|
|
func (m *GetFreeTokenResponse) XXX_DiscardUnknown() { |
|
|
|
|
xxx_messageInfo_GetFreeTokenResponse.DiscardUnknown(m) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_GetFreeTokenResponse proto.InternalMessageInfo |
|
|
|
|
|
|
|
|
|
func (m *GetFreeTokenResponse) GetTxId() []byte { |
|
|
|
|
if m != nil { |
|
|
|
|
return m.TxId |
|
|
|
|
} |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func init() { |
|
|
|
|
proto.RegisterType((*FetchAccountStateRequest)(nil), "client.FetchAccountStateRequest") |
|
|
|
|
proto.RegisterType((*FetchAccountStateResponse)(nil), "client.FetchAccountStateResponse") |
|
|
|
|
proto.RegisterType((*GetFreeTokenRequest)(nil), "client.GetFreeTokenRequest") |
|
|
|
|
proto.RegisterType((*GetFreeTokenResponse)(nil), "client.GetFreeTokenResponse") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } |
|
|
|
|
|
|
|
|
|
var fileDescriptor_014de31d7ac8c57c = []byte{ |
|
|
|
|
// 172 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
// 229 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0xce, 0xc9, 0x4c, |
|
|
|
|
0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0x4c, 0xb8, 0x24, |
|
|
|
|
0xdc, 0x52, 0x4b, 0x92, 0x33, 0x1c, 0x93, 0x93, 0xf3, 0x4b, 0xf3, 0x4a, 0x82, 0x4b, 0x12, 0x4b, |
|
|
|
@ -129,10 +213,14 @@ var fileDescriptor_014de31d7ac8c57c = []byte{ |
|
|
|
|
0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, 0x60, 0x5c, 0x25, 0x6f, 0x2e, 0x49, |
|
|
|
|
0x2c, 0xba, 0x8a, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x41, 0xda, 0x92, 0x12, 0x73, 0x12, 0xf3, 0x92, |
|
|
|
|
0x53, 0x61, 0xda, 0xa0, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0x7c, 0x90, 0x38, 0x93, 0x02, 0xa3, |
|
|
|
|
0x06, 0x4b, 0x10, 0x84, 0x63, 0x94, 0xcd, 0xc5, 0xeb, 0x0c, 0x76, 0x4c, 0x70, 0x6a, 0x51, 0x59, |
|
|
|
|
0x66, 0x72, 0xaa, 0x50, 0x14, 0x97, 0x20, 0x86, 0xe9, 0x42, 0x0a, 0x7a, 0x50, 0xf7, 0xe3, 0x72, |
|
|
|
|
0xae, 0x94, 0x22, 0x1e, 0x15, 0x10, 0xa7, 0x29, 0x31, 0x24, 0xb1, 0x81, 0xbd, 0x6f, 0x0c, 0x08, |
|
|
|
|
0x00, 0x00, 0xff, 0xff, 0x2a, 0x07, 0xa9, 0xb6, 0x0e, 0x01, 0x00, 0x00, |
|
|
|
|
0x06, 0x4b, 0x10, 0x84, 0xa3, 0xa4, 0xcf, 0x25, 0xec, 0x9e, 0x5a, 0xe2, 0x56, 0x94, 0x9a, 0x1a, |
|
|
|
|
0x92, 0x9f, 0x9d, 0x9a, 0x47, 0xd8, 0x76, 0x2d, 0x2e, 0x11, 0x54, 0x0d, 0x50, 0x8b, 0x85, 0xb8, |
|
|
|
|
0x58, 0x4a, 0x2a, 0x3c, 0x53, 0xa0, 0xca, 0xc1, 0x6c, 0xa3, 0x1d, 0x8c, 0x5c, 0xbc, 0xce, 0x60, |
|
|
|
|
0xaf, 0x06, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x0a, 0x45, 0x71, 0x09, 0x62, 0xb8, 0x5d, 0x48, |
|
|
|
|
0x41, 0x0f, 0x1a, 0x3a, 0xb8, 0x02, 0x43, 0x4a, 0x11, 0x8f, 0x0a, 0x88, 0xfd, 0x4a, 0x0c, 0x42, |
|
|
|
|
0xde, 0x5c, 0x3c, 0xc8, 0x2e, 0x13, 0x92, 0x86, 0x69, 0xc2, 0xe2, 0x41, 0x29, 0x19, 0xec, 0x92, |
|
|
|
|
0x30, 0xc3, 0x92, 0xd8, 0xc0, 0x31, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xd9, 0x35, |
|
|
|
|
0x0c, 0xb9, 0x01, 0x00, 0x00, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
@ -148,6 +236,7 @@ const _ = grpc.SupportPackageIsVersion4 |
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type ClientServiceClient interface { |
|
|
|
|
FetchAccountState(ctx context.Context, in *FetchAccountStateRequest, opts ...grpc.CallOption) (*FetchAccountStateResponse, error) |
|
|
|
|
GetFreeToken(ctx context.Context, in *GetFreeTokenRequest, opts ...grpc.CallOption) (*GetFreeTokenResponse, error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type clientServiceClient struct { |
|
|
|
@ -167,9 +256,19 @@ func (c *clientServiceClient) FetchAccountState(ctx context.Context, in *FetchAc |
|
|
|
|
return out, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *clientServiceClient) GetFreeToken(ctx context.Context, in *GetFreeTokenRequest, opts ...grpc.CallOption) (*GetFreeTokenResponse, error) { |
|
|
|
|
out := new(GetFreeTokenResponse) |
|
|
|
|
err := c.cc.Invoke(ctx, "/client.ClientService/GetFreeToken", in, out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
return out, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// ClientServiceServer is the server API for ClientService service.
|
|
|
|
|
type ClientServiceServer interface { |
|
|
|
|
FetchAccountState(context.Context, *FetchAccountStateRequest) (*FetchAccountStateResponse, error) |
|
|
|
|
GetFreeToken(context.Context, *GetFreeTokenRequest) (*GetFreeTokenResponse, error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func RegisterClientServiceServer(s *grpc.Server, srv ClientServiceServer) { |
|
|
|
@ -194,6 +293,24 @@ func _ClientService_FetchAccountState_Handler(srv interface{}, ctx context.Conte |
|
|
|
|
return interceptor(ctx, in, info, handler) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _ClientService_GetFreeToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
|
|
|
in := new(GetFreeTokenRequest) |
|
|
|
|
if err := dec(in); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
if interceptor == nil { |
|
|
|
|
return srv.(ClientServiceServer).GetFreeToken(ctx, in) |
|
|
|
|
} |
|
|
|
|
info := &grpc.UnaryServerInfo{ |
|
|
|
|
Server: srv, |
|
|
|
|
FullMethod: "/client.ClientService/GetFreeToken", |
|
|
|
|
} |
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
|
|
|
return srv.(ClientServiceServer).GetFreeToken(ctx, req.(*GetFreeTokenRequest)) |
|
|
|
|
} |
|
|
|
|
return interceptor(ctx, in, info, handler) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var _ClientService_serviceDesc = grpc.ServiceDesc{ |
|
|
|
|
ServiceName: "client.ClientService", |
|
|
|
|
HandlerType: (*ClientServiceServer)(nil), |
|
|
|
@ -202,6 +319,10 @@ var _ClientService_serviceDesc = grpc.ServiceDesc{ |
|
|
|
|
MethodName: "FetchAccountState", |
|
|
|
|
Handler: _ClientService_FetchAccountState_Handler, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
MethodName: "GetFreeToken", |
|
|
|
|
Handler: _ClientService_GetFreeToken_Handler, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
Streams: []grpc.StreamDesc{}, |
|
|
|
|
Metadata: "client.proto", |
|
|
|
|