diff --git a/pyband/client.py b/pyband/client.py index f02118e..7fb6c8b 100644 --- a/pyband/client.py +++ b/pyband/client.py @@ -28,6 +28,12 @@ MsgStub as BandTssMsgStub, QueryStub as BandTssQueryStub, ) +from .proto.band.base.oracle.v1 import ( + ServiceStub as OracleServiceStub, + ProofRequest, + ProofResponse, +) + from .proto.band.feeds.v1beta1 import ( MsgStub as FeedsMsgStub, QueryStub as FeedsQueryStub, @@ -80,6 +86,9 @@ def __init__(self, channel: Channel): self.band_tss_query_stub = BandTssQueryStub(self.__channel) self.band_tss_msg_stub = BandTssMsgStub(self.__channel) + # band.base + self.band_oracle_service_stub = OracleServiceStub(self.__channel) + # band.feeds self.feeds_query_stub = FeedsQueryStub(self.__channel) self.feeds_msg_stub = FeedsMsgStub(self.__channel) @@ -430,6 +439,17 @@ async def get_feed_prices(self, signal_ids: List[str]) -> QueryPricesResponse: QueryPricesRequest(signal_ids=signal_ids) ) + async def get_proof(self, proof_request: ProofRequest) -> ProofResponse: + """Gets the proof for a request. + + Args: + proof_request: The proof request. + + Returns: + The proof response. + """ + return await self.band_oracle_service_stub.proof(proof_request) + async def simulate_tx(self, tx_bytes: bytes) -> SimulateResponse: """Simulates a transaction from the tx_bytes. diff --git a/pyproject.toml b/pyproject.toml index caa8dd4..133402c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ license = "MIT" name = "pyband" readme = "README.md" repository = "https://github.com/bandprotocol/pyband" -version = "0.4.0-rc1" +version = "0.4.0-rc2" [tool.poetry.dependencies] bech32 = "1.2.0"