namespace Openclerk\Currencies

Interfaces

Name Description
AddressableCurrency An "AddressableCurrency" is a Currency which has unique account identifiers that can be used to obtain balance information. For example, all cryptocurrencies are AddressableCurrencies.
BalanceableCurrency An "BalanceableCurrency" is a AddressableCurrency where we can obtain balances for a given account identifier.
BlockBalanceableCurrency A "BlockBalanceableCurrency" is a currency in which we can get the balance at a certain block number.
BlockCurrency A "BlockCurrency" is a currency which consists of blocks in a blockchain, and we can get the number of blocks that are currently present in that blockchain.
ConfirmableCurrency A "ConfirmableCurrency" is a currency which can get the balance with a given number of confirmations. It should probably also extend BlockCurrency.
Currency A "currency" represents some unit of measurement that can be converted into another "currency" unit, e.g. through an Exchange. Can also cover commodities.
CurrencyFactory Allows software that uses this component to create instances of Currencys, or null if none could be found for the given code.
CurrencyInformation Adds more user information about a currency.
DifficultyCurrency A "DifficultyCurrency" is a currency which has an associated difficulty, and we can get the current difficulty of that currency.
DisabledExchange Represents a historical exchange which has now been disabled, either permanently or temporarily. Calling any fetch methods on this exchange may return errors.
Exchange Represents an exchange which can be used to convert one value of Currency into another value of another Currency.
ExchangeInformation Adds more user information about an exchange.
HashAlgorithmInformation Adds more user information about a hash algorithm.
HashableCurrency A "HashableCurrency" is a currency which can be generated by hashing some algorithm. In the future this can be extended to currencies which have multiple hashing algorithms.
MultiBalanceableCurrency A "MultiBalanceableCurrency" is a AddressableCurrency where we can obtain multiple balances in multiple currencies for a given account identifier.
ReceivedCurrency A "ReceivedCurrency" is a AddressableCurrency where we can obtain received balances for a given account identifier.
SecurityExchange A SecurityExchange is very similar to a currency Exchange, except instead of (currency, currency) rates, we have security rates, and each security can be denominated in a separate currency, and each SecurityExchange can define its own Securitys.

Classes

Name Description
BalanceException
BlockException
CommodityCurrency Represents a commodity currency.
Cryptocurrency Represents a cryptocurrency.
DifficultyException
ExchangeRateException
FiatCurrency Represents a fiat currency.
HashAlgorithm A "HashAlgorithm" represents some type of algorithm used to hash a cryptocurrency. The performance of the algorithm can be measured in some way, in operations per second.
SecurityExchangeRateException
SimpleExchange Implements some basic implementations of an Exchange. Assumes there is a single API call that can be used to list all exchanges and get all rates - #fetchAllRates.
SimpleSecurityExchange Implements some basic implementations of an SecurityExchange. Assumes there is a single API call that can be used to list all exchanges and get all rates - #fetchAllRates.