protected Wallet(FileInfo file = null, PrivateKeyCollection keys = null, AddressCollection publicAddresses = null, AddressCollection watchAddresses = null) { PrivateKeys = keys ?? new PrivateKeyCollection(); WatchAddresses = watchAddresses ?? new AddressCollection(); PublicAddresses = publicAddresses ?? new AddressCollection(); File = file; }
public static async Task <Wallet> CreateAsync(byte[] passphrase, FileInfo file = null, PrivateKeyCollection keys = null, AddressCollection publicAddresses = null, AddressCollection watchAddresses = null) { var wallet = new Wallet(file, keys, publicAddresses, watchAddresses); await wallet.LockAsync(passphrase); await wallet.UnlockAsync(passphrase); return(wallet); }
public static async Task <Wallet> CreateAsync(string passphrase, FileInfo file = null, PrivateKeyCollection keys = null, AddressCollection publicAddresses = null, AddressCollection watchAddresses = null) { return(await CreateAsync(Encoding.UTF8.GetBytes(passphrase), file, keys, publicAddresses, watchAddresses)); }