Esempio n. 1
0
 public static NEP6Wallet Migrate(string path, string db3path, string password)
 {
     using (UserWallet wallet_old = UserWallet.Open(db3path, password))
     {
         NEP6Wallet wallet_new = new NEP6Wallet(path, wallet_old.Name);
         using (wallet_new.Unlock(password))
         {
             foreach (WalletAccount account in wallet_old.GetAccounts())
             {
                 wallet_new.CreateAccount(account.Contract, account.GetKey());
             }
         }
         return(wallet_new);
     }
 }
Esempio n. 2
0
 public WalletLocker(NEP6Wallet wallet)
 {
     this.wallet = wallet;
 }
Esempio n. 3
0
 public NEP6Account(NEP6Wallet wallet, UInt160 scriptHash, KeyPair key, string password)
     : this(wallet, scriptHash, key.Export(password, wallet.Scrypt.N, wallet.Scrypt.R, wallet.Scrypt.P))
 {
     this.key = key;
 }
Esempio n. 4
0
 public NEP6Account(NEP6Wallet wallet, UInt160 scriptHash, string nep2key = null)
     : base(scriptHash)
 {
     this.wallet  = wallet;
     this.nep2key = nep2key;
 }