bitcoinQuery() returns a typed BitcoinQueryBuilder. Add the fields you need, then add one or more range-scoped requests.
Methods
addFields() narrows both the TypeScript output and the fields requested from Portal. The stream always adds block.number and block.hash for cursor handling.
Field groups
Request filters
Values inside a filter list are ORed. Different fields in one request are ANDed. Separate request clauses are combined across their ranges.
Ranges
Request ranges accept block numbers, formatted block-number strings, ISO dates,Date objects, and 'latest' for from.
from is 'latest', to must be a block number.
Bitcoin-specific formats
- Hashes, scripts, and witness items are bare hex without
0x. - Output and previous-output values are BTC numbers, not satoshis.
- Block timestamps are Unix seconds.
- Address fields are optional because not every script has a standard address.