1: <?php declare( strict_types = 1 );
2:
3: namespace Waves\Model;
4:
5: use Waves\Account\Address;
6: use Waves\Account\PublicKey;
7: use Waves\Common\JsonBase;
8:
9: class AssetDetails extends JsonBase
10: {
11: function assetId(): AssetId { return $this->json->get( 'assetId' )->asAssetId(); }
12: function issueHeight(): int { return $this->json->get( 'issueHeight' )->asInt(); }
13: function issueTimestamp(): int { return $this->json->get( 'issueTimestamp' )->asInt(); }
14: function issuer(): Address { return $this->json->get( 'issuer' )->asAddress(); }
15: function issuerPublicKey(): PublicKey { return $this->json->get( 'issuerPublicKey' )->asPublicKey(); }
16: function name(): string { return $this->json->get( 'name' )->asString(); }
17: function description(): string { return $this->json->get( 'description' )->asString(); }
18: function decimals(): int { return $this->json->get( 'decimals' )->asInt(); }
19: function isReissuable(): bool { return $this->json->get( 'reissuable' )->asBoolean(); }
20: function quantity(): int { return $this->json->get( 'quantity' )->asInt(); }
21: function isScripted(): bool { return $this->json->get( 'scripted' )->asBoolean(); }
22: function minSponsoredAssetFee(): int { return $this->json->getOr( 'minSponsoredAssetFee', 0 )->asInt(); }
23: function originTransactionId(): Id { return $this->json->get( 'originTransactionId' )->asId(); }
24: function scriptDetails(): ScriptDetails { return $this->json->getOr( 'scriptDetails', ScriptDetails::EMPTY )->asJson()->asScriptDetails(); }
25: }
26: