-
Notifications
You must be signed in to change notification settings - Fork 446
Expand file tree
/
Copy pathBlockInterface.php
More file actions
41 lines (33 loc) · 917 Bytes
/
BlockInterface.php
File metadata and controls
41 lines (33 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
declare(strict_types=1);
namespace BitWasp\Bitcoin\Block;
use BitWasp\Bitcoin\SerializableInterface;
use BitWasp\Bitcoin\Transaction\TransactionInterface;
use BitWasp\Buffertools\BufferInterface;
interface BlockInterface extends SerializableInterface
{
const MAX_BLOCK_SIZE = 1000000;
/**
* Get the header of this block.
*
* @return BlockHeaderInterface
*/
public function getHeader(): BlockHeaderInterface;
/**
* Calculate the merkle root of the transactions in the block.
*
* @return BufferInterface
*/
public function getMerkleRoot(): BufferInterface;
/**
* Return the block's transactions.
*
* @return TransactionInterface[]
*/
public function getTransactions(): array;
/**
* @param int $i
* @return TransactionInterface
*/
public function getTransaction(int $i): TransactionInterface;
}