public static void ColdBootInit()
        {
#if UNITY_EDITOR
            var defaultPrivkey = GetDefaultStoredKey();
            if (!string.IsNullOrEmpty(defaultPrivkey))
            {
                IpcInteraction.Stage(() => new AddKeypair(defaultPrivkey), (s, p) => { Initialized = true; });
            }
            else
            {
                PylonsService.instance.RegisterProfile("", (s, p) => { Initialized = true; });
            }
#endif
        }
Esempio n. 2
0
 private static void RetrieveKeyInfo(KeyEvent evt)
 {
     // We purposefully don't expose ExportKeys to PylonsService, so we have to do this the ll way
     IpcInteraction.Stage(() => new ExportKeys(), (s, e) => { evt.Invoke(((KeyResponse)e).Name, ((KeyResponse)e).Address, ((KeyResponse)e).PrivateKey, ((KeyResponse)e).PublicKey); });
 }
Esempio n. 3
0
 public void WalletUiTest(string input, WalletServiceTestEvent evt) => IpcInteraction.Stage(() => new WalletUiTest(input), (s, e) => { evt.Invoke(s, ((TestResponse)e).Output); });
Esempio n. 4
0
        // outside of debug environments, we'll need to use a helper function to make the appropriate iap call
        // for the number of pylons given, get arguments for one of the iap-based backend calls, and then call that
        // here instead.
        // it may make more sense to do all iap on the wallet side so we can offload this logic, in which case a
        // separate GoogleIapGetPylons IPC call does not need to exist.

        public void GetRecipes(RecipeEvent evt) => IpcInteraction.Stage(() => new GetRecipes(), (s, e) => { evt.Invoke(s, ((RecipeResponse)e).Recipes); });
Esempio n. 5
0
 public void GetProfile(string id, ProfileEvent evt) => IpcInteraction.Stage(() => new GetProfile(id), (s, e) => { evt.Invoke(s, ((ProfileResponse)e).Profiles.GetFirst()); });
Esempio n. 6
0
 public void GetPendingExecutions(ExecutionEvent evt) => IpcInteraction.Stage(() => new GetPendingExecutions(), (s, e) => { evt.Invoke(s, ((ExecutionResponse)e).Executions); });
Esempio n. 7
0
 public void GetCookbooks(CookbookEvent evt) => IpcInteraction.Stage(() => new GetCookbooks(), (s, e) => { evt.Invoke(s, ((CookbookResponse)e).Cookbooks); });
Esempio n. 8
0
 public void TxEventMessageHandler(Func <IpcMessage> msg, TxEvent evt) => IpcInteraction.Stage(msg, (s, e) => { evt.Invoke(s, ((TxResponse)e).Transactions); });