Пример #1
0
        public Web4bGameServer(string url, string key, string shop)
        {
            this.key  = key;
            this.shop = shop;

            // create cyprus api instance
            Cyprus = new CyprusHelper(url);
        }
Пример #2
0
        public GameWalletApp(string[] args) : base(args)
        {
            // web4b api
            web4b = new CyprusHelper(config["web4b"].Value <string>("provider"));

            // wallets
            wallets = new WalletService();

            Task.Run(async() =>
            {
                await web4b.GetTimeAsync();
            });
        }
Пример #3
0
        public PoAHelper(string endpointPoA, CallbackHandler callback, string endpointCyprus = null)
        {
            this.callback = callback;

            // websocket connection
            connection = new WebSocketProvider(endpointPoA)
            {
                OnConnected    = OnConnected,
                OnDisconnected = OnDisconnected,
                OnReceived     = OnMessage
            };

            // cyprus helper
            if (!string.IsNullOrEmpty(endpointCyprus))
            {
                Cyprus = new CyprusHelper(endpointCyprus);
            }
        }