2019-10-31 15:43:09 -07:00
|
|
|
//
|
|
|
|
// DemoAppConfig.swift
|
|
|
|
// ZcashLightClientSample
|
|
|
|
//
|
|
|
|
// Created by Francisco Gindre on 10/31/19.
|
|
|
|
// Copyright © 2019 Electric Coin Company. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import ZcashLightClientKit
|
|
|
|
|
|
|
|
struct DemoAppConfig {
|
2019-12-16 14:25:45 -08:00
|
|
|
static var host = "127.0.0.1"//"34.68.177.238"
|
2019-12-20 12:52:53 -08:00
|
|
|
static var port = "18232"
|
2019-10-31 15:43:09 -07:00
|
|
|
static var birthdayHeight: BlockHeight = 620_000
|
|
|
|
static var network = ZcashNetwork.testNet
|
|
|
|
static var seed = Array("testreferencealice".utf8)
|
|
|
|
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 {
|
|
|
|
return LightWalletEndpoint(address: self.host, port: self.port, secure: false)
|
|
|
|
}
|
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
|
|
|
|
}
|
2019-11-04 15:18:07 -08:00
|
|
|
|