コード例 #1
0
        public BlockAuthAccount GetAccount()
        {
            var password        = "******";
            var accountFilePath = @"c:\xxx\UTC--2015-11-25T05-05-03.116905600Z--12890d2cce102216644c59dae5baed380d84830c";
            var account         = Account.LoadFromKeyStore(accountFilePath, password);
            var bAccount        = new BlockAuthAccount()
            {
                Address    = account.Address,
                PrivateKey = account.PrivateKey
            };

            return(bAccount);
        }
コード例 #2
0
        public BlockAuthAccount CreateAccount()
        {
            var ecKey      = EthECKey.GenerateKey();
            var privateKey = ecKey.GetPrivateKeyAsBytes().ToHex();
            var getAccount = new Account(privateKey);
            var account    = new BlockAuthAccount()
            {
                Address    = getAccount.Address,
                PrivateKey = getAccount.PrivateKey
            };

            return(account);
        }