- Openclerk\Currencies\Cryptocurrency
- Cryptocurrency\NuShares
class Cryptocurrency \ NuShares
- All implemented interfaces:
- Currency, BlockCurrency, DifficultyCurrency, AddressableCurrency, ReceivedCurrency, BalanceableCurrency, CurrencyInformation
Represents the NuShares cryptocurrency.
This is the base interface; other interfaces will provide additional functionality as necessary. (from Currency)
- See:
-
BlockBalanceableCurrency
Method Summary
| Name | Description |
|---|---|
| getBalance($address, Logger $logger) | Get the account balance of the given account. This method blocks until the balance has been obtained. |
| getBalanceURL($address) | |
| getBlockCount(Logger $logger) | Get the most recent block count for this currency. This method blocks until the block count has been obtained. |
| getCode() | Get the unique three-letter currency code for this currency, e.g. 'btc' or 'usd'. Must be lowercase. This is not visible to users. |
| getCommunityLinks() | |
| getDifficulty(Logger $logger) | Get the most recent difficulty for this currency. This method blocks until the balance has been obtained. |
| getExplorerName() | |
| getExplorerURL() | |
| getName() | Get the English name of this currency, e.g. "Bitcoin" or "United States Dollar". |
| getReceived($address, Logger $logger) | Get the received account balance of the given account. This method blocks until the balance has been obtained. |
| getURL() | |
| hasExplorer() | |
| isValid($address) | Is this account identifier valid for this currency? |
Inherited Method Summary
| Name | Description |
|---|---|
| getAbbr() | Get the currency code visible to users, which can be of any length and does not need to be unique (but should be). Often just the uppercase of #getCode. (from Cryptocurrency) |
| getCurrency() | Get the Currency for this CurrencyInformation. (from Cryptocurrency) |
| isCommodity() | (from Cryptocurrency) |
| isCryptocurrency() | (from Cryptocurrency) |
| isFiat() | (from Cryptocurrency) |
public function getBalance($address, Logger $logger)
Get the account balance of the given account. This method blocks until the balance has been obtained. (from getBalance)
- Parameters:
$logger- a logger to log info/error messages to- Throws:
BalanceException if something happened and the balance could not be obtained.
public function getBalanceURL($address)
- Returns:
a public URL for exploring the given account, ornullif there is none
public function getBlockCount(Logger $logger)
Get the most recent block count for this currency. This method blocks until the block count has been obtained. (from getBlockCount)
- Parameters:
$logger- a logger to log info/error messages to- Throws:
BlockException if something happened and the block count could not be obtained
public function getCode()
Get the unique three-letter currency code for this currency, e.g. 'btc' or 'usd'. Must be lowercase. This is not visible to users. (from getCode)
public function getCommunityLinks()
- Returns:
an array of (url => title) community links, or an empty array if there are none
public function getDifficulty(Logger $logger)
Get the most recent difficulty for this currency. This method blocks until the balance has been obtained. (from getDifficulty)
- Parameters:
$logger- a logger to log info/error messages to- Throws:
DifficultyException if something happened and the block count could not be obtained
public function getExplorerName()
- Returns:
the name of the explorer, ornullif there is none- See:
public function getExplorerURL()
- Returns:
a public URL for the explorer, ornullif there is none- See:
public function getName()
Get the English name of this currency, e.g. "Bitcoin" or "United States Dollar". (from getName)
public function getReceived($address, Logger $logger)
Get the received account balance of the given account. This method blocks until the balance has been obtained. (from getReceived)
- Parameters:
$logger- a logger to log info/error messages to- Throws:
BalanceException if something happened and the balance could not be obtained.
public function getURL()
- Returns:
a URL for more information about this currency, ornullif there is none
public function hasExplorer()
- Returns:
true if this Currency has a public explorer that can be used to look at an individual account.
public function isValid($address)
Is this account identifier valid for this currency? (from isValid)
- Returns:
false if this account identifier is not valid