Beispiel #1
0
        public NEP6Account CreateAccount(byte[] privateKey, string password)
        {
            var          pubkey   = Helper_NEO.GetPublicKey_FromPrivateKey(privateKey);
            NEP6Contract contract = new NEP6Contract
            {
                Script = Helper_NEO.GetAddressScript_FromPublicKey(pubkey)
            };
            var scripthash = Helper_NEO.CalcHash160(pubkey);

            var nep2key = Helper_NEO.GetNep2FromPrivateKey(privateKey, password);

            NEP6Account account = new NEP6Account(scripthash, nep2key)
            {
                Contract = contract
            };

            AddAccount(account);

            return(account);
        }