Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * @package    brianhenryie/bh-wp-bitcoin-gateway
4 */
5
6namespace BrianHenryIE\WP_Bitcoin_Gateway\API\Clients;
7
8use BrianHenryIE\WP_Bitcoin_Gateway\API\Model\Exceptions\Rate_Limit_Exception;
9use BrianHenryIE\WP_Bitcoin_Gateway\API\Model\Payments\Transaction;
10
11interface Blockchain_API_Interface {
12
13    /**
14     * @return int The height of the last mined Bitcoin block.
15     *
16     * @throws Rate_Limit_Exception When the blockchain API rate limit has been exceeded and the request is throttled.
17     */
18    public function get_blockchain_height(): int;
19
20    /**
21     * Query the Blockchain API for the transactions received at this address.
22     *
23     * @param string $btc_address The payment address to check.
24     *
25     * @return array<string, Transaction> Txid, data.
26     *
27     * @throws Rate_Limit_Exception When the blockchain API rate limit has been exceeded while querying for address transactions.
28     */
29    public function get_transactions_received( string $btc_address ): array;
30}