Exemplo n.º 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            var permissie = chain.GrantPermisions(
                "1YDR2LGn2SPAjfD7D8tdPmknSQqP4pESQt2Sg3",
                new[]
            {
                MultichainClientCommands.GrantPermissions.send, MultichainClientCommands.GrantPermissions.receive,
                MultichainClientCommands.GrantPermissions.create
            });

            config.AppSettings.Settings["PermissionTransactionId"].Value = permissie;
            config.Save(ConfigurationSaveMode.Modified);
        }
Exemplo n.º 2
0
        public void TestMultiChainGrantPermisions()
        {
            // Setup
            var processWrapper = new ProcessWrapper {
                Mock = true, ReplyMessage = "Blockchain test"
            };
            var chain = new MultiChain(null, processWrapper);

            // Test
            var str = chain.GrantPermisions(new GrantPermisionsData {
                Address = "Test01", Permissions = new[] { GrantPermissions.activate }, Comment = "test02", CommentTo = "test03", NativeAmount = "0.1"
            });

            // Check
            Assert.AreEqual("Blockchain test", str);
            Assert.AreEqual("/c D:\\Development\\Eigenbouw\\bc\\MultiChain\\multichain-cli.exe testchain grant Test01 activate   0.1 \"test02\" \"test03\"", processWrapper.ProcessInfo.Arguments);
        }