Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
 }