2019-10-31 15:43:09 -07:00
//
// D e m o A p p C o n f i g . s w i f t
// Z c a s h L i g h t C l i e n t S a m p l e
//
// C r e a t e d b y F r a n c i s c o G i n d r e o n 1 0 / 3 1 / 1 9 .
// C o p y r i g h t © 2 0 1 9 E l e c t r i c C o i n C o m p a n y . A l l r i g h t s r e s e r v e d .
//
import Foundation
import ZcashLightClientKit
2020-06-09 07:27:10 -07:00
import MnemonicSwift
2019-10-31 15:43:09 -07:00
struct DemoAppConfig {
2021-02-17 15:02:25 -08:00
static var host = ZcashSDK . isMainnet ? " lightwalletd.electriccoin.co " : " lightwalletd.testnet.electriccoin.co "
2020-04-09 15:25:43 -07:00
static var port : Int = 9067
2021-02-17 15:02:25 -08:00
static var birthdayHeight : BlockHeight = ZcashSDK . isMainnet ? 935000 : 620_000
2020-01-14 14:25:14 -08:00
static var network = ZcashSDK . isMainnet ? ZcashNetwork . mainNet : ZcashNetwork . testNet
2021-02-17 15:02:25 -08:00
static var seed = ZcashSDK . isMainnet ? try ! Mnemonic . deterministicSeedBytes ( from : " old wise letter cigar ready miracle settle crystal bag amateur dial index slot dune crisp ready chest advice camera always drive dentist sport smoke " ) : Array ( " testreferencealicetestreferencealice " . utf8 )
2019-10-31 15:43:09 -07:00
static var address : String {
" \( host ) : \( port ) "
}
2019-11-04 15:18:07 -08:00
static var processorConfig : CompactBlockProcessor . Configuration {
var config = CompactBlockProcessor . Configuration ( cacheDb : try ! __cacheDbURL ( ) , dataDb : try ! __dataDbURL ( ) )
config . walletBirthday = self . birthdayHeight
return config
}
2019-11-14 06:38:54 -08:00
static var endpoint : LightWalletEndpoint {
2020-01-14 14:25:14 -08:00
return LightWalletEndpoint ( address : self . host , port : self . port , secure : true )
2019-11-14 06:38:54 -08:00
}
2019-10-31 15:43:09 -07:00
}
2019-11-04 15:18:07 -08:00
2019-10-31 15:43:09 -07:00
enum ZcashNetwork {
case mainNet
case testNet
}