public async Task <string> NextInternalAddressAsync(Account account) { var client = new WalletService.WalletServiceClient(_channel); var request = new NextAddressRequest { Account = account.AccountNumber, Kind = NextAddressRequest.Types.Kind.Bip0044Internal, }; var resp = await client.NextAddressAsync(request, cancellationToken : _tokenSource.Token); return(resp.Address); }
/// <summary> /// Queries the RPC server for the next external BIP0044 address for an account /// </summary> /// <param name="account">Account to create address for</param> /// <returns>Tuple containing the address and pubkey address strings</returns> public async Task <TupleValue <string, string> > NextExternalAddressAsync(Account account) { var client = new WalletService.WalletServiceClient(_channel); var request = new NextAddressRequest { Account = account.AccountNumber, Kind = NextAddressRequest.Types.Kind.Bip0044External, }; var resp = await client.NextAddressAsync(request, cancellationToken : _tokenSource.Token); return(TupleValue.Create(resp.Address, resp.PublicKey)); }