1: <?php declare( strict_types = 1 );
2:
3: namespace Waves\Model;
4:
5: use Waves\Common\JsonBase;
6: use Waves\Transactions\Transaction;
7:
8: class AssetBalance extends JsonBase
9: {
10: function assetId(): AssetId { return $this->json->get( 'assetId' )->asAssetId(); }
11: function balance(): int { return $this->json->get( 'balance' )->asInt(); }
12: function isReissuable(): bool { return $this->json->get( 'reissuable' )->asBoolean(); }
13: function quantity(): int { return $this->json->get( 'quantity' )->asInt(); }
14: function minSponsoredAssetFee(): int { return $this->json->getOr( 'minSponsoredAssetFee', 0 )->asInt(); }
15: function sponsorBalance(): int { return $this->json->getOr( 'sponsorBalance', 0 )->asInt(); }
16: function issueTransaction(): Transaction { return $this->json->get( 'issueTransaction' )->asJson()->asTransaction(); }
17: }
18: