Ejemplo n.º 1
0
        public static bool TryGetECDsaKey(this ScpConfig config, out ECDsaCng key, string password = null)
        {
            key = null;

            if (config == null)
            {
                return(false);
            }

            // -1- Secretarium Key file
            if (config.secretariumKey != null && config.secretariumKey.TryGetECDsaKeys(password, out byte[] publicKeyRaw, out byte[] privateKeyRaw))
Ejemplo n.º 2
0
        public static bool TryLoad(string configPath, out ScpConfig config)
        {
            config = null;

            if (!File.Exists(configPath))
            {
                configPath = Path.Combine(ConfigDir, configPath);
            }
            if (!File.Exists(configPath))
            {
                return(false);
            }


            config = JsonHelper.DeserializeJsonFromFileAs <ScpConfig>(configPath);

            return(true);
        }
        public void AutoOpen()
        {
            Logger.InfoFormat(@"Starting");

            // Config
            _config = new ScpConfig
            {
                client = new ScpConfig.ClientConfig
                {
                    proofOfWorkMaxDifficulty = 18
                },
                secretarium = new ScpConfig.SecretariumConfig
                {
                    endPoint    = "wss://ovh1.node.secretarium.org:443/",
                    knownPubKey = "rliD_CISqPEeYKbWYdwa-L-8oytAPvdGmbLC0KdvsH-OVMraarm1eo-q4fte0cWJ7-kmsq8wekFIJK0a83_yCg=="
                }
            };
            Scp.Init(_config);

            Logger.InfoFormat(@"Starting with endpoint:{0} and trustedley:{1}", _config.secretarium.endPoint, _config.secretarium.knownPubKey);
        }