Beispiel #1
0
        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;
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 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));
 }