feat: Waku v2 bridge

Issue #12610
This commit is contained in:
Michal Iskierko
2023-11-12 13:29:38 +01:00
parent 56e7bd01ca
commit 6d31343205
6716 changed files with 1982502 additions and 5891 deletions

1
vendor/github.com/ladydascalie/currency/.gitignore generated vendored Normal file
View File

@@ -0,0 +1 @@
.idea/

21
vendor/github.com/ladydascalie/currency/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Benjamin Cable
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

4
vendor/github.com/ladydascalie/currency/Makefile generated vendored Normal file
View File

@@ -0,0 +1,4 @@
build:
go run cmd/main.go
gofmt -w std.go
go test -v -cover ./...

29
vendor/github.com/ladydascalie/currency/README.md generated vendored Normal file
View File

@@ -0,0 +1,29 @@
# currency
This package generates structs containing all the up-to-date `ISO4217` currency codes and minor units, along with a very simple validator.
Data is graciously provided by:
- [International Organization for Standardization](https://www.iso.org/iso-4217-currency-codes.html)
- [Currency Code Services ISO 4217 Maintenance Agency](https://www.currency-iso.org)
## Usage:
```
package main
func main() {
// Validation of codes.
ok := currency.Valid("ABC")
if !ok {
// whatever you need.
}
// easy to get the values
fmt.Println(currency.USD.Code())
// Output: USD
fmt.Println(currency.USD.MinorUnit())
// Output: 2
}
```

791
vendor/github.com/ladydascalie/currency/std.go generated vendored Normal file
View File

@@ -0,0 +1,791 @@
package currency
/*-------------------------------+
| Code generated by std_currency |
| DO NOT EDIT |
+-------------------------------*/
import "fmt"
// Currency defines a currency containing
// It's code, taken from the constants above
// as well as it's minor units, as an integer.
type Currency struct {
code string
minorUnits int
factor int
}
// Code returns the currency code to the user
func (c *Currency) Code() string { return c.code }
// MinorUnits returns the minor unit to the user
func (c *Currency) MinorUnits() int { return c.minorUnits }
// Factor returns the factor by which a float should be multiplied
// to get back to it's smallest denomination
//
// Example:
// pence := 100.00 * currency.GBP.Factor()
func (c *Currency) Factor() int { return c.factor }
// FactorI64 returns the factor, converted to a int64
func (c *Currency) FactorI64() int64 { return int64(c.factor) }
// FactorF64 returns the factor, converted to a float64
func (c *Currency) FactorF64() float64 { return float64(c.factor) }
// Get returns a currency struct if the provided
// code is contained within the valid codes. Otherwise
// an error will be returned
func Get(code string) (*Currency, error) {
if Valid(code) {
val, ok := currencies[code]
if ok {
return &val, nil
}
}
return nil, fmt.Errorf("currency: could not find currency with code: %q", code)
}
// Valid checks if a provided code is contained
// inside the provided ValidCodes slice
func Valid(code string) bool {
for _, c := range ValidCodes {
if c == code {
return true
}
}
return false
}
// Following are all the structs containing currency data
var (
// AED currency struct
AED = Currency{code: "AED", minorUnits: 2, factor: 100}
// AFN currency struct
AFN = Currency{code: "AFN", minorUnits: 2, factor: 100}
// ALL currency struct
ALL = Currency{code: "ALL", minorUnits: 2, factor: 100}
// AMD currency struct
AMD = Currency{code: "AMD", minorUnits: 2, factor: 100}
// ANG currency struct
ANG = Currency{code: "ANG", minorUnits: 2, factor: 100}
// AOA currency struct
AOA = Currency{code: "AOA", minorUnits: 2, factor: 100}
// ARS currency struct
ARS = Currency{code: "ARS", minorUnits: 2, factor: 100}
// AUD currency struct
AUD = Currency{code: "AUD", minorUnits: 2, factor: 100}
// AWG currency struct
AWG = Currency{code: "AWG", minorUnits: 2, factor: 100}
// AZN currency struct
AZN = Currency{code: "AZN", minorUnits: 2, factor: 100}
// BAM currency struct
BAM = Currency{code: "BAM", minorUnits: 2, factor: 100}
// BBD currency struct
BBD = Currency{code: "BBD", minorUnits: 2, factor: 100}
// BDT currency struct
BDT = Currency{code: "BDT", minorUnits: 2, factor: 100}
// BGN currency struct
BGN = Currency{code: "BGN", minorUnits: 2, factor: 100}
// BHD currency struct
BHD = Currency{code: "BHD", minorUnits: 3, factor: 1000}
// BIF currency struct
BIF = Currency{code: "BIF", minorUnits: 0, factor: 1}
// BMD currency struct
BMD = Currency{code: "BMD", minorUnits: 2, factor: 100}
// BND currency struct
BND = Currency{code: "BND", minorUnits: 2, factor: 100}
// BOB currency struct
BOB = Currency{code: "BOB", minorUnits: 2, factor: 100}
// BOV currency struct
BOV = Currency{code: "BOV", minorUnits: 2, factor: 100}
// BRL currency struct
BRL = Currency{code: "BRL", minorUnits: 2, factor: 100}
// BSD currency struct
BSD = Currency{code: "BSD", minorUnits: 2, factor: 100}
// BTN currency struct
BTN = Currency{code: "BTN", minorUnits: 2, factor: 100}
// BWP currency struct
BWP = Currency{code: "BWP", minorUnits: 2, factor: 100}
// BYN currency struct
BYN = Currency{code: "BYN", minorUnits: 2, factor: 100}
// BZD currency struct
BZD = Currency{code: "BZD", minorUnits: 2, factor: 100}
// CAD currency struct
CAD = Currency{code: "CAD", minorUnits: 2, factor: 100}
// CDF currency struct
CDF = Currency{code: "CDF", minorUnits: 2, factor: 100}
// CHE currency struct
CHE = Currency{code: "CHE", minorUnits: 2, factor: 100}
// CHF currency struct
CHF = Currency{code: "CHF", minorUnits: 2, factor: 100}
// CHW currency struct
CHW = Currency{code: "CHW", minorUnits: 2, factor: 100}
// CLF currency struct
CLF = Currency{code: "CLF", minorUnits: 4, factor: 10000}
// CLP currency struct
CLP = Currency{code: "CLP", minorUnits: 0, factor: 1}
// CNY currency struct
CNY = Currency{code: "CNY", minorUnits: 2, factor: 100}
// COP currency struct
COP = Currency{code: "COP", minorUnits: 2, factor: 100}
// COU currency struct
COU = Currency{code: "COU", minorUnits: 2, factor: 100}
// CRC currency struct
CRC = Currency{code: "CRC", minorUnits: 2, factor: 100}
// CUC currency struct
CUC = Currency{code: "CUC", minorUnits: 2, factor: 100}
// CUP currency struct
CUP = Currency{code: "CUP", minorUnits: 2, factor: 100}
// CVE currency struct
CVE = Currency{code: "CVE", minorUnits: 2, factor: 100}
// CZK currency struct
CZK = Currency{code: "CZK", minorUnits: 2, factor: 100}
// DJF currency struct
DJF = Currency{code: "DJF", minorUnits: 0, factor: 1}
// DKK currency struct
DKK = Currency{code: "DKK", minorUnits: 2, factor: 100}
// DOP currency struct
DOP = Currency{code: "DOP", minorUnits: 2, factor: 100}
// DZD currency struct
DZD = Currency{code: "DZD", minorUnits: 2, factor: 100}
// EGP currency struct
EGP = Currency{code: "EGP", minorUnits: 2, factor: 100}
// ERN currency struct
ERN = Currency{code: "ERN", minorUnits: 2, factor: 100}
// ETB currency struct
ETB = Currency{code: "ETB", minorUnits: 2, factor: 100}
// EUR currency struct
EUR = Currency{code: "EUR", minorUnits: 2, factor: 100}
// FJD currency struct
FJD = Currency{code: "FJD", minorUnits: 2, factor: 100}
// FKP currency struct
FKP = Currency{code: "FKP", minorUnits: 2, factor: 100}
// GBP currency struct
GBP = Currency{code: "GBP", minorUnits: 2, factor: 100}
// GEL currency struct
GEL = Currency{code: "GEL", minorUnits: 2, factor: 100}
// GHS currency struct
GHS = Currency{code: "GHS", minorUnits: 2, factor: 100}
// GIP currency struct
GIP = Currency{code: "GIP", minorUnits: 2, factor: 100}
// GMD currency struct
GMD = Currency{code: "GMD", minorUnits: 2, factor: 100}
// GNF currency struct
GNF = Currency{code: "GNF", minorUnits: 0, factor: 1}
// GTQ currency struct
GTQ = Currency{code: "GTQ", minorUnits: 2, factor: 100}
// GYD currency struct
GYD = Currency{code: "GYD", minorUnits: 2, factor: 100}
// HKD currency struct
HKD = Currency{code: "HKD", minorUnits: 2, factor: 100}
// HNL currency struct
HNL = Currency{code: "HNL", minorUnits: 2, factor: 100}
// HTG currency struct
HTG = Currency{code: "HTG", minorUnits: 2, factor: 100}
// HUF currency struct
HUF = Currency{code: "HUF", minorUnits: 2, factor: 100}
// IDR currency struct
IDR = Currency{code: "IDR", minorUnits: 2, factor: 100}
// ILS currency struct
ILS = Currency{code: "ILS", minorUnits: 2, factor: 100}
// INR currency struct
INR = Currency{code: "INR", minorUnits: 2, factor: 100}
// IQD currency struct
IQD = Currency{code: "IQD", minorUnits: 3, factor: 1000}
// IRR currency struct
IRR = Currency{code: "IRR", minorUnits: 2, factor: 100}
// ISK currency struct
ISK = Currency{code: "ISK", minorUnits: 0, factor: 1}
// JMD currency struct
JMD = Currency{code: "JMD", minorUnits: 2, factor: 100}
// JOD currency struct
JOD = Currency{code: "JOD", minorUnits: 3, factor: 1000}
// JPY currency struct
JPY = Currency{code: "JPY", minorUnits: 0, factor: 1}
// KES currency struct
KES = Currency{code: "KES", minorUnits: 2, factor: 100}
// KGS currency struct
KGS = Currency{code: "KGS", minorUnits: 2, factor: 100}
// KHR currency struct
KHR = Currency{code: "KHR", minorUnits: 2, factor: 100}
// KMF currency struct
KMF = Currency{code: "KMF", minorUnits: 0, factor: 1}
// KPW currency struct
KPW = Currency{code: "KPW", minorUnits: 2, factor: 100}
// KRW currency struct
KRW = Currency{code: "KRW", minorUnits: 0, factor: 1}
// KWD currency struct
KWD = Currency{code: "KWD", minorUnits: 3, factor: 1000}
// KYD currency struct
KYD = Currency{code: "KYD", minorUnits: 2, factor: 100}
// KZT currency struct
KZT = Currency{code: "KZT", minorUnits: 2, factor: 100}
// LAK currency struct
LAK = Currency{code: "LAK", minorUnits: 2, factor: 100}
// LBP currency struct
LBP = Currency{code: "LBP", minorUnits: 2, factor: 100}
// LKR currency struct
LKR = Currency{code: "LKR", minorUnits: 2, factor: 100}
// LRD currency struct
LRD = Currency{code: "LRD", minorUnits: 2, factor: 100}
// LSL currency struct
LSL = Currency{code: "LSL", minorUnits: 2, factor: 100}
// LYD currency struct
LYD = Currency{code: "LYD", minorUnits: 3, factor: 1000}
// MAD currency struct
MAD = Currency{code: "MAD", minorUnits: 2, factor: 100}
// MDL currency struct
MDL = Currency{code: "MDL", minorUnits: 2, factor: 100}
// MGA currency struct
MGA = Currency{code: "MGA", minorUnits: 2, factor: 100}
// MKD currency struct
MKD = Currency{code: "MKD", minorUnits: 2, factor: 100}
// MMK currency struct
MMK = Currency{code: "MMK", minorUnits: 2, factor: 100}
// MNT currency struct
MNT = Currency{code: "MNT", minorUnits: 2, factor: 100}
// MOP currency struct
MOP = Currency{code: "MOP", minorUnits: 2, factor: 100}
// MRU currency struct
MRU = Currency{code: "MRU", minorUnits: 2, factor: 100}
// MUR currency struct
MUR = Currency{code: "MUR", minorUnits: 2, factor: 100}
// MVR currency struct
MVR = Currency{code: "MVR", minorUnits: 2, factor: 100}
// MWK currency struct
MWK = Currency{code: "MWK", minorUnits: 2, factor: 100}
// MXN currency struct
MXN = Currency{code: "MXN", minorUnits: 2, factor: 100}
// MXV currency struct
MXV = Currency{code: "MXV", minorUnits: 2, factor: 100}
// MYR currency struct
MYR = Currency{code: "MYR", minorUnits: 2, factor: 100}
// MZN currency struct
MZN = Currency{code: "MZN", minorUnits: 2, factor: 100}
// NAD currency struct
NAD = Currency{code: "NAD", minorUnits: 2, factor: 100}
// NGN currency struct
NGN = Currency{code: "NGN", minorUnits: 2, factor: 100}
// NIO currency struct
NIO = Currency{code: "NIO", minorUnits: 2, factor: 100}
// NOK currency struct
NOK = Currency{code: "NOK", minorUnits: 2, factor: 100}
// NPR currency struct
NPR = Currency{code: "NPR", minorUnits: 2, factor: 100}
// NZD currency struct
NZD = Currency{code: "NZD", minorUnits: 2, factor: 100}
// OMR currency struct
OMR = Currency{code: "OMR", minorUnits: 3, factor: 1000}
// PAB currency struct
PAB = Currency{code: "PAB", minorUnits: 2, factor: 100}
// PEN currency struct
PEN = Currency{code: "PEN", minorUnits: 2, factor: 100}
// PGK currency struct
PGK = Currency{code: "PGK", minorUnits: 2, factor: 100}
// PHP currency struct
PHP = Currency{code: "PHP", minorUnits: 2, factor: 100}
// PKR currency struct
PKR = Currency{code: "PKR", minorUnits: 2, factor: 100}
// PLN currency struct
PLN = Currency{code: "PLN", minorUnits: 2, factor: 100}
// PYG currency struct
PYG = Currency{code: "PYG", minorUnits: 0, factor: 1}
// QAR currency struct
QAR = Currency{code: "QAR", minorUnits: 2, factor: 100}
// RON currency struct
RON = Currency{code: "RON", minorUnits: 2, factor: 100}
// RSD currency struct
RSD = Currency{code: "RSD", minorUnits: 2, factor: 100}
// RUB currency struct
RUB = Currency{code: "RUB", minorUnits: 2, factor: 100}
// RWF currency struct
RWF = Currency{code: "RWF", minorUnits: 0, factor: 1}
// SAR currency struct
SAR = Currency{code: "SAR", minorUnits: 2, factor: 100}
// SBD currency struct
SBD = Currency{code: "SBD", minorUnits: 2, factor: 100}
// SCR currency struct
SCR = Currency{code: "SCR", minorUnits: 2, factor: 100}
// SDG currency struct
SDG = Currency{code: "SDG", minorUnits: 2, factor: 100}
// SEK currency struct
SEK = Currency{code: "SEK", minorUnits: 2, factor: 100}
// SGD currency struct
SGD = Currency{code: "SGD", minorUnits: 2, factor: 100}
// SHP currency struct
SHP = Currency{code: "SHP", minorUnits: 2, factor: 100}
// SLE currency struct
SLE = Currency{code: "SLE", minorUnits: 2, factor: 100}
// SLL currency struct
SLL = Currency{code: "SLL", minorUnits: 2, factor: 100}
// SOS currency struct
SOS = Currency{code: "SOS", minorUnits: 2, factor: 100}
// SRD currency struct
SRD = Currency{code: "SRD", minorUnits: 2, factor: 100}
// SSP currency struct
SSP = Currency{code: "SSP", minorUnits: 2, factor: 100}
// STN currency struct
STN = Currency{code: "STN", minorUnits: 2, factor: 100}
// SVC currency struct
SVC = Currency{code: "SVC", minorUnits: 2, factor: 100}
// SYP currency struct
SYP = Currency{code: "SYP", minorUnits: 2, factor: 100}
// SZL currency struct
SZL = Currency{code: "SZL", minorUnits: 2, factor: 100}
// THB currency struct
THB = Currency{code: "THB", minorUnits: 2, factor: 100}
// TJS currency struct
TJS = Currency{code: "TJS", minorUnits: 2, factor: 100}
// TMT currency struct
TMT = Currency{code: "TMT", minorUnits: 2, factor: 100}
// TND currency struct
TND = Currency{code: "TND", minorUnits: 3, factor: 1000}
// TOP currency struct
TOP = Currency{code: "TOP", minorUnits: 2, factor: 100}
// TRY currency struct
TRY = Currency{code: "TRY", minorUnits: 2, factor: 100}
// TTD currency struct
TTD = Currency{code: "TTD", minorUnits: 2, factor: 100}
// TWD currency struct
TWD = Currency{code: "TWD", minorUnits: 2, factor: 100}
// TZS currency struct
TZS = Currency{code: "TZS", minorUnits: 2, factor: 100}
// UAH currency struct
UAH = Currency{code: "UAH", minorUnits: 2, factor: 100}
// UGX currency struct
UGX = Currency{code: "UGX", minorUnits: 0, factor: 1}
// USD currency struct
USD = Currency{code: "USD", minorUnits: 2, factor: 100}
// USN currency struct
USN = Currency{code: "USN", minorUnits: 2, factor: 100}
// UYI currency struct
UYI = Currency{code: "UYI", minorUnits: 0, factor: 1}
// UYU currency struct
UYU = Currency{code: "UYU", minorUnits: 2, factor: 100}
// UYW currency struct
UYW = Currency{code: "UYW", minorUnits: 4, factor: 10000}
// UZS currency struct
UZS = Currency{code: "UZS", minorUnits: 2, factor: 100}
// VED currency struct
VED = Currency{code: "VED", minorUnits: 2, factor: 100}
// VES currency struct
VES = Currency{code: "VES", minorUnits: 2, factor: 100}
// VND currency struct
VND = Currency{code: "VND", minorUnits: 0, factor: 1}
// VUV currency struct
VUV = Currency{code: "VUV", minorUnits: 0, factor: 1}
// WST currency struct
WST = Currency{code: "WST", minorUnits: 2, factor: 100}
// XAF currency struct
XAF = Currency{code: "XAF", minorUnits: 0, factor: 1}
// XAG currency struct
XAG = Currency{code: "XAG", minorUnits: 0, factor: 1}
// XAU currency struct
XAU = Currency{code: "XAU", minorUnits: 0, factor: 1}
// XBA currency struct
XBA = Currency{code: "XBA", minorUnits: 0, factor: 1}
// XBB currency struct
XBB = Currency{code: "XBB", minorUnits: 0, factor: 1}
// XBC currency struct
XBC = Currency{code: "XBC", minorUnits: 0, factor: 1}
// XBD currency struct
XBD = Currency{code: "XBD", minorUnits: 0, factor: 1}
// XCD currency struct
XCD = Currency{code: "XCD", minorUnits: 2, factor: 100}
// XDR currency struct
XDR = Currency{code: "XDR", minorUnits: 0, factor: 1}
// XOF currency struct
XOF = Currency{code: "XOF", minorUnits: 0, factor: 1}
// XPD currency struct
XPD = Currency{code: "XPD", minorUnits: 0, factor: 1}
// XPF currency struct
XPF = Currency{code: "XPF", minorUnits: 0, factor: 1}
// XPT currency struct
XPT = Currency{code: "XPT", minorUnits: 0, factor: 1}
// XSU currency struct
XSU = Currency{code: "XSU", minorUnits: 0, factor: 1}
// XTS currency struct
XTS = Currency{code: "XTS", minorUnits: 0, factor: 1}
// XUA currency struct
XUA = Currency{code: "XUA", minorUnits: 0, factor: 1}
// XXX currency struct
XXX = Currency{code: "XXX", minorUnits: 0, factor: 1}
// YER currency struct
YER = Currency{code: "YER", minorUnits: 2, factor: 100}
// ZAR currency struct
ZAR = Currency{code: "ZAR", minorUnits: 2, factor: 100}
// ZMW currency struct
ZMW = Currency{code: "ZMW", minorUnits: 2, factor: 100}
// ZWL currency struct
ZWL = Currency{code: "ZWL", minorUnits: 2, factor: 100}
)
var currencies = map[string]Currency{
"AED": AED,
"AFN": AFN,
"ALL": ALL,
"AMD": AMD,
"ANG": ANG,
"AOA": AOA,
"ARS": ARS,
"AUD": AUD,
"AWG": AWG,
"AZN": AZN,
"BAM": BAM,
"BBD": BBD,
"BDT": BDT,
"BGN": BGN,
"BHD": BHD,
"BIF": BIF,
"BMD": BMD,
"BND": BND,
"BOB": BOB,
"BOV": BOV,
"BRL": BRL,
"BSD": BSD,
"BTN": BTN,
"BWP": BWP,
"BYN": BYN,
"BZD": BZD,
"CAD": CAD,
"CDF": CDF,
"CHE": CHE,
"CHF": CHF,
"CHW": CHW,
"CLF": CLF,
"CLP": CLP,
"CNY": CNY,
"COP": COP,
"COU": COU,
"CRC": CRC,
"CUC": CUC,
"CUP": CUP,
"CVE": CVE,
"CZK": CZK,
"DJF": DJF,
"DKK": DKK,
"DOP": DOP,
"DZD": DZD,
"EGP": EGP,
"ERN": ERN,
"ETB": ETB,
"EUR": EUR,
"FJD": FJD,
"FKP": FKP,
"GBP": GBP,
"GEL": GEL,
"GHS": GHS,
"GIP": GIP,
"GMD": GMD,
"GNF": GNF,
"GTQ": GTQ,
"GYD": GYD,
"HKD": HKD,
"HNL": HNL,
"HTG": HTG,
"HUF": HUF,
"IDR": IDR,
"ILS": ILS,
"INR": INR,
"IQD": IQD,
"IRR": IRR,
"ISK": ISK,
"JMD": JMD,
"JOD": JOD,
"JPY": JPY,
"KES": KES,
"KGS": KGS,
"KHR": KHR,
"KMF": KMF,
"KPW": KPW,
"KRW": KRW,
"KWD": KWD,
"KYD": KYD,
"KZT": KZT,
"LAK": LAK,
"LBP": LBP,
"LKR": LKR,
"LRD": LRD,
"LSL": LSL,
"LYD": LYD,
"MAD": MAD,
"MDL": MDL,
"MGA": MGA,
"MKD": MKD,
"MMK": MMK,
"MNT": MNT,
"MOP": MOP,
"MRU": MRU,
"MUR": MUR,
"MVR": MVR,
"MWK": MWK,
"MXN": MXN,
"MXV": MXV,
"MYR": MYR,
"MZN": MZN,
"NAD": NAD,
"NGN": NGN,
"NIO": NIO,
"NOK": NOK,
"NPR": NPR,
"NZD": NZD,
"OMR": OMR,
"PAB": PAB,
"PEN": PEN,
"PGK": PGK,
"PHP": PHP,
"PKR": PKR,
"PLN": PLN,
"PYG": PYG,
"QAR": QAR,
"RON": RON,
"RSD": RSD,
"RUB": RUB,
"RWF": RWF,
"SAR": SAR,
"SBD": SBD,
"SCR": SCR,
"SDG": SDG,
"SEK": SEK,
"SGD": SGD,
"SHP": SHP,
"SLE": SLE,
"SLL": SLL,
"SOS": SOS,
"SRD": SRD,
"SSP": SSP,
"STN": STN,
"SVC": SVC,
"SYP": SYP,
"SZL": SZL,
"THB": THB,
"TJS": TJS,
"TMT": TMT,
"TND": TND,
"TOP": TOP,
"TRY": TRY,
"TTD": TTD,
"TWD": TWD,
"TZS": TZS,
"UAH": UAH,
"UGX": UGX,
"USD": USD,
"USN": USN,
"UYI": UYI,
"UYU": UYU,
"UYW": UYW,
"UZS": UZS,
"VED": VED,
"VES": VES,
"VND": VND,
"VUV": VUV,
"WST": WST,
"XAF": XAF,
"XAG": XAG,
"XAU": XAU,
"XBA": XBA,
"XBB": XBB,
"XBC": XBC,
"XBD": XBD,
"XCD": XCD,
"XDR": XDR,
"XOF": XOF,
"XPD": XPD,
"XPF": XPF,
"XPT": XPT,
"XSU": XSU,
"XTS": XTS,
"XUA": XUA,
"XXX": XXX,
"YER": YER,
"ZAR": ZAR,
"ZMW": ZMW,
"ZWL": ZWL,
}
// ValidCodes is provided so that you may build your own validation against it
var ValidCodes = []string{
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BOV",
"BRL",
"BSD",
"BTN",
"BWP",
"BYN",
"BZD",
"CAD",
"CDF",
"CHE",
"CHF",
"CHW",
"CLF",
"CLP",
"CNY",
"COP",
"COU",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRU",
"MUR",
"MVR",
"MWK",
"MXN",
"MXV",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SHP",
"SLE",
"SLL",
"SOS",
"SRD",
"SSP",
"STN",
"SVC",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"USN",
"UYI",
"UYU",
"UYW",
"UZS",
"VED",
"VES",
"VND",
"VUV",
"WST",
"XAF",
"XAG",
"XAU",
"XBA",
"XBB",
"XBC",
"XBD",
"XCD",
"XDR",
"XOF",
"XPD",
"XPF",
"XPT",
"XSU",
"XTS",
"XUA",
"XXX",
"YER",
"ZAR",
"ZMW",
"ZWL",
}

186
vendor/github.com/ladydascalie/currency/std.kt generated vendored Normal file
View File

@@ -0,0 +1,186 @@
data class Currency(val currencyCode: String, val minorUnits: Int, val factor: Int) {
companion object {
val currencyMap = mapOf<String, Currency>(
"AED" to Currency("AED", 2, 100),
"AFN" to Currency("AFN", 2, 100),
"ALL" to Currency("ALL", 2, 100),
"AMD" to Currency("AMD", 2, 100),
"ANG" to Currency("ANG", 2, 100),
"AOA" to Currency("AOA", 2, 100),
"ARS" to Currency("ARS", 2, 100),
"AUD" to Currency("AUD", 2, 100),
"AWG" to Currency("AWG", 2, 100),
"AZN" to Currency("AZN", 2, 100),
"BAM" to Currency("BAM", 2, 100),
"BBD" to Currency("BBD", 2, 100),
"BDT" to Currency("BDT", 2, 100),
"BGN" to Currency("BGN", 2, 100),
"BHD" to Currency("BHD", 3, 1000),
"BIF" to Currency("BIF", 0, 1),
"BMD" to Currency("BMD", 2, 100),
"BND" to Currency("BND", 2, 100),
"BOB" to Currency("BOB", 2, 100),
"BOV" to Currency("BOV", 2, 100),
"BRL" to Currency("BRL", 2, 100),
"BSD" to Currency("BSD", 2, 100),
"BTN" to Currency("BTN", 2, 100),
"BWP" to Currency("BWP", 2, 100),
"BYN" to Currency("BYN", 2, 100),
"BZD" to Currency("BZD", 2, 100),
"CAD" to Currency("CAD", 2, 100),
"CDF" to Currency("CDF", 2, 100),
"CHE" to Currency("CHE", 2, 100),
"CHF" to Currency("CHF", 2, 100),
"CHW" to Currency("CHW", 2, 100),
"CLF" to Currency("CLF", 4, 10000),
"CLP" to Currency("CLP", 0, 1),
"CNY" to Currency("CNY", 2, 100),
"COP" to Currency("COP", 2, 100),
"COU" to Currency("COU", 2, 100),
"CRC" to Currency("CRC", 2, 100),
"CUC" to Currency("CUC", 2, 100),
"CUP" to Currency("CUP", 2, 100),
"CVE" to Currency("CVE", 2, 100),
"CZK" to Currency("CZK", 2, 100),
"DJF" to Currency("DJF", 0, 1),
"DKK" to Currency("DKK", 2, 100),
"DOP" to Currency("DOP", 2, 100),
"DZD" to Currency("DZD", 2, 100),
"EGP" to Currency("EGP", 2, 100),
"ERN" to Currency("ERN", 2, 100),
"ETB" to Currency("ETB", 2, 100),
"EUR" to Currency("EUR", 2, 100),
"FJD" to Currency("FJD", 2, 100),
"FKP" to Currency("FKP", 2, 100),
"GBP" to Currency("GBP", 2, 100),
"GEL" to Currency("GEL", 2, 100),
"GHS" to Currency("GHS", 2, 100),
"GIP" to Currency("GIP", 2, 100),
"GMD" to Currency("GMD", 2, 100),
"GNF" to Currency("GNF", 0, 1),
"GTQ" to Currency("GTQ", 2, 100),
"GYD" to Currency("GYD", 2, 100),
"HKD" to Currency("HKD", 2, 100),
"HNL" to Currency("HNL", 2, 100),
"HTG" to Currency("HTG", 2, 100),
"HUF" to Currency("HUF", 2, 100),
"IDR" to Currency("IDR", 2, 100),
"ILS" to Currency("ILS", 2, 100),
"INR" to Currency("INR", 2, 100),
"IQD" to Currency("IQD", 3, 1000),
"IRR" to Currency("IRR", 2, 100),
"ISK" to Currency("ISK", 0, 1),
"JMD" to Currency("JMD", 2, 100),
"JOD" to Currency("JOD", 3, 1000),
"JPY" to Currency("JPY", 0, 1),
"KES" to Currency("KES", 2, 100),
"KGS" to Currency("KGS", 2, 100),
"KHR" to Currency("KHR", 2, 100),
"KMF" to Currency("KMF", 0, 1),
"KPW" to Currency("KPW", 2, 100),
"KRW" to Currency("KRW", 0, 1),
"KWD" to Currency("KWD", 3, 1000),
"KYD" to Currency("KYD", 2, 100),
"KZT" to Currency("KZT", 2, 100),
"LAK" to Currency("LAK", 2, 100),
"LBP" to Currency("LBP", 2, 100),
"LKR" to Currency("LKR", 2, 100),
"LRD" to Currency("LRD", 2, 100),
"LSL" to Currency("LSL", 2, 100),
"LYD" to Currency("LYD", 3, 1000),
"MAD" to Currency("MAD", 2, 100),
"MDL" to Currency("MDL", 2, 100),
"MGA" to Currency("MGA", 2, 100),
"MKD" to Currency("MKD", 2, 100),
"MMK" to Currency("MMK", 2, 100),
"MNT" to Currency("MNT", 2, 100),
"MOP" to Currency("MOP", 2, 100),
"MRU" to Currency("MRU", 2, 100),
"MUR" to Currency("MUR", 2, 100),
"MVR" to Currency("MVR", 2, 100),
"MWK" to Currency("MWK", 2, 100),
"MXN" to Currency("MXN", 2, 100),
"MXV" to Currency("MXV", 2, 100),
"MYR" to Currency("MYR", 2, 100),
"MZN" to Currency("MZN", 2, 100),
"NAD" to Currency("NAD", 2, 100),
"NGN" to Currency("NGN", 2, 100),
"NIO" to Currency("NIO", 2, 100),
"NOK" to Currency("NOK", 2, 100),
"NPR" to Currency("NPR", 2, 100),
"NZD" to Currency("NZD", 2, 100),
"OMR" to Currency("OMR", 3, 1000),
"PAB" to Currency("PAB", 2, 100),
"PEN" to Currency("PEN", 2, 100),
"PGK" to Currency("PGK", 2, 100),
"PHP" to Currency("PHP", 2, 100),
"PKR" to Currency("PKR", 2, 100),
"PLN" to Currency("PLN", 2, 100),
"PYG" to Currency("PYG", 0, 1),
"QAR" to Currency("QAR", 2, 100),
"RON" to Currency("RON", 2, 100),
"RSD" to Currency("RSD", 2, 100),
"RUB" to Currency("RUB", 2, 100),
"RWF" to Currency("RWF", 0, 1),
"SAR" to Currency("SAR", 2, 100),
"SBD" to Currency("SBD", 2, 100),
"SCR" to Currency("SCR", 2, 100),
"SDG" to Currency("SDG", 2, 100),
"SEK" to Currency("SEK", 2, 100),
"SGD" to Currency("SGD", 2, 100),
"SHP" to Currency("SHP", 2, 100),
"SLE" to Currency("SLE", 2, 100),
"SLL" to Currency("SLL", 2, 100),
"SOS" to Currency("SOS", 2, 100),
"SRD" to Currency("SRD", 2, 100),
"SSP" to Currency("SSP", 2, 100),
"STN" to Currency("STN", 2, 100),
"SVC" to Currency("SVC", 2, 100),
"SYP" to Currency("SYP", 2, 100),
"SZL" to Currency("SZL", 2, 100),
"THB" to Currency("THB", 2, 100),
"TJS" to Currency("TJS", 2, 100),
"TMT" to Currency("TMT", 2, 100),
"TND" to Currency("TND", 3, 1000),
"TOP" to Currency("TOP", 2, 100),
"TRY" to Currency("TRY", 2, 100),
"TTD" to Currency("TTD", 2, 100),
"TWD" to Currency("TWD", 2, 100),
"TZS" to Currency("TZS", 2, 100),
"UAH" to Currency("UAH", 2, 100),
"UGX" to Currency("UGX", 0, 1),
"USD" to Currency("USD", 2, 100),
"USN" to Currency("USN", 2, 100),
"UYI" to Currency("UYI", 0, 1),
"UYU" to Currency("UYU", 2, 100),
"UYW" to Currency("UYW", 4, 10000),
"UZS" to Currency("UZS", 2, 100),
"VED" to Currency("VED", 2, 100),
"VES" to Currency("VES", 2, 100),
"VND" to Currency("VND", 0, 1),
"VUV" to Currency("VUV", 0, 1),
"WST" to Currency("WST", 2, 100),
"XAF" to Currency("XAF", 0, 1),
"XAG" to Currency("XAG", 0, 1),
"XAU" to Currency("XAU", 0, 1),
"XBA" to Currency("XBA", 0, 1),
"XBB" to Currency("XBB", 0, 1),
"XBC" to Currency("XBC", 0, 1),
"XBD" to Currency("XBD", 0, 1),
"XCD" to Currency("XCD", 2, 100),
"XDR" to Currency("XDR", 0, 1),
"XOF" to Currency("XOF", 0, 1),
"XPD" to Currency("XPD", 0, 1),
"XPF" to Currency("XPF", 0, 1),
"XPT" to Currency("XPT", 0, 1),
"XSU" to Currency("XSU", 0, 1),
"XTS" to Currency("XTS", 0, 1),
"XUA" to Currency("XUA", 0, 1),
"XXX" to Currency("XXX", 0, 1),
"YER" to Currency("YER", 2, 100),
"ZAR" to Currency("ZAR", 2, 100),
"ZMW" to Currency("ZMW", 2, 100),
"ZWL" to Currency("ZWL", 2, 100)
)
}
}

388
vendor/github.com/ladydascalie/currency/std.swift generated vendored Normal file
View File

@@ -0,0 +1,388 @@
import UIKit
struct Currency {
/// The `ISO 4217` currency code
var code: String
/// The number of digits to display after the decimal point when displaying the currency
var minorUnits: Int
/// The factor to divide the currency figure by before handing to a currency formatter
var factor: Int
}
class Currencies {
static let AED: Currency = Currency(code: "AED", minorUnits: 2, factor: 100)
static let AFN: Currency = Currency(code: "AFN", minorUnits: 2, factor: 100)
static let ALL: Currency = Currency(code: "ALL", minorUnits: 2, factor: 100)
static let AMD: Currency = Currency(code: "AMD", minorUnits: 2, factor: 100)
static let ANG: Currency = Currency(code: "ANG", minorUnits: 2, factor: 100)
static let AOA: Currency = Currency(code: "AOA", minorUnits: 2, factor: 100)
static let ARS: Currency = Currency(code: "ARS", minorUnits: 2, factor: 100)
static let AUD: Currency = Currency(code: "AUD", minorUnits: 2, factor: 100)
static let AWG: Currency = Currency(code: "AWG", minorUnits: 2, factor: 100)
static let AZN: Currency = Currency(code: "AZN", minorUnits: 2, factor: 100)
static let BAM: Currency = Currency(code: "BAM", minorUnits: 2, factor: 100)
static let BBD: Currency = Currency(code: "BBD", minorUnits: 2, factor: 100)
static let BDT: Currency = Currency(code: "BDT", minorUnits: 2, factor: 100)
static let BGN: Currency = Currency(code: "BGN", minorUnits: 2, factor: 100)
static let BHD: Currency = Currency(code: "BHD", minorUnits: 3, factor: 1000)
static let BIF: Currency = Currency(code: "BIF", minorUnits: 0, factor: 1)
static let BMD: Currency = Currency(code: "BMD", minorUnits: 2, factor: 100)
static let BND: Currency = Currency(code: "BND", minorUnits: 2, factor: 100)
static let BOB: Currency = Currency(code: "BOB", minorUnits: 2, factor: 100)
static let BOV: Currency = Currency(code: "BOV", minorUnits: 2, factor: 100)
static let BRL: Currency = Currency(code: "BRL", minorUnits: 2, factor: 100)
static let BSD: Currency = Currency(code: "BSD", minorUnits: 2, factor: 100)
static let BTN: Currency = Currency(code: "BTN", minorUnits: 2, factor: 100)
static let BWP: Currency = Currency(code: "BWP", minorUnits: 2, factor: 100)
static let BYN: Currency = Currency(code: "BYN", minorUnits: 2, factor: 100)
static let BZD: Currency = Currency(code: "BZD", minorUnits: 2, factor: 100)
static let CAD: Currency = Currency(code: "CAD", minorUnits: 2, factor: 100)
static let CDF: Currency = Currency(code: "CDF", minorUnits: 2, factor: 100)
static let CHE: Currency = Currency(code: "CHE", minorUnits: 2, factor: 100)
static let CHF: Currency = Currency(code: "CHF", minorUnits: 2, factor: 100)
static let CHW: Currency = Currency(code: "CHW", minorUnits: 2, factor: 100)
static let CLF: Currency = Currency(code: "CLF", minorUnits: 4, factor: 10000)
static let CLP: Currency = Currency(code: "CLP", minorUnits: 0, factor: 1)
static let CNY: Currency = Currency(code: "CNY", minorUnits: 2, factor: 100)
static let COP: Currency = Currency(code: "COP", minorUnits: 2, factor: 100)
static let COU: Currency = Currency(code: "COU", minorUnits: 2, factor: 100)
static let CRC: Currency = Currency(code: "CRC", minorUnits: 2, factor: 100)
static let CUC: Currency = Currency(code: "CUC", minorUnits: 2, factor: 100)
static let CUP: Currency = Currency(code: "CUP", minorUnits: 2, factor: 100)
static let CVE: Currency = Currency(code: "CVE", minorUnits: 2, factor: 100)
static let CZK: Currency = Currency(code: "CZK", minorUnits: 2, factor: 100)
static let DJF: Currency = Currency(code: "DJF", minorUnits: 0, factor: 1)
static let DKK: Currency = Currency(code: "DKK", minorUnits: 2, factor: 100)
static let DOP: Currency = Currency(code: "DOP", minorUnits: 2, factor: 100)
static let DZD: Currency = Currency(code: "DZD", minorUnits: 2, factor: 100)
static let EGP: Currency = Currency(code: "EGP", minorUnits: 2, factor: 100)
static let ERN: Currency = Currency(code: "ERN", minorUnits: 2, factor: 100)
static let ETB: Currency = Currency(code: "ETB", minorUnits: 2, factor: 100)
static let EUR: Currency = Currency(code: "EUR", minorUnits: 2, factor: 100)
static let FJD: Currency = Currency(code: "FJD", minorUnits: 2, factor: 100)
static let FKP: Currency = Currency(code: "FKP", minorUnits: 2, factor: 100)
static let GBP: Currency = Currency(code: "GBP", minorUnits: 2, factor: 100)
static let GEL: Currency = Currency(code: "GEL", minorUnits: 2, factor: 100)
static let GHS: Currency = Currency(code: "GHS", minorUnits: 2, factor: 100)
static let GIP: Currency = Currency(code: "GIP", minorUnits: 2, factor: 100)
static let GMD: Currency = Currency(code: "GMD", minorUnits: 2, factor: 100)
static let GNF: Currency = Currency(code: "GNF", minorUnits: 0, factor: 1)
static let GTQ: Currency = Currency(code: "GTQ", minorUnits: 2, factor: 100)
static let GYD: Currency = Currency(code: "GYD", minorUnits: 2, factor: 100)
static let HKD: Currency = Currency(code: "HKD", minorUnits: 2, factor: 100)
static let HNL: Currency = Currency(code: "HNL", minorUnits: 2, factor: 100)
static let HTG: Currency = Currency(code: "HTG", minorUnits: 2, factor: 100)
static let HUF: Currency = Currency(code: "HUF", minorUnits: 2, factor: 100)
static let IDR: Currency = Currency(code: "IDR", minorUnits: 2, factor: 100)
static let ILS: Currency = Currency(code: "ILS", minorUnits: 2, factor: 100)
static let INR: Currency = Currency(code: "INR", minorUnits: 2, factor: 100)
static let IQD: Currency = Currency(code: "IQD", minorUnits: 3, factor: 1000)
static let IRR: Currency = Currency(code: "IRR", minorUnits: 2, factor: 100)
static let ISK: Currency = Currency(code: "ISK", minorUnits: 0, factor: 1)
static let JMD: Currency = Currency(code: "JMD", minorUnits: 2, factor: 100)
static let JOD: Currency = Currency(code: "JOD", minorUnits: 3, factor: 1000)
static let JPY: Currency = Currency(code: "JPY", minorUnits: 0, factor: 1)
static let KES: Currency = Currency(code: "KES", minorUnits: 2, factor: 100)
static let KGS: Currency = Currency(code: "KGS", minorUnits: 2, factor: 100)
static let KHR: Currency = Currency(code: "KHR", minorUnits: 2, factor: 100)
static let KMF: Currency = Currency(code: "KMF", minorUnits: 0, factor: 1)
static let KPW: Currency = Currency(code: "KPW", minorUnits: 2, factor: 100)
static let KRW: Currency = Currency(code: "KRW", minorUnits: 0, factor: 1)
static let KWD: Currency = Currency(code: "KWD", minorUnits: 3, factor: 1000)
static let KYD: Currency = Currency(code: "KYD", minorUnits: 2, factor: 100)
static let KZT: Currency = Currency(code: "KZT", minorUnits: 2, factor: 100)
static let LAK: Currency = Currency(code: "LAK", minorUnits: 2, factor: 100)
static let LBP: Currency = Currency(code: "LBP", minorUnits: 2, factor: 100)
static let LKR: Currency = Currency(code: "LKR", minorUnits: 2, factor: 100)
static let LRD: Currency = Currency(code: "LRD", minorUnits: 2, factor: 100)
static let LSL: Currency = Currency(code: "LSL", minorUnits: 2, factor: 100)
static let LYD: Currency = Currency(code: "LYD", minorUnits: 3, factor: 1000)
static let MAD: Currency = Currency(code: "MAD", minorUnits: 2, factor: 100)
static let MDL: Currency = Currency(code: "MDL", minorUnits: 2, factor: 100)
static let MGA: Currency = Currency(code: "MGA", minorUnits: 2, factor: 100)
static let MKD: Currency = Currency(code: "MKD", minorUnits: 2, factor: 100)
static let MMK: Currency = Currency(code: "MMK", minorUnits: 2, factor: 100)
static let MNT: Currency = Currency(code: "MNT", minorUnits: 2, factor: 100)
static let MOP: Currency = Currency(code: "MOP", minorUnits: 2, factor: 100)
static let MRU: Currency = Currency(code: "MRU", minorUnits: 2, factor: 100)
static let MUR: Currency = Currency(code: "MUR", minorUnits: 2, factor: 100)
static let MVR: Currency = Currency(code: "MVR", minorUnits: 2, factor: 100)
static let MWK: Currency = Currency(code: "MWK", minorUnits: 2, factor: 100)
static let MXN: Currency = Currency(code: "MXN", minorUnits: 2, factor: 100)
static let MXV: Currency = Currency(code: "MXV", minorUnits: 2, factor: 100)
static let MYR: Currency = Currency(code: "MYR", minorUnits: 2, factor: 100)
static let MZN: Currency = Currency(code: "MZN", minorUnits: 2, factor: 100)
static let NAD: Currency = Currency(code: "NAD", minorUnits: 2, factor: 100)
static let NGN: Currency = Currency(code: "NGN", minorUnits: 2, factor: 100)
static let NIO: Currency = Currency(code: "NIO", minorUnits: 2, factor: 100)
static let NOK: Currency = Currency(code: "NOK", minorUnits: 2, factor: 100)
static let NPR: Currency = Currency(code: "NPR", minorUnits: 2, factor: 100)
static let NZD: Currency = Currency(code: "NZD", minorUnits: 2, factor: 100)
static let OMR: Currency = Currency(code: "OMR", minorUnits: 3, factor: 1000)
static let PAB: Currency = Currency(code: "PAB", minorUnits: 2, factor: 100)
static let PEN: Currency = Currency(code: "PEN", minorUnits: 2, factor: 100)
static let PGK: Currency = Currency(code: "PGK", minorUnits: 2, factor: 100)
static let PHP: Currency = Currency(code: "PHP", minorUnits: 2, factor: 100)
static let PKR: Currency = Currency(code: "PKR", minorUnits: 2, factor: 100)
static let PLN: Currency = Currency(code: "PLN", minorUnits: 2, factor: 100)
static let PYG: Currency = Currency(code: "PYG", minorUnits: 0, factor: 1)
static let QAR: Currency = Currency(code: "QAR", minorUnits: 2, factor: 100)
static let RON: Currency = Currency(code: "RON", minorUnits: 2, factor: 100)
static let RSD: Currency = Currency(code: "RSD", minorUnits: 2, factor: 100)
static let RUB: Currency = Currency(code: "RUB", minorUnits: 2, factor: 100)
static let RWF: Currency = Currency(code: "RWF", minorUnits: 0, factor: 1)
static let SAR: Currency = Currency(code: "SAR", minorUnits: 2, factor: 100)
static let SBD: Currency = Currency(code: "SBD", minorUnits: 2, factor: 100)
static let SCR: Currency = Currency(code: "SCR", minorUnits: 2, factor: 100)
static let SDG: Currency = Currency(code: "SDG", minorUnits: 2, factor: 100)
static let SEK: Currency = Currency(code: "SEK", minorUnits: 2, factor: 100)
static let SGD: Currency = Currency(code: "SGD", minorUnits: 2, factor: 100)
static let SHP: Currency = Currency(code: "SHP", minorUnits: 2, factor: 100)
static let SLE: Currency = Currency(code: "SLE", minorUnits: 2, factor: 100)
static let SLL: Currency = Currency(code: "SLL", minorUnits: 2, factor: 100)
static let SOS: Currency = Currency(code: "SOS", minorUnits: 2, factor: 100)
static let SRD: Currency = Currency(code: "SRD", minorUnits: 2, factor: 100)
static let SSP: Currency = Currency(code: "SSP", minorUnits: 2, factor: 100)
static let STN: Currency = Currency(code: "STN", minorUnits: 2, factor: 100)
static let SVC: Currency = Currency(code: "SVC", minorUnits: 2, factor: 100)
static let SYP: Currency = Currency(code: "SYP", minorUnits: 2, factor: 100)
static let SZL: Currency = Currency(code: "SZL", minorUnits: 2, factor: 100)
static let THB: Currency = Currency(code: "THB", minorUnits: 2, factor: 100)
static let TJS: Currency = Currency(code: "TJS", minorUnits: 2, factor: 100)
static let TMT: Currency = Currency(code: "TMT", minorUnits: 2, factor: 100)
static let TND: Currency = Currency(code: "TND", minorUnits: 3, factor: 1000)
static let TOP: Currency = Currency(code: "TOP", minorUnits: 2, factor: 100)
static let TRY: Currency = Currency(code: "TRY", minorUnits: 2, factor: 100)
static let TTD: Currency = Currency(code: "TTD", minorUnits: 2, factor: 100)
static let TWD: Currency = Currency(code: "TWD", minorUnits: 2, factor: 100)
static let TZS: Currency = Currency(code: "TZS", minorUnits: 2, factor: 100)
static let UAH: Currency = Currency(code: "UAH", minorUnits: 2, factor: 100)
static let UGX: Currency = Currency(code: "UGX", minorUnits: 0, factor: 1)
static let USD: Currency = Currency(code: "USD", minorUnits: 2, factor: 100)
static let USN: Currency = Currency(code: "USN", minorUnits: 2, factor: 100)
static let UYI: Currency = Currency(code: "UYI", minorUnits: 0, factor: 1)
static let UYU: Currency = Currency(code: "UYU", minorUnits: 2, factor: 100)
static let UYW: Currency = Currency(code: "UYW", minorUnits: 4, factor: 10000)
static let UZS: Currency = Currency(code: "UZS", minorUnits: 2, factor: 100)
static let VED: Currency = Currency(code: "VED", minorUnits: 2, factor: 100)
static let VES: Currency = Currency(code: "VES", minorUnits: 2, factor: 100)
static let VND: Currency = Currency(code: "VND", minorUnits: 0, factor: 1)
static let VUV: Currency = Currency(code: "VUV", minorUnits: 0, factor: 1)
static let WST: Currency = Currency(code: "WST", minorUnits: 2, factor: 100)
static let XAF: Currency = Currency(code: "XAF", minorUnits: 0, factor: 1)
static let XAG: Currency = Currency(code: "XAG", minorUnits: 0, factor: 1)
static let XAU: Currency = Currency(code: "XAU", minorUnits: 0, factor: 1)
static let XBA: Currency = Currency(code: "XBA", minorUnits: 0, factor: 1)
static let XBB: Currency = Currency(code: "XBB", minorUnits: 0, factor: 1)
static let XBC: Currency = Currency(code: "XBC", minorUnits: 0, factor: 1)
static let XBD: Currency = Currency(code: "XBD", minorUnits: 0, factor: 1)
static let XCD: Currency = Currency(code: "XCD", minorUnits: 2, factor: 100)
static let XDR: Currency = Currency(code: "XDR", minorUnits: 0, factor: 1)
static let XOF: Currency = Currency(code: "XOF", minorUnits: 0, factor: 1)
static let XPD: Currency = Currency(code: "XPD", minorUnits: 0, factor: 1)
static let XPF: Currency = Currency(code: "XPF", minorUnits: 0, factor: 1)
static let XPT: Currency = Currency(code: "XPT", minorUnits: 0, factor: 1)
static let XSU: Currency = Currency(code: "XSU", minorUnits: 0, factor: 1)
static let XTS: Currency = Currency(code: "XTS", minorUnits: 0, factor: 1)
static let XUA: Currency = Currency(code: "XUA", minorUnits: 0, factor: 1)
static let XXX: Currency = Currency(code: "XXX", minorUnits: 0, factor: 1)
static let YER: Currency = Currency(code: "YER", minorUnits: 2, factor: 100)
static let ZAR: Currency = Currency(code: "ZAR", minorUnits: 2, factor: 100)
static let ZMW: Currency = Currency(code: "ZMW", minorUnits: 2, factor: 100)
static let ZWL: Currency = Currency(code: "ZWL", minorUnits: 2, factor: 100)
static let allCurrencies: [String: Currency] =
[
"AED": AED,
"AFN": AFN,
"ALL": ALL,
"AMD": AMD,
"ANG": ANG,
"AOA": AOA,
"ARS": ARS,
"AUD": AUD,
"AWG": AWG,
"AZN": AZN,
"BAM": BAM,
"BBD": BBD,
"BDT": BDT,
"BGN": BGN,
"BHD": BHD,
"BIF": BIF,
"BMD": BMD,
"BND": BND,
"BOB": BOB,
"BOV": BOV,
"BRL": BRL,
"BSD": BSD,
"BTN": BTN,
"BWP": BWP,
"BYN": BYN,
"BZD": BZD,
"CAD": CAD,
"CDF": CDF,
"CHE": CHE,
"CHF": CHF,
"CHW": CHW,
"CLF": CLF,
"CLP": CLP,
"CNY": CNY,
"COP": COP,
"COU": COU,
"CRC": CRC,
"CUC": CUC,
"CUP": CUP,
"CVE": CVE,
"CZK": CZK,
"DJF": DJF,
"DKK": DKK,
"DOP": DOP,
"DZD": DZD,
"EGP": EGP,
"ERN": ERN,
"ETB": ETB,
"EUR": EUR,
"FJD": FJD,
"FKP": FKP,
"GBP": GBP,
"GEL": GEL,
"GHS": GHS,
"GIP": GIP,
"GMD": GMD,
"GNF": GNF,
"GTQ": GTQ,
"GYD": GYD,
"HKD": HKD,
"HNL": HNL,
"HTG": HTG,
"HUF": HUF,
"IDR": IDR,
"ILS": ILS,
"INR": INR,
"IQD": IQD,
"IRR": IRR,
"ISK": ISK,
"JMD": JMD,
"JOD": JOD,
"JPY": JPY,
"KES": KES,
"KGS": KGS,
"KHR": KHR,
"KMF": KMF,
"KPW": KPW,
"KRW": KRW,
"KWD": KWD,
"KYD": KYD,
"KZT": KZT,
"LAK": LAK,
"LBP": LBP,
"LKR": LKR,
"LRD": LRD,
"LSL": LSL,
"LYD": LYD,
"MAD": MAD,
"MDL": MDL,
"MGA": MGA,
"MKD": MKD,
"MMK": MMK,
"MNT": MNT,
"MOP": MOP,
"MRU": MRU,
"MUR": MUR,
"MVR": MVR,
"MWK": MWK,
"MXN": MXN,
"MXV": MXV,
"MYR": MYR,
"MZN": MZN,
"NAD": NAD,
"NGN": NGN,
"NIO": NIO,
"NOK": NOK,
"NPR": NPR,
"NZD": NZD,
"OMR": OMR,
"PAB": PAB,
"PEN": PEN,
"PGK": PGK,
"PHP": PHP,
"PKR": PKR,
"PLN": PLN,
"PYG": PYG,
"QAR": QAR,
"RON": RON,
"RSD": RSD,
"RUB": RUB,
"RWF": RWF,
"SAR": SAR,
"SBD": SBD,
"SCR": SCR,
"SDG": SDG,
"SEK": SEK,
"SGD": SGD,
"SHP": SHP,
"SLE": SLE,
"SLL": SLL,
"SOS": SOS,
"SRD": SRD,
"SSP": SSP,
"STN": STN,
"SVC": SVC,
"SYP": SYP,
"SZL": SZL,
"THB": THB,
"TJS": TJS,
"TMT": TMT,
"TND": TND,
"TOP": TOP,
"TRY": TRY,
"TTD": TTD,
"TWD": TWD,
"TZS": TZS,
"UAH": UAH,
"UGX": UGX,
"USD": USD,
"USN": USN,
"UYI": UYI,
"UYU": UYU,
"UYW": UYW,
"UZS": UZS,
"VED": VED,
"VES": VES,
"VND": VND,
"VUV": VUV,
"WST": WST,
"XAF": XAF,
"XAG": XAG,
"XAU": XAU,
"XBA": XBA,
"XBB": XBB,
"XBC": XBC,
"XBD": XBD,
"XCD": XCD,
"XDR": XDR,
"XOF": XOF,
"XPD": XPD,
"XPF": XPF,
"XPT": XPT,
"XSU": XSU,
"XTS": XTS,
"XUA": XUA,
"XXX": XXX,
"YER": YER,
"ZAR": ZAR,
"ZMW": ZMW,
"ZWL": ZWL
]
/// Look up a currency struct containing currency and formatting information
///
/// - Parameter code: The `ISO 4217` currency code to search for
/// - Returns: A `Currency` object, if supported. Otherwise nil.
class func currency(for code: String) -> Currency? {
return allCurrencies[code]
}
}

362
vendor/github.com/ladydascalie/currency/std_currency.js generated vendored Normal file
View File

@@ -0,0 +1,362 @@
var stdCurrency = {
// AED currency object
AED: { code: "AED", name: "UAE Dirham" minorUnits: 2, factor: 100},
// AFN currency object
AFN: { code: "AFN", name: "Afghani" minorUnits: 2, factor: 100},
// ALL currency object
ALL: { code: "ALL", name: "Lek" minorUnits: 2, factor: 100},
// AMD currency object
AMD: { code: "AMD", name: "Armenian Dram" minorUnits: 2, factor: 100},
// ANG currency object
ANG: { code: "ANG", name: "Netherlands Antillean Guilder" minorUnits: 2, factor: 100},
// AOA currency object
AOA: { code: "AOA", name: "Kwanza" minorUnits: 2, factor: 100},
// ARS currency object
ARS: { code: "ARS", name: "Argentine Peso" minorUnits: 2, factor: 100},
// AUD currency object
AUD: { code: "AUD", name: "Australian Dollar" minorUnits: 2, factor: 100},
// AWG currency object
AWG: { code: "AWG", name: "Aruban Florin" minorUnits: 2, factor: 100},
// AZN currency object
AZN: { code: "AZN", name: "Azerbaijan Manat" minorUnits: 2, factor: 100},
// BAM currency object
BAM: { code: "BAM", name: "Convertible Mark" minorUnits: 2, factor: 100},
// BBD currency object
BBD: { code: "BBD", name: "Barbados Dollar" minorUnits: 2, factor: 100},
// BDT currency object
BDT: { code: "BDT", name: "Taka" minorUnits: 2, factor: 100},
// BGN currency object
BGN: { code: "BGN", name: "Bulgarian Lev" minorUnits: 2, factor: 100},
// BHD currency object
BHD: { code: "BHD", name: "Bahraini Dinar" minorUnits: 3, factor: 1000},
// BIF currency object
BIF: { code: "BIF", name: "Burundi Franc" minorUnits: 0, factor: 1},
// BMD currency object
BMD: { code: "BMD", name: "Bermudian Dollar" minorUnits: 2, factor: 100},
// BND currency object
BND: { code: "BND", name: "Brunei Dollar" minorUnits: 2, factor: 100},
// BOB currency object
BOB: { code: "BOB", name: "Boliviano" minorUnits: 2, factor: 100},
// BOV currency object
BOV: { code: "BOV", name: "Mvdol" minorUnits: 2, factor: 100},
// BRL currency object
BRL: { code: "BRL", name: "Brazilian Real" minorUnits: 2, factor: 100},
// BSD currency object
BSD: { code: "BSD", name: "Bahamian Dollar" minorUnits: 2, factor: 100},
// BTN currency object
BTN: { code: "BTN", name: "Ngultrum" minorUnits: 2, factor: 100},
// BWP currency object
BWP: { code: "BWP", name: "Pula" minorUnits: 2, factor: 100},
// BYN currency object
BYN: { code: "BYN", name: "Belarusian Ruble" minorUnits: 2, factor: 100},
// BZD currency object
BZD: { code: "BZD", name: "Belize Dollar" minorUnits: 2, factor: 100},
// CAD currency object
CAD: { code: "CAD", name: "Canadian Dollar" minorUnits: 2, factor: 100},
// CDF currency object
CDF: { code: "CDF", name: "Congolese Franc" minorUnits: 2, factor: 100},
// CHE currency object
CHE: { code: "CHE", name: "WIR Euro" minorUnits: 2, factor: 100},
// CHF currency object
CHF: { code: "CHF", name: "Swiss Franc" minorUnits: 2, factor: 100},
// CHW currency object
CHW: { code: "CHW", name: "WIR Franc" minorUnits: 2, factor: 100},
// CLF currency object
CLF: { code: "CLF", name: "Unidad de Fomento" minorUnits: 4, factor: 10000},
// CLP currency object
CLP: { code: "CLP", name: "Chilean Peso" minorUnits: 0, factor: 1},
// CNY currency object
CNY: { code: "CNY", name: "Yuan Renminbi" minorUnits: 2, factor: 100},
// COP currency object
COP: { code: "COP", name: "Colombian Peso" minorUnits: 2, factor: 100},
// COU currency object
COU: { code: "COU", name: "Unidad de Valor Real" minorUnits: 2, factor: 100},
// CRC currency object
CRC: { code: "CRC", name: "Costa Rican Colon" minorUnits: 2, factor: 100},
// CUC currency object
CUC: { code: "CUC", name: "Peso Convertible" minorUnits: 2, factor: 100},
// CUP currency object
CUP: { code: "CUP", name: "Cuban Peso" minorUnits: 2, factor: 100},
// CVE currency object
CVE: { code: "CVE", name: "Cabo Verde Escudo" minorUnits: 2, factor: 100},
// CZK currency object
CZK: { code: "CZK", name: "Czech Koruna" minorUnits: 2, factor: 100},
// DJF currency object
DJF: { code: "DJF", name: "Djibouti Franc" minorUnits: 0, factor: 1},
// DKK currency object
DKK: { code: "DKK", name: "Danish Krone" minorUnits: 2, factor: 100},
// DOP currency object
DOP: { code: "DOP", name: "Dominican Peso" minorUnits: 2, factor: 100},
// DZD currency object
DZD: { code: "DZD", name: "Algerian Dinar" minorUnits: 2, factor: 100},
// EGP currency object
EGP: { code: "EGP", name: "Egyptian Pound" minorUnits: 2, factor: 100},
// ERN currency object
ERN: { code: "ERN", name: "Nakfa" minorUnits: 2, factor: 100},
// ETB currency object
ETB: { code: "ETB", name: "Ethiopian Birr" minorUnits: 2, factor: 100},
// EUR currency object
EUR: { code: "EUR", name: "Euro" minorUnits: 2, factor: 100},
// FJD currency object
FJD: { code: "FJD", name: "Fiji Dollar" minorUnits: 2, factor: 100},
// FKP currency object
FKP: { code: "FKP", name: "Falkland Islands Pound" minorUnits: 2, factor: 100},
// GBP currency object
GBP: { code: "GBP", name: "Pound Sterling" minorUnits: 2, factor: 100},
// GEL currency object
GEL: { code: "GEL", name: "Lari" minorUnits: 2, factor: 100},
// GHS currency object
GHS: { code: "GHS", name: "Ghana Cedi" minorUnits: 2, factor: 100},
// GIP currency object
GIP: { code: "GIP", name: "Gibraltar Pound" minorUnits: 2, factor: 100},
// GMD currency object
GMD: { code: "GMD", name: "Dalasi" minorUnits: 2, factor: 100},
// GNF currency object
GNF: { code: "GNF", name: "Guinean Franc" minorUnits: 0, factor: 1},
// GTQ currency object
GTQ: { code: "GTQ", name: "Quetzal" minorUnits: 2, factor: 100},
// GYD currency object
GYD: { code: "GYD", name: "Guyana Dollar" minorUnits: 2, factor: 100},
// HKD currency object
HKD: { code: "HKD", name: "Hong Kong Dollar" minorUnits: 2, factor: 100},
// HNL currency object
HNL: { code: "HNL", name: "Lempira" minorUnits: 2, factor: 100},
// HTG currency object
HTG: { code: "HTG", name: "Gourde" minorUnits: 2, factor: 100},
// HUF currency object
HUF: { code: "HUF", name: "Forint" minorUnits: 2, factor: 100},
// IDR currency object
IDR: { code: "IDR", name: "Rupiah" minorUnits: 2, factor: 100},
// ILS currency object
ILS: { code: "ILS", name: "New Israeli Sheqel" minorUnits: 2, factor: 100},
// INR currency object
INR: { code: "INR", name: "Indian Rupee" minorUnits: 2, factor: 100},
// IQD currency object
IQD: { code: "IQD", name: "Iraqi Dinar" minorUnits: 3, factor: 1000},
// IRR currency object
IRR: { code: "IRR", name: "Iranian Rial" minorUnits: 2, factor: 100},
// ISK currency object
ISK: { code: "ISK", name: "Iceland Krona" minorUnits: 0, factor: 1},
// JMD currency object
JMD: { code: "JMD", name: "Jamaican Dollar" minorUnits: 2, factor: 100},
// JOD currency object
JOD: { code: "JOD", name: "Jordanian Dinar" minorUnits: 3, factor: 1000},
// JPY currency object
JPY: { code: "JPY", name: "Yen" minorUnits: 0, factor: 1},
// KES currency object
KES: { code: "KES", name: "Kenyan Shilling" minorUnits: 2, factor: 100},
// KGS currency object
KGS: { code: "KGS", name: "Som" minorUnits: 2, factor: 100},
// KHR currency object
KHR: { code: "KHR", name: "Riel" minorUnits: 2, factor: 100},
// KMF currency object
KMF: { code: "KMF", name: "Comorian Franc " minorUnits: 0, factor: 1},
// KPW currency object
KPW: { code: "KPW", name: "North Korean Won" minorUnits: 2, factor: 100},
// KRW currency object
KRW: { code: "KRW", name: "Won" minorUnits: 0, factor: 1},
// KWD currency object
KWD: { code: "KWD", name: "Kuwaiti Dinar" minorUnits: 3, factor: 1000},
// KYD currency object
KYD: { code: "KYD", name: "Cayman Islands Dollar" minorUnits: 2, factor: 100},
// KZT currency object
KZT: { code: "KZT", name: "Tenge" minorUnits: 2, factor: 100},
// LAK currency object
LAK: { code: "LAK", name: "Lao Kip" minorUnits: 2, factor: 100},
// LBP currency object
LBP: { code: "LBP", name: "Lebanese Pound" minorUnits: 2, factor: 100},
// LKR currency object
LKR: { code: "LKR", name: "Sri Lanka Rupee" minorUnits: 2, factor: 100},
// LRD currency object
LRD: { code: "LRD", name: "Liberian Dollar" minorUnits: 2, factor: 100},
// LSL currency object
LSL: { code: "LSL", name: "Loti" minorUnits: 2, factor: 100},
// LYD currency object
LYD: { code: "LYD", name: "Libyan Dinar" minorUnits: 3, factor: 1000},
// MAD currency object
MAD: { code: "MAD", name: "Moroccan Dirham" minorUnits: 2, factor: 100},
// MDL currency object
MDL: { code: "MDL", name: "Moldovan Leu" minorUnits: 2, factor: 100},
// MGA currency object
MGA: { code: "MGA", name: "Malagasy Ariary" minorUnits: 2, factor: 100},
// MKD currency object
MKD: { code: "MKD", name: "Denar" minorUnits: 2, factor: 100},
// MMK currency object
MMK: { code: "MMK", name: "Kyat" minorUnits: 2, factor: 100},
// MNT currency object
MNT: { code: "MNT", name: "Tugrik" minorUnits: 2, factor: 100},
// MOP currency object
MOP: { code: "MOP", name: "Pataca" minorUnits: 2, factor: 100},
// MRU currency object
MRU: { code: "MRU", name: "Ouguiya" minorUnits: 2, factor: 100},
// MUR currency object
MUR: { code: "MUR", name: "Mauritius Rupee" minorUnits: 2, factor: 100},
// MVR currency object
MVR: { code: "MVR", name: "Rufiyaa" minorUnits: 2, factor: 100},
// MWK currency object
MWK: { code: "MWK", name: "Malawi Kwacha" minorUnits: 2, factor: 100},
// MXN currency object
MXN: { code: "MXN", name: "Mexican Peso" minorUnits: 2, factor: 100},
// MXV currency object
MXV: { code: "MXV", name: "Mexican Unidad de Inversion (UDI)" minorUnits: 2, factor: 100},
// MYR currency object
MYR: { code: "MYR", name: "Malaysian Ringgit" minorUnits: 2, factor: 100},
// MZN currency object
MZN: { code: "MZN", name: "Mozambique Metical" minorUnits: 2, factor: 100},
// NAD currency object
NAD: { code: "NAD", name: "Namibia Dollar" minorUnits: 2, factor: 100},
// NGN currency object
NGN: { code: "NGN", name: "Naira" minorUnits: 2, factor: 100},
// NIO currency object
NIO: { code: "NIO", name: "Cordoba Oro" minorUnits: 2, factor: 100},
// NOK currency object
NOK: { code: "NOK", name: "Norwegian Krone" minorUnits: 2, factor: 100},
// NPR currency object
NPR: { code: "NPR", name: "Nepalese Rupee" minorUnits: 2, factor: 100},
// NZD currency object
NZD: { code: "NZD", name: "New Zealand Dollar" minorUnits: 2, factor: 100},
// OMR currency object
OMR: { code: "OMR", name: "Rial Omani" minorUnits: 3, factor: 1000},
// PAB currency object
PAB: { code: "PAB", name: "Balboa" minorUnits: 2, factor: 100},
// PEN currency object
PEN: { code: "PEN", name: "Sol" minorUnits: 2, factor: 100},
// PGK currency object
PGK: { code: "PGK", name: "Kina" minorUnits: 2, factor: 100},
// PHP currency object
PHP: { code: "PHP", name: "Philippine Peso" minorUnits: 2, factor: 100},
// PKR currency object
PKR: { code: "PKR", name: "Pakistan Rupee" minorUnits: 2, factor: 100},
// PLN currency object
PLN: { code: "PLN", name: "Zloty" minorUnits: 2, factor: 100},
// PYG currency object
PYG: { code: "PYG", name: "Guarani" minorUnits: 0, factor: 1},
// QAR currency object
QAR: { code: "QAR", name: "Qatari Rial" minorUnits: 2, factor: 100},
// RON currency object
RON: { code: "RON", name: "Romanian Leu" minorUnits: 2, factor: 100},
// RSD currency object
RSD: { code: "RSD", name: "Serbian Dinar" minorUnits: 2, factor: 100},
// RUB currency object
RUB: { code: "RUB", name: "Russian Ruble" minorUnits: 2, factor: 100},
// RWF currency object
RWF: { code: "RWF", name: "Rwanda Franc" minorUnits: 0, factor: 1},
// SAR currency object
SAR: { code: "SAR", name: "Saudi Riyal" minorUnits: 2, factor: 100},
// SBD currency object
SBD: { code: "SBD", name: "Solomon Islands Dollar" minorUnits: 2, factor: 100},
// SCR currency object
SCR: { code: "SCR", name: "Seychelles Rupee" minorUnits: 2, factor: 100},
// SDG currency object
SDG: { code: "SDG", name: "Sudanese Pound" minorUnits: 2, factor: 100},
// SEK currency object
SEK: { code: "SEK", name: "Swedish Krona" minorUnits: 2, factor: 100},
// SGD currency object
SGD: { code: "SGD", name: "Singapore Dollar" minorUnits: 2, factor: 100},
// SHP currency object
SHP: { code: "SHP", name: "Saint Helena Pound" minorUnits: 2, factor: 100},
// SLE currency object
SLE: { code: "SLE", name: "Leone" minorUnits: 2, factor: 100},
// SLL currency object
SLL: { code: "SLL", name: "Leone" minorUnits: 2, factor: 100},
// SOS currency object
SOS: { code: "SOS", name: "Somali Shilling" minorUnits: 2, factor: 100},
// SRD currency object
SRD: { code: "SRD", name: "Surinam Dollar" minorUnits: 2, factor: 100},
// SSP currency object
SSP: { code: "SSP", name: "South Sudanese Pound" minorUnits: 2, factor: 100},
// STN currency object
STN: { code: "STN", name: "Dobra" minorUnits: 2, factor: 100},
// SVC currency object
SVC: { code: "SVC", name: "El Salvador Colon" minorUnits: 2, factor: 100},
// SYP currency object
SYP: { code: "SYP", name: "Syrian Pound" minorUnits: 2, factor: 100},
// SZL currency object
SZL: { code: "SZL", name: "Lilangeni" minorUnits: 2, factor: 100},
// THB currency object
THB: { code: "THB", name: "Baht" minorUnits: 2, factor: 100},
// TJS currency object
TJS: { code: "TJS", name: "Somoni" minorUnits: 2, factor: 100},
// TMT currency object
TMT: { code: "TMT", name: "Turkmenistan New Manat" minorUnits: 2, factor: 100},
// TND currency object
TND: { code: "TND", name: "Tunisian Dinar" minorUnits: 3, factor: 1000},
// TOP currency object
TOP: { code: "TOP", name: "Paanga" minorUnits: 2, factor: 100},
// TRY currency object
TRY: { code: "TRY", name: "Turkish Lira" minorUnits: 2, factor: 100},
// TTD currency object
TTD: { code: "TTD", name: "Trinidad and Tobago Dollar" minorUnits: 2, factor: 100},
// TWD currency object
TWD: { code: "TWD", name: "New Taiwan Dollar" minorUnits: 2, factor: 100},
// TZS currency object
TZS: { code: "TZS", name: "Tanzanian Shilling" minorUnits: 2, factor: 100},
// UAH currency object
UAH: { code: "UAH", name: "Hryvnia" minorUnits: 2, factor: 100},
// UGX currency object
UGX: { code: "UGX", name: "Uganda Shilling" minorUnits: 0, factor: 1},
// USD currency object
USD: { code: "USD", name: "US Dollar" minorUnits: 2, factor: 100},
// USN currency object
USN: { code: "USN", name: "US Dollar (Next day)" minorUnits: 2, factor: 100},
// UYI currency object
UYI: { code: "UYI", name: "Uruguay Peso en Unidades Indexadas (UI)" minorUnits: 0, factor: 1},
// UYU currency object
UYU: { code: "UYU", name: "Peso Uruguayo" minorUnits: 2, factor: 100},
// UYW currency object
UYW: { code: "UYW", name: "Unidad Previsional" minorUnits: 4, factor: 10000},
// UZS currency object
UZS: { code: "UZS", name: "Uzbekistan Sum" minorUnits: 2, factor: 100},
// VED currency object
VED: { code: "VED", name: "Bolívar Soberano" minorUnits: 2, factor: 100},
// VES currency object
VES: { code: "VES", name: "Bolívar Soberano" minorUnits: 2, factor: 100},
// VND currency object
VND: { code: "VND", name: "Dong" minorUnits: 0, factor: 1},
// VUV currency object
VUV: { code: "VUV", name: "Vatu" minorUnits: 0, factor: 1},
// WST currency object
WST: { code: "WST", name: "Tala" minorUnits: 2, factor: 100},
// XAF currency object
XAF: { code: "XAF", name: "CFA Franc BEAC" minorUnits: 0, factor: 1},
// XAG currency object
XAG: { code: "XAG", name: "Silver" minorUnits: 0, factor: 1},
// XAU currency object
XAU: { code: "XAU", name: "Gold" minorUnits: 0, factor: 1},
// XBA currency object
XBA: { code: "XBA", name: "Bond Markets Unit European Composite Unit (EURCO)" minorUnits: 0, factor: 1},
// XBB currency object
XBB: { code: "XBB", name: "Bond Markets Unit European Monetary Unit (E.M.U.-6)" minorUnits: 0, factor: 1},
// XBC currency object
XBC: { code: "XBC", name: "Bond Markets Unit European Unit of Account 9 (E.U.A.-9)" minorUnits: 0, factor: 1},
// XBD currency object
XBD: { code: "XBD", name: "Bond Markets Unit European Unit of Account 17 (E.U.A.-17)" minorUnits: 0, factor: 1},
// XCD currency object
XCD: { code: "XCD", name: "East Caribbean Dollar" minorUnits: 2, factor: 100},
// XDR currency object
XDR: { code: "XDR", name: "SDR (Special Drawing Right)" minorUnits: 0, factor: 1},
// XOF currency object
XOF: { code: "XOF", name: "CFA Franc BCEAO" minorUnits: 0, factor: 1},
// XPD currency object
XPD: { code: "XPD", name: "Palladium" minorUnits: 0, factor: 1},
// XPF currency object
XPF: { code: "XPF", name: "CFP Franc" minorUnits: 0, factor: 1},
// XPT currency object
XPT: { code: "XPT", name: "Platinum" minorUnits: 0, factor: 1},
// XSU currency object
XSU: { code: "XSU", name: "Sucre" minorUnits: 0, factor: 1},
// XTS currency object
XTS: { code: "XTS", name: "Codes specifically reserved for testing purposes" minorUnits: 0, factor: 1},
// XUA currency object
XUA: { code: "XUA", name: "ADB Unit of Account" minorUnits: 0, factor: 1},
// XXX currency object
XXX: { code: "XXX", name: "The codes assigned for transactions where no currency is involved" minorUnits: 0, factor: 1},
// YER currency object
YER: { code: "YER", name: "Yemeni Rial" minorUnits: 2, factor: 100},
// ZAR currency object
ZAR: { code: "ZAR", name: "Rand" minorUnits: 2, factor: 100},
// ZMW currency object
ZMW: { code: "ZMW", name: "Zambian Kwacha" minorUnits: 2, factor: 100},
// ZWL currency object
ZWL: { code: "ZWL", name: "Zimbabwe Dollar" minorUnits: 2, factor: 100}
};