Esempio n. 1
0
        public async void CreateMultiSig_Clicked(System.Object sender, System.EventArgs e)
        {
            // restore accounts
            var accounts = await helper.RestoreAccounts();

            Account account1 = accounts[0];
            Account account2 = accounts[1];
            Account account3 = accounts[2];


            List <Ed25519PublicKeyParameters> publickeys = new List <Ed25519PublicKeyParameters>();

            publickeys.Add(account1.GetEd25519PublicKey());
            publickeys.Add(account2.GetEd25519PublicKey());
            publickeys.Add(account3.GetEd25519PublicKey());

            MultisigAddress msig    = new MultisigAddress(1, 2, publickeys);
            ulong?          balance = await helper.GetAccountBalance(helper.StorageMultisig);

            var htmlSource = new HtmlWebViewSource();

            htmlSource.Html = @"<html><body><h3>" + "Multisig Address " + msig.ToString() + "</h3>" +
                              "<h3>" + "Multisig balance = " + balance.ToString() + "</h3>" +
                              "</body></html>";

            myWebView.Source = htmlSource;



            CreateMultiSig.Text      = "Multisig created";
            CreateMultiSig.IsEnabled = false;
            GetMultiSig.IsVisible    = true;

            myWebViewp.Source = htmlSource;



            CreateMultiSigp.Text      = "Multisig created";
            CreateMultiSigp.IsEnabled = false;
            GetMultiSigp.IsVisible    = true;


            await SecureStorage.SetAsync(helper.StorageMultisig, msig.ToString());

            buttonstate();

            //     OpenDispenser(helper, network, msig.ToString());
        }
Esempio n. 2
0
        private async void ASA_Appearing(object sender, EventArgs e)
        {
            algodApiInstance = await helper.CreateApiInstance();

            network = await helper.GetNetwork();

            // restore accounts
            var accounts = await helper.RestoreAccounts();

            account1 = accounts[0];
            account2 = accounts[1];
            account3 = accounts[2];
            var nodetype = await SecureStorage.GetAsync(helper.StorageNodeType);

            NetworkLabel.Text = "Network: " + network + " " + nodetype;

            var lastASAbutton = await SecureStorage.GetAsync(helper.StorageLastASAButton);

            if (string.IsNullOrEmpty(lastASAbutton) || lastASAbutton == " ")
            {
                buttonstate("init");
            }
            else
            {
                buttonstate(lastASAbutton);
            }

            //  StorageLastASAButton
        }
        private async void StatefulContracts_Appearing(object sender, EventArgs e)
        {
            client = await helper.CreateApiInstance();

            network = await helper.GetNetwork();

            // restore accounts
            var accounts = await helper.RestoreAccounts();

            creator = accounts[0];
            user    = accounts[1];

            Console.WriteLine("creator account: " + creator.Address);
            Console.WriteLine("user account: " + user.Address);
            var nodetype = await SecureStorage.GetAsync(helper.StorageNodeType);

            //   NetworkLabel.Text = "Network: " + network + " " + nodetype;
            compileTealPrograms();
            OptInBtn.IsEnabled               = false;
            CallAppBtn.IsEnabled             = false;
            ReadLocalStateBtn.IsEnabled      = false;
            ReadGlobalStateBtn.IsEnabled     = false;
            UpdateAppBtn.IsEnabled           = false;
            CallUpdatedAppBtn.IsEnabled      = false;
            ReadLocalStateAgainBtn.IsEnabled = false;
            CloseOutAppBtn.IsEnabled         = false;
            DeleteAppBtn.IsEnabled           = false;
            ClearAppCtn.IsEnabled            = false;
        }
        private async void DryrunDebugging_Appearing(object sender, EventArgs e)
        {
            client = await helper.CreateApiInstance();

            // restore accounts
            var accounts = await helper.RestoreAccounts();

            account1 = accounts[0];
            account2 = accounts[1];

            Console.WriteLine("Account 1: " + account1.Address);
            Console.WriteLine("Account 2: " + account2.Address);
        }
        private async void Rekey_Appearing(object sender, EventArgs e)
        {
            client = await helper.CreateApiInstance();

            // network = await helper.GetNetwork();

            // restore accounts
            var accounts = await helper.RestoreAccounts();

            account1 = accounts[0];
            account2 = accounts[1];
            account3 = accounts[2];

            Console.WriteLine("Account 1 = " + account1.Address);
            Console.WriteLine("Account 2 = " + account2.Address);
            Console.WriteLine("Account 3 = " + account3.Address);
        }
Esempio n. 6
0
        private async void AtomicTransfers_Appearing(object sender, EventArgs e)
        {
            algodApiInstance = await helper.CreateApiInstance();

            network = await helper.GetNetwork();

            // restore accounts
            var accounts = await helper.RestoreAccounts();

            account1 = accounts[0];
            account2 = accounts[1];
            account3 = accounts[2];

            nodetype = await SecureStorage.GetAsync(helper.StorageNodeType);

            NetworkLabel.Text = "Network: " + network + " " + nodetype;
            buttonstate();
        }