Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions pyband/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading