public static TLP6Account FromJson(JObject json, TLP6Wallet wallet) { return(new TLP6Account(wallet, json["address"].AsString().ToScriptHash(), json["key"]?.AsString()) { Label = json["label"]?.AsString(), IsDefault = json["isDefault"].AsBoolean(), Lock = json["lock"].AsBoolean(), Contract = TLP6Contract.FromJson(json["contract"]), Extra = json["extra"] }); }
public static TLP6Wallet Migrate(string path, string db3path, string password) { UserWallet wallet_old = UserWallet.Open(db3path, password); TLP6Wallet wallet_new = new TLP6Wallet(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); }
public TLP6Account(TLP6Wallet wallet, UInt160 scriptHash, string nep2key = null) : base(scriptHash) { this.wallet = wallet; this.nep2key = nep2key; }
public TLP6Account(TLP6Wallet 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; }
public WalletLocker(TLP6Wallet wallet) { this.wallet = wallet; }