ZcashLightClientKit/Example/ZcashLightClientSample/ZcashLightClientSample/DemoAppConfig.swift

39 lines
1021 B
Swift
Raw Normal View History

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 {
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)"
}
static var processorConfig: CompactBlockProcessor.Configuration {
var config = CompactBlockProcessor.Configuration(cacheDb: try! __cacheDbURL(), dataDb: try! __dataDbURL())
config.walletBirthday = self.birthdayHeight
return config
}
static var endpoint: LightWalletEndpoint {
return LightWalletEndpoint(address: self.host, port: self.port, secure: false)
}
2019-10-31 15:43:09 -07:00
}
2019-10-31 15:43:09 -07:00
enum ZcashNetwork {
case mainNet
case testNet
}