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;
7
8use BrianHenryIE\WP_Bitcoin_Gateway\API\Model\Address_Balance;
9use BrianHenryIE\WP_Bitcoin_Gateway\API\Model\Transaction_Interface;
10use DateTimeInterface;
11use BrianHenryIE\WP_Bitcoin_Gateway\API_Interface;
12
13interface Blockchain_API_Interface {
14
15    public function get_blockchain_height(): int;
16
17    /**
18     * The total amount in BTC received at this address.
19     *
20     * @param string $btc_address The payment address to check.
21     * @param bool   $confirmed
22     *
23     * @return string
24     */
25    public function get_received_by_address( string $btc_address, bool $confirmed ): string;
26
27    /**
28     * The current balance of the address.
29     *
30     * @param string $btc_address The payment address to check.
31     * @param int    $number_of_confirmations
32     */
33    public function get_address_balance( string $btc_address, int $number_of_confirmations ): Address_Balance;
34
35    /**
36     * Query the Blockchain API for the transactions received at this address.
37     *
38     * @param string $btc_address The payment address to check.
39     *
40     * @return array<string, Transaction_Interface> Txid, data.
41     */
42    public function get_transactions_received( string $btc_address ): array;
43}