Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MinimumTransferValue ¶ added in v1.35.0
func MinimumTransferValue(code currency_lib.Code) float64
MinimumTransferValue is the smallest amount of a currency OCP transfers: one unit at the currency's last decimal place (currency.GetDecimals), 0.01 for USD and 1 for a currency with no minor unit. It is the floor a group's minimum balance requirement must meet and the least a reaction boost may pay. OCP's own amount validation is the source of the definition; it is not exported, so the arithmetic is repeated here.
Types ¶
type Entry ¶
type Entry struct {
Region currency_lib.Code
Presets Presets
}
Entry pairs a currency with its presets.
func AllPresets ¶
func AllPresets() []Entry
AllPresets returns every currency's presets, ordered by currency code.
type Presets ¶
Presets are the payment amounts offered for a currency, in major currency units. Minimum is the floor enforced on the payment that opens a DM, send or tip, when the recipient has set no DM chat initialization fee, and the least such a fee may be; the remaining tiers are the amounts clients surface as one-tap presets.
func PresetsFor ¶
func PresetsFor(region currency_lib.Code) (Presets, bool)
PresetsFor returns the presets for a currency, and whether it has any.