global: private xpub support part 1

This commit is contained in:
nym21
2026-06-16 23:37:03 +02:00
parent 6f430bdb8c
commit 0c7861071d
70 changed files with 5874 additions and 12510 deletions
@@ -298,6 +298,16 @@ class AddrChainStats(TypedDict):
type_index: TypeIndex
realized_price: Dollars
class AddrHashPrefixMatches(TypedDict):
addr_type: OutputType
prefix: str
truncated: bool
addresses: List[Addr]
class AddrHashPrefixParam(TypedDict):
addr_type: OutputType
prefix: str
class AddrMempoolStats(TypedDict):
"""
Address statistics in the mempool (unconfirmed transactions only)
@@ -8436,6 +8446,14 @@ class BrkClient(BrkClientBase):
path = f'/api/v1/historical-price{"?" + query if query else ""}'
return self.get_json(path)
def get_address_hash_prefix_matches(self, addr_type: OutputType, prefix: str) -> AddrHashPrefixMatches:
"""Address hash-prefix matches.
Find addresses by address type and address-payload hash prefix. Intended for privacy-preserving client-side wallet discovery without sending raw addresses or xpubs. Fetch metadata for the returned addresses through `/api/address/{address}`.
Endpoint: `GET /api/address/hash-prefix/{addr_type}/{prefix}`"""
return self.get_json(f'/api/address/hash-prefix/{addr_type}/{prefix}')
def get_address(self, address: Addr) -> AddrStats:
"""Address information.