22"""Client and server classes corresponding to protobuf-defined services."""
33import grpc
44
5- import injective_insurance_rpc_pb2 as injective__insurance__rpc__pb2
5+ from injective .exchange_api import (
6+ injective_insurance_rpc_pb2 as injective__insurance__rpc__pb2 ,
7+ )
68
79
810class InjectiveInsuranceRPCStub (object ):
9- """InjectiveInsuranceRPC defines gRPC API of Insurance provider.
10- """
11+ """InjectiveInsuranceRPC defines gRPC API of Insurance provider."""
1112
1213 def __init__ (self , channel ):
1314 """Constructor.
@@ -16,89 +17,110 @@ def __init__(self, channel):
1617 channel: A grpc.Channel.
1718 """
1819 self .Funds = channel .unary_unary (
19- ' /injective_insurance_rpc.InjectiveInsuranceRPC/Funds' ,
20- request_serializer = injective__insurance__rpc__pb2 .FundsRequest .SerializeToString ,
21- response_deserializer = injective__insurance__rpc__pb2 .FundsResponse .FromString ,
22- )
20+ " /injective_insurance_rpc.InjectiveInsuranceRPC/Funds" ,
21+ request_serializer = injective__insurance__rpc__pb2 .FundsRequest .SerializeToString ,
22+ response_deserializer = injective__insurance__rpc__pb2 .FundsResponse .FromString ,
23+ )
2324 self .Redemptions = channel .unary_unary (
24- ' /injective_insurance_rpc.InjectiveInsuranceRPC/Redemptions' ,
25- request_serializer = injective__insurance__rpc__pb2 .RedemptionsRequest .SerializeToString ,
26- response_deserializer = injective__insurance__rpc__pb2 .RedemptionsResponse .FromString ,
27- )
25+ " /injective_insurance_rpc.InjectiveInsuranceRPC/Redemptions" ,
26+ request_serializer = injective__insurance__rpc__pb2 .RedemptionsRequest .SerializeToString ,
27+ response_deserializer = injective__insurance__rpc__pb2 .RedemptionsResponse .FromString ,
28+ )
2829
2930
3031class InjectiveInsuranceRPCServicer (object ):
31- """InjectiveInsuranceRPC defines gRPC API of Insurance provider.
32- """
32+ """InjectiveInsuranceRPC defines gRPC API of Insurance provider."""
3333
3434 def Funds (self , request , context ):
35- """Funds lists all insurance funds.
36- """
35+ """Funds lists all insurance funds."""
3736 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
38- context .set_details (' Method not implemented!' )
39- raise NotImplementedError (' Method not implemented!' )
37+ context .set_details (" Method not implemented!" )
38+ raise NotImplementedError (" Method not implemented!" )
4039
4140 def Redemptions (self , request , context ):
42- """PendingRedemptions lists all pending redemptions according to a filter
43- """
41+ """PendingRedemptions lists all pending redemptions according to a filter"""
4442 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
45- context .set_details (' Method not implemented!' )
46- raise NotImplementedError (' Method not implemented!' )
43+ context .set_details (" Method not implemented!" )
44+ raise NotImplementedError (" Method not implemented!" )
4745
4846
4947def add_InjectiveInsuranceRPCServicer_to_server (servicer , server ):
5048 rpc_method_handlers = {
51- ' Funds' : grpc .unary_unary_rpc_method_handler (
52- servicer .Funds ,
53- request_deserializer = injective__insurance__rpc__pb2 .FundsRequest .FromString ,
54- response_serializer = injective__insurance__rpc__pb2 .FundsResponse .SerializeToString ,
55- ),
56- ' Redemptions' : grpc .unary_unary_rpc_method_handler (
57- servicer .Redemptions ,
58- request_deserializer = injective__insurance__rpc__pb2 .RedemptionsRequest .FromString ,
59- response_serializer = injective__insurance__rpc__pb2 .RedemptionsResponse .SerializeToString ,
60- ),
49+ " Funds" : grpc .unary_unary_rpc_method_handler (
50+ servicer .Funds ,
51+ request_deserializer = injective__insurance__rpc__pb2 .FundsRequest .FromString ,
52+ response_serializer = injective__insurance__rpc__pb2 .FundsResponse .SerializeToString ,
53+ ),
54+ " Redemptions" : grpc .unary_unary_rpc_method_handler (
55+ servicer .Redemptions ,
56+ request_deserializer = injective__insurance__rpc__pb2 .RedemptionsRequest .FromString ,
57+ response_serializer = injective__insurance__rpc__pb2 .RedemptionsResponse .SerializeToString ,
58+ ),
6159 }
6260 generic_handler = grpc .method_handlers_generic_handler (
63- 'injective_insurance_rpc.InjectiveInsuranceRPC' , rpc_method_handlers )
61+ "injective_insurance_rpc.InjectiveInsuranceRPC" , rpc_method_handlers
62+ )
6463 server .add_generic_rpc_handlers ((generic_handler ,))
6564
6665
67- # This class is part of an EXPERIMENTAL API.
66+ # This class is part of an EXPERIMENTAL API.
6867class InjectiveInsuranceRPC (object ):
69- """InjectiveInsuranceRPC defines gRPC API of Insurance provider.
70- """
68+ """InjectiveInsuranceRPC defines gRPC API of Insurance provider."""
7169
7270 @staticmethod
73- def Funds (request ,
71+ def Funds (
72+ request ,
73+ target ,
74+ options = (),
75+ channel_credentials = None ,
76+ call_credentials = None ,
77+ insecure = False ,
78+ compression = None ,
79+ wait_for_ready = None ,
80+ timeout = None ,
81+ metadata = None ,
82+ ):
83+ return grpc .experimental .unary_unary (
84+ request ,
7485 target ,
75- options = (),
76- channel_credentials = None ,
77- call_credentials = None ,
78- insecure = False ,
79- compression = None ,
80- wait_for_ready = None ,
81- timeout = None ,
82- metadata = None ):
83- return grpc .experimental .unary_unary (request , target , '/injective_insurance_rpc.InjectiveInsuranceRPC/Funds' ,
86+ "/injective_insurance_rpc.InjectiveInsuranceRPC/Funds" ,
8487 injective__insurance__rpc__pb2 .FundsRequest .SerializeToString ,
8588 injective__insurance__rpc__pb2 .FundsResponse .FromString ,
86- options , channel_credentials ,
87- insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
89+ options ,
90+ channel_credentials ,
91+ insecure ,
92+ call_credentials ,
93+ compression ,
94+ wait_for_ready ,
95+ timeout ,
96+ metadata ,
97+ )
8898
8999 @staticmethod
90- def Redemptions (request ,
100+ def Redemptions (
101+ request ,
102+ target ,
103+ options = (),
104+ channel_credentials = None ,
105+ call_credentials = None ,
106+ insecure = False ,
107+ compression = None ,
108+ wait_for_ready = None ,
109+ timeout = None ,
110+ metadata = None ,
111+ ):
112+ return grpc .experimental .unary_unary (
113+ request ,
91114 target ,
92- options = (),
93- channel_credentials = None ,
94- call_credentials = None ,
95- insecure = False ,
96- compression = None ,
97- wait_for_ready = None ,
98- timeout = None ,
99- metadata = None ):
100- return grpc .experimental .unary_unary (request , target , '/injective_insurance_rpc.InjectiveInsuranceRPC/Redemptions' ,
115+ "/injective_insurance_rpc.InjectiveInsuranceRPC/Redemptions" ,
101116 injective__insurance__rpc__pb2 .RedemptionsRequest .SerializeToString ,
102117 injective__insurance__rpc__pb2 .RedemptionsResponse .FromString ,
103- options , channel_credentials ,
104- insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
118+ options ,
119+ channel_credentials ,
120+ insecure ,
121+ call_credentials ,
122+ compression ,
123+ wait_for_ready ,
124+ timeout ,
125+ metadata ,
126+ )
0 commit comments