Skip to content

Commit

Permalink
Account - added getSequenceAsBigInteger
Browse files Browse the repository at this point in the history
  • Loading branch information
zulucrypto committed Sep 22, 2018
1 parent ccafdbb commit a7d25da
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Model/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class Account extends RestApiModel

private $accountId;

/**
* NOTE: for the BigInteger representation of this, see $this->getSequenceAsBigInteger()
* @var string
*/
private $sequence;

private $subentryCount;
Expand Down Expand Up @@ -376,11 +380,27 @@ public function getThresholds()
return $this->thresholds;
}

/**
* This returns the sequence exactly as it comes back from the Horizon API
*
* See getSequenceAsBigInteger if you need to use this value in a transaction
* or other 64-bit safe location.
*
* @return string
*/
public function getSequence()
{
return $this->sequence;
}

/**
* @return BigInteger
*/
public function getSequenceAsBigInteger()
{
return new BigInteger($this->sequence);
}

/**
* @return array|AssetAmount[]
*/
Expand Down

0 comments on commit a7d25da

Please sign in to comment.