forked from oday0311/TrustCore
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBlockchainFactory.swift
45 lines (43 loc) · 1.1 KB
/
BlockchainFactory.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright © 2017-2018 Trust.
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
import Foundation
/// Creates a blockchain for a specific SLIP-0044 coin type.
public func blockchain(coin: SLIP.CoinType) -> Blockchain {
switch coin {
case .bitcoin:
return Bitcoin()
case .litecoin:
return Litecoin()
case .ethereum:
return Ethereum()
case .ethereumClassic:
return EthereumClassic()
case .go:
return Go()
case .thunderToken:
return ThunderToken()
case .poa:
return POA()
case .tron:
return Tron()
case .vechain:
return Vechain()
case .callisto:
return Callisto()
case .wanchain:
return Wanchain()
case .dash:
return Dash()
case .icon:
return Icon()
case .eos:
return EOS()
case .bitcoincash:
return BitcoinCash()
case .tomoChain:
return TomoChain()
}
}