1: <?php declare( strict_types = 1 );
2:
3: namespace Waves\Model;
4:
5: use Waves\Account\Address;
6: use Waves\Common\JsonBase;
7:
8: class BlockHeaders extends JsonBase
9: {
10: /**
11: * @return array<int>
12: */
13: function features(): array { return $this->json->get( 'features' )->asArrayInt(); }
14: function version(): int { return $this->json->get( 'version' )->asInt(); }
15: function timestamp(): int { return $this->json->get( 'timestamp' )->asInt(); }
16: function reference(): string { return $this->json->get( 'reference' )->asString(); }
17: function baseTarget(): int { return $this->json->get( 'nxt-consensus' )->asJson()->get( 'base-target' )->asInt(); }
18: function generationSignature(): string { return $this->json->get( 'nxt-consensus' )->asJson()->get( 'generation-signature' )->asString(); }
19: function transactionsRoot(): string { return $this->json->get( 'transactionsRoot' )->asString(); }
20: function id(): Id { return $this->json->get( 'id' )->asId(); }
21: function desiredReward(): int { return $this->json->get( 'desiredReward' )->asInt(); }
22: function generator(): Address { return $this->json->get( 'generator' )->asAddress(); }
23: function signature(): string { return $this->json->get( 'signature' )->asString(); }
24: function size(): int { return $this->json->get( 'blocksize' )->asInt(); }
25: function transactionsCount(): int { return $this->json->get( 'transactionCount' )->asInt(); }
26: function height(): int { return $this->json->get( 'height' )->asInt(); }
27: function totalFee(): int { return $this->json->get( 'totalFee' )->asInt(); }
28: function reward(): int { return $this->json->get( 'reward' )->asInt(); }
29: function vrf(): string { return $this->json->get( 'VRF' )->asString(); }
30: }
31: