1414import sentinel_protobuf .sentinel .node .v2 .querier_pb2 as sentinel_node_v2_querier_pb2
1515import sentinel_protobuf .sentinel .node .v2 .querier_pb2_grpc as sentinel_node_v2_querier_pb2_grpc
1616import sentinel_protobuf .sentinel .node .v2 .msg_pb2 as msg_pb2
17+ import sentinel_protobuf .sentinel .node .v3 .msg_pb2 as msg_pb2_3
1718
1819from sentinel_sdk .querier .querier import Querier
1920from sentinel_sdk .transactor .transactor import Transactor
20- from sentinel_sdk .types import PageRequest , TxParams , NodeType
21+ from sentinel_sdk .types import PageRequest , TxParams , NodeType , Price
2122
2223from .wireguard import WgKey
2324
@@ -129,6 +130,7 @@ def RegisterNode(self, gigabyte_prices: int, hourly_prices: int, remote_url: str
129130 )
130131 return self .transaction ([msg ], tx_params )
131132
133+ '''
132134 def SubscribeToNode(self, node_address: str, gigabytes: int = 0, hours: int = 0, denom: str = "udvpn", tx_params: TxParams = TxParams()):
133135 msg = msg_pb2.MsgSubscribeRequest(
134136 frm = self._account.address,
@@ -138,7 +140,17 @@ def SubscribeToNode(self, node_address: str, gigabytes: int = 0, hours: int = 0,
138140 node_address = node_address,
139141 )
140142 return self.transaction([msg], tx_params)
141-
143+ '''
144+
145+ def SubscribeToNode (self , node_address : str , gigabytes : int = 0 , hours : int = 0 , price : Price = Price (), tx_params : TxParams = TxParams ()):
146+ msg = msg_pb2_3 .MsgStartSessionRequest (
147+ frm = self ._account .address ,
148+ gigabytes = gigabytes ,
149+ hours = hours ,
150+ node_address = node_address ,
151+ max_price = price ,
152+ )
153+ return self .transaction ([msg ], tx_params )
142154 def UpdateNodeDetails (self , gigabyte_prices : int , hourly_prices : int , remote_url : str , tx_params : TxParams = TxParams ()):
143155 msg = msg_pb2 .MsgUpdateDetailsRequest (
144156 frm = self ._account .address ,
0 commit comments