Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coin ¶
type Coin interface { // Name returns the written-out name of the coin. Name() string // Unit is the unit code of the string for formatting amounts. Unit() string // FormatAmount formats the given amount as a number followed by the currency code in a suitable // denomination. FormatAmount(int64) string // FormatAmountAsJSON formats the given amount as a JSON object with the number as a string and // the currency code in a suitable denomination. FormatAmountAsJSON(int64) FormattedAmount }
Coin models the currency of a blockchain.
type ConfirmedTransaction ¶
type ConfirmedTransaction interface { PendingTransaction ConfirmationTime() time.Time }
ConfirmedTransaction models a confirmed transaction of the given coin.
type FormattedAmount ¶
type FormattedAmount struct { Amount string `json:"amount"` Unit string `json:"unit"` Conversions map[string]string `json:"conversions"` }
FormattedAmount with unit and conversions.
type PendingTransaction ¶
type PendingTransaction interface { ProposedTransaction BroadcastTime() time.Time }
PendingTransaction models a broadcasted but not yet confirmed transaction of the given coin.
type ProposedTransaction ¶
type ProposedTransaction interface { }
ProposedTransaction models a proposed but not yet fully signed transaction of the given coin.
type RatesUpdater ¶
type RatesUpdater interface { observable.Interface Last() map[string]map[string]float64 }
RatesUpdater updates the exchange rates continuously.
type SignedTransaction ¶
type SignedTransaction interface { ProposedTransaction Valid() bool Broadcast() error // TODO: Not desirable here (because also present in types below)? }
SignedTransaction models a signed but not yet broadcasted transaction of the given coin.
type WalletAddress ¶
type WalletAddress interface { Address Configuration() *signing.Configuration }
WalletAddress models an address in an own wallet at the keypath given by the configuration.
Click to show internal directories.
Click to hide internal directories.